3 * This function is beign used to load info that's needed for the userlist page.
4 * this function will return all users by using he pagination class, so that it can be used in the template. Only Mods and Admins can browse this page though.
5 * @author Daan Janssens, mentored by Matthew Lagoe
8 if(Ticket_User
::isMod(unserialize($_SESSION['ticket_user']))){
10 $pagination = new Pagination(WebUsers
::getAllUsersQuery(),"web",10,"WebUsers");
11 $pageResult['userlist'] = Gui_Elements
::make_table($pagination->getElements() , Array("getUId","getUsername","getEmail"), Array("id","username","email"));
12 $pageResult['links'] = $pagination->getLinks(5);
13 $pageResult['lastPage'] = $pagination->getLast();
14 $pageResult['currentPage'] = $pagination->getCurrent();
17 foreach( $pageResult['userlist'] as $user ){
18 $pageResult['userlist'][$i]['permission'] = Ticket_User
::constr_ExternId($pageResult['userlist'][$i]['id'])->getPermission();
22 if (Ticket_User
::isAdmin(unserialize($_SESSION['ticket_user']))){
23 $pageResult['isAdmin'] = "TRUE";
25 global $INGAME_WEBPATH;
26 $pageResult['ingame_webpath'] = $INGAME_WEBPATH;
28 $pageResult['base_webpath'] = $BASE_WEBPATH;
32 $_SESSION['error_code'] = "403";
33 header("Cache-Control: max-age=1");
34 header("Location: index.php?page=error");
35 throw new SystemExit();