-
Notifications
You must be signed in to change notification settings - Fork 0
/
login.php
executable file
·266 lines (240 loc) · 12.2 KB
/
login.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
<?php
include("ConnectToAWS.php");
session_start();
$error = "";
if($_SERVER["REQUEST_METHOD"] == "POST") {
// username and password sent from form
$myusername = mysqli_real_escape_string($db,$_POST['email']);
$mypassword = mysqli_real_escape_string($db,$_POST['password']);
$sql = "SELECT id FROM user WHERE email = '$myusername' and password = '$mypassword'";
$result = mysqli_query($db,$sql);
$row = mysqli_fetch_array($result,MYSQLI_ASSOC);
//$active = $row['active'];
$count = mysqli_num_rows($result);
// If result matched $myusername and $mypassword, table row must be 1 row
if($count == 1) {
$_SESSION['user_id'] = mysqli_query($db,$sql)->fetch_object()->id;
$_SESSION['login-status'] = 1;
$userid=$_SESSION['user_id'];
$sql="SELECT * FROM user where id='$userid'";
$user_detail_id = mysqli_query($db,$sql)->fetch_object()->user_detail_id;
$sql2="SELECT * from user_detail where id ='$user_detail_id'";
$fname=mysqli_query($db,$sql2)->fetch_object()->first_name;
$lname=mysqli_query($db,$sql2)->fetch_object()->last_name;
$_SESSION['fname']=$fname;
$_SESSION['lname']=$lname;
header("location: account-home.php");
}
else {
$error = "Your Login Name or Password is invalid";
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Clasified">
<meta name="generator" content="Wordpress! - Open Source Content Management">
<title>Login | WeWork</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>WeWork</title>
<link rel="shortcut icon" href="assets/img/favicon.png">
<!-- Start WOWSlider.com HEAD section -->
<link rel="stylesheet" type="text/css" href="engine1/style.css" />
<script type="text/javascript" src="engine1/jquery.js"></script>
<!-- End WOWSlider.com HEAD section -->
<link rel="stylesheet" href="assets/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="assets/css/jasny-bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="assets/css/jasny-bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="assets/css/material-kit.css" type="text/css">
<link rel="stylesheet" href="assets/css/font-awesome.min.css" type="text/css">
<link rel="stylesheet" href="assets/fonts/line-icons/line-icons.css" type="text/css">
<link rel="stylesheet" href="assets/fonts/line-icons/line-icons.css" type="text/css">
<link rel="stylesheet" href="assets/css/main.css" type="text/css">
<link rel="stylesheet" href="assets/extras/animate.css" type="text/css">
<link rel="stylesheet" href="assets/extras/owl.carousel.css" type="text/css">
<link rel="stylesheet" href="assets/extras/owl.theme.css" type="text/css">
<link rel="stylesheet" href="assets/css/responsive.css" type="text/css">
<link rel="stylesheet" href="assets/css/slicknav.css" type="text/css">
<link rel="stylesheet" href="assets/css/bootstrap-select.min.css">
<link href="https://fonts.googleapis.com/css?family=Ubuntu" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Lora" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Poppins" rel="stylesheet">
<link rel="apple-touch-icon" sizes="57x57" href="assets/fav/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="assets/fav/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="assets/fav/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="assets/fav/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="assets/fav/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="assets/fav/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="assets/fav/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="assets/fav/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="assets/fav/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="assets/fav/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="assets/fav/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="assets/fav/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="assets/fav/favicon-16x16.png">
<link rel="manifest" href="assets/fav/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="assets/fav/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
</head>
<body>
<!-- Header Section Start -->
<div class="header">
<nav class="navbar navbar-default main-navigation" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand logo" href="index.php"><img src="assets/img/w_logo.png" width="60px" height="60px" alt=""></a>
</div>
<ul class="nav navbar-nav top-nav-text" style="font-family: 'Ubuntu',sans-serif; text-transform: uppercase; font-weight: 500; font-size: 40px;">
<li class="active"><a href="index.php">Home</a></li>
<li><a href="about.php">About</a></li>
<li><a href="howitworks.php">How It Works</a></li>
<li><a href="#">Contact</a></li>
</ul>
<!-- <div class="collapse navbar-collapse" id="navbar">
<ul class="nav navbar-nav navbar-right">
<li><a href="login.php"><i class="lnr lnr-enter"></i> Login</a></li>
<li><a href="signup.php"><i class="lnr lnr-user"></i> Signup</a></li>
<li class="postadd">
<a class="btn btn-common btn-text" href="post-job.php"><span class="fa fa-plus-circle"></span> Post an Ad</a>
</li>
</ul>
</div> -->
</div>
</nav>
</div>
<!-- Header Section End -->
<!-- Page Header Start -->
<div class="page-header" style="background: url(assets/img/banner1.jpg);">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="breadcrumb-wrapper">
<h2 class="page-title">Login to account</h2>
</div>
</div>
</div>
</div>
</div>
<!-- Page Header End -->
<!-- Content section Start -->
<section id="content">
<div class="container">
<div class="row">
<div class="col-sm-6 col-sm-offset-4 col-md-4 col-md-offset-4">
<div class="page-login-form box">
<h3>
Login
</h3>
<form role="form" class="login-form" action="" method="post">
<div class="form-group">
<div class="input-icon">
<i class="icon fa fa-user"></i>
<input type="text" id="sender-email" class="form-control" name="email" placeholder="Email">
</div>
</div>
<div class="form-group">
<div class="input-icon">
<i class="icon fa fa-unlock-alt"></i>
<input type="password" class="form-control" placeholder="Password" name="password">
</div>
</div>
<div class="checkbox">
<input type="checkbox" id="remember" name="rememberme" value="forever" style="float: left;">
<label for="remember">Remember me</label>
</div>
<button class="btn btn-common log-btn">Submit</button>
</form>
</div>
</div>
</div>
</div>
</section>
<!-- Content section End -->
<footer>
<!-- Footer Area Start -->
<section class="footer-Content">
<div class="container">
<div class="row">
<div class="col-md-3 col-sm-6 col-xs-12 wow fadeIn" data-wow-delay="0">
<div class="widget">
<h3 class="block-title">About us</h3>
<div class="textwidget">
<img src="assets/img/logo.png" width="40px" height="40px">
<p>WeWork is a new Job Portal platform that helps you find work from!</p>
</div>
</div>
</div>
<div class="col-md-3 col-sm-6 col-xs-12 wow fadeIn" data-wow-delay="0.5">
<div class="widget">
<h3 class="block-title">Quik Links</h3>
<ul class="menu">
<li><a href="index.php">Home</a></li>
<li><a href="about.php">About</a></li>
<li><a href="tnc.php">Terms of Use</a></li>
<li><a href="privacy.php">Privacy Policy</a></li>
</ul>
</div>
</div>
<div>
<div class="footer-widget social-widget">
<h3 class="block-title">Follow us on</h3>
<ul>
<li><a href="#"><i class="fa fa-facebook-official"></i>Facebook</a></li>
<li><a href="#"><i class="fa fa-twitter-square"></i>Twitter</a></li>
<li><a href="#"><i class="fa fa-google-plus-square"></i>Google+</a></li>
</ul>
</div>
</div>
</div>
</div>
</section>
<!-- Footer area End -->
<!-- Copyright Start -->
<div id="copyright">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="site-info pull-left">
<p>Designed by WeWork.com</p>
</div>
</div>
</div>
</div>
</div>
<!-- Copyright End -->
</footer>
<!-- Footer Section End -->
<!-- Go To Top Link -->
<a href="#" class="back-to-top">
<i class="fa fa-angle-up"></i>
</a>
<!-- Main JS -->
<script type="text/javascript" src="assets/js/jquery-min.js"></script>
<script type="text/javascript" src="assets/js/bootstrap.min.js"></script>
<script type="text/javascript" src="assets/js/material.min.js"></script>
<script type="text/javascript" src="assets/js/material-kit.js"></script>
<script type="text/javascript" src="assets/js/jquery.parallax.js"></script>
<script type="text/javascript" src="assets/js/owl.carousel.min.js"></script>
<script type="text/javascript" src="assets/js/wow.js"></script>
<script type="text/javascript" src="assets/js/main.js"></script>
<script type="text/javascript" src="assets/js/jquery.counterup.min.js"></script>
<script type="text/javascript" src="assets/js/waypoints.min.js"></script>
<script type="text/javascript" src="assets/js/jasny-bootstrap.min.js"></script>
<script src="assets/js/bootstrap-select.min.js"></script>
</body>
</html>