auth->check_module_permissions('monitor'); /* Get the dataType to show */ $dataType = $_GET["type"]; $output = ''; switch($dataType) { case 'server_load': $template = 'templates/show_data.htm'; $output .= showServerLoad(); $title = $app->lng("Server Load").' (Server: ' . $_SESSION['monitor']['server_name'] . ')'; $description = ''; break; case 'disk_usage': $template = 'templates/show_data.htm'; $output .= showDiskUsage(); $title = $app->lng("Disk usage").' (Server: ' . $_SESSION['monitor']['server_name'] . ')'; $description = ''; break; case 'mem_usage': $template = 'templates/show_data.htm'; $output .= showMemUsage(); $title = $app->lng("Memory usage").' (Server: ' . $_SESSION['monitor']['server_name'] . ')'; $description = ''; break; case 'cpu_info': $template = 'templates/show_data.htm'; $output .= showCpuInfo(); $title = $app->lng("CPU info").' (Server: ' . $_SESSION['monitor']['server_name'] . ')'; $description = ''; break; case 'services': $template = 'templates/show_data.htm'; $output .= showServices(); $title = $app->lng("Status of services").' (Server: ' . $_SESSION['monitor']['server_name'] . ')'; $description = ''; break; default: $template = ''; break; } // Loading the template $app->uses('tpl'); $app->tpl->newTemplate("form.tpl.htm"); $app->tpl->setInclude('content_tpl',$template); $app->tpl->setVar("output",$output); $app->tpl->setVar("title",$title); $app->tpl->setVar("description",$description); $app->tpl_defaults(); $app->tpl->pparse(); ?>