-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdata.php
More file actions
executable file
·435 lines (412 loc) · 20.5 KB
/
Copy pathdata.php
File metadata and controls
executable file
·435 lines (412 loc) · 20.5 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
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
433
434
435
<?PHP
session_start();
if(!isset($_SESSION['username'])){
header('Refresh: 2; URL=login.php');
exit();
}
?>
<!DOCTYPE html>
<!--[if lt IE 7]>
<html class="lt-ie9 lt-ie8 lt-ie7" lang="en">
<![endif]-->
<!--[if IE 7]>
<html class="lt-ie9 lt-ie8" lang="en">
<![endif]-->
<!--[if IE 8]>
<html class="lt-ie9" lang="en">
<![endif]-->
<!--[if gt IE 8]>
<!-->
<html lang="en">
<!--
<![endif]-->
<head>
<meta charset="utf-8">
<title>Profil Cluster:Jakarta Pusat</title>
<meta content="width=device-width, initial-scale=1.0, user-scalable=no" name="viewport">
<script src="js/html5-trunk.js"></script>
<link href="icomoon/style.css" rel="stylesheet">
<link rel="shortcut icon" href="img/logosmall.png">
<!--[if lte IE 7]>
<script src="css/icomoon-font/lte-ie7.js"></script>
<![endif]-->
<!-- bootstrap css -->
<link href="css/main.css" rel="stylesheet">
<!-- <link href="css/fullcalendar.css" rel="stylesheet"> -->
</head>
<body>
<header>
<a href="index.php" class="logo">Telkom Cluster Data:Jakarta Pusat</a>
<div id="mini-nav">
<ul class="hidden-phone">
<li><a href="check.php">Logout</a></li>
</ul>
</div>
</header>
<div class="container-fluid">
<div id="mainnav" class="hidden-phone hidden-tablet">
<ul>
<li>
<a href="index.php">
<div class="icon">
<span class="fs1" aria-hidden="true" data-icon=""></span>
</div>
Dashboard
</a>
</li>
<li class="active">
<span class="current-arrow"></span>
<a href="data.php">
<div class="icon">
<span class="fs1" aria-hidden="true" data-icon=""></span>
</div>
Data
</a>
</li>
<li>
<a href="map.php?link=1A-eyk6-2FB19Tr_qQSKROEEpisM&s=1">
<div class="icon">
<span class="fs1" aria-hidden="true" data-icon=""></span>
</div>
Maps
</a>
</li>
<li>
<a href="check.php">
<div class="icon">
<span class="fs1" aria-hidden="true" data-icon=""></span>
</div>
Logout
</a>
</li>
</ul>
</div>
<div class="dashboard-wrapper">
<div class="main-container">
<div class="navbar hidden-desktop">
<div class="navbar-inner">
<div class="container">
<a data-target=".navbar-responsive-collapse" data-toggle="collapse" class="btn btn-navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<div class="nav-collapse collapse navbar-responsive-collapse">
<ul class="nav">
<li>
<a href="index.php">Dashboard</a>
</li>
<li>
<a href="data.php">Data</a>
</li>
<li>
<a href="map.php?link=1A-eyk6-2FB19Tr_qQSKROEEpisM&s=1">Maps</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<ul class="breadcrumb-beauty">
<li>
<a href="index.php"><span class="fs2" aria-hidden="true" data-icon=""></span> Dashboard</a>
</li>
<li>
<a href="#">Data</a>
</li>
</ul>
</div>
</div>
<br>
<div class="row-fluid">
<div class="span12">
<!-- <div class="widget no-margin"> -->
<!-- <div class="widget-header">
<div class="title">
<span class="fs1" aria-hidden="true" data-icon=""></span> Pencarian Tabel Dinamis
</div>
</div> -->
<!-- <div class="widget-body"> -->
<div id="dt_example" class="example_alt_pagination">
<table class="table table-condensed table-striped table-hover table-bordered pull-left" id="data-table">
<thead>
<tr>
<th style="width:10%">STO</th>
<th style="width:20%">Cluster</th>
<th style="width:10%" class="hidden-phone">Type Cluster</th>
<th style="width:15%" class="hidden-phone">Kompetitor</th>
<th style="width:23%" class="hidden-phone">Kegiatan Rutin</th>
<th style="width:15%" class="hidden-phone">Occupancy</th>
<th style="width:7%" >Actions</th>
</tr>
</thead>
<!-- <i class="icon-search"></i> -->
<tbody class="modal-body">
<?php
class MyDB extends SQLite3
{
function __construct()
{
$this->open('cluster.db');
}
}
$db=new MyDB();
$sql= "SELECT * FROM clustel ";
$result=$db->query($sql);
$idcluster=array();
while ($row = $result->fetchArray(SQLITE3_ASSOC)){
echo
'<tr class="gradeA">
<td>'.$row['STO'].'</td>
<td>'.$row['KELURAHAN'].' '.$row['RW'].'</td>
<td class="hidden-phone">'.$row['TIPERUMAH'].'</td>
<td class="hidden-phone">'.$row['KOMPETITOR'].'</td>
<td class="hidden-phone">'.$row['KEGIATANRUTIN'].'</td>
<td class="hidden-phone">'.$row['PEKERJAANMAYORITAS'].'</td>'.'</td>
<td>
<a href="#accSettings'.$row['NO'].'" data-toggle="modal" class="btn btn-danger" href="#">Detail</a>
<div id="accSettings'.$row['NO'].'" class="modal hide fade" tabindex="-2" role="dialog" aria-labelledby="myModalLabel'.$row['NO'].'" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
×
</button>
<h3 id="myModalLabel'.$row['NO'].'">
Profil Cluster </br><h4 class="text-success">'.$row['RW'].' / '.$row['KELURAHAN'].'</br><h5 class="text-error">Kecamatan :'.$row['STO'].'</h5></h4>
</h3>
</div>
<div class="modal-body">
<div class="row-fluid">
<div class="span5">
<table class="table table-bordered table-striped no-margin">
<tbody>
<tr>
<td>Jml RT</td>
<td colspan="3">'.$row['JUMLAHRT'].'</td>
</tr>
<tr>
<td>Jml KK</td>
<td colspan="3">'.$row['JUMLAHKK'].'</td>
</tr>
<tr>
<td>Jml Penduduk</td>
<td colspan="3">'.$row['JUMLAHPENDUDUK'].'</td>
</tr>
<tr>
<td>Profesi</td>
<td colspan="3">'.$row['PEKERJAANMAYORITAS'].'</td>
</tr>
<tr>
<td>Tipe Rumah</td>
<td colspan="3">'.$row['TIPERUMAH'].'</td>
</tr>
<tr>
<td>Kegiatan</td>
<td colspan="3">'.$row['KEGIATANRUTIN'].'</td>
</tr>
<tr>
<td>Influencer</td>
<td colspan="3">'.$row['PIC'].'</td>
</tr>
</tbody>
</table>
<br><br><br><br>
</br></br></br></br>
<p>Sumber:</p>
<ol class="no-margin">
<li>
Kelurahan '.$row['KELURAHAN'].'
</li>
<li>
Wawancara RW
</li>
<li>
ftp://10.65.10.238
</li>
<li>
ftp://10.32.1.211
</li>
</ol>
</div>
<div class="span3">
<table class="table table-bordered table-striped no-margin">
<tbody>
<tr>
<td>Jml ODP</td>
<td colspan="3">'.$row['ODP'].'</td>
</tr>
<tr>
<td>Kapasitas</td>
<td colspan="3">'.$row['KAPASITAS'].'</td>
</tr>
<tr>
<td>Available</td>
<td colspan="3">'.$row['AVAILABLE'].'</td>
</tr>
<tr>
<td>Occ ODP</td>
<td colspan="3">0%-20%='.$row['ACCODP0%-20%'].'
</br>20%-50%='.$row['ACCODP20%-50%'].'
</br>50%-80%='.$row['ACCODP50%-80%'].'
</br>80%-100%='.$row['ACCODP80%-100%'].'
</td>
</tr>
<tr>
<td>Kompetitor</td>
<td colspan="3">'.$row['KOMPETITOR'].'</td>
</tr>
<tr>
<td>Pelanggan</td>
<td colspan="3">1P='.$row['1P'].'
</br>2P='.$row['2P'].'
</br>3P='.$row['3P'].'
</td>
</tr>
</tbody>
</table>
</br>
<table class="table table-bordered table-striped no-margin">
<tbody>
<tr>
<td>1P</td>
<td colspan="3">COPPER='.$row['COPPER'].'
</br>GPON='.$row['GPON'].'
</br>MSAN='.$row['MSAN'].'
</td>
</tr>
<tr>
<td>2P</td>
<td colspan="3">GPON='.$row['GPON'].'
</br>MASAN='.$row['MSAN'].'
</td>
</tr>
<tr>
<td>3P</td>
<td colspan="3">GPON='.$row['GPON'].'
</br>MSAN='.$row['MSAN'].'
</td>
</tr>
</tbody>
</table>
</br>
<table class="table table-bordered table-striped no-margin">
<tbody>
<tr>
<td>Revenue</td>
<td colspan="3">'.$row['REVENUE'].'</td>
</tr>
</tbody>
</table>
</div>
<div class="span4">
<!-- <a href="maps/'.$row['MAPS'].'" class="thumbnail">
<img alt="359x252" style="width: 359px; height: 252px;"src="maps/'.$row['MAPS'].'">
</a>-->
<a href="photos/'.$row['GAMBAR'].'" class="thumbnail">
<img alt="359x252" style="width: 359px; height: 252px;"src="photos/'.$row['GAMBAR'].'">
</a>
</br>
<p>Keterangan : </p>
<p> '.$row['KETERANGAN'].'</p>
<form action="data.php" method="GET">
<input type="text" name="id" class="hidden" value="'.$row['NO'].'"></input>
<select name="col" class="span12 input-left-top-margins">
<option>
Choose column to update
</option>
<option value="JUMLAHRT">
Jml RT
</option>
<option value="JUMLAHKK">
Jml KK
</option>
<option value="JUMLAHPENDUDUK">
Jml Penduduk
</option>
<option value="PEKERJAANMAYORITAS">
Profesi
</option>
<option value="TIPERUMAH">
Tipe Rumah
</option>
<option value="KEGIATANRUTIN">
Kegiatan
</option>
<option value="PIC">
Influencer
</option>
<option value="ODP">
Jml ODP
</option>
<option value="KAPASITAS">
Kapasitas
</option>
<option value="AVAILABLE">
Available
</option>
<option value="ACCODP0%-20%">
Occ ODP 0%-20%
</option>
<option value="ACCODP20%-50%">
Occ ODP 20%-50%
</option>
<option value="ACCODP50%-80%">
Occ ODP 50%-80%
</option>
<option value="ACCODP80%-100%">
Occ ODP 80%-100%
</option>
<option value="KOMPETITOR">
Kompetitor
</option>
</select>
<textarea class="input-block-level no-margin" name="val" placeholder="New Value"></Textarea>
<button class="btn btn-success" type="submit">Update</button>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</td>
</tr>';
}
if(isset($_GET['id']))
{
$queryupdate='UPDATE clustel SET '.$_GET["col"].'='.$_GET["val"].' WHERE NO="'.$_GET["id"].'";';
$ret = $db->exec($queryupdate);
if(!$ret){
echo $db->lastErrorMsg();
} else {
echo $db->changes(), " Record updated successfully\n";
}
}
unset($db);
?>
</tbody>
</table>
<div class="clearfix"></div>
</div>
<!-- </div> -->
<!-- </div> -->
</div>
</div>
</div>
</div><!-- dashboard-container -->
</div><!-- container-fluid -->
<footer>
<p class="copyright">© Telkom Witel Jakarta Pusat 2017</p>
</footer>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.js"></script>
<script src="js/jquery.dataTables.js"></script>
<script src="js/jquery.sparkline.js"></script>
<!-- Custom Js -->
<script src="js/custom-tables.js"></script>
<script src="js/custom.js"></script>
</body>
</html>