Wezza
lua nOOb
- Joined
- May 31, 2008
- Messages
- 2,278
- Reaction score
- 31
Everything is working, except for the PHP folder, it shows nothing on "Hunted By" or "Player Hunted"
so most probably something with the bountyhunter.php
the script:
To see the error live, you can check it here http://grand-ot.ddns.net/index.php?subtopic=bounty-hunters
so most probably something with the bountyhunter.php
the script:
Code:
<?php
$main_content .= '
<TABLE BORDER=0 CELLPADDING=4 CELLSPACING=1 WIDTH=100%>
<TR>
<TD style="text-align:center;"><H2>Bounty Hunters</H2></TD>
</TR>
<TR BGCOLOR="'.$config['site']['vdarkborder'].'">
<TD><CENTER><FONT COLOR=WHITE SIZE=2><b>How to use...</b></FONT></CENTER></TD>
</TR>
<TR BGCOLOR="'.$config['site']['darkborder'].'">
<TD style="text-align:center;"><b>!hunt prize,nick</b>
<br><i>Example: !hunt 100000,Player_name
<br>*Hunted By* Will Pay 100K(100,000 gold Pieces) for the Player who Kills *Hunted Player*.</i>
<br><font color="red">Minimum cash required is 100,000 gold coins to be able to use the bounty hunter system.</font>
</TD> </TR>
</TABLE><br><br><table>
';
$main_content .= '
<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%>
<TR BGCOLOR="#505050">
<TD CLASS=white width=28%>
<center><B>Hunted by</B></center>
</TD>
<TD CLASS=white width=14%>
<center><B>Reward</B></center>
</TD>
<TD CLASS=white width=28%>
<center><B>Player hunted</B></center>
</TD>
<TD CLASS=white width=28%>
<center><B>Killed by</B></center>
</TD>
</TR>';
foreach($SQL->query('SELECT A.* , B.name AS hunted_by, C.name AS player_hunted, D.name AS killed_by
FROM bounty_hunters AS A
LEFT JOIN players AS B ON A.fp_id = B.id
LEFT JOIN players AS C ON A.sp_id = C.id
LEFT JOIN players AS D ON A.k_id = D.id
ORDER BY A.added DESC') as $bounty) {
if($num%2 == 0){$color=$config['site']['darkborder'];}else{$color=$config['site']['lightborder'];}
if ($bounty['killed_by']){
$killed_by = '<a href="?subtopic=characters&name='.$bounty['killed_by'].'">'.$bounty['killed_by'].'</a>';
} else {
$killed_by = 'still alive';
}
$main_content .= '
<TR BGCOLOR="'.$color.'">
<TD><center><b><a href="?subtopic=characters&name='.$bounty['hunted_by'].'">'.$bounty['hunted_by'].'</a></b></center></TD>
<TD><center><b>'.$bounty['prize'].' gp</b></center></TD>
<TD><center><b><a href="?subtopic=characters&name='.$bounty['player_hunted'].'">'.$bounty['player_hunted'].'</a></b></center></TD>
<TD><center><b>'.$killed_by.'</b></center></TD>
</TR>';
$num++;
}
if($num == 0){
$main_content.='<TR BGCOLOR="'.$color.'"><TD colspan=4><center>Currently there are not any bounty hunter offer.</center></TD></TR>';
}
$main_content .='</TABLE></table>';
?>
To see the error live, you can check it here http://grand-ot.ddns.net/index.php?subtopic=bounty-hunters