All pastes #912750 Raw Edit

magicbox

public text v1 · immutable
·published 2008-02-21 16:29 UTC
rendered paste body
<?php

// Turn off all error reporting
error_reporting(0);

?> 


<?php

	$serverstatus = array(
		"online" => false,
		"count" => 0,
		"time" => 0,
		"players" => array(),
		"result" => false,
		"npc" => false
	);
	

//include les fonctions qui cherche dans le xml
require_once("getLaanxStatus.inc.php");

//r�cup�ration les donn�es sur le serveur
$server_stat=getLaanxStatus();

//$player nom de la clef et nom du perso , info  est un tableau guild et title = rang dans la guild
/*echo "LISTE DES CHAR ONLINE:";
foreach($server_stat["players"] as $player => $info)
{
	// affiche tout
	//echo $player," est dans la guilde: ",$info["guild"]," et sont rang est: ",$info["title"],"<br />";
	echo $player,"<br />";
}




//espace
*/
//on trie le tableau par nom de joueur
ksort($server_stat["players"]);
?>



<html>
<head>
<meta http-equiv="refresh" content="30">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
    cursor:url("img/dudu.cur");
  	
}
-->
</style>
<link href="main.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.Style4 {
	color: #AB3333;
	font-weight: bold;
	font-size: 11px;
}
.Style5 {
	color: #AB3333;
	font-size: 10px;
}
.Style6 {
	font-family: "Lucida Grande", Tahoma, Verdana;
	font-weight: bold;
	font-size: 13px;
	color: #6A465A;
}
.Style4g {
	color: #768183;
	font-weight: bold;
	font-size: 11px;
}
.Style5g {
	color: #85631A;
	font-size: 9px;
	font-style: italic;
}
-->
</style>

</head>

<body style="background-color:transparent">

<CENTER>
<table width="159" height="300" border="0" class="intdgachno">
  <tr>
    <td height="25" valign="top">
	  <div align="left" class="Style6">
	    <?php
		

 if($server_stat["count"]>=20){
echo "<img src=img/on".($server_stat["npc"]?"on":"off").".png>";}
	
 elseif($server_stat["online"]==false){
 echo "<img src=img/off.png>";}
 else{
 	echo "<img src=img/dev.png>";}

		?><br>
      <img src="img/1.png" width="160" height="1"></div></td>
  </tr>
  <tr>
    <td height="12" valign="top">
</td>
  </tr>
  <tr>
    <td height="25" valign="top">
	  <div align="center" class="Style6">
	    <?php
		//retourne  1 ou 0 si server online
 if($server_stat["online"]==true){
	/*echo "SERVER ONLINE";*/
	echo $server_stat["count"];
	echo " players";
 }else
	echo " ";?></div></td>
  </tr>
  <tr>
    <td height="20"><div align="center" class="Style4">
	<?php {if($server_stat["count"]>=30)
	echo "The Jumping Groffels";}
	?></div></td>
  </tr>
  <tr>
    <td height="51">
	
      <div align="center" class="Style5">
<?php 	

foreach($server_stat["players"] as $player => $info)
{
	//si le player est dans la guilde on affiche le nom
	if ($info["guild"]=="The Jumping Groffels")
	
		
		echo $player," ";
	
}

?></div></td>
  </tr> 

  <tr>
    <td valign="top">
	
      <div align="center" class="Style5g">
<?php 	

foreach($server_stat["players"] as $player => $info)
{
	//si le player est dans la guilde on affiche le nom
	if ($info["guild"]=="Game Master")
	
		echo $player," ";
	
}


?></div></td>
  </tr>
  
</table>

</CENTER>

</body>
</html>