index.php 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <?php
  2. session_start();
  3. ?>
  4. <!DOCTYPE html>
  5. <html>
  6. <head>
  7. <meta name="viewport" content="width=device-width, initial-scale=1">
  8. <title> Forward Station Server Login</title>
  9. <link rel = "icon" href = "img/Autoleum Logo.jpg" type = "image/x-icon">
  10. <style>
  11. body {
  12. font-family: Arial, Helvetica, sans-serif;
  13. margin-top: 50px;
  14. }
  15. form {border: 3px solid #f1f1f1;}
  16. input[type=text], input[type=password] {
  17. width: 80%;
  18. padding: 12px 20px;
  19. margin: 8px 0;
  20. display: inline-block;
  21. border: 1px solid #ccc;
  22. box-sizing: border-box;
  23. }
  24. .imgcontainer {
  25. text-align: center;
  26. margin: 24px 0 12px 0;
  27. /*background:#5eeae7;*/
  28. background: radial-gradient(#0bddff, #00000094);
  29. height:200px;
  30. margin-top:0px;
  31. }
  32. img.avatar {
  33. width: 40%;
  34. border-radius: 50%;
  35. margin-top: 32px;
  36. width:80px;
  37. height:80px;
  38. margin-top:-57px;
  39. }
  40. .main {
  41. padding: 16px;
  42. background-color:#d4e0e6
  43. }
  44. .form-control.texthight {
  45. font-size: 15px;
  46. color:#028790;
  47. border-radius: 1rem;
  48. }
  49. input[type=text],input[type=password]{
  50. border: 2px solid #5eeae7;
  51. }
  52. .forgot:hover { color: #3b3b3b }
  53. input[type="submit"] {
  54. width:240px;
  55. height:35px;
  56. display:block;
  57. font-family:Arial, "Helvetica", sans-serif;
  58. font-size:16px;
  59. font-weight:bold;
  60. color:#fff;
  61. text-decoration:none;
  62. text-transform:uppercase;
  63. text-align:center;
  64. text-shadow:1px 1px 0px #37a69b;
  65. padding-top:6px;
  66. margin: 29px 0 0 29px;
  67. position:relative;
  68. cursor:pointer;
  69. border: none;
  70. background-color: #37a69b;
  71. background-image: linear-gradient(top,#3db0a6,#3111);
  72. border-top-left-radius: 5px;
  73. border-top-right-radius: 5px;
  74. border-bottom-right-radius: 5px;
  75. border-bottom-left-radius:5px;
  76. box-shadow: inset 0px 1px 0px #2ab7ec, 0px 5px 0px 0px #497a78, 0px 10px 5px #999;
  77. }
  78. input[type="submit"]:active {
  79. top:3px;
  80. box-shadow: inset 0px 1px 0px #2ab7ec, 0px 2px 0px 0px #31524d, 0px 5px 3px #999;
  81. }
  82. .divider{
  83. width:400px;
  84. height:350px;
  85. background:#dde3e4;
  86. position:absolute;
  87. margin-left:50px;
  88. margin-top:-100px;
  89. box-shadow: inset 0px 1px 0px #ffff, 0px 2px 0px 0px #ffff, 0px 5px 3px #999;
  90. }
  91. .login{
  92. width:500px;
  93. height:600px;
  94. align:center;
  95. background:white;
  96. box-shadow: inset 0px 1px 0px #ffff, 0px 2px 0px 0px #ffff, 0px 5px 3px #999;
  97. }
  98. @import url("//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css");
  99. .form-group {
  100. position: relative;
  101. color: #aaa;
  102. font-size: 16px;
  103. }
  104. .form-group input { text-indent: 32px;}
  105. .form-group .fa-user {
  106. position: absolute;
  107. top: 20px;
  108. left: 45px;
  109. color:#0fb7a2;
  110. }
  111. .form-group input { text-indent: 32px;}
  112. .form-group .fa-key {
  113. position: absolute;
  114. top: 33px;
  115. left: 45px;
  116. color:#0fb7a2;
  117. }
  118. .form-group input { text-indent: 32px;}
  119. .form-group .fa-eye {
  120. position: absolute;
  121. top: 35px;
  122. right: 50px;
  123. color:#0fb7a2;
  124. }
  125. .form-errors p{
  126. color:red;
  127. }
  128. </style>
  129. <link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
  130. </head>
  131. <body>
  132. <center>
  133. <form action="login.php" class="login" method="post">
  134. <div class="imgcontainer">
  135. </div>
  136. <div style="" class="divider">
  137. <div class="main">
  138. <img src="dist/img/profile.jpg" alt="Avatar" class="avatar">
  139. <?php if (isset($_SESSION['errors'])): ?>
  140. <div class="form-errors">
  141. <?php foreach($_SESSION['errors'] as $error): ?>
  142. <p><?php echo $error ?></p>
  143. <?php endforeach;
  144. session_destroy();?>
  145. </div>
  146. <?php endif; ?>
  147. <div class="form-group" style="margin-top:40px;" id="floatContainer">
  148. <label for="floatField"></label>
  149. <i class="far fa-user icon" ></i>
  150. <input type="text" id="floatField" placeholder="Enter Username" id="name" name="uname" class="form-control texthight" required >
  151. </div>
  152. <div class="form-group ">
  153. <i class="fa fa-key icon" ></i>
  154. <input type="password" class="form-control texthight" name="password" id="password-field" placeholder="Enter your password" style="margin-top:20px;">
  155. <i id="pass-status" class="fa fa-eye" aria-hidden="true" onClick="viewPassword()"></i>
  156. </div>
  157. <input type="submit" value="Login">
  158. </div>
  159. </div>
  160. </form>
  161. </center>
  162. <script type="text/javascript">
  163. function viewPassword()
  164. {
  165. var passwordInput = document.getElementById('password-field');
  166. var passStatus = document.getElementById('pass-status');
  167. if (passwordInput.type == 'password'){
  168. passwordInput.type='text';
  169. passStatus.className='fa fa-eye-slash';
  170. }
  171. else{
  172. passwordInput.type='password';
  173. passStatus.className='fa fa-eye';
  174. }
  175. }
  176. const floatField = document.getElementById('floatField');
  177. const floatContainer = document.getElementById('floatContainer');
  178. floatField.addEventListener('focus', () => {
  179. floatContainer.classList.add('active');
  180. });
  181. floatField.addEventListener('blur', () => {
  182. floatContainer.classList.remove('active');
  183. });
  184. </script>
  185. </body>
  186. </html>
  187. <script type="text/javascript">
  188. function changePages(fileLocation) {
  189. document.getElementById('loadFrame').src = fileLocation;
  190. }
  191. var selector='.sidebar-menu li';
  192. $(selector).on('click', function(){
  193. // alert(selector);
  194. $(selector).removeClass('active');
  195. $(this).addClass('active');
  196. });
  197. </script>
  198. </body>