Simple L2J Status

In jos

Simple L2J Status

Mesaj  Animalutzu la data de Sam Apr 10, 2010 10:19 pm

Samle PHP L2J Status:
Cod:
<?php

////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////// -------------Simple L2J Status------------- ////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////


$login_ip = "127.0.0.1";
$login_port = "2106";
$game_ip = "127.0.0.1";
$game_port = "7777";
$ventrilo_ip = "127.0.0.1";
$ventrilo_port = "3784";

$mysql_host = "127.0.0.1";
$mysql_user = "root";
$mysql_passwd = "root";
$mysql_db = "l2jdb";

///////////////////////////
////////Login Server///////
///////////////////////////
$ls = @fsockopen ($login_ip, $login_port, $errno, $errstr, 1);
if ( $ls )
    $ls = "<font color=green>Online</font>";
else
    $ls = "<font color=red>Offline</font>";

///////////////////////////
////////Game Server ///////
///////////////////////////
$gs = @fsockopen ($game_ip, $game_port, $errno, $errstr, 1);
if ( $gs )
    $gs = "<font color=green>Online</font>";
else
    $gs = "<font color=red>Offline</font>";
   
///////////////////////////
////////Vent Server ///////
///////////////////////////
$ve = @fsockopen ($ventrilo_ip, $ventrilo_port, $errno, $errstr, 1);
if ( $ve )
    $ve = "<font color=green>Online</font>";
else
    $ve = "<font color=red>Offline</font>";


/////////////////////////////
////MySQL Login Server///////
/////////////////////////////

mysql_connect($mysql_host, $mysql_user, $mysql_passwd) or die ("Nem sikerült csatlakozni a MySQL szerverhez!");
mysql_select_db($mysql_db) or die("Nincs ilyen adatbázis: ".$mysql_db);

// All Accounts
$accounts=mysql_numrows(mysql_query("SELECT * FROM accounts"));

// Online Players Num
$num=mysql_numrows(mysql_query("SELECT * FROM characters WHERE online=1 and accesslevel=0"));

// Online GMs Num
$gmnum=mysql_numrows(mysql_query("SELECT * FROM characters WHERE online=1 and accesslevel>0"));

// All Alliance Num
$alliance=mysql_numrows(mysql_query("SELECT * FROM clan_data WHERE ally_name!=\'\'"));

// All Characters
$char=mysql_numrows(mysql_query("SELECT * FROM characters WHERE accesslevel=0"));

// All GM Characters
$gmchar=mysql_numrows(mysql_query("SELECT * FROM characters Where accesslevel > 0"));

// All Clan
$clan=mysql_numrows(mysql_query("SELECT * FROM clan_data"));

$gmnamesql = mysql_query("SELECT char_name FROM characters WHERE accesslevel>=1 AND online=1 ORDER BY char_name ASC");   
while ($gmnam = mysql_fetch_object($gmnamesql)) { 
$gmname .= "<font color=green>$gmnam->char_name</font>, "; 
}


/////////////////////////////
//////Adatok kiiratása///////
/////////////////////////////
print "
<table width='100%' border='0'>
<tr><td width='80%'><b>Auth Server:</b></td><td>".$ls."</td></tr>
<tr><td width='80%'><b>Bartz Server:</b></td><td>".$gs."</td></tr>
<tr><td width='80%'>Accounts:</td><td>".$accounts."</td></tr>
<tr><td width='80%'>Online Players:</td><td>".$num."</td></tr>
<tr><td width='80%'>Online GM:</td><td>".$gmnum."</td></tr>
<tr><td width='80%'>Characters:</td><td>".$char."</td></tr>
<tr><td width='80%'>GM Characters:</td><td>".$gmchar."</td></tr>
<tr><td width='80%'>Clans:</td><td>".$clan."</td></tr>
<tr><td width='80%'>Alliances:</td><td>".$alliance."</td></tr>
<tr><td>Online GM: ".$gmname."</td></tr>
</table>
";
////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////// -------------Simple L2J Status------------- ////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////

?>
Autor: Mentor
IMG

Downloads:
Inregitrati-va ca sa vedeti link-urile!:
avatar
Animalutzu
Admin

Mesaje : 199
Data de înscriere : 10/04/2010
Varsta : 24
Localizare : Iasi

http://ghid-zone.ace.st

Sus In jos

Sus


 
Permisiunile acestui forum:
Nu puteti raspunde la subiectele acestui forum