/** * updates the lister save from gets and posts */ function update() { // Number of lines to be printed SSP_changeParam($this->limit, "limit" . $this->listId, false, "int"); // Page list starting position change SSP_changeParam($this->page, "page" . $this->listId, true, "int"); }
/** * Display a list of users * @return string - html for list */ public function lister() { // display list of users if (!isset($_SESSION["SSP_ListerSave"])) { $_SESSION["SSP_ListerSave"] = new ListerSave($this->cfg->limit); } $listerSave =& $_SESSION["SSP_ListerSave"]; $listerSave->update(); SSP_changeParam($this->filter->alpha, 'alpha', true); // build query $fields = array("FirstName", "FamilyName", 'TownCity'); $queryInfo = $this->buildQuery($fields); $this->db->query($queryInfo->sql, $queryInfo->values, "User Lister: Getting list of users"); $list = new Lister($listerSave, $this->db, $this->cfg->userLister, 0); $list->setLineFunction('listerLine', $this); $contentPage = array(); $contentPage["title"] = "User List"; $contentPage["alphFilter"] = $this->alphaFilter("here", "alphaFilter"); $contentPage["pageNav"] = $list->pageNav(); $lineContent["memberAdminUrl"] = $this->cfg->userAdminScript; $lineContent["userListerUrl"] = $this->cfg->userLister; $lineContent["currentUserId"] = $this->session->userId; $contentPage["list"] = $list->displayList($lineContent, "userListerLine.tpl", "userListerNoResult.tpl", "userListerOddLine.tpl", true); $page = new Template($contentPage, "userListerPage.tpl", false); $contentMain = array("title" => "User list", "content" => $page->output()); $tpl = $this->tpl($contentMain); return $tpl->output(); }