• 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!

AAC Gesior whoisonline limits.

patrik161

Active Member
Joined
Sep 6, 2015
Messages
91
Solutions
1
Reaction score
26
Hello,

I'm looking for a script that shows players only above X level. Why? Because it protects the low levels against power abusers / people who quit and just searching for easy targets via online - list. I'm using Gesior Accmaker.

Below code of whoisonline.php file
PHP:
<?php
if(!defined('INITIALIZED'))
    exit;

$cache_sec = 1;
$info = array(
    0 => array($config['server']['location'], date("d/m/Y")),
    1 => array('EUA', date("d/m/Y"))
);

$id=0;
if(isset($_POST['world'])) {
    $f = null;
    foreach($config['site']['worlds'] as $k => $v)
        if($v == $_POST['world']) {
            $f = true;
            $id = $k;
            break;
        }
    if(!$f)
        $_POST['world'] = $config['site']['worlds'][0];
} else $_POST['world'] = $config['site']['worlds'][0];

$order = 'name_asc';
if(isset($_REQUEST['order']) && in_array($_REQUEST['order'], array('name_desc', 'level_asc','level_desc','vocation_asc','vocation_desc')))
    $order = $_REQUEST['order'];

if(count($config['site']['worlds']) > 1) {
    $main_content ='
<form action="?subtopic=whoisonline" method="post">
    <div class="TableContainer">
        <table class="Table1" cellpadding="0" cellspacing="0">
            <div class="CaptionContainer">
                <div class="CaptionInnerContainer">
                   <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
                   <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
                   <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span>
                   <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span>
                    <div class="Text">World Selection</div>
                   <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span>
                   <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span>
                   <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
                   <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
                </div>
            </div>
            <tr>
                <td>
                    <div class="InnerTableContainer">
                        <table width="100%">
                            <tr>
                                <td style="vertical-align:middle" class="LabelV150">World Name:</td>
                                <td style="width:170px">
                                    <select size="1" name="world" style="width:165px">';
foreach($config['site']['worlds'] as $v)
    $main_content .= '<option value="'.$v.'"'.($v == $_POST['world'] ? ' selected="selected"' : '').'>'.$v.'</option>';
$main_content .= '
                                    </select>
                                </td>
                                <td style="text-align:left">
                                   <div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)">
                                       <div onmouseover="MouseOverBigButton(this)" onmouseout="MouseOutBigButton(this)"><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif)"></div>
                                           <input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif"/>
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
            </tr>
        </table>
    </div>
</form><br/>
';
}
$main_content .=
'<div class="TableContainer">
    <table class="Table1" cellpadding="0" cellspacing="0">
        <div class="CaptionContainer">
            <div class="CaptionInnerContainer">
               <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
               <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
               <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span>
               <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span>
                <div class="Text">World Information</div>
               <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span>
               <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span>
               <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
               <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
            </div>
        </div>
        <tr>
            <td>
                <div class="InnerTableContainer">
                    <table width="100%">
                        <tr>
                            <td class="LabelV150"><b>Status:</b></td>
                            <td>O'.($config['status']['serverStatus_online'] == 1 ? 'n' : 'ff').'line</td>
                        </tr>
                        <tr>
                            <td class="LabelV150"><b>Players Online:</b></td>
                            <td>';
$f = 'cache/whoisonline-'.$_POST['world'].'-'.$order.'.tmp';
$ff = 'cache/whoisonline-'.$_POST['world'].'-record.tmp';
if(file_exists($f) && filemtime($f) > (time() - $cache_sec)) {
    $cp = file_get_contents($f);
    $cached = null;
    if(file_exists($f) && filemtime($f) > (time() - $cache_sec)) {
        $e = explode('|', file_get_contents($ff));
        $n = $e[0];
        $c = $e[1];
        $cached = true;
    }
}
else {
    $cp = '';
    $n = 0;
    $q = 'SELECT * FROM players WHERE world_id='.$id.' AND online=1';
    if(in_array($order, array('name_asc','name_desc','level_asc','level_desc')))
        $q .= ' ORDER BY '.str_replace('_', ' ', $order);

    if(in_array($order, array('vocation_asc','vocation_desc'))) {
        $a = array();
        foreach($SQL->query($q)->fetchAll() as $p)
            $a[] = array($p['name'], $p['level'], $vocation_name[$p['promotion']][$p['vocation']]);
        function cmp($a, $b) {
            $r = strcmp($a[2], $b[2]);
            $r = $GLOBALS['order'] == 'vocation_desc' ? ($r == 1 ? -1 : ($r == -1 ? 1 : 0)) : $r;
            return ($r == 0 && $a[1] < $b[1]) ? 1 : $r;
        }
        usort($a, 'cmp');
        foreach($a as $p) {
            $n++;
           $cp .= '<tr class="'.(is_int($n/2)?'Odd':'Even').'" style="text-align:right"><td style="width:70%;text-align:left"><a href="?subtopic=characters&name='.urlencode($p[0]).'">'.$p[0].'</a></td><td style="width:10%">'.$p[1].'</td><td style="width:20%">'.str_replace(' ','&#160;',$p[2]).'</td></tr>';
        }

    }
    else {
        $l = array();
      
        foreach($SQL->query($q)->fetchAll() as $p) {
            $n++;
            $cp .= '<tr class="'.(is_int($n/2)?'Odd':'Even').'" style="text-align:right">';
            $cp .= '<td style="width:70%;text-align:left">';
            if($order == 'name_asc') {
                $tmp = strtoupper($p['name'][0]);
                if(!in_array($tmp, $l)) {
                    $l[] = $tmp;
                    $cp .= '<a name="'.$tmp.'"></a>';
                }
            }
           $cp .= '<a href="?subtopic=characters&name='.urlencode($p['name']).'">'.$p['name'].'</a></td><td style="width: 10%">'.$p['level'].'</td><td style="width:20%">'.str_replace(' ','&#160;',$vocation_name[$p['promotion']][$p['vocation']]).'</td></tr>';
        }
      
    }
    file_put_contents($f, $cp);
}
if(!$cached) {
    $r=$SQL->query('SELECT MAX(record) as r,MAX(timestamp) as t FROM server_record WHERE world_id='.$id)->fetch();
    $c = $r['r'].' players (on '.date('M&#160;d&#160;Y,&#160;H:i:s&#160;T', $r['t']).')';
    file_put_contents($ff, $n.'|'.$c);
}
$main_content .= $n.' Players Online</td>
                        </tr>
                        <tr>
                            <td class="LabelV150"><b>Online Record:</b></td>
                            <td>'.$c.'</td>
                        </tr>
                        <tr>
                            <td class="LabelV150"><b>Creation Date:</b></td>
                            <td>'.$info[$id][1].'</td>
                        </tr>
                        <tr>
                            <td class="LabelV150"><b>Location:</b></td>
                            <td>'.$info[$id][0].'</td>
                        </tr>
                        <tr>
                            <td class="LabelV150"><b>PvP Type:</b></td>
                            <td>';
$w=strtolower($config['server']['worldType']);
if(in_array($w, array('pvp','2','normal','open','openpvp')))
    $main_content .= 'Open PvP';
elseif(in_array($w, array('no-pvp','nopvp','non-pvp','nonpvp','1','safe','optional','optionalpvp')))
    $main_content .= 'Optional PvP';
elseif(in_array($w, array('pvp-enforced','pvpenforced','pvp-enfo','pvpenfo','pvpe','enforced','enfo','3','war','hardcore','hardcorepvp')))
    $main_content .= 'Hardcore PvP';
$main_content .= '</td>
                        </tr>
                    </table>
                </div>
            </td>
        </tr>
    </table>
</div><br/>
    <div class="TableContainer">
        <table class="Table2" cellpadding="0" cellspacing="0">
        <div class="CaptionContainer">
        <div class="CaptionInnerContainer">
       <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
       <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
       <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span>
       <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span>
        <div class="Text">Players Online';
if($order == 'name_asc')
    $main_content .= '<span class="TableHeadlineNavigation"> [
    <a href="#A">A</a>
    <a href="#B">B</a>
    <a href="#C">C</a>
    <a href="#D">D</a>
    <a href="#E">E</a>
    <a href="#F">F</a>
    <a href="#G">G</a>
    <a href="#H">H</a>
    <a href="#I">I</a>
    <a href="#J">J</a>
    <a href="#K">K</a>
    <a href="#L">L</a>
    <a href="#M">M</a>
    <a href="#N">N</a>
    <a href="#O">O</a>
    <a href="#P">P</a>
    <a href="#Q">Q</a>
    <a href="#R">R</a>
    <a href="#S">S</a>
    <a href="#T">T</a>
    <a href="#U">U</a>
    <a href="#V">V</a>
    <a href="#W">W</a>
    <a href="#X">X</a>
    <a href="#Y">Y</a>
    <a href="#Z">Z</a> ]&#160;&#160;</span>';
$main_content .= '</div>
<span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span>
<span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span>
<span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
<span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
</div>
</div>
<tr>
<td>
<div class="InnerTableContainer">
<table width="100%">
<tr class="LabelH">
<td style="text-align:left;width:50%">Name&#160;&#160;<small style="font-weight:normal">[<a href="?subtopic=whoisonline&world='.$_POST['world'].'&order=name_'.($order == 'name_asc' ? 'desc' : 'asc').'">sort</a>]</small>
<img class="sortarrow" src="'.$layout_name.'/images/'.($order == 'name_asc' ? 'content/order_desc' : ($order == 'name_desc' ? 'content/order_asc' : 'news/blank')).'.gif"/></td>
<td style="text-align:left;width:30%">Level&#160;&#160;
<small style="font-weight:normal">[<a href="?subtopic=whoisonline&world='.$_POST['world'].'&order=level_'.($order == 'level_asc' ? 'desc' : 'asc').'">sort</a>]</small>
<img class="sortarrow" src="'.$layout_name.'/images/'.($order == 'level_asc' ? 'content/order_desc' : ($order == 'level_desc' ? 'content/order_asc' : 'news/blank')).'.gif"/></td>
<td style="text-align:left;width:50%">Vocation&#160;&#160;<small style="font-weight:normal">[<a href="?subtopic=whoisonline&world='.$_POST['world'].'&order=vocation_'.($order == 'vocation_asc' ? 'desc' : 'asc').'">sort</a>]</small>
<img class="sortarrow" src="'.$layout_name.'/images/'.($order == 'vocation_asc' ? 'content/order_desc' : ($order == 'vocation_desc' ? 'content/order_asc' : 'news/blank')).'.gif"/></td>
</tr>';

$main_content .= $cp;
if (!$cp){$main_content .='<tr><td colspan="3" align="center"><i>This server no has players online.</i></td></tr>';}
$main_content .='
</table>
</div>
</table>
</div>
</td>
</tr>
<br/>
<form action="?subtopic=characters" method="post"><div class="TableContainer">  <table class="Table1" cellpadding="0" cellspacing="0">    <div class="CaptionContainer">      <div class="CaptionInnerContainer">        <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>        <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>        <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span>        <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span>        <div class="Text">Search Character</div>        <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span>        <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span>        <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>        <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>      </div>    </div>    <tr>      <td>        <div class="InnerTableContainer">          <table width="100%"><tr><td style="vertical-align:middle" class="LabelV150"><b>Character Name:</b></td><td style="width:170px"><input style="width:165px" name="name" value="" size="29" maxlength="29"/></td><td><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)"><div onmouseover="MouseOverBigButton(this)" onmouseout="MouseOutBigButton(this)"><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif)"></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif"></div></div></td></tr>          </table>        </div>  </table></div></td></tr></form></center>';
?>

Kind Regards
Patrik
 
Hello,

I'm looking for a script that shows players only above X level. Why? Because it protects the low levels against power abusers / people who quit and just searching for easy targets via online - list. I'm using Gesior Accmaker.

Below code of whoisonline.php file


Kind Regards
Patrik
Test this one, it should list all players above level 50. You can change the levels to be shown by editing "$showPlayerAboveLvl = 50;" at line 10
PHP:
<?php
if(!defined('INITIALIZED'))
    exit;
$cache_sec = 1;
$info = array(
    0 => array($config['server']['location'], date("d/m/Y")),
    1 => array('EUA', date("d/m/Y"))
);
$showPlayerAboveLvl = 50;
$id=0;
if(isset($_POST['world'])) {
    $f = null;
    foreach($config['site']['worlds'] as $k => $v)
        if($v == $_POST['world']) {
            $f = true;
            $id = $k;
            break;
        }
    if(!$f)
        $_POST['world'] = $config['site']['worlds'][0];
} else $_POST['world'] = $config['site']['worlds'][0];
$order = 'name_asc';
if(isset($_REQUEST['order']) && in_array($_REQUEST['order'], array('name_desc', 'level_asc','level_desc','vocation_asc','vocation_desc')))
    $order = $_REQUEST['order'];
if(count($config['site']['worlds']) > 1) {
    $main_content ='
<form action="?subtopic=whoisonline" method="post">
   <div class="TableContainer">
       <table class="Table1" cellpadding="0" cellspacing="0">
           <div class="CaptionContainer">
               <div class="CaptionInnerContainer">
                  <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
                  <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
                  <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span>
                  <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span>
                   <div class="Text">World Selection</div>
                  <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span>
                  <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span>
                  <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
                  <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
               </div>
           </div>
           <tr>
               <td>
                   <div class="InnerTableContainer">
                       <table width="100%">
                           <tr>
                               <td style="vertical-align:middle" class="LabelV150">World Name:</td>
                               <td style="width:170px">
                                   <select size="1" name="world" style="width:165px">';
foreach($config['site']['worlds'] as $v)
    $main_content .= '<option value="'.$v.'"'.($v == $_POST['world'] ? ' selected="selected"' : '').'>'.$v.'</option>';
$main_content .= '
                                   </select>
                               </td>
                               <td style="text-align:left">
                                  <div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)">
                                      <div onmouseover="MouseOverBigButton(this)" onmouseout="MouseOutBigButton(this)"><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif)"></div>
                                          <input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif"/>
                                       </div>
                                   </div>
                               </td>
                           </tr>
                       </table>
                   </div>
               </td>
           </tr>
       </table>
   </div>
</form><br/>
';
}
$main_content .=
'<div class="TableContainer">
   <table class="Table1" cellpadding="0" cellspacing="0">
       <div class="CaptionContainer">
           <div class="CaptionInnerContainer">
              <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
              <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
              <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span>
              <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span>
               <div class="Text">World Information</div>
              <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span>
              <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span>
              <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
              <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
           </div>
       </div>
       <tr>
           <td>
               <div class="InnerTableContainer">
                   <table width="100%">
                       <tr>
                           <td class="LabelV150"><b>Status:</b></td>
                           <td>O'.($config['status']['serverStatus_online'] == 1 ? 'n' : 'ff').'line</td>
                       </tr>
                       <tr>
                           <td class="LabelV150"><b>Players Online:</b></td>
                           <td>';
$f = 'cache/whoisonline-'.$_POST['world'].'-'.$order.'.tmp';
$ff = 'cache/whoisonline-'.$_POST['world'].'-record.tmp';
if(file_exists($f) && filemtime($f) > (time() - $cache_sec)) {
    $cp = file_get_contents($f);
    $cached = null;
    if(file_exists($f) && filemtime($f) > (time() - $cache_sec)) {
        $e = explode('|', file_get_contents($ff));
        $n = $e[0];
        $c = $e[1];
        $cached = true;
    }
}
else {
    $cp = '';
    $n = 0;
    $q = 'SELECT * FROM players WHERE world_id='.$id.' AND online=1';
    if(in_array($order, array('name_asc','name_desc','level_asc','level_desc')))
        $q .= ' ORDER BY '.str_replace('_', ' ', $order);
    if(in_array($order, array('vocation_asc','vocation_desc'))) {
        $a = array();
        foreach($SQL->query($q)->fetchAll() as $p)
        {
            if($p['level'] >= $showPlayerAboveLvl)
                $a[] = array($p['name'], $p['level'], $vocation_name[$p['promotion']][$p['vocation']]);
        }
        function cmp($a, $b) {
            $r = strcmp($a[2], $b[2]);
            $r = $GLOBALS['order'] == 'vocation_desc' ? ($r == 1 ? -1 : ($r == -1 ? 1 : 0)) : $r;
            return ($r == 0 && $a[1] < $b[1]) ? 1 : $r;
        }
        usort($a, 'cmp');
        foreach($a as $p) {
            $n++;
           $cp .= '<tr class="'.(is_int($n/2)?'Odd':'Even').'" style="text-align:right"><td style="width:70%;text-align:left"><a href="?subtopic=characters&name='.urlencode($p[0]).'">'.$p[0].'</a></td><td style="width:10%">'.$p[1].'</td><td style="width:20%">'.str_replace(' ','&#160;',$p[2]).'</td></tr>';
        }
    }
    else {
        $l = array();
    
        foreach($SQL->query($q)->fetchAll() as $p) {
            $n++;
            $cp .= '<tr class="'.(is_int($n/2)?'Odd':'Even').'" style="text-align:right">';
            $cp .= '<td style="width:70%;text-align:left">';
            if($order == 'name_asc') {
                $tmp = strtoupper($p['name'][0]);
                if(!in_array($tmp, $l)) {
                    $l[] = $tmp;
                    $cp .= '<a name="'.$tmp.'"></a>';
                }
            }
           $cp .= '<a href="?subtopic=characters&name='.urlencode($p['name']).'">'.$p['name'].'</a></td><td style="width: 10%">'.$p['level'].'</td><td style="width:20%">'.str_replace(' ','&#160;',$vocation_name[$p['promotion']][$p['vocation']]).'</td></tr>';
        }
    
    }
    file_put_contents($f, $cp);
}
if(!$cached) {
    $r=$SQL->query('SELECT MAX(record) as r,MAX(timestamp) as t FROM server_record WHERE world_id='.$id)->fetch();
    $c = $r['r'].' players (on '.date('M&#160;d&#160;Y,&#160;H:i:s&#160;T', $r['t']).')';
    file_put_contents($ff, $n.'|'.$c);
}
$main_content .= $n.' Players Online</td>
                       </tr>
                       <tr>
                           <td class="LabelV150"><b>Online Record:</b></td>
                           <td>'.$c.'</td>
                       </tr>
                       <tr>
                           <td class="LabelV150"><b>Creation Date:</b></td>
                           <td>'.$info[$id][1].'</td>
                       </tr>
                       <tr>
                           <td class="LabelV150"><b>Location:</b></td>
                           <td>'.$info[$id][0].'</td>
                       </tr>
                       <tr>
                           <td class="LabelV150"><b>PvP Type:</b></td>
                           <td>';
$w=strtolower($config['server']['worldType']);
if(in_array($w, array('pvp','2','normal','open','openpvp')))
    $main_content .= 'Open PvP';
elseif(in_array($w, array('no-pvp','nopvp','non-pvp','nonpvp','1','safe','optional','optionalpvp')))
    $main_content .= 'Optional PvP';
elseif(in_array($w, array('pvp-enforced','pvpenforced','pvp-enfo','pvpenfo','pvpe','enforced','enfo','3','war','hardcore','hardcorepvp')))
    $main_content .= 'Hardcore PvP';
$main_content .= '</td>
                       </tr>
                   </table>
               </div>
           </td>
       </tr>
   </table>
</div><br/>
   <div class="TableContainer">
       <table class="Table2" cellpadding="0" cellspacing="0">
       <div class="CaptionContainer">
       <div class="CaptionInnerContainer">
      <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
      <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
      <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span>
      <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span>
       <div class="Text">Players Online';
if($order == 'name_asc')
    $main_content .= '<span class="TableHeadlineNavigation"> [
   <a href="#A">A</a>
   <a href="#B">B</a>
   <a href="#C">C</a>
   <a href="#D">D</a>
   <a href="#E">E</a>
   <a href="#F">F</a>
   <a href="#G">G</a>
   <a href="#H">H</a>
   <a href="#I">I</a>
   <a href="#J">J</a>
   <a href="#K">K</a>
   <a href="#L">L</a>
   <a href="#M">M</a>
   <a href="#N">N</a>
   <a href="#O">O</a>
   <a href="#P">P</a>
   <a href="#Q">Q</a>
   <a href="#R">R</a>
   <a href="#S">S</a>
   <a href="#T">T</a>
   <a href="#U">U</a>
   <a href="#V">V</a>
   <a href="#W">W</a>
   <a href="#X">X</a>
   <a href="#Y">Y</a>
   <a href="#Z">Z</a> ]&#160;&#160;</span>';
$main_content .= '</div>
<span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span>
<span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span>
<span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
<span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
</div>
</div>
<tr>
<td>
<div class="InnerTableContainer">
<table width="100%">
<tr class="LabelH">
<td style="text-align:left;width:50%">Name&#160;&#160;<small style="font-weight:normal">[<a href="?subtopic=whoisonline&world='.$_POST['world'].'&order=name_'.($order == 'name_asc' ? 'desc' : 'asc').'">sort</a>]</small>
<img class="sortarrow" src="'.$layout_name.'/images/'.($order == 'name_asc' ? 'content/order_desc' : ($order == 'name_desc' ? 'content/order_asc' : 'news/blank')).'.gif"/></td>
<td style="text-align:left;width:30%">Level&#160;&#160;
<small style="font-weight:normal">[<a href="?subtopic=whoisonline&world='.$_POST['world'].'&order=level_'.($order == 'level_asc' ? 'desc' : 'asc').'">sort</a>]</small>
<img class="sortarrow" src="'.$layout_name.'/images/'.($order == 'level_asc' ? 'content/order_desc' : ($order == 'level_desc' ? 'content/order_asc' : 'news/blank')).'.gif"/></td>
<td style="text-align:left;width:50%">Vocation&#160;&#160;<small style="font-weight:normal">[<a href="?subtopic=whoisonline&world='.$_POST['world'].'&order=vocation_'.($order == 'vocation_asc' ? 'desc' : 'asc').'">sort</a>]</small>
<img class="sortarrow" src="'.$layout_name.'/images/'.($order == 'vocation_asc' ? 'content/order_desc' : ($order == 'vocation_desc' ? 'content/order_asc' : 'news/blank')).'.gif"/></td>
</tr>';
$main_content .= $cp;
if (!$cp){$main_content .='<tr><td colspan="3" align="center"><i>This server no has players online.</i></td></tr>';}
$main_content .='
</table>
</div>
</table>
</div>
</td>
</tr>
<br/>
<form action="?subtopic=characters" method="post"><div class="TableContainer">  <table class="Table1" cellpadding="0" cellspacing="0">    <div class="CaptionContainer">      <div class="CaptionInnerContainer">        <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>        <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>        <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span>        <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span>        <div class="Text">Search Character</div>        <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span>        <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span>        <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>        <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>      </div>    </div>    <tr>      <td>        <div class="InnerTableContainer">          <table width="100%"><tr><td style="vertical-align:middle" class="LabelV150"><b>Character Name:</b></td><td style="width:170px"><input style="width:165px" name="name" value="" size="29" maxlength="29"/></td><td><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)"><div onmouseover="MouseOverBigButton(this)" onmouseout="MouseOutBigButton(this)"><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif)"></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif"></div></div></td></tr>          </table>        </div>  </table></div></td></tr></form></center>';
?>
 
@Mummrik i tested with that line
$showPlayerAboveLvl = 50;
No effect, players below lvl 50 still exists in online list
you did add the other code aswell?
That is just where you can change what level to show, so if you just added that line it wont work you have to replace the whole code whit the one i provided
 
you did add the other code aswell?
That is just where you can change what level to show, so if you just added that line it wont work you have to replace the whole code whit the one i provided
Oh yeah, firstly i just added the line, after a 1 minute i noticed that you changed more things in code, so i copied full code that you have posted, still no effect.
 
Change:
Code:
$q = 'SELECT * FROM players WHERE world_id='.$id.' AND online=1';

To:
Code:
$q = 'SELECT * FROM players WHERE level >= 30 AND world_id='.$id.' AND online=1';

Where 30 is the smallest level to show.
 
Change:
Code:
$q = 'SELECT * FROM players WHERE world_id='.$id.' AND online=1';

To:
Code:
$q = 'SELECT * FROM players WHERE level >= 30 AND world_id='.$id.' AND online=1';

Where 30 is the smallest level to show.
I was thinking of this aswell but wasnt sure if it was possible to check if the value is equal or greater. And then got side tracked by something else, so i have to apologize to OP.
 
Change:
Code:
$q = 'SELECT * FROM players WHERE world_id='.$id.' AND online=1';

To:
Code:
$q = 'SELECT * FROM players WHERE level >= 30 AND world_id='.$id.' AND online=1';

Where 30 is the smallest level to show.
Works perfectly ! Thanks alot, the problem now is online pedestal from layouts works fine - on the server is 4 players and it show 4 players, the online list works also perfectly because hides players under level 30,
But it shows fake record that is 2 players when there is really 4 players, but 2 of them are under level 30.
Any idea to fix the Players Online: line that it will count also players online under level 30?
onlinelist.png
 
Works perfectly ! Thanks alot, the problem now is online pedestal from layouts works fine - on the server is 4 players and it show 4 players, the online list works also perfectly because hides players under level 30,
But it shows fake record that is 2 players when there is really 4 players, but 2 of them are under level 30.
Any idea to fix the Players Online: line that it will count also players online under level 30?
onlinelist.png
That is calculated in an other php file, I'll take a look at it.

Edit:
inside your layouts folder find layout.php and post it here
 
The line players online: line i see exactly in line 98 in file whoisonline.php , but i may be wrong.
PHP:
<?php
if(!defined('INITIALIZED'))
    exit;
$cache_sec = 1;
$info = array(
    0 => array($config['server']['location'], date("d/m/Y")),
    1 => array('EUA', date("d/m/Y"))
);
$showPlayerAboveLvl = 50;
$id=0;
if(isset($_POST['world'])) {
    $f = null;
    foreach($config['site']['worlds'] as $k => $v)
        if($v == $_POST['world']) {
            $f = true;
            $id = $k;
            break;
        }
    if(!$f)
        $_POST['world'] = $config['site']['worlds'][0];
} else $_POST['world'] = $config['site']['worlds'][0];
$order = 'name_asc';
if(isset($_REQUEST['order']) && in_array($_REQUEST['order'], array('name_desc', 'level_asc','level_desc','vocation_asc','vocation_desc')))
    $order = $_REQUEST['order'];
if(count($config['site']['worlds']) > 1) {
    $main_content ='
<form action="?subtopic=whoisonline" method="post">
  <div class="TableContainer">
      <table class="Table1" cellpadding="0" cellspacing="0">
          <div class="CaptionContainer">
              <div class="CaptionInnerContainer">
                 <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
                 <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
                 <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span>
                 <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span>
                  <div class="Text">World Selection</div>
                 <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span>
                 <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span>
                 <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
                 <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
              </div>
          </div>
          <tr>
              <td>
                  <div class="InnerTableContainer">
                      <table width="100%">
                          <tr>
                              <td style="vertical-align:middle" class="LabelV150">World Name:</td>
                              <td style="width:170px">
                                  <select size="1" name="world" style="width:165px">';
foreach($config['site']['worlds'] as $v)
    $main_content .= '<option value="'.$v.'"'.($v == $_POST['world'] ? ' selected="selected"' : '').'>'.$v.'</option>';
$main_content .= '
                                  </select>
                              </td>
                              <td style="text-align:left">
                                 <div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)">
                                     <div onmouseover="MouseOverBigButton(this)" onmouseout="MouseOutBigButton(this)"><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif)"></div>
                                         <input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif"/>
                                      </div>
                                  </div>
                              </td>
                          </tr>
                      </table>
                  </div>
              </td>
          </tr>
      </table>
  </div>
</form><br/>
';
}
$main_content .=
'<div class="TableContainer">
  <table class="Table1" cellpadding="0" cellspacing="0">
      <div class="CaptionContainer">
          <div class="CaptionInnerContainer">
             <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
             <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
             <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span>
             <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span>
              <div class="Text">World Information</div>
             <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span>
             <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span>
             <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
             <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
          </div>
      </div>
      <tr>
          <td>
              <div class="InnerTableContainer">
                  <table width="100%">
                      <tr>
                          <td class="LabelV150"><b>Status:</b></td>
                          <td>O'.($config['status']['serverStatus_online'] == 1 ? 'n' : 'ff').'line</td>
                      </tr>
                      <tr>
                          <td class="LabelV150"><b>Players Online:</b></td>
                          <td>';
$f = 'cache/whoisonline-'.$_POST['world'].'-'.$order.'.tmp';
$ff = 'cache/whoisonline-'.$_POST['world'].'-record.tmp';
if(file_exists($f) && filemtime($f) > (time() - $cache_sec)) {
    $cp = file_get_contents($f);
    $cached = null;
    if(file_exists($f) && filemtime($f) > (time() - $cache_sec)) {
        $e = explode('|', file_get_contents($ff));
        $n = $e[0];
        $c = $e[1];
        $cached = true;
    }
}
else {
    $cp = '';
    $n = 0;
    $q = 'SELECT * FROM players WHERE level >= 40 AND world_id='.$id.' AND online=1';
    if(in_array($order, array('name_asc','name_desc','level_asc','level_desc')))
        $q .= ' ORDER BY '.str_replace('_', ' ', $order);
    if(in_array($order, array('vocation_asc','vocation_desc'))) {
        $a = array();
        foreach($SQL->query($q)->fetchAll() as $p)
        {
            if($p['level'] >= $showPlayerAboveLvl)
                $a[] = array($p['name'], $p['level'], $vocation_name[$p['promotion']][$p['vocation']]);
        }
        function cmp($a, $b) {
            $r = strcmp($a[2], $b[2]);
            $r = $GLOBALS['order'] == 'vocation_desc' ? ($r == 1 ? -1 : ($r == -1 ? 1 : 0)) : $r;
            return ($r == 0 && $a[1] < $b[1]) ? 1 : $r;
        }
        usort($a, 'cmp');
        foreach($a as $p) {
            $n++;
           $cp .= '<tr class="'.(is_int($n/2)?'Odd':'Even').'" style="text-align:right"><td style="width:70%;text-align:left"><a href="?subtopic=characters&name='.urlencode($p[0]).'">'.$p[0].'</a></td><td style="width:10%">'.$p[1].'</td><td style="width:20%">'.str_replace(' ','&#160;',$p[2]).'</td></tr>';
        }
    }
    else {
        $l = array();
  
        foreach($SQL->query($q)->fetchAll() as $p) {
            $n++;
            $cp .= '<tr class="'.(is_int($n/2)?'Odd':'Even').'" style="text-align:right">';
            $cp .= '<td style="width:70%;text-align:left">';
            if($order == 'name_asc') {
                $tmp = strtoupper($p['name'][0]);
                if(!in_array($tmp, $l)) {
                    $l[] = $tmp;
                    $cp .= '<a name="'.$tmp.'"></a>';
                }
            }
           $cp .= '<a href="?subtopic=characters&name='.urlencode($p['name']).'">'.$p['name'].'</a></td><td style="width: 10%">'.$p['level'].'</td><td style="width:20%">'.str_replace(' ','&#160;',$vocation_name[$p['promotion']][$p['vocation']]).'</td></tr>';
        }
  
    }
    file_put_contents($f, $cp);
}
if(!$cached) {
    $r=$SQL->query('SELECT MAX(record) as r,MAX(timestamp) as t FROM server_record WHERE world_id='.$id)->fetch();
    $c = $r['r'].' players (on '.date('M&#160;d&#160;Y,&#160;H:i:s&#160;T', $r['t']).')';
    file_put_contents($ff, $n.'|'.$c);
}
$main_content .= $n.' Players Online</td>
                      </tr>
                      <tr>
                          <td class="LabelV150"><b>Online Record:</b></td>
                          <td>'.$c.'</td>
                      </tr>
                      <tr>
                          <td class="LabelV150"><b>Creation Date:</b></td>
                          <td>'.$info[$id][1].'</td>
                      </tr>
                      <tr>
                          <td class="LabelV150"><b>Location:</b></td>
                          <td>'.$info[$id][0].'</td>
                      </tr>
                      <tr>
                          <td class="LabelV150"><b>PvP Type:</b></td>
                          <td>';
$w=strtolower($config['server']['worldType']);
if(in_array($w, array('pvp','2','normal','open','openpvp')))
    $main_content .= 'Open PvP';
elseif(in_array($w, array('no-pvp','nopvp','non-pvp','nonpvp','1','safe','optional','optionalpvp')))
    $main_content .= 'Optional PvP';
elseif(in_array($w, array('pvp-enforced','pvpenforced','pvp-enfo','pvpenfo','pvpe','enforced','enfo','3','war','hardcore','hardcorepvp')))
    $main_content .= 'Hardcore PvP';
$main_content .= '</td>
                      </tr>
                  </table>
              </div>
          </td>
      </tr>
  </table>
</div><br/>
  <div class="TableContainer">
      <table class="Table2" cellpadding="0" cellspacing="0">
      <div class="CaptionContainer">
      <div class="CaptionInnerContainer">
     <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
     <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
     <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span>
     <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span>
      <div class="Text">Players Online';
if($order == 'name_asc')
    $main_content .= '<span class="TableHeadlineNavigation"> [
  <a href="#A">A</a>
  <a href="#B">B</a>
  <a href="#C">C</a>
  <a href="#D">D</a>
  <a href="#E">E</a>
  <a href="#F">F</a>
  <a href="#G">G</a>
  <a href="#H">H</a>
  <a href="#I">I</a>
  <a href="#J">J</a>
  <a href="#K">K</a>
  <a href="#L">L</a>
  <a href="#M">M</a>
  <a href="#N">N</a>
  <a href="#O">O</a>
  <a href="#P">P</a>
  <a href="#Q">Q</a>
  <a href="#R">R</a>
  <a href="#S">S</a>
  <a href="#T">T</a>
  <a href="#U">U</a>
  <a href="#V">V</a>
  <a href="#W">W</a>
  <a href="#X">X</a>
  <a href="#Y">Y</a>
  <a href="#Z">Z</a> ]&#160;&#160;</span>';
$main_content .= '</div>
<span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span>
<span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span>
<span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
<span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
</div>
</div>
<tr>
<td>
<div class="InnerTableContainer">
<table width="100%">
<tr class="LabelH">
<td style="text-align:left;width:50%">Name&#160;&#160;<small style="font-weight:normal">[<a href="?subtopic=whoisonline&world='.$_POST['world'].'&order=name_'.($order == 'name_asc' ? 'desc' : 'asc').'">sort</a>]</small>
<img class="sortarrow" src="'.$layout_name.'/images/'.($order == 'name_asc' ? 'content/order_desc' : ($order == 'name_desc' ? 'content/order_asc' : 'news/blank')).'.gif"/></td>
<td style="text-align:left;width:30%">Level&#160;&#160;
<small style="font-weight:normal">[<a href="?subtopic=whoisonline&world='.$_POST['world'].'&order=level_'.($order == 'level_asc' ? 'desc' : 'asc').'">sort</a>]</small>
<img class="sortarrow" src="'.$layout_name.'/images/'.($order == 'level_asc' ? 'content/order_desc' : ($order == 'level_desc' ? 'content/order_asc' : 'news/blank')).'.gif"/></td>
<td style="text-align:left;width:50%">Vocation&#160;&#160;<small style="font-weight:normal">[<a href="?subtopic=whoisonline&world='.$_POST['world'].'&order=vocation_'.($order == 'vocation_asc' ? 'desc' : 'asc').'">sort</a>]</small>
<img class="sortarrow" src="'.$layout_name.'/images/'.($order == 'vocation_asc' ? 'content/order_desc' : ($order == 'vocation_desc' ? 'content/order_asc' : 'news/blank')).'.gif"/></td>
</tr>';
$main_content .= $cp;
if (!$cp){$main_content .='<tr><td colspan="3" align="center"><i>This server no has players online.</i></td></tr>';}
$main_content .='
</table>
</div>
</table>
</div>
</td>
</tr>
<br/>
<form action="?subtopic=characters" method="post"><div class="TableContainer">  <table class="Table1" cellpadding="0" cellspacing="0">    <div class="CaptionContainer">      <div class="CaptionInnerContainer">        <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>        <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>        <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span>        <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span>        <div class="Text">Search Character</div>        <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span>        <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span>        <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>        <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>      </div>    </div>    <tr>      <td>        <div class="InnerTableContainer">          <table width="100%"><tr><td style="vertical-align:middle" class="LabelV150"><b>Character Name:</b></td><td style="width:170px"><input style="width:165px" name="name" value="" size="29" maxlength="29"/></td><td><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)"><div onmouseover="MouseOverBigButton(this)" onmouseout="MouseOutBigButton(this)"><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif)"></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif"></div></div></td></tr>          </table>        </div>  </table></div></td></tr></form></center>';
?>
 
Code was too long to post in 1 post, below is layout.php ( not fully cant put on forum because of limits , i skipped submenus ( no online word was contained there )
PHP:
                  <div id="ThemeboxesColumn">
                    <div id="DeactivationContainerThemebox" onclick="DisableDeactivationContainer();"></div>
                    <div id="RightArtwork">
                          <img id="Monster" src="images/monsters/dragonling.gif" onclick="window.location = #" 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='?subtopic=whoisonline'">
                          <?PHP
                            if($config['status']['serverStatus_online'] == 1)
                                echo $config['status']['serverStatus_players'].'<br />Players Online';
                            else
                                echo '0<br /> Players Online';
                          ?>
                          </div>
                    </div>
<?php
$skills = $SQL->query('SELECT * FROM players WHERE deleted = 0 AND group_id = 1 AND account_id != 1 ORDER BY level DESC LIMIT 5');
?>

                    <div id="Themeboxes">
                          <!-- premium theme box -->
                        <div id="PremiumBox" class="Themebox" style="background-image:url(<?PHP echo $layout_name; ?>/images/themeboxes/newcomer/newcomerbox.gif);">
                            <div class="ThemeboxButton">
                                <form action="?subtopic=buypoints" method="post" style="padding:0px;margin:0px;">
                                    <div class="BigButton" style="background-image:url(<?PHP echo $layout_name; ?>/images/buttons/sbutton.gif)">
                                        <div onmouseover="MouseOverBigButton(this);" onmouseout="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image:url(<?PHP echo $layout_name; ?>/images/buttons/sbutton_over.gif);"></div>
                                            <input class="ButtonText" type="image" name="Get Premium" alt="Get Premium" src="<?PHP echo $layout_name; ?>/images/buttons/_sbutton_getpremium.gif">
                                        </div>
                                    </div>
                                </form> 
                            </div>
                        </div>
<style type="text/css" media="all">
  .Toplevelbox {
    top: -4px;
    position: relative;
    margin-bottom: 10px;
    width: 180px;
    height: 200px;
  }
  .top_level {
    position: absolute;
    top: 29px;
    left: 6px;
    height: 160px;
    width: 168px;
    z-index: 20;
    text-align: center;
    padding-top: 6px;
    font-family: Tahoma, Geneva, sans-serif;
    font-size: 9.2pt;
    color: #FFF;
    font-weight: bold;
    text-align: right;
    text-decoration: inherit;
    text-shadow: 0.1em 0.1em #333
  }

  #Topbar a {
  text-decoration: none;
  cursor: auto;
  }
  a.topfont {
    font-family: Verdana, Arial, Helvetica;
    font-size: 11px;
        color: #0003b8;
    text-decoration: none
  }
  a:hover.topfont {
    font-family: Verdana, Arial, Helvetica;
    font-size: 11px;
    color: #CCC;
    text-decoration:none
  }
</style>
<div id="Topbar" class="Themebox" style="background-image:url(<?PHP echo $layout_name; ?>/images/themeboxes/top_level.png);">
  <div class="top_level" style="background:url(<?PHP echo $layout_name; ?>/images/themeboxes/bg_top.png)" align="    ">
    <?php
    $a = 1;
    foreach($skills as $skill) {
      echo '<div align="left"><a href="?subtopic=characters&name='.$skill['name'].'" class="topfont">
        <font color="#CCC">&nbsp;&nbsp;&nbsp;&nbsp;'.$a.' - </font>'.$skill['name'].'
        <br>
        <small><font color="white">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Level: ('.$skill['level'].')</font></small>
        <br>
      </a>
      </div>';
      $a++;
    }
    ?>
    <div class="Bottom" style="background-image:url(<?PHP echo $layout_name; ?>/images/general/box-bottom.gif); top: 159px;; left:-5px;">
    </div>
</div>   
</div>
<br>
<br><br>
                        <!-- networks theme box -->
                        <?PHP
                        $nF = $SQL->query("SELECT " .$SQL->fieldName('network_link'). " FROM " .$SQL->tableName('z_network_box'). " WHERE " .$SQL->fieldName('network_name'). " = 'facebook'")->fetch();
                        $nT = $SQL->query("SELECT " .$SQL->fieldName('network_link'). " FROM " .$SQL->tableName('z_network_box'). " WHERE " .$SQL->fieldName('network_name'). " = 'twitter'")->fetch();
                        ?>
                        <?PHP if(!empty($nF)){ ?>
                        <div id="NetworksBox" class="Themebox" style="background-image:url(<?PHP echo $layout_name; ?>/images/themeboxes/networks/networksbox.png);">
                              <div id="FacebookBlock">
                                <div id="FacebookLikeBox">
                                      <div class="fb-like-box fb_iframe_widget" data-href="https://www.facebook.com/<?PHP echo $nF['network_link']; ?>" data-width="175" data-height="180" data-show-faces="true" data-stream="false" data-border-color="none" data-header="false" fb-xfbml-state="rendered">
                                        <span style="vertical-align: bottom; width: 181px; height: 180px;">
                                        </span>
                                    </div>
                                </div>

                                <div id="FacebookSendBox">
                                      <div class="fb-send fb_iframe_widget" data-href="https://www.facebook.com/<?PHP echo $nF['network_link']; ?>" data-width="50" data-height="20" fb-xfbml-state="rendered">
                                        <span style="vertical-align: bottom; width: 50px; height: 20px;">
                                        </span>
                                    </div>
                                </div>
                                <div id="FacebookLikes">
                                      <div class="fb-like fb_edge_widget_with_comment fb_iframe_widget" data-href="https://www.facebook.com/<?PHP echo $nF['network_link']; ?>" data-send="false" data-width="225" data-show-faces="false" fb-xfbml-state="rendered">
                                        <span style="height: 28px; width: 225px;">
                                        </span>
                                    </div>
                                </div>
                              </div>
                            <?PHP if(!empty($nT)){ ?>
                              <div id="TwitterBlock">
                                <a href="https://twitter.com/<?PHP echo $nT['network_link']; ?>" class="twitter-follow-button" data-show-count="false">Follow @<?PHP echo $nT['network_link']; ?></a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
                              </div>
                            <?PHP } ?>
                              <div class="Bottom" style="background-image:url(<?PHP echo $layout_name; ?>/images/general/box-bottom.gif);"></div>
                        </div>
                        <?PHP } ?>
                        <?PHP if($config['site']['screenshot_page']){ ?>
                          <!-- screenshot theme box -->
                          <div id="ScreenshotBox" class="Themebox" style="background-image:url(<?PHP echo $layout_name; ?>/images/themeboxes/screenshot/screenshotbox.gif);">
                            <a href="#">
                                  <img id="ScreenshotContent" class="ThemeboxContent" src="images/screenshots/witch_thumb.gif" alt="Screenshot of the Day">
                            </a>
                              <div class="Bottom" style="background-image:url(<?PHP echo $layout_name; ?>/images/general/box-bottom.gif);"></div>
                          </div>
                        <?PHP } ?>
                        <!-- current poll theme box -->
                        <?PHP
                            $time = time();
                            $viewpoll = $SQL->query("SELECT * FROM `z_polls` where end > '$time' ORDER BY id DESC LIMIT 1");
                            foreach($viewpoll as $p){
                            $polls .= '<center>'.$p['question'].'</center>';
                                if(isset($p['id'])){
                                 echo '<div id="CurrentPollBox" class="Themebox" style="background-image:url('.$layout_name.'/images/themeboxes/current-poll/currentpollbox.gif);">
                                  <div id="CurrentPollText">'.$polls.'</div>
                                  <a class="ThemeboxButton" href="index.php?subtopic=polls&id= '.$p['id'].'" onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif);"><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);"></div>
                                    <div class="ButtonText" style="background-image:url('.$layout_name.'/images/buttons/_sbutton_votenow.gif);"></div>
                                  </a>
                                <div class="Bottom" style="background-image:url('.$layout_name.'/images/general/box-bottom.gif);"></div>
                                </div>';
                                }
                            }
                            ?>
                       

                       
                    </div>
                  </div>
            </div>
        </div>

        <div id="Footer">
            Copyright by Lunara Team. All rights reserved.<br>

        </div>
    </div>
</div>
</div>
</div>
</div>
 
  <script type="text/javascript">
    // disable all control elements which are not part of the content container element
    if (g_Deactivated == true) {
      document.getElementById('LoginButtonContainer').style.zIndex = "1";
      document.getElementById('DeactivationContainer').style.display = "block";
      document.getElementById('DeactivationContainer').style.zIndex = "50";
      document.getElementById('DeactivationContainerThemebox').style.display = "block";
      document.getElementById('Monster').style.cursor = "auto";
      document.getElementById('PlayersOnline').style.cursor = "auto";
      document.getElementById('ThemeboxesColumn').style.opacity = "0.30";
      document.getElementById('ThemeboxesColumn').style.MozOpacity = "0.30";
      document.getElementById('ThemeboxesColumn').filters.alpha.opacity = "0.75";
      document.getElementById('ThemeboxesColumn').style.filter = "alpha(opacity=50); opacity: 0.30";
      document.getElementById('Monster').setAttribute("onclick", "")
      document.getElementById('PlayersOnline').setAttribute("onclick", "")
    }
  </script>
      <div id="HelperDivContainer" style="background-image: url(<?PHP echo $layout_name; ?>/images/content/scroll.gif);">
          <div class="HelperDivArrow" style="background-image: url(<?PHP echo $layout_name; ?>/images/content/helper-div-arrow.png);"></div>
          <div id="HelperDivHeadline"></div>
          <div id="HelperDivText"></div>
         <center>
              <img class="Ornament" src="<?PHP echo $layout_name; ?>/images/content/ornament.gif">
          </center>
      <br>
    </div>
</body>
</html>
 
Code was too long to post in 1 post, below is layout.php ( not fully cant put on forum because of limits , i skipped submenus ( no online word was contained there )
PHP:
                  <div id="ThemeboxesColumn">
                    <div id="DeactivationContainerThemebox" onclick="DisableDeactivationContainer();"></div>
                    <div id="RightArtwork">
                          <img id="Monster" src="images/monsters/dragonling.gif" onclick="window.location = #" 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='?subtopic=whoisonline'">
                          <?PHP
                            if($config['status']['serverStatus_online'] == 1)
                                echo $config['status']['serverStatus_players'].'<br />Players Online';
                            else
                                echo '0<br /> Players Online';
                          ?>
                          </div>
                    </div>
<?php
$skills = $SQL->query('SELECT * FROM players WHERE deleted = 0 AND group_id = 1 AND account_id != 1 ORDER BY level DESC LIMIT 5');
?>

                    <div id="Themeboxes">
                          <!-- premium theme box -->
                        <div id="PremiumBox" class="Themebox" style="background-image:url(<?PHP echo $layout_name; ?>/images/themeboxes/newcomer/newcomerbox.gif);">
                            <div class="ThemeboxButton">
                                <form action="?subtopic=buypoints" method="post" style="padding:0px;margin:0px;">
                                    <div class="BigButton" style="background-image:url(<?PHP echo $layout_name; ?>/images/buttons/sbutton.gif)">
                                        <div onmouseover="MouseOverBigButton(this);" onmouseout="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image:url(<?PHP echo $layout_name; ?>/images/buttons/sbutton_over.gif);"></div>
                                            <input class="ButtonText" type="image" name="Get Premium" alt="Get Premium" src="<?PHP echo $layout_name; ?>/images/buttons/_sbutton_getpremium.gif">
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
<style type="text/css" media="all">
  .Toplevelbox {
    top: -4px;
    position: relative;
    margin-bottom: 10px;
    width: 180px;
    height: 200px;
  }
  .top_level {
    position: absolute;
    top: 29px;
    left: 6px;
    height: 160px;
    width: 168px;
    z-index: 20;
    text-align: center;
    padding-top: 6px;
    font-family: Tahoma, Geneva, sans-serif;
    font-size: 9.2pt;
    color: #FFF;
    font-weight: bold;
    text-align: right;
    text-decoration: inherit;
    text-shadow: 0.1em 0.1em #333
  }

  #Topbar a {
  text-decoration: none;
  cursor: auto;
  }
  a.topfont {
    font-family: Verdana, Arial, Helvetica;
    font-size: 11px;
        color: #0003b8;
    text-decoration: none
  }
  a:hover.topfont {
    font-family: Verdana, Arial, Helvetica;
    font-size: 11px;
    color: #CCC;
    text-decoration:none
  }
</style>
<div id="Topbar" class="Themebox" style="background-image:url(<?PHP echo $layout_name; ?>/images/themeboxes/top_level.png);">
  <div class="top_level" style="background:url(<?PHP echo $layout_name; ?>/images/themeboxes/bg_top.png)" align="    ">
    <?php
    $a = 1;
    foreach($skills as $skill) {
      echo '<div align="left"><a href="?subtopic=characters&name='.$skill['name'].'" class="topfont">
        <font color="#CCC">&nbsp;&nbsp;&nbsp;&nbsp;'.$a.' - </font>'.$skill['name'].'
        <br>
        <small><font color="white">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Level: ('.$skill['level'].')</font></small>
        <br>
      </a>
      </div>';
      $a++;
    }
    ?>
    <div class="Bottom" style="background-image:url(<?PHP echo $layout_name; ?>/images/general/box-bottom.gif); top: 159px;; left:-5px;">
    </div>
</div>
</div>
<br>
<br><br>
                        <!-- networks theme box -->
                        <?PHP
                        $nF = $SQL->query("SELECT " .$SQL->fieldName('network_link'). " FROM " .$SQL->tableName('z_network_box'). " WHERE " .$SQL->fieldName('network_name'). " = 'facebook'")->fetch();
                        $nT = $SQL->query("SELECT " .$SQL->fieldName('network_link'). " FROM " .$SQL->tableName('z_network_box'). " WHERE " .$SQL->fieldName('network_name'). " = 'twitter'")->fetch();
                        ?>
                        <?PHP if(!empty($nF)){ ?>
                        <div id="NetworksBox" class="Themebox" style="background-image:url(<?PHP echo $layout_name; ?>/images/themeboxes/networks/networksbox.png);">
                              <div id="FacebookBlock">
                                <div id="FacebookLikeBox">
                                      <div class="fb-like-box fb_iframe_widget" data-href="https://www.facebook.com/<?PHP echo $nF['network_link']; ?>" data-width="175" data-height="180" data-show-faces="true" data-stream="false" data-border-color="none" data-header="false" fb-xfbml-state="rendered">
                                        <span style="vertical-align: bottom; width: 181px; height: 180px;">
                                        </span>
                                    </div>
                                </div>

                                <div id="FacebookSendBox">
                                      <div class="fb-send fb_iframe_widget" data-href="https://www.facebook.com/<?PHP echo $nF['network_link']; ?>" data-width="50" data-height="20" fb-xfbml-state="rendered">
                                        <span style="vertical-align: bottom; width: 50px; height: 20px;">
                                        </span>
                                    </div>
                                </div>
                                <div id="FacebookLikes">
                                      <div class="fb-like fb_edge_widget_with_comment fb_iframe_widget" data-href="https://www.facebook.com/<?PHP echo $nF['network_link']; ?>" data-send="false" data-width="225" data-show-faces="false" fb-xfbml-state="rendered">
                                        <span style="height: 28px; width: 225px;">
                                        </span>
                                    </div>
                                </div>
                              </div>
                            <?PHP if(!empty($nT)){ ?>
                              <div id="TwitterBlock">
                                <a href="https://twitter.com/<?PHP echo $nT['network_link']; ?>" class="twitter-follow-button" data-show-count="false">Follow @<?PHP echo $nT['network_link']; ?></a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
                              </div>
                            <?PHP } ?>
                              <div class="Bottom" style="background-image:url(<?PHP echo $layout_name; ?>/images/general/box-bottom.gif);"></div>
                        </div>
                        <?PHP } ?>
                        <?PHP if($config['site']['screenshot_page']){ ?>
                          <!-- screenshot theme box -->
                          <div id="ScreenshotBox" class="Themebox" style="background-image:url(<?PHP echo $layout_name; ?>/images/themeboxes/screenshot/screenshotbox.gif);">
                            <a href="#">
                                  <img id="ScreenshotContent" class="ThemeboxContent" src="images/screenshots/witch_thumb.gif" alt="Screenshot of the Day">
                            </a>
                              <div class="Bottom" style="background-image:url(<?PHP echo $layout_name; ?>/images/general/box-bottom.gif);"></div>
                          </div>
                        <?PHP } ?>
                        <!-- current poll theme box -->
                        <?PHP
                            $time = time();
                            $viewpoll = $SQL->query("SELECT * FROM `z_polls` where end > '$time' ORDER BY id DESC LIMIT 1");
                            foreach($viewpoll as $p){
                            $polls .= '<center>'.$p['question'].'</center>';
                                if(isset($p['id'])){
                                 echo '<div id="CurrentPollBox" class="Themebox" style="background-image:url('.$layout_name.'/images/themeboxes/current-poll/currentpollbox.gif);">
                                  <div id="CurrentPollText">'.$polls.'</div>
                                  <a class="ThemeboxButton" href="index.php?subtopic=polls&id= '.$p['id'].'" onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif);"><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);"></div>
                                    <div class="ButtonText" style="background-image:url('.$layout_name.'/images/buttons/_sbutton_votenow.gif);"></div>
                                  </a>
                                <div class="Bottom" style="background-image:url('.$layout_name.'/images/general/box-bottom.gif);"></div>
                                </div>';
                                }
                            }
                            ?>
                

                
                    </div>
                  </div>
            </div>
        </div>

        <div id="Footer">
            Copyright by Lunara Team. All rights reserved.<br>

        </div>
    </div>
</div>
</div>
</div>
</div>
 
  <script type="text/javascript">
    // disable all control elements which are not part of the content container element
    if (g_Deactivated == true) {
      document.getElementById('LoginButtonContainer').style.zIndex = "1";
      document.getElementById('DeactivationContainer').style.display = "block";
      document.getElementById('DeactivationContainer').style.zIndex = "50";
      document.getElementById('DeactivationContainerThemebox').style.display = "block";
      document.getElementById('Monster').style.cursor = "auto";
      document.getElementById('PlayersOnline').style.cursor = "auto";
      document.getElementById('ThemeboxesColumn').style.opacity = "0.30";
      document.getElementById('ThemeboxesColumn').style.MozOpacity = "0.30";
      document.getElementById('ThemeboxesColumn').filters.alpha.opacity = "0.75";
      document.getElementById('ThemeboxesColumn').style.filter = "alpha(opacity=50); opacity: 0.30";
      document.getElementById('Monster').setAttribute("onclick", "")
      document.getElementById('PlayersOnline').setAttribute("onclick", "")
    }
  </script>
      <div id="HelperDivContainer" style="background-image: url(<?PHP echo $layout_name; ?>/images/content/scroll.gif);">
          <div class="HelperDivArrow" style="background-image: url(<?PHP echo $layout_name; ?>/images/content/helper-div-arrow.png);"></div>
          <div id="HelperDivHeadline"></div>
          <div id="HelperDivText"></div>
         <center>
              <img class="Ornament" src="<?PHP echo $layout_name; ?>/images/content/ornament.gif">
          </center>
      <br>
    </div>
</body>
</html>
can you post your load.compat.php located in your system folder aswell
Might be better to just calculate the online count there instead

Edit:
Replace this
PHP:
<?PHP
   if($config['status']['serverStatus_online'] == 1)
       echo $config['status']['serverStatus_players'].'<br />Players Online';
   else
       echo '0<br /> Players Online';
?>
whit this code
PHP:
<?PHP
    if($config['status']['serverStatus_online'] == 1)
   {
       $removeLowLevels = 0
       foreach($SQL->query('SELECT * FROM players WHERE online=1')->fetchAll() as $p) {
           if($p[level] < 40)
               $removeLowLevels = $removeLowLevels + 1
       }
       //echo $config['status']['serverStatus_players'].'<br />Players Online';    //real player count
        echo ($config['status']['serverStatus_players'] - $removeLowLevels).'<br />Players Online';    // hide low lvls
   }
    else
        echo '0<br /> Players Online';
?>

and let me know if its working

Edit2:
I did update the code some
 
Last edited:
Back
Top