forked from varun-raj/GDGDevfestHackathon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
login.php
94 lines (86 loc) · 2.98 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
<?php
session_start();
if(isset($_SESSION['login'])){
header('Location:index.php');
}
?>
<html>
<link href="content/css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="content/css/style.css" rel="stylesheet" type="text/css" />
<title>Devfest Chennai 2013 Hackathon</title>
<body>
<?php
require_once('config.ini');
?>
<div id="wrap">
<div class="navbar navbar-default ">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.php">DevFest Hackathon</a>
</div>
<form class="navbar-form navbar-left" role="search" action="search.php" method="get">
<div class="form-group">
<input type="text" class="form-control" name="name" placeholder="Search">
</div>
<button type="submit" class="btn btn-default">Go !</button>
</form>
<div class="navbar-collapse collapse pull-right">
<ul class="nav navbar-nav">
<li class=""><a href="index.php">Home</a></li>
<li><a href="about.php">About</a></li>
<li><a href="submit.php">Submit</a></li>
<li class="dropdown">
<?php
if(isset($_SESSION['login'])!=1){
echo '
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Login/Register <b class="caret"></b></a>
<ul class="dropdown-menu"><li><a href="login.php">Login</a></li>
<li><a href="register.php">Register</a></li>';
}
else{
echo"<a href='#' class='dropdown-toggle' data-toggle='dropdown'>{$_SESSION['member_name']} <b class='caret'></b></a>
<ul class='dropdown-menu'>
<li><a href='profile.php'>Profile</a></li>
<li><a href='logout.php'>Logout</a></li>";
}
?>
</ul>
</li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
<div class="container">
<div class="well col-lg-3 pull-right" >
<form method="post" action="login_process.php"><br>
<label for="username">Username:</label> <input type="text" name="username"class="form-control"><br>
<label for="pass">Password:</label> <input type="password" name="pass"class="form-control"><br>
<?php
if(isset($_GET['msg']))
{
$message=$_GET['msg'];
if($message==1)
echo "<p ><i style='color:red'>Wrong Username/Password</i><p><br/>";
if($message==2)
echo "<p ><i style='color:red'>Please login First</i><p><br/>";
}
?>
<input type="submit" name="submit" class="btn btn-primary">
</form>
</div>
</div>
</div>
<div id="footer">
<div class="container">
<p class="footer_text">Designed By GDG Chennai Design Team.</p>
</div>
</div>
</body>
<script src="content/js/jquery.js"></script>
<script src="content/js/bootstrap.js"></script>
</html>