forked from science-ation/science-ation
- Might want to check my logic on this one.. but basically, if special awards
are set to "with registration", bypass all date checks. Assume that if they're in the registration, they're allowed to select awards. - If the special award nominations are on "with registration", don't print the dates between which special awards can be selected.
This commit is contained in:
parent
4d56266fec
commit
5d20a0590a
@ -88,15 +88,21 @@ function checkboxclicked(b)
|
||||
echo "<a href=\"register_participants_main.php\"><< ".i18n("Back to Participant Registration Summary")."</a><br />";
|
||||
echo "<br />";
|
||||
|
||||
echo notice(i18n("Special award self-nomination is only available from %1 to %2. Please make sure you complete your nominations between these dates. You may apply to a maximum of %3 special awards.",array($config['dates']['specawardregopen'],$config['dates']['specawardregclose'],$config['maxspecialawardsperproject'])));
|
||||
if($config['specialawardnomination']=="date") {
|
||||
echo notice(i18n("Special award self-nomination is only available from %1 to %2. Please make sure you complete your nominations between these dates.", array($config['dates']['specawardregopen'],$config['dates']['specawardregclose'])));
|
||||
$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)
|
||||
$readonly=false;
|
||||
else
|
||||
$readonly=true;
|
||||
} else {
|
||||
/* Never make the awards readonly, when registration closes, so do the awards */
|
||||
$readonly = false;
|
||||
}
|
||||
echo notice(i18n("You may apply to a maximum of %1 special awards.",array($config['maxspecialawardsperproject'])));
|
||||
|
||||
$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)
|
||||
$readonly=false;
|
||||
else
|
||||
$readonly=true;
|
||||
|
||||
if($_POST['action']=="save")
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user