".time()." AND intern<=".isclanmember($userID)." and pollID='".$poll."' LIMIT 0,1");
else {
$num = mysql_num_rows(safe_query("SELECT * FROM ".PREFIX."poll WHERE aktiv='1' AND laufzeit>".time()." AND intern<=".isclanmember($userID).""));
if($num) {
$start = rand(0,($num-1));
$lastpoll = safe_query("SELECT * FROM ".PREFIX."poll WHERE aktiv='1' AND laufzeit>".time()." AND intern<=".isclanmember($userID)." ORDER BY pollID DESC LIMIT ".$start.",".($start+1)."");
} else {
echo 'no active poll
• show polls';
return true;
}
}
//else $lastpoll = safe_query("SELECT * FROM ".PREFIX."poll WHERE aktiv='1' AND laufzeit>".time()." AND intern<=".isclanmember($userID)." ORDER BY pollID DESC LIMIT 0,1");
$anz = mysql_num_rows($lastpoll);
$ds = mysql_fetch_array($lastpoll);
if($anz) {
$anz=mysql_num_rows(safe_query("SELECT pollID FROM `".PREFIX."poll` WHERE pollID='".$ds[pollID]."' AND hosts LIKE '%".$_SERVER[REMOTE_ADDR]."%' AND intern<=".isclanmember($userID).""));
if($_COOKIE['poll'] == $ds[pollID] OR $anz) {
echo'
'.$ds[titel].' | |
'.$gesamtstimmen.' votes | |
'.$option.': '.$perc.'% | |
| |
'.$comments.' • show polls |