Parašė dove457· 2008 Lie. 31 10:07:04
#1
Sveiki. Gal galite sita koduka padaryti panele ? Man neiseina :(
<?php
#Login Server
$serverLip="127.0.0.1";
$serverLport="2106";
#GameServer
$serverGip="127.0.01";
$serverGPort="7777";
#Database Host
$databaseHost="localhost";
$databaseLogin="root";
$databasePassword="";
$databaseName="l2jdb";
?>
<?php
#Login
$flogin = @fsockopen ($serverLip,$serverLport, $errno, $errstr, 1);
if ( $flogin )
$lstat = "<font color=#00FF00>ONLINE</font>";
else
$lstat = "<font color=#FF0000>OFFLINE</font>";
#Sieghardt
$fgame2 = @fsockopen ($serverGip,$serverGPort, $errno, $errstr, 1);
if ( $fgame2 )
$gstat2 = "<font color=#00FF00>ONLINE</font>";
else
$gstat2 = "<font color=#FF0000>OFFLINE</font>";
mysql_connect($databaseHost,$databaseLogin,$databasePassword) or die (mysql_error());
mysql_select_db($databaseName) or die(mysql_error());
//online kari
$query = ("SELECT * FROM characters WHERE online=1 and accesslevel=0");
$result = mysql_query($query) or die(mysql_error());
$num2=mysql_numrows($result);
$sum=$sum+$num2;
//Alliance
$query = ("SELECT * FROM clan_data WHERE ally_name!=\"\"");
$result = mysql_query($query) or die(mysql_error());
$alliance2=mysql_numrows($result);
//all characters
$query = ("SELECT * FROM characters WHERE accesslevel>=0");
$result = mysql_query($query) or die(mysql_error());
$char2=mysql_numrows($result);
//all GM characters
$query = ("SELECT * FROM characters Where accesslevel > 99");
$result = mysql_query($query) or die(mysql_error());
$gmchar2=mysql_numrows($result);
//all accounts
$query = ("SELECT * FROM accounts WHERE access_level>=0");
$result = mysql_query($query) or die(mysql_error());
$accounts2=mysql_numrows($result);
//Clan
$get_config_data="SELECT clan_id FROM clan_data";
$query = ("SELECT clan_id FROM clan_data WHERE clan_id>0");
$result = mysql_query($query) or die(mysql_error());
$clan2=mysql_numrows($result);
mysql_close();
mysql_connect($databaseHost,$databaseLogin,$databasePassword) or die(mysql_error());
mysql_select_db($databaseName) or die(mysql_error());
?>
<html>
<head>
<title>MEDNet Lineage II - Kamael Szerver</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
</head>
<body>
<font color=#000000><span class="style3">Login:</span></font> <?php print ("$lstat"); ?><br>
<font color=#000000><span class="style3">Game:</span></font> <?php print ("$gstat2"); ?><br>
<font color=#000000><span class="style3">Online Players:</span></font> <font color=#ff0000><?php print ("$num2"); ?></font><br>
<font color=#000000><span class="style3">All Account:</span></font> <font color=#ff0000><?php print ("$accounts2"); ?></font><br>
<font color=#000000><span class="style3">All Characters:</span></font> <font color=#ff0000><?php print ("$char2"); ?></font><br>
<font color=#000000><span class="style3">All GM Characters:</span></font> <font color=#ff0000><?php print ("$gmchar2"); ?></font><br>
<font color=#000000><span class="style3">All Clan:</span></font> <font color=#ff0000><?php print ("$clan2"); ?></font><br>
<font color=#000000><span class="style3">All Alliance:</span></font> <font color=#ff0000><?php print ("$alliance2"); ?></font><br>
</html>
Ir jeigu galite istaisykite klaida, nes man ten meta sita (Prisegiau)
Redagavo dove457· 2008 Lie. 31 10:07:56
Parašė MAnjack· 2008 Lie. 31 10:07:02
#2
Vistiek neveiks nes sql lentelių būsi nesukūręs ir neturėsi kai sukurt.
Parašė dove457· 2008 Lie. 31 10:07:24
#3
Kdl neveiks ? Juk weba laikysiu kompe, servas kompe... Tai kdl gali neveikti ? Juk lenetes sukurtos... Padaryk panele plz... :(