Beispiel #1
0
 public function showResults()
 {
     if (SJB_Request::getVar('action', '') == 'search') {
         $_REQUEST['restore'] = 1;
     }
     $paginator = new SJB_GuestAlertsManagePagination();
     $limit = array('limit' => ($paginator->currentPage - 1) * $paginator->itemsPerPage, 'num_rows' => $paginator->itemsPerPage);
     $searcher = new SJB_GuestAlertSearcher($limit, $paginator->sortingField, $paginator->sortingOrder);
     $foundGuestAlerts = $searcher->getObjectsSIDsByCriteria($this->criteria);
     $this->criteriaSaver->setSession($_REQUEST, $searcher->getFoundObjectSIDs());
     foreach ($foundGuestAlerts as $id => $guestAlertSID) {
         $foundGuestAlerts[$id] = SJB_GuestAlertManager::getGuestAlertInfoBySID($guestAlertSID);
     }
     $paginator->setItemsCount($searcher->getAffectedRows());
     $this->tp->assign('paginationInfo', $paginator->getPaginationInfo());
     $this->tp->assign('searchFields', $this->getSearchFieldsForTemplate());
     $this->tp->assign('errors', $this->errors);
     $this->tp->assign('guestAlerts', $foundGuestAlerts);
     $this->tp->display('manage.tpl');
 }