phpwind can repeat voting questions after changing its name

InternetPublished: 2009-06-06 15:54:33 Author: jb51 I want to comment
Keyword description: Voting questions can be repeated code Copy & option winduid phpwind after the name can be repeated voting question 1. Open the file: job.php and find the following code: Copy code if(@in_array($v_uid,$option[2])){Showmsg('job_havevote'); } Replace with the following code: Copy code
Keyword description: Voting questions can be repeated code Copy & option winduid

phpwind can repeat voting questions after changing its name

1. Open the file job.php
Find the following code:
Copy code
if(@in_array($v_uid,$option[2])){
Showmsg('job_havevote');
}


Replace with the following code:
Copy code
if($winduid){
@in_array($winduid,$option[3]) && Showmsg('job_havevote');
}else{
@in_array($onlineip,$option[2]) && Showmsg('job_havevote');
}


Find the following code:
Copy code
foreach($option[2] as $vid=>$value){
if($value==$v_uid){
$votearray['options'][$key][1]--;
unset($votearray['options'][$key][2][$vid]);
}
}


Add in the following line:
Copy code
foreach($option[3] as $vid=>$value){
if($value==$winduid){
unset($votearray['options'][$key][3][$vid]);
}
}



Find the following code:
Copy code
$votearray['options'][(int)$id][2][]=$v_uid;

Add in the following line:
Copy code
! empty($winduid) && $votearray['options'][(int)$id][3][]=$winduid;




2. Open require/readvote.php
Search:
Copy code
$previewable,$vote_close;

Change to:
Copy code
$previewable,$vote_close,$winduid;

Search:
Copy code
if (@in_array(($windid ? $windid : $onlineip),$option[2])) {
$havevote = 'havevote';
}

Change to:
Copy code
if($winduid){
@in_array($winduid,$option[3]) && $havevote = 'havevote';
}else{
@in_array($onlineip,$option[2]) && $havevote = 'havevote';
}

Related article

Latest comments