Ir para conteúdo

[Gesior] Erro Players Online !


daniel saporito

Posts Recomendados

Olá galera hoje eu terminei meu site e coloquei meu server on

porem ficava la no layout OFFLINE depois arrumei e ficou sempre

0 players Online !! ae mexi denovo e agora ficou player loading....

o que está acontecendo??!!

 

Este é o ERRO ----> semttulorkw.jpg

Esté é meu whoisonline.php

<?PHP
if(count($config['site']['worlds']) > 1)
{
$worlds .= '<i>Select world:</i> ';
foreach($config['site']['worlds'] as $id => $world_n)
{
	$worlds .= ' <a href="?subtopic=whoisonline&world='.$id.'">'.$world_n.'</a> , ';
	if($id == (int) $_GET['world'])
	{
		$world_id = $id;
		$world_name = $world_n;
	}
}
$main_content .= substr($worlds, 0, strlen($worlds)-3);
}
if(!isset($world_id))
{
$world_id = 0;
$world_name = $config['server']['serverName'];
}
$order = $_REQUEST['order'];
if($order == 'level')
$orderby = 'level';
elseif($order == 'vocation')
$orderby = 'vocation';
if(empty($orderby))
$orderby = 'name';
$players_online_data = $SQL->query('SELECT `players`.`name`, `players`.`level`, `players`.`promotion`, `players`.`vocation`, `accounts`.`premdays` FROM `accounts`,`players` WHERE `accounts`.`id`=`players`.`account_id` AND `players`.`online`=1 ORDER BY '.$orderby.''); 
$number_of_players_online = 0;
foreach($players_online_data as $player) {
$number_of_players_online++;
if(is_int($number_of_players_online / 2))
	$bgcolor = $config['site']['darkborder'];
else
	$bgcolor = $config['site']['lightborder'];

$kills = 6;
$time = 3 * 60 * 60 * 1000;
$hasRs = $kills * $time;
$rs = "";
if ($player['skulltime'] > 0 && $player['skull'] == 0)
	$rs = "<img style='border: 0;' src='./images/whiteskull.gif'/>";
else if ($player['skulltime'] >= $hasRs or $player['skull'] == 1)
	$rs = "<img style='border: 0;' src='./images/redskull.gif'/>";

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

$players_rows .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH=70%><A HREF="?subtopic=characters&name='.urlencode($player['name']).'">'.$player['name'].$rs.'</A>'.$vip.'</TD><TD WIDTH=10%>'.$player['level'].'</TD><TD WIDTH=20%>'.$vocation_name[$world_id][$player['promotion']][$player['vocation']].'</TD></TR>';
}
if($number_of_players_online == 0)
//server status - server empty
$main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><B>Server Status</B></TD></TR><TR BGCOLOR='.$config['site']['darkborder'].'><TD><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=1><TR><TD>Currently no one is playing on <b>'.$config['site']['worlds'][$world_id].'</b>.</TD></TR></TABLE></TD></TR></TABLE><BR>';
else
{

//server status - someone is online
$main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><B>Server Status</B></TD></TR><TR BGCOLOR='.$config['site']['darkborder'].'><TD><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=1><TR><TD>Currently '.$number_of_players_online.' players are online on <b>'.$config['site']['worlds'][$world_id].'</b>.</TD></TR></TABLE></TD></TR></TABLE><BR>';

//Ile kto online

$connect = new mysqli ("".$config['server']['mysqlHost']."","".$config['server']['sqlUser']."","".$config['server']['sqlPass']."","".$config['server']['sqlDatabase']."");

$sor = $connect->query("SELECT COUNT(*) FROM `players` WHERE `vocation` = 1 AND `promotion` = 0 AND `online` = 1");
$sork = $sor->fetch_array();

$sor1 = $connect->query("SELECT COUNT(*) FROM `players` WHERE `vocation` = 2 AND `promotion` = 0 AND `online` = 1");
$sork1 = $sor1->fetch_array();

$sor2 = $connect->query("SELECT COUNT(*) FROM `players` WHERE `vocation` = 3 AND `promotion` = 0 AND `online` = 1");
$sork2 = $sor2->fetch_array();

$sor3 = $connect->query("SELECT COUNT(*) FROM `players` WHERE `vocation` = 4 AND `promotion` = 0 AND `online` = 1");
$sork3 = $sor3->fetch_array();

$sor4 = $connect->query("SELECT COUNT(*) FROM `players` WHERE `vocation` = 1 AND `promotion` = 1 AND `online` = 1");
$sork4 = $sor4->fetch_array();

$sor5 = $connect->query("SELECT COUNT(*) FROM `players` WHERE `vocation` = 2 AND `promotion` = 1 AND `online` = 1");
$sork5 = $sor5->fetch_array();

$sor6 = $connect->query("SELECT COUNT(*) FROM `players` WHERE `vocation` = 3 AND `promotion` = 1 AND `online` = 1");
$sork6 = $sor6->fetch_array();

$sor7 = $connect->query("SELECT COUNT(*) FROM `players` WHERE `vocation` = 4 AND `promotion` = 1 AND `online` = 1");
$sork7 = $sor7->fetch_array();


$sor->close();
$sor1->close();
$sor2->close();
$sor3->close();
$sor4->close();
$sor5->close();
$sor6->close();
$sor7->close();

$main_content.= '<center><TABLE BORDER=0 CELLPADDING=4 CELLSPACING=1 WIDTH=80%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD WIDTH=25% CLASS=white><B>Vocation</B></TD><TD WIDTH=75% CLASS=white><B>Online</B></TD>';
$main_content .= '</TR>';
if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $number_of_rows1++;
$main_content .= '<tr bgcolor="'.$bgcolor.'"><td><B>Sorcerer</B></td><td>'.$sork[0].'</td></tr>';
if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $number_of_rows1++;
$main_content .= '<tr bgcolor="'.$bgcolor.'"><td><B>Druid</B></td><td>'.$sork1[0].'</td></tr>';
if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $number_of_rows1++;
$main_content .= '<tr bgcolor="'.$bgcolor.'"><td><B>Paladin</B></td><td>'.$sork2[0].'</td></tr>';
if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $number_of_rows1++;
$main_content .= '<tr bgcolor="'.$bgcolor.'"><td><B>Knight</B></td><td>'.$sork3[0].'</td></tr>';
if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $number_of_rows1++;
$main_content .= '<tr bgcolor="'.$bgcolor.'"><td><B>Master Sorcerer</B></td><td>'.$sork4[0].'</td></tr>';
if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $number_of_rows1++;
$main_content .= '<tr bgcolor="'.$bgcolor.'"><td><B>Elder Druid</B></td><td>'.$sork5[0].'</td></tr>';
if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $number_of_rows1++;
$main_content .= '<tr bgcolor="'.$bgcolor.'"><td><B>Royal Paladin</B></td><td>'.$sork6[0].'</td></tr>';
if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $number_of_rows1++;
$main_content .= '<tr bgcolor="'.$bgcolor.'"><td><B>Elite Knight</B></td><td>'.$sork7[0].'</td></tr></center>';

$main_content .= '</table><br><br>';

$main_content .= "<table width='100%' cellspacing='1'>
	<tr>
		<td style='background: ".$bgcolor.";' align='center'>
			<img src='./images/whiteskull.gif'/> - 1 - 6 Frags
			<br/>
			<img src='./images/redskull.gif'/> - 6+ Frags or Red Skull
		</td>
	</tr>
	</table>";

//list of players
$main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD><A HREF="?subtopic=whoisonline&order=name" CLASS=white>Name</A></TD><TD><A HREF="?subtopic=whoisonline&order=level" CLASS=white>Level</A></TD><TD><A HREF="?subtopic=whoisonline&order=vocation" CLASS=white>Vocation</TD></TR>'.$players_rows.'</TABLE>';
//search bar
$main_content .= '<BR><FORM ACTION="?subtopic=characters" METHOD=post>  <TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Search Character</B></TD></TR><TR><TD BGCOLOR="'.$config['site']['darkborder'].'"><TABLE BORDER=0 CELLPADDING=1><TR><TD>Name:</TD><TD><INPUT NAME="name" VALUE=""SIZE=29 MAXLENGTH=29></TD><TD><INPUT TYPE=image NAME="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></TABLE></TD></TR></TABLE></FORM>';
}


?>

Editado por daniel saporito
Link para o comentário
Compartilhar em outros sites

  • 2 weeks later...
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...