auth->check_module_permissions('sites'); $server_id = intval($_GET["server_id"]); $web_id = intval($_GET["web_id"]); $type = $_GET["type"]; if($_SESSION["s"]["user"]["typ"] == 'admin') { if($type == 'getservertype'){ $json = '{"servertype":"'; $server_type = 'apache'; $app->uses('getconf'); $web_config = $app->getconf->get_server_config($server_id, 'web'); if(!empty($web_config['server_type'])) $server_type = $web_config['server_type']; $json .= $server_type; unset($webconfig); $json .= '"}'; } if($type == 'getserverid'){ $json = '{"serverid":"'; $sql = "SELECT server_id FROM web_domain WHERE domain_id = $web_id"; $server = $app->db->queryOneRecord($sql); $json .= $server['server_id']; unset($server); $json .= '"}'; } } echo $json; ?>