-
Notifications
You must be signed in to change notification settings - Fork 4
/
new_trip.php
155 lines (135 loc) · 4.29 KB
/
new_trip.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
<?php
session_start();
require_once('./utils/ldap.php');
require_once('./utils/userhelper.php');
if (!isLoggedIn()) {
$home_url = 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '/index.php'; // the user is redirected to the home page if logged in
header('Location: ' . $home_url);
}
?>
<!doctype html>
<html>
<head>
<title>Cab Share</title>
<link rel="stylesheet" href="./css/global.css" />
<link rel="stylesheet" href="./css/datepicker.css" />
<link rel="stylesheet" href="./css/datetheme.css" />
<link rel="stylesheet" href="./css/jqueryui.css" />
<link rel="stylesheet" href="./css/new_trip.css" />
<link rel="shortcut icon" href="./favicon.png" type="image/x-icon">
<link rel="icon" href="./favicon.png" type="image/x-icon">
</head>
<body>
<?php require_once('header.php'); ?>
<div class="container">
<div id="page_title">
Create a new trip
</div>
<div id="page_content">
<form id="form_table" onsubmit="return false;">
<input type="hidden" name="email" value="<?php echo getMailId(); ?>" />
<input type="hidden" name="username" value="<?php echo getName(); ?>" />
<table width="100%">
<tr>
<td width="30%">
</td>
<td width="30%">
</td>
<td valign="top" rowspan="9" width="40%" style="vertical-align: top; padding-left: 15px; text-align: center;">
<div id="map"></div>
<div id="right-panel"></div>
</td>
</tr>
<tr>
<td width="30%">
Trip starts from:
</td>
<td width="30%">
<input id="autocomplete" placeholder="Enter the source address"
onFocus="geolocate()" type="text" name="source_addr"></input>
</td>
</tr>
<tr>
<td width="30%">
Trip ends at:
</td>
<td width="30%">
<input id="autocomplete2" placeholder="Enter the destination address"
onFocus="geolocate()" type="text" name="dest_addr"></input>
</td>
</tr>
<tr>
<td width="30%">
Time:<br /><small>(When are you comfortable with the cab arriving?)</small>
</td>
<td width="30%">
<div id="slider-range"></div>
<span id="time"></span>
<input type="hidden" id="start_time" name="start_time" />
<input type="hidden" id="end_time" name="end_time" />
</td>
</tr>
<tr>
<td width="30%">
Date:
</td>
<td width="30%">
<input type="text" id="datepicker" class="picker" name="date" placeholder="What date do you want a cab for?"></div>
</td>
</tr>
<tr>
<td width="30%">
Contact Number:
</td>
<td width="30%">
<input type="text" id="phone" name="phone_number" placeholder="This is optional but recommended." />
</td>
</tr>
<tr>
<td width="30%">
Number of co-travellers:
</td>
<td width="30%">
<input type="text" id="num_cotravel" name="co_travellers" placeholder="Including you." />
</td>
</tr>
<tr>
<td width="30%">
Comments:
</td>
<td width="30%">
<input type="text" id="comments" name="comments" placeholder="About quantity of luggage, etc." />
</td>
</tr>
<tr>
<td width="30%">
Hide this trip from other people<br />on the "All trips" page?<br />
<small>PRIVACY Note: Allowing this trip to show up on the "All Trips" page might help other travellers to directly contact you without using the CabShare matching algorithm. </small>
</td>
<td width="30%">
<select class="select_input" id="privacy" name="privacy">
<option> No - ALLOW other people to see this trip on public page. </option>
<option> Yes - DONT show this trip on public page. </option>
</select>
</td>
</tr>
<tr>
<td valign="top" width="30%" colspan="2" style="vertical-align: top;">
<input id="submit_btn" type="submit" class="btn anim" value="Add this trip" />
</td>
</tr>
</table>
</form>
</div>
</div>
<?php require_once('footer.php'); ?>
</body>
<script src="./js/jquery.js"></script>
<script src="./js/jqueryui.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCUDzz-esKOYa1XHFFek8plrCKJw-OI_5I&libraries=places&callback=initAutocomplete"
async defer></script>
<script src="./js/new_trip.js"></script>
<script src="./js/new_trip_maps.js"></script>
<script src="./js/helper.js"></script>
<script src="./js/endpoints.js"></script>
</html>