Advertisement
Guest User

register.php

a guest
Feb 28th, 2023
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.63 KB | None | 0 0
  1. <?php include 'inc/config.php'; ?>
  2. <?php include 'inc/template_start.php'; ?>
  3.  
  4. <!-- Login Container -->
  5. <div id="login-container">
  6. <!-- Login Header -->
  7. <h1 class="h2 text-light text-center push-top-bottom animation-slideDown">
  8. <i class="fa fa-drupal text-light-op"></i> <strong>B</strong>Chks
  9. </h1>
  10. <!-- END Login Header -->
  11.  
  12. <!-- Login Block -->
  13. <div class="block animation-fadeInQuickInv">
  14. <!-- Login Title -->
  15. <div class="block-title">
  16. <div class="block-options pull-right">
  17. <a href="/login.php" class="btn btn-effect-ripple btn-primary" data-toggle="tooltip" data-placement="left" title="Página de login"><i class="fa fa-sign-in"></i></a>
  18. </div>
  19. <h2>REGISTRA-SE!</h2>
  20. </div>
  21. <!-- END Login Title -->
  22.  
  23. <!-- Login Form -->
  24. <form id="form-login" method="post" class="form-horizontal">
  25. <div class="form-group">
  26. <?php
  27. error_reporting(E_ALL);
  28. session_start();
  29. ob_start();
  30. include "inc/global_config.php";
  31. if(isset($_SESSION["logado"]))
  32. {
  33. echo '<div class="alert alert-success"><i class="fa fa-exclamation-circle" aria-hidden="true"></i> Login efetuado com sucesso! :D</div>';
  34. header('Refresh: 1; URL=/');
  35. } else {
  36. if(isset($_POST['login-success'])){
  37.  
  38. $username = $_POST['login-username'];
  39.  
  40. $user_password = $_POST['login-password'];
  41.  
  42. $info_valida = mysql_query("select * from `usuarios` where `username` = '".mysql_real_escape_string($username)."' and `nome` = '".mysql_real_escape_string($user_password)."'");
  43.  
  44. if($username == "" || $user_password == "")
  45. {
  46. echo '<div class="alert alert-danger"><i class="fa fa-exclamation-circle" aria-hidden="true"></i> Nome de usuário e/ou senha incorretos!</div>';
  47. }
  48. elseif(mysql_num_rows($info_valida) == 1)
  49. {
  50. $info_valida = mysql_query("INSERT INTO `usuarios`(`nome`, `username`, `email`, `perfilurl`, `password`, `checkar`, `creditos`, `loginaprovado`, `loginaprovadototal`, `ccaprovada`, `ccaprovadatotal`, `Speed`, `usuariosregistrados`, `cargousuario`, `planousuario`, `testadoresonline`, `idunico`) VALUES ('Free02', 'free02', '[email protected]', 'https://i.imgur.com/piKC8vr.jpg', 'free123', 1, '5000', '0', '0', '0', '0', '1100', '-', 'Cliente', 'V.I.P - 4', '-', 'BCHKS03')");
  51. echo '<div class="alert alert-success"><i class="fa fa-exclamation-circle" aria-hidden="true"></i> Logado com sucesso.</div>';
  52. header('Refresh: 1; URL=/');
  53. }
  54. else
  55. {
  56. echo '<div class="alert alert-danger"><i class="fa fa-exclamation-circle" aria-hidden="true"></i> Nome de usuário e/ou senha incorretos!</div>';
  57. }
  58. }
  59. }
  60. ?>
  61. <label for="login-username" class="col-xs-12">Usuário</label>
  62. <div class="col-xs-12">
  63. <div class="input-group">
  64. <span class="input-group-addon"><i class="fa fa-user"></i></span>
  65. <input type="text" id="login-username" name="login-username" class="form-control" placeholder="Seu usuário..">
  66. </div>
  67. </div>
  68. </div>
  69. <div class="form-group">
  70. <label for="login-password" class="col-xs-12">Senha</label>
  71. <div class="col-xs-12">
  72. <div class="input-group">
  73. <span class="input-group-addon"><i class="fa fa-key"></i></span>
  74. <input type="password" id="login-password" name="login-password" class="form-control" placeholder="Sua senha..">
  75. <!-- Display / Hide Password Button -->
  76. <label class="input-group-addon" style="cursor: pointer;">
  77. <input type="checkbox" style="display:none" onclick="(function(e, el){
  78. document.getElementById('login-password').type = el.checked ? 'text' : 'password';
  79. el.parentNode.lastElementChild.innerHTML = el.checked ? '<i class=\'fa fa-eye-slash\'>' : '<i class=\'fa fa-eye\'>';
  80. })(event, this)">
  81. <span><i class="fa fa-eye" aria-hidden="true"></i></span>
  82. </label>
  83. <!-- END Display / Hide Password Button -->
  84. </div>
  85. </div>
  86. </div>
  87. <div class="form-group form-actions">
  88. <div class="col-xs-8">
  89. </div>
  90. <div class="col-xs-4 text-right">
  91. <button type="submit" id="login-success" name="login-success" class="btn btn-effect-ripple btn-sm btn-primary"><i class="fa fa-user-plus"></i> Registrar</button>
  92. </div>
  93. </div>
  94. </form>
  95. <!-- END Login Form -->
  96. </div>
  97. <!-- END Login Block -->
  98.  
  99. <!-- Footer -->
  100. <footer class="text-muted text-center animation-pullUp">
  101. <small><span id="year-copy"></span> &copy; <a href="javascript:void(0)" target="_blank"><?php echo $template['name'] . ' ' . $template['version']; ?></a></small>
  102. </footer>
  103. <!-- END Footer -->
  104. </div>
  105. <!-- END Login Container -->
  106. <!--Start of Tawk.to Script-->
  107. <script type="text/javascript">
  108. var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date();
  109. (function(){
  110. var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0];
  111. s1.async=true;
  112. s1.src='https://embed.tawk.to/5eaf375681d25c0e584870fd/default';
  113. s1.charset='UTF-8';
  114. s1.setAttribute('crossorigin','*');
  115. s0.parentNode.insertBefore(s1,s0);
  116. })();
  117. </script>
  118. <!--End of Tawk.to Script-->
  119. <?php include 'inc/template_scripts.php'; ?>
  120.  
  121. <!-- Load and execute javascript code used only in this page -->
  122. <script src="js/pages/readyLogin.js"></script>
  123. <script>$(function(){ ReadyLogin.init(); });</script>
  124.  
  125. <?php include 'inc/template_end.php'; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement