Jump to content


Photo

Erro Deprecated


  • Faça o login para participar
Nenhuma resposta neste tópico

#1 Allan Jones

Allan Jones

    Turista

  • Usuários
  • 57 posts
  • Sexo:Masculino
  • Localidade:Coxim-MS

Posted 25/09/2012, 11:54

Minha página de login do admin está dando o seguinte erro:

Deprecated: mysql(): This function is deprecated; use mysql_query() instead in /home/esportecoxim/www/script/admin/protecao/checklogin.php on line 143 Deprecated: Function ereg() is deprecated in /home/esportecoxim/www/script/admin/protecao/interface.php on line 28 Deprecated: Function ereg() is deprecated in /home/esportecoxim/www/script/admin/protecao/interface.php on line 28 Deprecated: Function ereg() is deprecated in /home/esportecoxim/www/script/admin/protecao/interface.php on line 28 Deprecated: Function ereg() is deprecated in /home/esportecoxim/www/script/admin/protecao/interface.php on line 37 Deprecated: Function ereg() is deprecated in /home/esportecoxim/www/script/admin/protecao/interface.php on line 37 Deprecated: Function ereg() is deprecated in /home/esportecoxim/www/script/admin/protecao/interface.php on line 37


A página com erro é a seguinte:
<style type="text/css" media="screen" title="CSS do Admin">
        <!--
		* { margin:0; padding:0; font-family:'trebuchet ms'; color:#666; }
		body {
	background:url('img/login-bg.jpg') top repeat-x;
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
		#caixa { height:545px; width:280px; background:url('img/login-bg2.jpg') top no-repeat; margin:0 auto; padding:20px 45px 0 45px; }
		h1 { text-indent:-9000px; overflow:hidden; height:125px; width:200px; margin:0px auto 10px auto; background:url('img/logo2.gif') center no-repeat;  }
		h2 { text-indent:-9000px; overflow:hidden; height:20px; width:200px; margin:0 auto; background:url('img/login-painel.gif') center no-repeat;  }
		fieldset { border:0; margin-top:15px }
		fieldset label { font-size:13px; padding-top:10px; display:block; }
		fieldset input.texto { width:272px; height:27px; border:1px solid #ccc; font-size:13px; padding-top:8px; padding-left:8px; }
		#entrar { text-align:center; margin-top:30px; margin-bottom:30px; }
		#entrar input { width:150px; height:40px; border:0; background:url('img/login-entrar.gif') center no-repeat; cursor:pointer; }
		.extra { margin:0 auto; width:280px; height:25px; background:url('img/login-extra.jpg') center no-repeat; text-align:center; padding-top:10px; margin-top:0px; }
		.extra a { font-size:11px; text-decoration:underline; } 
        -->
    </style>
<?PHP

//  ------ create table variable ------
// variables for Netscape Navigator 3 & 4 are +4 for compensation of render errors
$Browser_Type  =  strtok($HTTP_ENV_VARS['HTTP_USER_AGENT'],  "/");
if ( ereg( "MSIE", $HTTP_ENV_VARS['HTTP_USER_AGENT']) || ereg( "Mozilla/5.0", $HTTP_ENV_VARS['HTTP_USER_AGENT']) || ereg("Opera/5.11", $HTTP_ENV_VARS['HTTP_USER_AGENT']) ) {
	$theTable = 'WIDTH="400" HEIGHT="245"';
} else {
	$theTable = 'WIDTH="400" HEIGHT="245"';
}

//echo $HTTP_ENV_VARS["QUERY_STRING"];

// ------ create document-location variable ------
if ( ereg("php\.exe", $HTTP_SERVER_VARS['PHP_SELF']) || ereg("php3\.cgi", $HTTP_SERVER_VARS['PHP_SELF']) || ereg("phpts\.exe", $HTTP_SERVER_VARS['PHP_SELF']) ) {
	$documentLocation = $HTTP_ENV_VARS['PATH_INFO'];
} else {
	$documentLocation = $HTTP_SERVER_VARS['PHP_SELF'];
}
if ( $HTTP_ENV_VARS['QUERY_STRING'] ) {
	$documentLocation .= "?" . $HTTP_ENV_VARS['QUERY_STRING'];
}
include("../config.php");

?>
<script LANGUAGE="JavaScript">
<!--
//  ------ check form ------
function checkData() {
	var f1 = document.forms[0];
	var wm = "<?PHP echo $strJSHello; ?>\n\r\n";
	var noerror = 1;

	// --- entered_login ---
	var t1 = f1.entered_login;
	if (t1.value == "" || t1.value == " ") {
		wm += "<?PHP echo $strLogin; ?>\r\n";
		noerror = 0;
	}

	// --- entered_password ---
	var t1 = f1.entered_password;
	if (t1.value == "" || t1.value == " ") {
		wm += "<?PHP echo $strPassword; ?>\r\n";
		noerror = 0;
	}

	// --- check if errors occurred ---
	if (noerror == 0) {
		alert(wm);
		return false;
	}
	else return true;
}
//-->
</SCRIPT>

Resolvido, obrigado pela atenção!

Minha página de login do admin está dando o seguinte erro:

Deprecated: mysql(): This function is deprecated; use mysql_query() instead in /home/esportecoxim/www/script/admin/protecao/checklogin.php on line 143 Deprecated: Function ereg() is deprecated in /home/esportecoxim/www/script/admin/protecao/interface.php on line 28 Deprecated: Function ereg() is deprecated in /home/esportecoxim/www/script/admin/protecao/interface.php on line 28 Deprecated: Function ereg() is deprecated in /home/esportecoxim/www/script/admin/protecao/interface.php on line 28 Deprecated: Function ereg() is deprecated in /home/esportecoxim/www/script/admin/protecao/interface.php on line 37 Deprecated: Function ereg() is deprecated in /home/esportecoxim/www/script/admin/protecao/interface.php on line 37 Deprecated: Function ereg() is deprecated in /home/esportecoxim/www/script/admin/protecao/interface.php on line 37


A página com erro é a seguinte:
<style type="text/css" media="screen" title="CSS do Admin">
        <!--
		* { margin:0; padding:0; font-family:'trebuchet ms'; color:#666; }
		body {
	background:url('img/login-bg.jpg') top repeat-x;
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
		#caixa { height:545px; width:280px; background:url('img/login-bg2.jpg') top no-repeat; margin:0 auto; padding:20px 45px 0 45px; }
		h1 { text-indent:-9000px; overflow:hidden; height:125px; width:200px; margin:0px auto 10px auto; background:url('img/logo2.gif') center no-repeat;  }
		h2 { text-indent:-9000px; overflow:hidden; height:20px; width:200px; margin:0 auto; background:url('img/login-painel.gif') center no-repeat;  }
		fieldset { border:0; margin-top:15px }
		fieldset label { font-size:13px; padding-top:10px; display:block; }
		fieldset input.texto { width:272px; height:27px; border:1px solid #ccc; font-size:13px; padding-top:8px; padding-left:8px; }
		#entrar { text-align:center; margin-top:30px; margin-bottom:30px; }
		#entrar input { width:150px; height:40px; border:0; background:url('img/login-entrar.gif') center no-repeat; cursor:pointer; }
		.extra { margin:0 auto; width:280px; height:25px; background:url('img/login-extra.jpg') center no-repeat; text-align:center; padding-top:10px; margin-top:0px; }
		.extra a { font-size:11px; text-decoration:underline; } 
        -->
    </style>
<?PHP

//  ------ create table variable ------
// variables for Netscape Navigator 3 & 4 are +4 for compensation of render errors
$Browser_Type  =  strtok($HTTP_ENV_VARS['HTTP_USER_AGENT'],  "/");
if ( ereg( "MSIE", $HTTP_ENV_VARS['HTTP_USER_AGENT']) || ereg( "Mozilla/5.0", $HTTP_ENV_VARS['HTTP_USER_AGENT']) || ereg("Opera/5.11", $HTTP_ENV_VARS['HTTP_USER_AGENT']) ) {
	$theTable = 'WIDTH="400" HEIGHT="245"';
} else {
	$theTable = 'WIDTH="400" HEIGHT="245"';
}

//echo $HTTP_ENV_VARS["QUERY_STRING"];

// ------ create document-location variable ------
if ( ereg("php\.exe", $HTTP_SERVER_VARS['PHP_SELF']) || ereg("php3\.cgi", $HTTP_SERVER_VARS['PHP_SELF']) || ereg("phpts\.exe", $HTTP_SERVER_VARS['PHP_SELF']) ) {
	$documentLocation = $HTTP_ENV_VARS['PATH_INFO'];
} else {
	$documentLocation = $HTTP_SERVER_VARS['PHP_SELF'];
}
if ( $HTTP_ENV_VARS['QUERY_STRING'] ) {
	$documentLocation .= "?" . $HTTP_ENV_VARS['QUERY_STRING'];
}
include("../config.php");

?>
<script LANGUAGE="JavaScript">
<!--
//  ------ check form ------
function checkData() {
	var f1 = document.forms[0];
	var wm = "<?PHP echo $strJSHello; ?>\n\r\n";
	var noerror = 1;

	// --- entered_login ---
	var t1 = f1.entered_login;
	if (t1.value == "" || t1.value == " ") {
		wm += "<?PHP echo $strLogin; ?>\r\n";
		noerror = 0;
	}

	// --- entered_password ---
	var t1 = f1.entered_password;
	if (t1.value == "" || t1.value == " ") {
		wm += "<?PHP echo $strPassword; ?>\r\n";
		noerror = 0;
	}

	// --- check if errors occurred ---
	if (noerror == 0) {
		alert(wm);
		return false;
	}
	else return true;
}
//-->
</SCRIPT>

Resolvido, obrigado pela atenção!


Achei que tivesse resolvido mas não consegui.

Li sobre o preg_match, como substituir e alterar de "abc" para "/abc/", mas gostaria que me informasse sobre somo utilizar no caso em que dentro das aspas já tem a barra e até a barra invertida como no caso seguinte

ereg("php\.exe", $HTTP_SERVER_VARS['PHP_SELF'])
E...
ereg( "Mozilla/5.0", $HTTP_ENV_VARS['HTTP_USER_AGENT'])





1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq