255) || ($x[1]/768%0>0) ) { header("Location: /"); die; } header("Content-Type: text/html; charset=utf-8"); include("forum/admin/config.php"); mysql_connect($servername,$dbusername,$dbpassword); mysql_select_db($dbname); echo ""; echo ""; echo "Vysledky ankety\n"; echo ""; echo ""; $totalvoters=array();$totalothers=array(); $i=$x[1]/768; $voters=array();$others=array(); $votedates=array(); $pollqry=mysql_query("select question,options from poll where pollid=$i"); $poll=mysql_fetch_array($pollqry); echo ""; $polloptions=split('\|\|\|',$poll['options']); $votesmc=array_fill(0,count($polloptions),0); $votesoth=array_fill(0,count($polloptions),0); $votesnew=array_fill(0,count($polloptions),0); $mcnames=array();$othnames=array();$newnames=array(); $voteqry=mysql_query("select voteoption,username,usertitle,from_unixtime(votedate) as vdate from pollvote left join user using (userid) where pollid=$i"); while ($vote=mysql_fetch_array($voteqry)) { $votedates[$vote[username]]=$vote[vdate]; $votesoth[$vote['voteoption']-1]++; $othnames[$vote['voteoption']-1].="$vote[username], "; } foreach ($polloptions as $id => $name) { echo ""; echo ""; } echo "
VolbaHlasuLidi
".iconv("windows-1250","utf8",$poll[question])."
".iconv("windows-1250","utf8",$name)."$votesoth[$id]$othnames[$id]
"; ?>