403Webshell
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:/laragon3/www/_ppid/modules/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : D:/laragon3/www/_ppid/modules/daftar_permohonan_informasi.php
<?php
//disini menggunakan link demo
$curl = curl_init();

curl_setopt_array($curl, array(
	CURLOPT_URL => 'https://ppid.lumajangkab.go.id/api/v2/permohonan_informasi/tampil',
	CURLOPT_RETURNTRANSFER => true,
	CURLOPT_ENCODING => '',
	CURLOPT_MAXREDIRS => 10,
	CURLOPT_TIMEOUT => 0,
	CURLOPT_FOLLOWLOCATION => true,
	CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
	CURLOPT_POST => true,
	CURLOPT_POSTFIELDS => array('type' => 'all','belum_dijawab' => 0),
	CURLOPT_HTTPHEADER => array(
		'Token-Api: '.$token_anda/* token kominfo*/
	),
));

$response = curl_exec($curl);

curl_close($curl);
$json = json_decode($response,true);

?>
<div class="row" style="margin-top: 50px">
	<div class="col-md-12">
		<div class="panel panel-primary">
			<div class="panel-heading">
				Daftar Permohonan Informasi
			</div>
			<div class="panel-body">
				<table class="table table-striped table-bordered" id="datatable1">
					<thead>
						<tr>
							<th class="text-center">No</th>
							<th class="text-center">Nama Pemohon</th>
							<th class="text-center">Informasi Diminta</th>
							<th class="text-center">Waktu</th>
							<th class="text-center">Status</th>
							<th class="text-center">Aksi</th>
						</tr>
					</thead>
					<tbody>
						<?php foreach($json['data'] as $key=>$value){
							if($value['status'] == 'Sudah ditanggapi'){
								$status = '<label class="label label-success">'.$value['status'].'</label>';
							}elseif ($value['status'] == 'Belum ditanggapi') {
								$status = '<label class="label label-warning">'.$value['status'].'</label>';
							}else{
								$status = '<label class="label label-danger">Tidak diketahui</label>';
							}
							?>
						<tr>
							<td><?= $key + 1?></td>
							<td><?= $value['nama_pemohon']?></td>
							<td><?= $value['informasi_diminta']?></td>
							<td><?= $value['waktu']?></td>
							<td><?= $status?></td>
							<td class="text-center">
								<a href="#myModal" data-toggle="modal" data-id="<?= $value['id']?>" class="btn btn-primary btn-sm">Lihat Tanggapan</a>
							</td>

						</tr>
					<?php } ?>
					</tbody>
				</table>
			</div>
		</div>

	</div>
</div>
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
	<div class="modal-dialog" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				<h4 class="modal-title" id="myModalLabel">Detail Tanggapan</h4>
			</div>
			<div class="modal-body">
				<div class="row">
					<div class="col-md-12">
						<label for="" class="label label-primary">Nama Pemohon</label><br>
						<label for="" id="nama_pemohon"></label>
					</div>

				</div>
				<div class="row">
					<div class="col-md-12">
						<label for="" class="label label-primary">Alamat Pemohon</label><br>
						<label for="" id="alamat_pemohon"></label>
					</div>
				</div>
				<div class="row">
					<div class="col-md-12">
						<label for="" class="label label-primary">Informasi yang Diminta</label><br>
						<p for="" id="informasi_yang_diminta" style="font-weight: 700"></p>
					</div>
				</div>
				<div class="row">
					<div class="col-md-12">
						<label for="" class="label label-primary">Waktu Permohonan</label><br>
						<label for="" id="waktu_permohonan"></label>
					</div>
				</div>
				<hr>
				<div class="row">
					<div class="col-md-12">
						<label for="" class="label label-success">Waktu Menanggapi</label><br>
						<label for="" id="waktu_menanggapi"></label>
					</div>
				</div>
				<div class="row">
					<div class="col-md-12">
						<label for="" class="label label-success">Tanggapan</label><br>
						<p for="" id="tanggapan" style="font-weight: 700"></p>
					</div>
				</div>
			</div>

		</div>
	</div>
</div>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs/dt-1.10.23/datatables.min.css"/>

<script type="text/javascript" src="https://cdn.datatables.net/v/bs/dt-1.10.23/datatables.min.js"></script>
<script>
	$(document).ready( function () {
		$('#datatable1').DataTable();
	} );
	$('#myModal').on('show.bs.modal',function(event){
		var button = $(event.relatedTarget);
		var id_permohonan = button.data('id');
		$.ajax({
			url:'modules/ajax_cari_permohonan.php',
			type:'post',
			dataType:'json',
			data:'id_permohonan='+id_permohonan,
			success:function(data){
				$('#nama_pemohon').text(data.nama_pemohon);
				$('#alamat_pemohon').text(data.alamat_pemohon);
				$('#informasi_yang_diminta').text(data.informasi_diminta);
				$('#waktu_permohonan').text(data.waktu_permohonan);
				$('#waktu_menanggapi').text(data.waktu_menanggapi);
				$('#tanggapan').text(data.tanggapan);
			}
		})
	})
</script>

Youez - 2016 - github.com/yon3zu
LinuXploit