forked from science-ation/science-ation
Make sure $config['dates']['postparticipants'] is valid before relying on it.
This commit is contained in:
parent
59aade5f0c
commit
ea55978aa9
@ -415,13 +415,18 @@ echo "<h1>".i18n($config['fairname'])."</h1>";
|
|||||||
//then we will show the registration confirmation page as a link in the menu,
|
//then we will show the registration confirmation page as a link in the menu,
|
||||||
$registrationconfirmationlink="";
|
$registrationconfirmationlink="";
|
||||||
|
|
||||||
$q=mysql_query("SELECT (NOW()>'".$config['dates']['postparticipants']."') AS test");
|
//only display it if a date is set to begin with.
|
||||||
$r=mysql_fetch_object($q);
|
if($config['dates']['postparticipants'] && $config['dates']['postparticipants']!="0000-00-00 00:00:00")
|
||||||
if($r->test==1)
|
|
||||||
{
|
{
|
||||||
$registrationconfirmationlink="<li><a href=\"".$config['SFIABDIRECTORY']."/confirmed_participants.php\">".i18n("Confirmed Participants")."</a></li>";
|
$q=mysql_query("SELECT (NOW()>'".$config['dates']['postparticipants']."') AS test");
|
||||||
|
$r=mysql_fetch_object($q);
|
||||||
|
if($r->test==1)
|
||||||
|
{
|
||||||
|
$registrationconfirmationlink="<li><a href=\"".$config['SFIABDIRECTORY']."/confirmed_participants.php\">".i18n("Confirmed Participants")."</a></li>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div id="left">
|
<div id="left">
|
||||||
<ul class="mainnav">
|
<ul class="mainnav">
|
||||||
<li><a href="<?=$config['SFIABDIRECTORY']?>/index.php"><?=i18n("Home Page")?></a></li><li><a href="<?=$config['SFIABDIRECTORY']?>/important_dates.php"><?=i18n("Important Dates")?></a></li><li><a href="<?=$config['SFIABDIRECTORY']?>/register_participants.php"><?=i18n("Participant Registration")?></a></li><?=$registrationconfirmationlink?><li><a href="<?=$config['SFIABDIRECTORY']?>/register_judges.php"><?=i18n("Judges Registration")?></a></li><li><a href="<?=$config['SFIABDIRECTORY']?>/committees.php"><?=i18n("Committee")?></a></li><li><a href="<?=$config['SFIABDIRECTORY']?>/winners.php"><?=i18n("Winners")?></a></li></ul>
|
<li><a href="<?=$config['SFIABDIRECTORY']?>/index.php"><?=i18n("Home Page")?></a></li><li><a href="<?=$config['SFIABDIRECTORY']?>/important_dates.php"><?=i18n("Important Dates")?></a></li><li><a href="<?=$config['SFIABDIRECTORY']?>/register_participants.php"><?=i18n("Participant Registration")?></a></li><?=$registrationconfirmationlink?><li><a href="<?=$config['SFIABDIRECTORY']?>/register_judges.php"><?=i18n("Judges Registration")?></a></li><li><a href="<?=$config['SFIABDIRECTORY']?>/committees.php"><?=i18n("Committee")?></a></li><li><a href="<?=$config['SFIABDIRECTORY']?>/winners.php"><?=i18n("Winners")?></a></li></ul>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user