Files
2025-10-09 12:30:11 +07:00

166 lines
7.7 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
$bln=date('m');
$thn=date('Y');
?>
<style type="text/css">
.no-border{
border:none;
}
</style>
<br>
<br>
<!--
<div class="col-lg-12"><p style="color:#a6a5a5;font-size:30px;font-family:'GSans_Med'"><i class="mdi mdi-buffer m-r-5"></i>Laporan Kegiatan Rapat</p>-->
<div class="col-lg-12"><center style="color:#a6a5a5;font-size:30px;"><i class="mdi mdi-buffer"></i>&nbsp;
<span style="font-size:30px;font-family:RubReg;letter-spacing: 0px;"><?php echo 'Laporan'; ?></span>
<span style="font-size:30px;font-family:RubMed;letter-spacing: 0px;"><?php echo 'Kegiatan Rapat'; ?></span>
</center>
<br>
<div class="row">
<div class="col-lg-4">
<div class="input-group my-group">
<select id="bln" name="bln" class="selectpicker form-control" style="width:60%;background-color:#f3f3f3;border-color:#f3f3f3;">
<option value="0">ALL</option>
<option id="cn1" <?php if ($bln=='1') {echo "selected";} ?> value="1">JANUARI</option>
<option id="cn2" <?php if ($bln=='2') {echo "selected";} ?> value="2">PEBRUARI</option>
<option id="cn3" <?php if ($bln=='3') {echo "selected";} ?> value="3">MARET</option>
<option id="cn4" <?php if ($bln=='4') {echo "selected";} ?> value="4">APRIL</option>
<option id="cn5" <?php if ($bln=='5') {echo "selected";} ?> value="5">MEI</option>
<option id="cn6" <?php if ($bln=='6') {echo "selected";} ?> value="6">JUNI</option>
<option id="cn7" <?php if ($bln=='7') {echo "selected";} ?> value="7">JULI</option>
<option id="cn8" <?php if ($bln=='8') {echo "selected";} ?> value="8">AGUSTUS</option>
<option id="cn9" <?php if ($bln=='9') {echo "selected";} ?> value="9">SEPTEMBER</option>
<option id="cn10" <?php if ($bln=='10') {echo "selected";} ?> value="10">OKTOBER</option>
<option id="cn11" <?php if ($bln=='11') {echo "selected";} ?> value="11">NOPEMBER</option>
<option id="cn12" <?php if ($bln=='12') {echo "selected";} ?> value="12">DESEMBER</option>
</select>
<input type="number" class="form-control" style="width:40%; display:block;border-color:#f3f3f3;text-align: center;" name="thn" id="thn" value="<?php echo $thn; ?>">
</div>
</div>
<div class="col-lg-4">
<select id="status_fl" name="status_fl" class="selectpicker form-control" style="width:60%;background-color:#f3f3f3;border-color:#f3f3f3;"
data-content="Status Undangan" rel="popover" data-placement="top" data-trigger="hover"
>
<option value="">ALL</option>
<option id="st1" value="Ready">READY</option>
<option id="st2" value="Pending">PROSES</option>
<option id="st3" value="Close">ARSIP</option>
</select>
</div>
<div class="col-lg-4">
<button type="button" class="btn btn-success btn-rounded pull-right" id="excel"><i class="fa fa-arrow-down m-r-5"></i>EXCEL</button>
</div>
</div>
<hr style="margin-top:20px">
<div id="tabel_undtu"></div>
<div id="modal_undtu_peserta" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-full">
<div class="modal-content">
<div class="modal-header no-border">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel">Peserta Rapat</h4>
</div>
<div class="modal-body" id="modal_body_undtu_peserta"></div>
</div>
</div>
</div>
<script>
$('#status_fl').popover();
function hitung_status() {
var thn_count = $('#thn').val();
var bln_count = $('#bln').val();
$.ajax({
type: "POST",
url: "app/laporan/count2.php",
data: 'thn_count='+thn_count
+'&bln_count='+bln_count,
success: function(data){
var b1 = data.split('^');
if (b1[0]==0) {$('#st1').html('READY');} else {$('#st1').html('READY ('+b1[0]+')');$('#st1').attr('style', 'color:black;');}
if (b1[1]==0) {$('#st2').html('PROSES');} else {$('#st2').html('PROSES ('+b1[1]+')');$('#st2').attr('style', 'color:green;');}
if (b1[2]==0) {$('#st3').html('ARSIP');} else {$('#st3').html('ARSIP ('+b1[2]+')');$('#st3').attr('style', 'color:red;');}
}
});
}
function hitung_surat() {
var thn_count = $('#thn').val();
$.ajax({
type: "POST",
url: "app/laporan/count.php",
data: 'thn_count='+thn_count,
success: function(data){
var b = data.split('^');
if (b[0]==0) {$('#cn1').html('JANUARI');} else {$('#cn1').html('JANUARI ('+b[0]+')');$('#cn1').attr('style', 'color:red;');}
if (b[1]==0) {$('#cn2').html('PEBRUARI');} else {$('#cn2').html('PEBRUARI ('+b[1]+')');$('#cn2').attr('style', 'color:red;');}
if (b[2]==0) {$('#cn3').html('MARET');} else {$('#cn3').html('MARET ('+b[2]+')');$('#cn3').attr('style', 'color:red;');}
if (b[3]==0) {$('#cn4').html('APRIL');} else {$('#cn4').html('APRIL ('+b[3]+')');$('#cn4').attr('style', 'color:red;');}
if (b[4]==0) {$('#cn5').html('MEI');} else {$('#cn5').html('MEI ('+b[4]+')');$('#cn5').attr('style', 'color:red;');}
if (b[5]==0) {$('#cn6').html('JUNI');} else {$('#cn6').html('JUNI ('+b[5]+')');$('#cn6').attr('style', 'color:red;');}
if (b[6]==0) {$('#cn7').html('JULI');} else {$('#cn7').html('JULI ('+b[6]+')');$('#cn7').attr('style', 'color:red;');}
if (b[7]==0) {$('#cn8').html('AGUSTUS');} else {$('#cn8').html('AGUSTUS ('+b[7]+')');$('#cn8').attr('style', 'color:red;');}
if (b[8]==0) {$('#cn9').html('SEPTEMBER');} else {$('#cn9').html('SEPTEMBER ('+b[8]+')');$('#cn9').attr('style', 'color:red;');}
if (b[9]==0) {$('#cn10').html('OKTOBER');} else {$('#cn10').html('OKTOBER ('+b[9]+')');$('#cn10').attr('style', 'color:red;');}
if (b[10]==0) {$('#cn11').html('NOPEMBER');} else {$('#cn11').html('NOPEMBER ('+b[10]+')');$('#cn11').attr('style', 'color:red;');}
if (b[11]==0) {$('#cn12').html('DESEMBER');} else {$('#cn12').html('DESEMBER ('+b[11]+')');$('#cn12').attr('style', 'color:red;');}
}
});
}
hitung_surat();
hitung_status();
$('#thn').focusout(function(){hitung_surat();hitung_status();});
var thn2 = $('#thn').val();
var bln2 = $('#bln').val();
var status_fl = $('#status_fl').val();
$('#tabel_undtu').load("app/laporan/tabel.php",{thn2:thn2,bln2:bln2,status_fl:status_fl});
$('#status_fl').change(function(){
var thn2 = $('#thn').val();
var bln2 = $('#bln').val();
var status_fl = $('#status_fl').val();
$('#tabel_undtu').load("app/laporan/tabel.php",{thn2:thn2,bln2:bln2,status_fl:status_fl});
hitung_status();
});
$('#bln').change(function(){
var thn2 = $('#thn').val();
var bln2 = $('#bln').val();
var status_fl = $('#status_fl').val();
$('#tabel_undtu').load("app/laporan/tabel.php",{thn2:thn2,bln2:bln2,status_fl:status_fl});
hitung_status();
});
$('#thn').focusout(function(){
var thn2 = $('#thn').val();
var bln2 = $('#bln').val();
var status_fl = $('#status_fl').val();
$('#tabel_undtu').load("app/laporan/tabel.php",{thn2:thn2,bln2:bln2,status_fl:status_fl});
hitung_surat();
hitung_status();
});
$('#excel').click(function(){
var thn2 = $('#thn').val();
var bln2 = $('#bln').val();
var status_fl = $('#status_fl').val();
var w = 600;
var h = 300;
var left = Number((screen.width/2)-(w/2));
var tops = Number((screen.height/2)-(h/2));
window.open('app/laporan/excel.php?thn2='+thn2+'&bln2='+bln2+'&status_fl='+status_fl,'newwin','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+tops+', left='+left);
});
</script>