Initiate Mage
- Joined
- Feb 21, 2007
- Messages
- 4
- Reaction score
- 0
So noone help me geting the script finally i get it and i realize that no one fix the top30 with the name of the guilds clans or whatever so i fix that while i was prepearin my page it was a simple sql modification.... i use the db data from the l2cp config file
PHP:
<?
mssql_connect($CONFIG['dbaddress'],$CONFIG['dbuser'],$CONFIG['dbpass']);
mssql_select_db($CONFIG['dbdbname']);
$result=mssql_query("
select
char_name, Lev, builder,
class, use_time,
PK, Duel,gender, name
from user_data , Pledge
where char_name not in (".("'".join("','",$exclude_from_top)."'").")
and account_id>0
and user_data.pledge_id =
Pledge.pledge_id
order by Exp desc");
$online_users=array();
for($x=0;($online_users[$x]=mssql_fetch_assoc($result))&&$x<30;$x++){
$online_users[$x]['use_time_h']=round($online_users[$x]['use_time']/3600,1)."h";
};
unset($online_users[count($online_users)-1]);
?>
<table border="1" >
<tr>
<td width="50" align="center">##</td>
<td width="70" align="center">Nick</td>
<td width="50" align="center">Lvl</td>
<td width="100" align="center">Class</td>
<td width="50" align="center">Total in game</td>
<td width="50" align="center">PvP</td>
<td width="50" align="center">PK</td>
<td width="50" align="center">Clan</td>
</tr>
<? for($x=0;$x<count($online_users);$x++){ ?>
<tr>
<td align="center"><?=$x+1?></td>
<td align="center" style="color:<?=$online_users[$x]["gender"]?"#FF8080":"#8080FF"?>"><?=$online_users[$x]["char_name"]?></td>
<td align="center"><?=$online_users[$x]["Lev"]?></td>
<td align="center"><?=$class_list[$online_users[$x]["class"]]?></td>
<td align="center"><?=$online_users[$x]["use_time_h"]?></td>
<td align="center"><?=$online_users[$x]["Duel"]?></td>
<td align="center"><?=$online_users[$x]["PK"]?></td>
<td align="center"><?=$online_users[$x]["name"]?></td>
</tr>
<? } ?>
</table>