- Joined
- Jul 16, 2012
- Messages
- 1,426
- Reaction score
- 142
does somoene have this kind of php code? at the right side...status online top player blabla...
i cant find it here..
thanks
okie wait . ill create a php version of this later or by night...
sorry im too busy i forgot to visit ragezone,
here is sample and you do the rest
u should do effort to complete this.. this is easy as heaven
mssql_connect($dname,$username,$password) or die ("cannot connect to database");
mssql_select_db($database) or die ("cannot connect to selected db");
mssql_connect($d[COLOR="#FF0000"]b[/COLOR]name,$username,$password) or die ("cannot connect to database");
mssql_select_db($database) or die ("cannot connect to selected db");
<?php
include ("config.php");
$class = array(
"1"=>'Brawler Male',
"2"=>'Swordsman Male',
"4"=>'Archer Female',
"8"=>'Shaman Female',
"16"=>'Gunner Male',
"32"=>'Gunner Female',
"64"=>'Brawler Female',
"128"=>'Swordsman Female',
"256"=>'Archer Male',
"512"=>'Shaman Male',
);
$sql= mssql_query("SELECT TOP 5 ChaName,ChaLevel,ChaClass,ChaSchool,ChaReborn FROM ChaInfo ORDER BY ChaReborn DESC");
$sql2 = mssql_query("SELECT COUNT(*) FROM $database2.dbo.UserInfo WHERE UserLoginState = '1'");
while($rows=mssql_fetch_array($sql2)) {$Webuser = $rows[0]; }
$sql3=mssql_query("SELECT COUNT (*) FROM ChaInfo WHERE ChaDeleted!=1");
while($r=mssql_fetch_array($sql3)){$chacount = $r[0];}
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css" media="screen"/>
</head>
<body>
<center>
<p class="this">Server Status: ONLINE</p>
<p>User Online: <? echo $Webuser;?><br>Character Count:<br>Registered User: 254<br>Top Reborners</p>
<table>
[COLOR="#FF0000"]<th>
<tr>[/COLOR] <-- Remove this tags to correct blue border on NAME table.
<td style="width:120px;background-color:#343338">Name</td>
<td style="width:50px;background-color:#343338">Level</td>
<td style="width:100px;background-color:#343338">Class</td>
<td style="width:70px;background-color:#343338">School</td>
<td style="width:50px;background-color:#343338">Reborn</td>
</tr>
<?
while($getdata = mssql_fetch_array($sql)){
$asd = $getdata['2'];
echo "<tr>
<td style='width:120px;background-color:#878787'>{$getdata['0']}</td>
<td style='width:50px;background-color:#878787'>{$getdata['1']}</td>
<td style='width:100px;background-color:#878787'>{$class[$asd]}</td>
<td style='width:70px;background-color:#878787'>{$getdata['3']}</td>
<td style='width:50px;background-color:#878787'>{$getdata['4']}</td>
</tr>";
}
?>
</th>
<table>
<p> Guild War Ranking </p>
<table>
[COLOR="#FF0000"]<th>
<tr>[/COLOR] <-- Remove this tags to correct blue border on NAME table.
<td style="width:200px;background-color:#343338">Name</td>
<td style="width:200px;background-color:#343338">School</td>
</tr>
<tr>
<td style="width:200px;background-color:#878787">ChaName</td>
<td style="width:200px;background-color:#878787">ChaLevel</td>
</tr>
</th>
<table>
</body>
</html>
create an array with pointer of school
then use the db result to as pointer then call the result
yeah i have also problem with gm char...because it also appear on the list...I added comment to php so you can understand how this works
sorry for poor explanation...
do this same to guild rank
//however i didnt put filter yet to this rank
like hide GM usertype
etc
while($getdata = mssql_fetch_array($sql)){
$asd = $getdata['2'];
$asdf = $getdata['3'];
echo "<tr>
<td style='width:120px;background-color:#878787'>{$getdata['0']}</td>
<td style='width:50px;background-color:#878787'>{$getdata['1']}</td>
<td style='width:100px;background-color:#878787'>{$class[$asd]}</td>
<td style='width:70px;background-color:#878787'>{$school['$asdf']}</td>
<td style='width:50px;background-color:#878787'>{$getdata['4']}</td>
ouch cant help you anymore... i am very busy,,,. follow the code, i put comment...