forked from science-ation/science-ation
school management partially updated
This commit is contained in:
parent
5b7f7dca00
commit
7d38b43cfc
@ -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 "<form method=\"post\" action=\"schools.php\">\n";
|
||||
echo "<table class=\"tableview\">";
|
||||
echo "<thead><tr>";
|
||||
echo " <th>".i18n("School")."</th>";
|
||||
echo " <th>".i18n("Participation")."</th>";
|
||||
echo "</tr></thead>\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 "<tr><td>" . $record['school'] . "</td>";
|
||||
echo "<td><label style=\"margin-right: 2em\">";
|
||||
echo '<input type="checkbox" name="' . $record['id'] . '_fairs' . '"';
|
||||
if($record['include_fairs'] == true) echo " CHECKED";
|
||||
echo "> " . i18n("fairs") . "</label>";
|
||||
|
||||
echo "<label>";
|
||||
echo '<input type="checkbox" name="' . $record['id'] . '_olympics' . '"';
|
||||
if($record['include_olympics'] == true) echo " CHECKED";
|
||||
echo "> " . i18n("olympics") . "</label>";
|
||||
echo "</td></tr>";
|
||||
}
|
||||
echo "<tr><td colspan=\"2\" align=\"center\"><input type=\"submit\" /></td></tr>\n";
|
||||
echo "</table>\n";
|
||||
echo '<input type="hidden" name="action" value="save_participation"></input>' . "\n";
|
||||
echo "</form>\n";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -327,6 +375,12 @@
|
||||
echo "<br />";
|
||||
echo "<a onclick=\"return confirmClick('".i18n("Are you sure you want to remove all access codes from all schools?")."')\" href=\"schools.php?action=clearaccesscodes\">".i18n("Remove Access Codes from all schools")."</a>\n";
|
||||
echo "<br />";
|
||||
$q = mysql_fetch_array(mysql_query('SELECT COUNT(DISTINCT(`type`)) as taly FROM conferences'));
|
||||
// if($q['tally'] > 1){
|
||||
echo "<a href=\"schools.php?action=participation\">".i18n("Set SFIAB/SOIAB participation")."</a>\n";
|
||||
echo "<br />";
|
||||
// }
|
||||
|
||||
echo "<table class=\"tableview\">";
|
||||
echo "<thead><tr>";
|
||||
echo " <th>".i18n("School")."</th>";
|
||||
|
@ -1 +1 @@
|
||||
178
|
||||
179
|
||||
|
3
db/db.update.179.sql
Normal file
3
db/db.update.179.sql
Normal file
@ -0,0 +1,3 @@
|
||||
ALTER TABLE `schools`
|
||||
ADD `include_fairs` BOOL NOT NULL DEFAULT TRUE,
|
||||
ADD `include_olympics` BOOL NOT NULL DEFAULT TRUE;
|
Loading…
Reference in New Issue
Block a user