Zeile 6 | Zeile 6 |
---|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* $Id: polls.php 5125 2010-07-27 07:28:03Z RyanGordon $
| * $Id: polls.php 5486 2011-07-12 01:55:58Z jammerx2 $
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
Zeile 719 | Zeile 719 |
---|
eval("\$showresults = \"".$templates->get("polls_showresults")."\";"); output_page($showresults); }
|
eval("\$showresults = \"".$templates->get("polls_showresults")."\";"); output_page($showresults); }
|
if($mybb->input['action'] == "vote")
| if($mybb->input['action'] == "vote" && $mybb->request_method == "post")
|
{
|
{
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
$query = $db->simple_select("polls", "*", "pid='".intval($mybb->input['pid'])."'"); $poll = $db->fetch_array($query); $poll['timeout'] = $poll['timeout']*60*60*24;
| $query = $db->simple_select("polls", "*", "pid='".intval($mybb->input['pid'])."'"); $poll = $db->fetch_array($query); $poll['timeout'] = $poll['timeout']*60*60*24;
|
Zeile 745 | Zeile 748 |
---|
if($forumpermissions['canvotepolls'] == 0) { error_no_permission();
|
if($forumpermissions['canvotepolls'] == 0) { error_no_permission();
|
}
| }
|
$expiretime = $poll['dateline'] + $poll['timeout']; $now = TIME_NOW; if($poll['closed'] == 1 || $thread['closed'] == 1 || ($expiretime < $now && $poll['timeout'])) { error($lang->error_pollclosed);
|
$expiretime = $poll['dateline'] + $poll['timeout']; $now = TIME_NOW; if($poll['closed'] == 1 || $thread['closed'] == 1 || ($expiretime < $now && $poll['timeout'])) { error($lang->error_pollclosed);
|
}
| }
|
if(!isset($mybb->input['option'])) { error($lang->error_nopolloptions);
| if(!isset($mybb->input['option'])) { error($lang->error_nopolloptions);
|
Zeile 773 | Zeile 776 |
---|
elseif(!$mybb->user['uid']) { // Give a cookie to guests to inhibit revotes
|
elseif(!$mybb->user['uid']) { // Give a cookie to guests to inhibit revotes
|
$votes_cookie = implode(',', array_keys($mybb->input['option']));
| if(is_array($mybb->input['option'])) { // We have multiple options here... $votes_cookie = implode(',', array_keys($mybb->input['option'])); } else { $votes_cookie = $mybb->input['option']; }
|
my_setcookie("pollvotes[{$poll['pid']}]", $votes_cookie); }
| my_setcookie("pollvotes[{$poll['pid']}]", $votes_cookie); }
|