Vergleich polls.php - 1.8.18 - 1.8.37

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 29Zeile 29
}
else
{

}
else
{

 
	$username = '';

	eval("\$loginbox = \"".$templates->get("loginbox")."\";");
}


	eval("\$loginbox = \"".$templates->get("loginbox")."\";");
}


Zeile 690Zeile 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 779Zeile 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 801Zeile 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 870Zeile 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 917Zeile 925

$poll['timeout'] = $poll['timeout']*60*60*24;



$poll['timeout'] = $poll['timeout']*60*60*24;


	$query = $db->simple_select("threads", "*", "poll='".(int)$poll['pid']."'");
$thread = $db->fetch_array($query);

	$thread = get_thread($poll['tid']);



if(!$thread || ($thread['visible'] != 1 && ($thread['visible'] == 0 && !is_moderator($thread['fid'], "canviewunapprove")) || ($thread['visible'] == -1 && !is_moderator($thread['fid'], "canviewdeleted"))))
{


if(!$thread || ($thread['visible'] != 1 && ($thread['visible'] == 0 && !is_moderator($thread['fid'], "canviewunapprove")) || ($thread['visible'] == -1 && !is_moderator($thread['fid'], "canviewdeleted"))))
{

Zeile 973Zeile 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 989Zeile 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 1010Zeile 1017
			{
error($lang->sprintf($lang->error_maxpolloptions, $poll['maxoptions']));
}

			{
error($lang->sprintf($lang->error_maxpolloptions, $poll['maxoptions']));
}

		}

		}

	}
else
{

	}
else
{

Zeile 1080Zeile 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 1151Zeile 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)