<?
/*
//||||||||||||||||||||||||||||||||||||||||||||||||\\
\\*          SUPER HERO MOD WEB STATS 3.0         //
//                                                \\
\\  Written By ShadowLeader aka 123 (Tim Hansen)  //
//                                                \\
\\              http://SH-MOD.TK                  //
//          Email: shadowleader@jubii.dk          \\
\\          MSN: shadowleader11@hotmail.com       //
//                                                \\
\\   You are allowed to edit anything in these    //
//     files, as long as these lines remain.      \\
\\                                                //
//   If you have any trouble with the system,     \\
\\       go to www.SH-MOD.TK to get help.         //
//                                                \\
\\   Thanks to:                                   //
//   AlleyKat - Help with Template system         \\
\\   MajesticM00se - A little code                //
//   Vittu - Finding bugs                         \\
\\||||||||||||||||||||||||||||||||||||||||||||||||//
*/

require "include/header.php";

dbconn(true);

stdhead("Server Stats");
/////////START/////////
?>
<?php

//Include Template for CS: Source PHP PQuery
include_once ('query/SourceQuery.php');

//Page Text to use
$pagenames = "Server";

//Array of IPs to Query
$QueryArray[1] = array("$serverip");
//$QueryArray[2] = array("69.93.78.194:27015", "69.93.78.194:27018", "69.93.78.194:27016");
//$QueryArray[3] = array("69.13.7.178:27015", "69.64.39.4:27015");

//*** Do Not Edit Below Here ****//
$s = $_REQUEST['s'];
$self = $_SERVER['PHP_SELF'];
$numPages = count($QueryArray);
if (is_null($s)) $s = 1;

/*echo "<table cellspacing=4 align=center class=navbox><tr>\n";

for ($i = 1; $i <= $numPages; $i++) {
	if ($i == $s) {
		echo "    <td class=nav-selected>[ $pagenames $i ]</td>\n";
	}
	else {
		echo "    <td class=nav-link>[ <a class=query href=\"$self?s=$i\">$pagenames $i</a> ]</td>\n";
	}
}

echo "</tr></table>\n";
echo "<br>\n";*/

$numServers = count($QueryArray[$s]);
if ($s < 1 || $s > $numPages) {
	echo "<center><h2>Invalid $pagenames Number</h2></center>";
}
elseif ($numServers <= 0) {
	echo "<center><h2>No IPs Listed for This $pagenames</h2></center>";
}

for ($i = 0; $i < $numServers; $i++) {
	QueryServer($QueryArray[$s][$i]);
}

?>
<?
/////////END/////////
stdfoot();
?>