| 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 : /laragon4/www/bpkd.test_/ |
Upload File : |
<?php
require_once 'includes/init.php';
require_once 'includes/header.php';
require_once 'includes/tokenkab.php';
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://ppid.lumajangkab.go.id/api/v2/dip/read',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_HTTPHEADER => array(
'Token-Api: '.$token_dip
),
));
$response = curl_exec($curl);
curl_close($curl);
$json = json_decode($response,true);
?>
<div class="container">
<div class="row">
<div class="sidebar col-lg-10 mx-auto">
<div class="card mb-3 py-3 mt-5">
<div class="card-body p-4">
<h4>DAFTAR INFORMASI PUBLIK</h4>
<br/>
<div class="row" style="overflow: auto">
<table class="table table-striped table-sm table-bordered" id="datatable-dip" style="font-size: 13px">
<thead>
<tr>
<th width="5%" height="40px" class="text-center bg-info">No</th>
<th width="50%" class="text-center bg-info">Judul</th>
<th width="10%" class="text-center bg-info">Informasi</th>
<th width="25%" class="text-center bg-info">Waktu</th>
<th width="10%" class="text-center bg-info">Aksi</th>
</tr>
</thead>
<tbody>
<?php foreach($json['data'] as $key => $value){ ?>
<tr>
<td><?= $key + 1?></td>
<td><?= $value['judul']?></td>
<td><?= $value['informasi']?></td>
<td><?= $value['tanggal']?></td>
<td class="text-center">
<a href="<?= $value['file']?>" target="_blank">
<img src="uploads/statis/pdf1.png" height="40px" width="40px"/>
</a>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<?php include 'includes/footer.php'; ?>