From f58e53cdb8b2b9cc34400f03d4fdb2fbd2731d43 Mon Sep 17 00:00:00 2001 From: james Date: Thu, 3 Mar 2011 05:36:36 +0000 Subject: [PATCH] Okay really completely get rid of the role if '{$type}_enable'=='no' Move account_list to main admin page --- admin/index.php | 1 + admin/judges.php | 1 - user_main.php | 16 +++++++++------- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/admin/index.php b/admin/index.php index 559a1b7..3d6f9a5 100644 --- a/admin/index.php +++ b/admin/index.php @@ -38,6 +38,7 @@ echo " ".theme_icon("participant_registration")."
".i18n("Participant Registration")."
"; echo " ".theme_icon("committee_management")."
".i18n("Committee Management")."
"; echo " ".theme_icon("judging_management")."
".i18n("Judging Management")."
"; + echo " ".theme_icon("account_management")."
".i18n("Account Management")."
"; echo " "; if($config['volunteer_enable'] == 'yes') echo "".theme_icon("volunteer_management")."
".i18n("Volunteer Management")."
"; diff --git a/admin/judges.php b/admin/judges.php index 605bb96..0563b5e 100644 --- a/admin/judges.php +++ b/admin/judges.php @@ -33,7 +33,6 @@ ); echo "
"; echo ''.i18n('Judges').''; diff --git a/user_main.php b/user_main.php index c40bc38..4a78104 100644 --- a/user_main.php +++ b/user_main.php @@ -163,13 +163,15 @@ function draw_roles(){ $registered = array(); while($row = mysql_fetch_assoc($q)){ $roleid = $row['type']; - $idx = $roleid . "_registration_type"; - if(array_key_exists($idx, $config)){ - // this is a role that can potentially be registered for - if(is_array($u['roles']) && array_key_exists($row['type'], $u['roles'])){ - $registered[$row['type']] = $row['name']; - }else{ - $available[$row['type']] = $row['name']; + if($config[$roleid.'_enable']!="no") { + $idx = $roleid . "_registration_type"; + if(array_key_exists($idx, $config)){ + // this is a role that can potentially be registered for + if(is_array($u['roles']) && array_key_exists($row['type'], $u['roles'])){ + $registered[$row['type']] = $row['name']; + }else{ + $available[$row['type']] = $row['name']; + } } } }