|
|
|
@ -2,16 +2,19 @@
|
|
|
|
|
|
|
|
|
|
function userlist(){
|
|
|
|
|
if(Ticket_User::isMod($_SESSION['ticket_user'])){
|
|
|
|
|
$users = WebUsers::getUsers();
|
|
|
|
|
|
|
|
|
|
$pagination = new Pagination(WebUsers::getAllUsersQuery(),"web",10,"WebUsers");
|
|
|
|
|
$pageResult['userlist'] = Gui_Elements::make_table($pagination->getElements() , Array("getUId","getUsername","getEmail"), Array("id","username","email"));
|
|
|
|
|
$pageResult['links'] = $pagination->getLinks(5);
|
|
|
|
|
$pageResult['lastPage'] = $pagination->getLast();
|
|
|
|
|
$pageResult['currentPage'] = $pagination->getCurrent();
|
|
|
|
|
|
|
|
|
|
$i = 0;
|
|
|
|
|
$pageResult['userlist'] = Array();
|
|
|
|
|
while($row = $users->fetch(PDO::FETCH_ASSOC)){
|
|
|
|
|
$pageResult['userlist'][$i]['id'] = $row['UId'];
|
|
|
|
|
$pageResult['userlist'][$i]['username'] = $row['Login'];
|
|
|
|
|
$pageResult['userlist'][$i]['permission'] = Ticket_User::constr_ExternId($row['UId'])->getPermission();
|
|
|
|
|
$pageResult['userlist'][$i]['email'] = $row['Email'];
|
|
|
|
|
foreach( $pageResult['userlist'] as $user ){
|
|
|
|
|
$pageResult['userlist'][$i]['permission'] = Ticket_User::constr_ExternId($pageResult['userlist'][$i]['id'])->getPermission();
|
|
|
|
|
$i++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (Ticket_User::isAdmin($_SESSION['ticket_user'])){
|
|
|
|
|
$pageResult['isAdmin'] = "TRUE";
|
|
|
|
|
}
|
|
|
|
|