Example #1
0
    exit;
}
if (isset($_GET["getmem"])) {
    getmem();
    exit;
}
if (isset($_GET["getcpu"])) {
    getCpu();
    exit;
}
if (isset($_GET["taskslist"])) {
    processes();
    exit;
}
if (isset($_GET["swap-infos"])) {
    GetSwap();
    exit;
}
js();
function js()
{
    $page = CurrentPageName();
    $prefix = str_replace(".", "_", $page);
    $tpl = new templates();
    $title = $tpl->_ENGINE_parse_body('{empty_swap}');
    $html = "\n\tvar {$prefix}tant=0;\n\n\t\n\tfunction {$prefix}demarre(){\n\t\tif(!RTMMailOpen()){return;}\n\t\t{$prefix}tant = {$prefix}tant+1;\n\t\tif ({$prefix}tant < 10 ) {                           \n\t      \tsetTimeout(\"{$prefix}demarre()\",950);\n\t      } else {\n\t\t\t\t{$prefix}tant = 0;\n\t\t\t\t{$prefix}ChargeLogs();\n\t\t\t\t{$prefix}demarre();                                \n\t   }\n\t}\n\n\tfunction {$prefix}LoadPage(){\n\t\tRTMMail(700,'{$page}?popup=yes','{$title}');\n\t\t{$prefix}demarre();\n\t}\n\t\n\tvar x_{$prefix}ChargeLogs3= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tdocument.getElementById('swap_infos').innerHTML=results;\n\t\t\t\n\t}\t\t\n\n\tvar x_{$prefix}ChargeLogs2= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tvar randomnumber=Math.floor(Math.random()*11000);\n\t\tdocument.getElementById('CurrentSystemTaskManagerCPU').innerHTML=results;\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('swap-infos','yes');\n\t\tXHR.appendData('ran',randomnumber);\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_{$prefix}ChargeLogs3);\t\t\t\n\t}\t\n\t\n\tvar x_{$prefix}ChargeLogs= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tdocument.getElementById('CurrentSystemTaskManager').innerHTML=results;\n\t\tvar randomnumber=Math.floor(Math.random()*11000);\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('getcpu','yes');\n\t\tXHR.appendData('ran',randomnumber);\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_{$prefix}ChargeLogs2);\t\t\n\t\t\t\t\n\t}\t\n\t\n\tfunction {$prefix}ChargeLogs(){\n\t\tvar randomnumber=Math.floor(Math.random()*11000);\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('getmem','yes');\n\t\tXHR.appendData('ran',randomnumber);\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_{$prefix}ChargeLogs);\n\t\n\t}\n\t\nvar x_ParseFormLDAP= function (obj) {\n\t\t\t\tvar results=obj.responseText;\n\t\t\t\tif(results.length>0){alert(results);}\n\t\t\t\tLDAPInterFace();\n\t\t\t}\t\t\n\t\n\n\t\n\t\n{$prefix}LoadPage();";
    echo $html;
}
function popup()
{
    $sock = new sockets();
Example #2
0
	$user=new usersMenus();
	if($user->AsSystemAdministrator==false){
		$tpl=new templates();
		echo $tpl->_ENGINE_parse_body("alert('{ERROR_NO_PRIVS}');");
		die();exit();
	}
	

if(isset($_GET["PID"])){PIDInfos();exit;}
if(isset($_GET["reload"])){echo page_proc();exit;}
if(isset($_GET["KillProcessByPid"])){KillProcessByPid();exit;}
if(isset($_GET["popup"])){popup();exit;}
if(isset($_GET["getmem"])){getmem();exit;}
if(isset($_GET["getcpu"])){getCpu();exit;}
if(isset($_GET["taskslist"])){processes();exit;}
if(isset($_GET["swap-infos"])){GetSwap();exit;}
js();

function js(){
$page=CurrentPageName();
$prefix=str_replace(".","_",$page);	
$tpl=new templates();
$title=$tpl->_ENGINE_parse_body('{empty_swap}');
	
	$html="
	var {$prefix}tant=0;

	
	function {$prefix}demarre(){
		if(!RTMMailOpen()){return;}
		{$prefix}tant = {$prefix}tant+1;