add semakin imut
This commit is contained in:
Vendored
+103
@@ -0,0 +1,103 @@
|
||||
<!DOCTYPE html>
|
||||
<?php
|
||||
date_default_timezone_set('Asia/Jakarta'); //Menyesuaikan waktu dengan tempat kita tinggal
|
||||
$tanggal = DATE('d-M-Y');
|
||||
$jam = Date('H:i');
|
||||
header("Content-Type: application/vnd-ms-excel");
|
||||
header("Content-Disposition: attachment; filename=Pulang_atas_permintaan_sendiri_$tanggal-jam_$jam.xls");
|
||||
header("Pragma: no-cache");
|
||||
header("Expires: 0");
|
||||
include "../model/koneksi.php";
|
||||
|
||||
$awal = date('Y-m-d H:i:s', strtotime($_GET['awal']));
|
||||
$akhir = date('Y-m-d H:i:s', strtotime($_GET['akhir']));
|
||||
|
||||
?>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title></title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/simple-datatables@latest/dist/style.css" rel="stylesheet" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<?php
|
||||
$tanggal = DATE('d-M-Y');
|
||||
$jam = Date('H:i');
|
||||
?>
|
||||
<table class='table table-striped table-bordered ' width='100%' cellspacing='0' style='font-size: 12px;' border="1">
|
||||
<thead>
|
||||
|
||||
<div style='font-size:12pt; font-weight:bold;'>
|
||||
<center>
|
||||
PULANG ATAS PERMINTAAN SENDIRI
|
||||
<p>periode <?= $awal; ?> -s/d- <?= $akhir; ?></p>
|
||||
</center>
|
||||
</div>
|
||||
<tr style="background-color: cadetblue; align-content:center;">
|
||||
<th style='width:1%'>No</th>
|
||||
<th style='width:15%'>Tanggal masuk</th>
|
||||
<th style='width:15%'>Register</th>
|
||||
<th style='width:1%'>Num</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$query = "SELECT * FROM tb_indikator_mutu WHERE tanggal BETWEEN '$awal' AND '$akhir'";
|
||||
$query_paps = mysqli_query($openinmut, "$query AND paps=1");
|
||||
$no = 0;
|
||||
while ($data = mysqli_fetch_assoc($query_paps)) {
|
||||
$no++;
|
||||
echo "<tr class='table table-striped table-bordered' style='font-size:10pt; font-weight:bold;'>";
|
||||
echo " <td>$no</td>";
|
||||
echo " <td>" . date('d-m-Y H:i', strtotime($data['tanggal'])) . "</td>";
|
||||
echo " <td>$data[register]</td>";
|
||||
echo " <td>$data[paps]</td>";
|
||||
|
||||
echo " </tr>";
|
||||
?>
|
||||
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table><br>
|
||||
<table class='table table-striped table-bordered table-hover datatable' width='100%' cellspacing='0' style='font-size: 12px;' border="1" align="center">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style='width:1%'>Numerator</th>
|
||||
<th style='width:1%'>Denumerator</th>
|
||||
<th style='width:15%'>Percentage</th>
|
||||
<th style='width:5%'>Target</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<div>
|
||||
<?php
|
||||
$num_paps = mysqli_num_rows(mysqli_query($openinmut, "$query AND paps=1"));
|
||||
$denum_paps = mysqli_num_rows(mysqli_query($open, "SELECT * FROM datapasien WHERE tanggal BETWEEN '$awal' AND '$akhir' AND NOT status_keluar like '%delete%' "));
|
||||
|
||||
echo "<tr class='table table-striped table-bordered' style='font-size:10pt; font-weight:bold;' align='center'>";
|
||||
echo " <td>$num_paps</td>";
|
||||
echo " <td>$denum_paps</td>";
|
||||
if ($denum_paps > 0) {
|
||||
$per_paps = number_format((($num_paps / $denum_paps) * 100), 2);
|
||||
echo " <td>$per_paps %</td>";
|
||||
} else {
|
||||
echo " <td>0 %</td>";
|
||||
}
|
||||
echo " <td>100 %</td>";
|
||||
echo " </tr>";
|
||||
?>
|
||||
</div>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
//tutup koneksi
|
||||
mysqli_close($openinmut);
|
||||
|
||||
?>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user