192 lines
7.9 KiB
PHP
192 lines
7.9 KiB
PHP
<?php include('../koneksi.php');
|
||
//$bln=date('m');
|
||
//$thn=date('Y');
|
||
|
||
$bln_auto=date('m');
|
||
$thn_auto=date('Y');
|
||
|
||
$kndl_bln=$_POST['kndl_bln'];
|
||
$kndl_thn=$_POST['kndl_thn'];
|
||
|
||
if (($kndl_bln==NULL) || ($kndl_bln=='')) {$bln=$bln_auto;} else {$bln=$kndl_bln;}
|
||
if (($kndl_thn==NULL) || ($kndl_thn=='')) {$thn=$thn_auto;} else {$thn=$kndl_thn;}
|
||
|
||
|
||
?>
|
||
|
||
<script>
|
||
var sess_satker = $('#cek_satker').val();
|
||
var sess_jenis = $('#cek_jenis').val();
|
||
var nampeg = $('#cek_nampeg').val();
|
||
var sess_nama = $('#cek_nama').val();
|
||
</script>
|
||
|
||
<style type="text/css">
|
||
|
||
|
||
|
||
|
||
.btn-circle.btn-md {
|
||
width: 40px;
|
||
height: 40px;
|
||
padding: 7px 10px;
|
||
border-radius: 25px;
|
||
font-size: 15px;
|
||
text-align: center;
|
||
border: 3px solid #66b5fb;
|
||
}
|
||
|
||
#sidebar-menu ul li a:hover {
|
||
background:#f1f3f4 !important;
|
||
font-color:white;
|
||
}
|
||
|
||
#sidebar-menu ul li a:focus {
|
||
background:#fce8e6 !important;
|
||
color:#d93025 !important;
|
||
font-weight: bold;
|
||
}
|
||
|
||
|
||
</style>
|
||
|
||
</style>
|
||
|
||
<br>
|
||
<br>
|
||
<br>
|
||
<br>
|
||
<br>
|
||
|
||
<!--
|
||
<?php if ($_POST['jenis']=='Admin') { ?>
|
||
<button type="button" class="btn btn-danger btn-rounded" id="tambah_kendalibu"><i class="fa fa-plus m-r-5"></i>Kendali</button>
|
||
<?php } ?>
|
||
<br>
|
||
<br>-->
|
||
<div class="row">
|
||
<div class="col-lg-12">
|
||
<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>
|
||
<br>
|
||
<div id="tabel_kendalibu"></div>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
<!--
|
||
<div id="fr_kendalibu">
|
||
<div class="row">
|
||
<div class="col-md-12">
|
||
<div class="">
|
||
<div class="card-box">
|
||
<div id="tabel_kendalibu"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
-->
|
||
|
||
|
||
<!-- <div id="modal_kendalibu" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||
<div class="modal-dialog">
|
||
<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">Isi Disposisi</h4>
|
||
</div>
|
||
<div class="modal-body" id="modal_body_kendalibu"></div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-default waves-effect" data-dismiss="modal" id="keluar_kendalibu">Keluar</button>
|
||
<button type="button" class="btn btn-primary waves-effect waves-light" id="simpan_kendalibu">Simpan</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div> -->
|
||
|
||
<script type="text/javascript">
|
||
|
||
function hitung_surat() {
|
||
var thn_count = $('#thn').val();
|
||
var satker_count = 172;
|
||
|
||
|
||
$.ajax({
|
||
type: "POST",
|
||
url: "app/kendalibu/count.php",
|
||
data: 'thn_count='+thn_count
|
||
+'&satker_count='+satker_count,
|
||
success: function(data){
|
||
var b = data.split('^');
|
||
if (b[0]==0) {$('#cn1').html('JANUARI');$('#cn1').removeAttr("style");} else {$('#cn1').html('JANUARI ('+b[0]+')');$('#cn1').attr('style', 'color:red;');}
|
||
if (b[1]==0) {$('#cn2').html('PEBRUARI');$('#cn2').removeAttr("style");} else {$('#cn2').html('PEBRUARI ('+b[1]+')');$('#cn2').attr('style', 'color:red;');}
|
||
if (b[2]==0) {$('#cn3').html('MARET');$('#cn3').removeAttr("style");} else {$('#cn3').html('MARET ('+b[2]+')');$('#cn3').attr('style', 'color:red;');}
|
||
if (b[3]==0) {$('#cn4').html('APRIL');$('#cn4').removeAttr("style");} else {$('#cn4').html('APRIL ('+b[3]+')');$('#cn4').attr('style', 'color:red;');}
|
||
if (b[4]==0) {$('#cn5').html('MEI');$('#cn5').removeAttr("style");} else {$('#cn5').html('MEI ('+b[4]+')');$('#cn5').attr('style', 'color:red;');}
|
||
if (b[5]==0) {$('#cn6').html('JUNI');$('#cn6').removeAttr("style");} else {$('#cn6').html('JUNI ('+b[5]+')');$('#cn6').attr('style', 'color:red;');}
|
||
if (b[6]==0) {$('#cn7').html('JULI');$('#cn7').removeAttr("style");} else {$('#cn7').html('JULI ('+b[6]+')');$('#cn7').attr('style', 'color:red;');}
|
||
if (b[7]==0) {$('#cn8').html('AGUSTUS');$('#cn8').removeAttr("style");} else {$('#cn8').html('AGUSTUS ('+b[7]+')');$('#cn8').attr('style', 'color:red;');}
|
||
if (b[8]==0) {$('#cn9').html('SEPTEMBER');$('#cn9').removeAttr("style");} else {$('#cn9').html('SEPTEMBER ('+b[8]+')');$('#cn9').attr('style', 'color:red;');}
|
||
if (b[9]==0) {$('#cn10').html('OKTOBER');$('#cn10').removeAttr("style");} else {$('#cn10').html('OKTOBER ('+b[9]+')');$('#cn10').attr('style', 'color:red;');}
|
||
if (b[10]==0) {$('#cn11').html('NOPEMBER');$('#cn11').removeAttr("style");} else {$('#cn11').html('NOPEMBER ('+b[10]+')');$('#cn11').attr('style', 'color:red;');}
|
||
if (b[11]==0) {$('#cn12').html('DESEMBER');$('#cn12').removeAttr("style");} else {$('#cn12').html('DESEMBER ('+b[11]+')');$('#cn12').attr('style', 'color:red;');}
|
||
}
|
||
});
|
||
}
|
||
|
||
hitung_surat();
|
||
$('#thn').focusout(function(){hitung_surat();});
|
||
|
||
/*filter data*/
|
||
var thn = $('#thn').val();
|
||
var bln = $('#bln').val();
|
||
$('#tabel_kendalibu').load("app/kendalibu/tabel.php",{satker:'172',jenis:sess_jenis,nampeg:sess_nampeg,thn:thn,bln:bln});
|
||
|
||
$('#bln').change(function(){
|
||
var thn = $('#thn').val();
|
||
var bln = $('#bln').val();
|
||
$('#tabel_kendalibu').load("app/kendalibu/tabel.php",{satker:'172',jenis:sess_jenis,nampeg:sess_nampeg,thn:thn,bln:bln});
|
||
});
|
||
|
||
$('#thn').focusout(function(){
|
||
var thn = $('#thn').val();
|
||
var bln = $('#bln').val();
|
||
$('#tabel_kendalibu').load("app/kendalibu/tabel.php",{satker:'172',jenis:sess_jenis,nampeg:sess_nampeg,thn:thn,bln:bln});
|
||
});
|
||
|
||
/*======================================================*/
|
||
//$('#tabel_kendalibu').load("app/kendalibu/tabel.php",{/*satker:'3'*/ satker:'172',jenis:sess_jenis,nampeg:sess_nampeg});
|
||
/*
|
||
$('#tambah_kendalibu').click(function(){
|
||
var id = 0;
|
||
var jenis_disposisi = 'Kendali Surat';
|
||
var jenis_disposisi_id = '2';
|
||
$.post('app/smasuk/main.php',{surat_id:id, sess_nama:sess_nama, sess_jenis:sess_jenis, nampeg:nampeg, jenis_disposisi:jenis_disposisi,jenis_disposisi_id:jenis_disposisi_id},function(html){$("#main_tag").html(html);});
|
||
});
|
||
*/
|
||
</script>
|