public function process() { $gb = mGuestBook::getInstance(); $newMsgs = $gb->getSince(array("n", "nick", "email", "date", "msg", "admin_answer", "admin_answer_date"), Request::getVarAsInteger("lastN", "POST")); Response::setContent($this->_view->compose($newMsgs)); return true; }
public function unsetMe() { $who = Request::getVarAsInteger("guest", "POST"); $id = Request::getVarAsInteger("id", "POST"); if ($this->_ident($who, $id)) { return $this->_modify("update b_character set who = -1 where who = {$who}"); } else { return false; } }
public function process() { $params = array(); $params["title"] = array(array("title" => "Привет!")); $party = mParty::getInstance(); $res = $party->chooseCharacter(Request::getVarAsInteger("guest", "POST"), Request::getVarAsInteger("id", "POST"), Request::getVarAsInteger("character", "POST")); $c = $this->_view->compose($res); Response::setContent($c); return true; }
public function rateUp() { $target = Request::getVarAsInteger("target", "POST"); return self::_modify("update b_vote set rate = rate + 1 where n = {$this->asInteger($target)}"); }