echo"<a href=\"index.php\"><< ".i18n("Back to Administration")."</a>\n";
echo"<a href=\"judges.php\"><< ".i18n("Back to Judges")."</a>\n";
if($_GET['edit'])$edit=$_GET['edit'];
if($_POST['edit'])$edit=$_POST['edit'];
if($_GET['action'])$action=$_GET['action'];
if($_POST['action'])$action=$_POST['action'];
$q=mysql_query("SELECT * FROM judges_schedulerconfig WHERE year='-1'");
while($r=mysql_fetch_object($q))
{
mysql_query("INSERT INTO judges_schedulerconfig (var,val,description,year) VALUES (
'".mysql_escape_string($r->var)."',
'".mysql_escape_string($r->val)."',
'".mysql_escape_string($r->description)."',
'".$config['FAIRYEAR']."')");
}
if($_POST['action']=="save")
{
if($_POST['saveconfig'])
{
foreach($_POST['saveconfig']as$key=>$val)
{
mysql_query("UPDATE judges_schedulerconfig SET val='".mysql_escape_string(stripslashes($val))."' WHERE year='".$config['FAIRYEAR']."' AND var='$key'");
echoi18n("Everything looks in order, we're ready to create the divisional awards judging teams. Click 'Create Divisional Awards Judging Teams' below to start the scheduler. Please be patient as it may take 20-30 seconds to find an optimal solution to the judging team assignments");