-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome.php
140 lines (130 loc) · 7.43 KB
/
home.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
<?php
include 'admin/db_connect.php';
?>
<style>
#portfolio .img-fluid{
width: calc(100%);
height: 30vh;
z-index: -1;
position: relative;
padding: 1em;
}
</style>
<header class="masthead">
<div class="container-fluid h-100">
<div class="row h-100 align-items-center justify-content-center text-center">
<div class="col-lg-10 align-self-end mb-4 page-title">
<h3 class="text-white">Welcome to Flight-Reservation Dashboard <?php echo $_SESSION['setting_name']; ?></h3>
<hr class="divider my-4" />
<div class="col-md-12 mb-2 text-left">
<div class="card">
<div class="card-body">
<form id="manage-filter" action="flight.php" method="POST">
<div class="row form-group">
<div class="col-sm-3">
<label for="" class="control-label">From</label>
<select name="departure_airport_id" id="departure_location" class="custom-select browser-default select2">
<option value=""></option>
<?php
$airport = $conn->query("SELECT * FROM airport_list order by airport asc");
while($row = $airport->fetch_assoc()):
?>
<option value="<?php echo $row['id'] ?>" <?php echo isset($departure_airport_id) && $departure_airport_id == $row['id'] ? "selected" : '' ?>><?php echo $row['location'].", ".$row['airport'] ?></option>
<?php endwhile; ?>
</select>
</div>
<div class="col-sm-3">
<label for="" class="control-label">To</label>
<select name="arrival_airport_id" id="arrival_airport_id" class="custom-select browser-default select2">
<option value=""></option>
<?php
$airport = $conn->query("SELECT * FROM airport_list order by airport asc");
while($row = $airport->fetch_assoc()):
?>
<option value="<?php echo $row['id'] ?>" <?php echo isset($arrival_airport_id) && $arrival_airport_id == $row['id'] ? "selected" : '' ?>><?php echo $row['location'].", ".$row['airport'] ?></option>
<?php endwhile; ?>
</select>
</div>
<div class="col-sm-3">
<label for="" class="control-label">Departure Date</label>
<input type="date" class="form-control input-sm datetimepicker2" name="date" autocomplete="off">
</div>
<div class="col-sm-3" id="rdate" style="display: none">
<label for="" class="control-label">Return Date</label>
<input type="date" class="form-control input-sm datetimepicker2" name="date_return" autocomplete="off">
</div>
</div>
<div class="row form-group">
<div class="col-sm-2 text-center">
<div class="form-check">
<input class="form-check-input" type="radio" name="trip" id="onewway" value="1" checked>
<label class="form-check-label" for="onewway">
One-way
</label>
</div>
</div>
<div class="col-sm-2 text-center">
<div class="form-check">
<input class="form-check-input" type="radio" name="trip" id="rtrip" value="2">
<label class="form-check-label" for="rtrip">
Round Trip
</label>
</div>
</div>
<div class="col-sm-3 offset-sm-5">
<button class="btn btn-block btn-sm btn-primary" onclick="location.href='flights.php'">
<i class="fa fa-plane-departure"></i> Find Flights
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</header>
<section class="page-section" id="menu">
<div id="portfolio" class="container">
<div class="container-fluid p-0">
<div class="row">
<div class="col-lg-12 text-center">
<h2 class="mb-4">Partner Airlines</h2>
<hr class="divider">
</div>
</div>
<div class="row no-gutters">
<?php
$cats = $conn->query("SELECT * FROM airlines_list order by rand() asc");
while($row=$cats->fetch_assoc()):
?>
<div class="col-lg-4 col-sm-6">
<div class="portfolio-box" href="#">
<img class="img-fluid" src="assets/img/<?php echo $row['logo_path'] ?>" alt="" />
<div class="port-content text-center">
<a href="flights.php" class="btn-primary btn">Find Flights</a>
</div>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
</div>
<script>
$('.view_prod').click(function(){
uni_modal_right('Product','view_prod.php?id='+$(this).attr('data-id'))
})
$('.select2').select2({
placeholder:'Select Departure',
width:'100%'
})
$('[name="trip"]').on("keypress change keyup",function(){
if($(this).val() == 1){
$('#rdate').hide()
}else{
$('#rdate').show()
}
})
</script>
</section>