Jump to content
  • 0

Hall of fame Error


Cyro

Question


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  1137
  • Reputation:   290
  • Joined:  04/29/13
  • Last Seen:  

hi!

i have installed fluxcp with a theme which have hall of fame!

its working so far fine but when we login to account panel! its not showing anything on halloffame tab

here is my hall fame php file for reference! i am pretty sure error lies in this file itself! but unable to figure it out  

<?php if (!defined('FLUX_ROOT')) exit; 	
if (!$session->isLoggedIn()):
	if($params->get('action') == 'login')
    {
        $chars = array();
        $guilds = array();
        $sex = array();
        $bsex = 'F';
		$bclass = 0;
    }  else {
		$sex = "<img src='".$this->themePath('img/potm/M/0.gif')."' alt=\"Sex\"/>";
		$sqlpvp  = "SELECT pvpladder.name AS char_name, pvpladder.kills AS kills, pvpladder.deaths AS deaths, char.char_id, char.class AS bclass, login.sex, guild.name as gname 
					FROM pvpladder
					LEFT JOIN  `char` ON pvpladder.char_id = char.char_id
					LEFT JOIN  `login` ON char.account_id = login.account_id
					LEFT JOIN  `guild` ON char.guild_id = guild.guild_id
					ORDER BY kills DESC 
					LIMIT 1";
		$sthpvp  = $server->connection->getStatement($sqlpvp);
		$sthpvp->execute();
		$chars = $sthpvp->fetchAll();
		
		if (empty($chars[0]->sex)) {
			$bsex = $chars[0]->sex;
			$bclass = $chars[0]->bclass;
			$sex = "<img src='".$this->themePath('./img/potm/'.$bsex.'/'.$bclass.'.gif')."' alt=\"Sex\"/>";
		} else {
			$bsex = 'F';
			$bclass = 0;
		}

		$sqlgvg  = "SELECT g.guild_id, g.name AS gname, g.emblem_len, (
					SELECT COUNT( c.castle_id ) 
					FROM guild_castle c
					WHERE c.guild_id = g.guild_id
					) AS castles, g.master, ( 
					SELECT COUNT( char_id ) 
					FROM  `char` 
					WHERE  `char`.guild_id = g.guild_id
					) AS members 
					FROM guild AS g 
					LEFT JOIN  `char` AS ch ON ch.char_id = g.char_id 
					LEFT JOIN login ON login.account_id = ch.account_id 
					ORDER BY castles DESC, members DESC , g.max_member DESC , g.next_exp ASC 
					LIMIT 1";
		$sthgvg  = $server->connection->getstatement($sqlgvg);
		$sthgvg->execute();
		$guilds = $sthgvg->fetchall();
	}
?>
<div id="tabs">
	<ul>
		<li><a href="#player"><img src="<?php echo $this->themePath('img/bestplayer.png'); ?>" /></a></li>
		<li><a href="#guild"><img src="<?php echo $this->themePath('img/bestguild.png'); ?>" /></a></li>
	</ul>
    <div id="player">
		<?php if ( $chars ): ?>
			<table cellspacing="0" cellpadding="0" class="ranking">
					<tr><td class="sex"><?php echo $sex; ?></td></tr>
					<tr><td><b><font color="#4cc5e4">NAME:</font> </b><font color="#ffa500"><?php echo htmlspecialchars(substr($chars[0]->char_name,0, 12)) ?></font></td></tr>
					<tr><td><b><font color="#4cc5e4">KILLS/DEATHS:</font> </b> <font color="#ffa500"><?php echo number_format($chars[0]->kills) ." / ". number_format($chars[0]->deaths) ?></font></td></tr>
				</table>
		<?php endif; ?>
    </div>
    <div id="guild">
		<?php if( $guilds ): ?>
			<table cellspacing="0" cellpadding="0" class="ranking">
					<tr><td class="guild_logo">
						<?php if ($guilds[0]->emblem_len): ?>
							<img width="24" src="<?php echo $this->emblem($guilds[0]->guild_id) ?>" />
						<?php else: ?>
							<b>No Emblem</b>
						<?php endif ?>
					</td></tr>
					<tr><td><b><font color="#4cc5e4">NAME:</font> </b><font color="#ffa500"><?php echo htmlspecialchars(substr($guilds[0]->gname,0 ,15)) ?></font></td></tr>
					<tr><td><b><font color="#4cc5e4">MASTER:</font> </b><font color="#ffa500"><?php echo htmlspecialchars(substr($guilds[0]->master,0 ,15)) ?></font></td></tr>
				</table>
		<?php endif ?>
    </div>
</div>
<?php endif ?>

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Forum Manager
  • Topic Count:  282
  • Topics Per Day:  0.06
  • Content Count:  3123
  • Reputation:   1617
  • Joined:  03/26/12
  • Last Seen:  

To ensure that you get the best response to your query, please consider providing as much information as possible.

If you're requiring support, please give the following:

  • For FluxCP issues, where did you get your FluxCP version?
  • What theme are you using? If using custom themes, please link to the download page.
  • General PHP error logs from /data/logs/error/exceptions/
  • MySQL error logs from /data/logs/mysql/errors/
Link to comment
Share on other sites

×
×
  • Create New...