diff --git a/register_participants_safety.php b/register_participants_safety.php index e2d7d2ed..289b179c 100644 --- a/register_participants_safety.php +++ b/register_participants_safety.php @@ -102,9 +102,6 @@ else if($newstatus=="complete") } - echo "
\n"; - echo "\n"; - echo "\n"; $q=mysql_query("SELECT * FROM safety WHERE registrations_id='".$_SESSION['registration_id']."'"); while($r=mysql_fetch_object($q)) @@ -113,38 +110,49 @@ else if($newstatus=="complete") } $q=mysql_query("SELECT * FROM safetyquestions WHERE year='".$config['FAIRYEAR']."' ORDER BY ord"); - $num=1; - while($r=mysql_fetch_object($q)) + if(mysql_num_rows($q)) { - echo ""; - echo ""; - echo ""; - $num++; - } - echo "
$num. "; - if($r->required=="yes") echo REQUIREDFIELD; - echo i18n($r->question).""; - if($r->type=="check") - { - if($safetyanswers[$r->id]=="checked") $ch="checked=\"checked\""; else $ch=""; - echo "id]\" value=\"checked\" />"; - } - else if($r->type=="yesno") - { - echo ""; - if($safetyanswers[$r->id]=="yes") $ch="checked=\"checked\""; else $ch=""; - echo "id]\" value=\"yes\" />"; - echo i18n("Yes"); - echo "
"; - if($safetyanswers[$r->id]=="no") $ch="checked=\"checked\""; else $ch=""; - echo "id]\" value=\"no\" />"; - echo i18n("No"); - echo ""; - } - echo "
"; - echo "\n"; - echo "
"; + echo i18n("Please agree to / answer the following safety questions by checking the box next to the question, or choosing the appropriate answer"); + echo "
"; + echo "
"; + echo "
\n"; + echo "\n"; + echo "\n"; + $num=1; + while($r=mysql_fetch_object($q)) + { + echo ""; + echo ""; + echo ""; + $num++; + } + echo "
$num. "; + if($r->required=="yes") echo REQUIREDFIELD; + echo i18n($r->question).""; + if($r->type=="check") + { + if($safetyanswers[$r->id]=="checked") $ch="checked=\"checked\""; else $ch=""; + echo "id]\" value=\"checked\" />"; + } + else if($r->type=="yesno") + { + echo ""; + if($safetyanswers[$r->id]=="yes") $ch="checked=\"checked\""; else $ch=""; + echo "id]\" value=\"yes\" />"; + echo i18n("Yes"); + echo "
"; + if($safetyanswers[$r->id]=="no") $ch="checked=\"checked\""; else $ch=""; + echo "id]\" value=\"no\" />"; + echo i18n("No"); + echo ""; + } + echo "
"; + echo "\n"; + echo "
"; + } + else + echo notice(i18n("There are no safety questions to be answered")); send_footer(); ?>