forked from science-ation/science-ation
Add a check about rolling over the fair year, which will begin to show a warning 4 months after the fair date until the year is rolled over properly
This commit is contained in:
parent
f6272d7bd6
commit
65e408ce2a
@ -492,6 +492,14 @@ if(count($config['languages'])>1)
|
||||
</td><td>
|
||||
<div id="main">
|
||||
<?
|
||||
|
||||
if(auth_has_access("config") || auth_has_access("admin"))
|
||||
committee_warnings();
|
||||
if(auth_has_access("config"))
|
||||
config_warnings();
|
||||
if(auth_has_access("admin"))
|
||||
admin_warnings();
|
||||
|
||||
echo "<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr><td>";
|
||||
if($title)
|
||||
echo "<h2>".i18n($title)."</h2>";
|
||||
@ -843,6 +851,36 @@ function generatePassword()
|
||||
}
|
||||
|
||||
|
||||
//config specific warning
|
||||
function config_warnings()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//admin specific warnings
|
||||
function admin_warnings()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//warnings to show to both config and/or admin people
|
||||
function committee_warnings()
|
||||
{
|
||||
global $config;
|
||||
//it is vital that each year the system be rolled over before we start it again
|
||||
//we should do this, say, 4 months after the FAIRDATE, so its soon enough that they should see
|
||||
//the message as soon as they login to start preparing for hte new year, but not too late to do it
|
||||
//properly :)
|
||||
|
||||
$q=mysql_query("SELECT DATE_ADD('".$config['dates']['fairdate']."', INTERVAL 4 MONTH) < NOW() AS rollovercheck");
|
||||
$r=mysql_fetch_object($q);
|
||||
if($r->rollovercheck)
|
||||
{
|
||||
echo error(i18n("It has been more than 4 months since your fair. In order to prepare the system for the next year's fair, you should go to the SFIAB Configuration page, and click on 'Rollover Fair Year'. Do not start updating the system with new information until the year has been properly rolled over."));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$CWSFDivisions=array(
|
||||
1=>"Biotechnology & Pharmaceutical Sciences",
|
||||
2=>"Computing & Information Technology",
|
||||
|
Loading…
Reference in New Issue
Block a user