$votevalueint1 = $_POST["ITEM"]; } else { html_error_quit("参数错误3"); } settype($votevalueint1, "integer"); if ($votevalueint1 < 0) { html_error_quit("参数错误7"); } } else { if ($votetype != "问答") { html_error_quit("参数错误8"); } } } } $retnum = bbs_vote_num($board, $num, $votevalueint1, $votevalueint2, $msg); if ($retnum <= 0) { html_error_quit("投票错误" . $retnum); } else { html_success_quit("投票成功"); } } if ($retnum <= 0) { html_error_quit("该投票不存在"); } bbs_board_nav_header($brdarr, "投票"); $descdir = "vote/" . $board . "/desc." . $votearr[0]["DATE"]; ?> <div class="article"> <?php echo @bbs_printansifile($descdir);
/** * function vote * * @param int $num * @param array $val1 * @param array $val2 * @param string msg * @return boolean * @access public */ public function vote($num, $val1, $val2, $msg) { $msg = trim(preg_replace("|^((.*?\n){3})[\\s\\S]*\$|", "\$1", $msg)); $ret = bbs_vote_num($this->NAME, $num, intval($val1), intval($val2), $msg); return $ret > 0; }