Ir para conteúdo

erro no website


bernardes22

Posts Recomendados

Boa Tarde Xtibia!!!

 

estou tendo um erro em meu site,  o arquivo que contem o erro e o sistema top level tentei de tudo...tudo. mais não consegui arrumar esse maldito erro, alguém poderia me salvar?  meu servidor vai fica Online na sexta feira e o top level do site ainda não esta pronto :/   estou usando o Nicaw acc. me socorram por favor. ;(: 

 

 

Erro que aparece no site

Fatal error: Call to a member function isTable() on a non-object inC:\xampp\htdocs\site\header.inc.phpon line 93

 

 

Arquivo que contem o erro.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta name="Author" content="nicaw" /><meta http-equiv="content-type" content="text/html;charset=utf-8" /><title><?php echo $ptitle?></title><link rel="stylesheet" href="default.css" type="text/css" media="screen" /><link rel="stylesheet" href="<?php echo $cfg['skin_url'].$cfg['skin']?>.css" type="text/css" media="screen" /><link rel="stylesheet" href="print.css" type="text/css" media="print" /><link rel="alternate" type="application/rss+xml" title="News" href="news.php?RSS2" /><script type="text/javascript" src="javascript/prototype.js"></script><script type="text/javascript" src="javascript/main.js"></script><link rel="shortcut icon" href="resource/server.ico" /><?php if (!empty($_SESSION['account']) && empty($_COOKIE['remember'])){?><script type="text/javascript">//<![CDATA[function tick()    {        ticker++;        if (ticker > <?php echo $cfg['timeout_session'];?>){            self.window.location.href = 'login.php?logout&redirect=account.php';        }else{            setTimeout ("tick()",1000);        }    }    ticker = ;    tick();//]]></script><?php }?></head><body><div id="form"></div><div id="container"><div id="header"><div id="server_name"><?php echo $cfg['server_name']?></div></div></br></br></br></br><div id="panel"><div id="navigation"><?php if (file_exists('navigation.xml')){    $XML = simplexml_load_file('navigation.xml');    if ($XML === false) throw new aacException('Malformed XML');}else{die('Unable to load navigation.xml');}foreach ($XML->category as $cat){    echo '<div class="top">'.$cat['name'].'</div><ul>'."\n";    foreach ($cat->item as $item)        echo '<li><a href="'.$item['href'].'">'.$item.'</a></li>'."\n";    echo '</ul><div class="bot"></div>'."\n";}?></div> <div id="panel2"><div class="top">Status</div><div class="mid"><div id="server_state"><span class="offline">Server Offline</span><script type="text/javascript">//<![CDATA[    new Ajax.PeriodicalUpdater('server_state', 'status.php', {      method: 'get', frequency: 60, decay: 1    });//]]></script></div></div><div class="bot"></div></div><div id="panel3"><div class="top">Top Level</div><div class="mid">        <select name="sort" onchange="self.location.href=this.value">        <div style="text-align: center;">            <?php            if (empty($_GET['sort'])) $_GET['sort'] = 'level';            $options = array_merge(array('level'), $cfg['skill_names']);            foreach ($options as $skill) {                if ($skill == $_GET['sort'])                    $selected = ' selected="selected"';                else                    $selected = '';                echo '<option value="top.php?sort='.$skill.'"'.$selected.'>'.ucfirst($skill).'</option>';            }            echo '</select>';            if (!isset($_GET['page']) || $_GET['page'] < ) $p = ;            else $p = (int) $_GET['page'];            if ($_GET['sort'] == 'level' || $_GET['sort'] == 'maglevel') {                if($SQL->isTable('groups')) {                    $query = 'SELECT groups.access, groups.id, players.name, players.level, players.maglevel, players.experience FROM players LEFT OUTER JOIN groups ON players.group_id = groups.id ORDER BY `'.mysql_escape_string($_GET['sort']).'` DESC LIMIT '.$cfg['ranks_per_page']*$p.', '.$cfg['ranks_per_page'].';';                } else {                    $query = 'SELECT 0 AS access, players.name, players.level, players.maglevel, players.experience FROM players ORDER BY `'.mysql_escape_string($_GET['sort']).'` DESC LIMIT '.$cfg['ranks_per_page']*$p.', '.$cfg['ranks_per_page'].';';                }                $key = $_GET['sort'];            }elseif (in_array($_GET['sort'],$cfg['skill_names'])) {                if($SQL->isTable('groups')) {                    $query = 'SELECT groups.access, a1.* FROM (SELECT players.group_id, players.name, player_skills.value FROM players, player_skills WHERE players.id = player_skills.player_id AND player_skills.skillid = '.array_search($_GET['sort'], $cfg['skill_names']) .') AS a1 LEFT OUTER JOIN groups ON a1.group_id = groups.id ORDER BY `value` DESC LIMIT '.$cfg['ranks_per_page']*$p.', '.$cfg['ranks_per_page'].';';                } else {                    $query = 'SELECT 0 AS access, a1.* FROM (SELECT players.group_id, players.name, player_skills.value FROM players, player_skills WHERE players.id = player_skills.player_id AND player_skills.skillid = '.array_search($_GET['sort'], $cfg['skill_names']) .') AS a1 ORDER BY `value` DESC LIMIT '.$cfg['ranks_per_page']*$p.', '.$cfg['ranks_per_page'].';';                }                $key = 'value';            }elseif ($_GET['sort'] == 'census') {                $SQL->myQuery('SELECT players.sex, COUNT(players.id) as number FROM `players` GROUP BY players.sex');                $total = ;                while ($a = $SQL->fetch_array()) {                    $genders[$a['sex']] = $a['number'];                    $total += $a['number'];                }                $gender_names = array( => 'Female',1 => 'Male');                echo '<p><h2>Gender</h2>';                echo '<table style="font-weight: bold">';                foreach (array_keys($genders) as $gender)                    echo '<tr><td>'.$gender_names[$gender].'</td><td>'.percent_bar($genders[$gender],$total).'</td><td>('.$genders[$gender].')</td></tr>';                echo '</table></p>';                $SQL->myQuery('SELECT players.vocation, COUNT(players.id) as number FROM `players` GROUP BY players.vocation');                $total = ;                while ($a = $SQL->fetch_array()) {                    $vocations[$a['vocation']] = $a['number'];                    $total += $a['number'];                }            }else {$error = "Invalid sort argument";}            if (isset($query)) {                ?>            <table>                <tr class="color0"><td style="width:65"><div style="text-align: center;"><b>Name</b></td><td style="width:5"><div style="text-align: center;"><b><?php echo htmlspecialchars(ucfirst($_GET['sort']))?></b></td></tr>                    <?php                    $SQL->myQuery($query);                    $i = $cfg['ranks_per_page']*$p;                    while($a = $SQL->fetch_array())                        if ($a['access'] < $cfg['ranks_access']) {                            $i++;                            echo '<tr '.getStyle($i).'><td><a href="characters.php?player_name='.urlencode($a['name']).'">'.htmlspecialchars($a['name']).'</a></td><td>'.$a[$key].'</td></tr>'."\n";                        }                }                ?>            </table>    </div><div class="bot"></div></div><div id="shop"><div class="top">Black World Shop</div><div class="mid"><a href="http://127.0.0.1/site/shopsystem/index.php?subtopic=shopsystem"target="_blank"><img border="0" height="150" src="https://4.bp.blogspot.com/-1xvMdWSKRAo/Vv7MKqOjypI/AAAAAAAAACQ/dwJf8jfbNeUjOw7G-qU3dQ18eka2ownWQ/s200/photo-82610.png" width="150" /></a><b><span style="color: #eeeeee; font-family: "arial" , "helvetica" , sans-serif; font-size: 15px;">Troque Suas</span></b><br /><b><span style="color: #eeeeee; font-family: "arial" , "helvetica" , sans-serif; font-size: 15px;"> Premiums CoinsAqui!</span></b></div></div><div class="bot"></div></br></br></br></br></div>

  

 

 

Link para o comentário
Compartilhar em outros sites

Erro Arrumado, estava faltando um código na pagina.

 

esse é um Top Level Criado por mim, para usar pega o código acima e faça isso.

 

no arquivo header.inc.php  do seu site nicaw acc

 

Depois disso:  

<div id="header"></div>

 

Adicione isso:

<?php $SQL = AAC$SQL; ?>

 

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...