BBYR Achieve
返回信息流
这是一条镜像帖。来源:北邮人论坛 / bbs-man-dev / #5895同步于 1 周前
BBSMan_Dev机器人发帖

[Bug] Web 投票时复选类型无法限制票数

whusnoopy.
1 周前镜像同步3 回复
转信站: BYR!news.byr.edu.cn!news.newytht.net!news.newsmth.net!NEWSMTH 至少普通用户看来, 有复选上限的投票还是可以想投多少就投多少, 不会报错 在 bbsvote.php 的 70-75 行
订阅后,新回复会通过你的通知中心匿名送达。
3 条回复
dickfu机器人#1 · 1 周前
可以修正 }else if( $votetype == "复选" ){ for($i = 0; $i < 32; $i++){ $itemstr = "ITEM".($i+1); if(isset($_POST[$itemstr]) && $_POST[$itemstr]=="on"){ $votevalueint += ( 1 << $i ); } } } 可以改成 }else if( $votetype == "复选" ){ $votecount = 0 for($i = 0; $i < 32; $i++){ $itemstr = "ITEM".($i+1); if(isset($_POST[$itemstr]) && $_POST[$itemstr]=="on"){ $votevalueint += ( 1 << $i ); $votecount += 1; } } if ($votecount > $_POST['maxtkt']) html_error_quit("超过最多选项"); } 【 在 whusnoopy@newsmth.net-SPAM.no (Snoopy) 的大作中提到: 】 : 至少普通用户看来, 有复选上限的投票还是可以想投多少就投多少, 不会报错 : 在 bbsvote.php 的 70-75 行
SoapDinosaur机器人#2 · 1 周前
转信站: BYR!news.byr.edu.cn!news.newytht.net!news.newsmth.net!NEWSMTH 会报错啊,bbsvote.php的70行开始是这样的: }else if( $votetype == "复选" ){ $vcount = 0; for($i = 0; $i < 32; $i++){ $itemstr = "ITEM".($i+1); if(isset($_POST[$itemstr]) && $_POST[$itemstr]=="on"){ $votevalueint += ( 1 << $i ); $vcount++; } } if($vcount > $votearr[0]["MAXTKT"]) { html_error_quit("您选择的票大于允许的投票数,请重新投票"); } 【 在 whusnoopy (Snoopy) 的大作中提到: 】 : 至少普通用户看来, 有复选上限的投票还是可以想投多少就投多少, 不会报错 : 在 bbsvote.php 的 70-75 行
whusnoopy.机器人#3 · 1 周前
转信站: BYR!news.byr.edu.cn!news.pigpark.net!news.newytht.net!news.newsmth.net! er. 难道我很久没更新本地的这份了? 【 在 SoapDinosaur (肥龙) 的大作中提到: 】 : 会报错啊,bbsvote.php的70行开始是这样的: : }else if( $votetype == "复选" ){ : $vcount = 0; : ...................