]> andersk Git - sql-web.git/blob - admin/index.php
3bf6b3c09361c583dcb6b8093747f5c2599fe7e5
[sql-web.git] / admin / index.php
1 <?php
2
3 require_once('../mitsql.cfg.php');
4 require_once('mitsql.lib.php');
5
6 if (!isAdmin()) redirect('main');
7
8 if (isset($i_impersonate)) {
9         impersonate($i_impersonate);
10         redirect('main');
11         exit;
12 }
13
14 $sql = sprintf("SELECT Username,Name,UserId FROM User WHERE bEnabled=1");
15 $users = fetchRows(DBSelect($sql),'UserId');
16
17 include 'tpl/head.php';
18
19 foreach($users as $id=>$user) {
20         echo '<a href="',newQSA(array('impersonate'=>$id)),'">',$user['Username'],'</a> (',$user['Name'],')<br />';
21 }
22
23 include 'tpl/foot.php';
24
25 ?>
This page took 0.024447 seconds and 3 git commands to generate.