-
Top Online Player
Hi guys,
i decided to make this small script, that show how many hours the player have spend on your server. It work with ODBC/Mssql, then no problem with your integration (MuWeb Module). This script show 25 player.
http://img505.imageshack.us/img505/9366/onlineuo8.jpg
Thnx to Grissha for the screen
PHP Code:
<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
/**
* @DjSoulz
* @copyright 2008
*/
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>
You must put it in Modules/Most Online.php
Credit : Me (TheKamikaze/DjSoulz)
-
Re: [REALEASE]Top Online Player
Great work,I am impressed.I guess I will use this.
PS : I suck at PHP :(
But I am working on it :winky:
-
Re: [REALEASE]Top Online Player
Thank's Gob Jog
plx screen!
-
Re: [REALEASE]Top Online Player
-
Re: [REALEASE]Top Online Player
ok thank's sorry i am noob^^^^
-
Re: [REALEASE]Top Online Player
1) not bad... rather simple tho ;)
2) Remove demo link against the rules :P
-
Re: [REALEASE]Top Online Player
-
Re: [REALEASE]Top Online Player
That' s a great Release dude.
How to write "hours" after the number of hours?
Sorry, dont know anything about PHP.
-
Re: [REALEASE]Top Online Player
-
Re: [REALEASE]Top Online Player
madness, kamikaze u rule :) 10/10
great scipt, just show that some players on my server is ~ 800 hours online :rofl:
http://img228.imageshack.us/img228/1599/20648394za7.jpg
-
Re: [REALEASE]Top Online Player
find <?=$online_time[6];?> and change it for :
<?=$online_time[6];?> Hours
-
Re: [REALEASE]Top Online Player
-
Re: [REALEASE]Top Online Player
-
Re: [REALEASE]Top Online Player
u can use this and for event :D exemple wtho player is number one to play this server at the 1.1.2009 won a gm or items :P
-
Re: [REALEASE]Top Online Player
thx...
this is go to my server page..^^
-
Re: [REALEASE]Top Online Player
If someone have an idea for a script, just say it :)
-
Re: [REALEASE]Top Online Player
can you release webpage too?
thx for the script, very usefull
-
Re: [REALEASE]Top Online Player
-
Re: [REALEASE]Top Online Player
yes, the muweb with this new template
-
Re: [REALEASE]Top Online Player
Quote:
Originally Posted by
darknightt
Thank's Gob Jog
plx screen!
God job???
i dont now...
God play MuOnline???
:sleepy:
-
Re: [REALEASE]Top Online Player
-
Re: [REALEASE]Top Online Player
-
Re: [REALEASE]Top Online Player
You should contact Master, he will definately input in into muweb 0.9 i guess.
This line ISNT in the Most Online.php > <?=$online_time[6];?>
-
Re: [REALEASE]Top Online Player
-
Re: [REALEASE]Top Online Player
This webpage template is released?
-
Re: [REALEASE]Top Online Player
-
Re: [REALEASE]Top Online Player
Quote:
Originally Posted by
grishaaa
Plis Bro Up Your Web site Template.
Pliss.
Send-me this PM.^^
-
Re: [REALEASE]Top Online Player
It' s a little bit like FrienzMu template.
-
Re: [REALEASE]Top Online Player
Thanks for release,
Quote:
Originally Posted by
GRECO
This webpage template is released?
I hope so =P
-
Re: [REALEASE]Top Online Player
Great! Thanks for the script!
-
Re: [REALEASE]Top Online Player
-
Re: [REALEASE]Top Online Player
I post this template for muweb 8 but erased the post ...
-
Re: [REALEASE]Top Online Player
-
Re: [REALEASE]Top Online Player
Nice script, with few editing should be just fine for me.
Quote:
Originally Posted by
Derek23
I post this template for muweb 8 but erased the post ...
Could you share it [again?]
-
Re: [REALEASE]Top Online Player
Quote:
Originally Posted by
RayOfLight
Nice script, with few editing should be just fine for me.
what don't work with you ?
-
Re: [REALEASE]Top Online Player
Why dont u share the template again...:(
-
Re: [REALEASE]Top Online Player
-
Re: [REALEASE]Top Online Player
-
Re: [REALEASE]Top Online Player
-
Re: [REALEASE]Top Online Player
how's web is that?? please post the web!
-
Re: [REALEASE]Top Online Player
-
Re: [REALEASE]Top Online Player
Please stop spamming the topic
-
Re: [REALEASE]Top Online Player
i can't see any link to download this script, i don't know to get the script into the module
Plz post your link
srr 4 my bad english
-
Re: [REALEASE]Top Online Player
-
Re: [REALEASE]Top Online Player
Quote:
Originally Posted by
TheKamikaze
what don't work with you ?
It works but I'm not happy with the way it is :P I'll add the word Hours and use images instead of On/off text. :P
-
Re: [REALEASE]Top Online Player
The 5 char are on an account? 5/10 !
-
Re: [REALEASE]Top Online Player
-
Re: [REALEASE]Top Online Player
-
Re: [REALEASE]Top Online Player
Quote:
Originally Posted by
TheKamikaze
find <?=$online_time[6];?> and change it for :
<?=$online_time[6];?> Hours
I got a question how do we reset everyone online time so everyone has a fresh start?
-
Re: [Release] Top Online Player
lol .. ~800 hours .. Aren't they crazy or smthin' .. I never play more than 2-3 hours a day ^^
Nice work any way :} 10/10
-
Re: [Release] Top Online Player
Can anyone tell me how i would set MEMB_STAT.OnlineHours to reset everyones online time to "0" kinda like this or something?
"SET
MEMB_STAT.OnlineHours = "0"
"
Something like this could anyone tell me the correct "SQL Query" to reset the online hours count?
Any help for a novice query script user would be much appreciated =)
-
Re: [Release] Top Online Player
I figured it out use :
Quote:
UPDATE MEMB_STAT
SET MEMB_STAT.OnlineHours='0'
from
MEMB_STAT
WHERE MEMB_STAT.OnlineHours>'1'
-
Re: [Release] Top Online Player
its like xfire :D counting hours of played game :P
-
Re: [Release] Top Online Player
-
Re: [Release] Top Online Player
can it be made to be used on any web?
-
Re: [Release] Top Online Player