-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuserwebsite.html
More file actions
312 lines (247 loc) · 11.1 KB
/
userwebsite.html
File metadata and controls
312 lines (247 loc) · 11.1 KB
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
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
<!doctype html>
<!--[if IE 9]><html class="lt-ie10" lang="en" > <![endif]-->
<html class="no-js" lang="en" data-useragent="Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Fast Form | Disaster Relief</title>
<link rel="stylesheet" href="css/foundation.min.css" />
<link rel="stylesheet" href="css/app.css" />
<script src="js/vendor/modernizr.js"></script>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDsbzoLjGocnaRHZF3IBMFVI-X41vPl6qM&sensor=true&libraries=geometry"></script>
<style>
/* Set the size of the div element that contains the map */
#map {
height: 400px; /* The height is 400 pixels */
width: 100%; /* The width is the width of the web page */
}
.dropbtn {
background-color: #000000;
color: white;
padding: 18px;
font-size: 15px;
border: none;
cursor: pointer;
}
.dropbtn:hover, .dropbtn:focus {
background-color: #2980B9;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f1f1f1;
min-width: 160px;
overflow: auto;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown a:hover {background-color: #ddd;}
.show {display: block;}
</style>
</head>
<body>
<div class="row">
<div class="large-12 columns">
<!-- Navigation -->
<ul class="button-group">
<li><a href="C:\Users\nelak\Desktop\EHack for Charity\adminlogin.html">Admin Login</a></li>
</ul>
<!-- End Navigation -->
<!-- Header Content -->
<div class="row panel header">
<div class="large-2 columns">
<img src="image001.png">
</div>
<div class="large-10 columns">
<p>Fast Form</p>
<h2> To Streamline the Disaster Relief Process</h2>
</div>
</div>
<!-- End Header Content -->
<p id="demo"></p>
<script>
var x = document.getElementById("demo");
function getLocation() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showPosition, showError);
} else {
x.innerHTML = "Geolocation is not supported by this browser.";
}
}
function showPosition(position) {
x.innerHTML = "Latitude: " + position.coords.latitude +
"<br>Longitude: " + position.coords.longitude;
}
function showError(error) {
switch(error.code) {
case error.PERMISSION_DENIED:
x.innerHTML = "User denied the request for Geolocation."
break;
case error.POSITION_UNAVAILABLE:
x.innerHTML = "Location information is unavailable."
break;
case error.TIMEOUT:
x.innerHTML = "The request to get user location timed out."
break;
case error.UNKNOWN_ERROR:
x.innerHTML = "An unknown error occurred."
break;
}
}
/* When the user clicks on the button,
toggle between hiding and showing the dropdown content */
function myFunction() {
document.getElementById("myDropdown").classList.toggle("show");
}
// Close the dropdown if the user clicks outside of it
window.onclick = function(event) {
if (!event.target.matches('.dropbtn')) {
var dropdowns = document.getElementsByClassName("dropdown-content");
var i;
for (i = 0; i < dropdowns.length; i++) {
var openDropdown = dropdowns[i];
if (openDropdown.classList.contains('show')) {
openDropdown.classList.remove('show');
}
}
}
}
// Initialize and add the map
function initMap() {
// The location of Uluru
var uluru = {lat: -25.344, lng: 131.036};
var coo = {lat: 40.205326899999996, lng: -82.9917353};
// The map, centered at Uluru
var map = new google.maps.Map(
document.getElementById('map'), {zoom: 4, center: uluru});
// The marker, positioned at Uluru
var marker = new google.maps.Marker({position: coo, map: map});
}
</script>
<!--Load the API from the specified URL
* The async attribute allows the browser to render the page while the API loads
* The key parameter will contain your own API key (which is not needed for this tutorial)
* The callback parameter executes the initMap() function
-->
<script defer
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBfm6J3LKQPpVjjdC6qxk0ErpYEKwChTPc&callback=initMap">
</script>
<div class="row">
<div class="large-12 columns">
<div class="radius panel">
<div id="maparea">
<div id="map"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Steps -->
<div class="row steps">
<div class="large-3 small-12 columns">
<ul class="pricing-table">
<li class="title step1"><span class="step">1</span> Locate</li>
<li class="description">Get your current location</li>
<li class="cta-button"><button onclick="getLocation()">Locate Me</button></li>
</ul>
</div>
<div class="large-3 small-12 columns">
<ul class="pricing-table">
<li class="title step2"><span class="step">2</span> Center</li>
<li class="description">Choose an Shelter</li>
<li class="cta-button">
<button onclick="myFunction()" class="dropbtn">Choose</button>
<div id="myDropdown" class="dropdown-content">
<a href="#">Willy Wonka's Chocolate Factory</a>
<a href="#">Cat Palace</a>
<a href="#">GYM of Dogs</a>
</li>
</ul>
</div>
<div class="large-3 small-12 columns">
<ul class="pricing-table">
<li class="title step3"><span class="step">3</span> Form</li>
<li class="description">Fill out a Form</li>
<li class="cta-button"><a class="typeform-share button" id="start-form" href="https://percyjackson2024.typeform.com/to/gRLY7i3s" data-mode="1" target="_self">Get Started</a></li>
</ul>
</div>
<div class="large-3 small-12 columns">
<ul class="pricing-table">
<li class="title step4"><span class="step">4</span> Status</li>
<li class="description">Track Your Status</li>
<li class="cta-button"><a class="button" href="tract_status.html">Track</a></li>
</ul>
</div>
</div>
<!-- End Steps -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="../js/foundation.min.js"></script>
<script src="js/jquery.geolocation.js"></script>
<script>(function(){var qs,js,q,s,d=document,gi=d.getElementById,ce=d.createElement,gt=d.getElementsByTagName,id='typef_orm',b='https://s3-eu-west-1.amazonaws.com/share.typeform.com/';if(!gi.call(d,id)){js=ce.call(d,'script');js.id=id;js.src=b+'share.js';q=gt.call(d,'script')[0];q.parentNode.insertBefore(js,q)}id=id+'_';if(!gi.call(d,id)){qs=ce.call(d,'link');qs.rel='stylesheet';qs.id=id;qs.href=b+'share-button.css';s=gt.call(d,'head')[0];}})()</script>
<script>(function(){var qs,js,q,s,d=document,gi=d.getElementById,ce=d.createElement,gt=d.getElementsByTagName,id='typef_orm',b='https://s3-eu-west-1.amazonaws.com/share.typeform.com/';if(!gi.call(d,id)){js=ce.call(d,'script');js.id=id;js.src=b+'share.js';q=gt.call(d,'script')[0];q.parentNode.insertBefore(js,q)}id=id+'_';if(!gi.call(d,id)){qs=ce.call(d,'link');qs.rel='stylesheet';qs.id=id;qs.href=b+'share-button.css';s=gt.call(d,'head')[0];}})()</script>
<script type="text/javascript">
var form_href = '#';
var loc = '';
var center = '';
var center_list = <?=json_encode($centers_json->centers);?>;
$(document).ready(function () {
locate();
$('#locate').on('click',function(){
locate();
});
$('#center li').on('click',function(){
$('.step2 span').addClass('done');
center = $(this).data('center');
$('#start-form').attr('href',form_href+'?location='+loc+'¢er='+center);
});
function locate(){
$.geolocation(function (lat, lng) {
loc=lat+','+lng;
var myLatlng = new google.maps.LatLng(lat, lng);
var mapOptions = {
center: new google.maps.LatLng(lat, lng),
zoom: 4
};
var map = new google.maps.Map(document.getElementById("maparea"), mapOptions);
var marker = new google.maps.Marker({
position: myLatlng,
map: map,
icon: '/images/user.png'
});
// $.each(center_list,function(k,v){
// var from = new google.maps.LatLng(lat,lng);
// var to = new google.maps.LatLng(v.lat,v.lng);
// var dist = google.maps.geometry.spherical.computeDistanceBetween(from, to);
// $('#'+v.id).html($('#'+v.id).html()+' '+dist);
// });
<? foreach ($centers_json->centers as $c) {?>
var marker = new google.maps.Marker({
position: new google.maps.LatLng(<?=$c->lat.','.$c->lng?>),
map: map,
icon: '/images/center.png',
title: "<?=$c->name?>"
});
<? } ?>
$('#start-form').attr('href',form_href+'?location='+loc+'¢er='+center);
$('#start-form').removeClass('hide');
$('.step1 span').addClass('done');
});
}
});
</script>
<script>
$(document).foundation();
</script>
</body>
</html>