From c086e7e0bbc26cab34729e5e545399f2cbcb97da Mon Sep 17 00:00:00 2001 From: james Date: Wed, 23 Jun 2010 21:18:06 +0000 Subject: [PATCH] refactor config into config & super pages, 'config' page is now 'conference config' specifically for the conference, all non-conference related tasks are moved to the superuser page --- committee.inc.php | 12 ++++-------- committee_main.php | 6 +++--- common.inc.php | 3 +++ config/dates.php | 2 +- config/images.php | 13 ++++--------- config/index.php | 24 +----------------------- config/variables.php | 2 +- {config => super}/backuprestore.php | 8 ++++---- super/conferences.php | 2 +- super/index.php | 24 ++++++++++++++++++++++-- {config => super}/languagepacks.php | 4 ++-- {config => super}/rollover.php | 4 ++-- {config => super}/rolloverfiscal.php | 6 ++++++ {config => super}/systemvariables.php | 4 ++-- {config => super}/versionchecker.php | 4 ++-- user_login.php | 2 ++ 16 files changed, 60 insertions(+), 60 deletions(-) rename {config => super}/backuprestore.php (97%) rename {config => super}/languagepacks.php (97%) rename {config => super}/rollover.php (99%) rename {config => super}/rolloverfiscal.php (92%) rename {config => super}/systemvariables.php (96%) rename {config => super}/versionchecker.php (96%) diff --git a/committee.inc.php b/committee.inc.php index 74578d5..86f07af 100644 --- a/committee.inc.php +++ b/committee.inc.php @@ -1,14 +1,11 @@ diff --git a/committee_main.php b/committee_main.php index 4eb2ddc..e4e9e1d 100644 --- a/committee_main.php +++ b/committee_main.php @@ -40,10 +40,10 @@ if(isset($_SESSION['conferenceid'])) { echo " "; if(committee_auth_has_access('config')) { - echo " ".theme_icon("configuration")."
".i18n("Configuration")."
"; + echo " ".theme_icon("configuration")."
".i18n("Conference Configuration")."
"; } if(committee_auth_has_access('admin')) { - echo " ".theme_icon("administration")."
".i18n("Administration")."
"; + echo " ".theme_icon("administration")."
".i18n("Conference Administration")."
"; echo " ".theme_icon("print/export_reports")."
".i18n("My Reports (View/Print/Edit)")."
"; } echo " \n"; @@ -61,7 +61,7 @@ if(committee_auth_has_access('super')) { echo "
"; echo "
"; - echo " Science In A Box Super Configuration
"; + echo " System Setup (Superuser)
"; } diff --git a/common.inc.php b/common.inc.php index d319ce2..af30e4a 100644 --- a/common.inc.php +++ b/common.inc.php @@ -588,6 +588,9 @@ if($_SESSION['users_type'] == 'committee') { if(committee_auth_has_access("config")){ echo "
  • ".i18n("Configuration").'
  • '; } + if(committee_auth_has_access("super")){ + echo "
  • ".i18n("System Setup").'
  • '; + } echo "
  • ".i18n("Logout").'
  • '; } else if($_SESSION['users_type']=="judge") { echo "
  • ".i18n("My Profile").'
  • '; diff --git a/config/dates.php b/config/dates.php index 38c34fa..4fa2746 100644 --- a/config/dates.php +++ b/config/dates.php @@ -27,7 +27,7 @@ user_auth_required('committee', 'config'); send_header("Dates", array('Committee Main' => 'committee_main.php', - 'SFIAB Configuration' => 'config/index.php') + 'Conference Configuration' => 'config/index.php') ,"important_dates" ); diff --git a/config/images.php b/config/images.php index d0970fa..7f74528 100644 --- a/config/images.php +++ b/config/images.php @@ -25,18 +25,13 @@ require_once('../common.inc.php'); require_once('../user.inc.php'); user_auth_required('committee', 'config'); -if($conference['id']) { - $title=$conference['name']." Logo Image"; - $cstr=$conference['id']."-"; -} -else { - $title="Fair Logo Image"; - $cstr=""; -} + +$title=$conference['name']." Logo Image"; +$cstr=$conference['id']."-"; send_header($title, array('Committee Main' => 'committee_main.php', - 'Configuration' => 'config/index.php'), + 'Conference Configuration' => 'config/index.php'), "images"); if($_POST['action']=="addimage") { diff --git a/config/index.php b/config/index.php index 0ea0ae9..6a9e995 100644 --- a/config/index.php +++ b/config/index.php @@ -26,7 +26,7 @@ require_once("../user.inc.php"); user_auth_required('committee', 'config'); - send_header("Configuration", + send_header("Conference Configuration", array('Committee Main' => 'committee_main.php') ,"configuration" ); @@ -34,7 +34,6 @@ if($conference['type']=='scienceolympics') { echo ""; echo " "; - echo " "; echo " "; echo " "; //echo " "; @@ -46,7 +45,6 @@ else { echo "
    ".theme_icon("configuration_variables")."
    ".i18n("System Configuration Variables")."
    ".theme_icon("configuration_variables")."
    ".i18n("Conference Configuration Variables")."
    ".theme_icon("important_dates")."
    ".i18n("Important Dates")."
    ".theme_icon("project_age_categories")."
    ".i18n("Age Categories")."
    "; echo " "; - echo " "; echo " "; echo " "; echo " "; @@ -67,25 +65,5 @@ echo "
    ".theme_icon("configuration_variables")."
    ".i18n("System Configuration Variables")."
    ".theme_icon("configuration_variables")."
    ".i18n("Conference Configuration Variables")."
    ".theme_icon("important_dates")."
    ".i18n("Important Dates")."
    ".theme_icon("project_age_categories")."
    ".i18n("Project Age Categories")."
    \n"; } - echo "
    "; - echo ""; - echo " "; - echo " "; - echo " "; - echo " \n"; - echo " \n"; - echo " "; - echo "
    ".theme_icon("language_pack_installer")."
    ".i18n("Language Pack Installer")."
    ".theme_icon("new_version_checker")."
    ".i18n("New Version Checker")."
    \n"; - echo "
    "; - echo ""; - echo " "; - echo " "; - echo " "; - echo " "; - echo " \n"; - echo " \n"; - echo " "; - echo "
    ".theme_icon("rollover_fair_year")."
    ".i18n("Rollover Fair Year")."
    ".theme_icon("rollover_fiscal_year")."
    ".i18n("Rollover Fiscal Year")."
    ".theme_icon("backup_restore")."
    ".i18n("Database Backup/Restore")."
    \n"; - send_footer(); ?> diff --git a/config/variables.php b/config/variables.php index 8f1eb6f..f087a0b 100644 --- a/config/variables.php +++ b/config/variables.php @@ -55,7 +55,7 @@ send_header("Conference Configuration Variables", array('Committee Main' => 'committee_main.php', - 'Configuration' => 'config/index.php') + 'Conference Configuration' => 'config/index.php') ,"configuration_variables" ); diff --git a/config/backuprestore.php b/super/backuprestore.php similarity index 97% rename from config/backuprestore.php rename to super/backuprestore.php index bd7909c..9210613 100644 --- a/config/backuprestore.php +++ b/super/backuprestore.php @@ -23,7 +23,7 @@ 'committee_main.php', - 'SFIAB Configuration' => 'config/index.php') + 'System Setup' => 'super/index.php') ,"backup_restore" ); echo i18n("Processing file: %1",array($_FILES['restore']['name']))."
    \n"; @@ -148,7 +148,7 @@ else if($_POST['action']=="restore") { else if($_POST['action']=="restoreproceed") { echo send_header("Database Backup/Restore", array('Committee Main' => 'committee_main.php', - 'SFIAB Configuration' => 'config/index.php') + 'System Setup' => 'super/index.php') ,"backup_restore" ); @@ -200,7 +200,7 @@ else { echo send_header("Database Backup/Restore", array('Committee Main' => 'committee_main.php', - 'SFIAB Configuration' => 'config/index.php') + 'System Setup' => 'super/index.php') ,"backup_restore" ); diff --git a/super/conferences.php b/super/conferences.php index 4a0f5c9..4705523 100644 --- a/super/conferences.php +++ b/super/conferences.php @@ -28,7 +28,7 @@ send_header("Conferences Setup", array('Committee Main' => 'committee_main.php', - 'Science In A Box Super Configuration' => '/super/index.php') + 'System Setup' => '/super/index.php') ,"configuration" ); ?> diff --git a/super/index.php b/super/index.php index 1c7b79c..c7ddd4b 100644 --- a/super/index.php +++ b/super/index.php @@ -31,15 +31,35 @@ ,"configuration" ); - echo ""; echo " "; + echo " "; echo " "; echo " \n"; echo " \n"; - echo " \n"; echo " "; echo "
    ".theme_icon("configuration_variables")."
    ".i18n("System Configuration Variables")."
    ".theme_icon("conferences")."
    ".i18n("Conferences Setup")."
    \n"; + echo "
    "; + echo ""; + echo " "; + echo " "; + echo " "; + echo " \n"; + echo " \n"; + echo " "; + echo "
    ".theme_icon("language_pack_installer")."
    ".i18n("Language Pack Installer")."
    ".theme_icon("new_version_checker")."
    ".i18n("New Version Checker")."
    \n"; + echo "
    "; + echo ""; + echo " "; + echo " "; + echo " "; + echo " "; + echo " \n"; + echo " \n"; + echo " "; + echo "
    ".theme_icon("rollover_fair_year")."
    ".i18n("Rollover Fair Year")."
    ".theme_icon("rollover_fiscal_year")."
    ".i18n("Rollover Fiscal Year")."
    ".theme_icon("backup_restore")."
    ".i18n("Database Backup/Restore")."
    \n"; + + send_footer(); ?> diff --git a/config/languagepacks.php b/super/languagepacks.php similarity index 97% rename from config/languagepacks.php rename to super/languagepacks.php index ada2997..93b8d10 100644 --- a/config/languagepacks.php +++ b/super/languagepacks.php @@ -24,10 +24,10 @@ 'committee_main.php', - 'SFIAB Configuration' => 'config/index.php') + 'System Setup' => 'super/index.php') ,"language_pack_installer" ); diff --git a/config/rollover.php b/super/rollover.php similarity index 99% rename from config/rollover.php rename to super/rollover.php index 71d4a1c..e49a13c 100644 --- a/config/rollover.php +++ b/super/rollover.php @@ -25,10 +25,10 @@ require("../common.inc.php"); require_once("../user.inc.php"); require_once("../config_editor.inc.php"); - user_auth_required('committee', 'config'); + user_auth_required('committee', 'super'); send_header("Year Rollover", array('Committee Main' => 'committee_main.php', - 'SFIAB Configuration' => 'config/index.php') + 'System Setup' => 'super/index.php') ,"rollover_fair_year" ); ?> diff --git a/config/rolloverfiscal.php b/super/rolloverfiscal.php similarity index 92% rename from config/rolloverfiscal.php rename to super/rolloverfiscal.php index c323b51..531ff71 100644 --- a/config/rolloverfiscal.php +++ b/super/rolloverfiscal.php @@ -1,6 +1,12 @@ "; roll($currentfairyear, $newfairyear, "fundraising", array("type","name","description","system","goal")); diff --git a/config/systemvariables.php b/super/systemvariables.php similarity index 96% rename from config/systemvariables.php rename to super/systemvariables.php index 9717086..eb9909c 100644 --- a/config/systemvariables.php +++ b/super/systemvariables.php @@ -25,7 +25,7 @@ require("../common.inc.php"); require_once("../user.inc.php"); require_once("../config_editor.inc.php"); - user_auth_required('committee', 'config'); + user_auth_required('committee', 'super'); //get the category, and if nothing is chosen, default to Global if($_GET['category']) $category=$_GET['category']; @@ -39,7 +39,7 @@ } send_header("Configuration - System Variables", array('Committee Main' => 'committee_main.php', - 'Configuration' => 'config/index.php') + 'System Setup' => 'config/index.php') ,"configuration_variables" ); diff --git a/config/versionchecker.php b/super/versionchecker.php similarity index 96% rename from config/versionchecker.php rename to super/versionchecker.php index f500e27..e71c797 100644 --- a/config/versionchecker.php +++ b/super/versionchecker.php @@ -24,10 +24,10 @@ 'committee_main.php', - 'SFIAB Configuration' => 'config/index.php') + 'System Setup' => 'super/index.php') ,"new_version_checker" ); diff --git a/user_login.php b/user_login.php index df3b9fa..0474f6d 100644 --- a/user_login.php +++ b/user_login.php @@ -144,10 +144,12 @@ /* Make sure the user we loaded is actually for the current year, if not, * we need to duplicate the user */ +/* if($u['year'] != $config['FAIRYEAR']) { $id = user_dupe($u, $config['FAIRYEAR']); $u = user_load($id); } + */ /* Make sure $type is in their types */ if(!in_array($type, $u['types'])) {