Advertisement
Guest User

index jao

a guest
Sep 22nd, 2016
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.48 KB | None | 0 0
  1. <?php
  2. /*
  3. *
  4. * - 2015 -
  5. * Todos los derechos reservados a su respectivo dueño.
  6. *
  7. *
  8. */
  9.  
  10. require_once("engine/core.cms.php");
  11.  
  12. if(Loged == TRUE)
  13. {
  14. header("Location: me");
  15. exit;
  16. }
  17.  
  18. // Hacemos el Login
  19.  
  20. if(isset($_POST['Username']) && isset($_POST['Password']))
  21. {
  22. // Seleccionamos al usuario introducido.
  23. $Getuser = mysql_query("SELECT * FROM users WHERE username = '". $_POST['Username'] ."' AND password = '". md5($_POST['Password']) ."'");
  24.  
  25. // Si los campos estan vacios, lanza error
  26. if(empty($_POST['Username']) || empty($_POST['Password']))
  27. {
  28. $loginerror = '<div id="error">Debes llenar todos los campos</div>';
  29. }
  30. // Si el usuario no existe, lanza error
  31. elseif(mysql_num_rows($Getuser) == 0)
  32. {
  33. $loginerror = '<div id="error">El usuario no existe o la contraseña es incorrecta</div>';
  34. }
  35. // Si no hubo ningún error, agarra la sesión del usuario
  36. else
  37. {
  38. if(mysql_num_rows($Getuser) > 0)
  39. {
  40. $_SESSION['Username'] = $_POST['Username'];
  41. $_SESSION['Password'] = $_POST['Password'];
  42. header("Location: me");
  43. }
  44. }
  45. }
  46. ?>
  47.  
  48. <!DOCTYPE HTML>
  49. <html>
  50. <head>
  51. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  52. <link rel="shortcut icon" href="<?php echo $Holo['url']; ?>/favicon.ico" type="image/vnd.microsoft.icon" />
  53. <link href='http://fonts.googleapis.com/css?family=Open+Sans+Condensed:300' rel='stylesheet' type='text/css'>
  54. <link href='http://fonts.googleapis.com/css?family=Maven+Pro' rel='stylesheet' type='text/css'>
  55. <link href='http://fonts.googleapis.com/css?family=Ubuntu' rel='stylesheet' type='text/css'>
  56. <link href='http://fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'>
  57. <link href="https://fonts.googleapis.com/css?family=Pacifico" rel="stylesheet">
  58. <link href='http://fonts.googleapis.com/css?family=Pinyon+Script' rel='stylesheet' type='text/css'>
  59. <script type="text/javascript" src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
  60. <link rel="stylesheet" type="text/css" href="<?php echo $Holo['url']; ?>/assets/css/index.css" />
  61.  
  62. <title><?php echo $Holo['name']; ?> &#187; Haz amig@s, crea salas, diviertete.</title>
  63.  
  64. </head>
  65. <body>
  66.  
  67. <!-- Login -->
  68. <div id="login">
  69. <center>
  70. <form action="" method="POST">
  71. <span class="logo" style="
  72. margin-right: 30px;
  73. "><img src="http://i.imgur.com/7UZfrRD.png" style="
  74. margin-top: -10px;
  75. margin-bottom: -20px;
  76. "></span>
  77.  
  78. <input type="text" name="Username" placeholder="USUARIO" />
  79. <input type="password" name="Password" placeholder="CONTRASEÑA" />
  80. <input type="submit" value="ENTRAR" />
  81. </form>
  82. </center>
  83. </div>
  84.  
  85. <?php echo $loginerror; ?>
  86.  
  87. <?php if(MANTENIMIENTO == '1') { ?><div class="mant-check">EL HOTEL ESTA EN MANTENIMIENTO.</div><?php } ?>
  88.  
  89. <div id="megabox">
  90. <div class="desc" style="
  91. border-radius: 4px;
  92. width: 165px;
  93. background: rgba(0,0,0,0.75);
  94. ">
  95. Hay
  96. <br/>
  97. <b>Muchos</b><br> usuarios jugando dentro!</b>
  98. </div>
  99. <a href="<?php echo $Holo['url']; ?>/registro">
  100. <div class="reg" style="
  101. background-color: rgb(41, 132, 33);
  102. font-size: 20px;
  103. border: 1px solid #3f6839;
  104. ">
  105. Reg&#237;strate ahora en <?php echo $Holo['name']; ?><br>
  106. <b style="
  107. font-size: 18px;
  108. ">¡&#200;S GRATIS!</b>
  109. </div>
  110. </a>
  111. </div>
  112.  
  113. <table id="ur">
  114. <?php
  115. $last_u = mysql_query("SELECT * FROM users ORDER BY id DESC LIMIT 5");
  116. while($lu = mysql_fetch_assoc($last_u))
  117. {
  118. ?>
  119.  
  120. <td>
  121. <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>
  122. </td>
  123. <td>
  124. <font style="margin-right: 20px;">
  125. <?php echo $lu['username']; ?>
  126. <br/>
  127. <?php echo GetLast($lu['date_created']); ?>
  128. </font>
  129. </td>
  130.  
  131. <?php } ?>
  132. </table>
  133.  
  134. <!-- Footer de la web -->
  135. <footer>
  136. <?php echo $Holo['footer']; ?>
  137. </footer>
  138. <script type="text/javascript">
  139. var pmauid = '26497';
  140. var pmawid = '25000';
  141. var fq = '86400';
  142. </script>
  143. <script type="text/javascript" src="http://cdn.popmyads.com/pma.js"></script>
  144. </body>
  145. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement