-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
187 lines (151 loc) · 7.25 KB
/
index.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
<?php include('include/connect.php');?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="shortcut icon" href="img/aalogo.jpg">
<title>Jersey Developers Ltd.</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- Less styles
<link rel="stylesheet/less" type="text/css" href="less/bootsshop.less">
<script src="less.js" type="text/javascript"></script>
-->
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet"/>
<!-- Le styles -->
<link href="assets/css/bootstrap-responsive.css" rel="stylesheet"/>
<link href="assets/css/docs.css" rel="stylesheet"/>
<link href="assets/js/google-code-prettify/prettify.css" rel="stylesheet"/>
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Le fav and touch icons -->
<style>
body {
background-image: url("background1.JPG");
background-repeat: no-repeat;
}
</style>
</head>
<body >
<!-- Navbar
================================================== -->
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<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" href="index.php">Jersey Developers Ltd. </a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="index.php"><i class="icon-home icon-large"></i> Home</a></li>
<li><a href="properties.php"><i class=" icon-th-large icon-large"></i> Properties</a></li>
<!-- <li><a href="contact.php"><i class="icon-signal"></i> Contact Us</a></li>
<li><a href="aboutus.php"><i class="icon-flag"></i> About Us</a></li>-->
<li><a href="server/index.php"> CPANEL </a></li>
</ul>
<?php
if (isset($_POST['submit'])) {
function clean($str) {
$str = @trim($str);
if (get_magic_quotes_gpc()) {
$str = stripslashes($str);
}
return mysql_real_escape_string($str);
}
$email = clean($_POST['email']);
$password=clean($_POST['password']);
$pass=md5($password);
$query = mysql_query("select * from customers where Email='$email' and Password='$pass' ") or die(mysql_error());
$count = mysql_num_rows($query);
$row = mysql_fetch_array($query);
if ($count > 0) {
session_start();
session_regenerate_id();
$_SESSION['id'] = $row['CustomerID'];
$memid=$row['CustomerID'];
$Fname=$row['Firstname'];
$user=$row['Email'];
date_default_timezone_set('Asia/Manila');
$date=date('F j, Y g:i:a ');
mysql_query("insert into loginout_history(CustomerID,User,Name,Time_in,Time_out)values('$memid','$user','$Fname','$date','')")or die (mysql_error());
echo "<script>window.location.replace('user_index.php')</script>";
session_write_close();
} else {
session_write_close();
?>
<script type="text/javascript">
alert("Invalid Username or Password");
</script>
<?php }
}
?>
<div class="pull-right"> <a href="register.php"><button name="submit" class="btn pull-right">Sign Up</button></a> </div>
<div class="pull-right">
<form method="post">
<input type="text" class="span2 form-control" name="email" id="inputEmail" placeholder="Email"/>
<input type="password" class="span2 form-control" name="password" id="inputPassword" placeholder="Password"/>
<button type="submit" name="submit" class="btn pull-right">Sign in</button>
</form>
</div>
</div><!--/.nav-collapse --></div>
</nav>
<!-- ======================================================================================================================== -->
<div id="mainBody" class="container">
<header id="header">
<div class="row">
<br />
</div>
<div class="clr"></div>
</header>
<!-- ==================================================Header End====================================================================== -->
<div class="container theme-showcase" role="main">
<div class="container">
<hr class="soft">
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
</ol>
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="img/mombasa-moi-tusks-normal-e1534494987824.jpg" alt="First slide">
</div>
<div class="item">
<img src="img/Kisumu-City-Kisumu-Kenya.jpg" alt="Second slide">
</div>
<div class="item">
<img src="img/MGM0161.jpg" alt="Third slide">
</div>
</div>
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
<div class="row">
<div id="sidebar" class="span3">
</div>
</div>
</div>
</div>
<!-- Footer ------------------------------------------------------ -->
<hr class="soft">
<div id="footerSection">
<?php include('footer.php');?>
<script src="docs.min.js"></script>
<script src="jquery.min.js"></script>
<script src="bootstrap.min.js"></script>
</body>