Zeile 29 | Zeile 29 |
---|
} else {
|
} else {
|
| $username = '';
|
eval("\$loginbox = \"".$templates->get("loginbox")."\";"); }
| eval("\$loginbox = \"".$templates->get("loginbox")."\";"); }
|
Zeile 690 | Zeile 691 |
---|
{ $votes[$i] = "0"; }
|
{ $votes[$i] = "0"; }
|
$voteslist .= $votes[$i];
| $voteslist .= (int)$votes[$i];
|
$numvotes = (int)$numvotes + (int)$votes[$i]; } }
| $numvotes = (int)$numvotes + (int)$votes[$i]; } }
|
Zeile 779 | Zeile 780 |
---|
add_breadcrumb(htmlspecialchars_uni($thread['subject']), get_thread_link($thread['tid'])); add_breadcrumb($lang->nav_pollresults);
|
add_breadcrumb(htmlspecialchars_uni($thread['subject']), get_thread_link($thread['tid'])); add_breadcrumb($lang->nav_pollresults);
|
$voters = $votedfor = array();
| $voters = $votedfor = $guest_voters = array();
|
// Calculate votes $query = $db->query("
| // Calculate votes $query = $db->query("
|
Zeile 801 | Zeile 802 |
---|
if($voter['uid'] == 0 || $voter['username'] == '') { // Add one to the number of voters for guests
|
if($voter['uid'] == 0 || $voter['username'] == '') { // Add one to the number of voters for guests
|
++$guest_voters[$voter['voteoption']];
| if(isset($guest_voters[$voter['voteoption']])) { ++$guest_voters[$voter['voteoption']]; } else { $guest_voters[$voter['voteoption']] = 1; }
|
} else {
| } else {
|
Zeile 870 | Zeile 878 |
---|
}
if(isset($guest_voters[$number]) && $guest_voters[$number] > 0)
|
}
if(isset($guest_voters[$number]) && $guest_voters[$number] > 0)
|
{
| {
|
if($guest_voters[$number] == 1) { $userlist .= $guest_comma.$lang->guest_count;
| if($guest_voters[$number] == 1) { $userlist .= $guest_comma.$lang->guest_count;
|
Zeile 972 | Zeile 980 |
---|
$query = $db->simple_select("pollvotes", "*", "{$user_check} AND pid='".$poll['pid']."'"); $votecheck = $db->fetch_array($query);
|
$query = $db->simple_select("pollvotes", "*", "{$user_check} AND pid='".$poll['pid']."'"); $votecheck = $db->fetch_array($query);
|
if($votecheck['vid'])
| if($votecheck)
|
{ error($lang->error_alreadyvoted);
|
{ error($lang->error_alreadyvoted);
|
}
| }
|
$votesql = array(); $votesarray = explode("||~|~||", $poll['votes']);
| $votesql = array(); $votesarray = explode("||~|~||", $poll['votes']);
|
Zeile 988 | Zeile 996 |
---|
$total_options = 0;
foreach($option as $voteoption => $vote)
|
$total_options = 0;
foreach($option as $voteoption => $vote)
|
{
| {
|
if($vote == 1 && isset($votesarray[$voteoption-1])) { $votesql[] = array(
| if($vote == 1 && isset($votesarray[$voteoption-1])) { $votesql[] = array(
|
Zeile 1009 | Zeile 1017 |
---|
{ error($lang->sprintf($lang->error_maxpolloptions, $poll['maxoptions'])); }
|
{ error($lang->sprintf($lang->error_maxpolloptions, $poll['maxoptions'])); }
|
}
| }
|
} else {
| } else {
|
Zeile 1079 | Zeile 1087 |
---|
$query = $db->simple_select("polls", "*", "pid='".$mybb->get_input('pid', MyBB::INPUT_INT)."'"); $poll = $db->fetch_array($query);
|
$query = $db->simple_select("polls", "*", "pid='".$mybb->get_input('pid', MyBB::INPUT_INT)."'"); $poll = $db->fetch_array($query);
|
if(!$poll['pid'])
| if(!$poll)
|
{ error($lang->error_invalidpoll); }
| { error($lang->error_invalidpoll); }
|
Zeile 1150 | Zeile 1158 |
---|
$votesarray = explode("||~|~||", $poll['votes']); if(count($votesarray) > $poll['numoptions']) {
|
$votesarray = explode("||~|~||", $poll['votes']); if(count($votesarray) > $poll['numoptions']) {
|
$votesarray = array_slice(0, $poll['numoptions']);
| $votesarray = array_slice($votesarray, 0, $poll['numoptions']);
|
}
if($poll['multiple'] == 1)
| }
if($poll['multiple'] == 1)
|