Beispiel #1
0
 function audienceList()
 {
     $service = new \ManiaHost\Services\AnalyticsService();
     $multipage = new \ManiaLib\Utils\MultipageList(21);
     list($offset, $length) = $multipage->getLimit();
     $servers = $service->getServerList($offset, $length + 1);
     $multipage->checkArrayForMorePages($servers);
     $this->response->multipage = $multipage;
     $this->response->servers = $servers;
 }
Beispiel #2
0
 function defaultMaps($path = '')
 {
     $this->request->registerReferer();
     $excludePath = array('$uploaded/' . $this->session->login . '/');
     $connection = $this->getServerConnection();
     $mapPath = $connection->getMapsDirectory();
     $fileService = new \ManiaHost\Services\MapService($mapPath);
     $count = $fileService->getCount($path, $excludePath, null, null, null, null, true);
     $multipage = new \ManiaLib\Utils\MultipageList();
     $multipage->setPerPage(12);
     $multipage->setSize($count);
     list($offset, $length) = $multipage->getLimit();
     $files = $fileService->getList($path, $excludePath, null, null, null, null, true, $offset, $length);
     $this->chooseSelector($path, true);
     $this->response->files = $files;
     $this->response->mapCount = $count;
     $this->response->multipage = $multipage;
     $this->response->selected = $this->session->get('selected', array());
 }