Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado

Olá meus amigos de forum

preciso de ajuda neste código que está me dando o seguinte erro:

Fatal error: Call to a member function query() on a non-object in C:\xampp\htdocs\rep.php on line 7

código:


<?PHP

//Cyber's REPutation System 6.1 for Gesior AAC

$main_content .= '

<style type="text/css">tr.over:hover {background-color: '.$config['site']['darkborder'].';;}</style>

<style type="text/css"><White{color:white}}></style>';

$rep_pos = $SQL->query('SELECT name, rep FROM players WHERE rep > 0 AND name NOT LIKE "%Sample" AND name != "Account Manager" AND deleted = 0 AND group_id = 1 ORDER BY rep DESC LIMIT 10;');

$rep_neg = $SQL->query('SELECT name, rep FROM players WHERE rep < 0 AND name NOT LIKE "%Sample" AND name != "Account Manager" AND deleted = 0 AND group_id = 1 ORDER BY rep ASC LIMIT 10;');

$rep_pos2 = $SQL->query('SELECT name, rep FROM players WHERE rep > 0 AND name NOT LIKE "%Sample" AND name != "Account Manager" AND deleted = 0 AND group_id = 1 ORDER BY rep DESC LIMIT 10;');

$rep_neg2 = $SQL->query('SELECT name, rep FROM players WHERE rep < 0 AND name NOT LIKE "%Sample" AND name != "Account Manager" AND deleted = 0 AND group_id = 1 ORDER BY rep ASC LIMIT 10;');

$players_pos = 0;

$players_neg = 0;

foreach($rep_pos2 as $posplayer)

{

  $players_pos++;

}


foreach($rep_neg2 as $negplayer)

{

  $players_neg++;

}


$i = 0;

if ($players_pos)

  foreach($rep_pos as $player) {

   $i++;

   $bgcolor = $config['site']['darkborder'];

   $bgcolor = $config['site']['lightborder'];

   $rank = getReputation($player['rep']);

   $players_rows .= '<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=100% STYLE="border: 1px solid #000;'.($i != $players_pos ? 'border-bottom: none;' : null).'"><TR BGCOLOR='.$bgcolor.' CLASS="over">

   <TD WIDTH="44%"><A HREF="?subtopic=characters&name='.urlencode($player['name']).'">&nbsp;'.$player['name'].$rs.$bs.'</A></TD>

   <TD WIDTH="20%" STYLE="border-left: 1px solid #000; border-right: 1px solid #000;">&nbsp;'.$player['rep'].'</TD>

   <TD WIDTH="36%">&nbsp;'.$rank[0].'<br />'.$rank[1].'</TD></TR></TABLE>';

  }

else // DO NOT MODIFY

  $players_rows .= '&nbsp;There are no players with positive reputation.';


$o = 0;

if ($players_neg)

  foreach($rep_neg as $player) {

   $o++;

   $bgcolor = $config['site']['darkborder'];

   $bgcolor = $config['site']['lightborder'];

   $rank = getReputation($player['rep']);

   $players_rows2 .= '<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=100% STYLE="border: 1px solid #000;'.($o != $players_neg ? 'border-bottom: none;' : null).'"><TR BGCOLOR='.$bgcolor.' CLASS="over">

   <TD WIDTH="44%"><A HREF="?subtopic=characters&name='.urlencode($player['name']).'">&nbsp;'.$player['name'].$rs.$bs.'</A></TD>

   <TD WIDTH="20%" STYLE="border-left: 1px solid #000; border-right: 1px solid #000;">&nbsp;'.$player['rep'].'</TD>

   <TD WIDTH="36%">&nbsp;'.$rank[0].'<br />'.$rank[1].'</TD></TR></TABLE>';

  }

else // DO NOT MODIFY

  $players_rows2 .= '&nbsp;There are no players with negative reputation.';


// DO NOT MODIFY \/ 

if ($players_rows == '&nbsp;There are no players with positive reputation.')

  {$bar1='http://i29.tinypic.com/2cmm4o2.jpg';}

else

  {$bar1='repPics.php?type=1';}

if ($players_rows2 == '&nbsp;There are no players with negative reputation.')

  {$bar2='http://i30.tinypic.com/o51imx.jpg';}

else

  {$bar2 = 'repPics.php?type=2';}

// DO NOT MODIFY /\


$main_content .= '

<br/><center><img src="'.$bar1.'" width="50%"/><img src="'.$bar2.'" width="50%"/></center><br/>

<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=0 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'">

<TD WIDTH="22%"><strong>&nbsp;<span class="white">NAME</span></strong></TD>

<TD WIDTH="10%"><strong>&nbsp;<span class="white">POINTS</span></strong></TD>

<TD WIDTH="18%"><strong>&nbsp;<span class="white">RANK</span></strong></TD>

<TD WIDTH="22%"><strong>&nbsp;<span class="white">NAME</span></strong></TD>

<TD WIDTH="10%"><strong>&nbsp;<span class="white">POINTS</span></strong></TD>

<TD WIDTH="18%"><strong>&nbsp;<span class="white">RANK</span></strong></TD></TR><TR>

<TD WIDTH="50%" COLSPAN="3" VALIGN="TOP">'.$players_rows.'</TD>

<TD COLSPAN="3" VALIGN="TOP">'.$players_rows2.'</TD>

</TR></TABLE><br/>';


$main_content .= '

<center><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=100% style="background-color: #9C084A">

<TR align="left" bgcolor="'.$config['site']['darkborder'].'">

   <TD WIDTH=25%><strong>RANK</strong></TD>

   <TD WIDTH=20%><strong>OUTFIT</strong></TD>

   <TD WIDTH=15% align="center"><strong>POINTS</strong></TD>

   <TD WIDTH=25% align="center"><strong>BAR</strong></TD>

   <TD WIDTH=15% align="center"><strong>POWER</strong></TD>

</TR>

<TR align="left">

<TD BGCOLOR="#215868"><strong>&nbsp;Legend</strong></TD>

   <TD BGCOLOR="#215868">&nbsp;<img src="images/rep/legend.gif"/></TD>

   <TD BGCOLOR="#215868"><center><strong>5000</strong></center></TD>

   <TD BGCOLOR="#215868"><strong>&nbsp;(==========>>+)</strong></TD>

   <TD BGCOLOR="#215868"><center>7</center></TD>

</TR>

<TR align="left">

   <TD BGCOLOR="#31849b"><strong>&nbsp;Hero</strong></TD>

   <TD BGCOLOR="#31849b">&nbsp;<img src="http://images2.wikia.nocookie.net/__cb20050501020324/tibia/en/images/6/6f/Hero.gif"/></TD>

   <TD BGCOLOR="#31849b"><center><strong>2000</strong></center></TD>

   <TD BGCOLOR="#31849b"><strong>&nbsp;(==========>+=)</strong></TD>

   <TD BGCOLOR="#31849b"><center>6</center></TD>

</TR>

<TR align="left">

   <TD BGCOLOR="#4bacc6"><strong>&nbsp;Acclaimed</strong></TD>

   <TD BGCOLOR="#4bacc6">&nbsp;<img src="http://images3.wikia.nocookie.net/__cb20050531205626/tibia/en/images/e/e8/Elf_Arcanist.gif"/></TD>

   <TD BGCOLOR="#4bacc6"><center><strong>1500</strong></center></TD>

   <TD BGCOLOR="#4bacc6"><strong>&nbsp;(==========+==)</strong></TD>

   <TD BGCOLOR="#4bacc6"><center>5</center></TD>

</TR>

<TR align="left">

   <TD BGCOLOR="#92cddc"><strong>&nbsp;Hailed</strong></TD>

   <TD BGCOLOR="#92cddc"></TD

   <TD BGCOLOR="#92cddc"><center><strong>1000</center></TD>

   <TD BGCOLOR="#92cddc"><strong>&nbsp;(=========|===)</strong></TD>

   <TD BGCOLOR="#92cddc"><center>4</center></TD>

</TR>

<TR align="left">

   <TD BGCOLOR="#b6dde8"><span style="color:black;font-weight:bold">&nbsp;Popular</span></TD>

   <TD BGCOLOR="#b6dde8"></TD

   <TD BGCOLOR="#b6dde8"><center><span style="color:black;font-weight:bold">500</center></span></TD>

   <TD BGCOLOR="#b6dde8"><span style="color:black;font-weight:bold">&nbsp;(========|====)</strong></span></TD>

   <TD BGCOLOR="#b6dde8"><center><span style="color:black;font-weight:bold">3</span></center></TD>

</TR>

<TR align="left">

   <TD BGCOLOR="#daeef3"><strong>&nbsp;<span style="color:black;font-weight:bold">Avowed</span></TD>

   <TD BGCOLOR="#daeef3"></TD>

   <TD BGCOLOR="#daeef3"><center><span style="color:black;font-weight:bold">300</span></center></TD>

   <TD BGCOLOR="#daeef3">&nbsp;<span style="color:black;font-weight:bold">(=======|=====)</span></TD>

   <TD BGCOLOR="#daeef3"><center><span style="color:black;font-weight:bold">2</span></center></TD>

</TR>

<TR align="left">

   <TD BGCOLOR="#f2eff5"><span style="color:black;font-weight:bold">&nbsp;Unknown</span></TD>

   <TD BGCOLOR="#f2eff5"></TD>

   <TD BGCOLOR="#f2eff5"><center><span style="color:black;font-weight:bold">0</span></center></TD>

   <TD BGCOLOR="#f2eff5"><span style="color:black;font-weight:bold">&nbsp;(======|======)</span></TD>

   <TD BGCOLOR="#f2eff5"><center><span style="color:black;font-weight:bold">1</span></center></TD>

</TR>

<TR align="left">

   <TD BGCOLOR="#f2dbdb"><span style="color:black;font-weight:bold">&nbsp;Creeping</span></TD>

   <TD BGCOLOR="#f2dbdb"></TD>

   <TD BGCOLOR="#f2dbdb"><center><span style="color:black;font-weight:bold">-300</span></center></TD>

   <TD BGCOLOR="#f2dbdb"><span style="color:black;font-weight:bold">&nbsp;(=====|=======)</span></TD>

   <TD BGCOLOR="#f2dbdb"><center><span style="color:black;font-weight:bold">2</span></center></TD>

</TR>

<TR align="left">

   <TD BGCOLOR="#e5b8b7"><span style="color:black;font-weight:bold">&nbsp;Villain</span></TD>

   <TD BGCOLOR="#e5b8b7"></TD>

   <TD BGCOLOR="#e5b8b7"><center><span style="color:black;font-weight:bold">-500</span></center></TD>

   <TD BGCOLOR="#e5b8b7"><span style="color:black;font-weight:bold">&nbsp;(====|========)</span></TD>

   <TD BGCOLOR="#e5b8b7"><center><span style="color:black;font-weight:bold">3</span></center></TD>

</TR>

<TR align="left">

   <TD BGCOLOR="#d99594"><strong>&nbsp;Killer</strong></TD>

   <TD BGCOLOR="#d99594"></TD>

   <TD BGCOLOR="#d99594"><center><strong>-1000</strong></center></TD>

   <TD BGCOLOR="#d99594"><strong>&nbsp;(===|=========)</strong></TD>

   <TD BGCOLOR="#d99594"><center>4</center></TD>

</TR>

<TR align="left">

   <TD BGCOLOR="#c0504d"><strong>&nbsp;Slayer</strong></TD>

   <TD BGCOLOR="#c0504d">&nbsp;<img src="http://images2.wikia.nocookie.net/__cb20060327220853/tibia/en/images/8/8d/Pig.gif"/></TD>

   <TD BGCOLOR="#c0504d"><center><strong>-1500</strong></center></TD>

   <TD BGCOLOR="#c0504d"><strong>&nbsp;(==*==========)</strong></TD>

   <TD BGCOLOR="#c0504d"><center>5</center></TD>

</TR>

<TR align="left">

   <TD BGCOLOR="#943634"><strong>&nbsp;Evil</strong></TD>

   <TD BGCOLOR="#943634">&nbsp;<img src="http://images1.wikia.nocookie.net/__cb20081212000350/tibia/en/images/4/46/Undead_Gladiator.gif"/></TD>

   <TD BGCOLOR="#943634"><center><strong>-2000</strong></center></TD>

   <TD BGCOLOR="#943634"><strong>&nbsp;(=*<==========)</strong></TD>

   <TD BGCOLOR="#943634"><center>6</center></TD>

</TR>

<TR align="left">

   <TD BGCOLOR="#632423"><strong>&nbsp;Power Abuser</strong></TD>

<TD BGCOLOR="#632423">&nbsp;<img src="http://images2.wikia.nocookie.net/__cb20091128072335/tibia/en/images/2/29/Draken_Warmaster.gif"/></TD>

   <TD BGCOLOR="#632423"><center><strong>-5000</strong></center></TD>

   <TD BGCOLOR="#632423"><strong>&nbsp;(*<<==========)</strong></TD>

   <TD BGCOLOR="#632423"><center>7</center></TD>

</TR></TABLE></center><br/><div align="right"><span style="font-size:smaller;text-align:left">Scripted by <a href="http://otland.net/members/cybershot/">Cybermaster</a></span></div>';

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo