alexw0w
-
Posts
8 -
Joined
-
Last visited
Posts posted by alexw0w
-
-
happy? and I put the playersYour title is "Online players script" not accounts... so I simply gave you an alternate way @Will .
-
but this works just from the database of the characterscharacters.characters... if online is 1 then online. 0 is offline.
-
configs.php
<? $servidor = "127.0.0.1"; $usuario = "root"; $clave = "pass"; $logon = "logon"; $char = "characters"; $world = "world"; $conecta = mysql_connect($servidor, $usuario, $clave) or die("No se ha podido conectar con el servidor MySQL. Int�ntalo mas tarde."); ?>
players_on.php
<?php include("configs-php"); $online = '1'; $playerson = mysql_query("SELECT * FROM $char.characters WHERE online='".$online."'"); $playerson1 = mysql_num_rows($playerson); ?> Players online : <b><?=$playerson1?></b>
-
configs.php
<? $servidor = "127.0.0.1"; $usuario = "root"; $clave = "pass"; $logon = "logon"; $char = "characters"; $world = "world"; $conecta = mysql_connect($servidor, $usuario, $clave) or die("No se ha podido conectar con el servidor MySQL. Intentalo mas tarde."); ?>
registro.php
<?php function sha_password($user,$pass) { $user = strtoupper($user); $pass = strtoupper($pass); return SHA1($user.':'.$pass); } include("configs.php"); if(isset($_POST['enviar'])) { function valida_email($correo) { if (eregi("^[_.0-9a-z-]+@[0-9a-z._-]+.[a-z]{2,4}$", $correo)) return true; else return false; } $sin_espacios = count_chars($_POST['username'], 1); if(!empty($sin_espacios[32])) { echo "El campo <em>username</em> no debe contener espacios en blanco. <a href='javascript:history.back();'>Reintentar</a>"; }elseif(empty($_POST['username'])) { echo "No has ingresado tu usuario. <a href='javascript:history.back();'>Reintentar</a>"; }elseif(empty($_POST['sha_pass_hash'])) { echo "No has ingresado contraseña. <a href='javascript:history.back();'>Reintentar</a>"; }elseif(empty($_POST['expansion'])) { echo "No has seleccionado la expansion. <a href='javascript:history.back();'>Reintentar</a>"; }elseif($_POST['sha_pass_hash'] != $_POST['sha_pass_hash_conf']) { echo "Las contraseñas ingresadas no coinciden. <a href='javascript:history.back();'>Reintentar</a>"; }elseif(!valida_email($_POST['email'])) { echo "El email ingresado no es válido. <a href='javascript:history.back();'>Reintentar</a>"; }else { $username = mysql_real_escape_string($_POST['username']); $sha_pass_hash = sha_password($username,$_POST['sha_pass_hash']); $email = mysql_real_escape_string($_POST['email']); $expansion = mysql_real_escape_string($_POST['expansion']); $sql = mysql_query("SELECT username FROM $logon.account WHERE username='".$username."'"); if(mysql_num_rows($sql) > 0) { echo "El nombre usuario elegido ya ha sido registrado anteriormente. <a href='javascript:history.back();'>Reintentar</a>"; }else { $sha_pass_hash = md5($sha_pass_hash); $reg = mysql_query("INSERT INTO $logon.account (username, sha_pass_hash, email, expansion) VALUES ('".$username."', '".$sha_pass_hash."', '".$email."', '".$expansion."')"); if($reg) { echo "Datos ingresados correctamente."; }else { echo "ha ocurrido un error y no se registraron los datos."; } } } }else { ?> <br><form action="<?=$_SERVER['PHP_SELF']?>" method="post"> <label>Usuario:</label><br /> <input type="text" name="username" size="21" class="inputbox" maxlength="15" /><br /> (Selecciona el nombre de usuario, con el que usted podra iniciar sesion en WoW Sanguino)<br><br> <label>Clave:</label><br /> <input type="password" name="sha_pass_hash" size="25" class="inputbox" maxlength="15" /><br /> (Escoje una clave que no usas para otras cuentas para mas seguridad) <br><br> <label>Confirmar Clave:</label><br /> <input type="password" name="sha_pass_hash_conf" size="25" class="inputbox" maxlength="15" /><br /> (Confirma la clave que ingresaste anteriormente)<br><br> <label>Email:</label><br /> <input type="text" name="email" class="inputbox" size="23" maxlength="50" /><br /> (Escriba un email valido para tener mas seguridad en su cuenta)<br><br> <label>Expansion:</label><br> <select class="inputbox" name="expansion"> <option SELECTED value="3">Cataclismo</option> <option value="2">Wrath Of The Lich King</option> </select><br>(Selecciona la expansion que usted desea tener en su cuenta. Recomendable <b>Cataclismo</b>)<br><br> <input type="submit" name="enviar" value="Registrar" /> <input type="reset" value="Borrar" /> </form> <?php } ?>
Pronto muchos mas scripts, yo estoi haciendo un proyecto y mientras que ago scripts para la web los subo aqui para compartirlo con ustedes
-
Thanks for the code and add it to my site
-
thank you very much, helped me a lot of these codes
-
Hello, I put this post to see if I can help with some scripts for my web skyfire grateful if you leave me a few as: - Page code for online players list - Change of races - Change of name characters and stuff. I hope someone can help me, not too much to ask as many already know very well handle php Please read the message
MiniManager for SkyfireEMU
in Web Scripts
Posted
Cool, thancks :D