Alquem ajuda erro no meu portal pf [AJUDA] 18.11.12 16:57
Galera ta dando esse erro no meu portal
Error Desconocido / Unknown Error
Archivo / File : principal.php
Linea / Line : 323
Mensaje / Message :
Function split() is deprecated
ja tentei ir em Line : 323 e ñ consiqui acha o erro.
Codigo da file Principal.php
Error Desconocido / Unknown Error
Archivo / File : principal.php
Linea / Line : 323
Mensaje / Message :
Function split() is deprecated
ja tentei ir em Line : 323 e ñ consiqui acha o erro.
Codigo da file Principal.php
- Spoiler:
- <?php
/************************************************************************/
/* BrisaTop v1.1.0 */
/* ================================== */
/* */
/* Sistema de Top de Webs */
/* */
/* Copyright (c) 2006 por Inaki84 bajo licencia TruOpenSource/LGP */
/* */
/* http://www.truzone.org */
/* http://www.truzone.org/TruOpenSource/LGP.html */
/************************************************************************/
if (preg_match('/^.*principal.php.*$/i',$_SERVER['PHP_SELF'])) {
Header('Location: error.php?op=403');
die();
}
error_reporting(E_ALL);
set_error_handler('manejador_errores');
$tiempo_carga = microtime();
$tiempo_carga = explode(" ",$tiempo_carga);
$tiempo_carga = $tiempo_carga[1] + $tiempo_carga[0];
$tiempo_carga1 = $tiempo_carga;
if(@filesize('config.php') == 0){Header('Location: instalar/index.php');die();}
define('TOP',TRUE);
$mysql_llamadas = 0;
$modulo = '';
if(phpversion() < '4.3.0'){
die('Este script necesita que la versón PHP del servidor sea igual o superior a la 4.3.0<br />This script needs the server\'s version PHP to be the same or superior to 4.3.0');
}
require_once('config.php');
require_once('security.php');
//Sacamos los Datos del Config
$result = mysql_unbuffered_query('SELECT nombre,direccion_web,direccion_votacion,email,lang,theme,topoff,normas,mostrar_normas,reinicio,proteccion_ip,proteccion_cookie,proteccion_referer,tiempo_voto,admision_web,moderacion_registro,recuperar_password,conf_banners,tbanner,tminibanner,num_bloques,paginas_bloque,webs_banner,min_votos,paginacion_web,orden_index1,orden_index2,version,mysql_llamadas,tiempo_carga,pie_pagina,no_follow,frame,mensaje_aceptacion,validacion_web,publicidad_header,publicidad_medio,publicidad_footer,datos_admins,fecha_corta,fecha_larga,mostrar_noticias,mostrar_estadisticas,mostrar_visitas,gmt,codificacion,fix,locale,email_admin FROM '.$prefix.'_config') or die(mysql_error());
$mysql_llamadas++;
list($top_nombre,$top_direccion,$top_direccion_votacion,$top_email,$top_lang,$top_theme,$top_off,$top_normas,$top_mostnormas,$top_reinicio,$top_protip,$top_protcok,$top_protref,$top_tiemvot,$top_admision,$top_modregistro,$top_recpass,$top_confbaner,$top_tbanner,$top_tminibanner,$top_numbloques,$top_pagsbloque,$top_webbaner,$top_minvotos,$top_paginacion,$top_orden1,$top_orden2,$top_version,$top_mysqllam,$top_tiempocarga,$top_piepagina,$top_nofollow,$top_frame,$top_aceptacion,$top_validacionweb,$top_publi1,$top_publi2,$top_publi3,$top_datosadmins,$top_fecha1,$top_fecha2,$top_mostnoticia,$top_mostestadisticas,$top_mostvisitas,$top_gmt,$top_codificacion,$top_ultifx,$top_locale,$emailadmin) = mysql_fetch_row($result);
$top_nombre = fuera_db($top_nombre);
$top_direccion = fuera_db($top_direccion);
$top_direccion_votacion = fuera_db($top_direccion_votacion);
$top_email = fuera_db($top_email);
$top_lang = fuera_db($top_lang);
$top_theme = fuera_db($top_theme);
$top_off = intval($top_off);
$top_normas = fuera_db($top_normas,1);
$top_mostnormas = intval($top_mostnormas);
$top_reinicio = intval($top_reinicio);
$top_protip = intval($top_protip);
$top_protcok = intval($top_protcok);
$top_protref = intval($top_protref);
$top_tiemvot = intval($top_tiemvot);
$top_admision = intval($top_admision);
$top_modregistro = intval($top_modregistro);
$top_recpass = intval($top_recpass);
$top_confbaner = intval($top_confbaner);
$top_tbanner = fuera_db($top_tbanner);
$top_tminibanner = fuera_db($top_tminibanner);
$top_numbloques = intval($top_numbloques);
$top_pagsbloque = intval($top_pagsbloque);
$top_webbaner = intval($top_webbaner);
$top_minvotos = intval($top_minvotos);
$top_paginacion = intval($top_paginacion);
$top_orden1 = fuera_db($top_orden1);
$top_orden2 = fuera_db($top_orden2);
$top_version = fuera_db($top_version);
$top_mysqllam = intval($top_mysqllam);
$top_tiempocarga = intval($top_tiempocarga);
$top_piepagina = fuera_db($top_piepagina,1);
$top_nofollow = intval($top_nofollow);
$top_frame = intval($top_frame);
$top_aceptacion = intval($top_aceptacion);
$top_validacionweb = intval($top_validacionweb);
$top_publi1 = fuera_db($top_publi1,1);
$top_publi2 = fuera_db($top_publi2,1);
$top_publi3 = fuera_db($top_publi3,1);
$top_datosadmins = fuera_db($top_datosadmins);
$top_fecha1 = fuera_db($top_fecha1);
$top_fecha2 = fuera_db($top_fecha2);
$top_mostnoticia = intval($top_mostnoticia);
$top_mostestadisticas = intval($top_mostestadisticas);
$top_mostvisitas = intval($top_mostvisitas);
$top_gmt = intval($top_gmt);
$top_codificacion = fuera_db($top_codificacion);
$top_ultifx = intval($top_ultifx);
$top_locale = fuera_db($top_locale);
$emailadmin = fuera_db($emailadmin);
@mysql_free_result($result);
//Extraccion Terminada
require_once('theme.php');
function manejador_errores($numero,$mensaje,$archivo,$linea){
global $prefix;
if(($numero === 1) OR ($numero === 16) OR ($numero === 4) OR ($numero === 64) OR ($numero === 256)){
$tipo = 'Error Crítico / Critical error';
}else if(($numero === 2) OR ($numero === 32) OR ($numero === 128) OR ($numero === 512)){
$tipo = 'Error Medio / Mean error';
}else if(($numero === 8) OR ($numero === 1024) OR ($numero === 2048)){
$tipo = 'Error Leve / Slight error';
}else{
$tipo = 'Error Desconocido / Unknown Error';
}
$path = str_replace('principal.php','',__FILE__);
$archivo = str_replace($path,'',$archivo);
$archivo = str_replace('\\','/',$archivo);
$mensaje = str_replace($path,'',$mensaje);
if($tipo != 'Error Leve / Slight error'){
$result = @mysql_query('SELECT veces FROM '.$prefix.'_errores WHERE nombre="'.intval($numero).'" AND archivo="'.dentro_db($archivo).'" AND linea="'.intval($linea).'" AND mensaje="'.dentro_db($mensaje).'" AND url="'.dentro_db($_SERVER['REQUEST_URI']).'"');
if(@mysql_num_rows($result) === 0){
@mysql_query('INSERT INTO '.$prefix.'_errores VALUES("","'.intval($numero).'","'.dentro_db($archivo).'","'.intval($linea).'","'.dentro_db($mensaje).'","'.dentro_db($_SERVER['REQUEST_URI']).'","1")');
@mysql_free_result($result);
}else{
list($veces) = @mysql_fetch_row($result);
@mysql_free_result($result);
@mysql_query('UPDATE '.$prefix.'_errores SET veces="'.intval($veces+1).'" WHERE nombre="'.intval($numero).'" AND archivo="'.dentro_db($archivo).'" AND linea="'.intval($linea).'" AND mensaje="'.dentro_db($mensaje).'" AND url="'.dentro_db($_SERVER['REQUEST_URI']).'"');
}
if(error_reporting() != 0){
$modulo = '';
$footer = '';
$menu = '';
$menu_zonas = '';
die('<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>'.$tipo.' - BrisaTop</title></head>
<body><div>
<span style="font-weight:bold;">'.$tipo.'</span><br />
<span style="font-weight:bold;">Archivo / File :</span> '.$archivo.'<br />
<span style="font-weight:bold;">Linea / Line :</span> '.$linea.'<br />
<span style="font-weight:bold;">Mensaje / Message :</span><br />'.$mensaje.'<br />
</div></body></html>');
}
}
}
function get_lang(){
global $top_lang,$bandera_paises;
if(!isset($_COOKIE['top_lang'])){
if(!defined('TOP_ADMIN')){
@include_once('language/'.$top_lang.'/lang-principal.php');
}else{
@include_once('language/'.$top_lang.'/lang-admin.php');
}
if(defined('TOP_REGISTRO') OR defined('TOP_PERFIL') OR (defined('TOP_INDEX')) OR (defined('TOP_ESTADISTICAS'))){
@include_once('language/'.$top_lang.'/lang-paises.php');
}
}else{
$topuser_lang = dentro_db(base64_decode($_COOKIE['top_lang']));
if(!preg_match("/^([-0-9a-z_]+)$/i",$topuser_lang)){
Header('Location: error.php?op=tags');
die();
}
if(@opendir('language/'.$topuser_lang) === FALSE){
if(!defined('TOP_ADMIN')){
@include_once('language/'.$top_lang.'/lang-principal.php');
}else{
@include_once('language/'.$top_lang.'/lang-admin.php');
}
if(defined('TOP_REGISTRO') OR defined('TOP_PERFIL') OR (defined('TOP_INDEX')) OR (defined('TOP_ESTADISTICAS'))){
@include_once('language/'.$topuser_lang.'/lang-paises.php');
}
}else{
if(!defined('TOP_ADMIN')){
@include_once('language/'.$topuser_lang.'/lang-principal.php');
}else{
@include_once('language/'.$topuser_lang.'/lang-admin.php');
}
if(defined('TOP_REGISTRO') OR defined('TOP_PERFIL') OR (defined('TOP_INDEX')) OR (defined('TOP_ESTADISTICAS'))){
@include_once('language/'.$topuser_lang.'/lang-paises.php');
}
}
}
}
function is_user(){
global $prefix,$mysql_llamadas;
if((isset($_COOKIE['topuser_id'])) AND (isset($_COOKIE['topuser_sesion']))){
$topuser_id = base64_decode($_COOKIE['topuser_id']);
$topuser_sesion = base64_decode($_COOKIE['topuser_sesion']);
$result = mysql_unbuffered_query('SELECT count(*) as numero,estado,recordar FROM '.$prefix.'_webs WHERE id="'.intval($topuser_id).'" AND sesion="'.base64_encode($topuser_sesion).'" GROUP by id') or die(mysql_error());
$mysql_llamadas++;
list($numero,$estado,$recordar) = mysql_fetch_row($result);
mysql_free_result($result);
if($numero == 1){
if($estado == 0){error_datos(_PERFIL_BANEADA);die();}else if($estado == 3){error_datos(_PERFIL_NOACTIVADA);die();}
$sesion = base64_encode(obtener_llave());
mysql_unbuffered_query('UPDATE '.$prefix.'_webs SET sesion="'.$sesion.'" WHERE id="'.intval($topuser_id).'"') or die(mysql_error());
$mysql_llamadas++;
if($recordar == 0){
setcookie('topuser_sesion',$sesion);
}else{
setcookie('topuser_sesion',$sesion,time()+2592000);
}
return 1;
}else{
setcookie('topuser_sesion',-1);
return 0;
}
}else{
setcookie('topuser_sesion',-1);
return 0;
}
}
function is_admin(){
global $prefix,$mysql_llamadas;
if((isset($_COOKIE['topadmin_id'])) AND (isset($_COOKIE['topadmin_sesion']))){
$topadmin_id = base64_decode($_COOKIE['topadmin_id']);
$topadmin_sesion = base64_decode($_COOKIE['topadmin_sesion']);
$result = mysql_unbuffered_query('SELECT count(*) as numero,recordar FROM '.$prefix.'_admins WHERE id="'.intval($topadmin_id).'" AND sesion="'.base64_encode($topadmin_sesion).'" GROUP by id') or die(mysql_error());
$mysql_llamadas++;
list($numero,$recordar) = mysql_fetch_row($result);
mysql_free_result($result);
if($numero == 1){
$sesion = base64_encode(obtener_llave());
mysql_unbuffered_query('UPDATE '.$prefix.'_admins SET sesion="'.$sesion.'" WHERE id="'.intval($topadmin_id).'"') or die(mysql_error());
$mysql_llamadas++;
if($recordar == 0){
setcookie('topadmin_sesion',$sesion);
}else{
setcookie('topadmin_sesion',$sesion,time()+2592000);
}
return 1;
}else{
setcookie('topadmin_sesion',-1);
return 0;
}
}else{
setcookie('topadmin_sesion',-1);
return 0;
}
}
function obtener_llave(){
$opt = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-.:;&%+-";
$obt = '';
for ($x=0; $x < 16; $x++) {
mt_srand ((double) microtime() * 1000000);
$obt .= substr($opt, mt_rand(0, strlen($opt)-1), 1);
}
return($obt);
}
function dentro_db($cadena,$html=0){
global $top_codificacion;
if(get_magic_quotes_gpc() == 1){
$cadena = stripslashes($cadena);
}
if($html == 0){
$cadena = strip_tags($cadena);
}
if((phpversion() < '5.0.0') AND ($top_codificacion == 'UTF-8')){
$cadena = mysql_real_escape_string(@htmlentities(utf8_decode($cadena),ENT_QUOTES,'ISO-8859-1'));
}else{
$cadena = mysql_real_escape_string(@htmlentities($cadena,ENT_QUOTES,$top_codificacion));
}
return $cadena;
}
function fuera_db($cadena,$html=0){
global $top_codificacion;
$cadena = stripslashes($cadena);
if($html == 1){
if( (phpversion() < '5.0.0') AND ($top_codificacion == 'UTF-8')){
$cadena = utf8_encode(@html_entity_decode($cadena,ENT_QUOTES,'ISO-8859-1'));
}else{
$cadena = @html_entity_decode($cadena,ENT_QUOTES,$top_codificacion);
}
}else{
if( (phpversion() < '5.0.0') AND ($top_codificacion == 'UTF-8')){
$cadena = utf8_encode($cadena);
}
}
return $cadena;
}
//Function obtener_ip() conseguida en http://www.eslomas.com , gracias al autor :)
function obtener_ip(){
if( $_SERVER['HTTP_X_FORWARDED_FOR'] != '' )
{
$client_ip =
( !empty($_SERVER['REMOTE_ADDR']) ) ?
$_SERVER['REMOTE_ADDR']
:
( ( !empty($_ENV['REMOTE_ADDR']) ) ?
$_ENV['REMOTE_ADDR']
:
"unknown" );
$entries = split('[, ]', $_SERVER['HTTP_X_FORWARDED_FOR']);
reset($entries);
while (list(, $entry) = each($entries))
{
$entry = trim($entry);
if ( preg_match("/^([0-9]+.[0-9]+.[0-9]+.[0-9]+)/", $entry, $ip_list) )
{
$private_ip = array(
'/^0./',
'/^127.0.0.1/',
'/^192.168..*/',
'/^172.((1[6-9])|(2[0-9])|(3[0-1]))..*/',
'/^10..*/');
$found_ip = preg_replace($private_ip, $client_ip, $ip_list[1]);
if ($client_ip != $found_ip)
{
$client_ip = $found_ip;
break;
}
}
}
}
else
{
$client_ip =
( !empty($_SERVER['REMOTE_ADDR']) ) ?
$_SERVER['REMOTE_ADDR']
:
( ( !empty($_ENV['REMOTE_ADDR']) ) ?
$_ENV['REMOTE_ADDR']
:
"unknown" );
}
return ip2long($client_ip);
}
function error_datos($mensaje,$anchura='60%'){
if( (defined('TOP_ADMIN') AND ($_GET['zona'] != 'login') ) OR ( (($_GET['accion'] != 'login') AND ($_GET['accion'] != 'recuperar') AND ($_GET['accion'] != 'recuperada')) AND (defined('TOP_PERFIL') AND ($_GET['accion'] != 'principal')))){
global $menu_zonas,$mysql_llamadas;
$anchura = '95%';
}else{
global $mysql_llamadas;
}
require_once('header.php');
$modulo = Opentable(_AVISO,$anchura)
. '<div style="text-align:center;"><img src="imagenes/errores/contenido.png" alt="'._AVISO.'" /><br />'.$mensaje.'<br /><a href="JavaScript:history.go(-1)">'._VOLVER_ATRAS.'</a></div>'
. Closetable();
require_once('footer.php');
die();
}
function accion_realizada($direccion='#'){
if( (defined('TOP_ADMIN') AND ($_GET['zona'] != 'login') ) OR ( (($_GET['accion'] != 'login') AND ($_GET['accion'] != 'recuperar') AND ($_GET['accion'] != 'recuperada')) AND defined('TOP_PERFIL') )){
global $mysql_llamadas,$top_aceptacion;
$menu_zonas = menu_zonas();
$anchura = '95%';
}else{
global $mysql_llamadas,$top_aceptacion;
$anchura = '60%';
}
if($top_aceptacion === 1){
require_once('header.php');
$modulo = Opentable(_HECHO,'95%')
. '<div style="text-align:center;"><img src="imagenes/errores/ok.png" alt="'._REALIZADO_1.'" /><br />'._REALIZADO.' <a href="'.$direccion.'">'._AQUI.'</a><br /></div>'
. Closetable();
require_once('footer.php');
echo '<META HTTP-EQUIV="Refresh" CONTENT="3; URL='.$direccion.'">';
}else{
$direccion = str_replace('&','&',$direccion);
Header('Location: '.$direccion);
}
}
function mandar_email($destinatario,$asunto,$texto,$cabecera_adicional=''){
global $top_email,$top_nombre,$theme_style,$top_direccion,$top_codificacion;
if(strtoupper(substr(PHP_OS, 0, 3)) === 'MAC'){
$salto_linea = "\r";
}else if(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'){
$salto_linea = "\r\n";
}else{
$salto_linea = "\n";
}
if(is_array($destinatario)){
for($a=0;$a<sizeof($destinatario);$a++){
$destinatario_resto .= $destinatario[$a];
if($a+1 != sizeof($destinatario)){
$destinatario_resto .= ',';
}
}
$destinatario = '';
}
$cabeceras = 'From: '.$top_nombre.' <'.$top_email.'>'.$salto_linea;
$cabeceras .= 'Reply-To: '.$top_nombre.' <'.$top_email.'>'.$salto_linea;
$cabeceras .= 'X-Mailer:PHP/'.phpversion().$salto_linea;
$cabeceras .= 'Mime-Version: 1.0'.$salto_linea;
$cabeceras .= 'Content-Type: text/html'.$salto_linea;
if(isset($destinatario_resto) AND ($destinatario_resto != '')){$cabeceras .= 'Bcc: '.$destinatario_resto.$salto_linea;}
$cabeceras .= $cabecera_adicional;
$texto = '<?xml version="1.0" encoding="'.$top_codificacion.'"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es"><head><meta http-equiv="Content-Type" content="text/html; charset='.$top_codificacion.'" /><title>'.$top_nombre.'</title><link rel="StyleSheet" href="'.$top_direccion.'/'.$theme_style.'" type="text/css" /></head><body>'.$texto.'</body></html>';
@mail($destinatario,$asunto,$texto,$cabeceras);
}
function formato_fecha($fecha='',$formato='',$obtdar=0){
global $top_fecha1,$top_gmt;
if($obtdar == 0){
if($fecha == ''){$fecha = formato_fecha('','',1);}
if($formato == ''){$formato = $top_fecha1;}
$fecha = ucfirst(strftime($formato,$fecha));
}else{
$gmt_server = date('Z');
$fecha = gmdate('U');
$fecha = $fecha-$gmt_server;
$fecha = $fecha+($top_gmt*3600);
}
return $fecha;
}
function comprobar_md5($ruta){
global $numero_errores;
require_once($ruta);
$a = 0;
$numero_errores = 0;
if (count($array_ficheros) != count($array_md5s)){
$resultado = '<div style="text-align:center;">'._ARRAY_NO.'</div>';
}else{
$resultado = '';
while($a <= count($array_ficheros)){
if(@md5_file($array_ficheros[$a]) != $array_md5s[$a]){
$resultado .= _ARRAY_1.' <span style="font-weight:bold;">'.str_replace('../','',$array_ficheros[$a]).'</span> '._ARRAY_2.'<br />';
$numero_errores++;
}
$a++;
}
$resultado = $resultado.'<br /><div style="text-align:center;font-weight:bold;">'._ARRAY_TOTAL1.' '.count($array_ficheros).' '._ARRAY_TOTAL2.' '.$numero_errores.'</div>';
}
return($resultado);
}
//LLevamos a cabo las revisiones pertinentes
$top_locale2 = explode(',',$top_locale);
for($a=0;$a<sizeof($top_locale2);$a++){
$top_locale3 .= '\''.$top_locale2[$a].'\'';
if($a != sizeof($top_locale2)-1){
$top_locale3 .= ',';
}
}
@eval('@setlocale(LC_ALL,'.$top_locale3.');');
$is_admin = is_admin();
if($top_off == 1){
if($is_admin == 0){
if(!defined('TOP_ERROR')){
Header('Location: error.php?op=off');
die();
}
}else{
get_lang();
$mensaje_alertatop .= _MENSAJE_WEB_DESACTIVADA;
}
}
$result = mysql_unbuffered_query('SELECT count(*) FROM '.$prefix.'_exclusion WHERE ip_inicio <= '.intval(obtener_ip()).' AND ip_fin >= '.intval(obtener_ip())) or die(mysql_error());
list($numero) = mysql_fetch_row($result);
mysql_free_result($result);
$mysql_llamadas++;
if($numero != 0){
if($is_admin == 0){
Header('Location: error.php?op=403');
die();
}else{
get_lang();
$mensaje_alertatop .= _MENSAJE_IP_BANEADA;
}
}
if($is_admin == 1){
if(is_writable('config.php')){
get_lang();
$mensaje_alertatop .= _MENSAJE_CONFIG;
}
if(file_exists('instalar')){
get_lang();
$mensaje_alertatop .= _MENSAJE_INSTALAR;
}
}
//Revisiones terminadas
?>