diff --git a/config/safetyquestions.php b/config/safetyquestions.php index b4bf79d..5001ef4 100644 --- a/config/safetyquestions.php +++ b/config/safetyquestions.php @@ -31,6 +31,9 @@ { if($_POST['question']) { + if(!ereg("^[0-9]*$",$_POST['ord'])) + echo notice(i18n("Defaulting non-numeric order value %1 to 0",array($_POST['ord']))); + mysql_query("UPDATE safetyquestions SET question='".mysql_escape_string(stripslashes($_POST['question']))."', `type`='".mysql_escape_string(stripslashes($_POST['type']))."', @@ -137,10 +140,12 @@ echo ""; $q=mysql_query("SELECT * FROM safetyquestions WHERE year='".$config['FAIRYEAR']."' ORDER BY ord"); - echo ""; + echo ""; while($r=mysql_fetch_object($q)) { - echo ""; + echo ""; + echo ""; + echo ""; echo ""; echo ""; echo "
".i18n("Question")."".i18n("Type")."".i18n("Required")."".i18n("Actions")."
".i18n("Ord")."".i18n("Question")."".i18n("Type")."".i18n("Required")."".i18n("Actions")."
$r->question
$r->ord$r->question$r->type$r->required";