diff --git a/admin/account_list.php b/admin/account_list.php
index 76ba83a..a3caeaf 100644
--- a/admin/account_list.php
+++ b/admin/account_list.php
@@ -34,173 +34,13 @@ if($_POST['show_types'])
require_once('judges.inc.php');
-$user_what = array();
- $query = mysql_query("SELECT `type`, `name` FROM roles");
- while($row = mysql_fetch_assoc($query)){
- $user_what[$row['type']] = $row['name'];
- }
-
- $show_types = $_GET['show_types'];
- if(user_valid_role($show_types) == false) $show_types = array('judge');
-
- $show_complete = ($_GET['show_complete'] == 'yes') ? 'yes' : 'no';
- $show_all = ($_GET['show_all'] == 'yes') ? 'yes' : 'no';
- $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("Account Editor",
+ send_header("Account List",
array('Committee Main' => 'committee_main.php',
'Administration' => 'admin/index.php')
);
-?>
-
-
-
-/*
- echo "
";
-
-
- echo "
".i18n('Add New User')."";
- echo '';
- echo "
";
- echo "
";
- */
-
- /* Grab a list of users */
- $clauses = array();
- $showroles = array();
- foreach($show_types as $t){
- $showroles[] = "type = '$t'";
- }
- if(count($showroles) > 0) $clauses[] = 'user_roles.roles_id IN(SELECT id FROM roles WHERE ' . implode(' OR ', $showroles) . ')';
- if($show_complete == 'yes') $clauses[] = 'user_roles.complete = "yes"';
- if($show_all == 'no') $clauses[] = "users.conferences_id={$conference['id']}";
-
- $querystr =
- "SELECT * FROM accounts ORDER BY username";
+ $querystr = "SELECT * FROM accounts ORDER BY username";
/*
- "SELECT users.*,
- accounts.username,
- accounts.email AS emailaddress,
- user_roles.accounts_id, user_roles.roles_id, user_roles.active, user_roles.complete,
- roles.type,
- conferences.name AS conference_name
- FROM users
- JOIN user_roles ON user_roles.users_id = users.id
- JOIN roles ON user_roles.roles_id=roles.id
- JOIN conferences ON users.conferences_id = conferences.id
- JOIN accounts ON user_roles.accounts_id=accounts.id";
-
- if(count($clauses) > 0){
- $querystr .= " WHERE " . implode(' AND ', $clauses) . " ";
- }
-
- $querystr .= "
- ORDER BY lastname ASC, firstname ASC, conferences_id DESC ";
-
-*/
-
-/*
echo $querystr;
echo "
\n";
echo "
\n";
@@ -215,10 +55,12 @@ function neweditor()
echo "";
echo "";
echo "";
+ echo " ".i18n("Account ID")." | ";
echo " ".i18n("Username")." | ";
echo " ".i18n("Email Address")." | ";
echo " ".i18n("Pending Email")." | ";
- echo " ".i18n("Actions")." | ";
+ echo " ".i18n("Roles")." | ";
+// echo " ".i18n("Actions")." | ";
echo "
";
echo "";
echo "";
@@ -248,7 +90,27 @@ function neweditor()
echo "";
echo $r['pendingemail'];
echo " | ";
- echo " | ";
+ echo "";
+ $u=user_load_by_accounts_id($r['id']);
+ if($u) {
+ echo "";
+ foreach($u['roles'] AS $r=>$rd) {
+ echo "";
+ echo $rd['name'];
+ echo " | ";
+ if($rd['active']=="yes"){ $cl="happy"; $cls=""; } else { $cl="error"; $cls="not "; }
+ echo "{$cls}active | ";
+ if($rd['complete']=="yes"){ $cl="happy"; $cls=""; } else { $cl="error"; $cls="not "; }
+ echo "{$cls}complete | ";
+ echo " ";
+ }
+ echo " ";
+ }
+ else {
+ echo "no roles";
+ }
+ echo " | ";
+ echo "";
}
echo "";
echo "
";