arturhaddad
Member
- Joined
- Aug 14, 2010
- Messages
- 217
- Reaction score
- 8
I have some errors in War of Emperium page script.
I have talked to kito and he said to ask here.
I use windows and modern AAC ( Dream Wars - Woe BUG )
This are the errors:
Script:
I have talked to kito and he said to ask here.
I use windows and modern AAC ( Dream Wars - Woe BUG )
This are the errors:
HTML:
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: SQL
Filename: pages/woebug.php
Line Number: 2
Fatal error: Call to a member function query() on a non-object in C:\xampp\htdocs\system\pages\woebug.php on line 2
Script:
PHP:
<?PHP
$woe = $SQL->query("
SELECT w.id AS id, w.time AS time, g.name AS guild, p.name AS name, w.started AS start, w.guild AS guild_id
FROM woe AS w
INNER JOIN players AS p
ON p.id = w.breaker
INNER JOIN guilds AS g
ON g.id = w.guild
ORDER BY id DESC LIMIT 10;
");
foreach ($woe as $k=>$v) {
$winners .="
<TR BGCOLOR=\"".$config['site'][($k % 2 == 1 ? 'light' : 'dark').'border']."\">
<TD>{$v[id]}</TD>
<TD><a href='index.php?subtopic=guilds&action=show&guild=" . $v[guild_id] . "'>$v[guild]</a></TD>
<TD>{$v[name]}</TD>
<TD>" . date("d/m/y H:i:s", $v[start]) . "</TD>
<TD>" . date("d/m/y H:i:s", $v[time]) . "</TD>
</TR>
";
}
$main_content .= '
<center><h1>War of Emperium</h1></center>
<br>
INFO HERE
';
if(!$winners) {
$main_content .= '
<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%>
<TR BGCOLOR="'.$config['site']['vdarkborder'].'">
<TD CLASS=white>
<B>Winners of WoE</B>
</TD>
</TR>
<TR BGCOLOR='.$config['site']['darkborder'].'>
<TD>
no WoE in '.$config['server']['serverName'].' yet.
</TD>
</TR>
</TABLE>
';
} else {
$main_content .= "
<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%>
<TR BGCOLOR=\"{$config['site']['vdarkborder']}\">
<TD CLASS=white width=5%>
<B>No.</B>
</TD>
<TD CLASS=white width=30%>
<B>Winner guild</B>
</TD>
<TD CLASS=white width=25%>
<B>Conquest by</B>
</TD>
<TD CLASS=white width=20%>
<B>Start time</B>
</TD>
<TD CLASS=white width=20%>
<B>Last conquest</B>
</TD>
</TR>
$winners
</TABLE>
";
}
?>
Last edited: