@@ 135-141 (lines=7) @@ | ||
132 | if ($classLog::hasVoted($poll_id, Request::getString('REMOTE_ADDR', '', 'SERVER'), $GLOBALS['xoopsUser']->getVar('uid'))) { |
|
133 | $msg = _PL_ALREADYVOTED; |
|
134 | setcookie("newbb_polls[{$poll_id}]", 1); |
|
135 | } else { |
|
136 | // irmtfan save ip to db |
|
137 | $pollObject->vote(Request::getInt('option_id', 0, 'POST'), Request::getString('REMOTE_ADDR', '', 'SERVER'), $GLOBALS['xoopsUser']->getVar('uid')); |
|
138 | $pollObject->updateCount(); |
|
139 | $msg = _PL_THANKSFORVOTE; |
|
140 | setcookie("newbb_polls[{$poll_id}]", 1); |
|
141 | } |
|
142 | } else { |
|
143 | if ($classLog::hasVoted($poll_id, Request::getString('REMOTE_ADDR', '', 'SERVER'))) { |
|
144 | $msg = _PL_ALREADYVOTED; |
|
@@ 146-151 (lines=6) @@ | ||
143 | if ($classLog::hasVoted($poll_id, Request::getString('REMOTE_ADDR', '', 'SERVER'))) { |
|
144 | $msg = _PL_ALREADYVOTED; |
|
145 | setcookie("newbb_polls[{$poll_id}]", 1); |
|
146 | } else { |
|
147 | $pollObject->vote(Request::getInt('option_id', 0, 'POST'), Request::getString('REMOTE_ADDR', '', 'SERVER')); |
|
148 | $pollObject->updateCount(); |
|
149 | $msg = _PL_THANKSFORVOTE; |
|
150 | setcookie("newbb_polls[{$poll_id}]", 1); |
|
151 | } |
|
152 | } |
|
153 | } |
|
154 | // irmtfan - simple url |