예제 #1
0
		echo "alert('". $tpl->javascript_parse_text("{ERROR_NO_PRIVS}")."');";
		die();exit();
	}
	
	if(isset($_GET["popup"])){popup();exit;}
	if(isset($_GET["events"])){events();exit;}
	if(isset($_GET["status"])){status();exit;}
	if(isset($_GET["status-service"])){status_service();exit;}
	if(isset($_GET["settings"])){settings();exit;}
	if(isset($_GET["backend-form-add"])){backend_form_add();exit;}
	if(isset($_GET["servername"])){backend_add();exit;}
	if(isset($_GET["delete-servername"])){backend_delete();exit;}
	if(isset($_GET["backends-servers"])){backend_list();exit;}
	if(isset($_GET["EnableCrossRoads"])){SAVECONF();exit;}
	if(isset($_GET["cross-events"])){events_details();exit;}
	if(isset($_GET["cross-notify"])){cross_notify();exit;}
js();	
	
	
function js(){
$page=CurrentPageName();
$users=new usersMenus();
$tpl=new templates();
$title=$tpl->_ENGINE_parse_body('{APP_CROSSROADS}');
$add_backend_server=$tpl->_ENGINE_parse_body('{add_backend_server}');

$html="

function CrossRoadsIndexLoadpage(){
		document.getElementById('BodyContent').innerHTML='<center><img src=img/wait_verybig.gif></center>';
		$('#BodyContent').load('$page?popup=yes');
예제 #2
0
    exit;
}
if (isset($_GET["backends-servers"])) {
    backend_list();
    exit;
}
if (isset($_GET["EnableCrossRoads"])) {
    SAVECONF();
    exit;
}
if (isset($_GET["cross-events"])) {
    events_details();
    exit;
}
if (isset($_GET["cross-notify"])) {
    cross_notify();
    exit;
}
js();
function js()
{
    $page = CurrentPageName();
    $users = new usersMenus();
    $tpl = new templates();
    $title = $tpl->_ENGINE_parse_body('{APP_CROSSROADS}');
    $add_backend_server = $tpl->_ENGINE_parse_body('{add_backend_server}');
    if (isset($_GET["newinterface"])) {
        $newinterface = "&newinterface=yes";
    }
    $html = "\n\nfunction CrossRoadsIndexLoadpage(){\n\t\tdocument.getElementById('BodyContent').innerHTML='<center><img src=img/wait_verybig.gif></center>';\n\t\t\$('#BodyContent').load('{$page}?popup=yes{$newinterface}');\n\t}\t\n\t\n\t\nfunction AddBackend(){\n\tYahooWin2('350','{$page}?backend-form-add=yes','{$add_backend_server}');\n\n}\n\nfunction RefreshBackendServers(){\n\tLoadAjax('backends_server','{$page}?backends-servers=yes');\n}\n\nvar X_AddBckForm= function (obj) {\n\tvar results=obj.responseText;\n\tif(results.length>1){alert(results);}\n\tYahooWin2Hide();\n\tRefreshBackendServers(); \n\t}\n\t\t\n\tfunction AddBckForm(){\n\t\tvar XHR = new XHRConnection();\n\t\tvar servername=document.getElementById('servername').value;\n\t\tvar server_port=document.getElementById('server_port').value;\n\t\tif(servername.length==0){return;}\n\t\tif(server_port.length==0){return;}\n\t\tXHR.appendData('servername',servername+':'+server_port);\n\t\tdocument.getElementById('backnddiv').innerHTML='<center><img src=img/wait_verybig.gif></center>';\n\t\tXHR.sendAndLoad('{$page}', 'GET',X_AddBckForm);\t\t\t\t\n\t}\n\t\n\tfunction AddBckFormCheck(e){\n\t\tif(checkEnter(e)){AddBckForm();}\n\t}\n\t\nfunction BackendDelete(servername){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('delete-servername',servername);\n\t\tdocument.getElementById('backends_server').innerHTML='<center><img src=img/wait_verybig.gif></center>';\n\t\tXHR.sendAndLoad('{$page}', 'GET',X_AddBckForm);\t\n\n}\n\t\n\tCrossRoadsIndexLoadpage();";
    echo $html;