-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
83 lines (76 loc) · 3.6 KB
/
index.html
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Cheapest Flights Search Engine</title>
<link href="css/airports.css" type="text/css" rel="stylesheet">
<script src="js/airports.js" type="text/javascript" ></script>
<script src="https://cdn.jsdelivr.net/npm/airport-autocomplete-js@latest/dist/index.browser.min.js"></script>
<script type="text/javascript">
var datefield=document.createElement("input")
datefield.setAttribute("type", "date")
if (datefield.type!="date"){ //if browser doesn't support input type="date", load files for jQuery UI Date Picker
document.write('<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />\n')
document.write('<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"><\/script>\n')
document.write('<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"><\/script>\n')
}
</script>
</head>
<script>
// Example options for Formatting
var options = {
formatting: `<div class="$(unique-result)"
single-result"
data-index="$(i)">
$(IATA) </div>`
};
AirportInput("autocomplete-airport-1", options);
AirportInput("autocomplete-airport-2", options);
</script>
<body>
<div style="margin-left:500px;">
<h2>Cheapest Flights Search Engine</h2>
<form action="results.php" method="post">
<section>
<div style="display:flex; flex-direction: row; justify-content: left; align-items: left">
<label for="airport1">Departure City : </label>
<input id="autocomplete-airport-1" type="text" name="airport1" size="16" required />
</div>
<p>
<label for="departureDate">Departure date : </label>
<input name="departureDate" value="<?php echo date('Y-m-j'); ?>" type="date" size="200" required />
</p>
<div style="display:flex; flex-direction: row; justify-content: left; align-items: left">
<label for="airport2">Destination City : </label>
<input id="autocomplete-airport-2" type="text" name="airport2" size="16" required />
</div>
<p>
<label for="returnDate">Return date :  </label>
<input name="returnDate" value="<?php echo date('Y-m-j'); ?>" type="date" size="200" required />
</p>
<p>
<label for="currency">
<span>Select ticket price currency :</span>
</label>
<select id="currency" name="currency">
<option value="CHF">Swiss Franc (Fr.)</option>
<option value="EUR" selected>Euro (€)</option>
<option value="GBP">Pound sterling (£)</option>
<option value="IND">Indian rupee (₹)</option>
<option value="USD">US Dollar (US$)</option>
</select>
</p>
</section>
<section>
<p>
<input type="submit" value="Search cheapest flights">
</p>
</section>
</form>
</div>
<div style="margin-left:410px;">
<hr style="margin-right:590px;">
<h2><b>Kâmi Barut-Wanayo Design © 2020 - 2021</b></h2>
</div>
</body>
</html>