Here is what it displayed:
ugh... the shuffle() command is one line 15 and i think that is what's triggering everything else to fail. I will copy and paste the code here if anyone wants to take a look...bannercode.html wrote: Warning: Wrong datatype in shuffle() call in C:\apache\htdocs\c2\view.php on line 15
Warning: Wrong datatype in shuffle() call in C:\apache\htdocs\c2\view.php on line 17
Warning: Wrong datatype in shuffle() call in C:\apache\htdocs\c2\view.php on line 24
Warning: Wrong datatype in shuffle() call in C:\apache\htdocs\c2\view.php on line 26
Warning: Supplied argument is not a valid MySQL result resource in C:\apache\htdocs\c2\view.php on line 32
Warning: Cannot add header information - headers already sent by (output started at C:\apache\htdocs\c2\view.php:15) in C:\apache\htdocs\c2\view.php on line 49
Warning: Cannot add header information - headers already sent by (output started at C:\apache\htdocs\c2\view.php:15) in C:\apache\htdocs\c2\view.php on line 50
Code: Select all
<?
$eligable=mysql_query("select id from banneruser where approved='1' and credits >= 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);
?>
<a href="<? echo "$base_url"; ?>/click.php?uid=<? echo "$uid"; ?>&bid=<? echo "$pick"; ?>" target=_blank><img src="<? echo "$banner"; ?>" border=0 width=468 height=60></a>
<?
$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{
?>
<a href="<? echo "$base_url"; ?>/click.php?uid=<? echo "$uid"; ?>&bid=<? echo "$pick"; ?>" target=_blank><img src="<? echo "$banner"; ?>" border=0 width=<? echo "$banner_width"; ?> height=<? echo "$banner_height"; ?>></a>
<?
$update_bid=mysql_query("update banneruser set exposures=exposures+1, credits=credits-1 where id=$pick");
?>
<?
}
}
?>