[Tool]PHP/HTML Top 100 list small error
Posted: Sat Jul 27, 2013 1:22 pm
File Name = script_config.php
File Name = top_100_list.php
Effect

When there are vendors saved on the server as offline, release this error

you know how to remove this error when there are characters that gives offline
Code: Select all
<?php $db_user = "root"; $db_pass = "root"; $db_name = "l2jgs"; $db_serv = "localhost"; $res = mysql_connect ( $db_serv, $db_user, $db_pass ) or die ("Coudn't connect to [$db_serv]"); $resdb = mysql_select_db ( "$db_name",$res ); return $res; ?>
Code: Select all
<html><BODY BACKGROUND="bg.gif" BGCOLOR="#000000" TEXT="#FFFFFF"> <center><br><br><font size="+2"><b>Top 100</b></font><br><br><br><br><?php function connect() { include "configs/script_config.php";} $sexes = array('M', 'F'); $online = array('0' => "<font color=#FF0000>Offline</font>", '1' => "<font color=#00FF00>Online</font>"); $FORM = "<table border='1'> <tr> <th class='Stil5' align=center>Pos.</th> <th class='Stil5' align=center>Char.Name</th> <th class='Stil5' align=center>Level</th> <th class='Stil5' align=center>Sex</th> <th class='Stil5' align=center>Clan</th> <th class='Stil5' align=center>Last Online</th><th class='Stil5' align=center>Status</th></tr>"; $query_chars = "select char_name,level,sex,clanid,lastAccess,online from characters WHERE accesslevel=0 order by exp desc limit 100;"; connect(); $link = mysql_query($query_chars); $i=1; $r=255; while ( $row=mysql_fetch_row($link) ) { $timer2=$row[4]/1000; $datetime2 = gmstrftime("%d.%m.%Y | %H:%M:%S", $timer2); $query = "select clan_name from clan_data where clan_id=$row[3]"; $link2 = mysql_query($query); $clan = mysql_fetch_row($link2); $FORM .= "<tr> <td class='Stil5' align=center>$i</span></td> <td class='Stil5' align=center>$row[0]</td> <td class='Stil5' align=center>$row[1]</td> <td class='Stil5' align=center>".$sexes[$row[2]]."</td> <td class='Stil5' align=center>[".$clan[0]."]</td> <td class='Stil5' align=center>$datetime2</td> <td class='Stil5' align=center>".$online[$row[5]]."</td> </tr>"; $i++; $r -= 0; } mysql_close(); echo $FORM; ?></center></body></html>

When there are vendors saved on the server as offline, release this error

you know how to remove this error when there are characters that gives offline