3 * This function is beign used to load info that's needed for the syncing page.
4 * this function is used for notifying admins that there are unsynced changes, a brief overview of the non syned changes will be shown. The entries are being loaded here
5 * so that they can be passed to the template itself. Only admins can browse this page, others will be redirected to an error page.
6 * @author Daan Janssens, mentored by Matthew Lagoe
10 if(Ticket_User
::isAdmin(unserialize($_SESSION['ticket_user']))){
12 //return a paginated version of all unsynced changes.
13 $pagination = new Pagination("SELECT * FROM ams_querycache","lib",5,"Querycache");
14 $pageResult['liblist'] = Gui_Elements
::make_table($pagination->getElements() , Array("getSID","getType"), Array("id","type"));
15 $pageResult['links'] = $pagination->getLinks(5);
16 $pageResult['lastPage'] = $pagination->getLast();
17 $pageResult['currentPage'] = $pagination->getCurrent();
19 global $INGAME_WEBPATH;
20 $pageResult['ingame_webpath'] = $INGAME_WEBPATH;
22 //check if shard is online
24 $dbs = new DBLayer("shard");
25 $pageResult['shard'] = "online";
26 }catch(PDOException
$e) {
27 $pageResult['shard'] = "offline";
32 $_SESSION['error_code'] = "403";
33 header("Cache-Control: max-age=1");
34 header("Location: index.php?page=error");
35 throw new SystemExit();