<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0032)http://localhost/news//index.php -->
<HTML><HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</HEAD>
<? 
include("cnn.php");
include("config/conf_cadastro.php");
?>
<script language="JavaScript">
 function blockError(){return true;}
 window.onerror = blockError;
 </script>
<script language=JavaScript>
 function disableselect(e) {
    return false
 } 
 function reEnable() {
    return true
 }
 //if IE4+
 document.onselectstart=new Function ("return false")
 //if NS6
 if (window.sidebar) { 
    document.onmousedown=disableselect
    document.onclick=reEnable
 }
 </script>

<BODY bgcolor="#222222" leftMargin=9 topMargin=9>
<div align="left"><strong>
</strong>
  <span class="style3">
  </span>
  <table width="447" border="0" cellpadding="0" cellspacing="0">
    <!--DWLayoutTable-->
    <tr>
      <td width="447" height="18" valign="top" class="style22" scope="col">   <span class="style24">
      <?php
require_once "sql_inject.php"; 
$bDestroy_session = TRUE; 
$url_redirect = 'index.php'; 
$sqlinject = new sql_inject('./log_file_sql.log',$bDestroy_session,$url_redirect)  ; 
require 'config.php';
$login = stripslashes($_POST['login']);
$name = stripslashes($_POST['name']);
$email = stripslashes($_POST['email']);
$idnumb = stripslashes($_POST['idnumb']);
$pw = stripslashes($_POST['pw']);
$cpw = stripslashes($_POST['cpw']);
$sques = stripslashes($_POST['squest']);
$sansw = stripslashes($_POST['sansw']);
$sql_email_check = mssql_query("SELECT mail_addr FROM MEMB_INFO WHERE mail_addr='$email'"); 
$sql_username_check = mssql_query("SELECT memb___id FROM MEMB_INFO WHERE memb___id='$login'"); 
$email_check = mssql_num_rows($sql_email_check); 
$username_check = mssql_num_rows($sql_username_check); 

if (($email_check > 0) || ($username_check > 0) || empty($login) || empty($name) || empty($email) || empty($idnumb) || empty($pw) || empty($cpw) || empty($sques) || empty($sansw)) 
{ 
    echo "<h1>Atenção</h1>";
	
	if (empty($login) || empty($name) || empty($email) || empty($idnumb) || empty($pw) || empty($cpw) || empty($sques) || empty($sansw))
{ 
echo "<blockquote>Por favor preencha todos os campos</blockquote>";
}

    elseif($email_check > 0){ 
        echo "<blockquote>'$email' esse e-mail ja está sendo usando por outro membro.</blockquote>"; 
        $Error=1;
    } 
    elseif ($username_check > 0)
	{ 
        echo "<blockquote>'$login' esse login ja está sendo usado por outro membro.</blockquote>"; 
         $Error=1;
    } 
elseif ($pw != $cpw) 
{
	echo "<blockquote>As Senhas devem ser iguais.</blockquote>";  $Error=1;
}

}
else
{
$msquery2 = "SET IDENTITY_INSERT MEMB_INFO ON";
$msquery3 = "INSERT INTO MEMB_INFO (memb_guid,memb___id,memb__pwd,memb_name,sno__numb,post_code,addr_info,addr_deta,tel__numb,mail_addr,phon_numb,fpas_ques,fpas_answ,job__code,appl_days,modi_days,out__days,true_days,mail_chek,bloc_code,ctl1_code,vip,creditos) VALUES ('1','$login','$pw','$name', '1','1234','11111','$idnumb','12343','$email','$email','$sques','$sansw','1','2003-11-23','2003-11-23','2003-11-23','2003-11-23','1','0','1','$vipaocadastro','$creditosaocadastro')";
$msquery4 = "INSERT INTO VI_CURR_INFO (ends_days,chek_code,used_time,memb___id,memb_name,memb_guid,sno__numb,Bill_Section,Bill_value,Bill_Hour,Surplus_Point,Surplus_Minute,Increase_Days )  VALUES ('2005','1',1234,'$login','$name',1,'7','6','3','6','6','2003-11-23 10:36:00','0' )";
$msresults= mssql_query($msquery2);
$msresults= mssql_query($msquery3);
$msresults= mssql_query($msquery4);
echo "<p align='center'><h1>Conta criada com sucesso</h1><blockquote> Obrigado por se cadastrar.<br></p>
 <br><p align='left'>Login: $login<br>
          Nome:  $name <br>
          E-mail: $email<br>
          ID Numero: $idnumb<br>
          Senha: $pw<br>
          Pergunta secreta: $sques<br>
          Resposta secreta: $sansw </p></blockquote>";
}
?>
      </span></td>
    </tr>
  </table>
  <span class="style21"><br>
  </span><span class="style3"><br>
  </span><br>
  <br>
<span class="style3"></span></div>
</BODY>
</HTML>