From 7d38b43cfce0d3d78e15f6cce5c6fe8177e23bf1 Mon Sep 17 00:00:00 2001 From: jacob Date: Thu, 10 Jun 2010 22:10:20 +0000 Subject: [PATCH] school management partially updated --- admin/schools.php | 54 ++++++++++++++++++++++++++++++++++++++++++ db/db.code.version.txt | 2 +- db/db.update.179.sql | 3 +++ 3 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 db/db.update.179.sql diff --git a/admin/schools.php b/admin/schools.php index da4973d..fe24dc5 100644 --- a/admin/schools.php +++ b/admin/schools.php @@ -146,6 +146,14 @@ else $notice = 'saved'; } + else if($_POST['action'] == "participation") + { + // WRITE ME! + // this needs to list through a list of _POST elements that will have the indicies + // "[school id]_fairs" and "[school id]"_olympics, with true/false values for each. + // they should be written to the "schools" table. + + } if($_GET['action']=="delete" && $_GET['delete']) { @@ -291,6 +299,46 @@ + } + + else if($_GET['action'] == 'participation') + { + send_header( + "Conference Participation", + array( + 'Committee Main' => 'committee_main.php', + 'Administration' => 'admin/index.php', + 'School Management' => 'admin/schools.php' + ), + "participation" + ); + + echo "
\n"; + echo ""; + echo ""; + echo " "; + echo " "; + echo "\n"; + + $query = mysql_query("SELECT id, school, include_fairs, include_olympics FROM schools WHERE year='".$config['FAIRYEAR']."' ORDER BY school"); + while($record = mysql_fetch_array($query)){ + echo ""; + echo ""; + } + echo "\n"; + echo "
".i18n("School")."".i18n("Participation")."
" . $record['school'] . ""; + + echo ""; + echo "
\n"; + echo '' . "\n"; + echo "
\n"; + } else { @@ -327,6 +375,12 @@ echo "
"; echo "".i18n("Remove Access Codes from all schools")."\n"; echo "
"; + $q = mysql_fetch_array(mysql_query('SELECT COUNT(DISTINCT(`type`)) as taly FROM conferences')); +// if($q['tally'] > 1){ + echo "".i18n("Set SFIAB/SOIAB participation")."\n"; + echo "
"; +// } + echo ""; echo ""; echo " "; diff --git a/db/db.code.version.txt b/db/db.code.version.txt index f84d24e..a14f8d5 100644 --- a/db/db.code.version.txt +++ b/db/db.code.version.txt @@ -1 +1 @@ -178 +179 diff --git a/db/db.update.179.sql b/db/db.update.179.sql new file mode 100644 index 0000000..b8cc401 --- /dev/null +++ b/db/db.update.179.sql @@ -0,0 +1,3 @@ +ALTER TABLE `schools` +ADD `include_fairs` BOOL NOT NULL DEFAULT TRUE, +ADD `include_olympics` BOOL NOT NULL DEFAULT TRUE;
".i18n("School")."