| 1 | <?PHP |
| 2 | include_once('../slack.php'); |
| 3 | include_once('security.php'); |
| 4 | if ($_COOKIE['level'] == 'user'){ |
| 5 | slack_general('ADMIN: Redirect User Home ('.$_COOKIE['name'].') ('.$_COOKIE['level'].')','md-petition'); |
| 6 | header('Location: user_home.php'); |
| 7 | } |
| 8 | include_once('header.php'); |
| 9 | slack_general('ADMIN: user manager Loaded ('.$_COOKIE['name'].') ('.$_COOKIE['level'].')','md-petition'); |
| 10 | $group_id = $_COOKIE['group_id']; |
| 11 | ?> |
| 12 | <h1>Managers</h1> |
| 13 | <?PHP |
| 14 | $q="SELECT * FROM users where sec_level='manager' and group_id = '$group_id'"; |
| 15 | $r = $petition->query($q); |
| 16 | while($d = mysqli_fetch_array($r)){ |
| 17 | echo "<li>$d[email] $d[name]</li>"; |
| 18 | } |
| 19 | ?> |
| 20 | <h1>Users</h1> |
| 21 | <?PHP |
| 22 | $q="SELECT * FROM users where sec_level='user' and group_id = '$group_id'"; |
| 23 | $r = $petition->query($q); |
| 24 | while($d = mysqli_fetch_array($r)){ |
| 25 | echo "<li>$d[email] $d[name]</li>"; |
| 26 | } |
| 27 | include_once('footer.php'); |