398 lines
15 KiB
PHP
398 lines
15 KiB
PHP
<?php
|
||
include('../koneksi.php');
|
||
$bln_auto = date('m');
|
||
$thn_auto = date('Y');
|
||
|
||
$disp_bln = $_POST['disp_bln'] ?? null;
|
||
$disp_thn = $_POST['disp_thn'] ?? null;
|
||
|
||
if (($disp_bln == NULL) || ($disp_bln == '')) {
|
||
$bln = $bln_auto;
|
||
} else {
|
||
$bln = $disp_bln;
|
||
}
|
||
if (($disp_thn == NULL) || ($disp_thn == '')) {
|
||
$thn = $thn_auto;
|
||
} else {
|
||
$thn = $disp_thn;
|
||
}
|
||
?>
|
||
<script>
|
||
var sess_satker = $('#cek_satker').val();
|
||
var sess_jenis = $('#cek_jenis').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>
|
||
|
||
<input type="hidden" id="sat" value="<?php echo $_POST['sat']; ?>">
|
||
|
||
<div class="row">
|
||
<div class="col-lg-3">
|
||
<p class="judul_page"><i class="mdi mdi-email-outline m-r-5"></i>Surat Masuk</p>
|
||
</div>
|
||
<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;margin-top:6px;">
|
||
<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;margin-top:6px;" name="thn" id="thn" value="<?php echo $thn; ?>">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="tabel_inbox"></div>
|
||
<div id="modal_tl" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||
<div class="modal-dialog modal-lg">
|
||
<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="judul_modal_tl">Input Tindak Lanjut</h4>
|
||
</div>
|
||
<div class="modal-body" id="modal_body_tl"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="modal_pic" 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="judul_modal_pic">Add Lampiran JPG</h4>
|
||
</div>
|
||
<div class="modal-body" id="modal_body_pic"></div>
|
||
<div class="modal-footer no-border">
|
||
<button type="button" class="btn btn-success btn-block waves-effect" data-dismiss="modal" id="keluar_pic">Keluar</button>
|
||
<!-- <button type="button" class="btn btn-danger waves-effect waves-light" id="simpan_pic">SELESAI</button>-->
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="modal_file" 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="judul_modal_file">Add Lampiran File</h4>
|
||
</div>
|
||
<div class="modal-body" id="modal_body_file"></div>
|
||
<div class="modal-footer no-border">
|
||
<button type="button" class="btn btn-success btn-block waves-effect" data-dismiss="modal" id="keluar_file">Keluar</button>
|
||
<!-- <button type="button" class="btn btn-danger waves-effect waves-light" id="simpan_pic">SELESAI</button>-->
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="modal_inbox" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||
<div class="modal-dialog modal-lg">
|
||
<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">Surat</h4>
|
||
</div>
|
||
<div class="modal-body" id="modal_body_inbox"></div>
|
||
<div class="modal-footer no-border">
|
||
<button type="button" class="btn btn-default waves-effect" data-dismiss="modal" id="keluar_inbox">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">Lampiran</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>
|
||
|
||
<div id="modal_kpdxxxx" 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">Kepada</h4>
|
||
</div>
|
||
<div class="modal-body" id="modal_body_kpdxxxx"></div>
|
||
<div class="modal-footer no-border">
|
||
<button type="button" class="btn btn-default waves-effect" data-dismiss="modal" id="keluar_kpdxxxx">Keluar</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div id="modal_kepada" 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">Diteruskan ke</h4>
|
||
</div>
|
||
<div class="modal-body" id="modal_body_kepada"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<script type="text/javascript">
|
||
function hitung_surat() {
|
||
var thn_count = $('#thn').val();
|
||
var sat = $('#sat').val();
|
||
if (sat == '172') {
|
||
var satker_count = 172;
|
||
} else {
|
||
var satker_count = $('#cek_satker').val();
|
||
}
|
||
|
||
$.ajax({
|
||
type: "POST",
|
||
url: "app/inbox/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();
|
||
});
|
||
|
||
var sat = $('#sat').val();
|
||
var thn2 = $('#thn').val();
|
||
var bln2 = $('#bln').val();
|
||
/* if (sat=='3') { */
|
||
if (sat == '172') {
|
||
$('#tabel_inbox').load("app/inbox/tabel.php", {
|
||
satker: sat,
|
||
jenis: sess_jenis,
|
||
sess_nama: sess_nama,
|
||
thn2: thn2,
|
||
bln2: bln2
|
||
});
|
||
} else {
|
||
$('#tabel_inbox').load("app/inbox/tabel.php", {
|
||
satker: sess_satker,
|
||
jenis: sess_jenis,
|
||
sess_nama: sess_nama,
|
||
thn2: thn2,
|
||
bln2: bln2
|
||
});
|
||
}
|
||
|
||
$('#bln').change(function() {
|
||
var thn2 = $('#thn').val();
|
||
var bln2 = $('#bln').val();
|
||
/* if (sat=='3') { */
|
||
if (sat == '172') {
|
||
$('#tabel_inbox').load("app/inbox/tabel.php", {
|
||
satker: sat,
|
||
jenis: sess_jenis,
|
||
sess_nama: sess_nama,
|
||
thn2: thn2,
|
||
bln2: bln2
|
||
});
|
||
} else {
|
||
$('#tabel_inbox').load("app/inbox/tabel.php", {
|
||
satker: sess_satker,
|
||
jenis: sess_jenis,
|
||
sess_nama: sess_nama,
|
||
thn2: thn2,
|
||
bln2: bln2
|
||
});
|
||
}
|
||
});
|
||
|
||
$('#thn').focusout(function() {
|
||
var thn2 = $('#thn').val();
|
||
var bln2 = $('#bln').val();
|
||
/* if (sat=='3') { */
|
||
if (sat == '172') {
|
||
$('#tabel_inbox').load("app/inbox/tabel.php", {
|
||
satker: sat,
|
||
jenis: sess_jenis,
|
||
sess_nama: sess_nama,
|
||
thn2: thn2,
|
||
bln2: bln2
|
||
});
|
||
} else {
|
||
$('#tabel_inbox').load("app/inbox/tabel.php", {
|
||
satker: sess_satker,
|
||
jenis: sess_jenis,
|
||
sess_nama: sess_nama,
|
||
thn2: thn2,
|
||
bln2: bln2
|
||
});
|
||
}
|
||
});
|
||
|
||
|
||
|
||
|
||
$("#modal_inbox").on("hidden.bs.modal", function() {
|
||
$(this).off('hidden.bs.modal');
|
||
});
|
||
|
||
$("#modal_file_inbox").on("hidden.bs.modal", function() {
|
||
$(this).off('hidden.bs.modal');
|
||
});
|
||
</script>
|