Advertisement
Guest User

Untitled

a guest
May 16th, 2016
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.47 KB | None | 0 0
  1. <?php
  2. include_once ("classes/Db.class.php");
  3. include_once ("classes/config.class.php");
  4. include_once ("classes/user.class.php");
  5. session_start();
  6. //if( $u->loggingIn() ){ header('Location: homepage.php'); }
  7.  
  8. if(isset($_POST['login'])){
  9. // todo: 1 form input velden ophalen
  10. try{
  11. $u = new User();
  12.  
  13. $u->Username = $_POST['form-username'];
  14. $u->Password = $_POST['form-password'];
  15.  
  16. if($u->loggingIn() == true){
  17. header("Location:homepage.php");
  18.  
  19. }
  20. else{
  21. throw new exception("Password of username zijn niet correct!");
  22. }
  23. }
  24. catch(exception $e){
  25. $succes = $e->getMessage();
  26. }
  27. }
  28. ?><!DOCTYPE html>
  29. <html lang="en">
  30.  
  31. <head>
  32.  
  33. <meta charset="utf-8">
  34. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  35. <meta name="viewport" content="width=device-width, initial-scale=1">
  36. <title>Bootstrap Login Form Template</title>
  37.  
  38. <!-- CSS -->
  39. <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:400,100,300,500">
  40. <link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
  41. <link rel="stylesheet" href="assets/font-awesome/css/font-awesome.min.css">
  42. <link rel="stylesheet" href="assets/css/form-elements.css">
  43. <link rel="stylesheet" href="assets/css/style.css">
  44.  
  45. <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  46. <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  47. <!--[if lt IE 9]>
  48. <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
  49. <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
  50. <![endif]-->
  51.  
  52. <!-- Favicon and touch icons -->
  53. <link rel="shortcut icon" href="assets/ico/favicon.png">
  54. <link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/ico/apple-touch-icon-144-precomposed.png">
  55. <link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/ico/apple-touch-icon-114-precomposed.png">
  56. <link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/ico/apple-touch-icon-72-precomposed.png">
  57. <link rel="apple-touch-icon-precomposed" href="assets/ico/apple-touch-icon-57-precomposed.png">
  58.  
  59. </head>
  60.  
  61. <body>
  62.  
  63. <!-- Top content -->
  64. <div class="top-content">
  65.  
  66. <div class="inner-bg">
  67. <div class="container">
  68. <div class="row">
  69. <div class="col-sm-8 col-sm-offset-2 text">
  70. <h1><strong>IMDstagram</strong> Login pagina</h1>
  71. </div>
  72. </div>
  73. <div class="row">
  74. <div class="col-sm-6 col-sm-offset-3 form-box">
  75. <div class="form-top">
  76. <div class="form-top-left">
  77. <h3>Inloggen op de instagram van IMD</h3>
  78. </div>
  79. <div class="form-top-right">
  80. <i class="fa fa-key"></i>
  81. </div>
  82. <div class="col-sm-8 col-sm-offset-2 alert alert-danger fade in">
  83. <?php if(isset($succes)) {
  84. echo "<p> $succes</p>";
  85. }
  86. ?>
  87. </div>
  88. </div>
  89. <div class="form-bottom">
  90. <form role="form" action="" method="post" class="login-form">
  91. <div class="form-group">
  92. <label class="sr-only" for="form-username">Username</label>
  93. <input type="text" name="form-username" placeholder="Gebruikersnaam..." class="form-username form-control" id="form-username">
  94. </div>
  95. <div class="form-group">
  96. <label class="sr-only" for="form-password">Password</label>
  97. <input type="password" name="form-password" placeholder="wachtwoord..." class="form-password form-control" id="form-password">
  98. </div>
  99. <button type="submit" name="login" class="btn" >Inloggen!</button>
  100. </form>
  101. </div>
  102. <div class="description">
  103. <p>
  104. Nog geen lid van IMDstagram
  105. <a href="register.php"><strong>registreer</strong></a> hier
  106. </p>
  107. </div>
  108. </div>
  109. </div>
  110. <div class="row">
  111. <!--<div class="col-sm-6 col-sm-offset-3 social-login">
  112. <h3>...or login with:</h3>
  113. <div class="social-login-buttons">
  114. <a class="btn btn-link-1 btn-link-1-facebook" href="#">
  115. <i class="fa fa-facebook"></i> Facebook
  116. </a>
  117. </div>
  118. </div>-->
  119. </div>
  120. </div>
  121.  
  122. </div>
  123.  
  124.  
  125. <!-- Javascript -->
  126. <script src="assets/js/jquery-1.11.1.min.js"></script>
  127. <script src="assets/bootstrap/js/bootstrap.min.js"></script>
  128. <script src="assets/js/jquery.backstretch.min.js"></script>
  129. <script src="assets/js/scripts.js"></script>
  130.  
  131. <!--[if lt IE 10]>
  132. <script src="assets/js/placeholder.js"></script>
  133. <![endif]-->
  134.  
  135. </body>
  136.  
  137. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement