| Server IP : 127.0.0.1 / Your IP : 192.168.99.1 Web Server : Apache/2.4.35 (Win64) OpenSSL/1.1.1b mod_fcgid/2.3.9 System : Windows NT WIN-JEJMB9EN0L0 10.0 build 14393 (Windows Server 2016) AMD64 User : Administrator ( 0) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : D:/laragon/www/_sakip/modules/ |
Upload File : |
<?php
//disini menggunakan link demo
$curl = curl_init();
$param_get = [
'opd' => $opd_alias,
'limit' => 5, /*bisa custom*/
];
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://lapor.lumajangkab.go.id/main/api_opd?' . http_build_query($param_get),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
));
$response = curl_exec($curl);
curl_close($curl);
$json = json_decode($response, true);
?>
<style type="text/css">
.media + .media {
border-top:1px solid #eaeaea;
padding-top:10px;
padding-bottom:5px;
}
.bold{
font-weight:800;
}
</style>
<div class="row" style="margin-top: 50px">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading" style="height:50px">
LAPOR LUMAJANG ! <a href="https://demo-lapor.lumajangkab.go.id/main/index?q=<?= urlencode($nama_opd)?>" class="pull-right btn btn-sm btn-info">Lainnya</a>
</div>
<div class="panel-body">
<?php
if (count($json['item']) > 0) {
foreach ($json['item'] as $key => $value) {
?>
<div class="media">
<div class="media-body">
<h4 class="media-heading text-success" style="font-size:12pt;font-weight:bold;"><?=$value['nama_peng']?></h4>
<small class="bold"><i class="glyphicon glyphicon-home"></i> <?= $value['kel'].', Kec. '.$value['kec']?> <i class="glyphicon glyphicon-calendar"></i> <?= $value['tgl_peng']?> <label for="" class="pull-right label <?= $value['jawab_peng'] == '' ? 'label-danger' : 'label-success'?>"><?= $value['jawab_peng'] == '' ? 'Belum Ditanggapi' : 'Sudah Ditanggapi'?></label></small><br>
<p style="font-size:8pt"><?= substr($value['uraian_peng'],0,250) . ' ...'?></p>
<div class="text-right">
<a href="<?=$value['link']?>" class="btn btn-sm btn-primary">Baca</a>
</div>
</div>
</div>
<?php
}
} else {
echo '<h5 class="text-center">Tidak terdapat pengaduan.</h5>';
}
?>
</div>
</div>
</div>
</div>