Add some instructions to the safety questions page, and properly detect if there are no questions

This commit is contained in:
james 2006-02-01 17:50:27 +00:00
parent ab294df97b
commit b63674f649

View File

@ -102,9 +102,6 @@ else if($newstatus=="complete")
}
echo "<form method=\"post\" action=\"register_participants_safety.php\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"save\">\n";
echo "<table>\n";
$q=mysql_query("SELECT * FROM safety WHERE registrations_id='".$_SESSION['registration_id']."'");
while($r=mysql_fetch_object($q))
@ -113,6 +110,14 @@ else if($newstatus=="complete")
}
$q=mysql_query("SELECT * FROM safetyquestions WHERE year='".$config['FAIRYEAR']."' ORDER BY ord");
if(mysql_num_rows($q))
{
echo i18n("Please agree to / answer the following safety questions by checking the box next to the question, or choosing the appropriate answer");
echo "<br />";
echo "<br />";
echo "<form method=\"post\" action=\"register_participants_safety.php\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"save\">\n";
echo "<table>\n";
$num=1;
while($r=mysql_fetch_object($q))
{
@ -145,6 +150,9 @@ else if($newstatus=="complete")
echo "<input type=\"submit\" value=\"".i18n("Save Safety Information")."\" />\n";
echo "</form>";
}
else
echo notice(i18n("There are no safety questions to be answered"));
send_footer();
?>