-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
99 lines (96 loc) · 3.76 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
<?php
session_start();
$liftime = 5 * 60;
setcookie(session_name(), session_id(), time() + $liftime, "/");
if ($_SESSION['login'] == true) {
header("Location:book.php");
} else {
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<link href="bootstrap/css/bootstrap.css" rel="stylesheet">
<link href="bootstrap/css/datetimepicker.css" rel="stylesheet" media="screen">
<script type="text/javascript" src="bootstrap/js/jquery.js"></script>
<script type="text/javascript" src="bootstrap/js/bootstrap.js"></script>
<script type="text/javascript" src="bootstrap/js/bootstrap-datetimepicker.min.js"></script>
<style type="text/css">
body {
padding-top: 60px;
padding-bottom: 40px;
text-align: center;
}
.sidebar-nav {
padding: 9px 0;
}
@media (max-width: 980px) {
/* Enable use of floated navbar text */
.navbar-text.pull-right {
float: none;
padding-left: 5px;
padding-right: 5px;
}
}
.form_text {
width: 70px;
display: inline-block;
}
#btn_login {
width: 80px
}
#btn_login_div {
width:100px
}
.form_box{
margin:40px auto;
width:100%;
}
.span1 {
float: none;
display: inline-block;
}
</style>
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container-fluid">
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="brand" href="#">Enjoy your trip</a>
<div class="nav-collapse collapse">
<p class="navbar-text pull-right">
<a href="#" class="navbar-link">Register</a>
</p>
</div><!--/.nav-collapse -->
</div>
</div>
</div>
<div class="span10 form_box">
<form name="login" action="login.php" method=post>
<div class="row "><span class="form_text">Username</span><input type=text name="username"></div>
<div class="row "><span class="form_text">Password</span><input type=password name="password"></div>
<div class="row ">
<div class="span1" id="btn_login_div">
<input class="btn btn-info" id="btn_login" name="login" type=submit value="Login">
</div>
<div class="span1">
<input class="btn btn-info" name="register" type="button" value="Register" onclick="go_register_page()">
</div>
</div>
</form>
</div>
</body>
</html>
<?php
}
?>
<script>
function go_register_page(){
location.href="register.php";
}
</script>