forked from science-ation/science-ation
77 lines
2.2 KiB
PHP
77 lines
2.2 KiB
PHP
|
<?
|
||
|
/*
|
||
|
This file is part of the 'Science Fair In A Box' project
|
||
|
SFIAB Website: http://www.sfiab.ca
|
||
|
|
||
|
Copyright (C) 2007 James Grant <james@lightbox.org>
|
||
|
|
||
|
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");
|
||
|
require_once("../user.inc.php");
|
||
|
user_auth_required('committee', 'admin');
|
||
|
|
||
|
send_header("Download Awards",
|
||
|
array('Committee Main' => 'committee_main.php',
|
||
|
'Administration' => 'admin/index.php',
|
||
|
'Awards Main' => 'admin/awards.php' ));
|
||
|
|
||
|
|
||
|
if($_GET['action']=="check")
|
||
|
{
|
||
|
if(count($_GET['check'])) {
|
||
|
foreach($_GET['check'] AS $ch) {
|
||
|
$q=mysql_query("SELECT * FROM award_sources WHERE id='".intval($ch)."'");
|
||
|
$r=mysql_fetch_object($q);
|
||
|
echo i18n("Checking %1 for awards...",array($r->name));
|
||
|
echo "<br />";
|
||
|
echo "<br />";
|
||
|
|
||
|
|
||
|
//FIXME: do the check!
|
||
|
|
||
|
|
||
|
}
|
||
|
}
|
||
|
else
|
||
|
echo error(i18n("No sources available to check"));
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
$q=mysql_query("SELECT * FROM award_sources ORDER BY name");
|
||
|
echo "<table class=\"tableview\">";
|
||
|
echo "<tr><th>".i18n("Source Name")."</th>";
|
||
|
echo "<th>".i18n("Source Location URL")."</th>";
|
||
|
echo "<th>".i18n("Check")."</th>";
|
||
|
echo "</tr>";
|
||
|
while($r=mysql_fetch_object($q)) {
|
||
|
echo "<tr>";
|
||
|
echo "<td>$r->name</td>\n";
|
||
|
echo "<td>$r->url</td>";
|
||
|
echo "<td align=\"center\"><a href=\"award_download.php?action=check&check[]=$r->id\">".i18n("check")."</a></td>";
|
||
|
echo "</tr>";
|
||
|
$checkurl.="&check[]=$r->id";
|
||
|
}
|
||
|
echo "</table>\n";
|
||
|
echo "<br />";
|
||
|
|
||
|
echo "<a href=\"award_download.php?action=check$checkurl\">".i18n("Check all sources")."</a>";
|
||
|
|
||
|
}
|
||
|
send_footer();
|
||
|
?>
|