-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
432 lines (385 loc) · 18.7 KB
/
index.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
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
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="apple-touch-icon" sizes="76x76" href="assets/img/apple-icon.png">
<link rel="icon" type="image/png" href="assets/img/favicon.ico">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title>GIS Pemantau Sampah</title>
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no' name='viewport' />
<!-- Fonts and icons -->
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700,200" rel="stylesheet" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" />
<!-- CSS Files -->
<link href="assets/css/bootstrap.min.css" rel="stylesheet" />
<link href="assets/css/light-bootstrap-dashboard.css?v=2.0.1" rel="stylesheet" />
<!-- CSS Just for demo purpose, don't include it in your project -->
<link href="assets/css/demo.css" rel="stylesheet" />
<!-- Leaflet JS Sisip Script -->
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.1/dist/leaflet.css"
integrity="sha512-Rksm5RenBEKSKFjgI3a41vrjkw4EVPlJ3+OiI65vTjIdo9brlAacEuKOiQ5OFh7cOI1bkDwLqdLw3Zg0cRJAAQ=="
crossorigin=""/>
<!-- Make sure you put this AFTER Leaflet's CSS -->
<script src="https://unpkg.com/leaflet@1.3.1/dist/leaflet.js"
integrity="sha512-/Nsx9X4HebavoBvEBuyp3I7od5tA0UzAxs+j83KgC8PU0kgB4XiK4Lfe4y4cgBtaRJQEIFCW+oC506aPT2L1zw=="
crossorigin=""></script>
<!-- Sweetalert -->
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<style>
#mapid { height: 500px; }
</style>
</head>
<body>
<div id="testsaja">
</div>
<div class="wrapper">
<div class="sidebar" data-image="assets/img/sidebar-5.jpg">
<!--
Tip 1: You can change the color of the sidebar using: data-color="purple | blue | green | orange | red"
Tip 2: you can also add an image using data-image tag
-->
<div class="sidebar-wrapper">
<div class="logo">
<a href="http://www.creative-tim.com" class="simple-text">
Creative Tim
</a>
</div>
<ul class="nav">
<li class="nav-item active">
<a class="nav-link" href="index.php">
<i class="nc-icon nc-chart-pie-35"></i>
<p>Laporkan Sampah</p>
</a>
</li>
<li>
<a class="nav-link" href="./lokasi.php">
<i class="nc-icon nc-circle-09"></i>
<p>Data Lokasi Sampah</p>
</a>
</li>
<li>
<a class="nav-link" href="./table.html">
<i class="nc-icon nc-notes"></i>
<p>Table List</p>
</a>
</li>
<li>
<a class="nav-link" href="./typography.html">
<i class="nc-icon nc-paper-2"></i>
<p>Typography</p>
</a>
</li>
<li>
<a class="nav-link" href="./icons.html">
<i class="nc-icon nc-atom"></i>
<p>Icons</p>
</a>
</li>
<li>
<a class="nav-link" href="./maps.html">
<i class="nc-icon nc-pin-3"></i>
<p>Maps</p>
</a>
</li>
<li>
<a class="nav-link" href="./notifications.html">
<i class="nc-icon nc-bell-55"></i>
<p>Notifications</p>
</a>
</li>
<li class="nav-item active active-pro">
<a class="nav-link active" href="upgrade.html">
<i class="nc-icon nc-alien-33"></i>
<p>Upgrade to PRO</p>
</a>
</li>
</ul>
</div>
</div>
<div class="main-panel">
<!-- Navbar -->
<nav class="navbar navbar-expand-lg " color-on-scroll="500">
<div class=" container-fluid ">
<a class="navbar-brand" href="#pablo"> Dashboard </a>
<button href="" class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" aria-controls="navigation-index" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-bar burger-lines"></span>
<span class="navbar-toggler-bar burger-lines"></span>
<span class="navbar-toggler-bar burger-lines"></span>
</button>
<div class="collapse navbar-collapse justify-content-end" id="navigation">
<ul class="nav navbar-nav mr-auto">
<li class="nav-item">
<a href="#" class="nav-link" data-toggle="dropdown">
<i class="nc-icon nc-palette"></i>
<span class="d-lg-none">Dashboard</span>
</a>
</li>
<li class="dropdown nav-item">
<a href="#" class="dropdown-toggle nav-link" data-toggle="dropdown">
<i class="nc-icon nc-planet"></i>
<span class="notification">5</span>
<span class="d-lg-none">Notification</span>
</a>
<ul class="dropdown-menu">
<a class="dropdown-item" href="#">Notification 1</a>
<a class="dropdown-item" href="#">Notification 2</a>
<a class="dropdown-item" href="#">Notification 3</a>
<a class="dropdown-item" href="#">Notification 4</a>
<a class="dropdown-item" href="#">Another notification</a>
</ul>
</li>
<li class="nav-item">
<a href="#" class="nav-link">
<i class="nc-icon nc-zoom-split"></i>
<span class="d-lg-block"> Search</span>
</a>
</li>
</ul>
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" href="#pablo">
<span class="no-icon">Account</span>
</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="http://example.com" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="no-icon">Dropdown</span>
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<a class="dropdown-item" href="#">Something</a>
<a class="dropdown-item" href="#">Something else here</a>
<div class="divider"></div>
<a class="dropdown-item" href="#">Separated link</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="#pablo">
<span class="no-icon">Log out</span>
</a>
</li>
</ul>
</div>
</div>
</nav>
<!-- End Navbar -->
<div class="content">
<div class="container-fluid">
<div class="row">
<div class="col-md-3">
<div class="card ">
<div class="card-header ">
<h4 class="card-title">Map Menu</h4>
<p style="color:red;"onclick="remove()" class="card-category"><b>UNDO</b></p>
</div>
<div class="card-body ">
<!-- Menu Peta -->
<button class="btn btn-info" onclick="gpsLokasi()"> GPS </button>
<button class="btn btn-info" onclick="manualLokasi()"> Manual </button>
<form enctype="multipart/form-data" class="" action="upload/upload.php" method="POST">
<label for="lat">latitude :</label> <br/>
<input type="text" id="lat" name="lat" readonly>
<label for="lon">Longitude :</label>
<input type="text" id="lon" name="lon" readonly>
<input type="file" style="margin-top:10px;" name="fileupload" id="fileupload">
<input type="submit" style="margin-top:40px;" class="btn btn-sucess" value="inputkan" name="button">
</form>
</div>
<div class="card-footer ">
<div class="legend">
</div>
<hr>
<div class="stats">
</div>
</div>
</div>
</div>
<div class="col-md-9">
<!-- Div Peta -->
<div id="mapid"></div>
</div>
</div>
<div class="row">
<div class="col-md-6">
</div>
<div class="col-md-6">
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<nav>
<ul class="footer-menu">
<li>
<a href="#">
Home
</a>
</li>
<li>
<a href="#">
Company
</a>
</li>
<li>
<a href="#">
Portfolio
</a>
</li>
<li>
<a href="#">
Blog
</a>
</li>
</ul>
<p class="copyright text-center">
©
<script>
document.write(new Date().getFullYear())
</script>
<a href="http://www.creative-tim.com">Creative Tim</a>, made with love for a better web
</p>
</nav>
</div>
</footer>
</div>
</div>
<!-- -->
<!-- <div class="fixed-plugin">
<div class="dropdown show-dropdown">
<a href="#" data-toggle="dropdown">
<i class="fa fa-cog fa-2x"> </i>
</a>
<ul class="dropdown-menu">
<li class="header-title"> Sidebar Style</li>
<li class="adjustments-line">
<a href="javascript:void(0)" class="switch-trigger">
<p>Background Image</p>
<label class="switch">
<input type="checkbox" data-toggle="switch" checked="" data-on-color="primary" data-off-color="primary"><span class="toggle"></span>
</label>
<div class="clearfix"></div>
</a>
</li>
<li class="adjustments-line">
<a href="javascript:void(0)" class="switch-trigger background-color">
<p>Filters</p>
<div class="pull-right">
<span class="badge filter badge-black" data-color="black"></span>
<span class="badge filter badge-azure" data-color="azure"></span>
<span class="badge filter badge-green" data-color="green"></span>
<span class="badge filter badge-orange" data-color="orange"></span>
<span class="badge filter badge-red" data-color="red"></span>
<span class="badge filter badge-purple active" data-color="purple"></span>
</div>
<div class="clearfix"></div>
</a>
</li>
<li class="header-title">Sidebar Images</li>
<li class="active">
<a class="img-holder switch-trigger" href="javascript:void(0)">
<img src="assets/img/sidebar-1.jpg" alt="" />
</a>
</li>
<li>
<a class="img-holder switch-trigger" href="javascript:void(0)">
<img src="../assets/img/sidebar-3.jpg" alt="" />
</a>
</li>
<li>
<a class="img-holder switch-trigger" href="javascript:void(0)">
<img src="..//assets/img/sidebar-4.jpg" alt="" />
</a>
</li>
<li>
<a class="img-holder switch-trigger" href="javascript:void(0)">
<img src="../assets/img/sidebar-5.jpg" alt="" />
</a>
</li>
<li class="button-container">
<div class="">
<a href="http://www.creative-tim.com/product/light-bootstrap-dashboard" target="_blank" class="btn btn-info btn-block btn-fill">Download, it's free!</a>
</div>
</li>
<li class="header-title pro-title text-center">Want more components?</li>
<li class="button-container">
<div class="">
<a href="http://www.creative-tim.com/product/light-bootstrap-dashboard-pro" target="_blank" class="btn btn-warning btn-block btn-fill">Get The PRO Version!</a>
</div>
</li>
<li class="header-title" id="sharrreTitle">Thank you for sharing!</li>
<li class="button-container">
<button id="twitter" class="btn btn-social btn-outline btn-twitter btn-round sharrre"><i class="fa fa-twitter"></i> · 256</button>
<button id="facebook" class="btn btn-social btn-outline btn-facebook btn-round sharrre"><i class="fa fa-facebook-square"></i> · 426</button>
</li>
</ul>
</div>
</div>
-->
</body>
<!-- Core JS Files -->
<script src="assets/js/core/jquery.3.2.1.min.js" type="text/javascript"></script>
<script src="assets/js/core/popper.min.js" type="text/javascript"></script>
<script src="assets/js/core/bootstrap.min.js" type="text/javascript"></script>
<!-- Plugin for Switches, full documentation here: http://www.jque.re/plugins/version3/bootstrap.switch/ -->
<script src="assets/js/plugins/bootstrap-switch.js"></script>
<!-- Google Maps Plugin -->
<!-- Chartist Plugin -->
<script src="assets/js/plugins/chartist.min.js"></script>
<!-- Notifications Plugin -->
<script src="assets/js/plugins/bootstrap-notify.js"></script>
<!-- Control Center for Light Bootstrap Dashboard: scripts for the example pages etc -->
<script src="assets/js/light-bootstrap-dashboard.js?v=2.0.1" type="text/javascript"></script>
<!-- Light Bootstrap Dashboard DEMO methods, don't include it in your project! -->
<script src="assets/js/demo.js"></script>
<!-- Script Map LeafletJS -->
<!-- Tampilkan Peta -->
<script>
var mymap = L.map('mapid').setView([-0.9154789999999999, 100.46043549999999], 13);
L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}', {
attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="http://mapbox.com">Mapbox</a>',
maxZoom: 18,
id: 'mapbox.streets',
accessToken: 'pk.eyJ1IjoiYXh2ZXI3IiwiYSI6ImNqZjZ0NXk2NjA4NzI0MG44djVyOXU2cXAifQ.N-pJV3Uw0nOhjvLz9E4Zuw'
}).addTo(mymap);
function gpsLokasi()
{
navigator.geolocation.getCurrentPosition(function(location) {
var latlng = new L.LatLng(location.coords.latitude, location.coords.longitude);
var inputLat = document.getElementById('lat');
lat.value=location.coords.latitude;
var inputLon = document.getElementById('lon');
lon.value=location.coords.longitude;
mymap.setView(latlng, 15);
newMarker = new L.marker(latlng).addTo(mymap);
});
}
function remove(i)
{
// mymap.removeLayer(newMarker);
mymap.removeLayer(newMarker);
}
function disabled()
{
document.getElementById("lat").disabled = true;
document.getElementById("lon").disabled = true;
}
function manualLokasi()
{ var latitude;
var longitude;
var tanda;
swal("Pilih Posisi Sampah tersebut");
mymap.on('click', function(e) {
newMarker = new L.marker(e.latlng).addTo(mymap);
latitude=e.latlng.lat;
longitude=e.latlng.lng;
// Menampilkan lat dan lon pada input text
var inputLat = document.getElementById('lat');
lat.value=latitude;
var inputLon = document.getElementById('lon');
lon.value=longitude;
});
}
</script>
</html>