예제 #1
0
파일: Forum.php 프로젝트: sinfocol/gwf3
 public function sanitize()
 {
     if (false === ($this->board = $this->module->getCurrentBoard())) {
         return $this->module->error('err_board');
     }
     $threads = GDO::table('GWF_ForumThread');
     $bid = $this->board->getID();
     $this->tpp = $this->module->getThreadsPerPage();
     $this->nThreads = $threads->countRows("thread_bid={$bid}");
     $this->nPages = GWF_PageMenu::getPagecount($this->tpp, $this->nThreads);
     $this->page = Common::clamp((int) Common::getGet('tpage', '1'), 1, $this->nPages);
     $this->nBoards = count($this->board->getChilds());
     $this->nBPages = GWF_PageMenu::getPagecount($this->tpp, $this->nBoards);
     $this->bPage = Common::clamp(Common::getGet('bpage', 1), 1, $this->nBPages);
     return false;
 }
예제 #2
0
 private static function singleB(GWF_ForumBoard $board, &$back, $level, $selected)
 {
     $rep = '+' . str_repeat('=', $level * 2);
     $back .= sprintf('<option value="%s"%s>%s</option>', $board->getID(), GWF_HTML::selected($selected === $board->getID()), $rep . $board->display('board_title'));
     $childs = $board->getChilds();
     if (count($childs) > 0) {
         foreach ($childs as $child) {
             self::singleB($child, $back, $level + 1, $selected);
         }
     }
 }