210 lines
11 KiB
PHP
210 lines
11 KiB
PHP
<?php
|
||
$bln=date('m');
|
||
$thn=date('Y');
|
||
?>
|
||
<script>var sess_satker = $('#cek_satker').val();</script>
|
||
|
||
<style type="text/css">
|
||
.no-border{
|
||
border:none;
|
||
}
|
||
</style>
|
||
<br>
|
||
<br>
|
||
|
||
|
||
|
||
<div class="col-lg-12"><center style="color:#a6a5a5;font-size:30px;"><i class="fa fa-envelope"></i>
|
||
<span style="font-size:30px;font-family:RubReg;letter-spacing: 0px;"><?php echo 'Undangan'; ?></span>
|
||
<span style="font-size:30px;font-family:RubMed;letter-spacing: 0px;"><?php echo 'Masuk'; ?></span>
|
||
</center>
|
||
|
||
|
||
<div class="row">
|
||
|
||
<!--
|
||
<div class="col-lg-3">
|
||
<select class="form-control" id="disp_kpl" style="margin-top:6px;">
|
||
<option value="ALL">ALL</option>
|
||
<option value="UNTUK DIARAHKAN">UNTUK DIARAHKAN</option>
|
||
<option value="UNTUK DIKETAHUI">UNTUK DIKETAHUI</option>
|
||
</select>
|
||
</div>
|
||
<div class="col-lg-3">
|
||
<select class="form-control" id="disp_sifat" style="margin-top:6px;">
|
||
<option value="ALL">ALL</option>
|
||
<?php
|
||
$ukerja=pg_query("SELECT id,sifat FROM sifat_surat ORDER BY id ASC");
|
||
while($rows=pg_fetch_assoc($ukerja)) {
|
||
?>
|
||
<option value="<?php echo $rows['sifat']; ?>"><?php echo strtoupper($rows['sifat']); ?></option>
|
||
<?php
|
||
}
|
||
?>
|
||
</select>
|
||
</div>
|
||
-->
|
||
|
||
<div class="col-lg-8">
|
||
<div class="input-group my-group">
|
||
<select id="bln" name="bln" class="selectpicker form-control" style="width:30%;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:20%; display:block;border-color:#f3f3f3;text-align: center;" name="thn" id="thn" value="<?php echo $thn; ?>">
|
||
<select class="form-control" id="disp_und" style="width:50%;background-color:#f3f3f3;border-color:#f3f3f3;">
|
||
<option value="rssa">Karyawan RSSA</option>
|
||
<option value="non_rssa">Non-RSSA</option>
|
||
</select>
|
||
</div>
|
||
</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_undsatker"></div>
|
||
|
||
|
||
<!-- <div id="modal_undsatker" 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">Pembuatan Undangan</h4>
|
||
</div>
|
||
<div class="modal-body" id="modal_body_undsatker"></div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-default waves-effect" data-dismiss="modal" id="keluar_undsatker">Keluar</button>
|
||
<button type="button" class="btn btn-primary waves-effect waves-light" id="simpan_undsatker">Simpan</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div id="modal_undsatker_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">Cek Peserta dan Tanda Terima Undangan</h4>
|
||
</div>
|
||
<div class="modal-body" id="modal_body_undsatker_peserta"></div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-default waves-effect" data-dismiss="modal" id="keluar_undsatker_peserta">Keluar</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div> -->
|
||
|
||
<div id="modal_file_inbox" 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">Dokumen Lampiran Undangan</h4>
|
||
</div>
|
||
<div class="modal-body" id="modal_body_file_inbox"></div>
|
||
<div class="modal-footer no-border">
|
||
<button type="button" class="btn btn-success btn-block waves-effect" data-dismiss="modal" id="keluar_file_inbox">Keluar</button>
|
||
<!-- <button type="button" class="btn btn-danger waves-effect waves-light" id="simpan_pic">SELESAI</button>-->
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<script>
|
||
|
||
function hitung_surat() {
|
||
var thn_count = $('#thn').val();
|
||
var satker_count = $('#cek_satker').val();
|
||
$.ajax({
|
||
type: "POST",
|
||
url: "app/undsatker/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');} 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();
|
||
$('#thn').focusout(function(){hitung_surat();});
|
||
|
||
var thn2 = $('#thn').val();
|
||
var bln2 = $('#bln').val();
|
||
$('#tabel_undsatker').load("app/undsatker/tabel.php",{satker:sess_satker,thn2:thn2,bln2:bln2});
|
||
|
||
$('#bln').change(function(){
|
||
var thn2 = $('#thn').val();
|
||
var bln2 = $('#bln').val();
|
||
var disp_und = $('#disp_und').val();
|
||
if (disp_und=='rssa') {
|
||
$('#tabel_undsatker').load("app/undsatker/tabel.php",{satker:sess_satker,thn2:thn2,bln2:bln2});
|
||
} else {
|
||
$('#tabel_undsatker').load("app/undsatker/tabel_luar.php",{satker:sess_satker,thn2:thn2,bln2:bln2});
|
||
}
|
||
});
|
||
|
||
$('#thn').focusout(function(){
|
||
var thn2 = $('#thn').val();
|
||
var bln2 = $('#bln').val();
|
||
var disp_und = $('#disp_und').val();
|
||
if (disp_und=='rssa') {
|
||
$('#tabel_undsatker').load("app/undsatker/tabel.php",{satker:sess_satker,thn2:thn2,bln2:bln2});
|
||
hitung_surat();
|
||
} else {
|
||
$('#tabel_undsatker').load("app/undsatker/tabel_luar.php",{satker:sess_satker,thn2:thn2,bln2:bln2});
|
||
}
|
||
});
|
||
|
||
$('#disp_und').change(function(){
|
||
var thn2 = $('#thn').val();
|
||
var bln2 = $('#bln').val();
|
||
var disp_und = $('#disp_und').val();
|
||
if (disp_und=='rssa') {
|
||
$('#tabel_undsatker').load("app/undsatker/tabel.php",{satker:sess_satker,thn2:thn2,bln2:bln2});
|
||
} else {
|
||
$('#tabel_undsatker').load("app/undsatker/tabel_luar.php",{satker:sess_satker,thn2:thn2,bln2:bln2});
|
||
}
|
||
});
|
||
|
||
$('#excel').click(function(){
|
||
var thn2 = $('#thn').val();
|
||
var bln2 = $('#bln').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/undsatker/excel.php?satker='+sess_satker+'&thn2='+thn2+'&bln2='+bln2,'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>
|
||
|