daily pastebin goal
68%
SHARE
TWEET

LOGIN.php

a guest May 7th, 2016 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <head>
  3. <title>LOGIN|BEDUINS HOTEL</title>
  4. <style type="text/css">
  5. <!--
  6. a:hover {
  7.   text-decoration: none
  8.   }
  9. hr {
  10.   color: #002157;
  11.   }
  12. body {
  13.   margin: 0px;
  14.   }
  15. .background-wrap{
  16. position:fixed;
  17. z-index: -1000;
  18. width: 100%;
  19. height:100%;
  20. overflow: hidden;
  21. top: 0;
  22. left: 0;
  23. }
  24. #video-bg-elem
  25. {
  26. position: fixed;
  27. top: 50%;
  28. left: 50%;
  29. min-height: 100%;
  30. min-width: 100%;
  31. width: auto;
  32. height: auto;
  33. transform:translate(-50%, -50%);
  34. }
  35. .b {
  36.   font-family: verdana,arial,helvetica;
  37.   font-size: 8pt;
  38.   margin: 0px;
  39.   }
  40. .date {
  41.   font-family: verdana,arial,helvetica;
  42.   font-size: 9pt;
  43.   }
  44. .side {
  45.   font-family: verdana,arial,helvetica;
  46.   color: #404040;
  47.   font-size: 10px;
  48.   }
  49. .title {
  50.   font-family: verdana,arial,helvetica;
  51.   color: #002157;
  52.   font-size: 20pt;
  53.   letter-spacing:6px;
  54.   }
  55. .header {
  56.   font-family: verdana,arial,helvetica;
  57.   color: #002157;
  58.   font-size: 35px;
  59.   }
  60.  
  61. ul {
  62.     list-style-type: none;
  63.     margin: 0;
  64.     padding: 0;
  65.     overflow: hidden;
  66.     background-color: #333;
  67. }
  68.  
  69. li {
  70.     float: left;
  71. }
  72.  
  73. li a {
  74.     display: block;
  75.     color: black;
  76.     text-align: center;
  77.     padding: 14px 16px;
  78.     text-decoration: none;
  79. }
  80.  
  81. li a:hover {
  82.     background-color: #111;
  83. }
  84. .active {
  85.     background-color: #002157;
  86. }
  87. div#back_glob {
  88. background-color:white; border:1px solid #002157; width:450px; margin:0 auto; box-shadow:1px 0px 15px #af883d;
  89. }
  90.  
  91. input {
  92. display:block; margin:15px;
  93. }
  94.  
  95. div#back_header {
  96. background-color: #002157; text-align:center; font-size:22px; font-weight:bold; color:white; padding:20px;
  97. }
  98.  
  99. input[type=text], input[type=password] {
  100. font-size:15px; padding:10px; border-radius:3px; border:1px solid #ddd;
  101. }
  102.  
  103. input[type=submit], input[type=reset] {
  104. background-color:#002157; padding:5px 10px 5px 10px; border-radius:3px; border:1px solid #af883d; color:white; font-weight:bold;
  105. }
  106.  
  107. div#back_form {
  108. display:flex; justify-content: center;
  109. }
  110.  
  111.  
  112. -->
  113. </style>
  114. </head>
  115. <body>
  116. <center>
  117. <table border=0 cellpadding=20 cellspacing=0>
  118.  <tr>
  119.   <td align=center colspan=2 bgcolor="#F4EFF7" height=70>
  120.    <span class=title><img src="logo.jpg" style="width:975px;height:176px;float:topright;"></span>
  121.       <nav>
  122. <ul class="nav">
  123. <li><a href="HOTELS BEDUINS.html">HOTELS</a></li>
  124. <li><a href="ABOUT BEDUINS.html">ABOUT</a></li>
  125. <li><a href="CONTACT BEDUINS.html">CONTACT US</a></li>
  126. <li><a href="FEEDBACK BEDUINS.html">FEEDBACK</a></li>
  127. <li style="float:right;"><a class="active" href="SIGNUP.php">SIGN UP  </a></li>
  128. </ul>
  129. </nav>
  130.   </td>
  131.   </tr>
  132.   <tr>
  133.    <td valign=top width=300 bgcolor="#FFFFFF">
  134.    <center><span class=header><b></b></span><br></center>
  135. <div id="back_glob">
  136. <div id="back_header">
  137. LOGIN
  138. </div>
  139. <div id="back_form">
  140. <form method="POST">
  141. <input type="text" name="username" placeholder="USERNAME" />
  142. <input type="password" name="password" placeholder="PASSWORD" />
  143. <input type="submit" name="submit" value="LOGIN"><a/>
  144.  
  145.     <?php
  146. if(isset($_POST["submit"])){
  147. $username=$_POST['username'];
  148. $password=$_POST['password'];
  149.  
  150. $connect=@mysql_connect('localhost','root','') or die(mysql_error());
  151. mysql_select_db('beduins') or die("cannot select DB");
  152.  
  153. $sql=mysql_query("SELECT * FROM signup WHERE  username='".$username."' AND password='".$password."'");
  154. $result=mysql_query($sql);
  155.  
  156. $numrows=mysql_num_rows($sql);
  157. if($numrows!=0){
  158. while($row=mysql_fetch_assoc($sql))
  159. {
  160. $dbusername=$row['username'];
  161. $dbpassword=$row['password'];
  162. $dbUserType=$row['UserType'];
  163. }
  164.  
  165. if($username==$dbusername && $password==$dbpassword)
  166. {
  167. session_start();
  168. $_SESSION['sess_user']=$username;
  169. $row=mysql_fetch_array($sql);
  170. if ($row['UserType']==0){
  171.         header("location:BOOKING.php");
  172. }
  173. elseif ($row['UserType']==1) {
  174.         header("location:ADMIN.php");
  175. }
  176. }
  177. }
  178. else{
  179. echo "Invalid username or password!";
  180. }
  181. }
  182. ?>
  183. </form>
  184. </div>
  185. <br>
  186.    </td>
  187.    <td valign=top width=1 bgcolor="#FFFFFF">
  188.     <table border=0 cellpadding=0 cellspacing=0 width="100%">
  189.       <td bgcolor="#808080">
  190.        </table>
  191.       </td>
  192.     </table>
  193.    </td>
  194.   </tr>
  195.  </table>
  196. </center>
  197. <div class="background-wrap">
  198.     <video id="video-bg-elem" preload="auto" autoplay="true" loop="loop" muted="muted">
  199.     <source src="video2.mp4" type="video/mp4">
  200.     video not supported
  201.     </video>
  202.    
  203. </body>
  204. </div>
  205. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top