-
Notifications
You must be signed in to change notification settings - Fork 1
/
offer_food.html
329 lines (269 loc) · 11.9 KB
/
offer_food.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
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
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Natural-Distater-Mitigation</title>
<!-- Bootstrap core CSS-->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom fonts for this template-->
<link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
<!-- Page level plugin CSS-->
<link href="vendor/datatables/dataTables.bootstrap4.css" rel="stylesheet">
<!-- Custom styles for this template-->
<link href="css/sb-admin.css" rel="stylesheet">
<script>
// function showHint() {
// var xmlhttp = new XMLHttpRequest();
// xmlhttp.onreadystatechange = function() {
// if (this.readyState == 4 && this.status == 200) {
// //console.log("hi"+this.responseText);
// document.getElementById("txtHint").value = this.responseText;
// }
// };
// xmlhttp.open("GET", "transac_ajax.php?q=" + "", true);
// xmlhttp.send();
// }
function fillIn() {
var xmlhttp = new XMLHttpRequest();
var string = document.getElementById("phno");
xmlhttp.onreadystatechange = function () {
if (this.readyState == 4 && this.status == 200) {
//console.log("hi"+this.responseText);
var response = this.responseText;
console.log(this.responseText);
var arr = response.split(";");
document.getElementById('name').value = arr[0];
document.getElementById('email_id').value = arr[1];
document.getElementById('addr').value = arr[2];
console.log(arr[0]);
}
};
xmlhttp.open("GET", "fillIn_ajax.php?a=" + string, true);
xmlhttp.send();
}
</script>
</head>
<body id="page-top">
<nav class="navbar navbar-expand navbar-dark bg-dark static-top">
<a class="navbar-brand mr-1" href="index.html">Hope</a>
<button class="btn btn-link btn-sm text-white order-1 order-sm-0" id="sidebarToggle" href="#">
<i class="fas fa-bars"></i>
</button>
<!-- Navbar Search -->
<form class="d-none d-md-inline-block form-inline ml-auto mr-0 mr-md-3 my-2 my-md-0">
<div class="input-group">
<input type="text" class="form-control" placeholder="Search for..." aria-label="Search"
aria-describedby="basic-addon2">
<div class="input-group-append">
<button class="btn btn-primary" type="button">
<i class="fas fa-search"></i>
</button>
</div>
</div>
</form>
</nav> <!-- Top Nav bar ends here -->
<div id="wrapper">
<!-- Sidebar -->
<ul class="sidebar navbar-nav">
<li class="nav-item ">
<a class="nav-link" href="index.html">
<i class="fas fa-school"></i>
<span>Home</span>
</a>
</li>
<li class="nav-item active">
<a class="nav-link " href="food.html">
<i class="fas fa-utensils"></i>
<span>Food </span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="medication.html">
<i class="fas fa-prescription-bottle-alt"></i>
<span>Medication</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="person_locator.html">
<i class="fas fa-user-friends"></i>
<span>Person Finder</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="my_status.html">
<i class="fas fa-building"></i>
<span>My status</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="need_help.html">
<i class="fas fa-fw fa-child"></i>
<span>I need help! </span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="can_help.html">
<i class="fas fa-fw fa-child"></i>
<span>I can help! </span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<i class="fas fa-donate"></i>
<span>Donations</span></a>
</li>
<!-- <div class="dropdown-menu" aria-labelledby="pagesDropdown">
<h6 class="dropdown-header">Login Screens:</h6>
<a class="dropdown-item" href="login.html">Login</a>
<a class="dropdown-item" href="register.html">Register</a>
<a class="dropdown-item" href="forgot-password.html">Forgot Password</a>
<div class="dropdown-divider"></div>
<h6 class="dropdown-header">Other Pages:</h6>
<a class="dropdown-item" href="404.html">404 Page</a>
<a class="dropdown-item" href="blank.html">Blank Page</a>
</div>
</li> -->
</ul>
<div id="content-wrapper">
<div class="container-fluid">
<!-- Breadcrumbs-->
<ol class="breadcrumb">
<li class="breadcrumb-item active" style="font-size: 30px;color:black;">Offer Food </li>
</ol>
<form class="form-horizontal" action="offer_food.php" method="post">
<div class="input-group mb-3 col-sm-8">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">Phone number: </span>
</div>
<!-- <input type="text" class="form-control bfh-phone" name="phno" placeholder="Number" size="20" maxlength="12" aria-label="phno" aria-describedby="basic-addon1"> -->
<input type="text" class="form-control bfh-phone" name="ph_no" id="phno" placeholder="Number"
pattern="[0-9]{10}" onblur="fillIn()" aria-label="phno" aria-describedby="basic-addon1" required>
</div>
<div class="input-group mb-3 col-sm-8">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">Date: </span>
</div>
<!-- <input type="date" class="form-control" name="date" aria-label="date" aria-describedby="basic-addon1">
--> <input type="text" class="form-control" id="DATE" name="date" size="10" required>
</div>
<div class="input-group mb-3 col-sm-8">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">Address: </span>
</div>
<!-- <input type="date" class="form-control" name="date" aria-label="date" aria-describedby="basic-addon1">
--> <input type="text" class="form-control" name="address" placeholder="Address" maxlength="1000"
id="addr">
</div>
<div class="input-group mb-3 col-sm-8">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">Count: </span>
</div>
<!-- <input type="date" class="form-control" name="date" aria-label="date" aria-describedby="basic-addon1">
--> <input type="text" class="form-control" name="count" placeholder="No. of people the food is for "
maxlength="1000">
</div>
<div class="input-group mb-3 col-sm-8">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">Latitude: </span>
</div>
<!-- <input type="text" class="form-control bfh-phone" name="phno" placeholder="Number" size="20" maxlength="12" aria-label="phno" aria-describedby="basic-addon1"> -->
<input type="number" step="any" class="form-control" name="lat" id="lat" placeholder="Latitude"
aria-label="lat" aria-describedby="basic-addon1" required>
</div>
<div class="input-group mb-3 col-sm-8">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">Longitude: </span>
</div>
<!-- <input type="text" class="form-control bfh-phone" name="phno" placeholder="Number" size="20" maxlength="12" aria-label="phno" aria-describedby="basic-addon1"> -->
<input type="number" step="any" class="form-control" name="long" id="long" placeholder="Longitude"
aria-label="long" aria-describedby="basic-addon1" required>
</div>
<div class="input-group-append">
<a class="btn btn-primary btn-sm " onclick="getLocation()" style="width:15%;position:relative;left:1.5%">
<span style="position:relative;top:7%;"> Auto Detect </span> <i class="fas fa-map-marked-alt"></i></a>
</div>
<script>
var x = document.getElementById("lat");
var y = document.getElementById("long");
function getLocation() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showPosition);
} else {
x.innerHTML = "Geolocation is not supported by this browser.";
}
}
function showPosition(position) {
x.value = position.coords.latitude;
y.value = position.coords.longitude;
}
</script>
<!-- <div class="container col-sm-offset-2 col-sm-8">
<p> Choose the type of transaction: </p>
<label class="radio-inline">
<input type="radio" name="typeof" value="money">Money -->
</label>   
<!-- <label class="radio-inline">
<input type="radio" name="typeof" value="stock">Stock
</label>
</div> -->
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-default">Submit</button>
</div>
</div>
</form>
</center>
</div>
<!-- /.content-wrapper -->
</div>
<!-- /#wrapper -->
<!-- Scroll to Top Button-->
<a class="scroll-to-top rounded" href="#page-top">
<i class="fas fa-angle-up"></i>
</a>
<!-- Logout Modal-->
<div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Ready to Leave?</h5>
<button class="close" type="button" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">Select "Logout" below if you are ready to end your current session.</div>
<div class="modal-footer">
<button class="btn btn-secondary" type="button" data-dismiss="modal">Cancel</button>
<a class="btn btn-primary" href="index.html">Logout</a>
</div>
</div>
</div>
</div>
<!-- Bootstrap core JavaScript-->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Core plugin JavaScript-->
<script src="vendor/jquery-easing/jquery.easing.min.js"></script>
<!-- Page level plugin JavaScript-->
<script src="vendor/chart.js/Chart.min.js"></script>
<!-- Custom scripts for all pages-->
<script src="js/sb-admin.min.js"></script>
<!-- Demo scripts for this page-->
<script src="js/demo/chart-area-demo.js"></script>
<script src="js/demo/chart-bar-demo.js"></script>
<script src="js/demo/chart-pie-demo.js"></script>
<script>
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth() + 1; //January is 0!
var yyyy = today.getFullYear();
if (dd < 10) {
dd = '0' + dd;
}
if (mm < 10) {
mm = '0' + mm;
}
var today = mm + '/' + dd + '/' + yyyy;
document.getElementById("DATE").value = today;
</script>
</body>
</html>