可以修正
}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 行
--
FROM 211.68.71.98