Advertisement
Guest User

login

a guest
Nov 20th, 2017
298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.77 KB | None | 0 0
  1. <?php
  2. session_start();
  3. if($_SESSION){
  4. if($_SESSION['idrole']== 1)
  5. {
  6. header("Location: ../technician/index.php");
  7. }
  8. if($_SESSION['idrole']== 2)
  9. {
  10. header("Location: ../clerk/index.php");
  11. }
  12. if($_SESSION['idrole']== 3)
  13. {
  14. header("Location: ../director/index.php");
  15. }
  16. }
  17.  
  18.  
  19. include 'checklogin.php';
  20.  
  21. ?>
  22.  
  23. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  24. <html xmlns="http://www.w3.org/1999/xhtml">
  25. <head>
  26. <meta name="viewport" content="width=device-width, initial-scale=1">
  27. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  28. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  29. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
  30. <title>PCC Login</title>
  31. </head>
  32.  
  33. <body>
  34. <?php include 'header login.php';?>
  35. <div class="container">
  36. <div class="row">
  37. <div class="col-md-6 col-md-offset-3">
  38. <div class="panel panel-login">
  39. <div class="panel-heading">
  40. <div class="row">
  41. <div class="col-xs-6">
  42. <a href="login.php" class="active" id="loginlink">Login</a>
  43. </div>
  44. <div class="col-xs-6">
  45. <a href="register.php" id="registerlink">Register</a>
  46. </div>
  47. </div>
  48. <hr>
  49. </div>
  50. <div class="panel-body">
  51. <div class="row">
  52. <div class="col-lg-12">
  53. <form id="login-form" action="checklogin.php" method="post" role="form" style="display: block;">
  54. <div class="form-group">
  55. <input type="text" name="username" id="username" tabindex="1" class="form-control" placeholder="Username" required="required">
  56. </div>
  57. <div class="form-group">
  58. <input type="password" name="password" id="password" tabindex="2" class="form-control" placeholder="Password" required="required">
  59. </div>
  60. <div class="form-group text-center">
  61. <input type="checkbox" tabindex="3" class="" name="remember" id="remember">
  62. <label for="remember"> Remember Me</label>
  63. </div>
  64.  
  65. <div class="form-group">
  66. <div class="row">
  67. <div class="col-sm-6 col-sm-offset-3">
  68. <input type="submit" name="login-submit" id="login-submit" tabindex="4" class="form-control btn btn-login" value="Login">
  69. </div>
  70. <?php echo $error; ?>
  71. </div>
  72. </div>
  73.  
  74. </form>
  75.  
  76.  
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. </div>
  83. </div>
  84. </body>
  85. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement