Jump to content

Recommended Posts

Posted

Hello guys so i have this code in my website

 

function connect() 
{ 
include "configs/script_config.php";
}

$sexes = array('Male', 'Famale'); 
$online = array('0' => "<font color=#FF0000><b>OFFLINE</b></font>", '1' => "<font color=#035922><b>ONLINE</b></font>");
$klan = array('0' => "No Clan"); 

$FORM = "" ; 
$query_chars = "select char_name,level,sex,clanid,onlinetime,lastAccess from characters where onlinetime >= 1 order by onlinetime desc limit 50;"; 
connect(); 
$link = mysql_query($query_chars); 
$i=1; 
$r=255; 
while ( $row=mysql_fetch_row($link) )
{  
    $timer=$row[4];
    $day = bcdiv($row[4],86400);
    $datetime  = gmstrftime("$day day(s) %H hour(s) %M min(s)", $timer);
    $timer2=$row[5]/1000;
    $datetime2  = gmstrftime("%d.%m.%Y", $timer2);
    $datetime3  = gmstrftime("%H:%M:%S GMT", $timer2);
    $query = "select clan_name from clan_data where clan_id=$row[3]"; 
    $link2 = mysql_query($query); 
    $clan = mysql_fetch_row($link2);  

    $FORM .= "<table border='3'> <tr>    
    <td align=center><font color=#808080><b>  $i.</b></span></td> 
    <td align=center><font color=#AE5C08>  $row[0]</td>
    <td class='Stil5' align=center>$row[1]</td>  
    <td class='Stil5' align=center>".$sexes[$row[2]]."</td>  
    <td align=center><font color=#21ff22>[".$clan[0]."]</td> 
    <td align=center><font color=#21ff22>$datetime</td>
    </tr></table>"; 
    $i++; 
    $r -= 0; 
}  

mysql_close(); 

echo $FORM; 

 

The code is ok but i want to see the list in Columns like: Name/Class/Clan/OnlineTime and to be fixed because if someone has a bigger name the table is bigger... any ideas?

Guest
This topic is now closed to further replies.


  • Posts

    • Dear players, We remind you, that on April 11 at 18:00 server time (GMT +2), the open beta test of our upcoming Chronicle 2 update will begin! To participate in open beta testing, download the client from one of the links below. Download links: Download client | Download updater
    • MoMoProxy Offers $850 for 1TB Plan. anyone interested in can view details as follow: https://momoproxy.com/residential-proxies
    • Yes there are many problems. Im trying to fix there slowly, cause i i put already a lot of work in this files. I think it will not be easy to move the project to other builds
    • You probably wanted to write l2jmobius. I would recommend that you change the build because it has a lot of problems with the movement of npcs and players. Even if you find bots you will have to correct the movement or the bots will get stuck, fly, teleport
    • Complete Server Pack + Source Files: C4 Scions Of Destiny: P656 Retail X1 L2OFF Server Pack + Source: Price: 100EUR --------------------------------------------------------------------------------------------------------------------------------------------- C4 Scions Of Destiny: P656 ESL2 Athena x45 L2OFF Server Pack + Source: Price: 150EUR -------------------------------------------------------------------------------------------------------------------------------------------- C6 Interlude: P756 ESL2 Athena x45 L2OFF Server Pack + Source: Price: 150EUR The same as C4 but in C6 Client  ----------------------------------------------------------------------------------------------------------------------------------------------   C6 Interlude: P746 L2Gold L2OFF Server Pack + Source: Price: 150EUR   https://imgur.com/a/pts-l2gold-interlude-p746-9kB3oA9#MbP2aJh -------------------------------------------------------------------------------------------------------------------------------------------------   C6 - Classic Interlude: P110 ESL2 Athena x45 L2OFF Server Pack + Source: Price: 350EUR   https://imgur.com/a/pts-l2off-p110-classic-interlude-athena-x45-Z2kZxuv#YlZU9hF -------------------------------------------------------------------------------------------------------------------------------------------------   DISCORD - MMOPROMOOO TELEGRAM - MMOPROMO 
  • Topics

×
×
  • Create New...