-
Notifications
You must be signed in to change notification settings - Fork 4
/
select_seat.php
134 lines (118 loc) · 5.03 KB
/
select_seat.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
<?php
require("loginheader.php");
if(!isset($_SESSION['id']))
{
header('Location: login.php');
}
if($_GET['scheduleno']=="" || $_GET['TicketPrice']=="" || $_GET['inputdate']==""){
header("location:searchbus.php");
}
$sql = "SELECT *
FROM bus_schedule
WHERE ScheduleNo =".$_GET['scheduleno'];
$query = mysqli_query($con,$sql);
$row = mysqli_fetch_array($query);
if($row)
{
$scheduleno = $row['ScheduleNo'];
$busno = $row['BusNo'];
$scheduledepart = $row['ScheduleDepart'];
$schedulearrive = $row['ScheduleArrive'];
$schedulestart = $row['ScheduleStartTime'];
$scheduleduration = $row['ScheduleDuration'];
$ticketprice = $row['TicketPrice'];
}
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../../../favicon.ico">
<title>blueBus - Search Bus</title>
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<!-- Custom styles for this template -->
<link href="css/offcanvas.css" rel="stylesheet">
<!-- Aos.js -->
<link href="https://unpkg.com/[email protected]/dist/aos.css" rel="stylesheet">
</head>
<!-- Start Body -->
<body class="bg-light">
<!-- HEADER-->
<?php
include('assets/header.php');
?>
<!-- Search Bus Ticket Start Here -->
<main role="main" class="container">
<div data-aos="zoom-out">
<div class="d-flex align-items-center p-3 my-3 text-white-50 bg-purple rounded box-shadow">
<img class="mr-3" src="https://www.mc-heads.net/avatar/1/100/nohelm.png" alt="" width="48" height="48">
<div class="lh-100">
<h6 class="mb-0 text-white"><?=$busno?></h6>
<h6 class="mb-0 text-white"><?=$_GET['inputdate']." ".$schedulestart?></h6>
<h6 class="mb-0 text-white"><?=$scheduledepart." TO ".$schedulearrive?></h6>
</div>
</div>
</div>
<div data-aos="fade-zoom-in">
<div class="my-3 p-3 bg-white rounded box-shadow">
<h6 class="border-bottom border-gray pb-2 mb-0">Seats</h6>
<br>
<div class="container">
<div class="row">
<?php
for ($x = 3; $x <= 30; $x+=3)
{
echo '<div class="col-sm">';
echo '<button type="button" class="btn btn-outline-primary" name="selectSeat"><a href="payment.php?seatno='.$x.'&inputdate='.$_GET['inputdate'].'&TicketPrice='.$_GET['TicketPrice'].'&PromoCode='."none".'&scheduleno='.$_GET['scheduleno'].'">'.$x.'</a></button>';
echo "</div>";
}
?>
</div>
<div class="row">
<?php
for ($x = 2; $x <= 30; $x+=3)
{
echo '<div class="col-sm">';
echo '<button type="button" class="btn btn-outline-primary" name="selectSeat"><a href="payment.php?seatno='.$x.'&inputdate='.$_GET['inputdate'].'&TicketPrice='.$_GET['TicketPrice'].'&PromoCode='."none".'&scheduleno='.$_GET['scheduleno'].'">'.$x.'</a></button>';
echo "</div>";
}
?>
</div>
<br>
<div class="row">
<?php
for ($x = 1; $x <= 30; $x+=3)
{
echo '<div class="col-sm">';
echo '<button type="button" class="btn btn-outline-primary" name="selectSeat"><a href="payment.php?seatno='.$x.'&inputdate='.$_GET['inputdate'].'&TicketPrice='.$_GET['TicketPrice'].'&PromoCode='."none".'&scheduleno='.$_GET['scheduleno'].'">'.$x.'</a></button>';
echo "</div>";
}
?>
</div>
</div>
</div>
</div>
</main>
<!-- Bootstrap core JavaScript
================================================== -->
<script>
var today = new Date().toISOString().split('T')[0];
document.getElementsByName("inputDepartDate")[0].setAttribute('min', today);
</script>
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/holder.min.js"></script>
<script src="js/offcanvas.js"></script>
<!-- Aos.js -->
<script src="https://unpkg.com/[email protected]/dist/aos.js"></script>
<script>
AOS.init();
</script>
</body>
</html>