Ir para conteúdo
  • Cadastre-se
  • 0

(Resolvido) Registro pelo site


Eduardo Dias

Pergunta

Por favor ..c alguem entende de PHP / Msql ae me ajuda

naum consigo criar conta pelo site...da o seguinte erro

O conteúdo está oculto, favor efetuar login ou se cadastrar!

 

 

o script q ta dando erro ta

<html>

<?php

 

// configs

$hostname = "localhost"; // your database location

$database = "l2jdb"; // your l2j database

$user = "root"; // your database user

$pass = ""; // your database password

 

$connect = @mysql_connect($hostname, $user, $pass);

@mysql_select_db($database, $connect);

$ip=$_SERVER['REMOTE_ADDR'];

 

$allowed = "10"; // max allowed accounts per IP

 

$checkmasterip = @mysql_query("SELECT lastIP FROM accounts WHERE lastIP = '$ip'");

$checknumip = @mysql_num_rows($checkmasterip);

 

$link = mysql_connect($L2JBS_config['mysql_host'].":".$L2JBS_config['mysql_port'], $L2JBS_config['mysql_login'], $L2JBS_config['mysql_password'], $L2JBS_config['mysql_email'], $L2JBS_config['mysql_pergunta1'], $L2JBS_config['mysql_resposta1'], $L2JBS_config['mysql_pergunta2'], $L2JBS_config['mysql_resposta2']);

{

if($_POST['login']!='' & $_POST['pass']!='' && $_POST['cpass']!='')

{

function l2j_encrypt($password)

{

return base64_encode(pack("H*", sha1(utf8_encode($password))));

}

$login = $_POST['login'];

$passw = l2j_encrypt($_POST['pass']);

$cpassw = l2j_encrypt($_POST['cpass']);

$email = ($_POST['email']);

$pergunta1 = ($_POST['pergunta1']);

$resposta1 = ($_POST['resposta1']);

$pergunta2 = ($_POST['pergunta2']);

$resposta2 = ($_POST['resposta2']);

$ok = 1;

if($checknumip>=$allowed)

{

$ok = 0;

}

if($passw==$cpassw)

if($pergunta1==$resposta1)

if($pergunta2==$resposta2)

{

if($ok==0)

{

echo '<form action="" method="POST">Error: detected '.$allowed.' conta (s) a partir do seu IP, este é o máximo permitido por IP!<br /><input type="submit" value="OK"></form>';

}

elseif($ok==1)

{

$checkaccexist = @mysql_query("SELECT login FROM accounts WHERE login = '$login'");

$checknum = @mysql_num_rows($checkaccexist);

if($checknum==1)

{

echo '<form action="" method="POST">O Login "'.$login.'" já está em uso!<br /><input type="submit" value="Tentar denovo!"></form>';

}

else

{

$lastactive = time()*1000;

$pass = $_POST['pass'];

@mysql_query("INSERT INTO accounts(login, password, lastactive, lastIP, email, pergunta1, resposta1, pergunta2, resposta2) VALUES ('$login', '$passw', '$lastactive', '$ip', '$email', '$pergunta1', '$resposta1', '$pergunta2', '$resposta2') ;");

echo '<form action="" method="POST"><font color="#00FF00">A conta"'.$login.'" foi criada.</font><br /><input type="submit" value="OK"></form>';

}

}

}

else

{

echo '<form action="" method="POST">Senha nao corresponde com a anterior<br /><input type="submit" value="Retry"></form>';

}

}

else

{

echo '<form action="" method="POST">Você não preencher todos os campos. Todos os campo são obrigatórios!<br /><input type="submit" value="Retry"></form>';

}

}

 

if($checknumip<$allowed)

{

$checknumip = '<span class="online">'.$checknumip.'</span>';

}

else

{

$checknumip = '<span class="offline">'.$checknumip.'</span>';

}

 

@mysql_close($connect);

?></font>

<script>

function isEmailAddress(email) {

if (email.match(/^([a-zA-Z0-9])+([.a-zA-Z0-9_-])*@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-]+)+/)) {

return true;

} else {

return false;

}

}

 

function isAlphaNumeric(value) {

if (value.match(/^[a-zA-Z0-9]+$/)) {

return true;

} else {

return false;

}

}

 

function checkform() {

if(register.login.value=="") {

alert("Campo Conta está Vazio.")

return false;

}

if (!isAlphaNumeric(register.login.value)) {

alert("Não Utilize Caracters Alpha Número para a Conta!!");

return false;

}

if(register.pass.value=="") {

alert("Campo Senha Está Vazio")

return false;

}

if (!isAlphaNumeric(register.pass.value)) {

alert("Não Utilize Caracters Alpha Número para a Senha!!");

return false;

}

if(register.cpass.value=="") {

alert("Confirmação de Senha Está Vazio")

return false;

}

if(register.email.value=="") {

alert("Campo E-mail Está Vazio")

return false;

}

if (!isEmailAddress(register.email.value)) {

alert("E-mail Incorreto!! Por favor verifique e tente novamente!");

return false;

}

if(register.pergunta1.value=="") {

alert("Campo Pergunta #1 Deve ser preenchido.")

return false;

}

if(register.resposta1.value=="") {

alert("O Campo Resposta #1 Deve ser Preenchido #1.")

return false;

}

if(register.pergunta2.value=="") {

alert("O Campo Pergunta #2 Deve ser Preenchido.")

return false;

}

if(register.resposta2.value=="") {

alert("O Campo Resposta #1 Deve ser Preenchido #1.")

return false;

}

return true;

}

</script>

<link href='../style/styles.css' rel='stylesheet' type='text/css'>

<body bgcolor='#e9e4db' topmargin='0' leftmargin='0' rightmargin='0'>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>..:: Lineage Xp Server ::..</title>

<link href='style/styles.css' rel='stylesheet' type='text/css'>

<body bgcolor='#e9e4db' topmargin='0' leftmargin='0' rightmargin='0'>

<table width="703" align="center" border="0" cellpadding="0">

<tr>

<td height="96">

<center>

<img src="../imgs/topo.png" border="0">

</center>

</td>

</tr>

</table>

 

<table width="706" height="74" border="0" align="center">

<tr>

<td width="696">

<tr valign='top'>

<td width='100%' align='center'>

<table width='703' border='0' cellpadding='0'>

 

<tr>

<td width='700' height='18' background='../imgs/header.gif' class='header'>

<center>

..:: Painel de Controle ::..

</center>

</td>

</tr>

<td style='border-left:1px solid black;border-right:1px solid black;' class='normal'>

<div style='margin: 10px;'>

 

<table cellspacing=0 border=0 cellpadding=0 align=center>

<tr>

<script src="../SpryAssets/SpryMenuBar.js" type="text/javascript"></script>

<link href="../SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />

</head>

 

<body>

<div align="center">

<ul id="MenuBar1" class="MenuBarHorizontal">

<li><a href="#"><img src="../imgs/home.jpg"></a></li>

<li><a class="MenuBarItemSubmenu" href="#"><img src="../imgs/options.jpg"></a>

<ul>

<li><a href="trocasenha.php"><img src="../imgs/changepassword.jpg"></a></li>

<li><a href="registra.php"><img src="../imgs/register.jpg"></a></li>

</ul>

</li>

<li><a href="../logout.php"><img src="../imgs/logout.jpg"></a></li>

</ul>

</div>

<script type="text/javascript">

<!--

var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});

//-->

</script>

</tr>

</table>

 

</div>

</td>

</tr>

<tr>

<td background='../imgs/footer.gif' height='20'>

</td>

</tr>

</table>

</td>

</tr>

<table width="703" align="center" border="0" cellpadding="0">

<tr>

<tr valign='top'>

<td width='100%' align='center'>

<table width='703' border='0' cellpadding='0'>

 

<tr>

<td width='700' height='18' background='../imgs/header.gif' class='header'>

<center>

..:: Cadastro ::..

</center>

</td>

</tr>

<td style='border-left:1px solid black;border-right:1px solid black;' class='normal'>

<div style='margin: 10px;'>

 

<form name='register' action='' method='POST' onsubmit='return checkform()' autocomplete='off'>

<table cellspacing=0 border=0 cellpadding=0 align=center>

<tr>

<td width=200>

Conta - ACC

</td>

<td>

<div align=left>

<input type=text maxlength=14 name=login>

</div>

</td>

</tr>

<tr>

<td>

Senha

</td>

<td>

<div align=right>

<input type=password maxlength=16 name=pass>

</div>

</td>

</tr>

<tr>

<td>

Confirmar Senha

</td>

<td>

<div align=right>

<input type=password maxlength=16 name=cpass>

</div>

</td>

</tr>

<tr>

<td>

E-mail

</td>

<td>

<div align=right>

<input type=text maxlength=50 name=email>

</div>

</td>

</tr>

<tr>

<td>

Pergunta #1

</td>

<td>

<div align=right>

<input type=text maxlength=250 name=pergunta1>

</div>

</td>

</tr>

<tr>

<td>

Resposta #1

</td>

<td>

<div align=right>

<input type=text maxlength=16 name=resposta1>

</div>

</td>

</tr>

<tr>

<td>

Pergunta #2

</td>

<td>

<div align=right>

<input type=text maxlength=250 name=pergunta2>

</div>

</td>

</tr>

<tr>

<td>

Resposta #2

</td>

<td>

<div align=right>

<input type=text maxlength=16 name=resposta2>

</div>

</td>

</tr>

</table>

<div align=center>

<BR>

<input type="image" src="../imgs/register.jpg" width="70" height="22" onclick="return avaliaCampos(this.form);" id=image1 name=image1>

 

<input type="image" src="../imgs/limpar.jpg" width="70" height="22" onclick="this.form.reset(); return false;" id=image2 name=image2>

 

</div>

</form>

</div>

</td>

</tr>

<tr>

<td background='../imgs/footer.gif' height='20'>

 

</td>

</tr>

</table>

</td>

</tr>

 

<tr>

<td class="normal"> 

 

</td>

 

</tr>

 

</table>

 

</body>

</html>

 

 

 

a table do Msql

O conteúdo está oculto, favor efetuar login ou se cadastrar!

 

eu tirei issu do topico

Painel

 

 

por favor me ajuden falta apenas arruma isso no site...so falta registra pelo site

915636370.png

 

123http://lh4.ggpht.com/_pUGeK1LsfXg/SzF-Y8-b86I/AAAAAAAAANU/A4Lo0L3AAAk/topic7.gifhttp://img198.imageshack.us/img198/1233/grankains.jpghttp://img220.imageshack.us/img220/897/jbuv.gif

Links OFF? Mande MP!!!

Link para o comentário
Compartilhar em outros sites

0 respostass a esta questão

Posts recomendados

Até agora não há respostas para essa pergunta

Visitante
Este tópico está impedido de receber novos posts.




×
×
  • Criar Novo...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.