
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0032)http://localhost/news//index.php -->
<?php require 'cnn.php'; ?>
<HTML><HEAD><TITLE>Re-senhadone</TITLE>
<meta http-equiv=Page-Exit content=blendTrans(Duration=1.0)>
<?PHP include("cnn.php");
require_once "configs/sql_inject.php"; 
$bDestroy_session = TRUE; 
$url_redirect = 'home.php'; 
$sqlinject = new sql_inject('./log_file_sql.log',$bDestroy_session,$url_redirect)  ; 
require 'cnn.php';
?>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">

<META content="MSHTML 6.00.2800.1400" name=GENERATOR>
<style type="text/css">
<!--
body,td,th {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 10px;
	color: #333333;
}
a {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 10px;
	color: #333333;
}
a:link {
	text-decoration: none;
}
a:visited {
	text-decoration: none;
	color: #333333;
}
a:hover {
	text-decoration: none;
	color: #FF0000;
}
a:active {
	text-decoration: none;
	color: #FF0000;
}
-->
</style></HEAD>
<BODY bgcolor="#FFFFFF">

<div align="center">
  <?php
$email = stripslashes($_POST['email']);
$question = stripslashes($_POST['ques']);
$answer = stripslashes($_POST['answer']);
$idnumb = stripslashes($_POST['idnumb']);

$sql_email_check = mssql_query("SELECT mail_addr FROM MEMB_INFO WHERE mail_addr='$email' and fpas_ques = '$question'"); 
$email_check = mssql_num_rows($sql_email_check); 
$sql_answ_check = mssql_query("SELECT fpas_answ FROM MEMB_INFO WHERE fpas_answ = '$answer' and fpas_ques = '$question'"); 
$answ_check = mssql_num_rows($sql_answ_check); 
$sql_id_check = mssql_query("SELECT addr_deta FROM MEMB_INFO WHERE addr_deta = '$idnumb' and fpas_ques = '$question'"); 
$id_check = mssql_num_rows($sql_id_check); 

if (empty($email) || empty($question) || empty($answer) || empty($idnumb) || ($email_check <= 0) || ($answ_check <= 0) || ($id_check <= 0)) 
{
echo "Error: <br><br>";

if (empty($email) || empty($question) || empty($answer) || empty($idnumb)) {
    echo "Alguns espaços foram deichados em branco, por favor volte e tente novamente <br>";
}
	
elseif ($email_check <= 0){ 
echo "'$email' não confere com o e-mail do cadastro, por favor volte e tente novamente.<br>"; 
    } 

elseif ($answ_check <= 0){ 
echo "Resposta secreta incorreta, por favor volte e tente novamente.<br>"; 
    } 

elseif ($id_check <= 0){ 
echo "ID Numero incorreto, por favor volte e tente novamente.<br>"; 
    } }

else {	
$sql = mssql_query("SELECT memb__pwd from MEMB_INFO
    WHERE mail_addr = '$email'
    and fpas_ques = '$question'
    and fpas_answ = '$answer'
	and addr_deta = '$idnumb'");
echo "Sua senha foi recuperada com sucesso.<br><br>Sua senha é : ";
echo mssql_result($sql, 0, 0);}
?>
  </div>
</div>
</BODY></HTML>