Allow turning off the special awards self-nominations.

This commit is contained in:
james 2006-01-16 18:38:32 +00:00
parent 9881ddb968
commit 0076c5f360
2 changed files with 18 additions and 11 deletions

1
db.update.12.sql Normal file
View File

@ -0,0 +1 @@
UPDATE `config` SET `description` = 'Self nominations for special awards are due either with registration or on a specific date. If "date" is used, it must be configured under "Important Dates" section. If you do not wish to allow students to self-nominate for special awards, set to "none" (none|date|registration)' WHERE `var` = 'specialawardnomination';

View File

@ -176,26 +176,32 @@ echo "<table><tr><td>";
echo "</td>";
echo "<td align=\"left\" width=\"50%\">";
if($config['specawardnom']!="none")
if($config['specialawardnomination']!="none")
{
echo "<table class=\"summarytable\">";
echo "<tr><th>".i18n("Special Award Nominations")."</th></tr>";
if(registrationFormsReceived())
{
$q=mysql_query("SELECT (NOW()>'".$config['dates']['specawardregopen']."' AND NOW()<'".$config['dates']['specawardregclose']."') AS datecheck");
$r=mysql_fetch_object($q);
//this will return 1 if its between the dates, 0 otherwise.
if($r->datecheck==1)
if($config['specialawardnomination']=="date")
{
$q=mysql_query("SELECT (NOW()>'".$config['dates']['specawardregopen']."' AND NOW()<'".$config['dates']['specawardregclose']."') AS datecheck");
$r=mysql_fetch_object($q);
//this will return 1 if its between the dates, 0 otherwise.
if($r->datecheck==1)
{
echo "<tr><td><a href=\"register_participants_spawards.php\">".i18n("Self-nominate for special awards")."</a></td></tr>";
}
else
{
echo "<tr><td>".error(i18n("Special award self-nomination is only available from %1 to %2",array($config['dates']['specawardregopen'],$config['dates']['specawardregclose'])),"inline")."</td></tr>";
}
}
else if($config['specialawardnomination']=="registration")
{
echo "<tr><td><a href=\"register_participants_spawards.php\">".i18n("Self-nominate for special awards")."</a></td></tr>";
}
else
{
echo "<tr><td>".error(i18n("Special award self-nomination is only available from %1 to %2",array($config['dates']['specawardregopen'],$config['dates']['specawardregclose'])),"inline")."</td></tr>";
}
$q=mysql_query("SELECT * FROM projects WHERE registrations_id='".$_SESSION['registration_id']."'");
$project=mysql_fetch_object($q);