diff --git a/config/index.php b/config/index.php
index caaef9c..b282fd3 100644
--- a/config/index.php
+++ b/config/index.php
@@ -32,8 +32,8 @@
echo "Project Age Categories
";
echo "Project Divisons
";
echo "Project Sub-Divisons
";
-
echo "Page Texts
";
+ echo "Project Safety Questions
";
echo "Images (Fair Logo)
";
echo "
";
echo "Rollover Fair Year
";
diff --git a/config/safetyquestions.php b/config/safetyquestions.php
new file mode 100644
index 0000000..7181034
--- /dev/null
+++ b/config/safetyquestions.php
@@ -0,0 +1,151 @@
+
+/*
+ This file is part of the 'Science Fair In A Box' project
+ SFIAB Website: http://www.sfiab.ca
+
+ Copyright (C) 2005 Sci-Tech Ontario Inc
+ Copyright (C) 2005 James Grant
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation, version 2.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+?>
+
+ require("../common.inc.php");
+ auth_required('config');
+ send_header("Configuration - Safety Questions");
+ echo "<< ".i18n("Back to Configuration")."
";
+
+ if($_POST['action']=="save" && $_POST['save'])
+ {
+ mysql_query("UPDATE safetyquestions SET
+ question='".mysql_escape_string(stripslashes($_POST['question']))."',
+ `type`='".mysql_escape_string(stripslashes($_POST['type']))."',
+ `required`='".mysql_escape_string(stripslashes($_POST['required']))."',
+ ord='".mysql_escape_string(stripslashes($_POST['ord']))."'
+ WHERE id='".$_POST['save']."' AND year='".$config['FAIRYEAR']."'");
+ echo mysql_error();
+
+ echo happy(i18n("Safety question successfully saved"));
+
+ }
+ if($_POST['action']=="new")
+ {
+ mysql_query("INSERT INTO safetyquestions (question,type,required,ord,year) VALUES (
+ '".mysql_escape_string(stripslashes($_POST['question']))."',
+ '".mysql_escape_string(stripslashes($_POST['type']))."',
+ '".mysql_escape_string(stripslashes($_POST['required']))."',
+ '".mysql_escape_string(stripslashes($_POST['ord']))."',
+ '".$config['FAIRYEAR']."'
+ )");
+ echo mysql_error();
+
+ echo happy(i18n("Safety question successfully added"));
+
+
+ }
+
+ if($_GET['action']=="remove" && $_GET['remove'])
+ {
+ mysql_query("DELETE FROM safetyquestions WHERE id='".$_GET['remove']."' AND year='".$config['FAIRYEAR']."'");
+ echo happy(i18n("Safety question successfully removed"));
+
+ }
+
+ if(($_GET['action']=="edit" && $_GET['edit']) || $_GET['action']=="new")
+ {
+ $showform=true;
+ echo "";
+ echo "
";
+ echo "
";
+ }
+ else
+ {
+ }
+ }
+ echo "
";
+ echo "Add new safety question";
+
+ echo "";
+ $q=mysql_query("SELECT * FROM safetyquestions WHERE year='".$config['FAIRYEAR']."' ORDER BY ord");
+ echo "".i18n("Question")." | ".i18n("Type")." | ".i18n("Required")." | ".i18n("Actions")." |
";
+ while($r=mysql_fetch_object($q))
+ {
+ echo "$r->question | ";
+ echo "$r->type | ";
+ echo "$r->required | ";
+ echo "";
+ echo "id\">";
+ echo " ";
+ echo "id\">";
+
+ echo " | ";
+ echo "
";
+
+
+ }
+ echo "
";
+
+ send_footer();
+?>