Foros del Web » Creando para Internet » Sistemas de gestión de contenidos »

Phpbannerechange error!

Estas en el tema de Phpbannerechange error! en el foro de Sistemas de gestión de contenidos en Foros del Web. Hola amigos. Me baje el phpbannerechange como modulo para phpnuke. Mi phpnuke es el 6.0, todo funciona perfecto, pero cuando tiene que mostrar el banner ...
  #1 (permalink)  
Antiguo 26/04/2003, 18:57
Avatar de ocionet  
Fecha de Ingreso: agosto-2002
Ubicación: Costa Brava, Catalunya
Mensajes: 605
Antigüedad: 21 años, 8 meses
Puntos: 0
Phpbannerechange error!

Hola amigos.

Me baje el phpbannerechange como modulo para phpnuke.

Mi phpnuke es el 6.0, todo funciona perfecto, pero cuando tiene que mostrar el banner me muestra el siguiente error y va refrescando la página:

Código:
Warning: shuffle() expects parameter 1 to be array, null given in /home/webencat/public_html/modules/bannerexchange/ban.php on line 30

Warning: shuffle() expects parameter 1 to be array, null given in /home/webencat/public_html/modules/bannerexchange/ban.php on line 30

Fatal error: Cannot break/continue 1 level in /home/webencat/public_html/modules/bannerexchange/ban.php on line 32



El codigo fuente de ban.php:

Código PHP:
<?
/////////////////////////////////////////////////
//              phpBannerExchange              //
//              A Free Script by:              //
//                                             //
// darkrose - [email][email protected][/email] //
//       lazurus - [email][email protected][/email]      //
//                                             //
// Updates and future versons can be found at: //
// [url]http://www.internetunderground.com/scripts/[/url] //
//                                             //
// This script is covered under the GNU GPL.   //
//                                             //
// If you modify this script, please make your //
// code available to us! We are not programmers//
// by trade, so there's bound to be bugs and   //
// inefficient code, but we're trying!         //
/////////////////////////////////////////////////
require_once("../../config.php");
require_once(
"../../includes/sql_layer.php");
include(
"config.php");
//echo $module_name;
$dbi sql_connect($dbhost$dbuname$dbpass$dbname);
if (
$func=="view"){
  
$update_uid=sql_query("update ".$prefix."_exchange set credits=credits+1 where id='$uid'",$dbi);
  
$eligable=sql_query("select id from ".$prefix."_exchange where approved='1' and credits >= 1 and id != '$uid'",$dbi);
  
$get_number=sql_num_rows($eligable);
  if(
$get_number == 0){ $eligable=sql_query("select id from ".$prefix."_exchange where defaultacct='1' and id != '$uid'",$dbi);}
  while(
$rand_rows sql_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 sql_query("select bannerurl from ".$prefix."_exchange_urls where uid='$pick'",$dbi);
  
$get_number=sql_num_rows($get_banner);if($get_number == 0){echo "<meta http-equiv=\"refresh\" content=\"0;URL=?func=view&uid=$uid\">";break;}
    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];
  
$update_bid=sql_query("update ".$prefix."_exchange set exposures=exposures+1, credits=credits-1 where id='$pick'",$dbi);
  echo 
"<a href=\"http://".$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])."/ban.php?func=click&uid=$uid&bid=$pick\" target=_blank><img src=\"$banner\" border=0 width=$banner_width height=$banner_height></a>"
  Break;
}

if (
$func=="click"){
    
$update_clicks=sql_query("update ".$prefix."_exchange set clicks=clicks+1 where id='$bid'",$dbi);
    
$update_clickfrom=sql_query("update ".$prefix."_exchange set siteclicks=siteclicks+1 where id='$uid'",$dbi);
    
$get_rows=sql_query("select url from ".$prefix."_exchange where id='$bid'",$dbi);
    
$get_url=@sql_fetch_array($get_rows);
    
$clickurl=$get_url[url];
    
header("Location: $clickurl");
}

?>

Que es lo que falla?



Gracias.
__________________
Videos de impacto y divertidos
  #2 (permalink)  
Antiguo 27/04/2003, 00:24
Avatar de sdf23  
Fecha de Ingreso: diciembre-2002
Mensajes: 297
Antigüedad: 21 años, 4 meses
Puntos: 0
Usa el subforo para Aplicaciones pre-fabricadas
__________________

la vida es bella cuando no es culera
  #3 (permalink)  
Antiguo 27/04/2003, 00:25
Avatar de sdf23  
Fecha de Ingreso: diciembre-2002
Mensajes: 297
Antigüedad: 21 años, 4 meses
Puntos: 0
jaja creo que cai en un error mio :( sorry
__________________

la vida es bella cuando no es culera
  #4 (permalink)  
Antiguo 10/05/2003, 14:55
Avatar de ocionet  
Fecha de Ingreso: agosto-2002
Ubicación: Costa Brava, Catalunya
Mensajes: 605
Antigüedad: 21 años, 8 meses
Puntos: 0
Nadie lo sabe?
__________________
Videos de impacto y divertidos
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 20:02.