forked from abhishekdudhal/online-shopping
-
Notifications
You must be signed in to change notification settings - Fork 0
/
login.php
127 lines (107 loc) · 3.77 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
<?php
session_start();
require_once("class.user.php");
$login = new USER();
if($login->is_loggedin()!="")
{
echo "<script>location.href='myprof.php'</script>";
}
if(isset($_POST['btn-login']))
{
$uname = strip_tags($_POST['txt_uname_email']);
$umail = strip_tags($_POST['txt_uname_email']);
$upass = strip_tags($_POST['txt_password']);
if($login->doLogin($uname,$umail,$upass))
{
$_SESSION['eid']=$uname;
echo "<script>location.href='myprof.php'</script>";
}
else
{
$error = "Wrong Details !";
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> Login</title>
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="bootstrap/css/bootstrap-theme.min.css" rel="stylesheet" media="screen">
<link rel="stylesheet" href="style.css" type="text/css" />
<style>
body
{
background-image:url(sign.jpg);
background-position:0px 0px;
background-size: cover;
background-repeat: repeat;
}
</style>
</head>
<body>
<br/>
<br/>
<div class="signin-form">
<div class="container">
<form class="form-signin" method="post" id="login-form" >
<h2 class="form-signin-heading">Welcome to Engineering Books</h2><hr />
<div id="error">
<?php
if(isset($error))
{
?>
<div class="alert alert-danger">
<i class="glyphicon glyphicon-warning-sign"></i> <?php echo $error; ?> !
</div>
<?php
}
?>
</div>
<div class="form-group">
<input type="text" class="form-control" name="txt_uname_email" placeholder="Username" required />
<span id="check-e"></span>
</div>
<div class="form-group">
<input type="password" class="form-control" name="txt_password" placeholder="Your Password" />
</div>
<hr />
<div class="form-group">
<button type="submit" name="btn-login" class="btn btn-default">
<i class="glyphicon glyphicon-log-in"></i> SIGN IN
</button>
</div>
<br />
<label>Don't have an account yet ! <a href="sign-up.php">Sign Up</a></label>
<br />
<label>Forget Password<a href="forgetpassword.php">click here</a></label>
</form>
</div>
</div>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li><a href="index.php">NewBooks</a></li>
<li><a href="oldbook.php">OldBooks</a></li>
<li ><a href="rentbook.php">Rent a book</a></li>
<li><a href="login.php?con=1">Feedback</a></li>
<li><a href="contact.php">ContactUs</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="login.php"><span class="glyphicon glyphicon-log-in"></span> Login</a></li>
</ul>
</div>
</div>
</nav>
</body>
</html>