isAdmin( $_SESSION['user_id'] );
if( $isAdmin )
$server_home = $db->getGameHome($home_id);
else
$server_home = $db->getUserGameHome($_SESSION['user_id'],$home_id);
if ( !$server_home )
return;
$port = $_REQUEST['port'];
$ip = $_REQUEST['ip'];
$server_home['ip'] = $ip;
$server_home['port'] = $port;
$stats_players = 0;
$stats_maxplayers = 0;
$server_xml = read_server_config(SERVER_CONFIG_LOCATION."/".$server_home['home_cfg_file']);
$xml_installer = $server_xml->installer;
$mod_name = $server_home['mods'][$mod_id]['mod_name'];
$mod_key = $server_home['mods'][$mod_id]['mod_key'];
if (strtolower($mod_name) == "none")
$mod = $mod_key;
else
$mod = $mod_name;
if ($server_xml->protocol == "gameq")
$query_name = $server_xml->gameq_query_name;
elseif ($server_xml->protocol == "lgsl")
$query_name = $server_xml->lgsl_query_name;
else
$query_name = $mod; // If query name does not exist use mod key instead.
// Check if the screen running the server is running.
if ($server_xml->protocol == "gameq")
{
require('protocol/GameQ/functions.php');
require_once('protocol/GameQ/GameQMonitor.php');
}
else if ($server_xml->protocol == "lgsl")
{
require('protocol/lgsl/functions.php');
require_once('protocol/lgsl/LGSLMonitor.php');
}
else if ($server_xml->protocol == "teamspeak3")
{
require_once('protocol/TeamSpeak3/TS3Monitor.php');
}
else
{
// This is here because some servers are not supported by LGSL/GameQ or
// because we do not have proper support for them yet.
// With properly supported games this should not needed.
// (In a perfect world no one would need an insurance.)
$status = "online";
$map = $status;
$maplocation = get_map_path($query_name,$mod,$map);
@$notifications .= get_lang("query_protocol_not_supported");
}
$map_image_upload = '
';
@$map_icon = "";
@$currentmap = $map;
//Properties for Specific Status
if($status == "half" || $status == "online")
{
if($status == "online")
{
$onlineT = "
![]() ". get_lang("restart_server") . " | ![]() ". get_lang("stop_server") . " |