/** * @see Page::assignVariables(), */ public function assignVariables() { parent::assignVariables(); WCF::getTPL()->assign(array('user' => $this->user, 'gbData' => $this->gbData, 'cntEntries' => $this->cntEntries, 'cntViews' => $this->cntViews, 'userID' => $this->userID, 'lastVisitor' => $this->lastVisitor, 'visitorLastVisit' => $this->visitorLastVisit, 'locked' => UserGuestbookData::getLockInfo($this->userID))); }
/** * @see Page::readData() */ public function readData() { parent::readData(); $ugb = new UserGuestbookData(); $this->ugbData = $ugb->getGuestbookList($this->sortField, $this->sortOrder, $this->pageNo, $this->itemsPerPage); }
/** * @see Form::save() */ public function save() { parent::save(); // insert/update $newEntry = new UserGuestbookData($this->userID); if ($this->action == 'edit') { $newEntry->updateEntry($this->id, $this->text, $this->enableSmilies, $this->enableHtml, $this->enableBBCodes); } else { if ($this->action == 'comment') { $newEntry->addComment($this->id, $this->text); } else { $newEntry->addEntry(WCF::getUser()->userID, $this->text, $this->enableSmilies, $this->enableHtml, $this->enableBBCodes); } } // forward to Guestbook HeaderUtil::redirect('index.php?page=UserGuestbook&userID=' . $this->userID . '' . SID_ARG_2ND_NOT_ENCODED); exit; }