diff --git a/admin/user_list.php b/admin/user_list.php index e409491..b85e39a 100644 --- a/admin/user_list.php +++ b/admin/user_list.php @@ -32,7 +32,7 @@ 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'; + $show_year = ($_GET['show_year'] == 'current') ? 'current' : 'all'; $uid = intval($_GET['uid']); @@ -99,7 +99,7 @@ function neweditor() "; - echo "- ".i18n('Hide Display Options').""; + echo "- ".i18n('Hide Display Options').""; echo "
"; @@ -178,11 +178,12 @@ function neweditor() } if($show_year == 'current') - $where_year = "AND year={$config['FAIRYEAR']}"; + $having_year = "AND MAX(`users`.`year`)={$config['FAIRYEAR']}"; echo ""; + $querystr="SELECT - * + *, MAX(`users`.`year`) as maxyear FROM users LEFT JOIN `users_committee` ON `users_committee`.`users_id`=`users`.`id` @@ -190,9 +191,10 @@ function neweditor() LEFT JOIN `users_volunteer` ON `users_volunteer`.`users_id`=`users`.`id` LEFT JOIN `users_fair` ON `users_fair`.`users_id`=`users`.`id` LEFT JOIN `users_sponsor` ON `users_sponsor`.`users_id`=`users`.`id` - WHERE + GROUP BY uid + HAVING users.deleted='no' - $where_year + $having_year $where_types $where_complete ORDER BY