/** * function getVotes get vote list of board * array( * 'USERID' => string * 'TITLE' => string * 'DATE' => int * 'TYPE' => string '是非' (length=4) * 'MAXDAY' => int * ) * * @return array * array( * 'owner' => string * 'title' => string * 'start' => int * 'type' => string '是非' (length=4) * 'day' => int * ) * @access public */ public function getVotes() { $arr = array(); $num = bbs_get_votes($this->NAME, $arr); if ($num <= 0) { return array(); } return $arr; }
assert_login(); if (isset($_GET["board"])) { $board = $_GET["board"]; } else { html_error_quit("讨论区错误"); } $brdarr = array(); $brdnum = bbs_getboard($board, $brdarr); if ($brdnum == 0) { html_error_quit("错误的讨论区"); } if (bbs_checkreadperm($currentuser["index"], $brdnum) == 0) { html_error_quit("您没有权限"); } $votearr = array(); $retnum = bbs_get_votes($board, $votearr); if ($retnum < 0) { $retnum = 0; } bbs_board_nav_header($brdarr, "投票列表"); ?> <table class="main adj"> <caption>版面 <?php echo $board; ?> 共有 <?php echo $retnum; ?> 个投票</caption> <tr><th>序号</th><th>标题</th><th>类型</th><th>开启者</th><th>开启日期</th><th>投票天数</th></tr> <?php