• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[GESIOR ACC] Who Is Online {Flags+Vip Status+Days left}

Rappine

Empire will back
Joined
Feb 6, 2009
Messages
106
Reaction score
0
Location
Brazil
Hello,

Credits to NORIX

Screenshot:


Code:
   <?PHP 
$order = $_REQUEST['order']; 
$vipPlayers = 0; 
if($order == 'level') 
    $orderby = 'level'; 
elseif($order == 'vocation') 
    $orderby = 'vocation'; 
if(empty($orderby)) 
    $orderby = 'name'; 
$players_online_data = $SQL->query('SELECT `players`.`name`, `players`.`level`, `players`.`promotion`, `players`.`vocation`, `accounts`.`flag`, `accounts`.`premdays` FROM `accounts`,`players` WHERE `accounts`.`id`=`players`.`account_id` AND `players`.`online`=1 ORDER BY '.$orderby.''); 
$number_of_players_online = 0; 
foreach($players_online_data as $player) { 
    $number_of_players_online++; 
    if(is_int($number_of_players_online / 2)) 
        $bgcolor = $config['site']['darkborder']; 
    else 
        $bgcolor = $config['site']['lightborder']; 

}
if($player['premdays'] > '0') {
    $vip = '<font color="green">[ Vip Account ]</font> - '.$player['premdays'].' days left';
}
else {
    $vip = '';
}
    $players_rows .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH=5%><center><image src="flags/'.$player['flag'].'.gif"></center></TD><TD WIDTH=70%><A HREF="index.php?subtopic=characters&name='.$player['name'].'">'.$player['name'].'</A> '.$vip.'</TD><TD WIDTH=10%>'.$player['level'].'</TD><TD WIDTH=20%>'.$vocation_name[$player['promotion']][$player['vocation']].'</TD></TR>'; 
	
if($number_of_players_online == 0) 
    //server status - server empty 
    $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><B>Server Status</B></TD></TR><TR BGCOLOR='.$config['site']['darkborder'].'><TD><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=1><TR><TD>Currently no one is playing on '.$config['server']['serverName'].'.</TD></TR></TABLE></TD></TR></TABLE><BR>'; 
else 
{ 
    //server status - someone is online 
    $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><B>Server Status</B></TD></TR><TR BGCOLOR='.$config['site']['darkborder'].'><TD><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=1><TR><TD>Currently '.$number_of_players_online.' players are online.</TD></TR></TABLE></TD></TR></TABLE><BR>'; 
    //list of players 
    $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD><center><A HREF="index.php?subtopic=whoisonline&order=name" CLASS=white>#</A></center></TD><TD><A HREF="index.php?subtopic=whoisonline&order=name" CLASS=white>Name</A></TD><TD><A HREF="index.php?subtopic=whoisonline&order=level" CLASS=white>Level</A></TD><TD><A HREF="index.php?subtopic=whoisonline&order=vocation" CLASS=white>Vocation</TD></TR>'.$players_rows.'</TABLE>'; 
    //search bar 
    $main_content .= '<BR><FORM ACTION="index.php?subtopic=characters" METHOD=post>  <TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Search Character</B></TD></TR><TR><TD BGCOLOR="'.$config['site']['darkborder'].'"><TABLE BORDER=0 CELLPADDING=1><TR><TD>Name:</TD><TD><INPUT NAME="name" VALUE=""SIZE=29 MAXLENGTH=29></TD><TD><INPUT TYPE=image NAME="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></TABLE></TD></TR></TABLE></FORM>'; 
} 
?>

I only tested it with the latest tfs version {atm 0.3.4, pl2}
But I think it will work with 0.3+

Credits/Rep All to Norix
 
Last edited by a moderator:
I will, please wait ;D

Srry for double post, but I cant edit :S
 
Last edited by a moderator:
with what system dos this vip system work?
cuas i dont see the storage id so could u give info about the vip system to and about the flags?

where do i get the flags? ;p
 
This Status shows only the pacc days that are left. So if you use Premium as Vip System this Script is useful. If not tell me which Vip System you use and i can make it for that Script ;)
 
But in order that there goes out for you the flag that you need and where you must put it?
Thx
 
Tell me which Vip System it is. I have to know how the System sees how much days you have left..
 
Its my private own vip system ;P
Its coded by me ;z
Its by points,
Gm give points to player -> player buy vip days with the points
can I have you MSN for more details?
thanks!
 
To author of this script.
1. Use { } in PHP code,
2. use " " in HTML code - border=1px is not good (example by parser and by ME),

PHP:
if($player['premdays'] > '0') {
    $vip = '<font color="green">[ Vip Account ]</font> - '.$player['premdays'].' days left';
}
else {
    $vip = '';
}
:((

PHP:
$vip = '';
if($player['premdays'] > '0') {
    $vip = '<font color="green">[ Vip Account ]</font> - '.$player['premdays'].' days left';
}

Please be more cleaned and recycled :D.
Ehhh... Here with coloring: NoPASTE
 
Hello,

Credits to NORIX

Screenshot:


Code:
   <?PHP 
$order = $_REQUEST['order']; 
$vipPlayers = 0; 
if($order == 'level') 
    $orderby = 'level'; 
elseif($order == 'vocation') 
    $orderby = 'vocation'; 
if(empty($orderby)) 
    $orderby = 'name'; 
$players_online_data = $SQL->query('SELECT `players`.`name`, `players`.`level`, `players`.`promotion`, `players`.`vocation`, `accounts`.`flag`, `accounts`.`premdays` FROM `accounts`,`players` WHERE `accounts`.`id`=`players`.`account_id` AND `players`.`online`=1 ORDER BY '.$orderby.''); 
$number_of_players_online = 0; 
foreach($players_online_data as $player) { 
    $number_of_players_online++; 
    if(is_int($number_of_players_online / 2)) 
        $bgcolor = $config['site']['darkborder']; 
    else 
        $bgcolor = $config['site']['lightborder']; 

}
if($player['premdays'] > '0') {
    $vip = '<font color="green">[ Vip Account ]</font> - '.$player['premdays'].' days left';
}
else {
    $vip = '';
}
    $players_rows .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH=5%><center><image src="flags/'.$player['flag'].'.gif"></center></TD><TD WIDTH=70%><A HREF="index.php?subtopic=characters&name='.$player['name'].'">'.$player['name'].'</A> '.$vip.'</TD><TD WIDTH=10%>'.$player['level'].'</TD><TD WIDTH=20%>'.$vocation_name[$player['promotion']][$player['vocation']].'</TD></TR>'; 
	
if($number_of_players_online == 0) 
    //server status - server empty 
    $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><B>Server Status</B></TD></TR><TR BGCOLOR='.$config['site']['darkborder'].'><TD><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=1><TR><TD>Currently no one is playing on '.$config['server']['serverName'].'.</TD></TR></TABLE></TD></TR></TABLE><BR>'; 
else 
{ 
    //server status - someone is online 
    $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><B>Server Status</B></TD></TR><TR BGCOLOR='.$config['site']['darkborder'].'><TD><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=1><TR><TD>Currently '.$number_of_players_online.' players are online.</TD></TR></TABLE></TD></TR></TABLE><BR>'; 
    //list of players 
    $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD><center><A HREF="index.php?subtopic=whoisonline&order=name" CLASS=white>#</A></center></TD><TD><A HREF="index.php?subtopic=whoisonline&order=name" CLASS=white>Name</A></TD><TD><A HREF="index.php?subtopic=whoisonline&order=level" CLASS=white>Level</A></TD><TD><A HREF="index.php?subtopic=whoisonline&order=vocation" CLASS=white>Vocation</TD></TR>'.$players_rows.'</TABLE>'; 
    //search bar 
    $main_content .= '<BR><FORM ACTION="index.php?subtopic=characters" METHOD=post>  <TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Search Character</B></TD></TR><TR><TD BGCOLOR="'.$config['site']['darkborder'].'"><TABLE BORDER=0 CELLPADDING=1><TR><TD>Name:</TD><TD><INPUT NAME="name" VALUE=""SIZE=29 MAXLENGTH=29></TD><TD><INPUT TYPE=image NAME="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></TABLE></TD></TR></TABLE></FORM>'; 
} 
?>

I only tested it with the latest tfs version {atm 0.3.4, pl2}
But I think it will work with 0.3+

Credits/Rep All to Norix

Where should you put this PHP Code?
 
Hua it wont work... because the player doesnt have the sql query, the flag system and the selector of flags.. ;D too much copy and paste :)
 
Man, hope you didn't just steal this right off Artii. <_<

Red
 
Back
Top