If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics
  [Search] Search   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [FAQ]  FAQ 
[Register] Register / 
[Login] Login 
Advanced Poll - Cannot vote twice  XML
Forum Index » Support Forum
Author Message
MeisterGigi
Newbie

Joined: 26/03/2008 19:22:23
Messages: 3
Offline

Hi !

I have spent hours to read through the board, but i still have the same problem.

I cannot vote twice.

First i have tried changing ip table to not checked, changed the time, then after browsing the board, i have edited the poll_cookie.php and changed the 96 hours to 2 hours.

But still, its impossible to vote again for any of my users.

(i am using the latest version with sql)

Ill try to post the code of my poll:
  1. <?php  
  2. // Important! You have to include it before your html code  
  3. include_once "/www/htdocs/w007669b/scripte/2009poll/poll_cookie.php";  
  4. ?>  
  5.   
  6.   
  7.   
  8. <html>  
  9.   
  10. <head>  
  11. <meta http-equiv="Content-Language" content="de">  
  12. <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">  
  13. <title>Boys Poll</title>  
  14. </head>  
  15.   
  16. <body bgcolor="#0033CC" style="text-align: center">  
  17.   
  18. <p align="center"><font face="Arial Unicode MS" color="#FFFFFF">The Clubbing   
  19. ,29.11.2008 Poll, wählt Euren Favoriten!</font></p>  
  20. <table border="0" width="100%" id="table1">  
  21.     <tr>  
  22.         <td>  
  23.   
  24. <?php  
  25. require_once "/www/htdocs/w007669b/scripte/2009poll/booth.php";  
  26. echo $php_poll->poll_process(5);        // x = Poll ID  
  27. ?></td>  
  28.         <td><img border="0" src="http://www.meistergigi.com/pics/poll/boys1.png" width="647" height="454"></td>  
  29.     </tr>  
  30. </table>  
  31. &nbsp;  
  32.   
  33. </body>  
  34.   
  35. </html>  


Can anyone help me ?

(poll_cookie)
  1. <?php  
  2. /** 
  3. * ---------------------------------------------- 
  4. * this code is optional 
  5. * Important! You have to include it  
  6. * before your html code 
  7. * ---------------------------------------------- 
  8. */  
  9. if (!headers_sent()) {  
  10.     $cookie_expire = 2; // hours  
  11.       
  12.     $action = (isset($_GET['action'])) ? $_GET['action'] : '';  
  13.     $action = (isset($_POST['action'])) ? $_POST['action'] : $action;  
  14.     $poll_ident = (isset($_GET['poll_ident'])) ? $_GET['poll_ident'] : '';  
  15.     $poll_ident = (isset($_POST['poll_ident'])) ? $_POST['poll_ident'] : $poll_ident;  
  16.       
  17.     if ($action=="vote" && (isset($_POST['option_id']) || isset($_GET['option_id']))) {  
  18.         $cookie_index = intval($poll_ident);  
  19.         if (!isset($_COOKIE['AdvancedPoll'][$cookie_index])) {  
  20.             $endtime = time()+3600*$cookie_expire;  
  21.             setcookie("AdvancedPoll[$cookie_index]", "1", $endtime);  
  22.         }  
  23.     }  
  24. }  
Auron
Expert
[Avatar]

Joined: 23/06/2003 22:02:17
Messages: 1053
Offline

If you've already voted when the cookie was set to 92 hours, it is most
likely still being read and used for the timeout before you can vote again.

You'd have to delete the specific cookie in question and then vote again,
to get the cookie with an expiry time of now + 2 hours.

Visit my site @ www.ragnaru.com
Adv. Poll Install Guide NOW BACK ONLINE! (And also rather out of date I would of thought)
[Email] [WWW]
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum