diff options
author | Philip Häusler <msquare@notrademark.de> | 2012-12-12 23:13:19 +0100 |
---|---|---|
committer | Philip Häusler <msquare@notrademark.de> | 2012-12-12 23:13:19 +0100 |
commit | ad9695573f7413df8e8ad88961fce068c2a42a56 (patch) | |
tree | 61e5e709c1978a411fda46099c922800c468c796 | |
parent | 95880bb7d6368e5b82b8d42db1a7e59532dbf57c (diff) |
#89 profile link in admin user angeltypes
-rw-r--r-- | includes/pages/admin_user_angeltypes.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/includes/pages/admin_user_angeltypes.php b/includes/pages/admin_user_angeltypes.php index 5b00fe04..b22178e0 100644 --- a/includes/pages/admin_user_angeltypes.php +++ b/includes/pages/admin_user_angeltypes.php @@ -5,6 +5,8 @@ * Auf dieser Seite können Erzengel Engeltypen für bestimmte Nutzer freischalten, z.B. nachdem diese für die Aufgabe geschult wurden. */ function admin_user_angeltypes() { + global $privileges; + if (isset ($_REQUEST['confirm']) && test_request_int('confirm') && sql_num_query("SELECT * FROM `UserAngelTypes` WHERE `id`=" . sql_escape($_REQUEST['confirm']) . " AND `confirm_user_id` IS NULL") > 0) { sql_query("UPDATE `UserAngelTypes` SET `confirm_user_id`=" . sql_escape($_SESSION['uid']) . " WHERE `id`=" . sql_escape($_REQUEST['confirm']) . " LIMIT 1"); @@ -19,9 +21,11 @@ function admin_user_angeltypes() { redirect(page_link_to('admin_user_angeltypes')); } - $users_source = sql_select("SELECT `UserAngelTypes`.`id`, `AngelTypes`.`name`, `User`.`Nick` FROM `UserAngelTypes` JOIN `AngelTypes` ON `UserAngelTypes`.`angeltype_id`=`AngelTypes`.`id` JOIN `User` ON `UserAngelTypes`.`user_id`=`User`.`UID` WHERE `AngelTypes`.`restricted`=1 AND `UserAngelTypes`.`confirm_user_id` IS NULL ORDER BY `AngelTypes`.`name`, `User`.`Nick`"); + $users_source = sql_select("SELECT `UserAngelTypes`.`id`, `AngelTypes`.`name`, `User`.`Nick`, `User`.`UID` FROM `UserAngelTypes` JOIN `AngelTypes` ON `UserAngelTypes`.`angeltype_id`=`AngelTypes`.`id` JOIN `User` ON `UserAngelTypes`.`user_id`=`User`.`UID` WHERE `AngelTypes`.`restricted`=1 AND `UserAngelTypes`.`confirm_user_id` IS NULL ORDER BY `AngelTypes`.`name`, `User`.`Nick`"); $users = array (); foreach ($users_source as $user) { + if(in_array("admin_user", $privileges)) + $user['Nick'] = '<a href="' . page_link_to('admin_user') . '&id=' . $user['UID'] . '">' . $user['Nick'] . '</a>'; $user['actions'] = '<a href="' . page_link_to('admin_user_angeltypes') . '&confirm=' . $user['id'] . '">confirm</a>'; $user['actions'] .= ' | <a href="' . page_link_to('admin_user_angeltypes') . '&discard=' . $user['id'] . '">discard</a>'; $users[] = $user; |