PDA

View Full Version : My Missions Hack


DigitalDesktops
05-14-2003, 12:35 AM
Hi, i'm having troubles making my new hack to work. :ermm:
Everything works fine, except the page is blank. Heres's the code:


<?php
error_reporting(7);
$templatesused='';
require("./global.php");


if ($bbuserinfo[userid]==0)
{
eval("standarderror(\"".gettemplate("error_nopermission_loggedout")."\");");
}

########################### VIEW MISSIONS #################################

$missions=$DB_site->query("SELECT race_name, race_color, title, objective, description, award, id, usergroupid, mission_id, mission_usergroupid FROM race,race_missions WHERE usergroupid=$bbuserinfo[usergroupid]");

while ($missions2=$DB_site->fetch_array($missions))
{
eval ('$output_missions .= "'.gettemplate("display_missions_bit").'";');
}
eval("dooutput(\"".gettemplate('display_missions')."\");");


?>


everything looks right. I called $output_missions from the display_missions template, but nothing shows up :(
Any Ideas? Thanks In Advance!

filburt1
05-14-2003, 01:20 AM
1. Indent correctly to make it more readable :)
2. Are you sure the template display_missions exists? That's the only thing I can see.

Davey
05-14-2003, 02:01 AM
Shouldn't $templatesused have a value in order to work?

Dave.

filburt1
05-14-2003, 02:17 AM
It should but it's not necessary.

DigitalDesktops
05-14-2003, 03:10 AM
I got iit to work. :D I had to split the query to 2. The two tables were conflicting with eachother. so now it works :) Thanks for helping me everyone. :)

can anybody help me with this part of the code?

If the query didn't come up with any results that matched to their usergroup.
How can I make so that there is error message saying "No Results blah blah"?

if it found results it would just display them normally.
Thanks In Advance! :D