Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- *
- * - 2015 -
- * Todos los derechos reservados a su respectivo dueño.
- *
- *
- */
- require_once("engine/core.cms.php");
- if(Loged == TRUE)
- {
- header("Location: me");
- exit;
- }
- // Hacemos el Login
- if(isset($_POST['Username']) && isset($_POST['Password']))
- {
- // Seleccionamos al usuario introducido.
- $Getuser = mysql_query("SELECT * FROM users WHERE username = '". $_POST['Username'] ."' AND password = '". md5($_POST['Password']) ."'");
- // Si los campos estan vacios, lanza error
- if(empty($_POST['Username']) || empty($_POST['Password']))
- {
- $loginerror = '<div id="error">Debes llenar todos los campos</div>';
- }
- // Si el usuario no existe, lanza error
- elseif(mysql_num_rows($Getuser) == 0)
- {
- $loginerror = '<div id="error">El usuario no existe o la contraseña es incorrecta</div>';
- }
- // Si no hubo ningún error, agarra la sesión del usuario
- else
- {
- if(mysql_num_rows($Getuser) > 0)
- {
- $_SESSION['Username'] = $_POST['Username'];
- $_SESSION['Password'] = $_POST['Password'];
- header("Location: me");
- }
- }
- }
- ?>
- <!DOCTYPE HTML>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <link rel="shortcut icon" href="<?php echo $Holo['url']; ?>/favicon.ico" type="image/vnd.microsoft.icon" />
- <link href='http://fonts.googleapis.com/css?family=Open+Sans+Condensed:300' rel='stylesheet' type='text/css'>
- <link href='http://fonts.googleapis.com/css?family=Maven+Pro' rel='stylesheet' type='text/css'>
- <link href='http://fonts.googleapis.com/css?family=Ubuntu' rel='stylesheet' type='text/css'>
- <link href='http://fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'>
- <link href="https://fonts.googleapis.com/css?family=Pacifico" rel="stylesheet">
- <link href='http://fonts.googleapis.com/css?family=Pinyon+Script' rel='stylesheet' type='text/css'>
- <script type="text/javascript" src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
- <link rel="stylesheet" type="text/css" href="<?php echo $Holo['url']; ?>/assets/css/index.css" />
- <title><?php echo $Holo['name']; ?> » Haz amig@s, crea salas, diviertete.</title>
- </head>
- <body>
- <!-- Login -->
- <div id="login">
- <center>
- <form action="" method="POST">
- <span class="logo" style="
- margin-right: 30px;
- "><img src="http://i.imgur.com/7UZfrRD.png" style="
- margin-top: -10px;
- margin-bottom: -20px;
- "></span>
- <input type="text" name="Username" placeholder="USUARIO" />
- <input type="password" name="Password" placeholder="CONTRASEÑA" />
- <input type="submit" value="ENTRAR" />
- </form>
- </center>
- </div>
- <?php echo $loginerror; ?>
- <?php if(MANTENIMIENTO == '1') { ?><div class="mant-check">EL HOTEL ESTA EN MANTENIMIENTO.</div><?php } ?>
- <div id="megabox">
- <div class="desc" style="
- border-radius: 4px;
- width: 165px;
- background: rgba(0,0,0,0.75);
- ">
- Hay
- <br/>
- <b>Muchos</b><br> usuarios jugando dentro!</b>
- </div>
- <a href="<?php echo $Holo['url']; ?>/registro">
- <div class="reg" style="
- background-color: rgb(41, 132, 33);
- font-size: 20px;
- border: 1px solid #3f6839;
- ">
- Regístrate ahora en <?php echo $Holo['name']; ?><br>
- <b style="
- font-size: 18px;
- ">¡ÈS GRATIS!</b>
- </div>
- </a>
- </div>
- <table id="ur">
- <?php
- $last_u = mysql_query("SELECT * FROM users ORDER BY id DESC LIMIT 5");
- while($lu = mysql_fetch_assoc($last_u))
- {
- ?>
- <td>
- <div id="avatar" style="background: url('<?php echo $Holo['avatar'] . $lu['look']; ?>&direction=2&head_direction=3&gesture=sml&action=wav&size=n'); background-position: -10px -15px;"></div>
- </td>
- <td>
- <font style="margin-right: 20px;">
- <?php echo $lu['username']; ?>
- <br/>
- <?php echo GetLast($lu['date_created']); ?>
- </font>
- </td>
- <?php } ?>
- </table>
- <!-- Footer de la web -->
- <footer>
- <?php echo $Holo['footer']; ?>
- </footer>
- <script type="text/javascript">
- var pmauid = '26497';
- var pmawid = '25000';
- var fq = '86400';
- </script>
- <script type="text/javascript" src="http://cdn.popmyads.com/pma.js"></script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement