Example #1
0
	if($user->AsVirtualBoxManager==false){
		$tpl=new templates();
		echo "alert('". $tpl->javascript_parse_text("{ERROR_NO_PRIVS}")."');";
		die();exit();
	}
	
	if(isset($_GET["popup"])){popup();exit;}
	if(isset($_GET["network"])){network();exit;}
	if(isset($_GET["usb"])){usb_drivers();exit;}
	if(isset($_GET["sound"])){sound_drivers();exit;}
	if(isset($_GET["storage"])){storage_module();exit;}
	if(isset($_GET["module"])){save_module();exit;}
	if(isset($_GET["package"])){save_package();exit;}
	if(isset($_GET["keyboard"])){keyboard_drivers();exit;}
	if(isset($_GET["video"])){video_drivers();exit;}
	if(isset($_GET["filesystem"])){filesystem_drivers();exit;}
	if(isset($_GET["rebuild-default-warn"])){buildDefault();exit;}
	
	
	
js();

function js(){
	$page=CurrentPageName();
	$tpl=new templates();	
	$title=$tpl->_ENGINE_parse_body('{thinclient_hardware}');
	$rebuild_default_warning_modules=$tpl->javascript_parse_text("{rebuild_default_warning_modules}");
	
$html="
	function ThinCLientHardwareLoadpage(){
			YahooWin2('750','$page?popup=yes','$title');
    exit;
}
if (isset($_GET["package"])) {
    save_package();
    exit;
}
if (isset($_GET["keyboard"])) {
    keyboard_drivers();
    exit;
}
if (isset($_GET["video"])) {
    video_drivers();
    exit;
}
if (isset($_GET["filesystem"])) {
    filesystem_drivers();
    exit;
}
if (isset($_GET["rebuild-default-warn"])) {
    buildDefault();
    exit;
}
js();
function js()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $title = $tpl->_ENGINE_parse_body('{thinclient_hardware}');
    $rebuild_default_warning_modules = $tpl->javascript_parse_text("{rebuild_default_warning_modules}");
    $html = "\n\tfunction ThinCLientHardwareLoadpage(){\n\t\t\tYahooWin2('750','{$page}?popup=yes','{$title}');\n\t\t\t\n\t\t}\n\t\n\t\t\n\tvar x_ThinClientHardWare= function (obj) {\n\t\tvar tempvalue=obj.responseText;\n\t\tif(tempvalue.length>3){alert(tempvalue);}\n\t}\t\t\n\t\n\t\n\tfunction ThinClientHardWare(id){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('module',id);\n\t\tif(document.getElementById('id_'+id).checked){XHR.appendData('enabled',1);}else{XHR.appendData('enabled',0);}\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_ThinClientHardWare);\t\n\t}\t\n\n\tfunction ThinClientPackage(id){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('package',id);\n\t\tif(document.getElementById('id_'+id).checked){XHR.appendData('enabled',1);}else{XHR.appendData('enabled',0);}\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_ThinClientHardWare);\t\n\t}\t\n\t\n\tvar x_RebuildDefaultModules= function (obj) {\n\t\tvar tempvalue=obj.responseText;\n\t\tif(tempvalue.length>3){alert(tempvalue);}\n\t\tRefreshTab('main_config_thinclient_hardware');\n\t}\t\t\n\t\n\t\n\n\tfunction RebuildDefaultModules(){\n\t\tif(confirm('{$rebuild_default_warning_modules}')){\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('rebuild-default-warn','yes');\n\t\t\tXHR.sendAndLoad('{$page}', 'GET',x_RebuildDefaultModules);\t\t\n\t\t\n\t\t}\n\t}\n\t\n\t\n\t\n\tThinCLientHardwareLoadpage()";
    echo $html;