Example #1
0
 /**
  * Shows the pillory.
  *
  * @return Bengine_Comm_Controller_Pillory
  */
 public function indexAction()
 {
     Core::getTPL()->clearHTMLHeaderFiles();
     Core::getTPL()->addHTMLHeaderFile("game.css", "css");
     Core::getTPL()->addHTMLHeaderFile("lib/jquery.js", "js");
     $result = Core::getQuery()->select("ban_u", array("banid"));
     $pagination = new Pagination(Core::getConfig()->get("PILLORY_ITEMS_PER_PAGE"), $result->rowCount());
     $pagination->setConfig("page_url", Core::getLang()->getOpt("langcode") . "/pillory/index/%d")->setConfig("main_element_class", "pagination center-table")->setMaxPagesToShow(Core::getConfig()->get("MAX_PILLORY_PAGES"))->setCurrentPage($this->getParam("1"))->setConfig("base_url", Core::getLang()->getOpt("langcode") . "/pillory");
     Core::getTPL()->addLoop("bans", $this->getBans($pagination->getStart(), Core::getConfig()->get("PILLORY_ITEMS_PER_PAGE")));
     $this->assign("pagination", $pagination);
     return $this;
 }