Gabriel Tibiano
New Member
- Joined
- Nov 21, 2009
- Messages
- 420
- Reaction score
- 4
Hi..
can someone fix that for me?
that's not appears PLAYER_ONLINE tag at the top right of the site.
Whoisonline.php
Layout.php
REPP++
can someone fix that for me?
that's not appears PLAYER_ONLINE tag at the top right of the site.
Whoisonline.php
PHP:
<?PHP
if ($_REQUEST['world'] == ''){
$worldtype = $config['server']['worldType'];
if ($worldtype == 'pvp')
$world .= 'PvP';
if ($worldtype == 'non-pvp')
$world .= 'Non-PvP';
if ($worldtype == 'pvp-enforced')
$world .= 'PvP-Enforced';
$main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD CLASS=white><B>World</B></TD><TD ALIGN=center CLASS=white><B>Players Online</B></TD><TD ALIGN=center CLASS=white><B>Additional Information</B></TD></TR>';
foreach($config['site']['worlds'] as $id => $world_n)
{
if(is_int($worlds / 2))
$bgcolor = $config['site']['darkborder'];
else
$bgcolor = $config['site']['lightborder'];
$worlds++;
$main_content .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH=140><a href="?subtopic=whoisonline&world='.$id.'">'.$world_n.'</a></TD><TD WIDTH=140 ALIGN=center>'.$config['status']['serverStatus_players'].'</TD><TD ALIGN=center>'.$world.'</TD></TR>';
}
$main_content .= '</table>';
}
else {
if($id == (int) $_GET['world'])
{
$world_id = $id;
$world_name = $world_n;
}
if(!isset($world_id))
{
$world_id = 0;
$world_name = $config['server']['serverName'];
}
$order = $_REQUEST['order'];
if($order == 'level')
$orderby = 'level';
elseif($order == 'vocation')
$orderby = 'vocation';
if(empty($orderby))
$orderby = 'name';
$players_online_data = $SQL->query('SELECT * FROM players WHERE world_id = '.(int) $world_id.' AND 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'];
$players_rows .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH=70%><A HREF="?subtopic=characters&name='.urlencode($player['name']).'">'.$player['name'].'</A></TD><TD WIDTH=10%>'.$player['level'].'</TD><TD WIDTH=20%>'.$vocation_name[$world_id][$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 <b>'.$config['site']['worlds'][$_REQUEST['world']].'</b>.</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 on <b>'.$config['site']['worlds'][$_REQUEST['world']].'</b>.</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><A HREF="?subtopic=whoisonline&world='.$_REQUEST['world'].'&order=name" CLASS=white>Name</A></TD><TD><A HREF="?subtopic=whoisonline&world='.$_REQUEST['world'].'&order=level" CLASS=white>Level</A></TD><TD><A HREF="?subtopic=whoisonline&world='.$_REQUEST['world'].'&order=vocation" CLASS=white>Vocation</TD></TR>'.$players_rows.'</TABLE>';
//search bar
$main_content .= '<BR><FORM ACTION="?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>';
}
}
?>
Layout.php
Code:
<a href='index.php?subtopic=whoisonline'>
<div id='submenu_whoisonline' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
<div class='LeftChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
<div id='ActiveSubmenuItemIcon_whoisonline' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div>
<div class='SubmenuitemLabel'>Who Is Online?</div>
<div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
</div>
</a>
--------------------- Second Piece
<div id="ThemeboxesColumn">
<div id="RightArtwork">
<img id="Monster" src="monsters/<?PHP echo logo_monster() ?>.gif" onClick="window.location = 'index.php?subtopic=creatures&creature=<?PHP echo logo_monster() ?>';" alt="Monster of the Week" />
<img id="PedestalAndOnline" src="<?PHP echo $layout_name; ?>/images/header/pedestal-and-online.gif" alt="Monster Pedestal and Players Online Box"/>
<div id="PlayersOnline" onClick="window.location = 'index.php?subtopic=whoisonline'">
<?PHP
if($config['status']['serverStatus_online'] == 1)
echo $config['status']['serverStatus_players'].'<br />Players Online';
else
echo '<font color="red"><b>Server<br />OFFLINE</b></font>';
?></div>
</div>
<div id="Themeboxes">
REPP++
Last edited: