-
Notifications
You must be signed in to change notification settings - Fork 1
/
journeyplanner.php
230 lines (191 loc) · 12 KB
/
journeyplanner.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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" crossorigin="anonymous">
<link rel="shortcut icon" href="css/images/weblogo.png"/>
<link rel="stylesheet" type="text/css" href="css\main.css">
<link rel="stylesheet" type="text/css" href="css\signup.css">
<link rel="stylesheet" type="text/css" href="css\index.css">
<link rel="stylesheet" type="text/css" href="css\journeyplanner.css">
<link href="https://fonts.googleapis.com/css?family=Patua+One" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
<title>Travolla - Optimised Journey Planner</title>
</head>
<body>
<?php
include('header.php');
?>
<div class="container-fluid" style="padding-top: 5%" id="journeyPlannerMaster">
<!-- Top Journey Planner container -->
<div id="journeyPlanner" class="container">
<h1 id="toptitle">My Journey</h1>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-2 col-lg-2" >
</div>
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8" >
<h4>When are you visiting?</h4>
<!-- Start / End date pickers -->
<div class="container datePicker">
<div class="row" style="margin-top: 5%;">
<div class="col-sm">
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">Start</span>
</div>
<input id="startDate" type="date" name="datePicker">
</div>
</div>
<div class="col-sm">
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">End</span>
</div>
<input id="endDate" type="date" name="datePicker">
</div>
</div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-2 col-lg-2" >
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-2 col-lg-2" >
</div>
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8" >
<!-- Location selection div -->
<div id="locationDiv">
<h4 id="locationH4">Select your destination!</h4>
<div class="input-group mb-3" style="margin-top: 5%;">
<div class="dropdown">
<button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Location
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="#" onclick="getActivities(5120)">Dalian, China</a>
<a class="dropdown-item" href="#" onclick="getActivities(8120)">Brisbane, Australia</a>
</div>
</div>
<button onclick="drawButtons()" class="getActivitiesBtn btn btn-primary" id="getActivitiesBtn">Find Activities!</button>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-2 col-lg-2" >
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-2 col-lg-2" >
</div>
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8" >
<!-- Container to display the list of activity buttons -->
<h5>Activities:</h5>
<div id="activityDiv" class="container">
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-2 col-lg-2" >
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-2 col-lg-2" >
</div>
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8" >
<!-- Container to hold the cards of the activities -->
<div id="cardsDiv" class="container">
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-2 col-lg-2" >
</div>
</div>
<br>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-2 col-lg-2" >
</div>
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8" >
<!-- Select the pace -->
<div class="paceDiv">
<h4>Day Length</h4>
<div id="paceBtnDiv" class="btn-group btn-group-toggle" data-toggle="buttons" style="margin-top: 5%;">
<label class="btn btn-secondary">
<input type="radio" name="options" id="shortDay" autocomplete="off" checked>Short
</label>
<label class="btn btn-secondary active">
<input type="radio" name="options" id="normalDay" autocomplete="off">Normal
</label>
<label class="btn btn-secondary">
<input type="radio" name="options" id="longDay" autocomplete="off">Long
</label>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-2 col-lg-2" >
</div>
</div>
<br> <!-- This is gross I know, but hey it works -->
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-2 col-lg-2" >
</div>
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8" >
<!-- Optimise and reset buttons -->
<button onclick="optimiseJourney()" class="optimiseBtn btn btn-primary" id="optimiseBtn">Optimise Journey!</button>
<button onclick="resetJourney()" class="resetBtn btn btn-primary" id="resetBtn">Reset</button>
<br>
<div id="timetableContainer" class="container">
<br><br><br>
<h4 >Your Timetable</h4>
<!-- Main container to hold events -->
<div id="timetableMain" class="container">
</div>
<!-- Timetable print button -->
<button onclick="printTimetable()" class="printBtn btn btn-primary" id="printBtn" style="margin-top: 5%;">Print Timetable</button>
<button onclick="guideMatch()" class="printBtn btn btn-primary" id="selectBtn" style="margin-top: 5%;">Select Guide</button>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-2 col-lg-2" >
</div>
</div>
</div>
</div>
<br>
<!-- Print template container -->
<div id="dvContainer" style="display: none;">
<section style="font-family: 'Open Sans', sans-serif;">
<div style="margin-left: 10%;margin-right: 10%;">
<img src="css/images/weblogo.png" style="margin-left: 40%; height: 100px;">
<p style=" margin-top: 5%;color:#F47820; font-weight: bold; text-align: center; font-size: 30px; font-family: 'Patua One',cursive;">Thank you for using Travolla and wish you a happy holiday!</p>
</div>
<h1 style="color: #F47820; margin-top: 10%;font-family: 'Patua One',cursive; text-align: center;">Journey Planner</h1>
<div style="margin-left: 30%;">
<!-- Personal details go here -->
<ul style="list-style-type: none;" id="invoiceList">
<li><?php echo $_SESSION['user'];?></li>
</ul>
</div>
</section>
<section style="font-family: 'Open Sans', sans-serif;">
<!-- Events go here -->
<div id="timetableInvoice" style="margin-left: 35%;margin-right: 10%;" class="container">
</div>
<h1 style="color: #F47820; margin-top: 5%;font-family: 'Patua One',cursive; text-align: center;">Trip Invoice</h1>
<div style="margin-left: 10%; margin-right: 10%;">
<p>Activity Cost: <span id="activitycost" style="float: right;">$200</span></p>
<p>Guide Cost: <span id="guidecost" style="float: right;"> $30/hour </span></p>
<p>Day Duration: <span id="duration" style="float: right;">6 hours</span></p>
<hr style="width=75%;">
<p>Total Cost: <span id="total" style="float: right;"> $380</span></p>
</div>
</section>
</div>
<br>
<?php include('footer.php'); ?>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js" integrity="sha384-smHYKdLADwkXOn1EmN1qk/HfnUcbVRZyYmZ4qpPea6sjB/pTJ0euyQp0Mk8ck+5T" crossorigin="anonymous"></script>
<script src="./js/journeyplanner.js"></script>
</body>
</html>