打開(kāi)plus下diy.php文件
找到
-
if(!is_array($diyform))
-
{
-
showmsg('自定義表單不存在', '-1');
-
exit();
-
}
再其下添加
-
//檢測(cè)游客是否已經(jīng)提交過(guò)表單
-
if(isset($_COOKIE['VOTE_MEMBER_IP']))
-
{
-
if($_COOKIE['VOTE_MEMBER_IP'] == $_SERVER['REMOTE_ADDR'])
-
{
-
ShowMsg('您已經(jīng)填寫(xiě)過(guò)表單啦','-1');
-
exit();
-
} else {
-
setcookie('VOTE_MEMBER_IP',$_SERVER['REMOTE_ADDR'],time()*$row['spec']*3600,'/');
-
}
-
} else {
-
setcookie('VOTE_MEMBER_IP',$_SERVER['REMOTE_ADDR'],time()*$row['spec']*3600,'/');
-
}
|