1
0

login.php 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <?php
  2. $host = $_SERVER['SERVER_NAME'];
  3. if($host == "62.4.16.133") { die(); }
  4. session_start();
  5. if(isset($_SESSION["playersqlid"]))
  6. {
  7. header("location: ./panel/characters");
  8. exit;
  9. }
  10. ?>
  11. <!doctype html>
  12. <html lang="en">
  13. <head>
  14. <meta charset="utf-8">
  15. <title>Verdant Roleplay | Login</title>
  16. <base href="/">
  17. <!--<meta name="viewport" content="width=device-width, initial-scale=1">-->
  18. <meta name="viewport" content="width=device-width, initial-scale=0.1">
  19. <link rel="icon" type="image/x-icon" href="favicon.ico">
  20. <link href="https://fonts.googleapis.com/css?family=Roboto:400,500,700+Ubuntu:400,700" rel="stylesheet">
  21. <!-- Assets -->
  22. <link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-Bx4pytHkyTDy3aJKjGkGoHPt3tvv6zlwwjc3iqN7ktaiEMLDPqLSZYts2OjKcBx1" crossorigin="anonymous">
  23. <link rel="stylesheet" href="./style.css">
  24. <link rel="stylesheet" href="./login.css">
  25. <script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
  26. </head>
  27. <body>
  28. <router-outlet _ngcontent-kmh-c135=""></router-outlet>
  29. <app-login _nghost-kmh-c138="">
  30. <header _ngcontent-kmh-c138=""></header>
  31. <main _ngcontent-kmh-c138="">
  32. <form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>" name="loginForm" id="loginForm" method="post">
  33. <div _ngcontent-kmh-c138="" class="fieldset">
  34. <label _ngcontent-kmh-c138="" for="name" class="fa fa-fw fa-user label"></label>
  35. <input _ngcontent-kmh-c138="" id="name" name="username" placeholder="username" class="ng-valid ng-dirty ng-touched">
  36. <label _ngcontent-kmh-c138="" for="password" class="fa fa-fw fa-lock label"></label>
  37. <input _ngcontent-kmh-c138="" id="password" name="password" type="password" placeholder="password" class="ng-valid ng-dirty ng-touched">
  38. <!--<div _ngcontent-kmh-c138="" class="fat"><input _ngcontent-kmh-c138="" type="checkbox" name="remember" class="checkbox ng-untouched ng-pristine ng-valid"> Remember me <a _ngcontent-kmh-c138="" routerlink="/login/forgotten-password" class="fl-ri" href="#">Forgotten Password</a></div>-->
  39. <button _ngcontent-kmh-c138="" class="fat">Log in</button>
  40. </div>
  41. </form>
  42. <!---->
  43. <!---->
  44. <!---->
  45. <footer _ngcontent-kmh-c138=""><a href="./register"><span style="color:white">Don't have an account? Register here</a></footer>
  46. </br></br>
  47. <!--<center><span style="color: white; font-size: 11px;">Credits: Realpimp (Front-End, Back-End), Pristine (Bug finding, ideas, other stuff)</span></center>-->
  48. </main>
  49. <div _ngcontent-kmh-c138="" class="bg-footer"></div>
  50. <app-alerts _ngcontent-kmh-c138="" _nghost-kmh-c147="" id="app-alerts">
  51. </br>
  52. </app-alerts>
  53. </app-login>
  54. <!---->
  55. <app-popup-container _ngcontent-kmh-c135="" _nghost-kmh-c186="" id="popup_content">
  56. <!---->
  57. </app-popup-container>
  58. <app-version-check _ngcontent-kmh-c135="" _nghost-kmh-c210="">
  59. <!---->
  60. </app-version-check>
  61. <script>
  62. $("#loginForm").submit(function () {
  63. $.post('./includes/func_login.php', $('form').serialize(), function (data, textStatus) {
  64. console.log("sent without errors")
  65. console.log(data);
  66. if (data == "true") {
  67. window.document.location = "./panel/characters";
  68. } else {
  69. $('#app-alerts').html(data);
  70. $(document).ready(function () {
  71. $('.message_pop_n').delay(5000).fadeOut(300);
  72. });
  73. }
  74. });
  75. return false;
  76. })
  77. </script>
  78. </body>
  79. </html>