[Release] Top Online Players

z0r7ex

New Member
Joined
Mar 7, 2009
Messages
215
Reaction score
108
Make a document in modules called "mostonline.php" And Place The Codes Bellow
PHP:
<div align="center">
  <div align="center">
    <table width="50%" border="0" cellspacing="1" cellpadding="1">
      <tr>
        <td class="normal_text_white">Players</td>
        <td class="normal_text_white">Online Time</td>
        <td class="normal_text_white">Status</td>
      </tr>
  <?php

/**
 * @zortex
 * @copyright 2009
 */
 
if( !isset($_GET['op']))
{
    require('../includes/denied.php');
    denied('Time');
}
require('config.php');

//We get the user
$online = $db->Execute('SELECT DISTINCT 
TOP 25
AccountCharacter.ID, 
AccountCharacter.GameIDC, 
MEMB_STAT.ServerName, 
MEMB_STAT.IP, 
MEMB_STAT.ConnectTM, 
MEMB_STAT.DisConnectTM,
MEMB_STAT.OnlineHours
from 
MEMB_STAT 
join 
AccountCharacter 
on 
Memb_stat.memb___id = AccountCharacter.ID
ORDER BY 
MEMB_STAT.OnlineHours DESC');
while($online_time = $online->fetchrow())
{
//Maybe the statut too
$statut = $db->Execute("Select ConnectStat FROM MEMB_STAT WHERE memb___id='".$online_time[0]."'");
$statut_ok = $statut->fetchrow();
if($statut_ok[0] == 1){$online_stat = '<span style="color:green"><b>Online</b></span>';}
elseif($statut_ok[0] == 0){$online_stat = '<span style="color:red"><b>Offline</b></span>';}
?>
      <tr>
        <td class="normal_text_white"><a href="index.php?op=character&character=<?=$online_time[1];?>"><?=$online_time[1];?></a></td>
        <td class="normal_text_white"><?=$online_time[6];?></td>
        <td class="normal_text_white"><?=$online_stat?></td>
      </tr>
  <?
}
?>
      </table>
</div>
 
Last edited:
Make a Module --->"Most Online.php"

| NAME | Time Online |
zortex 12:43 Hours

It Looks Like That Depends On Where u want it to turn up ;]
 
  • Like
Reactions: 1 person
ui.jpg
Мноо ме кефи даваи все така z0r7ex
 
  • Like
Reactions: 1 person
The Original IS Not Mine But I Edited It ;] IF You Guys Want I Make It Into BG
 
Last edited:
  • Like
Reactions: 1 person
Нещо ми дава грешка
Fatal error: Call to a member function fetchrow() on a non-object in X:\XXXXX\XXX\modules\mostonline.php on line 37
 
  • Like
Reactions: 1 person
Нещо ми дава грешка
Fatal error: Call to a member function fetchrow() on a non-object in X:\XXXXX\XXX\modules\mostonline.php on line 37
web/modules/newfile mostonline.php/phpcode/

did u do that properly?
 
Last edited:
  • Like
Reactions: 1 person
Fatal error: Call to a member function fetchrow() on a non-object in D:\xampp\htdocs\modules\mostonline.php on line 41
Players Online Time Status
 
  • Like
Reactions: 1 person
it works perfectly fine did you do exactly wat i wrote above ?!?!
 
  • Like
Reactions: 1 person
Кво прави това: "distinct" ако мога да попитам ?
 
  • Like
Reactions: 1 person
Брат Несе Зразни нема Смесъл имам Предвит Лиско
 
  • Like
Reactions: 1 person