Jump to content
php.lv forumi

Recommended Posts

Posted
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }

// Check if locale file is available matching the current site locale setting.

if (file_exists(INFUSIONS."cssl/locale/".$settings['locale'].".php")) {

// Load the locale file matching the current site locale setting.

include INFUSIONS."cssl/locale/".$settings['locale'].".php";

} else {

// Load the infusion's default locale file.

include INFUSIONS."cssl/locale/English.php";

}

include INFUSIONS."cssl_random_panel/csslmore/counterstrike.php";

openside($locale['cssl122']);

$randmin = 1;

$randmax = counting("id", $db_prefix."cssl");

$randomID = rand($randmin, $randmax);

 

$get_data = mysql_query(" SELECT * FROM ".$db_prefix."cssl WHERE id = '".$randomID."'") or die($locale['cssl113'].": ".mysql_error());

$row = @mysql_fetch_array($get_data);

 

$serverip = $row['ip'];

$serverport = $row['port'];

$csinfoP=new CounterStrikeP;

$status=$csinfoP->getServerInfo($serverip,$serverport,1000);

 

//HL2

if($csinfoP->m_servervars["gamename"] == "ð") {

$serversP["servername"] = htmlentities($csinfoP->m_servervars["serveraddress"]);

$serversP["gamename"] = $csinfoP->m_servervars["game"];

$serversP["game"] = $csinfoP->m_servervars["mapname"];

$serversP["mapname"] = $csinfoP->m_servervars["servername"];

$serversP["currentplayers"] = $csinfoP->m_servervars["currentplayers"];

$serversP["maxplayers"] = $csinfoP->m_servervars["maxplayers"];

$serversP["type"] = "HL2";

}

//HL1

else {

$serversP["servername"] = htmlentities($csinfoP->m_servervars["servername"]);

$serversP["gamename"] = $csinfoP->m_servervars["gamename"];

$serversP["game"] = $csinfoP->m_servervars["game"];

$serversP["mapname"] = $csinfoP->m_servervars["mapname"];

$serversP["currentplayers"] = $csinfoP->m_servervars["currentplayers"];

$serversP["maxplayers"] = $csinfoP->m_servervars["maxplayers"];

$serversP["type"] = "HL1";

}

 

if(is_array($csinfoP->m_servervars)) {

echo "<a href=\"".INFUSIONS."cssl/cssl.php?page=servers&server=".$row['id']."\">". $serversP["servername"] . "</a><br />";

echo " ".$serversP["mapname"]." <br />";

echo "<div align='status'>".getMapImageP($serversP["game"]."/".$serversP["mapname"])."</div><br />";

 

 

 

 

echo $locale['cssl116'].": ".$serversP["currentplayers"]." / ".$serversP["maxplayers"]."<br />";

 

}

else {

echo "[<i>".$locale['cssl123']."</i>]";

}

closeside();

?>

 

Tas ir php-fusion / infosions .. ! man vajag vinjam pievienot css ! bet nekadigi nesanak , un pienemsim sim elementam echo " ".$serversP["mapname"]." <br />";

pievienot class ! ka to izdarit ?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...