make showing the winners link optional

This commit is contained in:
justin 2010-07-13 20:18:50 +00:00
parent 6eab783fb6
commit 45e1e79072
4 changed files with 11 additions and 2 deletions

View File

@ -630,7 +630,9 @@ if(is_array($nav)) {
}
*/
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/committees.php\">".i18n("Committee").'</a></li>';
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/winners.php\">".i18n("Winners").'</a></li>';
if($config['show_winners'] == "yes") {
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/winners.php\">".i18n("Winners").'</a></li>';
}
?>
<?

View File

@ -1 +1 @@
199
200

1
db/db.update.200.sql Normal file
View File

@ -0,0 +1 @@
INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `section`, `conferencetypes`, `conferences_id`, `year`) VALUES ( 'show_winners', 'yes', 'Global', 'yesno', '', '900', 'Display Winners', 'conference', 'sciencefair,scienceolympics', '-1', '-1')

View File

@ -25,6 +25,12 @@
require("common.inc.php");
require("projects.inc.php");
if($config['show_winners'] == "no") {
header("HTTP/1.0 404 Not Found");
echo "<h2>Requested URL not found.";
exit;
}
send_header("Winners");
if($_GET['edit']) $edit=$_GET['edit'];