Location: PHPKode > projects > PhpBlock > A9.8/script/javascript/functionfromphp.js.php
<?php
include_once "../../site.class.php";
include_once $PATH_TO_CODE."/script/fonction.php";
?>
function getImageSite(parRelativePath, parKey) {
<?php
	$locIndice = 0;
	$locListMirror = Site::getImageSiteMirror();
	echo "locKey=parKey%".count($locListMirror).";\n";
	echo "switch(locKey) {\n";
	foreach($locListMirror as $locMirror) {
		echo "case $locIndice:\n";
		echo "return \"$locMirror/\"+parRelativePath;\n";
		$locIndice++; 
	}
	echo "}";
?>
}
<?php
?>
Return current item: PhpBlock