-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
162 lines (155 loc) · 5.28 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
<?php
include("server.php");
?>
<?php
include("server2.php");
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="style2.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<title>Book tickets</title>
<style>
body{
background-image: url('https://www.irctc.co.in/nget/swach_banner2.391192cab480269195cd.jpg');
background-repeat: no-repeat;
background-size: cover;
}
aside{
margin: 10px;
}
#profile{
float:top;
font-family: sans-serif;
text-align: center;
max-width: 350px;
height: 500px;
margin-left: 150px;
margin-top: 50px;
padding: 6px;
background: white;
}
#profile img{
width: 150px;
height: 150px;
border-radius: 50%;
object-fit: cover;
}
h2{
text-align: : center;
font-size: 52px;
font-weight: bold;
margin-top: 20px;
margin-bottom: 0px;
padding-top: 0;
text-transform: capitalize;
}
i{
margin: auto;
vertical-align: middle;
}
h4{
margin-top: 0px;
margin-bottom: 10px;
}
.uh{
width: 80%;
padding: 5px;
font-size: 15px;
margin: 0px auto;
}
.material-icons{
height: 34px;
width: 39px;
}
.k2th{
margin-top: 5px ;
border: none;
color: blue;
background-color: white;
cursor: pointer;
display: inline-block;
width: 50px;
border-color: white;
}
.hjk{
margin-top: 26px;
font-size: 18px;
}
</style>
</head>
<body>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx" crossorigin="anonymous"></script>
<nav class="navbar sticky-top navbar-expand-sm navbar-dark bg-dark">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarText" aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<?php if(isset($_SESSION['username'])): ?>
<div class="collapse navbar-collapse" id="navbarText">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="index.php">Book Tickets<span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="train_stas.php">Train Schedule</a>
</li>
<li class="nav-item">
<a class="nav-link" href="pnr.php">PNR Enquiry</a>
</li>
</ul>
<span class="navbar-text" class="nav-item">
Welcome <strong><?php echo $_SESSION['username']; ?></strong>
</span>
<span class="navbar-text" class="nav-item">
<a class="nav-link" href="index.php?logout='1'">Logout</a>
</span>
<?php endif ?>
<?php if(!isset($_SESSION['username'])): ?>
<div class="collapse navbar-collapse" id="navbarText">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="login.php">Book Tickets<span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="train_stas.php">Train Schedule</a>
</li>
<li class="nav-item">
<a class="nav-link" href="pnr.php">PNR Enquiry</a>
</li>
</ul>
<span class="navbar-text" class="nav-item">
<a class="nav-link" href="register.php">Register</a>
</span>
<span class="navbar-text" class="nav-item">
<a class="nav-link" href="login.php">Login</a>
</span>
<?php endif ?>
</div>
</nav>
<form method="post" action="confirm.php">
<aside id="profile">
<h2>BOOK</h2>
<h4>YOUR TICKET</h4>
<span class="material-icons">directions_transit</span><br>
<input type="text" name="from" placeholder="From*" class="uh" value="<?php if (isset($from)) echo $from; ?>" required><br><br>
<input type="text" name="to" placeholder="To*" class="uh" value="<?php if (isset($to)) echo $to; ?>" required><br>
<div class="hjk"><input type="date" name="date" id="datePicker" placeholder="yyyy-mm-dd" class="uh" value="2019-11-27"required><div>
<select name="classes" class="uh hjk" value="<?php if (isset($class)) echo $class; ?>">
<option value="SL">Sleeper</option>
<option value="1A">AC First Class(1A)</option>
<option value="2A">AC Second Class(2A)</option>
<option value="3A">AC Third Class(3A)</option>
</select>
<button class="btn info hjk" name="trains">Find Trains</button>
<script>document.getElementById('datePicker').valueAsDate = new Date();</script>
</aside>
<?php include('footer.php'); ?>
</form>
</body>
</html>