In fact, sorry about this, but I just found this:
### Function: Vote Poll
vote_poll();
function vote_poll() {
global $wpdb, $user_identity, $user_ID;
if(!empty($_POST['vote'])) {
header('Content-Type: text/html; charset='.get_option('blog_charset').'');
$poll_id = intval($_POST['poll_id']);
$poll_aid = $_POST["poll_$poll_id"];
$poll_aid_array = explode(',', $poll_aid);
if($poll_id > 0 && !empty($poll_aid_array) && check_allowtovote()) {
$check_voted = check_voted($poll_id);
if($check_voted == 0) {
if(!empty($user_identity)) {
$pollip_user = addslashes($user_identity);
} elseif(!empty($_COOKIE['comment_author_'.COOKIEHASH])) {
$pollip_user = addslashes($_COOKIE['comment_author_'.COOKIEHASH]);
} else {
$pollip_user = 'Guest';
}
$pollip_userid = intval($user_ID);
$pollip_ip = get_ipaddress();
$pollip_host = @gethostbyaddr($pollip_ip);
$pollip_timestamp = current_time('timestamp');
// Only Create Cookie If User Choose Logging Method 1 Or 2
$poll_logging_method = intval(get_option('poll_logging_method'));
if($poll_logging_method == 1 || $poll_logging_method == 3) {
$cookie_expiry = intval(get_option('poll_cookielog_expiry'));
if($cookie_expiry == 0) {
$cookie_expiry = 30000000;
}
$vote_cookie = setcookie("voted_".$poll_id, $poll_aid, ($pollip_timestamp + $cookie_expiry), COOKIEPATH);
}
foreach($poll_aid_array as $polla_aid) {
$wpdb->query("UPDATE $wpdb->pollsa SET polla_votes = (polla_votes+1) WHERE polla_qid = $poll_id AND polla_aid = $polla_aid");
}
$vote_q = $wpdb->query("UPDATE $wpdb->pollsq SET pollq_totalvotes = (pollq_totalvotes+".sizeof($poll_aid_array)."), pollq_totalvoters = (pollq_totalvoters+1) WHERE pollq_id = $poll_id AND pollq_active = 1");
if($vote_q) {
foreach($poll_aid_array as $polla_aid) {
$wpdb->query("INSERT INTO $wpdb->pollsip VALUES (0, $poll_id, $polla_aid, '$pollip_ip', '$pollip_host', '$pollip_timestamp', '$pollip_user', $pollip_userid)");
}
echo "<ul class=\"wp-polls-ul\">\n".display_pollresult($poll_id,$poll_aid_array, 1);
exit();
} else {
printf(__('Unable To Update Poll Total Votes And Poll Total Voters. Poll ID #%s', 'wp-polls'), $poll_id);
exit();
} // End if($vote_a)
} else {
printf(__('You Had Already Voted For This Poll. Poll ID #%s', 'wp-polls'), $poll_id);
exit();
}// End if($check_voted)
} else {
printf(__('Invalid Poll ID. Poll ID #%s', 'wp-polls'), $poll_id);
exit();
} // End if($poll_id > 0 && $poll_aid > 0)
} elseif (intval($_GET['pollresult']) > 0) {
header('Content-Type: text/html; charset='.get_option('blog_charset').'');
$poll_id = intval($_GET['pollresult']);
echo "<ul class=\"wp-polls-ul\">\n".display_pollresult($poll_id, 0, true);
exit();
} elseif (intval($_GET['pollbooth']) > 0) {
header('Content-Type: text/html; charset='.get_option('blog_charset').'');
$poll_id = intval($_GET['pollbooth']);
echo "<ul class=\"wp-polls-ul\">\n".display_pollvote($poll_id, true);
exit();
} // End if(!empty($_POST['vote']))
}