function js_script()
{
    header("content-type: application/x-javascript");
    if (isset($_GET["encoded"])) {
        $_GET["ou"] = base64_decode($_GET["ou"]);
    }
    if ($_GET["ou"] == null) {
        $_GET["ou"] = ORGANISTATION_FROM_USER();
    }
    $ou = $_GET["ou"];
    $ou_encrypted = base64_encode($ou);
    $page = CurrentPageName();
    $tpl = new templates();
    $title = $tpl->_ENGINE_parse_body("{$ou}: {localdomains}");
    $datas = file_get_contents("js/edit.localdomain.js");
    $startup = "LoadOuDOmainsIndex();";
    if (isset($_GET["in-front-ajax"])) {
        $startup = "LoadOuDOmainsIndexInFront();";
        $jsadd = remote_domain_js();
    }
    $html = "\n\tvar timeout=0;\n\t{$datas}\n\t\n\tfunction LoadOuDOmainsIndex(){\n\t\tYahooWin0(750,'{$page}?ajax=yes&ou={$ou_encrypted}&master-t={$_GET["master-t"]}','{$title}',true);\n\t\t\n\t}\n\t\n\tfunction LoadOuDOmainsIndexInFront(){\n\t\t\$('#BodyContent').load('{$page}?ajax=yes&ou={$ou_encrypted}&in-front-ajax=yes');\n\t}\t\n\t{$jsadd}\n\t{$startup}\n\t";
    echo $html;
}
Example #2
0
function js_script(){
	if(isset($_GET["encoded"])){$_GET["ou"]=base64_decode($_GET["ou"]);}
	if($_GET["ou"]==null){$_GET["ou"]=ORGANISTATION_FROM_USER();}
	$ou=$_GET["ou"];
	$ou_encrypted=base64_encode($ou);
	$page=CurrentPageName();
	$tpl=new templates();
	$title=$tpl->_ENGINE_parse_body("$ou: {localdomains}");
	$datas=file_get_contents("js/edit.localdomain.js");
	$startup="LoadOuDOmainsIndex();";
	
	if(isset($_GET["in-front-ajax"])){
		$startup="LoadOuDOmainsIndexInFront();";
		$jsadd=remote_domain_js();
	}
	
	$html="
	var timeout=0;
	$datas
	
	function LoadOuDOmainsIndex(){
		YahooWin0(750,'$page?ajax=yes&ou=$ou_encrypted','$title');
		
	}
	
	function LoadOuDOmainsIndexInFront(){
		$('#BodyContent').load('$page?ajax=yes&ou=$ou_encrypted&in-front-ajax=yes');
	}	
	$jsadd
	$startup
	";
	
	
	echo $html;
	
}