diff --git a/admin/schools.php b/admin/schools.php
index 3259cdf1..b6de14c5 100644
--- a/admin/schools.php
+++ b/admin/schools.php
@@ -37,10 +37,12 @@
else
$id=$_POST['id'];
+ $atrisk = $_POST['atrisk'] == 'yes' ? 'yes' : 'no';
$exec="UPDATE schools SET ".
"school='".mysql_escape_string(stripslashes($_POST['school']))."', ".
"schoollang='".mysql_escape_string(stripslashes($_POST['schoollang']))."', ".
+ "designate='".mysql_escape_string(stripslashes($_POST['schooldesignate']))."', ".
"schoollevel='".mysql_escape_string(stripslashes($_POST['schoollevel']))."', ".
"school='".mysql_escape_string(stripslashes($_POST['school']))."', ".
"board='".mysql_escape_string(stripslashes($_POST['board']))."', ".
@@ -59,7 +61,8 @@
"registration_password='".mysql_escape_string(stripslashes($_POST['registration_password']))."', ".
"projectlimit='".mysql_escape_string(stripslashes($_POST['projectlimit']))."', ".
"projectlimitper='".mysql_escape_string(stripslashes($_POST['projectlimitper']))."', ".
- "accesscode='".mysql_escape_string(stripslashes($_POST['accesscode']))."' ".
+ "accesscode='".mysql_escape_string(stripslashes($_POST['accesscode']))."', ".
+ "atrisk='$atrisk' ".
"WHERE id='$id'";
mysql_query($exec);
echo mysql_error();
@@ -134,6 +137,16 @@
echo "";
echo "\n";
+ echo "
".i18n("School Designation")." | ";
+ $des = array('' => 'Choose', 'public' => 'Public',
+ 'independent' => 'Independent/Private',
+ 'home' => 'Home School');
+ echo " |
\n";
echo "".i18n("School Level")." | schoollevel)."\" size=\"32\" maxlength=\"32\" /> |
\n";
echo "".i18n("School Board")." | board)."\" size=\"60\" maxlength=\"64\" /> |
\n";
echo "".i18n("School District")." | district)."\" size=\"60\" maxlength=\"64\" /> |
\n";
@@ -181,6 +194,10 @@
}
+ echo " ".i18n("Demographic Information")." |
";
+
+ $ch = ($r->atrisk) == 'yes' ? 'checked="checked"' : '';
+ echo " | ".i18n("Inner City or At-Risk school")." |
\n";
echo " |
";
echo " |
\n";
diff --git a/db/db.code.version.txt b/db/db.code.version.txt
index d136d6a7..0a3e7b04 100644
--- a/db/db.code.version.txt
+++ b/db/db.code.version.txt
@@ -1 +1 @@
-125
+126
diff --git a/db/db.update.126.sql b/db/db.update.126.sql
new file mode 100644
index 00000000..2dfffa2c
--- /dev/null
+++ b/db/db.update.126.sql
@@ -0,0 +1,71 @@
+CREATE TABLE `fairs_stats` (
+ `id` int(11) NOT NULL auto_increment,
+ `users_uid` int(11) NOT NULL default '0',
+ `year` int(11) NOT NULL default '0',
+ `start_date` date NOT NULL default '0000-00-00',
+ `end_date` date NOT NULL default '0000-00-00',
+ `address` text NOT NULL,
+ `budget` float NOT NULL default '0',
+ `ysf_affiliation_complete` enum('Y','N') NOT NULL default 'Y',
+ `charity` tinytext NOT NULL,
+ `male_1` int(11) NOT NULL default '0',
+ `male_4` int(11) NOT NULL default '0',
+ `male_7` int(11) NOT NULL default '0',
+ `male_9` int(11) NOT NULL default '0',
+ `male_11` int(11) NOT NULL default '0',
+ `female_1` int(11) NOT NULL default '0',
+ `female_4` int(11) NOT NULL default '0',
+ `female_7` int(11) NOT NULL default '0',
+ `female_9` int(11) NOT NULL default '0',
+ `female_11` int(11) NOT NULL default '0',
+ `projects_1` int(11) NOT NULL default '0',
+ `projects_4` int(11) NOT NULL default '0',
+ `projects_7` int(11) NOT NULL default '0',
+ `projects_9` int(11) NOT NULL default '0',
+ `projects_11` int(11) NOT NULL default '0',
+ `publicschools` int(11) NOT NULL default '0',
+ `privateschools` int(11) NOT NULL default '0',
+ `schooldistricts` int(11) NOT NULL default '0',
+ `studentsvisiting` int(11) NOT NULL default '0',
+ `publicvisiting` int(11) NOT NULL default '0',
+ `firstnations` int(11) NOT NULL default '0',
+ `innercity` int(11) NOT NULL default '0',
+ `teacherssupporting` int(11) NOT NULL default '0',
+ `increasedinterest` int(11) NOT NULL default '0',
+ `consideringcareer` int(11) NOT NULL default '0',
+ `next_chair_name` varchar(128) NOT NULL default '',
+ `next_chairemail` varchar(64) NOT NULL default '',
+ `next_chair_hphone` varchar(32) NOT NULL default '',
+ `next_chair_bphone` varchar(32) NOT NULL default '',
+ `next_chair_fax` varchar(32) NOT NULL default '',
+ `scholarships` text NOT NULL,
+ `delegate1` varchar(64) NOT NULL default '',
+ `delegate2` varchar(64) NOT NULL default '',
+ `delegate3` varchar(64) NOT NULL default '',
+ `delegate4` varchar(64) NOT NULL default '',
+ `delegate1_email` tinytext NOT NULL,
+ `delegate2_email` tinytext NOT NULL,
+ `delegate3_email` tinytext NOT NULL,
+ `delegate4_email` tinytext NOT NULL,
+ `delegate1_size` enum('small','medium','large','xlarge') NOT NULL default 'small',
+ `delegate2_size` enum('small','medium','large','xlarge') NOT NULL default 'small',
+ `delegate3_size` enum('small','medium','large','xlarge') NOT NULL default 'small',
+ `delegate4_size` enum('small','medium','large','xlarge') NOT NULL default 'small',
+ PRIMARY KEY (`id`)
+) TYPE=MyISAM ;
+
+ALTER TABLE `schools` ADD `atrisk` ENUM( 'no', 'yes' ) NOT NULL default 'no';
+
+-- Update the designate into '', public, indpendent, and home, more useful for
+-- SFIAB. This pre-conversions are for everyone in BC who imported the science
+-- world school list
+UPDATE schools SET designate='public' WHERE designate='Standard';
+UPDATE schools SET designate='independent' WHERE designate='Independent';
+UPDATE schools SET designate='public' WHERE designate='Alternate';
+UPDATE schools SET designate='public' WHERE designate='PRP';
+UPDATE schools SET designate='public' WHERE designate='Continuing Education';
+UPDATE schools SET designate='public' WHERE designate='Youth Containment Ctr';
+UPDATE schools SET designate='home' WHERE designate='Distributed Learning';
+UPDATE schools SET designate='independent' WHERE designate='Offshore';
+ALTER TABLE `schools` CHANGE `designate` `designate` ENUM( '', 'public', 'independent', 'home' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ;
+