diff --git a/admin/user_list.php b/admin/user_list.php index 7dd36a96..54790486 100644 --- a/admin/user_list.php +++ b/admin/user_list.php @@ -27,6 +27,24 @@ user_auth_required('committee', 'admin'); include "judges.inc.php"; + $show_types = $_GET['show_types']; + if(user_valid_type($show_types) == false) $show_types = array('judge'); + + $show_complete = ($_GET['show_complete'] == 'yes') ? 'yes' : 'no'; + $show_year = ($_GET['show_year'] == 'all') ? 'all' : 'current'; + + $uid = intval($_GET['uid']); + + if($_GET['action']=='remove') { + if(!$uid) { + echo "Invalid uid for delete"; + exit; + } + user_delete($uid); + message_push(happy(i18n('User deleted.'))); + + } + send_header("User Editor", array('Committee Main' => 'committee_main.php', 'Administration' => 'admin/index.php') @@ -36,10 +54,7 @@ function openeditor(id) { - if(id) - currentid=id; -/* else - currentid=document.forms.judges["judgelist[]"].options[document.forms.judges["judgelist[]"].selectedIndex].value;*/ + if(id) currentid=id; window.open("user_editor_window.php?id="+currentid,"User Editor","location=no,menubar=no,directories=no,toolbar=no,width=770,height=500,scrollbars=yes"); return false; @@ -61,25 +76,6 @@ function toggleoptions() - $show_types = $_GET['show_types']; - if(user_valid_type($show_types) == false) { - $show_types = array('judge'); - } - - $show_complete = ($_GET['show_complete'] == 'yes') ? 'yes' : 'no'; - $show_year = ($_GET['show_year'] == 'all') ? 'all' : 'current'; - - $uid = intval($_GET['uid']); - - if($_GET['action']=='remove') { - if(!$uid) { - echo "Invalid uid for delete"; - exit; - } - user_delete($uid); - } - - echo "