Advertisement
Guest User

Untitled

a guest
Nov 13th, 2017
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.94 KB | None | 0 0
  1. <html>
  2. <head>
  3.  
  4. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  5. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
  6. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
  7.  
  8. <link rel="stylesheet" href="css/demo.css">
  9. <link rel="stylesheet" href="css/footer-distributed-with-address-and-phones.css">
  10.  
  11. <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css">
  12.  
  13. <link href="http://fonts.googleapis.com/css?family=Cookie" rel="stylesheet" type="text/css">
  14. </head>
  15. <div style="height:80px; width:80px;"></div>
  16. <?php
  17. session_start();
  18. $ser='localhost';
  19. $usrname='root';
  20. $pass='';
  21. $db='services';
  22. $conn=mysqli_connect($ser,$usrname,$pass,$db);
  23. if(isset($_POST['submit'])){
  24. $emailid = mysqli_real_escape_string($conn,@$_POST['emailidl']);
  25. $password = mysqli_real_escape_string($conn,@$_POST['passwordl']);
  26. $sql = "SELECT * FROM logins WHERE usename = '$emailid' and password='$password'";
  27.  
  28. if($result = mysqli_query($conn,$sql)){
  29.  
  30.  
  31. while($rows = mysqli_fetch_assoc($result)){
  32. if(mysqli_num_rows($result) == 1){
  33. $_SESSION['usrname'] = $emailid;
  34. $_SESSION['password'] = $password;
  35. $who = $rows['who'];
  36. if($who == 'admin'){
  37. header('Location:admin/admin.php');
  38. } elseif($who == 'user')
  39. {
  40. header('Location:user/user.php');
  41. }
  42. elseif($who == sallon){
  43.  
  44. header('Location:sallon/sallon.php');
  45. }
  46. }else{
  47. echo '<div class="alert alert-danger">WRONG CREDIANTIALS</div>';
  48. }
  49.  
  50.  
  51.  
  52.  
  53.  
  54. }
  55. }else{
  56. echo '<div class="alert alert-danger">WRONG CREDIANTIALS</div>';
  57.  
  58. }
  59.  
  60. }
  61. ?>
  62.  
  63.  
  64. <body background="img/wood.jpg">
  65. <nav class="navbar navbar-inverse navbar-fixed-top">
  66. <div class="container-fluid">
  67. <div class="navbar-header">
  68. <a class="navbar-brand" href="index.php">GLOWUP</a>
  69. </div>
  70. <ul class="nav navbar-nav navbar-right">
  71. <li><a href="index.php">HOME</a></li>
  72.  
  73. <li><a href="req.php">Request</a></li>
  74. <li><a href="contactus.php">Conatct Us</a></li>
  75. <li><a href="aboutus.php">About Us</a></li>
  76. <li><a href="login.php">Login/Sign-Up</a></li>
  77. </ul>
  78.  
  79. </div>
  80. </nav>
  81.  
  82. <div class="jumbotron">
  83. <h3 class="text-center"><img src="img/logo.png"></h3>
  84. </div>
  85. <div class="container">
  86. <div class="row">
  87. <div class="col-sm-5">
  88. <?php
  89. $ser='localhost';
  90. $usr='root';
  91. $pass='';
  92. $db='services';
  93. $conn=mysqli_connect($ser,$usr,$pass,$db);
  94. if(isset($_POST['name'])
  95. &&isset($_POST['emailidr'])
  96. &&isset($_POST['passwordr'])
  97. &&isset($_POST['user']))
  98. {
  99. $name=strip_tags($_POST['name']);
  100. $email_id=strip_tags($_POST['emailidr']);
  101. $password=strip_tags($_POST['passwordr']);
  102. $user=strip_tags($_POST['user']);
  103. $phone=strip_tags($_POST['phone']);
  104. $query="INSERT into logins(usename,password,who,name,phone) VALUES('$email_id','$password','$user','$name','$phone')";
  105.  
  106. if($run_query=mysqli_query($conn,$query)){
  107. echo '<div class="alert alert-info">ACCOUNT SUCCESSFULLY CREATED</div>';
  108. }else{
  109. echo '<div class="alert alert-danger">EMAIL-ID ALREADY EXISTS PLEASE LOGIN</div>';
  110. }
  111. }
  112. ?>
  113. <ul class="nav nav-tabs">
  114. <li class="active"><a data-toggle="tab" href="#home">Login</a></li>
  115. <li><a data-toggle="tab" href="#menu1">Sign-Up</a></li>
  116.  
  117. </ul>
  118.  
  119. <div class="tab-content">
  120. <div id="home" class="tab-pane fade in active">
  121. <div class="panel panel-default panel-success">
  122. <div class="panel-heading">
  123. <form class="form" action="login.php" method="post">
  124. <div class="form-group">
  125. <label for="Email-id">Email-id</label>
  126. <input type="email" class="form-control" id="Email-id" name="emailidl" placeholder="enter email-id" required>
  127. </div>
  128. <div class="form-group">
  129. <label for="password">Password</label>
  130. <input type="password" class="form-control" id="password" name="passwordl" placeholder="enter password" required>
  131. </div>
  132. <div class="form-group">
  133. <input type="submit" class="btn btn-default" name="submit">
  134.  
  135.  
  136. </div>
  137.  
  138. </form>
  139.  
  140. </div>
  141. </div>
  142. </div>
  143.  
  144. <div id="menu1" class="tab-pane fade">
  145. <div id="home" class="tab-pane fade in active">
  146. <div class="panel panel-default panel-success">
  147. <div class="panel-heading">
  148. <form class="form" action="#" method="post">
  149. <div class="form-group">
  150. <label for="name">Name</label>
  151. <input type="text" class="form-control" id="name" name="name" placeholder="enter Name" pattern="[A-Za-z].{4,}" required>
  152. </div>
  153. <div class="form-group">
  154. <label for="Email-id">Email-id</label>
  155. <input type="email" class="form-control" id="Email-id" name="emailidr" placeholder="enter email-id" required>
  156. </div>
  157. <div class="form-group">
  158. <label for="password">Password (min 6 char.)</label>
  159. <input type="password" class="form-control" id="password" name="passwordr" pattern=".{6,}" placeholder="enter password" required>
  160. </div>
  161. <div class="form-group">
  162. <label for="phone">Phone</label>
  163. <input type="text" for="phone" class="form-control" id="phone" name="phone" pattern="^\d{4}\d{3}\d{3}$" required>
  164.  
  165. </div>
  166. <div class="form-group">
  167. <label for="user">enter user</label>
  168. <input type="text" class="form-control" id="user" name="user" value="user" readonly>
  169. </div>
  170. <div class="form-group">
  171. <input type="submit" class="btn btn-default" name="submit">
  172. </div>
  173. </form>
  174.  
  175. </div>
  176. </div>
  177. </div>
  178.  
  179. </div>
  180.  
  181.  
  182.  
  183.  
  184. </div>
  185. </div>
  186. </div>
  187. </div>
  188. <div style="width:110px; height:110px;"></div>
  189. <footer class="footer-distributed">
  190.  
  191. <div class="footer-left">
  192.  
  193. <h3>GLOW<span>UP</span></h3>
  194.  
  195. <p class="footer-links">
  196. <a href="#">Home</a>
  197. ·
  198. <a href="#">Blog</a>
  199. ·
  200. <a href="#">Pricing</a>
  201. ·
  202. <a href="#">About</a>
  203. ·
  204. <a href="#">Faq</a>
  205. ·
  206. <a href="#">Contact</a>
  207. </p>
  208.  
  209. <p class="footer-company-name">GLOW UP &copy; 2017</p>
  210. </div>
  211.  
  212. <div class="footer-center">
  213.  
  214. <div>
  215. <i class="fa fa-map-marker"></i>
  216. <p><span>LOVELY PROFFESIONAL UNIVERSITY</span>JALANDHAR,PUNJAB</p>
  217. </div>
  218.  
  219. <div>
  220. <i class="fa fa-phone"></i>
  221. <p>236542366753</p>
  222. </div>
  223.  
  224. <div>
  225. <i class="fa fa-envelope"></i>
  226. <p><a href="mailto:support@company.com">support@glowup.com</a></p>
  227. </div>
  228.  
  229. </div>
  230.  
  231. <div class="footer-right">
  232.  
  233. <p class="footer-company-about">
  234. <span>About the company</span>
  235. WE ARE HERE TO MAKE THE WORLD A BETTER PLACE IN BEAUTY WORLD
  236. </p>
  237.  
  238. <div class="footer-icons">
  239.  
  240. <a href="#"><i class="fa fa-facebook"></i></a>
  241. <a href="#"><i class="fa fa-twitter"></i></a>
  242. <a href="#"><i class="fa fa-linkedin"></i></a>
  243. <a href="#"><i class="fa fa-github"></i></a>
  244.  
  245. </div>
  246.  
  247. </div>
  248.  
  249. </footer>
  250.  
  251. </body>
  252. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement