Jump to content
GIGN Forum

Servera Monitora Bilde


ExTent
 Share

Recommended Posts

//Viss pareejais shits (iipashiem pro ieteicams neko nelabot)
$konekcija = mysql_connect($hosts,$lietotajs,$parole) or die("Nesanaca piekonekteties db");
mysql_select_db($db,$konekcija) or die("Nesanaca izveleties db");
$vaicajums1="SELECT * FROM details";
$rezultats1=mysql_query($vaicajums1,$konekcija) or die ("Nesanaca izpildit vaicajumu #1");
$aile = mysql_fetch_array($rezultats1);
$nakamamape=$aile['nextmap'];
$laiksatlicis=$aile['timeleft'];
$laikalimits=$aile['timelimit'];
$mape=$aile['mapname'];
$maxplayers=$aile['maxplayers'];
$rezultatst=$aile['scoret'];
$rezultatsct=$aile['scorect'];
$vaicajums2ct="SELECT * FROM players WHERE team='CT'";
$rezultats2ct=mysql_query($vaicajums2ct,$konekcija) or die ("Nesanaca izpildit vaicajumu #2");
$speletajict=mysql_num_rows($rezultats2ct);
$vaicajums2t="SELECT * FROM players WHERE team='TERRORIST'";
$rezultats2t=mysql_query($vaicajums2t,$konekcija) or die ("Nesanaca izpildit vaicajumu #2");
$speletajit=mysql_num_rows($rezultats2t);
$vaicajums2unknow="SELECT * FROM players WHERE team='SPECTATOR' OR team='UNASSIGNED'";
$rezultats2unknow=mysql_query($vaicajums2unknow,$konekcija) or die ("Nesanaca izpildit vaicajumu #2");
$speletajiunknow=mysql_num_rows($rezultats2unknow);
$speletaji=mysql_num_rows($rezultats2ct)+mysql_num_rows($rezultats2t)+mysql_num_rows($rezultats2unknow);
$brivisloti=$maxplayers-$speletaji;


echo "<b><font color=\"white\">» Server monitor</font></b><br />";
echo "<b><font color=\"white\">Statuss:</font>  </b>";
if($brivisloti=="0") { echo "Nav brīvu slotu"; } elseif($brivisloti=="1") { echo "1 brīvs slots"; } else { echo $brivisloti." brīvi sloti"; }     
echo "<br /><b><font color=\"white\">Spēlētāji:</font></b>   $speletaji/$maxplayers";
echo "<br /><b><font color=\"white\">Karte:</font></b>   $mape";
echo "<br /><b><font color=\"white\">Laiks:</font></b>   $laiksatlicis/$laikalimits:00";
echo "<br /><b><font color=\"white\">Nākamā mape:</font></b>   $nakamamape";

echo "<br />";

echo "<br /><b><font color=\"#3BB9FF\">» CT komanda ar ($rezultatsct) uzvarām</font></b><br />";
while($aile2ct = mysql_fetch_array($rezultats2ct)) {
echo $aile2ct['name']."  <font color=\"white\">ar</font>  ".$aile2ct['frags']." <font color=\"white\">Fragiem</font>  ".$aile2ct['deaths']." <font color=\"white\">Nāvēm</font><br />";
}

echo "<br />";
echo "<b><font color=\"red\">» T komanda ar ($rezultatst) uzvarām</font></b><br />";
while($aile2t = mysql_fetch_array($rezultats2t)) {
echo $aile2t['name']."  <font color=\"white\">ar</font>  ".$aile2t['frags']." <font color=\"white\">Fragiem</font>  ".$aile2t['deaths']." <font color=\"white\">Nāvēm</font><br />";
}

echo "<br />";
echo "<b><font color=\"gray\">» Skatītāji</font></b><br />";
while($aile2unknow = mysql_fetch_array($rezultats2unknow)) {
echo $aile2unknow['name'];
}

mysql_free_result($rezultats1);
mysql_free_result($rezultats2ct);
mysql_free_result($rezultats2t);
mysql_free_result($rezultats2unknow);
mysql_close($konekcija);
?>

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...