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:
Replace with the following code:
Find the following code:
Add in the following line:
Find the following code:
Add in the following line:
2. Open require/readvote.php
Search:
Change to:
Search:
Change to:
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
-
About the rewrite of pw, phpwind used the general people will not pay much attention to a technical point, output buffering (output buffer-ob_), below we will analyze the rewrite principle of phpwind2014-01-24
-
Pseudo-static application in phpWind
Pseudo-static application in phpWind, explain related instructions.2013-10-29 -
Visual Evolution of phpwind9.0 system
Recently, phpwind internally did a theme sharing on the visual aspects of the product. At the meeting, Mr. Wang Jie, the main visual designer of phpwind, shared his experiences and concepts in visual design. Xiaobian is also fortunate to be invited to listen in to share, after the sharing meeting this small edition2012-08-23 -
A phpwind 8.0 utf8 system error performance as unable to register login, hard debugging, found that data/sql_config.php file due to editing in windows Notepad led to the automatic increase in the bom2011-12-23
-
Phpwind7.5 Application Center: basic, third-party online applications and other Settings
Application center: basic, third-party online applications, various special function post Settings. It includes:2010-01-24 -
phpwind7.5 Operation Tools: A collection of necessary tools for site operation
Operation tools: A collection of tools required for site operation. It includes:2010-01-24 -
phpwind7.5 complete point system
A good community point system can well drive the enthusiasm and adhesion of forum members, active forum atmosphere, promote members' interest in Posting, fair and just rewards have very good results, PHPWind has been pursuing the coordination of this function2010-01-24 -
phpwind7.5 Flexible business support system
Different places, folk customs, economy, living habits are different, different industries also have different rules, which leads to different communities have different resources, different users, and thus have different focuses on community operation and business. As a2010-01-24 -
phpwind forum closed online listing
Keyword description: Close the forum < EOT > "/a> index.php invalidates the function of opening the online list Opening index.php will: if($windid==$manager || $usertotal<2000)2009-06-06 -
Use Discuz! 7.0 Background water prevention function
Keyword Description: Use Discuz! 7.0 Background irrigation function BBS Forum Kangsheng Creative station products Discuz! 7.0 is a BBS site building product released by Comsenz in December 2008. Discuz! 72009-06-06
Latest comments