eu nao consigo fazer cadastro nele e nem ve o rank´s ele nao esta connectando a Dbs olha minha confi. do re.php lembrando q to testando ele 1 no meu pc depois para hospedar
<link rel="STYLESHEET" type="text/css" href="estilo.css">
<?php
include 'cfg/config.php';
$L2JBS_config["mysql_host"]="$localhost"; // MySQL IP
$L2JBS_config["mysql_port"]=3306; // MySQP port
$L2JBS_config["mysql_db"]="$l2jdb"; // l2jdb or your lineage 2 server database name
$L2JBS_config["mysql_login"]="$root"; // MySQL Login name
$L2JBS_config["mysql_password"]="$4560"; // MySQL Password
error_reporting(0);
?>
<?php
$L2JBS_config["javascript_sort_method"]="bubble";
$link = mysql_connect($l2jdb_config['mysql_host'].":".$l2jdb_config['mysql_port'], $l2jdb_config['mysql_login'], $l2jdb_config['mysql_password']);
if (!$link)
?>
<style type="text/css">
<!--
.style7 {font-size: 10px}
-->
</style>
<H3>
<span class="style5">Registrar
</h33>
</span>
<script type="text/javascript">//<![CDATA[
function isAlphaNumeric(value)
{
if (value.match(/^[a-zA-Z0-9]+$/))
return true;
else
return false;
}
function checkform(f)
{
if (f.account.value=="")
{
alert("Preencha todos os campos!");
return false;
}
if (!isAlphaNumeric(f.account.value))
{
alert("Preencha todos os campos!");
return false;
}
if (f.password.value=="")
{
alert("Sem Senha ");
return false;
}
if (!isAlphaNumeric(f.password.value))
{
alert("444444");
return false;
}
if (f.password2.value=="")
{
alert("Você não repetiu a senha");
return false;
}
if (f.password.value!=f.password2.value)
{
alert("Senhas não são iguais ");
return false;
}
return true;
}
//]]></script>
<form method="post" action="reg.php" onsubmit="return checkform(this)">
<table>
<tr>
<td><b class="style5"><font face="Trebuchet MS">Login</font></b></td>
<td><font face="Trebuchet MS" size="1"><b>
<input type="text" name="account" maxlength="15" size="20" /></b></font></td>
</tr>
<tr>
<td><b class="style5"><font face="Trebuchet MS">E-mail</font></b></td>
<td><font face="Trebuchet MS" size="1"><b>
<input type="text" name="email" maxlength="150" size="20" /></b></font></td>
</tr>
<tr>
<td><span class="style5"><b><font face="Trebuchet MS">Senha</font></b></span></td>
<td><font face="Trebuchet MS" size="1"><b>
<input type="password" name="password" maxlength="15" size="20" /></b></font></td>
</tr>
<tr>
<td><b class="style5"><font face="Trebuchet MS">Repetir Senha</font></b></td>
<td><font face="Trebuchet MS" size="1"><b>
<input type="password" name="password2" maxlength="15" size="20" /></b></font></td>
</tr>
<tr>
<td colspan="2" style="text-align: center;">
<font size="1" face="Trebuchet MS"><b><br />
<input type="submit" name="submit" value="Registrar" /></b></font></td>
</tr>
</table>
</form>
<?php
if(ereg("^([a-zA-Z0-9_-])*$", $_POST['account']) && ereg("^([a-zA-Z0-9_-])*$", $_POST['password']) && ereg("^([a-zA-Z0-9_-])*$", $_POST['password2']))
{
if ($page="index.php" && $_POST['account'] && strlen($_POST['account'])<16 && strlen($_POST['account'])>3 && $_POST['password'] && $_POST['password2'] && $_POST['password']==$_POST['password2'])
{
$check=mysql_query("select * from accounts where login='".$_POST['account']."' AND '".$_POST['email']."'");
$check1=mysql_num_rows($check);
if($check1>0)
{
echo "<p clss='error'><b>Falha no Registro, Conta já Existe .</b></p>";
}
else
{
mysql_query("INSERT INTO accounts (login, password, email) VALUES ('".$_POST['account']."', '".base64_encode(pack('H*', sha1($_POST['password'])))."', '".$_POST['email']."')", $link);
mysql_close($link);
print '<p class="error"><b>Resgistro Completo... Conta Criada </b></p>';
}
}
else
{
print '<p class="error"><b> </b></p>'.mysql_error();
}
}
else
{
echo "As limitações não foram testadas para a segurança. Se você for confiável que tido a informação correta, consultar por favor à administração. ";
}
?>
|