= 1 and id != '$uid'"); $get_number=mysql_num_rows($eligable); if($get_number == 0){ $eligable=mysql_query("select id from banneruser where defaultacct='1' and id != '$uid'"); }else{ } while($rand_rows = mysql_fetch_array($eligable)){ $id_array[] = $rand_rows[id]; } srand((double)microtime()*1000000); shuffle($id_array); srand((double)microtime()*1000000); shuffle($id_array); $pick = $id_array[0]; $get_banner = mysql_query("select bannerurl from bannerurls where uid='$pick'"); while($rand_ban = mysql_fetch_array($get_banner)){ $ban_array[] = $rand_ban[bannerurl]; } srand((double)microtime()*1000000); shuffle($ban_array); srand((double)microtime()*1000000); shuffle($ban_array); $banner=$ban_array[0]; $cookieuid=$HTTP_COOKIE_VARS[cookieuid]; $ip = getenv ("REMOTE_ADDR"); $raw_query=mysql_query("select raw,lastip from banneruser where id=$pick"); $get_raw=mysql_fetch_array($raw_query); $rawcode=$get_raw[raw]; if($rawcode != ''){ $time = mktime()+$cookie_expire; $date = date("l, d-M-y H:i:s", ($time)); if($cookieuid != $uid){ header('P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"'); setcookie("cookieuid",$uid, time()+$cookie_expire); echo "$rawcode"; $update_id=mysql_query("update banneruser set credits=credits+1,lastip='$ip' where id=$uid"); $update_bid=mysql_query("update banneruser set exposures=exposures+1, credits=credits-1 where id=$pick"); }else{ echo "$rawcode"; $update_bid=mysql_query("update banneruser set exposures=exposures+1, credits=credits-1 where id=$pick"); } }else{ if($cookieuid != $uid){ header('P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"'); setcookie("cookieuid",$uid, time()+$cookie_expire); ?> /click.php?uid=&bid=" target=_blank>" border=0 width=150 height=60> /click.php?uid=&bid=" target=_blank>" border=0 width= height=>