perubahan surat disposisi
This commit is contained in:
@@ -0,0 +1,165 @@
|
|||||||
|
function hitungSurat(url, prefix) {
|
||||||
|
return function() {
|
||||||
|
var thn_count = $('#thn').val();
|
||||||
|
var satker_count = $('#cek_satker').val();
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: url,
|
||||||
|
data: {
|
||||||
|
thn_count: thn_count,
|
||||||
|
satker_count: satker_count
|
||||||
|
},
|
||||||
|
success: function(data) {
|
||||||
|
var b = data.split('^');
|
||||||
|
var months = [
|
||||||
|
'JANUARI', 'PEBRUARI', 'MARET', 'APRIL', 'MEI', 'JUNI',
|
||||||
|
'JULI', 'AGUSTUS', 'SEPTEMBER', 'OKTOBER', 'NOPEMBER', 'DESEMBER'
|
||||||
|
];
|
||||||
|
|
||||||
|
months.forEach(function(month, index) {
|
||||||
|
var monthIndex = index + 1;
|
||||||
|
var elementId = `#${prefix}${monthIndex}`;
|
||||||
|
var count = b[index];
|
||||||
|
if (count == 0) {
|
||||||
|
$(elementId).html(month);
|
||||||
|
$(elementId).removeAttr("style");
|
||||||
|
} else {
|
||||||
|
$(elementId).html(`${month} (${count})`);
|
||||||
|
$(elementId).css('color', 'red');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// Determine which function to use based on sess_jenis
|
||||||
|
if (sess_jenis == 'Admin') {
|
||||||
|
var hitung_surat = hitungSurat('app/disposisi/count_dispo.php', 'dcn');
|
||||||
|
} else {
|
||||||
|
var hitung_surat = hitungSurat('app/disposisi/count.php', 'cn');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Initial call and event bindings
|
||||||
|
hitung_surat();
|
||||||
|
$('#thn').focusout(hitung_surat);
|
||||||
|
|
||||||
|
// Function to load table data
|
||||||
|
function loadTable() {
|
||||||
|
var thn2 = $('#thn').val();
|
||||||
|
var bln2 = $('#bln').val();
|
||||||
|
var params = {
|
||||||
|
satker: sess_satker,
|
||||||
|
jenis: sess_jenis,
|
||||||
|
thn2: thn2,
|
||||||
|
bln2: bln2
|
||||||
|
};
|
||||||
|
|
||||||
|
if (sess_jenis == 'Admin') {
|
||||||
|
params.disp_pros = $('#disp_pros').val();
|
||||||
|
} else {
|
||||||
|
params.disp_kpl = $('#disp_kpl').val();
|
||||||
|
params.disp_sifat = $('#disp_sifat').val();
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#tabel_disposisi').load("app/disposisi/tabel.php", params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Initial call and event bindings for table loading
|
||||||
|
loadTable();
|
||||||
|
$('#disp_pros, #disp_kpl, #disp_sifat, #bln').change(loadTable);
|
||||||
|
$('#thn').focusout(loadTable);
|
||||||
|
|
||||||
|
|
||||||
|
$('#tambah_disposisi').click(function() {
|
||||||
|
$.post('app/smasuk/main.php', {
|
||||||
|
surat_id: 0,
|
||||||
|
sess_nama: sess_nama,
|
||||||
|
sess_jenis: sess_jenis,
|
||||||
|
nampeg: nampeg,
|
||||||
|
jenis_disposisi: 'Disposisi',
|
||||||
|
jenis_disposisi_id: '1'
|
||||||
|
}, function(html) {
|
||||||
|
$("#main_tag").html(html);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
function loadModalTools(b, thn) {
|
||||||
|
$('#modal_tools').modal('show');
|
||||||
|
$('#modal_body_tools').html('');
|
||||||
|
$.post("app/disposisi/modal_tools.php", {
|
||||||
|
b: b,
|
||||||
|
thn: thn
|
||||||
|
}, function(data) {
|
||||||
|
$('#modal_body_tools').html(data);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#b1').click(function() {
|
||||||
|
var b = $('#pt1').val();
|
||||||
|
var thn = $('#thn1').val();
|
||||||
|
$.post("app/disposisi/crud.php", {
|
||||||
|
b: b,
|
||||||
|
thn: thn,
|
||||||
|
key: 'cek_noag'
|
||||||
|
}, function(data) {
|
||||||
|
if (data == 0) {
|
||||||
|
alert('Data tidak ditemukan..');
|
||||||
|
} else {
|
||||||
|
loadModalTools(b, thn);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
function handleEnterKey(event) {
|
||||||
|
if (event.keyCode == 13) {
|
||||||
|
$('#b1').trigger('click');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#simpan_k').click(function() {
|
||||||
|
var kirim_id = $('#kirim_id').val();
|
||||||
|
$.post("app/disposisi/crud.php", {
|
||||||
|
id: kirim_id,
|
||||||
|
tgl_input: $('#tgl_input').val(),
|
||||||
|
dis_baca: $('#dis_baca').val(),
|
||||||
|
lama: $('#lama').val(),
|
||||||
|
isi: $('#isi_disposisi_edit').val(),
|
||||||
|
key: 'edit_k'
|
||||||
|
}, function() {
|
||||||
|
$('#modal_k').modal('hide');
|
||||||
|
$('body').removeClass('modal-open');
|
||||||
|
$('.modal-backdrop').remove();
|
||||||
|
alert('tersimpan..');
|
||||||
|
$('#tabel_k').load('app/disposisi/tabel_k.php', {
|
||||||
|
no_agenda: no_agenda,
|
||||||
|
thn: thn
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#simpan_s').click(function() {
|
||||||
|
$.post("app/disposisi/crud.php", {
|
||||||
|
id: $('#surat_id').val(),
|
||||||
|
no_surat: $('#no_surat').val(),
|
||||||
|
tgl_diterima: $('#tgl_diterima').val(),
|
||||||
|
key: 'edit_s'
|
||||||
|
}, function() {
|
||||||
|
$('#modal_s').modal('hide');
|
||||||
|
$('body').removeClass('modal-open');
|
||||||
|
$('.modal-backdrop').remove();
|
||||||
|
alert('tersimpan..');
|
||||||
|
$('#tabel_s').load('app/disposisi/tabel_s.php', {
|
||||||
|
no_agenda: no_agenda,
|
||||||
|
thn: thn
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on('hidden.bs.modal', function() {
|
||||||
|
if ($('.modal:visible').length) {
|
||||||
|
$('body').addClass('modal-open');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#pt1').keypress(handleEnterKey);
|
||||||
+163
-425
@@ -1,245 +1,196 @@
|
|||||||
<?php
|
<?php
|
||||||
include('../koneksi.php');
|
include('../koneksi.php');
|
||||||
|
$bln = empty($_POST['disp_bln']) ? date('m') : $_POST['disp_bln'];
|
||||||
$bln_auto=date('m');
|
$thn = empty($_POST['disp_thn']) ? date('Y') : $_POST['disp_thn'];
|
||||||
$thn_auto=date('Y');
|
|
||||||
|
|
||||||
$disp_bln=$_POST['disp_bln'];
|
|
||||||
$disp_thn=$_POST['disp_thn'];
|
|
||||||
|
|
||||||
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>
|
<script>
|
||||||
var sess_satker = $('#cek_satker').val();
|
var sess_satker = $('#cek_satker').val();
|
||||||
var sess_jenis = $('#cek_jenis').val();
|
var sess_jenis = $('#cek_jenis').val();
|
||||||
var nampeg = $('#cek_nampeg').val();
|
var nampeg = $('#cek_nampeg').val();
|
||||||
var sess_nama = $('#cek_nama').val();
|
var sess_nama = $('#cek_nama').val();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style type="text/css">
|
<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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.modal-backdrop {
|
||||||
|
|
||||||
.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;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.modal-backdrop {
|
|
||||||
visibility: hidden !important;
|
visibility: hidden !important;
|
||||||
}
|
}
|
||||||
.modal.in {
|
|
||||||
background-color: rgba(0,0,0,0.5);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
.modal.in {
|
||||||
|
background-color: rgba(0, 0, 0, 0.5);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<?php if ($_POST['jenis']=='Admin') {
|
<?php if ($_POST['jenis'] == 'Admin') {
|
||||||
$thn=date('Y');
|
$thn = date('Y');
|
||||||
?>
|
?>
|
||||||
<br>
|
<br>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-2">
|
<div class="col-lg-2">
|
||||||
<button type="button" class="btn btn-danger btn-rounded btn-block" id="tambah_disposisi"><i class="fa fa-plus m-r-5"></i>Disposisi</button>
|
<button type="button" class="btn btn-danger btn-rounded btn-block" id="tambah_disposisi"><i class="fa fa-plus m-r-5"></i>Disposisi</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-2">
|
<div class="col-lg-2">
|
||||||
<select class="form-control" id="disp_pros">
|
<select class="form-control" id="disp_pros">
|
||||||
<option value="ALL">ALL</option>
|
<option value="ALL">ALL</option>
|
||||||
<option value="BELUM PROSES">BELUM PROSES</option>
|
<option value="BELUM PROSES">BELUM PROSES</option>
|
||||||
<option value="SUDAH PROSES">SUDAH PROSES</option>
|
<option value="SUDAH PROSES">SUDAH PROSES</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-lg-5 pull-right">
|
<div class="col-lg-5 pull-right">
|
||||||
<div class="input-group my-group">
|
<div class="input-group my-group">
|
||||||
<input type="number" class="form-control" style="width:30%; display:block;border-color:#f3f3f3;text-align: center;" name="thn1" id="thn1" value="<?php echo $thn; ?>">
|
<input type="number" class="form-control" style="width:30%; display:block;border-color:#f3f3f3;text-align: center;" name="thn1" id="thn1" value="<?php echo $thn; ?>">
|
||||||
<input type="number" class="form-control" style="width:70%; display:block;border-color:#f3f3f3;" name="pt1" id="pt1" Placeholder="Pencarian No Agenda" onkeydown="tekan1(event)">
|
<input type="number" class="form-control" style="width:70%; display:block;border-color:#f3f3f3;" name="pt1" id="pt1" Placeholder="Pencarian No Agenda" onkeydown="tekan1(event)">
|
||||||
<span class="input-group-btn">
|
<span class="input-group-btn">
|
||||||
<button type="button" id="b1" name="b1" class="btn btn-default"><i class="fa fa-search"></i></button>
|
<button type="button" id="b1" name="b1" class="btn btn-default"><i class="fa fa-search"></i></button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="col-lg-3">
|
<div class="col-lg-3">
|
||||||
<div class="input-group my-group">
|
<div class="input-group my-group">
|
||||||
<select id="bln" name="bln" class="selectpicker form-control" style="width:60%;background-color:#f3f3f3;border-color:#f3f3f3;">
|
<select id="bln" name="bln" class="selectpicker form-control" style="width:60%;background-color:#f3f3f3;border-color:#f3f3f3;">
|
||||||
<option value="0">ALL</option>
|
<option value="0">ALL</option>
|
||||||
<!--
|
<?php
|
||||||
<option <?php if ($bln=='1') {echo "selected";} ?> value="1">JANUARI</option>
|
$bulan = array("JANUARI", "PEBRUARI", "MARET", "APRIL", "MEI", "JUNI", "JULI", "AGUSTUS", "SEPTEMBER", "OKTOBER", "NOPEMBER", "DESEMBER");
|
||||||
<option <?php if ($bln=='2') {echo "selected";} ?> value="2">PEBRUARI</option>
|
for ($i = 1; $i <= 12; $i++) {
|
||||||
<option <?php if ($bln=='3') {echo "selected";} ?> value="3">MARET</option>
|
$selected = ($bln == $i) ? "selected" : "";
|
||||||
<option <?php if ($bln=='4') {echo "selected";} ?> value="4">APRIL</option>
|
echo "<option value='$i' $selected>" . $bulan[$i - 1] . "</option>";
|
||||||
<option <?php if ($bln=='5') {echo "selected";} ?> value="5">MEI</option>
|
}
|
||||||
<option <?php if ($bln=='6') {echo "selected";} ?> value="6">JUNI</option>
|
?>
|
||||||
<option <?php if ($bln=='7') {echo "selected";} ?> value="7">JULI</option>
|
</select>
|
||||||
<option <?php if ($bln=='8') {echo "selected";} ?> value="8">AGUSTUS</option>
|
<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; ?>">
|
||||||
<option <?php if ($bln=='9') {echo "selected";} ?> value="9">SEPTEMBER</option>
|
</div>
|
||||||
<option <?php if ($bln=='10') {echo "selected";} ?> value="10">OKTOBER</option>
|
</div>
|
||||||
<option <?php if ($bln=='11') {echo "selected";} ?> value="11">NOPEMBER</option>
|
|
||||||
<option <?php if ($bln=='12') {echo "selected";} ?> value="12">DESEMBER</option>
|
|
||||||
-->
|
|
||||||
<option id="dcn1" <?php if ($bln=='1') {echo "selected";} ?> value="1">JANUARI</option>
|
|
||||||
<option id="dcn2" <?php if ($bln=='2') {echo "selected";} ?> value="2">PEBRUARI</option>
|
|
||||||
<option id="dcn3" <?php if ($bln=='3') {echo "selected";} ?> value="3">MARET</option>
|
|
||||||
<option id="dcn4" <?php if ($bln=='4') {echo "selected";} ?> value="4">APRIL</option>
|
|
||||||
<option id="dcn5" <?php if ($bln=='5') {echo "selected";} ?> value="5">MEI</option>
|
|
||||||
<option id="dcn6" <?php if ($bln=='6') {echo "selected";} ?> value="6">JUNI</option>
|
|
||||||
<option id="dcn7" <?php if ($bln=='7') {echo "selected";} ?> value="7">JULI</option>
|
|
||||||
<option id="dcn8" <?php if ($bln=='8') {echo "selected";} ?> value="8">AGUSTUS</option>
|
|
||||||
<option id="dcn9" <?php if ($bln=='9') {echo "selected";} ?> value="9">SEPTEMBER</option>
|
|
||||||
<option id="dcn10" <?php if ($bln=='10') {echo "selected";} ?> value="10">OKTOBER</option>
|
|
||||||
<option id="dcn11" <?php if ($bln=='11') {echo "selected";} ?> value="11">NOPEMBER</option>
|
|
||||||
<option id="dcn12" <?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>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<?php } else {?>
|
<?php } else { ?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-2">
|
<div class="col-lg-2">
|
||||||
<p class="judul_page"><i class="mdi mdi-file-document m-r-5"></i>Disposisi</p>
|
<p class="judul_page"><i class="mdi mdi-file-document m-r-5"></i>Disposisi</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-3">
|
<div class="col-lg-3">
|
||||||
<select class="form-control" id="disp_kpl" style="margin-top:6px;">
|
<select class="form-control" id="disp_kpl" style="margin-top:6px;">
|
||||||
<option value="ALL">ALL</option>
|
<option value="ALL">ALL</option>
|
||||||
<option value="UNTUK DIARAHKAN">UNTUK DIARAHKAN</option>
|
<option value="UNTUK DIARAHKAN">UNTUK DIARAHKAN</option>
|
||||||
<option value="UNTUK DIKETAHUI">UNTUK DIKETAHUI</option>
|
<option value="UNTUK DIKETAHUI">UNTUK DIKETAHUI</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-3">
|
<div class="col-lg-3">
|
||||||
<select class="form-control" id="disp_sifat" style="margin-top:6px;">
|
<select class="form-control" id="disp_sifat" style="margin-top:6px;">
|
||||||
<option value="ALL">ALL</option>
|
<option value="ALL">ALL</option>
|
||||||
<?php
|
<?php
|
||||||
$ukerja=pg_query("SELECT id,sifat FROM sifat_surat ORDER BY id ASC");
|
$ukerja = pg_query($koneksi, "SELECT sifat FROM sifat_surat ORDER BY id ASC");
|
||||||
while($rows=pg_fetch_assoc($ukerja)) {
|
while ($row = pg_fetch_assoc($ukerja)) {
|
||||||
?>
|
echo "<option value=\"{$row['sifat']}\">" . strtoupper($row['sifat']) . "</option>";
|
||||||
<option value="<?php echo $rows['sifat']; ?>"><?php echo strtoupper($rows['sifat']); ?></option>
|
}
|
||||||
<?php
|
?>
|
||||||
}
|
</select>
|
||||||
?>
|
</div>
|
||||||
</select>
|
<div class="col-lg-4">
|
||||||
</div>
|
<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>
|
||||||
|
<?php
|
||||||
|
$months = [
|
||||||
|
"JANUARI", "PEBRUARI", "MARET", "APRIL", "MEI", "JUNI",
|
||||||
|
"JULI", "AGUSTUS", "SEPTEMBER", "OKTOBER", "NOPEMBER", "DESEMBER"
|
||||||
|
];
|
||||||
|
foreach ($months as $index => $month) {
|
||||||
|
$selected = ($bln == $index + 1) ? "selected" : "";
|
||||||
|
echo "<option value=\"" . ($index + 1) . "\" $selected>$month</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 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 <?php if ($bln=='1') {echo "selected";} ?> value="1">JANUARI</option>
|
|
||||||
<option <?php if ($bln=='2') {echo "selected";} ?> value="2">PEBRUARI</option>
|
|
||||||
<option <?php if ($bln=='3') {echo "selected";} ?> value="3">MARET</option>
|
|
||||||
<option <?php if ($bln=='4') {echo "selected";} ?> value="4">APRIL</option>
|
|
||||||
<option <?php if ($bln=='5') {echo "selected";} ?> value="5">MEI</option>
|
|
||||||
<option <?php if ($bln=='6') {echo "selected";} ?> value="6">JUNI</option>
|
|
||||||
<option <?php if ($bln=='7') {echo "selected";} ?> value="7">JULI</option>
|
|
||||||
<option <?php if ($bln=='8') {echo "selected";} ?> value="8">AGUSTUS</option>
|
|
||||||
<option <?php if ($bln=='9') {echo "selected";} ?> value="9">SEPTEMBER</option>
|
|
||||||
<option <?php if ($bln=='10') {echo "selected";} ?> value="10">OKTOBER</option>
|
|
||||||
<option <?php if ($bln=='11') {echo "selected";} ?> value="11">NOPEMBER</option>
|
|
||||||
<option <?php if ($bln=='12') {echo "selected";} ?> value="12">DESEMBER</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>
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<div id="tabel_disposisi"></div>
|
<div id="tabel_disposisi"></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div id="modal_tools" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
<div id="modal_tools" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||||
<div class="modal-dialog modal-full">
|
<div class="modal-dialog modal-full">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header no-border">
|
<div class="modal-header no-border">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
<h4 class="modal-title" id="myModalLabel">Tools</h4>
|
<h4 class="modal-title" id="myModalLabel">Tools</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body" id="modal_body_tools"></div>
|
<div class="modal-body" id="modal_body_tools"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="modal_s" 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">Edit</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body" id="modal_body_s"></div>
|
||||||
|
<div class="modal-footer no-border">
|
||||||
|
<button type="button" class="btn btn-default waves-effect" data-dismiss="modal" id="keluar_s">Keluar</button>
|
||||||
|
<button type="button" class="btn btn-primary waves-effect waves-light" id="simpan_s">Simpan</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="modal_k" 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">Edit</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body" id="modal_body_k"></div>
|
||||||
|
<div class="modal-footer no-border">
|
||||||
|
<button type="button" class="btn btn-default waves-effect" data-dismiss="modal" id="keluar_k">Keluar</button>
|
||||||
|
<button type="button" class="btn btn-primary waves-effect waves-light" id="simpan_k">Simpan</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script type="text/javascript" src="app/disposisi/js/main.js"></script>
|
||||||
|
<script src="assets/vendor/sweetalert2/sweetalert2.all.min.js"></script>
|
||||||
|
|
||||||
<div id="modal_s" 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">Edit</h4>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body" id="modal_body_s"></div>
|
|
||||||
<div class="modal-footer no-border">
|
|
||||||
<button type="button" class="btn btn-default waves-effect" data-dismiss="modal" id="keluar_s">Keluar</button>
|
|
||||||
<button type="button" class="btn btn-primary waves-effect waves-light" id="simpan_s">Simpan</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="modal_k" 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">Edit</h4>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body" id="modal_body_k"></div>
|
|
||||||
<div class="modal-footer no-border">
|
|
||||||
<button type="button" class="btn btn-default waves-effect" data-dismiss="modal" id="keluar_k">Keluar</button>
|
|
||||||
<button type="button" class="btn btn-primary waves-effect waves-light" id="simpan_k">Simpan</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
/*
|
/*
|
||||||
function hitung_surat() {
|
function hitung_surat() {
|
||||||
var thn_count = $('#thn').val();
|
var thn_count = $('#thn').val();
|
||||||
var satker_count = $('#cek_satker').val();
|
var satker_count = $('#cek_satker').val();
|
||||||
@@ -301,223 +252,10 @@ hitung_surat1();
|
|||||||
$('#thn').focusout(function(){hitung_surat();});
|
$('#thn').focusout(function(){hitung_surat();});
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (sess_jenis=='Admin') {
|
// Function to calculate and display counts of letters
|
||||||
function hitung_surat1() {
|
|
||||||
var thn_count = $('#thn').val();
|
|
||||||
var satker_count = $('#cek_satker').val();
|
|
||||||
$.ajax({
|
|
||||||
type: "POST",
|
|
||||||
url: "app/disposisi/count_dispo.php",
|
|
||||||
data: 'thn_count='+thn_count
|
|
||||||
+'&satker_count='+satker_count,
|
|
||||||
success: function(data){
|
|
||||||
var b = data.split('^');
|
|
||||||
if (b[0]==0) {$('#dcn1').html('JANUARI');$('#dcn1').removeAttr("style");} else {$('#dcn1').html('JANUARI ('+b[0]+')');$('#dcn1').attr('style', 'color:red;');}
|
|
||||||
if (b[1]==0) {$('#dcn2').html('PEBRUARI');$('#dcn2').removeAttr("style");} else {$('#dcn2').html('PEBRUARI ('+b[1]+')');$('#dcn2').attr('style', 'color:red;');}
|
|
||||||
if (b[2]==0) {$('#dcn3').html('MARET');$('#dcn3').removeAttr("style");} else {$('#dcn3').html('MARET ('+b[2]+')');$('#dcn3').attr('style', 'color:red;');}
|
|
||||||
if (b[3]==0) {$('#dcn4').html('APRIL');$('#dcn4').removeAttr("style");} else {$('#dcn4').html('APRIL ('+b[3]+')');$('#dcn4').attr('style', 'color:red;');}
|
|
||||||
if (b[4]==0) {$('#dcn5').html('MEI');$('#dcn5').removeAttr("style");} else {$('#dcn5').html('MEI ('+b[4]+')');$('#dcn5').attr('style', 'color:red;');}
|
|
||||||
if (b[5]==0) {$('#dcn6').html('JUNI');$('#dcn6').removeAttr("style");} else {$('#dcn6').html('JUNI ('+b[5]+')');$('#dcn6').attr('style', 'color:red;');}
|
|
||||||
if (b[6]==0) {$('#dcn7').html('JULI');$('#dcn7').removeAttr("style");} else {$('#dcn7').html('JULI ('+b[6]+')');$('#dcn7').attr('style', 'color:red;');}
|
|
||||||
if (b[7]==0) {$('#dcn8').html('AGUSTUS');$('#dcn8').removeAttr("style");} else {$('#dcn8').html('AGUSTUS ('+b[7]+')');$('#dcn8').attr('style', 'color:red;');}
|
|
||||||
if (b[8]==0) {$('#dcn9').html('SEPTEMBER');$('#dcn9').removeAttr("style");} else {$('#dcn9').html('SEPTEMBER ('+b[8]+')');$('#dcn9').attr('style', 'color:red;');}
|
|
||||||
if (b[9]==0) {$('#dcn10').html('OKTOBER');$('#dcn10').removeAttr("style");} else {$('#dcn10').html('OKTOBER ('+b[9]+')');$('#dcn10').attr('style', 'color:red;');}
|
|
||||||
if (b[10]==0) {$('#dcn11').html('NOPEMBER');$('#dcn11').removeAttr("style");} else {$('#dcn11').html('NOPEMBER ('+b[10]+')');$('#dcn11').attr('style', 'color:red;');}
|
|
||||||
if (b[11]==0) {$('#dcn12').html('DESEMBER');$('#dcn12').removeAttr("style");} else {$('#dcn12').html('DESEMBER ('+b[11]+')');$('#dcn12').attr('style', 'color:red;');}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
hitung_surat1();
|
|
||||||
$('#thn').focusout(function(){hitung_surat1();});
|
|
||||||
} else {
|
|
||||||
function hitung_surat() {
|
|
||||||
var thn_count = $('#thn').val();
|
|
||||||
var satker_count = $('#cek_satker').val();
|
|
||||||
$.ajax({
|
|
||||||
type: "POST",
|
|
||||||
url: "app/disposisi/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();});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sess_jenis=='Admin') {
|
|
||||||
var thn2 = $('#thn').val();
|
|
||||||
var bln2 = $('#bln').val();
|
|
||||||
var disp_pros = $('#disp_pros').val();
|
|
||||||
|
|
||||||
$('#tabel_disposisi').load("app/disposisi/tabel.php",{satker:sess_satker,jenis:sess_jenis,disp_pros:disp_pros,thn2:thn2,bln2:bln2});
|
// $(document).ready(function() {
|
||||||
|
|
||||||
$('#disp_pros').change(function(){
|
// });
|
||||||
var disp_pros = $('#disp_pros').val();
|
|
||||||
var thn2 = $('#thn').val();
|
|
||||||
var bln2 = $('#bln').val();
|
|
||||||
$('#tabel_disposisi').load("app/disposisi/tabel.php",{satker:sess_satker,jenis:sess_jenis,disp_pros:disp_pros,thn2:thn2,bln2:bln2});
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#bln').change(function(){
|
|
||||||
var disp_pros = $('#disp_pros').val();
|
|
||||||
var thn2 = $('#thn').val();
|
|
||||||
var bln2 = $('#bln').val();
|
|
||||||
$('#tabel_disposisi').load("app/disposisi/tabel.php",{satker:sess_satker,jenis:sess_jenis,disp_pros:disp_pros,thn2:thn2,bln2:bln2});
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#thn').focusout(function(){
|
|
||||||
var disp_pros = $('#disp_pros').val();
|
|
||||||
var thn2 = $('#thn').val();
|
|
||||||
var bln2 = $('#bln').val();
|
|
||||||
$('#tabel_disposisi').load("app/disposisi/tabel.php",{satker:sess_satker,jenis:sess_jenis,disp_pros:disp_pros,thn2:thn2,bln2:bln2});
|
|
||||||
});
|
|
||||||
|
|
||||||
} else {
|
|
||||||
var thn2 = $('#thn').val();
|
|
||||||
var bln2 = $('#bln').val();
|
|
||||||
var disp_kpl = $('#disp_kpl').val();
|
|
||||||
var disp_sifat = $('#disp_sifat').val();
|
|
||||||
|
|
||||||
$('#tabel_disposisi').load("app/disposisi/tabel.php",{satker:sess_satker,jenis:sess_jenis,disp_kpl:disp_kpl,disp_sifat:disp_sifat,thn2:thn2,bln2:bln2});
|
|
||||||
|
|
||||||
$('#disp_kpl').change(function(){
|
|
||||||
var disp_kpl = $('#disp_kpl').val();
|
|
||||||
var disp_sifat = $('#disp_sifat').val();
|
|
||||||
var thn2 = $('#thn').val();
|
|
||||||
var bln2 = $('#bln').val();
|
|
||||||
$('#tabel_disposisi').load("app/disposisi/tabel.php",{satker:sess_satker,jenis:sess_jenis,disp_kpl:disp_kpl,disp_sifat:disp_sifat,thn2:thn2,bln2:bln2});
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#disp_sifat').change(function(){
|
|
||||||
var disp_kpl = $('#disp_kpl').val();
|
|
||||||
var disp_sifat = $('#disp_sifat').val();
|
|
||||||
var thn2 = $('#thn').val();
|
|
||||||
var bln2 = $('#bln').val();
|
|
||||||
$('#tabel_disposisi').load("app/disposisi/tabel.php",{satker:sess_satker,jenis:sess_jenis,disp_kpl:disp_kpl,disp_sifat:disp_sifat,thn2:thn2,bln2:bln2});
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#bln').change(function(){
|
|
||||||
var thn2 = $('#thn').val();
|
|
||||||
var bln2 = $('#bln').val();
|
|
||||||
$('#tabel_disposisi').load("app/disposisi/tabel.php",{satker:sess_satker,jenis:sess_jenis,disp_kpl:disp_kpl,disp_sifat:disp_sifat,thn2:thn2,bln2:bln2});
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#thn').focusout(function(){
|
|
||||||
var thn2 = $('#thn').val();
|
|
||||||
var bln2 = $('#bln').val();
|
|
||||||
$('#tabel_disposisi').load("app/disposisi/tabel.php",{satker:sess_satker,jenis:sess_jenis,disp_kpl:disp_kpl,disp_sifat:disp_sifat,thn2:thn2,bln2:bln2});
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
$('#tambah_disposisi').click(function(){
|
|
||||||
var id = 0;
|
|
||||||
var jenis_disposisi = 'Disposisi';
|
|
||||||
var jenis_disposisi_id = '1';
|
|
||||||
$.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);});
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#b1').click(function(){
|
|
||||||
var b=$('#pt1').val();
|
|
||||||
var thn=$('#thn1').val();
|
|
||||||
var key='cek_noag';
|
|
||||||
$.ajax({
|
|
||||||
type: "POST",
|
|
||||||
url: "app/disposisi/crud.php",
|
|
||||||
data: 'b='+b
|
|
||||||
+'&thn='+thn
|
|
||||||
+'&key='+key,
|
|
||||||
success: function(data){
|
|
||||||
if (data==0) {
|
|
||||||
alert('Data tidak ditemukan..');
|
|
||||||
} else {
|
|
||||||
$('#modal_tools').modal('show');
|
|
||||||
$('#modal_body_tools').html("");
|
|
||||||
$.ajax({
|
|
||||||
type: "POST",
|
|
||||||
url: "app/disposisi/modal_tools.php",
|
|
||||||
data: 'b='+b
|
|
||||||
+'&thn='+thn,
|
|
||||||
success: function(data){
|
|
||||||
$('#modal_body_tools').html(data);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
function tekan1(event) {
|
|
||||||
var x = event.keyCode;
|
|
||||||
if (x == 13) {$('#b1').trigger('click');}
|
|
||||||
}
|
|
||||||
|
|
||||||
$('#simpan_k').click(function(){
|
|
||||||
var kirim_id=$('#kirim_id').val();
|
|
||||||
var tgl_input=$('#tgl_input').val();
|
|
||||||
var dis_baca=$('#dis_baca').val();
|
|
||||||
var lama=$('#lama').val();
|
|
||||||
var isi=$('#isi_disposisi_edit').val();
|
|
||||||
var key = 'edit_k';
|
|
||||||
$.ajax({
|
|
||||||
type: "POST",
|
|
||||||
url: "app/disposisi/crud.php",
|
|
||||||
data: 'id='+kirim_id
|
|
||||||
+'&tgl_input='+tgl_input
|
|
||||||
+'&dis_baca='+dis_baca
|
|
||||||
+'&lama='+lama
|
|
||||||
+'&isi='+isi
|
|
||||||
+'&key='+key,
|
|
||||||
success: function(data){
|
|
||||||
$('#modal_k').modal('hide');
|
|
||||||
$('body').removeClass('modal-open');
|
|
||||||
$('.modal-backdrop').remove();
|
|
||||||
alert('tersimpan..');
|
|
||||||
$('#tabel_k').load('app/disposisi/tabel_k.php',{no_agenda:no_agenda, thn:thn});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#simpan_s').click(function(){
|
|
||||||
var surat_id=$('#surat_id').val();
|
|
||||||
var no_surat=$('#no_surat').val();
|
|
||||||
var tgl_diterima=$('#tgl_diterima').val();
|
|
||||||
var key = 'edit_s';
|
|
||||||
$.ajax({
|
|
||||||
type: "POST",
|
|
||||||
url: "app/disposisi/crud.php",
|
|
||||||
data: 'id='+surat_id
|
|
||||||
+'&no_surat='+no_surat
|
|
||||||
+'&tgl_diterima='+tgl_diterima
|
|
||||||
+'&key='+key,
|
|
||||||
success: function(data){
|
|
||||||
$('#modal_s').modal('hide');
|
|
||||||
$('body').removeClass('modal-open');
|
|
||||||
$('.modal-backdrop').remove();
|
|
||||||
alert('tersimpan..');
|
|
||||||
$('#tabel_s').load('app/disposisi/tabel_s.php',{no_agenda:no_agenda, thn:thn});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
$(document).on('hidden.bs.modal', function (event) {
|
|
||||||
if ($('.modal:visible').length) {
|
|
||||||
$('body').addClass('modal-open');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
+15
-20
@@ -2,11 +2,10 @@
|
|||||||
include("../koneksi.php");
|
include("../koneksi.php");
|
||||||
$surat_id = $_POST['id'];
|
$surat_id = $_POST['id'];
|
||||||
$flag_pengesahan = $_POST['flag_pengesahan'];
|
$flag_pengesahan = $_POST['flag_pengesahan'];
|
||||||
|
$baseURL = '../../../public/doc/';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!--
|
|
||||||
<div class="row port">
|
|
||||||
<div class="portfolioContainer"> -->
|
|
||||||
<?php
|
<?php
|
||||||
$dok = pg_query($koneksi, "SELECT * FROM scan WHERE surat_id='$surat_id'
|
$dok = pg_query($koneksi, "SELECT * FROM scan WHERE surat_id='$surat_id'
|
||||||
AND ( LOWER(file) LIKE '%.jpg'
|
AND ( LOWER(file) LIKE '%.jpg'
|
||||||
@@ -16,19 +15,20 @@ $dok = pg_query($koneksi, "SELECT * FROM scan WHERE surat_id='$surat_id'
|
|||||||
while ($rdok = pg_fetch_array($dok)) {
|
while ($rdok = pg_fetch_array($dok)) {
|
||||||
$foto = $rdok['file'];
|
$foto = $rdok['file'];
|
||||||
$file_id = $rdok['id'];
|
$file_id = $rdok['id'];
|
||||||
$baseURL=($flag_pengesahan == '1') ? 'app/spengesahan/dok/' :'app/kirim/dok/';
|
$URL = ($flag_pengesahan == '1') ? $baseURL . 'spengesahan/img/' : $baseURL . 'kirim_surat/img/';
|
||||||
?>
|
?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
<button type="button" id="<?php echo $file_id; ?>" class="btn btn-block btn-success waves-effect waves-light pr_scan_surat">Print</button>
|
<button type="button" id="<?php echo $file_id; ?>" class="btn btn-block btn-success waves-effect waves-light pr_scan_surat">Print</button>
|
||||||
|
<input type="hidden" id="flag_pengesahan" value="<?= $flag_pengesahan ?>">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
<!-- <div class="gal-detail"> -->
|
<center>
|
||||||
<img name="pic" id="<?= $rdok['id']; ?>" src="<?=$baseURL . $foto; ?>" class="img-thumbnail" alt="work-thumbnail">
|
<img name="pic" id="<?= $rdok['id']; ?>" src="<?= $URL . $foto; ?>" class="img-thumbnail" alt="work-thumbnail">
|
||||||
<!-- </div> -->
|
</center>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -36,26 +36,21 @@ while ($rdok = pg_fetch_array($dok)) {
|
|||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<!--
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$('.pr_scan_surat').click(function() {
|
$('.pr_scan_surat').click(function() {
|
||||||
var id = $(this).attr('id');
|
var id = $(this).attr('id');
|
||||||
var w = 1000;
|
var flag_pengesahan = $('#flag_pengesahan').val();
|
||||||
var h = 800;
|
var winProps = `width=1000,height=800,top=${(screen.height / 2) - 400},left=${(screen.width / 2) - 500}`;
|
||||||
var left = Number((screen.width / 2) - (w / 2));
|
|
||||||
var tops = Number((screen.height / 2) - (h / 2));
|
|
||||||
$.post('app/inbox/print_pic.php', {
|
$.post('app/inbox/print_pic.php', {
|
||||||
id: id
|
id: id,
|
||||||
|
flag_pengesahan: flag_pengesahan
|
||||||
}, function(result) {
|
}, function(result) {
|
||||||
WinId = window.open('toolbar=no, location=no, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=no, width=' + w + ', height=' + h + ', top=' + tops + ', left=' + left);
|
var win = window.open('', '', winProps);
|
||||||
WinId.document.open();
|
win.document.write(result);
|
||||||
WinId.document.write(result);
|
win.document.close();
|
||||||
WinId.document.close();
|
win.focus();
|
||||||
WinId.focus();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@@ -2,26 +2,27 @@
|
|||||||
include('../koneksi.php');
|
include('../koneksi.php');
|
||||||
$surat_id = $_POST['id'];
|
$surat_id = $_POST['id'];
|
||||||
$flag_pengesahan = $_POST['flag_pengesahan'];
|
$flag_pengesahan = $_POST['flag_pengesahan'];
|
||||||
|
$baseURL = '../../../public/doc/';
|
||||||
?>
|
?>
|
||||||
<input type="hidden" value="<?php echo $surat_id; ?>">
|
<input type="hidden" value="<?php echo $surat_id; ?>">
|
||||||
<?php
|
<?php
|
||||||
$query = "SELECT file, id FROM scan WHERE surat_id = '$surat_id'
|
$query = "SELECT file, id FROM scan WHERE surat_id = '$surat_id'
|
||||||
AND LOWER(file) NOT LIKE '%.jpg'
|
AND LOWER(file) NOT LIKE '%.jpg'
|
||||||
AND LOWER(file) NOT LIKE '%.JPG'
|
AND LOWER(file) NOT LIKE '%.JPG'
|
||||||
AND LOWER(file) NOT LIKE '%.png'
|
AND LOWER(file) NOT LIKE '%.png'
|
||||||
AND LOWER(file) NOT LIKE '%.PNG'
|
AND LOWER(file) NOT LIKE '%.PNG'
|
||||||
AND LOWER(file) NOT LIKE '%.jpeg'
|
AND LOWER(file) NOT LIKE '%.jpeg'
|
||||||
AND LOWER(file) NOT LIKE '%.JPEG'
|
AND LOWER(file) NOT LIKE '%.JPEG'
|
||||||
ORDER BY id DESC";
|
ORDER BY id DESC";
|
||||||
$data_pdf = pg_query($koneksi, $query);
|
$data_pdf = pg_query($koneksi, $query);
|
||||||
|
|
||||||
while ($rdata_pdf = pg_fetch_array($data_pdf)) {
|
while ($rdata_pdf = pg_fetch_array($data_pdf)) {
|
||||||
$pdf = $rdata_pdf['file'];
|
$pdf = $rdata_pdf['file'];
|
||||||
if (!empty($pdf)) {
|
if (!empty($pdf)) {
|
||||||
$base_url = ($flag_pengesahan == '1') ? 'app/spengesahan/pdf/pdf/' : 'app/kirim/pdf/pdf/';
|
$URL = ($flag_pengesahan == '1') ? $baseURL.'spengesahan/dok/' : $baseURL.'kirim_surat/dok/';
|
||||||
?>
|
?>
|
||||||
<div class="thumb" style="background-color:#ece9d8;padding:8px;margin-top:6px">
|
<div class="thumb" style="background-color:#ece9d8;padding:8px;margin-top:6px">
|
||||||
<a href='<?php echo $base_url . $pdf; ?>' target='_blank'><?php echo $pdf; ?></a>
|
<a href='<?php echo $URL . $pdf; ?>' target='_blank'><?php echo $pdf; ?></a>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|||||||
+38
-36
@@ -1,53 +1,55 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
|
||||||
<!-- App title -->
|
|
||||||
<title>E-LETTER RSSA</title>
|
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<!-- App title -->
|
||||||
|
<title>E-LETTER RSSA</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
|
img {
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
img {
|
.breakAfter {
|
||||||
width: 100%;
|
page-break-after: always;
|
||||||
height: auto;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.breakAfter{
|
@page {
|
||||||
page-break-after: always;
|
size: 210mm 430mm;
|
||||||
}
|
height: 430;
|
||||||
@page
|
width: 210mm;
|
||||||
{
|
|
||||||
size: 210mm 430mm;
|
|
||||||
height: 430;
|
|
||||||
width: 210mm;
|
|
||||||
/* this affects the margin in the printer settings */
|
/* this affects the margin in the printer settings */
|
||||||
margin: 7mm 0mm 0mm 6mm;
|
margin: 7mm 0mm 0mm 6mm;
|
||||||
}
|
}
|
||||||
|
|
||||||
body
|
body {
|
||||||
{
|
margin-left: 30px;
|
||||||
margin-left: 30px;
|
}
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<?php
|
<?php
|
||||||
include('../koneksi.php');
|
include('../koneksi.php');
|
||||||
$id=$_POST['id'];
|
$id = $_POST['id'];
|
||||||
$d=pg_query("SELECT file FROM scan WHERE id='$id'");
|
$flag_pengesahan = $_POST['flag_pengesahan'];
|
||||||
while($r=pg_fetch_array($d)) {$file=$r[0];}
|
$baseURL = '../../../public/doc/';
|
||||||
?>
|
$URL = ($flag_pengesahan == '1') ? $baseURL . 'spengesahan/img/' : $baseURL . 'kirim_surat/img/';
|
||||||
|
|
||||||
<img src="app/kirim/dok/<?php echo $file; ?>">
|
$d = pg_query($koneksi, "SELECT file FROM scan WHERE id='$id'");
|
||||||
|
while ($r = pg_fetch_array($d)) {
|
||||||
|
$file = $r[0];
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<img src="<?= $URL.$file; ?>">
|
||||||
window.print();
|
|
||||||
window.close();
|
<script type="text/javascript">
|
||||||
</script>
|
window.print();
|
||||||
|
window.close();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
</html>
|
||||||
+111
-92
@@ -1,38 +1,46 @@
|
|||||||
<?php
|
<?php
|
||||||
include("../koneksi.php");
|
include("../koneksi.php");
|
||||||
$satuan_kerja_id=$_POST['satker'];
|
$satuan_kerja_id = $_POST['satker'];
|
||||||
$jenis_user=$_POST['jenis'];
|
$jenis_user = $_POST['jenis'];
|
||||||
$nampeg=$_POST['nampeg'];
|
$nampeg = $_POST['nampeg'];
|
||||||
$bln=$_POST['bln'];
|
$bln = $_POST['bln'];
|
||||||
$thn=$_POST['thn'];
|
$thn = $_POST['thn'];
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$('button[name="edit_kendali"]').popover();
|
$('button[name="edit_kendali"]').popover();
|
||||||
$('button[name="proses_kendali"]').popover();
|
$('button[name="proses_kendali"]').popover();
|
||||||
$('button[name="print_kendali"]').popover();
|
$('button[name="print_kendali"]').popover();
|
||||||
$("#tabel_data_smasuk").DataTable({"stateSave": true,"paging": true,"lengthChange": true,"searching": true,"ordering": false,"info": true,"autoWidth": false});
|
$("#tabel_data_smasuk").DataTable({
|
||||||
|
"stateSave": true,
|
||||||
|
"paging": true,
|
||||||
|
"lengthChange": true,
|
||||||
|
"searching": true,
|
||||||
|
"ordering": false,
|
||||||
|
"info": true,
|
||||||
|
"autoWidth": false
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<input type="hidden" value="<?php echo $nampeg; ?>" id="nampeg">
|
<input type="hidden" value="<?php echo $nampeg; ?>" id="nampeg">
|
||||||
<input type="hidden" value="<?php echo $jenis_user; ?>" id="jenis">
|
<input type="hidden" value="<?php echo $jenis_user; ?>" id="jenis">
|
||||||
<input type="hidden" value="<?php echo $satuan_kerja_id; ?>" id="kndl_satker_id">
|
<input type="hidden" value="<?php echo $satuan_kerja_id; ?>" id="kndl_satker_id">
|
||||||
<table id="tabel_data_smasuk" class="table table-striped table-condensed table-bordered" cellpadding="1">
|
<table id="tabel_data_smasuk" class="table table-striped table-condensed table-bordered" cellpadding="1">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<!--<td>Dari</td>-->
|
<!--<td>Dari</td>-->
|
||||||
<td width="80px;">No Kendali</td>
|
<td width="80px;">No Kendali</td>
|
||||||
<td width="80px;">Tgl-Jam</td>
|
<td width="80px;">Tgl-Jam</td>
|
||||||
<td width="220px;">Pengolah</td>
|
<td width="220px;">Pengolah</td>
|
||||||
<td>Perihal</td>
|
<td>Perihal</td>
|
||||||
<td width="100px;">Jenis</td>
|
<td width="100px;">Jenis</td>
|
||||||
<td width="80px;">Tools</td>
|
<td width="80px;">Tools</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody style="color:black">
|
<tbody style="color:black">
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$data=pg_query("SELECT DISTINCT (SELECT a.nama FROM satuan_kerja a WHERE a.id=s.satuan_kerja_dari),
|
$data = pg_query($koneksi, "SELECT DISTINCT (SELECT a.nama FROM satuan_kerja a WHERE a.id=s.satuan_kerja_dari),
|
||||||
s.no_kendali,
|
s.no_kendali,
|
||||||
s.tgl_diterima,s.jam_diterima,
|
s.tgl_diterima,s.jam_diterima,
|
||||||
(SELECT a.nama FROM satuan_kerja a WHERE a.id=s.satuan_kerja_dari),
|
(SELECT a.nama FROM satuan_kerja a WHERE a.id=s.satuan_kerja_dari),
|
||||||
@@ -42,83 +50,94 @@ $data=pg_query("SELECT DISTINCT (SELECT a.nama FROM satuan_kerja a WHERE a.id=s.
|
|||||||
s.sm_baca,s.id
|
s.sm_baca,s.id
|
||||||
FROM surat s INNER JOIN kirim k ON (s.id=k.surat_id)
|
FROM surat s INNER JOIN kirim k ON (s.id=k.surat_id)
|
||||||
WHERE s.jenis_disposisi_id='2'
|
WHERE s.jenis_disposisi_id='2'
|
||||||
".($thn == '' ? "" : "AND EXTRACT(YEAR FROM DATE(s.tgl_diterima))='$thn'")."
|
" . ($thn == '' ? "" : "AND EXTRACT(YEAR FROM DATE(s.tgl_diterima))='$thn'") . "
|
||||||
".($bln == '0' ? "" : "AND EXTRACT(MONTH FROM DATE(s.tgl_diterima))='$bln'")."
|
" . ($bln == '0' ? "" : "AND EXTRACT(MONTH FROM DATE(s.tgl_diterima))='$bln'") . "
|
||||||
".($jenis_user == 'Admin' ? "" : "AND k.satuan_kerja_tujuan='$satuan_kerja_id' AND k.tgl_input IS NULL")."
|
" . ($jenis_user == 'Admin' ? "" : "AND k.satuan_kerja_tujuan='$satuan_kerja_id' AND k.tgl_input IS NULL") . "
|
||||||
ORDER BY s.no_kendali DESC
|
ORDER BY s.no_kendali DESC
|
||||||
");
|
");
|
||||||
|
|
||||||
while($r=pg_fetch_array($data)) {
|
while ($r = pg_fetch_array($data)) {
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<!--<td><?php echo $r[0]; ?></td>-->
|
<!--<td><?php echo $r[0]; ?></td>-->
|
||||||
<td class="kiri" align="center" style="font-family:InterSB"><?php
|
<td class="kiri" align="center" style="font-family:InterSB"><?php
|
||||||
$no_pinjam=(int) substr($r['no_kendali'],0,5);
|
$no_pinjam = (int) substr($r['no_kendali'], 0, 5);
|
||||||
$no_kendali=sprintf("%05s",$no_pinjam);
|
$no_kendali = sprintf("%05s", $no_pinjam);
|
||||||
echo $no_kendali;
|
echo $no_kendali;
|
||||||
?></td>
|
?></td>
|
||||||
<td align="center"><?php echo '<span>'.date('d-m-Y',strtotime($r['tgl_diterima'])).'</span><br><span> '.date('H:i',strtotime($r['jam_diterima'])).'</span>'; ?></td>
|
<td align="center"><?php echo '<span>' . date('d-m-Y', strtotime($r['tgl_diterima'])) . '</span><br><span> ' . date('H:i', strtotime($r['jam_diterima'])) . '</span>'; ?></td>
|
||||||
<td style="font-family:InterSB"><?php echo $r[4]; ?></td>
|
<td style="font-family:InterSB"><?php echo $r[4]; ?></td>
|
||||||
<td style="word-wrap: break-word;min-width: 160px;max-width: 160px;"><?php echo $r['perihal']; ?></td>
|
<td style="word-wrap: break-word;min-width: 160px;max-width: 160px;"><?php echo $r['perihal']; ?></td>
|
||||||
<td align="center"><?php echo $r[7]; ?></td>
|
<td align="center"><?php echo $r[7]; ?></td>
|
||||||
<td class="kanan" align="center">
|
<td class="kanan" align="center">
|
||||||
|
|
||||||
<?php if ($jenis_user=='Admin') { ?>
|
<?php if ($jenis_user == 'Admin') { ?>
|
||||||
<button type="button" name="edit_kendali" style="height:22px;"class="btn btn-primary btn-xs edit_kendali" id="<?php echo $r['id'];?>" data-content="Edit" rel="popover" data-placement="top" data-trigger="hover"
|
<button type="button" name="edit_kendali" style="height:22px;" class="btn btn-primary btn-xs edit_kendali" id="<?php echo $r['id']; ?>" data-content="Edit" rel="popover" data-placement="top" data-trigger="hover">
|
||||||
>
|
<i class="fa fa-pencil"></i>
|
||||||
<i class="fa fa-pencil"></i>
|
</button>
|
||||||
</button>
|
<?php } ?>
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
<button type="button" name="proses_kendali" style="height:22px;"class="btn btn-success btn-xs proses_kendali" id="<?php echo $r['id'];?>" data-content="Proses Mutasi" rel="popover" data-placement="top" data-trigger="hover"
|
<button type="button" name="proses_kendali" style="height:22px;" class="btn btn-success btn-xs proses_kendali" id="<?php echo $r['id']; ?>" data-content="Proses Mutasi" rel="popover" data-placement="top" data-trigger="hover">
|
||||||
>
|
<i class="fa fa-arrow-right"></i>
|
||||||
<i class="fa fa-arrow-right"></i>
|
</button>
|
||||||
</button>
|
<button type="button" name="print_kendali" style="height:22px;" class="btn btn-inverse btn-xs print_kendali" id="<?php echo $r['id']; ?>" data-content="Print Kendali" rel="popover" data-placement="top" data-trigger="hover">
|
||||||
<button type="button" name="print_kendali" style="height:22px;"class="btn btn-inverse btn-xs print_kendali" id="<?php echo $r['id'];?>" data-content="Print Kendali" rel="popover" data-placement="top" data-trigger="hover"
|
<i class="glyphicon glyphicon-print"></i>
|
||||||
>
|
</button>
|
||||||
<i class="glyphicon glyphicon-print"></i>
|
</td>
|
||||||
</button>
|
</tr>
|
||||||
</td>
|
<?php
|
||||||
</tr>
|
}
|
||||||
<?php
|
?>
|
||||||
}
|
</tbody>
|
||||||
?>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
$("#tabel_data_smasuk").on('click', '.proses_kendali', function() {
|
||||||
|
var id = $(this).attr('id');
|
||||||
|
var jenis = $('#jenis').val();
|
||||||
|
var thn = $('#thn').val();
|
||||||
|
var bln = $('#bln').val();
|
||||||
|
var kndl_satker_id = $('#kndl_satker_id').val();
|
||||||
|
$.post('app/kendali/arahan/main.php', {
|
||||||
|
surat_id: id,
|
||||||
|
jenis: jenis,
|
||||||
|
thn: thn,
|
||||||
|
bln: bln,
|
||||||
|
kndl_satker_id: kndl_satker_id
|
||||||
|
}, function(html) {
|
||||||
|
$("#main_tag").html(html);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
$("#tabel_data_smasuk").on('click','.proses_kendali',function(){
|
$("#tabel_data_smasuk").on('click', '.print_kendali', function() {
|
||||||
var id = $(this).attr('id');
|
var nampeg = $('#nampeg').val();
|
||||||
var jenis = $('#jenis').val();
|
var surat_id = $(this).attr('id');
|
||||||
var thn = $('#thn').val();
|
var w = 1000;
|
||||||
var bln = $('#bln').val();
|
var h = 800;
|
||||||
var kndl_satker_id = $('#kndl_satker_id').val();
|
var left = Number((screen.width / 2) - (w / 2));
|
||||||
$.post('app/kendali/arahan/main.php',{surat_id : id, jenis:jenis,thn:thn,bln:bln,kndl_satker_id:kndl_satker_id},function(html){$("#main_tag").html(html);});
|
var tops = Number((screen.height / 2) - (h / 2));
|
||||||
});
|
$.post('app/smasuk/print_kendali.php', {
|
||||||
|
surat_id: surat_id,
|
||||||
|
nampeg: nampeg
|
||||||
|
}, function(result) {
|
||||||
|
WinId = window.open('', 'newwin', 'toolbar=no, location=no, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=no, width=' + w + ', height=' + h + ', top=' + tops + ', left=' + left);
|
||||||
|
WinId.document.open();
|
||||||
|
WinId.document.write(result);
|
||||||
|
WinId.document.close();
|
||||||
|
WinId.focus();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#tabel_data_smasuk").on('click', '.edit_kendali', function() {
|
||||||
$("#tabel_data_smasuk").on('click','.print_kendali',function(){
|
var id = $(this).attr('id');
|
||||||
var nampeg = $('#nampeg').val();
|
var jenis = $('#jenis').val();
|
||||||
var surat_id = $(this).attr('id');
|
$.post('app/smasuk/main.php', {
|
||||||
var w = 1000;
|
surat_id: id,
|
||||||
var h = 800;
|
jenis: jenis
|
||||||
var left = Number((screen.width/2)-(w/2));
|
}, function(html) {
|
||||||
var tops = Number((screen.height/2)-(h/2));
|
$("#main_tag").html(html);
|
||||||
$.post('app/smasuk/print_kendali.php', { surat_id : surat_id, nampeg:nampeg}, function (result) {
|
});
|
||||||
WinId = window.open('', 'newwin', 'toolbar=no, location=no, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+tops+', left='+left);
|
});
|
||||||
WinId.document.open();
|
</script>
|
||||||
WinId.document.write(result);
|
|
||||||
WinId.document.close();
|
|
||||||
WinId.focus();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#tabel_data_smasuk").on('click','.edit_kendali',function(){
|
|
||||||
var id = $(this).attr('id');
|
|
||||||
var jenis = $('#jenis').val();
|
|
||||||
$.post('app/smasuk/main.php',{surat_id : id, jenis:jenis},function(html){$("#main_tag").html(html);});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
@@ -1,11 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
include("../koneksi.php");
|
include("../koneksi.php");
|
||||||
$id=$_POST['id'];
|
$id = $_POST['id'];
|
||||||
//$delete_dok=pg_query("DELETE FROM scan WHERE id='$id'");
|
$baseURL = '../../public/doc/';
|
||||||
$d=pg_query("SELECT file FROM scan WHERE id='$id'");
|
$folder = 'kirim_surat/img/';
|
||||||
while($r=pg_fetch_array($d)) {$fil=$r[0];}
|
$d = pg_query($koneksi,"SELECT file FROM scan WHERE id='$id'");
|
||||||
$del_pr=pg_query("DELETE FROM scan WHERE id='$id'");
|
while ($r = pg_fetch_array($d)) {
|
||||||
$path = "dok/".$fil;
|
$fil = $r[0];
|
||||||
if(file_exists($path)){unlink($path);}
|
}
|
||||||
|
$del_pr = pg_query($koneksi,"DELETE FROM scan WHERE id='$id'");
|
||||||
?>
|
$path = $baseURL.$folder. $fil;
|
||||||
|
if (file_exists($path)) {
|
||||||
|
unlink($path);
|
||||||
|
}
|
||||||
|
|||||||
@@ -472,62 +472,6 @@ if (($disp_thn == NULL) || ($disp_thn == '')) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
|
||||||
$('#tambah_kirim').click(function(){
|
|
||||||
var id = 0;
|
|
||||||
var sat = $('#sat').val();
|
|
||||||
if (sat=='172') {var satuan_kerja_id = sat;} else {var satuan_kerja_id = sess_satker;}
|
|
||||||
$('#modal_kirim').modal('show');
|
|
||||||
$('#modal_body_kirim').html("");
|
|
||||||
$.ajax({
|
|
||||||
type: "POST",
|
|
||||||
url: "app/kirim/modal.php",
|
|
||||||
data: 'id='+id
|
|
||||||
+'&satuan_kerja_id='+satuan_kerja_id,
|
|
||||||
success: function(data){
|
|
||||||
$('#modal_body_kirim').html(data);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#simpan_kirim').click(function(){
|
|
||||||
var surat_id2 = $('#surat_id_cek').val();
|
|
||||||
if (!surat_id2) {surat_id='0';} else {surat_id=surat_id2;}
|
|
||||||
var perihal = $('#perihal').val();
|
|
||||||
var no_surat1 = $('#no_surat').val();
|
|
||||||
var no_surat = no_surat1.replace(/\s/g, '');
|
|
||||||
var sat = $('#sat').val();
|
|
||||||
if ((!perihal) || (!no_surat1)) {alert('Nomor Surat / Perihal Tidak Boleh Kosong');} else {
|
|
||||||
if (sat=='172') {
|
|
||||||
var satuan_kerja_id = sat;} else {var satuan_kerja_id = sess_satker;}
|
|
||||||
var key = 'simpan_kirim';
|
|
||||||
$.ajax({
|
|
||||||
type: "POST",
|
|
||||||
url: "app/kirim/crud.php",
|
|
||||||
data: 'surat_id='+surat_id
|
|
||||||
+'&perihal='+perihal
|
|
||||||
+'&no_surat='+no_surat
|
|
||||||
+'&satuan_kerja_id='+satuan_kerja_id
|
|
||||||
+'&key='+key,
|
|
||||||
success: function(data){
|
|
||||||
$('#modal_kirim').modal('hide');
|
|
||||||
$('body').removeClass('modal-open');
|
|
||||||
$('.modal-backdrop').remove();
|
|
||||||
alert('Data tersimpan..');
|
|
||||||
var thn2 = $('#thn').val();
|
|
||||||
var bln2 = $('#bln').val();
|
|
||||||
$('#tabel_kirim').load("app/kirim/tabel.php",{satker:sess_satker,jenis:sess_jenis,sess_nama:sess_nama,thn2:thn2,bln2:bln2});
|
|
||||||
if (sat=='172') {
|
|
||||||
$('#tabel_kirim').load("app/kirim/tabel.php",{satker:sat,jenis:sess_jenis,sess_nama:sess_nama,thn2:thn2,bln2:bln2});
|
|
||||||
} else {
|
|
||||||
$('#tabel_kirim').load("app/kirim/tabel.php",{satker:sess_satker,jenis:sess_jenis,sess_nama:sess_nama,thn2:thn2,bln2:bln2});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
|
|
||||||
$('#tambah_kirim').click(function() {
|
$('#tambah_kirim').click(function() {
|
||||||
var id = 0;
|
var id = 0;
|
||||||
var sat = $('#sat').val();
|
var sat = $('#sat').val();
|
||||||
@@ -550,25 +494,6 @@ if (($disp_thn == NULL) || ($disp_thn == '')) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
/*
|
|
||||||
$('#simpan_kirim2').click(function(){
|
|
||||||
var surat_id = $('#surat_id_cek').val();
|
|
||||||
var no_surat = $('.xs'+surat_id).html();
|
|
||||||
var perihal = $('.xt'+surat_id).html();
|
|
||||||
var jml_pic = $('.xq'+surat_id).html();
|
|
||||||
var jml_file = $('.xr'+surat_id).html();
|
|
||||||
var jml_kpd = $('.xp'+surat_id).html();
|
|
||||||
if ((!no_surat) || (!perihal) || ((jml_pic=='0') && (jml_file=='0')) || (jml_kpd=='0')) {
|
|
||||||
alert('No surat, Perihal, Lampiran, dan Kepada harus di-isi semua, Mohon dicek kembali..');
|
|
||||||
} else {
|
|
||||||
$('#modal_kirim2').modal('hide');
|
|
||||||
$('body').removeClass('modal-open');
|
|
||||||
$('.modal-backdrop').remove();
|
|
||||||
alert('Data tersimpan..');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
$("#modal_kirim").on("hidden.bs.modal", function() {
|
$("#modal_kirim").on("hidden.bs.modal", function() {
|
||||||
$(this).off('hidden.bs.modal');
|
$(this).off('hidden.bs.modal');
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ $surat_id = $_POST['id'];
|
|||||||
cache: false,
|
cache: false,
|
||||||
processData: false,
|
processData: false,
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
alert("Foto Tersimpan..");
|
infoToast('success','Foto Tersimpan');
|
||||||
$('#dok_tbl').load("app/kirim/tabel.php", {
|
$('#dok_tbl').load("app/kirim/tabel.php", {
|
||||||
surat_id: data
|
surat_id: data
|
||||||
});
|
});
|
||||||
@@ -84,4 +84,14 @@ $surat_id = $_POST['id'];
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
function infoToast(icone, infone) {
|
||||||
|
Swal.fire({
|
||||||
|
// position: posisine,
|
||||||
|
icon: icone,
|
||||||
|
title: infone,
|
||||||
|
showConfirmButton: false,
|
||||||
|
timer: 2500
|
||||||
|
});
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -9,7 +9,7 @@ if ($key == 'delete_cv') {
|
|||||||
$fil = $r[0];
|
$fil = $r[0];
|
||||||
}
|
}
|
||||||
$del_pr = pg_query($koneksi, "DELETE FROM scan WHERE id='$id'");
|
$del_pr = pg_query($koneksi, "DELETE FROM scan WHERE id='$id'");
|
||||||
$path = "pdf/" . $fil;
|
$path = "../../../public/doc/kirim_surat/dok/" . $fil;
|
||||||
if (file_exists($path)) {
|
if (file_exists($path)) {
|
||||||
unlink($path);
|
unlink($path);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ while ($rdata_pdf = pg_fetch_array($data_pdf)) {
|
|||||||
} else {
|
} else {
|
||||||
?>
|
?>
|
||||||
<div class="thumb" style="background-color:#ece9d8;padding:8px;margin-top:6px">
|
<div class="thumb" style="background-color:#ece9d8;padding:8px;margin-top:6px">
|
||||||
<a href='app/kirim/pdf/pdf/<?php echo $pdf; ?>' target='_blank'><?php echo $pdf; ?></a>
|
<a href='../../../public/doc/kirim_surat/dok/<?php echo $pdf; ?>' target='_blank'><?php echo $pdf; ?></a>
|
||||||
<!--<embed src="app/kirim/pdf/pdf/<?php echo $pdf; ?>#toolbar=0" width="100%" height="300"></embed>-->
|
<!--<embed src="app/kirim/pdf/pdf/<?php echo $pdf; ?>#toolbar=0" width="100%" height="300"></embed>-->
|
||||||
<button type="button" name="cv_deletse" style="height:22px;border-radius: 50%" class="btn btn-danger btn-xs pull-right" id="<?php echo $rdata_pdf[1]; ?>" data-content="Hapus" rel="popover" data-placement="bottom" data-trigger="hover">
|
<button type="button" name="cv_deletse" style="height:22px;border-radius: 50%" class="btn btn-danger btn-xs pull-right" id="<?php echo $rdata_pdf[1]; ?>" data-content="Hapus" rel="popover" data-placement="bottom" data-trigger="hover">
|
||||||
<i class="fa fa-remove"></i>
|
<i class="fa fa-remove"></i>
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ include("../../koneksi.php");
|
|||||||
|
|
||||||
$surat_id = $_POST['surat_id_uploadz'];
|
$surat_id = $_POST['surat_id_uploadz'];
|
||||||
$folder = "pdf";
|
$folder = "pdf";
|
||||||
|
$baseURL = '../../../public/doc/';
|
||||||
|
$folder = 'kirim_surat/dok/';
|
||||||
|
|
||||||
// Cek apakah file yang diupload adalah PDF atau Dokumen Word
|
// Cek apakah file yang diupload adalah PDF atau Dokumen Word
|
||||||
$allowed_types = array(
|
$allowed_types = array(
|
||||||
@@ -21,7 +23,7 @@ if (!in_array($file_type, $allowed_types)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$tmp_name = $_FILES["input_load_cvz"]["tmp_name"];
|
$tmp_name = $_FILES["input_load_cvz"]["tmp_name"];
|
||||||
$name = $folder . "/" . $surat_id . "_" . $_FILES["input_load_cvz"]["name"];
|
$name = $baseURL.$folder . $surat_id . "_" . $_FILES["input_load_cvz"]["name"];
|
||||||
$name_pdf = $surat_id . "_" . $_FILES["input_load_cvz"]["name"];
|
$name_pdf = $surat_id . "_" . $_FILES["input_load_cvz"]["name"];
|
||||||
|
|
||||||
// Cek apakah file berhasil diupload
|
// Cek apakah file berhasil diupload
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ $surat_id = $_POST['surat_id'];
|
|||||||
?>
|
?>
|
||||||
<div class="col-sm-6 col-lg-3 col-md-4 webdesign illustrator">
|
<div class="col-sm-6 col-lg-3 col-md-4 webdesign illustrator">
|
||||||
<div class="gal-detail thumb">
|
<div class="gal-detail thumb">
|
||||||
<img name="pic" id="<?php echo $rdok['id']; ?>" src="<?php echo 'app/kirim/dok/' . $foto; ?>" class="img-thumbnail" alt="work-thumbnail">
|
<img name="pic" id="<?php echo $rdok['id']; ?>" src="<?='../../../public/doc/kirim_surat/img/' . $foto; ?>" class="img-thumbnail" alt="work-thumbnail">
|
||||||
<button type="button" name="dok_delete" style="height:22px;border-radius: 50%;" class="btn btn-danger btn-xs pull-right" id="<?php echo $rdok[0]; ?>" data-content="Hapus" rel="popover" data-placement="bottom" data-trigger="hover">
|
<button type="button" name="dok_delete" style="height:22px;border-radius: 50%;" class="btn btn-danger btn-xs pull-right" id="<?php echo $rdok[0]; ?>" data-content="Hapus" rel="popover" data-placement="bottom" data-trigger="hover">
|
||||||
<i class="fa fa-remove"></i>
|
<i class="fa fa-remove"></i>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -1,18 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
include("../koneksi.php");
|
include("../koneksi.php");
|
||||||
// $surat_id = $_POST['surat_id'];
|
|
||||||
// $folder = "dok";
|
|
||||||
|
|
||||||
// $tmp_name = $_FILES["file_dok"]["tmp_name"];
|
|
||||||
// $name = $folder . "/" . $surat_id . "_" . $_FILES["file_dok"]["name"];
|
|
||||||
// $name_ins = $surat_id . "_" . $_FILES["file_dok"]["name"];
|
|
||||||
// move_uploaded_file($tmp_name, $name);
|
|
||||||
// $input = pg_query($koneksi, "INSERT INTO scan (file,surat_id) VALUES ('$name_ins','$surat_id')");
|
|
||||||
// echo $surat_id;
|
|
||||||
|
|
||||||
|
|
||||||
$surat_id = $_POST['surat_id'];
|
$surat_id = $_POST['surat_id'];
|
||||||
$folder = "dok";
|
// $folder = "dok";
|
||||||
|
$baseURL = '../../public/doc/';
|
||||||
|
$folder = 'kirim_surat/img/';
|
||||||
|
|
||||||
// Allowed MIME types and extensions
|
// Allowed MIME types and extensions
|
||||||
$allowed_types = array('image/png', 'image/jpeg');
|
$allowed_types = array('image/png', 'image/jpeg');
|
||||||
@@ -27,7 +19,7 @@ $file_extension = pathinfo($file_name, PATHINFO_EXTENSION);
|
|||||||
// Validate the file type and extension
|
// Validate the file type and extension
|
||||||
if (in_array($file_type, $allowed_types) && in_array($file_extension, $allowed_extensions)) {
|
if (in_array($file_type, $allowed_types) && in_array($file_extension, $allowed_extensions)) {
|
||||||
// Define the new file path
|
// Define the new file path
|
||||||
$name = $folder . "/" . $surat_id . "_" . $file_name;
|
$name =$baseURL. $folder . $surat_id . "_" . $file_name;
|
||||||
$name_ins = $surat_id . "_" . $file_name;
|
$name_ins = $surat_id . "_" . $file_name;
|
||||||
|
|
||||||
// Move the uploaded file
|
// Move the uploaded file
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
include('../../koneksi.php');
|
include('../../koneksi.php');
|
||||||
|
|
||||||
|
|
||||||
$key = isset($_POST['key']) ? $_POST['key'] : 'gagal';
|
$key = isset($_POST['key']) ? $_POST['key'] : 'gagal';
|
||||||
switch ($key) {
|
switch ($key) {
|
||||||
case 'simpan_naskah':
|
case 'simpan_naskah':
|
||||||
@@ -22,11 +21,13 @@ switch ($key) {
|
|||||||
$file_size = $_FILES["file_naskah"]["size"];
|
$file_size = $_FILES["file_naskah"]["size"];
|
||||||
$max_size = 1087152; // max 1Mb
|
$max_size = 1087152; // max 1Mb
|
||||||
if (!in_array($file_type, $allowed_types)) {
|
if (!in_array($file_type, $allowed_types)) {
|
||||||
|
http_response_code(400);
|
||||||
$response = array('icon' => 'error', 'message' => 'File tidak diizinkan. <br> Hanya PDF, Word, Excel size max 1 Mb yang diperbolehkan.');
|
$response = array('icon' => 'error', 'message' => 'File tidak diizinkan. <br> Hanya PDF, Word, Excel size max 1 Mb yang diperbolehkan.');
|
||||||
echo json_encode($response);
|
echo json_encode($response);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
if ($file_size > $max_size) {
|
if ($file_size > $max_size) {
|
||||||
|
http_response_code(400);
|
||||||
$response = array('icon' => 'error', 'message' => 'File yang diupload terlalu besar. Ukuran maksimum adalah 1MB.');
|
$response = array('icon' => 'error', 'message' => 'File yang diupload terlalu besar. Ukuran maksimum adalah 1MB.');
|
||||||
echo json_encode($response);
|
echo json_encode($response);
|
||||||
exit;
|
exit;
|
||||||
@@ -38,24 +39,26 @@ switch ($key) {
|
|||||||
$name_pdf = null;
|
$name_pdf = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$find = pg_fetch_assoc(pg_query($koneksi, "SELECT id FROM naskah_dinas WHERE id = $id"));
|
$find = pg_fetch_assoc(pg_query($koneksi, "SELECT id FROM tmplt_naskah_dinas WHERE id = $id"));
|
||||||
if (!$find) {
|
if (!$find) {
|
||||||
$get_id = pg_fetch_assoc(pg_query($koneksi, "SELECT COALESCE(MAX(id), 0) + 1 AS id FROM naskah_dinas;"));
|
$get_id = pg_fetch_assoc(pg_query($koneksi, "SELECT COALESCE(MAX(id), 0) + 1 AS id FROM tmplt_naskah_dinas;"));
|
||||||
$new_id = (int)$get_id['id'];
|
$new_id = (int)$get_id['id'];
|
||||||
|
|
||||||
if ($name_pdf && !move_uploaded_file($tmp_name, $name)) {
|
if ($name_pdf && !move_uploaded_file($tmp_name, $name)) {
|
||||||
|
http_response_code(400);
|
||||||
$response = array('icon' => 'error', 'message' => 'Gagal upload file.');
|
$response = array('icon' => 'error', 'message' => 'Gagal upload file.');
|
||||||
echo json_encode($response);
|
echo json_encode($response);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$ins = pg_query_params($koneksi, "INSERT INTO naskah_dinas (id, keterangan, status, nama_file) VALUES($1, $2, $3, $4)", array($new_id, $nm_file, 1, $name_pdf));
|
$ins = pg_query_params($koneksi, "INSERT INTO tmplt_naskah_dinas (id, keterangan, status, nama_file) VALUES($1, $2, $3, $4)", array($new_id, $nm_file, 1, $name_pdf));
|
||||||
if (!$ins) {
|
if (!$ins) {
|
||||||
|
http_response_code(400);
|
||||||
$response = array('icon' => 'error', 'message' => 'Gagal insert data ke database.');
|
$response = array('icon' => 'error', 'message' => 'Gagal insert data ke database.');
|
||||||
echo json_encode($response);
|
echo json_encode($response);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
http_response_code(200);
|
||||||
$response = array('icon' => 'success', 'message' => 'File berhasil diupload dan disimpan ke database.');
|
$response = array('icon' => 'success', 'message' => 'File berhasil diupload dan disimpan ke database.');
|
||||||
} else {
|
} else {
|
||||||
$update_fields = "keterangan = $1";
|
$update_fields = "keterangan = $1";
|
||||||
@@ -64,6 +67,7 @@ switch ($key) {
|
|||||||
|
|
||||||
if ($name_pdf) {
|
if ($name_pdf) {
|
||||||
if (!move_uploaded_file($tmp_name, $name)) {
|
if (!move_uploaded_file($tmp_name, $name)) {
|
||||||
|
http_response_code(400);
|
||||||
$response = array('icon' => 'error', 'message' => 'Gagal upload file.');
|
$response = array('icon' => 'error', 'message' => 'Gagal upload file.');
|
||||||
echo json_encode($response);
|
echo json_encode($response);
|
||||||
exit;
|
exit;
|
||||||
@@ -73,16 +77,16 @@ switch ($key) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$params[] = $id;
|
$params[] = $id;
|
||||||
$updt = pg_query_params($koneksi, "UPDATE naskah_dinas SET $update_fields WHERE id = $" . $param_index, $params);
|
$updt = pg_query_params($koneksi, "UPDATE tmplt_naskah_dinas SET $update_fields WHERE id = $" . $param_index, $params);
|
||||||
if (!$updt) {
|
if (!$updt) {
|
||||||
|
http_response_code(400);
|
||||||
$response = array('icon' => 'error', 'message' => 'Gagal update data di database.');
|
$response = array('icon' => 'error', 'message' => 'Gagal update data di database.');
|
||||||
echo json_encode($response);
|
echo json_encode($response);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
http_response_code(200);
|
||||||
$response = array('icon' => 'success', 'message' => 'Data berhasil diperbarui.');
|
$response = array('icon' => 'success', 'message' => 'Data berhasil diperbarui.');
|
||||||
}
|
}
|
||||||
|
|
||||||
echo json_encode($response);
|
echo json_encode($response);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -91,25 +95,33 @@ switch ($key) {
|
|||||||
$dir = "../../../public/doc/master/";
|
$dir = "../../../public/doc/master/";
|
||||||
|
|
||||||
// Mendapatkan nama file dari database berdasarkan id
|
// Mendapatkan nama file dari database berdasarkan id
|
||||||
$query = pg_query_params($koneksi, "SELECT nama_file FROM naskah_dinas WHERE id = $1", array($id_));
|
$query = pg_query_params($koneksi, "SELECT nama_file FROM tmplt_naskah_dinas WHERE id = $1", array($id_));
|
||||||
$result = pg_fetch_assoc($query);
|
$result = pg_fetch_assoc($query);
|
||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
// Mengupdate nilai nama_file di database menjadi kosong
|
// Mengupdate nilai nama_file di database menjadi kosong
|
||||||
$path = $dir."template_naskah/" . $result['nama_file'];
|
$path = $dir . "template_naskah/" . $result['nama_file'];
|
||||||
if (file_exists($path)) {
|
if (file_exists($path)) {
|
||||||
// Mencoba menghapus file dari sistem file
|
// Mencoba menghapus file dari sistem file
|
||||||
if (unlink($path)) {
|
if (unlink($path)) {
|
||||||
pg_query_params($koneksi, "UPDATE naskah_dinas SET nama_file = '' WHERE id = $1", array($id_));
|
pg_query_params($koneksi, "UPDATE tmplt_naskah_dinas SET nama_file = '' WHERE id = $1", array($id_));
|
||||||
|
http_response_code(200);
|
||||||
echo json_encode(['icon' => 'success', 'message' => 'File telah dihapus.']);
|
echo json_encode(['icon' => 'success', 'message' => 'File telah dihapus.']);
|
||||||
|
exit;
|
||||||
} else {
|
} else {
|
||||||
|
http_response_code(400);
|
||||||
echo json_encode(['icon' => 'error', 'message' => 'Gagal menghapus file.']);
|
echo json_encode(['icon' => 'error', 'message' => 'Gagal menghapus file.']);
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
http_response_code(400);
|
||||||
echo json_encode(['icon' => 'error', 'message' => 'File tidak ditemukan.']);
|
echo json_encode(['icon' => 'error', 'message' => 'File tidak ditemukan.']);
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
http_response_code(400);
|
||||||
echo json_encode(['icon' => 'error', 'message' => 'Data tidak ditemukan.']);
|
echo json_encode(['icon' => 'error', 'message' => 'Data tidak ditemukan.']);
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -25,11 +25,8 @@ $(document).on("click", "#tmbh_naskah", function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
$("#simpan_naskah").click(function () {
|
$("#simpan_naskah").click(function () {
|
||||||
// var id = ($('#id_naskah').val() == '0') ? 0 : $('#id_naskah').val();
|
|
||||||
var formData = new FormData($('#form_naskah')[0]);
|
var formData = new FormData($('#form_naskah')[0]);
|
||||||
|
|
||||||
// Append data to formData
|
|
||||||
// formData.append('id',id);
|
|
||||||
formData.append('id',$('#naskah_id').val());
|
formData.append('id',$('#naskah_id').val());
|
||||||
formData.append('nama', $('#nama_file').val());
|
formData.append('nama', $('#nama_file').val());
|
||||||
formData.append('file_naskah', $('#file_naskah')[0].files[0]);
|
formData.append('file_naskah', $('#file_naskah')[0].files[0]);
|
||||||
@@ -55,28 +52,6 @@ $("#simpan_naskah").click(function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// $('button[name="edit_naskah"]').click(function () {
|
|
||||||
// var id = $(this).data('id'); // Mengambil ID dari atribut data-id
|
|
||||||
|
|
||||||
// $.ajax({
|
|
||||||
// type: 'POST',
|
|
||||||
// url: '"app/master/naskah_dinas/controller.php', // Ganti dengan URL yang sesuai
|
|
||||||
// data: { id: id },
|
|
||||||
// success: function (response) {
|
|
||||||
// // Lakukan sesuatu dengan respon dari server
|
|
||||||
// // Misalnya, memperbarui modal dengan data yang diambil
|
|
||||||
// $('#modal-body').html(response);
|
|
||||||
// $('#editModal').modal('show');
|
|
||||||
// },
|
|
||||||
// error: function (xhr, status, error) {
|
|
||||||
// console.error('AJAX request failed:', status, error);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// });
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function infoToast(icone, infone) {
|
function infoToast(icone, infone) {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
// position: posisine,
|
// position: posisine,
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
include('../../koneksi.php');
|
include('../../koneksi.php');
|
||||||
$id = $_POST['id'];
|
$id = $_POST['id'];
|
||||||
$data = pg_query($koneksi, "SELECT * FROM naskah_dinas WHERE id=$id");
|
$data = pg_query($koneksi, "SELECT * FROM tmplt_naskah_dinas WHERE id=$id");
|
||||||
|
$URL = '../../../public/doc/master/template_naskah/';
|
||||||
while ($row = pg_fetch_assoc($data)) {
|
while ($row = pg_fetch_assoc($data)) {
|
||||||
$id = $row['id'];
|
$id = $row['id'];
|
||||||
$keterangan = $row['keterangan'];
|
$keterangan = $row['keterangan'];
|
||||||
@@ -18,7 +19,7 @@ while ($row = pg_fetch_assoc($data)) {
|
|||||||
<label for="file_naskah">Files</label>
|
<label for="file_naskah">Files</label>
|
||||||
<input type="file" id="file_naskah" name="file_naskah" required multiple />
|
<input type="file" id="file_naskah" name="file_naskah" required multiple />
|
||||||
<div class="thumb" style="background-color:#ece9d8;padding:8px;margin-top:6px;display: <?php echo ($nama_file != '') ? 'block' : 'none' ?>;">
|
<div class="thumb" style="background-color:#ece9d8;padding:8px;margin-top:6px;display: <?php echo ($nama_file != '') ? 'block' : 'none' ?>;">
|
||||||
<a href='app/master/naskah_dinas/template_naskah/<?php echo $nama_file; ?>' target='_blank' nm_file='<?= $nama_file ?>'><?php echo $nama_file; ?></a>
|
<a href='<?php echo $URL . $nama_file; ?>' target='_blank' nm_file='<?= $nama_file ?>'><?php echo $nama_file; ?></a>
|
||||||
<button type="button" name="del_file" style="height:22px;border-radius: 50%" class="btn btn-danger btn-xs pull-right" id="<?php echo $rdata_pdf[1]; ?>" data-content="Hapus" rel="popover" data-placement="bottom" data-trigger="hover">
|
<button type="button" name="del_file" style="height:22px;border-radius: 50%" class="btn btn-danger btn-xs pull-right" id="<?php echo $rdata_pdf[1]; ?>" data-content="Hapus" rel="popover" data-placement="bottom" data-trigger="hover">
|
||||||
<i class="fa fa-remove"></i>
|
<i class="fa fa-remove"></i>
|
||||||
</button>
|
</button>
|
||||||
@@ -27,24 +28,26 @@ while ($row = pg_fetch_assoc($data)) {
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
$('button[name="del_file"]').click(function() {
|
$('button[name="del_file"]').click(function() {
|
||||||
var id = $('#naskah_id').val();
|
var id = $('#naskah_id').val();
|
||||||
var aElement = $(this).siblings('a');
|
var aElement = $(this).siblings('a');
|
||||||
var nm_file = aElement.attr('nm_file');
|
var nm_file = aElement.attr('nm_file');
|
||||||
console.log(nm_file)
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: 'app/master/naskah_dinas/controller.php',
|
url: 'app/master/naskah_dinas/controller.php',
|
||||||
data: {
|
data: {
|
||||||
id: id,
|
id: id,
|
||||||
// nm_file:nm_file,
|
|
||||||
key: 'hapus_file'
|
key: 'hapus_file'
|
||||||
},
|
},
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
var result = JSON.parse(response);
|
var result = JSON.parse(response);
|
||||||
infoToast(result.icon, result.message);
|
infoToast(result.icon, result.message);
|
||||||
$('.thumb').hide();
|
$('.thumb').hide();
|
||||||
|
|
||||||
|
},
|
||||||
|
error: function(xhr) {
|
||||||
|
var result = JSON.parse(xhr.responseText);
|
||||||
|
infoToast(result.icon, result.message)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ include('../../koneksi.php');
|
|||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
$nomer = 1;
|
$nomer = 1;
|
||||||
$data = pg_query($koneksi, "SELECT * FROM naskah_dinas");
|
$data = pg_query($koneksi, "SELECT * FROM tmplt_naskah_dinas");
|
||||||
while ($row = pg_fetch_array($data)) {
|
while ($row = pg_fetch_array($data)) {
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
+142
-196
@@ -1,205 +1,151 @@
|
|||||||
<?php
|
<?php
|
||||||
include('../koneksi.php');
|
include('../koneksi.php');
|
||||||
$key=$_POST['key'];
|
$key = $_POST['key'];
|
||||||
if ($key=='simpan_sm') {
|
switch ($key) {
|
||||||
$jenis_disposisi=$_POST['jenis_disposisi'];
|
case 'simpan_sm':
|
||||||
$id=$_POST['id'];
|
$jenis_disposisi = $_POST['jenis_disposisi'];
|
||||||
$jenis_disposisi_id=$_POST['jenis_disposisi_id'];
|
$id = (int)$_POST['id'];
|
||||||
$no_surat=$_POST['no_surat'];
|
$jenis_disposisi_id = (int)$_POST['jenis_disposisi_id'];
|
||||||
|
$no_surat = $_POST['no_surat'];
|
||||||
|
|
||||||
|
$tgl_surat_masuk = $_POST['tgl_surat_masuk'];
|
||||||
|
$tgl_surat_masuk = str_replace('/', '-', $tgl_surat_masuk);
|
||||||
|
$t = date('Y', strtotime($tgl_surat_masuk));
|
||||||
|
$b = date('m', strtotime($tgl_surat_masuk));
|
||||||
|
$h = date('d', strtotime($tgl_surat_masuk));
|
||||||
|
|
||||||
$tgl_surat_masuk=$_POST['tgl_surat_masuk'];
|
//$no_agenda=$_POST['no_agenda'];
|
||||||
$tgl_surat_masuk=str_replace('/','-',$tgl_surat_masuk);
|
$untuk = $_POST['untuk'];
|
||||||
$t=date('Y',strtotime($tgl_surat_masuk));
|
//$no_kendali=$_POST['no_kendali'];
|
||||||
$b=date('m',strtotime($tgl_surat_masuk));
|
$surat_dari = $_POST['surat_dari'];
|
||||||
$h=date('d',strtotime($tgl_surat_masuk));
|
$sifat_surat_id = (int)$_POST['sifat_surat_id'];
|
||||||
|
$lampiran = $_POST['lampiran'];
|
||||||
|
$perihal = $_POST['perihal'];
|
||||||
|
$satuan_kerja_id = (int)$_POST['satuan_kerja_id'];
|
||||||
|
$kode_id = (int)$_POST['kode_id'];
|
||||||
|
$satuan_kerja_dari = (int) $_POST['satuan_kerja_dari'];
|
||||||
|
$thn_skrg = date('Y');
|
||||||
|
|
||||||
//$no_agenda=$_POST['no_agenda'];
|
switch ($jenis_disposisi) {
|
||||||
$untuk=$_POST['untuk'];
|
case 'Disposisi':
|
||||||
//$no_kendali=$_POST['no_kendali'];
|
$cek = pg_query($koneksi, "SELECT COUNT(id) AS id_count FROM surat WHERE id='$id'");
|
||||||
$surat_dari=$_POST['surat_dari'];
|
$j = pg_fetch_result($cek, 0, 'id_count');
|
||||||
$sifat_surat_id=$_POST['sifat_surat_id'];
|
|
||||||
$lampiran=$_POST['lampiran'];
|
|
||||||
$perihal=$_POST['perihal'];
|
|
||||||
$satuan_kerja_id=$_POST['satuan_kerja_id'];
|
|
||||||
$kode_id=$_POST['kode_id'];
|
|
||||||
$satuan_kerja_dari=$_POST['satuan_kerja_dari'];
|
|
||||||
$thn_skrg=date('Y');
|
|
||||||
if ($jenis_disposisi=='Disposisi') {
|
|
||||||
$cek=pg_query("SELECT COUNT(id) FROM surat WHERE id='$id'");
|
|
||||||
while($rcek=pg_fetch_array($cek)) {$j=$rcek[0];}
|
|
||||||
if ($j>0) {
|
|
||||||
$upd=pg_query("UPDATE surat SET kode_id='$kode_id',tgl_surat_masuk='$t-$b-$h', perihal='$perihal',
|
|
||||||
surat_dari='$surat_dari', sifat_surat_id='$sifat_surat_id', no_surat='$no_surat' WHERE id='$id'");
|
|
||||||
echo $id;
|
|
||||||
} else {
|
|
||||||
/*$urut=pg_query("SELECT COALESCE(MAX(no_urut),0) FROM surat WHERE date_part('YEAR', tgl_diterima)='$thn_skrg' AND jenis_disposisi_id='$jenis_disposisi_id'
|
|
||||||
AND satuan_kerja_id IS NOT NULL"); */
|
|
||||||
$urut=pg_query("SELECT DISTINCT COALESCE(MAX(s.no_urut),0)
|
|
||||||
FROM surat s
|
|
||||||
LEFT OUTER JOIN kirim k ON (s.id=k.surat_id)
|
|
||||||
LEFT OUTER JOIN arsip a ON (a.surat_id=s.id)
|
|
||||||
WHERE k.satuan_kerja_tujuan='66' AND a.id IS NULL
|
|
||||||
AND s.jenis_disposisi_id='1' AND date_part('YEAR', s.tgl_diterima)='$thn_skrg'");
|
|
||||||
while($rurut=pg_fetch_array($urut)) {$no_urut=$rurut[0]+1;}
|
|
||||||
$no_agenda=$no_urut;
|
|
||||||
|
|
||||||
/*cek no surat*/
|
if ($j > 0) {
|
||||||
//$cek1=pg_query("SELECT COUNT(id) FROM surat WHERE no_surat='$no_surat' AND no_surat <> ''");
|
$upd = pg_query($koneksi, "UPDATE surat SET kode_id='$kode_id',tgl_surat_masuk='$t-$b-$h', perihal='$perihal',
|
||||||
$cek1=pg_query("SELECT COUNT(id) FROM surat WHERE no_surat='$no_surat' AND no_surat NOT IN ('','/') AND jenis_surat_id=4 AND jenis_disposisi_id=1");
|
surat_dari='$surat_dari', sifat_surat_id='$sifat_surat_id', no_surat='$no_surat' WHERE id='$id'");
|
||||||
while($rcek1=pg_fetch_array($cek1)) {$j1=$rcek1[0];}
|
http_response_code(200);
|
||||||
if ($j1>0) {echo "salah";} else {
|
echo json_encode(['data' => ['id' => $id], 'icon' => 'success', 'message' => 'Disposisi Berhasil diubah']);
|
||||||
$ins = pg_query("INSERT into surat (
|
} else {
|
||||||
no_surat,
|
$query_urut = "SELECT DISTINCT COALESCE(MAX(s.no_urut), 0) + 1 AS no_urut
|
||||||
tgl_surat_masuk,
|
FROM surat s
|
||||||
tgl_diterima,
|
LEFT JOIN kirim k ON s.id = k.surat_id
|
||||||
jam_diterima,
|
LEFT JOIN arsip a ON a.surat_id = s.id
|
||||||
no_agenda,
|
WHERE k.satuan_kerja_tujuan = '66'
|
||||||
perihal,
|
AND a.id IS NULL
|
||||||
surat_dari,
|
AND s.jenis_disposisi_id = '1'
|
||||||
jenis_disposisi_id,
|
AND date_part('YEAR', s.tgl_diterima) = $1";
|
||||||
satuan_kerja_id,
|
|
||||||
jenis_surat_id,
|
|
||||||
no_urut,
|
|
||||||
kode_id,
|
|
||||||
sifat_surat_id
|
|
||||||
) values(
|
|
||||||
'$no_surat',
|
|
||||||
'$t-$b-$h',
|
|
||||||
NOW(),
|
|
||||||
NOW(),
|
|
||||||
'$no_agenda',
|
|
||||||
'$perihal',
|
|
||||||
'$surat_dari',
|
|
||||||
'1',
|
|
||||||
'$satuan_kerja_id',
|
|
||||||
'4',
|
|
||||||
'$no_urut',
|
|
||||||
'$kode_id',
|
|
||||||
'$sifat_surat_id'
|
|
||||||
)
|
|
||||||
");
|
|
||||||
$cek_id=pg_query("SELECT MAX(id) FROM surat");
|
|
||||||
while($rc=pg_fetch_array($cek_id)) {$sud=$rc[0];}
|
|
||||||
$ins_dis=pg_query("INSERT INTO kirim (
|
|
||||||
surat_id,
|
|
||||||
tgl_input,
|
|
||||||
jam_input,
|
|
||||||
satuan_kerja_tujuan,
|
|
||||||
satuan_kerja_penginput
|
|
||||||
) VALUES (
|
|
||||||
'$sud',
|
|
||||||
NOW(),
|
|
||||||
NOW(),
|
|
||||||
'$satuan_kerja_id',
|
|
||||||
'$satuan_kerja_id'
|
|
||||||
)");
|
|
||||||
echo $sud;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
if ($jenis_disposisi=='Kendali Surat') {
|
|
||||||
|
|
||||||
$cek=pg_query("SELECT COUNT(id) FROM surat WHERE id='$id'");
|
$result_urut = pg_query_params($koneksi, $query_urut, array($thn_skrg));
|
||||||
while($rcek=pg_fetch_array($cek)) {$j=$rcek[0];}
|
$rurut = pg_fetch_assoc($result_urut);
|
||||||
if ($j>0) {
|
$no_urut = $rurut['no_urut'];
|
||||||
$upd=pg_query("UPDATE surat SET satuan_kerja_dari='$satuan_kerja_dari', sifat_surat_id='$sifat_surat_id', lampiran='$lampiran', perihal='$perihal' WHERE id='$id'");
|
$no_agenda = $no_urut;
|
||||||
echo $id;
|
|
||||||
} else {
|
|
||||||
|
|
||||||
$kendali=pg_query("SELECT COALESCE(MAX(no_kendali),0) FROM surat WHERE date_part('YEAR', tgl_diterima)='$thn_skrg' AND jenis_disposisi_id='$jenis_disposisi_id'");
|
$query_cek1 = "SELECT COUNT(id) AS count
|
||||||
while($rkendali=pg_fetch_array($kendali)) {$no_kendali=$rkendali[0]+1;}
|
FROM surat
|
||||||
$ins = pg_query("INSERT into surat (
|
WHERE no_surat = $1
|
||||||
satuan_kerja_dari,
|
AND no_surat NOT IN ('', '/')
|
||||||
sifat_surat_id,
|
AND jenis_surat_id = 4
|
||||||
lampiran,
|
AND jenis_disposisi_id = 1";
|
||||||
perihal,
|
|
||||||
tgl_diterima,
|
$result_cek1 = pg_query_params($koneksi, $query_cek1, array($no_surat));
|
||||||
jam_diterima,
|
$rcek1 = pg_fetch_assoc($result_cek1);
|
||||||
jenis_disposisi_id,
|
$j1 = (int)$rcek1['count'];
|
||||||
satuan_kerja_id,
|
|
||||||
jenis_surat_id,
|
if ($j1 > 0) {
|
||||||
no_kendali
|
http_response_code(400);
|
||||||
) values(
|
echo json_encode(['data' => ['id' => null], 'icon' => 'error', 'message' => 'No Surat Sudah pernah Digunakan..!!']);
|
||||||
'$satuan_kerja_dari',
|
exit;
|
||||||
'$sifat_surat_id',
|
} else {
|
||||||
'$lampiran',
|
$query_ins = "INSERT INTO surat (no_surat, tgl_surat_masuk, tgl_diterima, jam_diterima, no_agenda, perihal, surat_dari, jenis_disposisi_id, satuan_kerja_id, jenis_surat_id, no_urut, kode_id, sifat_surat_id)
|
||||||
'$perihal',
|
VALUES ($1, $2, NOW(), NOW(), $3, $4, $5, '1', $6, '4', $7, $8, $9)";
|
||||||
NOW(),
|
pg_query_params($koneksi, $query_ins, array($no_surat, "$t-$b-$h", $no_agenda, $perihal, $surat_dari, $satuan_kerja_id, $no_urut, $kode_id, $sifat_surat_id));
|
||||||
NOW(),
|
|
||||||
'2',
|
$query_cek_id = "SELECT MAX(id) AS id FROM surat";
|
||||||
'$satuan_kerja_id',
|
$result_cek_id = pg_query($koneksi, $query_cek_id);
|
||||||
'4',
|
$rc = pg_fetch_assoc($result_cek_id);
|
||||||
'$no_kendali'
|
$sud = $rc['id'];
|
||||||
)
|
|
||||||
");
|
$query_ins_dis = "INSERT INTO kirim (surat_id, tgl_input, jam_input, satuan_kerja_tujuan, satuan_kerja_penginput)
|
||||||
$cek_id=pg_query("SELECT MAX(id) FROM surat");
|
VALUES ($1, NOW(), NOW(), $2, $2)";
|
||||||
while($rc=pg_fetch_array($cek_id)) {$sud=$rc[0];}
|
pg_query_params($koneksi, $query_ins_dis, array($sud, $satuan_kerja_id));
|
||||||
$ins_dis=pg_query("INSERT INTO kirim (
|
|
||||||
surat_id,
|
http_response_code(200);
|
||||||
tgl_input,
|
echo json_encode(['data' => ['id' => $sud], 'icon' => 'success', 'message' => 'Surat Disposisi berhasil disimpan.']);
|
||||||
jam_input,
|
}
|
||||||
satuan_kerja_tujuan,
|
}
|
||||||
satuan_kerja_penginput
|
break;
|
||||||
) VALUES (
|
|
||||||
'$sud',
|
case 'Kendali Surat':
|
||||||
NOW(),
|
$cek = pg_query($koneksi, "SELECT COUNT(id) FROM surat WHERE id=$id");
|
||||||
NOW(),
|
$j = pg_fetch_result($cek, 0, 0);
|
||||||
'$satuan_kerja_id',
|
// var_dump($satuan_kerja_dari);die();
|
||||||
'$satuan_kerja_id'
|
if ($j > 0) {
|
||||||
)");
|
$upd = pg_query($koneksi, "UPDATE surat SET satuan_kerja_dari=$satuan_kerja_dari, sifat_surat_id=$sifat_surat_id, lampiran='$lampiran', perihal='$perihal' WHERE id=$id");
|
||||||
echo $sud;
|
http_response_code(200);
|
||||||
}
|
echo json_encode(['data' => ['id' => $id], 'icon' => 'success', 'message' => 'Data Berhasil Diupdate']);
|
||||||
} else
|
} else {
|
||||||
if ($jenis_disposisi=='Biasa') {
|
$kendali = pg_query($koneksi, "SELECT COALESCE(MAX(no_kendali), 0) + 1
|
||||||
$cek=pg_query("SELECT id FROM surat WHERE id='$id'");
|
FROM surat
|
||||||
$row_cek = pg_fetch_row($cek);
|
WHERE date_part('YEAR', tgl_diterima)='$thn_skrg'
|
||||||
if ($row_cek[0] > 0) {
|
AND jenis_disposisi_id=$jenis_disposisi_id");
|
||||||
$upd = pg_query("UPDATE surat SET
|
$no_kendali = pg_fetch_result($kendali, 0, 0);
|
||||||
surat_dari='$surat_dari',
|
|
||||||
tgl_surat_masuk='$t-$b-$h'
|
$ins = pg_query($koneksi, "INSERT INTO surat (satuan_kerja_dari, sifat_surat_id, lampiran,perihal, tgl_diterima, jam_diterima, jenis_disposisi_id, satuan_kerja_id, jenis_surat_id, no_kendali )
|
||||||
no_surat='$no_surat',
|
VALUES($satuan_kerja_dari, $sifat_surat_id, '$lampiran', '$perihal', NOW(), NOW(), '2', $satuan_kerja_id, '4', '$no_kendali' )
|
||||||
lampiran='$lampiran',
|
");
|
||||||
perihal='$perihal',
|
$cek_id = pg_query($koneksi, "SELECT MAX(id) FROM surat");
|
||||||
no_agenda='$no_agenda',
|
$sud = pg_fetch_result($cek_id, 0, 0);
|
||||||
untuk='$untuk'
|
|
||||||
WHERE id='$id'");
|
$ins_dis = pg_query($koneksi, "INSERT INTO kirim (surat_id, tgl_input, jam_input, satuan_kerja_tujuan, satuan_kerja_penginput )
|
||||||
} else {
|
VALUES ('$sud', NOW(), NOW(), $satuan_kerja_id, $satuan_kerja_id)");
|
||||||
$ins = pg_query("INSERT into surat (
|
// echo $sud;
|
||||||
surat_dari,
|
http_response_code(200);
|
||||||
tgl_surat_masuk,
|
echo json_encode(['data' => ['id' => $sud], 'icon' => 'success', 'message' => 'Lembar Kendali Berhasil Disimpan.']);
|
||||||
no_surat,
|
}
|
||||||
lampiran,
|
break;
|
||||||
perihal,
|
case 'Biasa':
|
||||||
no_agenda,
|
$cek = pg_query($koneksi, "SELECT id FROM surat WHERE id='$id'");
|
||||||
untuk,
|
$row_cek = pg_fetch_row($cek);
|
||||||
tgl_diterima,
|
if ($row_cek[0] > 0) {
|
||||||
jam_diterima,
|
$upd = pg_query($koneksi, "UPDATE surat SET
|
||||||
jenis_disposisi_id,
|
surat_dari='$surat_dari',
|
||||||
satuan_kerja_id,
|
tgl_surat_masuk='$t-$b-$h'
|
||||||
jenis_surat_id
|
no_surat='$no_surat',
|
||||||
) values(
|
lampiran='$lampiran',
|
||||||
'$surat_dari',
|
perihal='$perihal',
|
||||||
'$t-$b-$h',
|
no_agenda='$no_agenda',
|
||||||
'$no_surat',
|
untuk='$untuk'
|
||||||
'$lampiran',
|
WHERE id='$id'
|
||||||
'$perihal',
|
");
|
||||||
'$no_agenda',
|
} else {
|
||||||
'$untuk',
|
$ins = pg_query($koneksi, "INSERT into surat (surat_dari, tgl_surat_masuk, no_surat, lampiran, perihal, no_agenda, untuk, tgl_diterima, jam_diterima, jenis_disposisi_id, satuan_kerja_id, jenis_surat_id )
|
||||||
NOW(),
|
values('$surat_dari', '$t-$b-$h', '$no_surat', '$lampiran', '$perihal', '$no_agenda', '$untuk', NOW(), NOW(), '3', '$satuan_kerja_id', '4' ) ");
|
||||||
NOW(),
|
}
|
||||||
'3',
|
break;
|
||||||
'$satuan_kerja_id',
|
}
|
||||||
'4'
|
break;
|
||||||
)
|
|
||||||
");
|
case 'cek_no':
|
||||||
}
|
$no_surat = $_POST['no_surat'];
|
||||||
|
$d = pg_query($koneksi, "SELECT surat_dari,lampiran,perihal,tgl_surat_masuk,id FROM surat WHERE no_surat='$no_surat'");
|
||||||
|
while ($rd = pg_fetch_array($d)) {
|
||||||
|
$surat_dari = $rd[0];
|
||||||
|
$lampiran = $rd[1];
|
||||||
|
$perihal = $rd[2];
|
||||||
|
$tgl_surat = $rd[3];
|
||||||
|
$surat_id = $rd[4];
|
||||||
|
}
|
||||||
|
echo $surat_dari . '$%^' . $lampiran . '$%^' . $perihal . '$%^' . date('d-m-Y', strtotime($tgl_surat)) . '$%^' . $surat_id;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
} else
|
|
||||||
if ($key=='cek_no') {
|
|
||||||
$no_surat=$_POST['no_surat'];
|
|
||||||
$d=pg_query("SELECT surat_dari,lampiran,perihal,tgl_surat_masuk,id FROM surat WHERE no_surat='$no_surat'");
|
|
||||||
while($rd=pg_fetch_array($d)) {$surat_dari=$rd[0];$lampiran=$rd[1];$perihal=$rd[2];$tgl_surat=$rd[3];$surat_id=$rd[4];}
|
|
||||||
echo $surat_dari.'$%^'.$lampiran.'$%^'.$perihal.'$%^'.date('d-m-Y',strtotime($tgl_surat)).'$%^'.$surat_id;
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
@@ -0,0 +1,258 @@
|
|||||||
|
function angka(e) {
|
||||||
|
if (!/^[0-9\.,()-/\a-zA-Z \b]+$/.test(e.value)) {
|
||||||
|
e.value = e.value.substring(0, e.value.length - 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$("#surat_dari, #perihal, #no_surat").keyup(function () {
|
||||||
|
angka(this);
|
||||||
|
});
|
||||||
|
|
||||||
|
$.post('app/smasuk/upload.php', function (html) {
|
||||||
|
$("#isi_upload").html(html)
|
||||||
|
});
|
||||||
|
|
||||||
|
var surat_id = $('#surat_idc').val();
|
||||||
|
|
||||||
|
if ((surat_id == '') || (surat_id == null)) {
|
||||||
|
$('#simpan_sm').hide();
|
||||||
|
} else {
|
||||||
|
$('#simpan_sm').show();
|
||||||
|
}
|
||||||
|
$('.in_upl').hide();
|
||||||
|
$('.sm-no_agenda').hide();
|
||||||
|
|
||||||
|
$('#jenis_disposisi_id, #jenis_disposisi').change(function () {
|
||||||
|
var b = $('#jenis_disposisi').val();
|
||||||
|
var a = $('#jenis_disposisi_id').find('option:selected').text();
|
||||||
|
|
||||||
|
if (b === 'Disposisi' || a === 'Disposisi') {
|
||||||
|
$('.sm-no_surat, .sm-tgl_surat, .sm-no_agenda, .sm-surat_dari, .sm-perihal').show();
|
||||||
|
$('.sm-untuk, .sm-sifat_surat, .sm-lampiran, .sm-tgl_arsip').hide();
|
||||||
|
} else if (b === 'Kendali Surat' || a === 'Kendali Surat') {
|
||||||
|
$('.sm-surat_dari, .sm-sifat_surat, .sm-lampiran, .sm-perihal').show();
|
||||||
|
$('.sm-no_surat, .sm-tgl_surat, .sm-no_agenda, .sm-untuk, .sm-tgl_arsip').hide();
|
||||||
|
} else if (b === 'Biasa' || a === 'Biasa') {
|
||||||
|
$('.sm-no_surat, .sm-tgl_surat, .sm-no_agenda, .sm-untuk, .sm-surat_dari, .sm-perihal, .sm-tgl_arsip').show();
|
||||||
|
$('.sm-sifat_surat, .sm-lampiran').hide();
|
||||||
|
} else {
|
||||||
|
$('.in_scan, #modal_footer_sm, .sm-no_surat, .sm-tgl_surat, .sm-surat_dari, .sm-no_agenda, .sm-untuk, .sm-sifat_surat, .sm-lampiran, .sm-perihal, .sm-tgl_arsip').hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#surat_id').val('0');
|
||||||
|
// $('#no_surat, #tgl_surat_masuk, #no_agenda, #untuk, #no_kendali, #surat_dari, #sifat_surat_id, #lampiran, #perihal').val('');
|
||||||
|
$('.sm-no_agenda').hide();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Initial state check
|
||||||
|
$('#jenis_disposisi').trigger('change');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function print_kendali() {
|
||||||
|
var ssnama = $('#ssnama').val();
|
||||||
|
var surat_id = $('#surat_id_upload').val();
|
||||||
|
var w = 1000;
|
||||||
|
var h = 800;
|
||||||
|
var left = Number((screen.width / 2) - (w / 2));
|
||||||
|
var tops = Number((screen.height / 2) - (h / 2));
|
||||||
|
$.post('app/smasuk/print_kendali.php', {
|
||||||
|
surat_id: surat_id,
|
||||||
|
nampeg: ssnama
|
||||||
|
}, function (result) {
|
||||||
|
WinId = window.open('', 'newwin', 'toolbar=no, location=no, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=no, width=' + w + ', height=' + h + ', top=' + tops + ', left=' + left);
|
||||||
|
WinId.document.open();
|
||||||
|
WinId.document.write(result);
|
||||||
|
WinId.document.close();
|
||||||
|
WinId.focus();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#simpan_sm').click(function () {
|
||||||
|
var id = $('#surat_idc').val();
|
||||||
|
var jenis_disposisi = $('#jenis_disposisi_id').find('option:selected').text();
|
||||||
|
var jenis_disposisi_id = $('#jenis_disposisi_id').val();
|
||||||
|
var no_surat = $('#no_surat').val();
|
||||||
|
var tgl_surat_masuk = $('#tgl_surat_masuk').val();
|
||||||
|
var no_agenda = $('#no_agenda').val();
|
||||||
|
var untuk = $('#untuk').val();
|
||||||
|
var no_kendali = $('#no_kendali').val();
|
||||||
|
|
||||||
|
var sifat_surat_id = $('#sifat_surat_id').val();
|
||||||
|
var lampiran = $('#lampiran').val();
|
||||||
|
var perihal = $('#perihal').val();
|
||||||
|
var sess_satker = $('#cek_satker').val();
|
||||||
|
|
||||||
|
var surat_dari = $('#surat_dari').val();
|
||||||
|
|
||||||
|
var satuan_kerja_dari2 = $('#satuan_kerja_dari').val();
|
||||||
|
var z32 = $('#browsers2');
|
||||||
|
var val32 = $(z32).find('option[value="' + satuan_kerja_dari2 + '"]');
|
||||||
|
var satuan_kerja_dari = val32.attr('id_jab2');
|
||||||
|
|
||||||
|
|
||||||
|
var imp3 = $("#kode_id").val();
|
||||||
|
var z3 = $('#browsers');
|
||||||
|
var val3 = $(z3).find('option[value="' + imp3 + '"]');
|
||||||
|
var kode_id = val3.attr('id_jab');
|
||||||
|
|
||||||
|
var key = 'simpan_sm';
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "app/smasuk/crud.php",
|
||||||
|
data: {
|
||||||
|
id: id,
|
||||||
|
jenis_disposisi: jenis_disposisi,
|
||||||
|
jenis_disposisi_id: jenis_disposisi_id,
|
||||||
|
no_surat: no_surat,
|
||||||
|
tgl_surat_masuk: tgl_surat_masuk,
|
||||||
|
no_agenda: no_agenda,
|
||||||
|
untuk: untuk,
|
||||||
|
no_kendali: no_kendali,
|
||||||
|
surat_dari: surat_dari,
|
||||||
|
sifat_surat_id: sifat_surat_id,
|
||||||
|
lampiran: lampiran,
|
||||||
|
perihal: perihal,
|
||||||
|
satuan_kerja_id: sess_satker,
|
||||||
|
kode_id: kode_id,
|
||||||
|
satuan_kerja_dari: satuan_kerja_dari,
|
||||||
|
key: key
|
||||||
|
},
|
||||||
|
success: function (response) {
|
||||||
|
var result = JSON.parse(response);
|
||||||
|
infoToast(result.icon,result.message);
|
||||||
|
var id = $('#surat_idc').val(result.data.id);
|
||||||
|
$('#surat_id_upload').val(result.data.id);
|
||||||
|
$('.in_upl').show();
|
||||||
|
$('#dok_tbl').load("app/smasuk/tabel.php", {
|
||||||
|
surat_id: result.data.id
|
||||||
|
});
|
||||||
|
|
||||||
|
if (jenis_disposisi == 'Kendali Surat') {
|
||||||
|
print_kendali();
|
||||||
|
} else { }
|
||||||
|
$(document).scrollTop($(document).height());
|
||||||
|
|
||||||
|
},
|
||||||
|
error: function (xhr) {
|
||||||
|
var result = JSON.parse(xhr.responseText)
|
||||||
|
infoToast(result.icon, result.message);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#closing_sm').click(function () {
|
||||||
|
var jenis_disposisi = $('#jenis_disposisi_id').find('option:selected').text();
|
||||||
|
if ((jenis_disposisi == 'Disposisi') || (jenis_disposisi == 'Biasa')) {
|
||||||
|
$('#disposisi').trigger('click');
|
||||||
|
} else {
|
||||||
|
$('#kendali').trigger('click');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#back_menu_disposisi').click(function () {
|
||||||
|
$('#closing_sm').trigger('click');
|
||||||
|
});
|
||||||
|
|
||||||
|
/*
|
||||||
|
$('#no_surat').focusout(function(){
|
||||||
|
var no_surat = $('#no_surat').val();
|
||||||
|
if (no_surat=='/') {} else {
|
||||||
|
if (!no_surat) {$('#no_surat').first().focus().selected();} else {
|
||||||
|
var jenis_disposisi = $('#jenis_disposisi_id').find('option:selected').text();
|
||||||
|
var key='cek_no';
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "app/smasuk/crud.php",
|
||||||
|
data: 'no_surat='+no_surat
|
||||||
|
+'&key='+key,
|
||||||
|
success: function(data){
|
||||||
|
if (data!='$%^$%^$%^01-01-1970$%^') {
|
||||||
|
var chars = data.split('$%^');
|
||||||
|
$('#surat_dari').val(chars[0]);
|
||||||
|
$('#lampiran').val(chars[1]);
|
||||||
|
$('#perihal').val(chars[2]);
|
||||||
|
if (chars[3]=='01-01-1970') {$('#tgl_surat_masuk').val('');} else {$('#tgl_surat_masuk').val(chars[3]);}
|
||||||
|
var sid = chars[4];
|
||||||
|
$('#surat_id').val(chars[4]);
|
||||||
|
var sid = $('#surat_id').val();
|
||||||
|
$('.in_upl').show();
|
||||||
|
$('#surat_id_upload').val(sid);
|
||||||
|
$('#dok_tbl').load("app/smasuk/tabel.php", {surat_id: sid});
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*autokomplet*/
|
||||||
|
|
||||||
|
|
||||||
|
$("#kode_id").change(function () {
|
||||||
|
var imp3 = $("#kode_id").val();
|
||||||
|
var z3 = $('#browsers');
|
||||||
|
var val3 = $(z3).find('option[value="' + imp3 + '"]');
|
||||||
|
var a = val3.attr('id_jab');
|
||||||
|
var key = "list_kode";
|
||||||
|
if (!a) {
|
||||||
|
alert('Kode tidak terdaftar..');
|
||||||
|
$('#kode_id').val('');
|
||||||
|
$('#kode_id').first().focus().selected();
|
||||||
|
} else { }
|
||||||
|
});
|
||||||
|
$("#no_surat").focusin(function () {
|
||||||
|
var imp3 = $("#kode_id").val();
|
||||||
|
var z3 = $('#browsers');
|
||||||
|
var val3 = $(z3).find('option[value="' + imp3 + '"]');
|
||||||
|
var a = val3.attr('id_jab');
|
||||||
|
if (!a) {
|
||||||
|
$('#kode_id').first().focus().selected();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$("#satuan_kerja_dari").change(function () {
|
||||||
|
var satuan_kerja_dari2 = $('#satuan_kerja_dari').val();
|
||||||
|
var z32 = $('#browsers2');
|
||||||
|
var val32 = $(z32).find('option[value="' + satuan_kerja_dari2 + '"]');
|
||||||
|
var b = val32.attr('id_jab2');
|
||||||
|
var key = "list_satker";
|
||||||
|
if (!b) {
|
||||||
|
alert('Satuan kerja tidak terdaftar..');
|
||||||
|
$('#satuan_kerja_dari').val('');
|
||||||
|
$('#satuan_kerja_dari').first().focus().selected();
|
||||||
|
} else { }
|
||||||
|
});
|
||||||
|
$("#sifat_surat_id").focusin(function () {
|
||||||
|
var satuan_kerja_dari2 = $('#satuan_kerja_dari').val();
|
||||||
|
var z32 = $('#browsers2');
|
||||||
|
var val32 = $(z32).find('option[value="' + satuan_kerja_dari2 + '"]');
|
||||||
|
var b = val32.attr('id_jab2');
|
||||||
|
if (!b) {
|
||||||
|
$('#satuan_kerja_dari').first().focus().selected();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function infoToast(icone, infone) {
|
||||||
|
Swal.fire({
|
||||||
|
// position: posisine,
|
||||||
|
icon: icone,
|
||||||
|
title: infone,
|
||||||
|
showConfirmButton: false,
|
||||||
|
timer: 2500
|
||||||
|
});
|
||||||
|
}
|
||||||
+37
-30
@@ -1,33 +1,31 @@
|
|||||||
<script>
|
<script>
|
||||||
var sess_nama=$('#cek_nama').val();
|
var sess_nama = $('#cek_nama').val();
|
||||||
var sess_jenis=$('#cek_jenis').val();
|
var sess_jenis = $('#cek_jenis').val();
|
||||||
var sess_nampeg = $('#cek_nampeg').val();
|
var sess_nampeg = $('#cek_nampeg').val();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
.btn-circle.btn-md {
|
.btn-circle.btn-md {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
padding: 7px 10px;
|
padding: 7px 10px;
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border: 3px solid #66b5fb;
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
#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>
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
@@ -39,16 +37,25 @@ var sess_nampeg = $('#cek_nampeg').val();
|
|||||||
<br>
|
<br>
|
||||||
<div id="isi"></div>
|
<div id="isi"></div>
|
||||||
<?php
|
<?php
|
||||||
$surat_id=$_POST['surat_id'];
|
$surat_id = $_POST['surat_id'];
|
||||||
$jenis_disposisi=$_POST['jenis_disposisi'];
|
$jenis_disposisi = $_POST['jenis_disposisi'];
|
||||||
$jenis_disposisi_id=$_POST['jenis_disposisi_id'];
|
$jenis_disposisi_id = $_POST['jenis_disposisi_id'];
|
||||||
?>
|
?>
|
||||||
<input type="hidden" id="surat_id" value="<?php echo $surat_id; ?>">
|
<input type="hidden" id="surat_id" value="<?php echo $surat_id; ?>">
|
||||||
<input type="hidden" id="jenis_disposisi" value="<?php echo $jenis_disposisi; ?>">
|
<input type="hidden" id="jenis_disposisi" value="<?php echo $jenis_disposisi; ?>">
|
||||||
<input type="hidden" id="jenis_disposisi_id" value="<?php echo $jenis_disposisi_id; ?>">
|
<input type="hidden" id="jenis_disposisi_id" value="<?php echo $jenis_disposisi_id; ?>">
|
||||||
<script>
|
<script>
|
||||||
var surat_id=$('#surat_id').val();
|
var surat_id = $('#surat_id').val();
|
||||||
var jenis_disposisi=$('#jenis_disposisi').val();
|
var jenis_disposisi = $('#jenis_disposisi').val();
|
||||||
var jenis_disposisi_id=$('#jenis_disposisi_id').val();
|
var jenis_disposisi_id = $('#jenis_disposisi_id').val();
|
||||||
$.post('app/smasuk/modal.php',{sess_nama:sess_nama, sess_jenis:sess_jenis, nampeg:sess_nampeg, surat_id:surat_id, jenis_disposisi:jenis_disposisi, jenis_disposisi_id:jenis_disposisi_id},function(html){$("#isi").html(html)});
|
$.post('app/smasuk/modal.php', {
|
||||||
|
sess_nama: sess_nama,
|
||||||
|
sess_jenis: sess_jenis,
|
||||||
|
nampeg: sess_nampeg,
|
||||||
|
surat_id: surat_id,
|
||||||
|
jenis_disposisi: jenis_disposisi,
|
||||||
|
jenis_disposisi_id: jenis_disposisi_id
|
||||||
|
}, function(html) {
|
||||||
|
$("#isi").html(html)
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
+196
-534
@@ -1,592 +1,254 @@
|
|||||||
<?php
|
<?php
|
||||||
include ('../koneksi.php');
|
include('../koneksi.php');
|
||||||
$sess_nama=$_POST['sess_nama'];
|
$sess_nama = $_POST['sess_nama'];
|
||||||
$sess_jenis=$_POST['sess_jenis'];
|
$sess_jenis = $_POST['sess_jenis'];
|
||||||
$nampeg=$_POST['nampeg'];
|
$nampeg = $_POST['nampeg'];
|
||||||
$id=$_POST['surat_id'];
|
$id = $_POST['surat_id'];
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$('.date').datepicker({format: 'dd/mm/yyyy',todayHighlight:'TRUE',autoclose: true,orientation: 'top'});
|
$('.date').datepicker({
|
||||||
|
format: 'dd/mm/yyyy',
|
||||||
|
todayHighlight: 'TRUE',
|
||||||
|
autoclose: true,
|
||||||
|
orientation: 'top'
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
include ('../koneksi.php');
|
include('../koneksi.php');
|
||||||
|
|
||||||
if ($id!='0') {
|
if ($id != '0') {
|
||||||
$data=pg_query("SELECT jenis_disposisi_id,no_surat,tgl_surat_masuk,no_agenda,no_kendali,surat_dari,sifat_surat_id,lampiran,perihal,satuan_kerja_id,
|
$query = "SELECT jenis_disposisi_id, no_surat, tgl_surat_masuk, no_agenda, no_kendali, surat_dari, sifat_surat_id, lampiran, perihal, satuan_kerja_id,
|
||||||
(SELECT jenis FROM jenis_disposisi WHERE id=jenis_disposisi_id),
|
jd.jenis AS jenis_disposisi, k.kode || ' - ' || k.keterangan AS kode_lengkap,
|
||||||
(SELECT kode FROM kode WHERE id=kode_id),
|
sk.kode_satker || ' - ' || sk.nama AS satker_dari
|
||||||
(SELECT keterangan FROM kode WHERE id=kode_id),
|
FROM surat s
|
||||||
kode_id,
|
LEFT JOIN jenis_disposisi jd ON s.jenis_disposisi_id = jd.id
|
||||||
(SELECT kode_satker FROM satuan_kerja WHERE id=satuan_kerja_dari),
|
LEFT JOIN kode k ON s.kode_id = k.id
|
||||||
(SELECT nama FROM satuan_kerja WHERE id=satuan_kerja_dari)
|
LEFT JOIN satuan_kerja sk ON s.satuan_kerja_dari = sk.id
|
||||||
FROM surat WHERE id='$id'");
|
WHERE s.id = $1";
|
||||||
while($row=pg_fetch_array($data)) {
|
|
||||||
$jenis_disposisi_id=$row[0];
|
$result = pg_query_params($koneksi, $query, array($id));
|
||||||
$no_surat=$row[1];
|
$row = pg_fetch_assoc($result);
|
||||||
$tgl_surat_masuk=$row[2];
|
|
||||||
$no_agenda=$row[3];
|
// Assign values
|
||||||
$no_kendali=$row[4];
|
$jenis_disposisi_id = $row['jenis_disposisi_id'];
|
||||||
$surat_dari=$row[5];
|
$no_surat = $row['no_surat'];
|
||||||
$sifat_surat_id=$row[6];
|
$tgl_surat_masuk = $row['tgl_surat_masuk'];
|
||||||
$lampiran=$row[7];
|
$no_agenda = $row['no_agenda'];
|
||||||
$perihal=$row[8];
|
$no_kendali = $row['no_kendali'];
|
||||||
$satuan_kerja_id=$row[9];
|
$surat_dari = $row['surat_dari'];
|
||||||
$jenis_disposisi=$row[10];
|
$sifat_surat_id = $row['sifat_surat_id'];
|
||||||
$kode=$row[11];
|
$lampiran = $row['lampiran'];
|
||||||
$keterangan=$row[12];
|
$perihal = $row['perihal'];
|
||||||
$kode_id=$row[13];
|
$satuan_kerja_id = $row['satuan_kerja_id'];
|
||||||
$kode_satker_dari=$row[14];
|
$jenis_disposisi = $row['jenis_disposisi'];
|
||||||
$nama_satker_dari=$row[15];
|
$kod = $row['kode_lengkap'];
|
||||||
}
|
$kod_dari = $row['satker_dari'];
|
||||||
$kod=$kode.' - '.$keterangan;
|
|
||||||
$kod_dari=$kode_satker_dari.' - '.$nama_satker_dari;
|
|
||||||
} else {
|
} else {
|
||||||
$jenis_disposisi_id=$_POST['jenis_disposisi_id'];
|
$jenis_disposisi_id = $_POST['jenis_disposisi_id'];
|
||||||
$jenis_disposisi=$_POST['jenis_disposisi'];
|
$jenis_disposisi = $_POST['jenis_disposisi'];
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
.no-border{
|
.no-border {
|
||||||
border:none;
|
border: none;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<input type="hidden" id="ssnama" value="<?php echo $nampeg; ?>">
|
<input type="hidden" id="ssnama" value="<?= $nampeg; ?>">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-1">
|
<div class="col-lg-1">
|
||||||
<button type="button" class="btn btn-default btn-rounded" id="back_menu_disposisi"><i class="fa fa-arrow-left m-r-5"></i>Back</button>
|
<button type="button" class="btn btn-default btn-rounded" id="back_menu_disposisi"><i class="fa fa-arrow-left m-r-5"></i>Back</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-11">
|
<div class="col-lg-11">
|
||||||
<p class="judul_page" style="margin-top:-7px;">
|
<p class="judul_page" style="margin-top:-7px;">
|
||||||
<?php if ($jenis_disposisi=='Disposisi') { ?>
|
<?php if ($jenis_disposisi == 'Disposisi') { ?>
|
||||||
<i class="mdi mdi-file-document m-r-1"></i>
|
<i class="mdi mdi-file-document m-r-1"></i>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<i class="mdi mdi-file-outline m-r-1"></i>
|
<i class="mdi mdi-file-outline m-r-1"></i>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
Input <?php echo $jenis_disposisi; ?></p>
|
Input <?= $jenis_disposisi; ?>
|
||||||
</div>
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
<input type="text" id="surat_idc" value="<?= $id; ?>">
|
||||||
<form role="form">
|
<form role="form">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="exampleInputEmail1">Jenis Surat</label>
|
<label for="exampleInputEmail1">Jenis Surat</label>
|
||||||
<input type="hidden" value="<?php echo $jenis_disposisi; ?>" id="jenis_disposisi">
|
<input type="hidden" value="<?= $jenis_disposisi; ?>" id="jenis_disposisi">
|
||||||
<!-- <input type="hidden" id="surat_id"> -->
|
<!-- <input type="hidden" id="surat_id"> -->
|
||||||
<select class="form-control" name="jenis_disposisi_id" id="jenis_disposisi_id" disabled>
|
<select class="form-control" name="jenis_disposisi_id" id="jenis_disposisi_id" disabled>
|
||||||
<option></option>
|
<option></option>
|
||||||
<?php
|
<?php
|
||||||
if ($sess_jenis=='Admin') {
|
if ($sess_jenis == 'Admin') {
|
||||||
$ukerja=pg_query("SELECT id,jenis FROM jenis_disposisi WHERE jenis <> 'Biasa' ORDER BY id ASC");
|
$ukerja = pg_query($koneksi, "SELECT id,jenis FROM jenis_disposisi WHERE jenis <> 'Biasa' ORDER BY id ASC");
|
||||||
} else {
|
} else {
|
||||||
$ukerja=pg_query("SELECT id,jenis FROM jenis_disposisi WHERE jenis = 'Disposisi' ORDER BY id ASC");
|
$ukerja = pg_query($koneksi, "SELECT id,jenis FROM jenis_disposisi WHERE jenis = 'Disposisi' ORDER BY id ASC");
|
||||||
}
|
}
|
||||||
while($rows=pg_fetch_assoc($ukerja)) {
|
while ($rows = pg_fetch_assoc($ukerja)) {
|
||||||
?>
|
?>
|
||||||
<option <?php if ($jenis_disposisi_id==$rows["id"]) {echo "selected";} ?> value="<?php echo $rows['id']; ?>"><?php echo $rows['jenis']?></option>
|
<option <?php if ($jenis_disposisi_id == $rows["id"]) {
|
||||||
<?php
|
echo "selected";
|
||||||
}
|
} ?> value="<?= $rows['id']; ?>"><?= $rows['jenis'] ?></option>
|
||||||
?>
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group sm-tgl_surat">
|
<div class="form-group sm-tgl_surat">
|
||||||
<label>Kode Surat</label>
|
<label>Kode Surat</label>
|
||||||
<input type="text" class="form-control" list="browsers" name="browser" id="kode_id" value="<?php echo $kod; ?>">
|
<input type="text" class="form-control" list="browsers" name="browser" id="kode_id" value="<?= $kod; ?>">
|
||||||
<datalist id="browsers">
|
<datalist id="browsers">
|
||||||
<?php
|
<?php
|
||||||
$userpeg=pg_query("SELECT * FROM kode ORDER BY id ASC");
|
$userpeg = pg_query($koneksi, "SELECT * FROM kode WHERE status = 1 ORDER BY id ASC");
|
||||||
while($rows=pg_fetch_array($userpeg)) {
|
while ($rows = pg_fetch_array($userpeg)) {
|
||||||
?>
|
?>
|
||||||
<?php
|
<?php
|
||||||
if(strpos($_SERVER['HTTP_USER_AGENT'], 'Chrome') !== false) {
|
if (strpos($_SERVER['HTTP_USER_AGENT'], 'Chrome') !== false) {
|
||||||
?>
|
?>
|
||||||
<option id_jab="<?php echo($rows['id']);?>" value="<?php echo $rows[1].' - '.$rows[2]; ?>"></option>
|
<option id_jab="<?= ($rows['id']); ?>" value="<?= $rows[1] . ' - ' . $rows[2]; ?>"></option>
|
||||||
<?php
|
<?php
|
||||||
} else
|
} else
|
||||||
if(strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox') !== false) {
|
if (strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox') !== false) {
|
||||||
?>
|
?>
|
||||||
<option id_jab="<?php echo($rows['id']);?>" value="<?php echo $rows[1].' - '.$rows[2]; ?>"><?php echo $rows[1].' - '.$rows[2]; ?></option>
|
<option id_jab="<?= ($rows['id']); ?>" value="<?= $rows[1] . ' - ' . $rows[2]; ?>"><?= $rows[1] . ' - ' . $rows[2]; ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</datalist>
|
</datalist>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group sm-no_surat">
|
<div class="form-group sm-no_surat">
|
||||||
<label>No Surat</label>
|
<label>No Surat</label>
|
||||||
<input type="text" class="form-control" id="no_surat" value="<?php echo $no_surat; ?>">
|
<input type="text" class="form-control" id="no_surat" value="<?= $no_surat; ?>">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group sm-no_kendali" hidden>
|
<div class="form-group sm-no_kendali" hidden>
|
||||||
<label>No Kendali</label>
|
<label>No Kendali</label>
|
||||||
<input type="text" class="form-control" id="no_kendali" value="<?php echo $no_kendali; ?>">
|
<input type="text" class="form-control" id="no_kendali" value="<?= $no_kendali; ?>">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group sm-tgl_surat" hidden>
|
<div class="form-group sm-tgl_surat" hidden>
|
||||||
<label>Surat Dari</label>
|
<label>Surat Dari</label>
|
||||||
<input type="text" class="form-control" id="surat_dari" value="<?php echo $surat_dari; ?>">
|
<input type="text" class="form-control" id="surat_dari" value="<?= $surat_dari; ?>">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group sm-lampiran">
|
<div class="form-group sm-lampiran">
|
||||||
<label>Asal / Pengolah</label>
|
<label>Asal / Pengolah</label>
|
||||||
<input type="text" class="form-control" list="browsers2" name="browser2" id="satuan_kerja_dari" value="<?php echo $kod_dari; ?>">
|
<input type="text" class="form-control" list="browsers2" name="browser2" id="satuan_kerja_dari" value="<?php echo $kod_dari; ?>">
|
||||||
<datalist id="browsers2">
|
<datalist id="browsers2">
|
||||||
<?php
|
<?php
|
||||||
$userpeg=pg_query("SELECT * FROM satuan_kerja WHERE kode_satker IS NOT NULL ORDER BY id ASC");
|
$userpeg = pg_query($koneksi, "SELECT * FROM satuan_kerja WHERE kode_satker IS NOT NULL ORDER BY id ASC");
|
||||||
/*$userpeg=pg_query("SELECT *,
|
/*$userpeg=pg_query("SELECT *,
|
||||||
SPLIT_PART(CASE WHEN kode_satker='' THEN '0.0' ELSE kode_satker END,'.',1),
|
SPLIT_PART(CASE WHEN kode_satker='' THEN '0.0' ELSE kode_satker END,'.',1),
|
||||||
CAST(SPLIT_PART(CASE WHEN kode_satker='' THEN '0.0' ELSE kode_satker END,'.',2) AS INTEGER)
|
CAST(SPLIT_PART(CASE WHEN kode_satker='' THEN '0.0' ELSE kode_satker END,'.',2) AS INTEGER)
|
||||||
FROM satuan_kerja
|
FROM satuan_kerja
|
||||||
WHERE kode_satker !=''
|
WHERE kode_satker !=''
|
||||||
ORDER BY
|
ORDER BY
|
||||||
SPLIT_PART(CASE WHEN kode_satker='' THEN '0.0' ELSE kode_satker END,'.',1) ASC,
|
SPLIT_PART(CASE WHEN kode_satker='' THEN '0.0' ELSE kode_satker END,'.',1) ASC,
|
||||||
CAST(SPLIT_PART(CASE WHEN kode_satker='' THEN '0.0' ELSE kode_satker END,'.',2) AS INTEGER) ASC
|
CAST(SPLIT_PART(CASE WHEN kode_satker='' THEN '0.0' ELSE kode_satker END,'.',2) AS INTEGER) ASC
|
||||||
");*/
|
");*/
|
||||||
while($rows=pg_fetch_array($userpeg)) {
|
while ($rows = pg_fetch_array($userpeg)) {
|
||||||
?>
|
?>
|
||||||
<?php
|
<?php
|
||||||
if(strpos($_SERVER['HTTP_USER_AGENT'], 'Chrome') !== false) {
|
if (strpos($_SERVER['HTTP_USER_AGENT'], 'Chrome') !== false) {
|
||||||
?>
|
?>
|
||||||
<option id_jab2="<?php echo($rows['id']);?>" value="<?php echo $rows[2].' - '.$rows[1]; ?>"></option>
|
<option id_jab2="<?php echo ($rows['id']); ?>" value="<?php echo $rows[2] . ' - ' . $rows[1]; ?>"></option>
|
||||||
<?php
|
<?php
|
||||||
} else
|
} else
|
||||||
if(strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox') !== false) {
|
if (strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox') !== false) {
|
||||||
?>
|
?>
|
||||||
<option id_jab2="<?php echo($rows['id']);?>" value="<?php echo $rows[2].' - '.$rows[1]; ?>"><?php echo $rows[2].' - '.$rows[1]; ?></option>
|
<option id_jab2="<?php echo ($rows['id']); ?>" value="<?php echo $rows[2] . ' - ' . $rows[1]; ?>"><?php echo $rows[2] . ' - ' . $rows[1]; ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</datalist>
|
</datalist>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group sm-tgl_surat">
|
<div class="form-group sm-tgl_surat">
|
||||||
<label for="exampleInputEmail1">Tgl Surat</label>
|
<label for="exampleInputEmail1">Tgl Surat</label>
|
||||||
<input type="text" class="date form-control" id="tgl_surat_masuk" placeholder="dd/mm/yyyy"
|
<input type="text" class="date form-control" id="tgl_surat_masuk" placeholder="dd/mm/yyyy" onkeyup="
|
||||||
onkeyup="
|
var v = this.value;
|
||||||
var v = this.value;
|
if (v.match(/^\d{2}$/) !== null) {
|
||||||
if (v.match(/^\d{2}$/) !== null) {
|
this.value = v + '/';
|
||||||
this.value = v + '/';
|
} else if (v.match(/^\d{2}\/\d{2}$/) !== null) {
|
||||||
} else if (v.match(/^\d{2}\/\d{2}$/) !== null) {
|
this.value = v + '/';
|
||||||
this.value = v + '/';
|
}
|
||||||
}
|
" value="<?= (empty($tgl_surat_masuk)) ? '' : date('d/m/Y', strtotime($tgl_surat_masuk)); ?>">
|
||||||
"
|
</div>
|
||||||
value="<?php
|
|
||||||
$tpm=date('d-m-Y',strtotime($tgl_surat_masuk));
|
|
||||||
if (($tpm=="01-01-1970") || ($tpm==NULL) || ($tpm=="")) {
|
|
||||||
echo "";
|
|
||||||
} else {
|
|
||||||
echo date('d/m/Y',strtotime($tpm));
|
|
||||||
}
|
|
||||||
?>"
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!--<div class="form-group sm-sifat_surat">-->
|
<!--<div class="form-group sm-sifat_surat">-->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="exampleInputEmail1">Sifat Surat</label>
|
<label for="exampleInputEmail1">Sifat Surat</label>
|
||||||
<select class="form-control" name="sifat_surat_id" id="sifat_surat_id">
|
<select class="form-control" name="sifat_surat_id" id="sifat_surat_id">
|
||||||
<option></option>
|
<option></option>
|
||||||
<?php
|
<?php
|
||||||
$ukerja=pg_query("SELECT id,sifat FROM sifat_surat ORDER BY id ASC");
|
$ukerja = pg_query($koneksi, "SELECT id,sifat FROM sifat_surat ORDER BY id ASC");
|
||||||
while($rows=pg_fetch_assoc($ukerja)) {
|
while ($rows = pg_fetch_assoc($ukerja)) {
|
||||||
?>
|
?>
|
||||||
<option <?php if ($sifat_surat_id==$rows["id"]) {echo "selected";} ?> value="<?php echo $rows['id']; ?>"><?php echo $rows['sifat']?></option>
|
<option <?php if ($sifat_surat_id == $rows["id"]) {
|
||||||
<?php
|
echo "selected";
|
||||||
}
|
} ?> value="<?= $rows['id']; ?>"><?= $rows['sifat'] ?></option>
|
||||||
?>
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group sm-lampiran">
|
<div class="form-group sm-lampiran">
|
||||||
<label>Lampiran</label>
|
<label>Lampiran</label>
|
||||||
<input type="text" class="form-control" id="lampiran" value="<?php echo $lampiran; ?>">
|
<input type="text" class="form-control" id="lampiran" value="<?= $lampiran ?>">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group sm-perihal">
|
<div class="form-group sm-perihal">
|
||||||
<label>Perihal</label>
|
<label>Perihal</label>
|
||||||
<input type="text" class="form-control" id="perihal" value="<?php echo $perihal; ?>">
|
<input type="text" class="form-control" id="perihal" value="<?= $perihal ?>">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group sm-tgl_arsip">
|
<div class="form-group sm-tgl_arsip">
|
||||||
<label for="exampleInputEmail1">Tgl Diterima</label>
|
<label for="exampleInputEmail1">Tgl Diterima</label>
|
||||||
<input type="text" class="date form-control" id="tgl_arsip" placeholder="dd/mm/yyyy"
|
<input type="text" class="date form-control" id="tgl_arsip" placeholder="dd/mm/yyyy" onkeyup=" var v = this.value;
|
||||||
onkeyup="
|
if (v.match(/^\d{2}$/) !== null) {
|
||||||
var v = this.value;
|
this.value = v + '/';
|
||||||
if (v.match(/^\d{2}$/) !== null) {
|
} else if (v.match(/^\d{2}\/\d{2}$/) !== null) {
|
||||||
this.value = v + '/';
|
this.value = v + '/';
|
||||||
} else if (v.match(/^\d{2}\/\d{2}$/) !== null) {
|
}
|
||||||
this.value = v + '/';
|
" value="<?= (empty($tar)) ? ' - ' : date('d-m-Y', strtotime($tgl_arsip)); ?>">
|
||||||
}
|
</div>
|
||||||
"
|
|
||||||
value="<?php
|
|
||||||
$tar=date('d-m-Y',strtotime($tgl_arsip));
|
|
||||||
if (($tar=="01-01-1970") || ($tar==NULL) || ($tar=="")) {
|
|
||||||
echo "";
|
|
||||||
} else {
|
|
||||||
echo date('d/m/Y',strtotime($tar));
|
|
||||||
}
|
|
||||||
?>"
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group sm-no_agenda">
|
<div class="form-group sm-no_agenda">
|
||||||
<label>No Agenda</label>
|
<label>No Agenda</label>
|
||||||
<input type="text" class="form-control" id="no_agenda" value="<?php echo $no_agenda; ?>" disabled>
|
<input type="text" class="form-control" id="no_agenda" value="<?php echo $no_agenda; ?>" disabled>
|
||||||
</div>
|
</div>
|
||||||
<!--
|
<!--
|
||||||
<div class="form-group sm-untuk">
|
<div class="form-group sm-untuk">
|
||||||
<label>Untuk</label>
|
<label>Untuk</label>
|
||||||
<input type="text" class="form-control" id="untuk" value="<?php echo $untuk; ?>">
|
<input type="text" class="form-control" id="untuk" value="<?php echo $untuk; ?>">
|
||||||
</div>
|
</div>
|
||||||
-->
|
-->
|
||||||
<br>
|
<br>
|
||||||
<button type="button" class="btn btn-block btn-default waves-effect waves-light" id="simpan_sm">Simpan</button>
|
<button type="button" class="btn btn-block btn-default waves-effect waves-light" id="simpan_sm">Simpan</button>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<h4 class="in_upl" style="color:#1ec2e9"> <i class="fa fa-paperclip m-r-10 m-b-10"></i>Upload Dokumen </h4>
|
<!-- <h4 class="in_upl" style="color:#1ec2e9"> <i class="fa fa-paperclip m-r-10 m-b-10"></i>Upload Dokumen </h4> -->
|
||||||
<div class="in_upl" id="isi_upload"></div>
|
<h5 class="text-muted m-t-0 in_upl" style="font-family:InterSB;">Lampirkan Dokumen</h5>
|
||||||
|
<div class="in_upl" id="isi_upload"></div>
|
||||||
<br>
|
<br>
|
||||||
<button type="button" class="btn btn-block btn-default waves-effect waves-light in_upl" id="closing_sm">CLOSING</button>
|
<button type="button" class="btn btn-block btn-default waves-effect waves-light in_upl" id="closing_sm">CLOSING</button>
|
||||||
</form>
|
</form>
|
||||||
<input type="hidden" id="surat_idc" value="<?php echo $id; ?>">
|
|
||||||
<script type="text/javascript">
|
|
||||||
|
|
||||||
function angka(e) {
|
|
||||||
if (!/^[0-9\.,()-/\a-zA-Z \b]+$/.test(e.value)) {
|
|
||||||
e.value = e.value.substring(0,e.value.length-1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$("#surat_dari, #perihal, #no_surat").keyup(function(){
|
|
||||||
angka(this);
|
|
||||||
});
|
|
||||||
|
|
||||||
$.post('app/smasuk/upload.php',function(html){$("#isi_upload").html(html)});
|
|
||||||
|
|
||||||
var surat_id = $('#surat_idc').val();
|
|
||||||
|
|
||||||
if ((surat_id=='') || (surat_id==null)) {
|
|
||||||
$('#simpan_sm').hide();
|
|
||||||
} else {
|
|
||||||
$('#simpan_sm').show();
|
|
||||||
}
|
|
||||||
$('.in_upl').hide();
|
|
||||||
$('.sm-no_agenda').hide();
|
|
||||||
var b = $('#jenis_disposisi').val();
|
|
||||||
if (b=='Disposisi') {
|
|
||||||
$('.sm-no_surat').show();
|
|
||||||
$('.sm-tgl_surat').show();
|
|
||||||
$('.sm-no_agenda').show();
|
|
||||||
$('.sm-untuk').hide();
|
|
||||||
$('.sm-surat_dari').show();
|
|
||||||
$('.sm-sifat_surat').hide();
|
|
||||||
$('.sm-lampiran').hide();
|
|
||||||
$('.sm-perihal').show();
|
|
||||||
$('#modal_footer_sm').show();
|
|
||||||
$('.in_scan').show();
|
|
||||||
$('.sm-tgl_arsip').hide();
|
|
||||||
} else
|
|
||||||
if (b=='Kendali Surat') {
|
|
||||||
$('.sm-no_surat').hide();
|
|
||||||
$('.sm-tgl_surat').hide();
|
|
||||||
$('.sm-no_agenda').hide();
|
|
||||||
$('.sm-untuk').hide();
|
|
||||||
$('.sm-surat_dari').show();
|
|
||||||
$('.sm-sifat_surat').show();
|
|
||||||
$('.sm-lampiran').show();
|
|
||||||
$('.sm-perihal').show();
|
|
||||||
$('#modal_footer_sm').show();
|
|
||||||
$('.in_scan').show();
|
|
||||||
$('.sm-tgl_arsip').hide();
|
|
||||||
} else
|
|
||||||
if (b=='Biasa') {
|
|
||||||
$('.sm-no_surat').show();
|
|
||||||
$('.sm-tgl_surat').show();
|
|
||||||
$('.sm-no_agenda').show();
|
|
||||||
$('.sm-untuk').show();
|
|
||||||
$('.sm-surat_dari').show();
|
|
||||||
$('.sm-sifat_surat').hide();
|
|
||||||
$('.sm-lampiran').hide();
|
|
||||||
$('.sm-perihal').show();
|
|
||||||
$('#modal_footer_sm').show();
|
|
||||||
$('.in_scan').show();
|
|
||||||
$('.sm-tgl_arsip').show();
|
|
||||||
} else {
|
|
||||||
$('.in_scan').hide();
|
|
||||||
$('#modal_footer_sm').hide();
|
|
||||||
$('.sm-no_surat').hide();
|
|
||||||
$('.sm-tgl_surat').hide();
|
|
||||||
$('.sm-surat_dari').hide();
|
|
||||||
$('.sm-no_agenda').hide();
|
|
||||||
$('.sm-untuk').hide();
|
|
||||||
$('.sm-sifat_surat').hide();
|
|
||||||
$('.sm-lampiran').hide();
|
|
||||||
$('.sm-perihal').hide();
|
|
||||||
$('.sm-tgl_arsip').hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
$('#jenis_disposisi_id').change(function(){
|
|
||||||
$('#simpan_sm').show();
|
|
||||||
$('.in_upl').hide();
|
|
||||||
var a= $('#jenis_disposisi_id').find('option:selected').text();
|
|
||||||
if (a=='Disposisi') {
|
|
||||||
$('.sm-no_surat').show();
|
|
||||||
$('.sm-tgl_surat').show();
|
|
||||||
$('.sm-no_agenda').show();
|
|
||||||
$('.sm-untuk').hide();
|
|
||||||
$('.sm-surat_dari').show();
|
|
||||||
$('.sm-sifat_surat').hide();
|
|
||||||
$('.sm-lampiran').hide();
|
|
||||||
$('.sm-perihal').show();
|
|
||||||
$('#modal_footer_sm').show();
|
|
||||||
$('.in_scan').show();
|
|
||||||
$('.sm-tgl_arsip').hide();
|
|
||||||
} else
|
|
||||||
if (a=='Kendali Surat') {
|
|
||||||
$('.sm-no_surat').hide();
|
|
||||||
$('.sm-tgl_surat').hide();
|
|
||||||
$('.sm-no_agenda').hide();
|
|
||||||
$('.sm-untuk').hide();
|
|
||||||
$('.sm-surat_dari').show();
|
|
||||||
$('.sm-sifat_surat').show();
|
|
||||||
$('.sm-lampiran').show();
|
|
||||||
$('.sm-perihal').show();
|
|
||||||
$('#modal_footer_sm').show();
|
|
||||||
$('.in_scan').show();
|
|
||||||
$('.sm-tgl_arsip').hide();
|
|
||||||
} else
|
|
||||||
if (a=='Biasa') {
|
|
||||||
$('.sm-no_surat').show();
|
|
||||||
$('.sm-tgl_surat').show();
|
|
||||||
$('.sm-no_agenda').show();
|
|
||||||
$('.sm-untuk').show();
|
|
||||||
$('.sm-surat_dari').show();
|
|
||||||
$('.sm-sifat_surat').hide();
|
|
||||||
$('.sm-lampiran').hide();
|
|
||||||
$('.sm-perihal').show();
|
|
||||||
$('#modal_footer_sm').show();
|
|
||||||
$('.in_scan').show();
|
|
||||||
$('.sm-tgl_arsip').show();
|
|
||||||
} else {
|
|
||||||
$('.in_scan').show();
|
|
||||||
$('#modal_footer_sm').hide();
|
|
||||||
$('.sm-no_surat').hide();
|
|
||||||
$('.sm-tgl_surat').hide();
|
|
||||||
$('.sm-surat_dari').hide();
|
|
||||||
$('.sm-no_agenda').hide();
|
|
||||||
$('.sm-untuk').hide();
|
|
||||||
$('.sm-sifat_surat').hide();
|
|
||||||
$('.sm-lampiran').hide();
|
|
||||||
$('.sm-perihal').hide();
|
|
||||||
$('.sm-tgl_arsip').hide();
|
|
||||||
}
|
|
||||||
$('#surat_id').val('0');
|
|
||||||
$('#no_surat').val('');
|
|
||||||
$('#tgl_surat_masuk').val('');
|
|
||||||
$('#no_agenda').val('');
|
|
||||||
$('#untuk').val('');
|
|
||||||
$('#no_kendali').val('');
|
|
||||||
$('#surat_dari').val('');
|
|
||||||
$('#sifat_surat_id').val('');
|
|
||||||
$('#lampiran').val('');
|
|
||||||
$('#perihal').val('');
|
|
||||||
|
|
||||||
$('.sm-no_agenda').hide();
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript" src="app/smasuk/js/modal.js"></script>
|
||||||
function print_kendali() {
|
<script src="assets/vendor/sweetalert2/sweetalert2.all.min.js"></script>
|
||||||
var ssnama=$('#ssnama').val();
|
|
||||||
var surat_id=$('#surat_id_upload').val();
|
|
||||||
var w = 1000;
|
|
||||||
var h = 800;
|
|
||||||
var left = Number((screen.width/2)-(w/2));
|
|
||||||
var tops = Number((screen.height/2)-(h/2));
|
|
||||||
$.post('app/smasuk/print_kendali.php', { surat_id : surat_id, nampeg:ssnama}, function (result) {
|
|
||||||
WinId = window.open('', 'newwin', 'toolbar=no, location=no, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+tops+', left='+left);
|
|
||||||
WinId.document.open();
|
|
||||||
WinId.document.write(result);
|
|
||||||
WinId.document.close();
|
|
||||||
WinId.focus();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
$('#simpan_sm').click(function(){
|
|
||||||
var id = $('#surat_id').val();
|
|
||||||
var jenis_disposisi = $('#jenis_disposisi_id').find('option:selected').text();
|
|
||||||
var jenis_disposisi_id = $('#jenis_disposisi_id').val();
|
|
||||||
var no_surat = $('#no_surat').val();
|
|
||||||
var tgl_surat_masuk = $('#tgl_surat_masuk').val();
|
|
||||||
var no_agenda = $('#no_agenda').val();
|
|
||||||
var untuk = $('#untuk').val();
|
|
||||||
var no_kendali = $('#no_kendali').val();
|
|
||||||
|
|
||||||
var sifat_surat_id = $('#sifat_surat_id').val();
|
|
||||||
var lampiran = $('#lampiran').val();
|
|
||||||
var perihal = $('#perihal').val();
|
|
||||||
var sess_satker = $('#cek_satker').val();
|
|
||||||
|
|
||||||
var surat_dari = $('#surat_dari').val();
|
|
||||||
|
|
||||||
var satuan_kerja_dari2 = $('#satuan_kerja_dari').val();
|
|
||||||
var z32 = $('#browsers2');
|
|
||||||
var val32 = $(z32).find('option[value="' + satuan_kerja_dari2 + '"]');
|
|
||||||
var satuan_kerja_dari = val32.attr('id_jab2');
|
|
||||||
|
|
||||||
|
|
||||||
var imp3 = $("#kode_id").val();
|
|
||||||
var z3 = $('#browsers');
|
|
||||||
var val3 = $(z3).find('option[value="' + imp3 + '"]');
|
|
||||||
var kode_id = val3.attr('id_jab');
|
|
||||||
|
|
||||||
var key = 'simpan_sm';
|
|
||||||
$.ajax({
|
|
||||||
type: "POST",
|
|
||||||
url: "app/smasuk/crud.php",
|
|
||||||
data: 'id='+id
|
|
||||||
+'&jenis_disposisi='+jenis_disposisi
|
|
||||||
+'&jenis_disposisi_id='+jenis_disposisi_id
|
|
||||||
+'&no_surat='+no_surat
|
|
||||||
+'&tgl_surat_masuk='+tgl_surat_masuk
|
|
||||||
+'&no_agenda='+no_agenda
|
|
||||||
+'&untuk='+untuk
|
|
||||||
+'&no_kendali='+no_kendali
|
|
||||||
+'&surat_dari='+surat_dari
|
|
||||||
+'&sifat_surat_id='+sifat_surat_id
|
|
||||||
+'&lampiran='+lampiran
|
|
||||||
+'&perihal='+perihal
|
|
||||||
+'&satuan_kerja_id='+sess_satker
|
|
||||||
+'&kode_id='+kode_id
|
|
||||||
+'&satuan_kerja_dari='+satuan_kerja_dari
|
|
||||||
+'&key='+key,
|
|
||||||
success: function(data){
|
|
||||||
if (data=='salah') {
|
|
||||||
alert('No surat sudah terpakai..');
|
|
||||||
$(window).scrollTop(0);
|
|
||||||
$('#no_surat').select();
|
|
||||||
$('#no_surat').first().focus().selected();
|
|
||||||
} else {
|
|
||||||
$('.in_upl').show();
|
|
||||||
$('#dok_tbl').load("app/smasuk/tabel.php", {surat_id: id});
|
|
||||||
$('#surat_id_upload').val(data);
|
|
||||||
$('input[name="surat_id_upload"]').val(data);
|
|
||||||
alert('tersimpan..');
|
|
||||||
if (jenis_disposisi=='Kendali Surat') {print_kendali();} else {}
|
|
||||||
$(document).scrollTop($(document).height());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#closing_sm').click(function(){
|
|
||||||
var jenis_disposisi = $('#jenis_disposisi_id').find('option:selected').text();
|
|
||||||
if ((jenis_disposisi=='Disposisi') || (jenis_disposisi=='Biasa')) {
|
|
||||||
$('#disposisi').trigger('click');
|
|
||||||
} else {
|
|
||||||
$('#kendali').trigger('click');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#back_menu_disposisi').click(function(){
|
|
||||||
$('#closing_sm').trigger('click');
|
|
||||||
});
|
|
||||||
|
|
||||||
/*
|
|
||||||
$('#no_surat').focusout(function(){
|
|
||||||
var no_surat = $('#no_surat').val();
|
|
||||||
if (no_surat=='/') {} else {
|
|
||||||
if (!no_surat) {$('#no_surat').first().focus().selected();} else {
|
|
||||||
var jenis_disposisi = $('#jenis_disposisi_id').find('option:selected').text();
|
|
||||||
var key='cek_no';
|
|
||||||
$.ajax({
|
|
||||||
type: "POST",
|
|
||||||
url: "app/smasuk/crud.php",
|
|
||||||
data: 'no_surat='+no_surat
|
|
||||||
+'&key='+key,
|
|
||||||
success: function(data){
|
|
||||||
if (data!='$%^$%^$%^01-01-1970$%^') {
|
|
||||||
var chars = data.split('$%^');
|
|
||||||
$('#surat_dari').val(chars[0]);
|
|
||||||
$('#lampiran').val(chars[1]);
|
|
||||||
$('#perihal').val(chars[2]);
|
|
||||||
if (chars[3]=='01-01-1970') {$('#tgl_surat_masuk').val('');} else {$('#tgl_surat_masuk').val(chars[3]);}
|
|
||||||
var sid = chars[4];
|
|
||||||
$('#surat_id').val(chars[4]);
|
|
||||||
var sid = $('#surat_id').val();
|
|
||||||
$('.in_upl').show();
|
|
||||||
$('#surat_id_upload').val(sid);
|
|
||||||
$('#dok_tbl').load("app/smasuk/tabel.php", {surat_id: sid});
|
|
||||||
} else {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*autokomplet*/
|
|
||||||
|
|
||||||
|
|
||||||
$("#kode_id").change(function(){
|
|
||||||
var imp3 = $("#kode_id").val();
|
|
||||||
var z3 = $('#browsers');
|
|
||||||
var val3 = $(z3).find('option[value="' + imp3 + '"]');
|
|
||||||
var a = val3.attr('id_jab');
|
|
||||||
var key = "list_kode";
|
|
||||||
if (!a) {
|
|
||||||
alert('Kode tidak terdaftar..');
|
|
||||||
$('#kode_id').val('');
|
|
||||||
$('#kode_id').first().focus().selected();
|
|
||||||
} else {
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$("#no_surat").focusin(function(){
|
|
||||||
var imp3 = $("#kode_id").val();
|
|
||||||
var z3 = $('#browsers');
|
|
||||||
var val3 = $(z3).find('option[value="' + imp3 + '"]');
|
|
||||||
var a = val3.attr('id_jab');
|
|
||||||
if (!a) {$('#kode_id').first().focus().selected();}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
$("#satuan_kerja_dari").change(function(){
|
|
||||||
var satuan_kerja_dari2 = $('#satuan_kerja_dari').val();
|
|
||||||
var z32 = $('#browsers2');
|
|
||||||
var val32 = $(z32).find('option[value="' + satuan_kerja_dari2 + '"]');
|
|
||||||
var b = val32.attr('id_jab2');
|
|
||||||
var key = "list_satker";
|
|
||||||
if (!b) {
|
|
||||||
alert('Satuan kerja tidak terdaftar..');
|
|
||||||
$('#satuan_kerja_dari').val('');
|
|
||||||
$('#satuan_kerja_dari').first().focus().selected();
|
|
||||||
} else {
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$("#sifat_surat_id").focusin(function(){
|
|
||||||
var satuan_kerja_dari2 = $('#satuan_kerja_dari').val();
|
|
||||||
var z32 = $('#browsers2');
|
|
||||||
var val32 = $(z32).find('option[value="' + satuan_kerja_dari2 + '"]');
|
|
||||||
var b = val32.attr('id_jab2');
|
|
||||||
if (!b) {$('#satuan_kerja_dari').first().focus().selected();}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
+17
-10
@@ -1,13 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
include('../../koneksi.php');
|
include('../../koneksi.php');
|
||||||
$key=$_POST['key'];
|
$key = $_POST['key'];
|
||||||
if ($key=='delete_cv') {
|
if ($key == 'delete_cv') {
|
||||||
$id=$_POST['id'];
|
$id = $_POST['id'];
|
||||||
//$del_pr=pg_query("DELETE FROM scan WHERE id='$id'");
|
$d = pg_query($koneksi, "SELECT file FROM scan WHERE id='$id'");
|
||||||
$d=pg_query("SELECT file FROM scan WHERE id='$id'");
|
while ($r = pg_fetch_array($d)) {
|
||||||
while($r=pg_fetch_array($d)) {$fil=$r[0];}
|
$fil = $r[0];
|
||||||
$del_pr=pg_query("DELETE FROM scan WHERE id='$id'");
|
}
|
||||||
$path = "pdf/".$fil;
|
$del_pr = pg_query($koneksi, "DELETE FROM scan WHERE id='$id'");
|
||||||
if(file_exists($path)){unlink($path);}
|
$path = "../../../public/doc/smasuk/dok/" . $fil;
|
||||||
|
if (file_exists($path)) {
|
||||||
|
unlink($path);
|
||||||
|
http_response_code(200);
|
||||||
|
echo json_encode(['icon'=>'success','message'=>'File Telah Dihapus']);
|
||||||
|
}else{
|
||||||
|
http_response_code(200);
|
||||||
|
echo json_encode(['icon'=>'error','message'=>'File Gagal Dihapus']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
@@ -1,47 +1,67 @@
|
|||||||
<?php
|
<?php
|
||||||
include('../../koneksi.php');
|
include('../../koneksi.php');
|
||||||
if ($_POST['surat_idzz']) {
|
$baseURL = '../../../public/doc/smasuk/dok/';
|
||||||
$surat_id=$_POST['surat_idzz'];
|
if ($_POST['surat_idzz']) {
|
||||||
} else {
|
$surat_id = $_POST['surat_idzz'];
|
||||||
$surat_id='0';
|
} else {
|
||||||
}
|
$surat_id = '0';
|
||||||
?>
|
}
|
||||||
<input type="hidden" value="<?php echo $surat_id; ?>" id="surat_idxx">
|
?>
|
||||||
<?php
|
<input type="text" value="<?php echo $surat_id; ?>" id="surat_idxx">
|
||||||
$data_pdf=pg_query("SELECT file,id FROM scan WHERE surat_id='$surat_id' AND LOWER(file) LIKE '%.pdf' ORDER BY id DESC");
|
<?php
|
||||||
while($rdata_pdf=pg_fetch_array($data_pdf)) {$pdf=$rdata_pdf[0];
|
$data_pdf = pg_query($koneksi, "SELECT file,id FROM scan WHERE surat_id='$surat_id' AND LOWER(file) LIKE '%.pdf' ORDER BY id DESC");
|
||||||
if (($pdf==NULL) || ($pdf=='')) {/*echo "File PDF belum diupload..";*/} else {
|
while ($rdata_pdf = pg_fetch_array($data_pdf)) {
|
||||||
?>
|
$pdf = $rdata_pdf[0];
|
||||||
<div class="gal-detail thumb" style="height:345px;background-color:#ece9d8;">
|
if (($pdf == NULL) || ($pdf == '')) {/*echo "File PDF belum diupload..";*/
|
||||||
<embed src="app/smasuk/pdf/pdf/<?php echo $pdf; ?>#toolbar=0" width="100%" height="300"></embed>
|
} else {
|
||||||
<button type="button" name="cv_delete"
|
?>
|
||||||
style="height:22px;border-radius: 50%"class="btn btn-danger btn-xs pull-right" id="<?php echo $rdata_pdf[1];?>" data-content="Hapus" rel="popover"
|
<div class="gal-detail thumb" style="height:345px;background-color:#ece9d8;">
|
||||||
data-placement="bottom" data-trigger="hover">
|
<embed src="<?= $baseURL.$pdf; ?>#toolbar=0" width="100%" height="300"></embed>
|
||||||
<i class="fa fa-remove"></i>
|
<button type="button" name="cv_delete" style="height:22px;border-radius: 50%" class="btn btn-danger btn-xs pull-right" id="<?php echo $rdata_pdf[1]; ?>" data-content="Hapus" rel="popover" data-placement="bottom" data-trigger="hover">
|
||||||
</button>
|
<i class="fa fa-remove"></i>
|
||||||
</div>
|
</button>
|
||||||
<?php
|
</div>
|
||||||
}
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$('button[name="cv_delete"]').click(function(){
|
$('button[name="cv_delete"]').click(function() {
|
||||||
var x = confirm("Anda yakin ingin menghapus ?");
|
var x = confirm("Anda yakin ingin menghapus ?");
|
||||||
if (x) {
|
if (x) {
|
||||||
var key = "delete_cv";
|
var key = "delete_cv";
|
||||||
var id = $(this).attr('id');
|
var id = $(this).attr('id');
|
||||||
var rowElement = $(this).parent().parent();
|
var rowElement = $(this).parent().parent();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "app/smasuk/pdf/crud.php",
|
url: "app/smasuk/pdf/crud.php",
|
||||||
data: 'id='+id
|
data: 'id=' + id +
|
||||||
+'&key='+key,
|
'&key=' + key,
|
||||||
success: function(data){
|
success: function(response) {
|
||||||
var surat_id=$('#surat_idxx').val();
|
var result=JSON.parse(response);
|
||||||
$('#tabel_upl_cv').load("app/smasuk/pdf/tabel_upl_cv.php",{surat_id:surat_id});
|
infoToast(result.icon,result.message);
|
||||||
}
|
var surat_id = $('#surat_idxx').val();
|
||||||
});
|
$('#tabel_upl_cv').load("app/smasuk/pdf/tabel_upl_cv.php", {
|
||||||
} else {}
|
surat_id: surat_id
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
error:function(xhr){
|
||||||
|
var result = JSON.parse(xhr.responseText);
|
||||||
|
infoToast(result.icon,result.message);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function infoToast(icone, infone) {
|
||||||
|
Swal.fire({
|
||||||
|
// position: posisine,
|
||||||
|
icon: icone,
|
||||||
|
title: infone,
|
||||||
|
showConfirmButton: false,
|
||||||
|
timer: 2500
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@@ -1,16 +1,98 @@
|
|||||||
<?php
|
<?php
|
||||||
print_r($_POST);
|
|
||||||
include("../../koneksi.php");
|
include("../../koneksi.php");
|
||||||
$surat_id=$_POST['surat_id_upload'];
|
$surat_id = (int)$_POST['surat_id_upload'];
|
||||||
$folder = "pdf";
|
$baseURL = '../../../public/doc/';
|
||||||
|
$folder = 'smasuk/dok/';
|
||||||
|
// ______________________________________________________________________
|
||||||
|
// Cek apakah file yang diupload adalah PDF atau Dokumen Word
|
||||||
|
$allowed_types = array(
|
||||||
|
'application/pdf',
|
||||||
|
'application/msword',
|
||||||
|
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||||
|
'application/vnd.ms-excel',
|
||||||
|
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
||||||
|
);
|
||||||
|
$file_type = $_FILES["input_load_cv"]["type"];
|
||||||
|
$file_size = $_FILES["input_load_cv"]["size"];
|
||||||
|
$max_size = 1087152; // max 1Mb
|
||||||
|
|
||||||
|
// var_dump(['file'=>$_FILES,'id'=>$surat_id]);die();
|
||||||
|
|
||||||
|
if (!in_array($file_type, $allowed_types)) {
|
||||||
|
http_response_code(400);
|
||||||
|
$response = array('icon' => 'error', 'message' => 'File tidak diizinkan. <br> Hanya PDF, Word, Excel size max 1 Mb yang diperbolehkan.');
|
||||||
|
echo json_encode($response);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if ($file_size > $max_size) {
|
||||||
|
http_response_code(400);
|
||||||
|
$response = array('icon' => 'error', 'message' => 'File yang diupload terlalu besar. Ukuran maksimum adalah 1MB.');
|
||||||
|
echo json_encode($response);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
$tmp_name = $_FILES["input_load_cv"]["tmp_name"];
|
$tmp_name = $_FILES["input_load_cv"]["tmp_name"];
|
||||||
$name = $folder."/".$surat_id."_".$_FILES["input_load_cv"]["name"];
|
$name = $baseURL . $folder . "/" . $surat_id . "_" . $_FILES["input_load_cv"]["name"];
|
||||||
$name_pdf = $surat_id."_".$_FILES["input_load_cv"]["name"];
|
$name_pdf = $surat_id . "_" . $_FILES["input_load_cv"]["name"];
|
||||||
|
|
||||||
move_uploaded_file($tmp_name, $name);
|
|
||||||
$del=pg_query("DELETE FROM scan WHERE surat_id='$surat_id'");
|
|
||||||
$ins=pg_query("INSERT INTO scan (surat_id,file) VALUES (
|
|
||||||
'$surat_id','$name_pdf')");
|
|
||||||
?>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$temp_file = pg_query($koneksi, "SELECT file AS nm_file FROM scan WHERE surat_id = $surat_id");
|
||||||
|
$file = pg_fetch_assoc($temp_file);
|
||||||
|
|
||||||
|
if (empty($file['nm_file'])) {
|
||||||
|
$ins = pg_query($koneksi, "INSERT INTO scan (surat_id,file) VALUES (
|
||||||
|
$surat_id,'$name_pdf')");
|
||||||
|
if (!$ins) {
|
||||||
|
http_response_code(400);
|
||||||
|
$response = array('icon' => 'error', 'message' => 'Gagal insert data ke database.');
|
||||||
|
echo json_encode($response);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if (!move_uploaded_file($tmp_name, $name)) {
|
||||||
|
http_response_code(400);
|
||||||
|
$response = array('icon' => 'error', 'message' => 'Gagal upload file.');
|
||||||
|
echo json_encode($response);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
$response = ['surat_id' => $surat_id, 'icon' => 'success', 'message' => 'File berhasil diupload dan disimpan ke database.'];
|
||||||
|
http_response_code(200);
|
||||||
|
echo json_encode($response);
|
||||||
|
} else {
|
||||||
|
$path = "../../../public/doc/smasuk/dok/" . $file['nm_file'];
|
||||||
|
// var_dump($path);die();
|
||||||
|
if (file_exists($path)) {
|
||||||
|
unlink($path);
|
||||||
|
if (!move_uploaded_file($tmp_name, $name)) {
|
||||||
|
http_response_code(400);
|
||||||
|
$response = array('icon' => 'error', 'message' => 'Gagal upload file.');
|
||||||
|
echo json_encode($response);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
pg_query($koneksi, "UPDATE scan SET file = '$name_pdf' WHERE surat_id = $surat_id");
|
||||||
|
http_response_code(200);
|
||||||
|
echo json_encode(['icon' => 'success', 'message' => 'Lampiran telah Diubah']);
|
||||||
|
} else {
|
||||||
|
http_response_code(400);
|
||||||
|
echo json_encode(['icon' => 'error', 'message' => 'File Tidak ada']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Cek apakah file berhasil diupload
|
||||||
|
//
|
||||||
|
// $del = pg_query($koneksi, "DELETE FROM scan WHERE surat_id=$surat_id");
|
||||||
|
// if (!$del) {
|
||||||
|
// http_response_code(400);
|
||||||
|
// $response = array('icon' => 'error', 'message' => 'Gagal haapus data ke database.');
|
||||||
|
// echo json_encode($response);
|
||||||
|
// exit;
|
||||||
|
// } else {
|
||||||
|
|
||||||
|
// $path = "../../../public/doc/smasuk/dok/" . $file['nm_file'];
|
||||||
|
// if (file_exists($path)) {
|
||||||
|
// unlink($path);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|||||||
+129
-104
@@ -1,5 +1,7 @@
|
|||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
.gal-detail{ background: #f5f5f1 !important;}
|
.gal-detail {
|
||||||
|
background: #f5f5f1 !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
@@ -7,130 +9,153 @@ include("../koneksi.php");
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
<input type="text" value="<?php echo $surat_id; ?>" id="surat_id_upload">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<a class="btn btn-primary btn-custom waves-effect waves-light" role="button" id="btn_input_dok"><i class="fa fa-file-picture-o m-r-5"></i>Load JPG</a>
|
<a class="btn btn-primary btn-custom waves-effect waves-light" role="button" id="btn_input_dok"><i class="fa fa-file-picture-o m-r-5"></i>Load JPG</a>
|
||||||
<a class="btn btn-primary btn-custom waves-effect waves-light" role="button" id="btn_input_pdf"><i class="fa fa-file-pdf-o m-r-5"></i>Load PDF</a>
|
<a class="btn btn-primary btn-custom waves-effect waves-light" role="button" id="btn_input_pdf"><i class="fa fa-file-pdf-o m-r-5"></i>Load PDF</a>
|
||||||
</div>
|
</div>
|
||||||
<input type="hidden" value="<?php echo $surat_id; ?>" id="surat_id_upload">
|
<div id="dok_tbl"></div>
|
||||||
|
<!--</div>
|
||||||
<div id="dok_tbl"></div>
|
|
||||||
<!--</div>
|
|
||||||
<div class="col-lg-8">-->
|
<div class="col-lg-8">-->
|
||||||
<form id="fr_cv" name="fr_cv" class="form-inline" method="post" onsubmit="return false;" enctype="multipart/form-data">
|
<form id="fr_cv" name="fr_cv" class="form-inline" method="post" onsubmit="return false;" enctype="multipart/form-data">
|
||||||
<input type="hidden" value="<?php echo $surat_id; ?>" name="surat_id_upload">
|
<div class="btn-group btn-group-justified singit">
|
||||||
<div class="btn-group btn-group-justified singit">
|
<a class="btn btn-default waves-effect waves-light" role="button" id="btn_load_cv"><i class="fa fa-folder-open"></i> Load PDF</a>
|
||||||
<a class="btn btn-default waves-effect waves-light" role="button" id="btn_load_cv"><i class="fa fa-folder-open"></i> Load PDF</a>
|
<a class="btn btn-danger waves-effect waves-light" role="button" id="btn_upl_cv"><i class="fa fa-upload"></i> Upload</a>
|
||||||
<a class="btn btn-danger waves-effect waves-light" role="button" id="btn_upl_cv"><i class="fa fa-upload"></i> Upload</a>
|
</div>
|
||||||
</div>
|
<input type="text" name="riwayat_kegiatan_id">
|
||||||
<input type="hidden" name="riwayat_kegiatan_id">
|
<input type="file" name="input_load_cv" class="filestyle" accept=".pdf" style="display:none" data-buttonbefore="true" id="input_load_cv">
|
||||||
<input type="file" name="input_load_cv" class="filestyle" accept=".pdf" style="display:none" data-buttonbefore="true" id="input_load_cv">
|
|
||||||
</form>
|
</form>
|
||||||
<div id="tabel_upl_cv"></div>
|
<div id="tabel_upl_cv"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="modal" id="modal_dok">
|
||||||
|
<div class="modal-dialog">
|
||||||
<div class="modal" id="modal_dok">
|
<div class="modal-content">
|
||||||
<div class="modal-dialog">
|
<div class="modal-header no-border">
|
||||||
<div class="modal-content">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
<div class="modal-header no-border">
|
<span aria-hidden="true">×</span></button>
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<h4 class="modal-title">Upload Dokumen</h4>
|
||||||
<span aria-hidden="true">×</span></button>
|
</div>
|
||||||
<h4 class="modal-title">Upload Dokumen</h4>
|
<div class="modal-body md_input_bd" id="isi_modal_dok"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body md_input_bd" id="isi_modal_dok"></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$('.singit').hide();
|
||||||
|
var aa = $('#surat_id_upload').val();
|
||||||
|
var bb = $('input[type="surat_id_upload"]').val();
|
||||||
|
var cc = $('#surat_idc').val();
|
||||||
|
|
||||||
|
if (bb == '') {
|
||||||
|
var surat_idpdf = bb;
|
||||||
|
} else {
|
||||||
|
var surat_idpdf = cc;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
<!-- <script type="text/javascript" src="assets/plugins/magnific-popup/js/jquery.magnific-popup.min.js"></script> -->
|
$('#btn_upl_cv').hide();
|
||||||
|
|
||||||
<script type="text/javascript">
|
$('#tabel_upl_cv').load("app/smasuk/pdf/tabel_upl_cv.php", {
|
||||||
$('.singit').hide();
|
surat_idzz: surat_idpdf
|
||||||
|
});
|
||||||
|
$('#dok_tbl').load("app/smasuk/tabel.php", {
|
||||||
|
surat_id: surat_idpdf
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#btn_load_cv').click(function() {
|
||||||
|
$('#input_load_cv').trigger('click');
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#input_load_cv').change(function(e) {
|
||||||
|
var fileName = e.target.files[0].name;
|
||||||
|
$("#btn_upl_cv").trigger('click');
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#btn_upl_cv').click(function() {
|
||||||
|
$("#fr_cv").trigger('submit');
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#fr_cv").on('submit', (function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
var formData = new FormData();
|
||||||
|
var surat_id = $('#surat_id_upload').val();
|
||||||
|
var fileInput = $('#input_load_cv')[0].files[0];
|
||||||
|
|
||||||
|
formData.append('surat_id_upload', surat_id);
|
||||||
|
formData.append('input_load_cv', fileInput);
|
||||||
|
$.ajax({
|
||||||
|
url: "app/smasuk/pdf/upl_cv.php",
|
||||||
|
type: "POST",
|
||||||
|
data: formData,
|
||||||
|
contentType: false,
|
||||||
|
cache: false,
|
||||||
|
processData: false,
|
||||||
|
success: function(response) {
|
||||||
|
var result = JSON.parse(response);
|
||||||
|
infoToast(result.icon, result.message);
|
||||||
var aa = $('#surat_id_upload').val();
|
var aa = $('#surat_id_upload').val();
|
||||||
var bb = $('input[type="surat_id_upload"]').val();
|
var bb = $('input[type="surat_id_upload"]').val();
|
||||||
var cc = $('#surat_idc').val();
|
var cc = $('#surat_idc').val();
|
||||||
|
|
||||||
if (bb=='') {var surat_idpdf=bb;} else {var surat_idpdf=cc;}
|
if (bb == '') {
|
||||||
|
var surat_idpdf = bb;
|
||||||
// var surat_idpdf=$('#surat_id_upload').val();
|
} else {
|
||||||
|
var surat_idpdf = aa;
|
||||||
// var surat_idpdf=$('#surat_idc').val();
|
}
|
||||||
|
$('#tabel_upl_cv').load("app/smasuk/pdf/tabel_upl_cv.php", {
|
||||||
|
surat_idzz: surat_idpdf
|
||||||
$('#btn_upl_cv').hide();
|
|
||||||
|
|
||||||
$('#tabel_upl_cv').load("app/smasuk/pdf/tabel_upl_cv.php",{surat_idzz:surat_idpdf});
|
|
||||||
$('#dok_tbl').load("app/smasuk/tabel.php", {surat_id: surat_idpdf});
|
|
||||||
|
|
||||||
$('#btn_load_cv').click(function(){
|
|
||||||
$('#input_load_cv').trigger('click');
|
|
||||||
});
|
});
|
||||||
|
$('#dok_tbl').load("app/smasuk/tabel.php", {
|
||||||
$('#input_load_cv').change(function(e){
|
surat_id: surat_idpdf
|
||||||
var fileName = e.target.files[0].name;
|
|
||||||
//$("#btn_upl_cv").show();
|
|
||||||
$("#btn_upl_cv").trigger('click');
|
|
||||||
});
|
});
|
||||||
|
$("#btn_upl_cv").hide();
|
||||||
$('#btn_upl_cv').click(function(){
|
},
|
||||||
$("#fr_cv").trigger('submit');
|
error: function(xhr) {
|
||||||
});
|
var result = JSON.parse(xhr.responseText);
|
||||||
|
infoToast(result.icon, result.message);
|
||||||
$("#fr_cv").on('submit',(function(e) {
|
}
|
||||||
e.preventDefault();
|
});
|
||||||
$.ajax({
|
}));
|
||||||
url: "app/smasuk/pdf/upl_cv.php",
|
|
||||||
type: "POST",
|
|
||||||
data: new FormData(this),
|
|
||||||
contentType: false,
|
|
||||||
cache: false,
|
|
||||||
processData:false,
|
|
||||||
success: function(data) {
|
|
||||||
var aa = $('#surat_id_upload').val();
|
|
||||||
var bb = $('input[type="surat_id_upload"]').val();
|
|
||||||
var cc = $('#surat_idc').val();
|
|
||||||
|
|
||||||
if (bb=='') {var surat_idpdf=bb;} else {var surat_idpdf=aa;}
|
|
||||||
alert('Data tersimpan..');
|
|
||||||
$('#tabel_upl_cv').load("app/smasuk/pdf/tabel_upl_cv.php",{surat_idzz:surat_idpdf});
|
|
||||||
$('#dok_tbl').load("app/smasuk/tabel.php", {surat_id: surat_idpdf});
|
|
||||||
$("#btn_upl_cv").hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}));
|
|
||||||
|
|
||||||
|
|
||||||
|
$('#btn_input_dok').click(function() {
|
||||||
|
var surat_id = $('#surat_id_upload').val();
|
||||||
|
$("#modal_dok").modal('show');
|
||||||
|
$("#isi_modal_dok").html("");
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "app/smasuk/modal_dok.php",
|
||||||
|
data: 'surat_id=' + surat_id,
|
||||||
|
success: function(data) {
|
||||||
|
$('#isi_modal_dok').html(data);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#modal_dok").on("hidden.bs.modal", function() {
|
||||||
|
$(this).off('hidden.bs.modal');
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#btn_input_pdf').click(function() {
|
||||||
|
$('#btn_load_cv').trigger('click');
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function infoToast(icone, infone) {
|
||||||
$('#btn_input_dok').click(function(){
|
Swal.fire({
|
||||||
var surat_id = $('#surat_id_upload').val();
|
// position: posisine,
|
||||||
$("#modal_dok").modal('show');
|
icon: icone,
|
||||||
$("#isi_modal_dok").html("");
|
title: infone,
|
||||||
$.ajax({
|
showConfirmButton: false,
|
||||||
type: "POST",
|
timer: 2500
|
||||||
url: "app/smasuk/modal_dok.php",
|
});
|
||||||
data: 'surat_id='+surat_id,
|
}
|
||||||
success: function(data){$('#isi_modal_dok').html(data);}
|
</script>
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#modal_dok").on("hidden.bs.modal", function () {
|
|
||||||
$(this).off('hidden.bs.modal');
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#btn_input_pdf').click(function(){
|
|
||||||
$('#btn_load_cv').trigger('click');
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
@@ -74,24 +74,24 @@ switch ($key) {
|
|||||||
|
|
||||||
$satuan_kerja_id = $_POST['satuan_kerja_id'];
|
$satuan_kerja_id = $_POST['satuan_kerja_id'];
|
||||||
$result = pg_query($koneksi, "SELECT MIN(k.id) AS kirimidmn
|
$result = pg_query($koneksi, "SELECT MIN(k.id) AS kirimidmn
|
||||||
FROM kirim k
|
FROM kirim k
|
||||||
INNER JOIN surat s ON k.surat_id = s.id
|
INNER JOIN surat s ON k.surat_id = s.id
|
||||||
LEFT JOIN teruskan t ON k.id = t.kirim_id_untuk
|
LEFT JOIN teruskan t ON k.id = t.kirim_id_untuk
|
||||||
WHERE k.kepada IS NOT NULL AND k.surat_id = $surat_id
|
WHERE k.kepada IS NOT NULL AND k.surat_id = $surat_id
|
||||||
AND t.jabatan_dari IS NULL AND k.satuan_kerja_penginput = $satuan_kerja_id
|
AND t.jabatan_dari IS NULL AND k.satuan_kerja_penginput = $satuan_kerja_id
|
||||||
");
|
");
|
||||||
$row = pg_fetch_assoc($result);
|
$row = pg_fetch_assoc($result);
|
||||||
$kirimidmn = $row['kirimidmn'];
|
$kirimidmn = $row['kirimidmn'];
|
||||||
|
|
||||||
pg_query($koneksi, "DELETE FROM kirim WHERE surat_id = $surat_id AND id = $kirimidmn");
|
pg_query($koneksi, "DELETE FROM kirim WHERE surat_id = $surat_id AND id = $kirimidmn");
|
||||||
pg_query($koneksi, "DELETE FROM kirim WHERE surat_id = $surat_id AND satuan_kerja_penginput <> $satuan_kerja_id");
|
pg_query($koneksi, "DELETE FROM kirim WHERE surat_id = $surat_id AND satuan_kerja_penginput <> $satuan_kerja_id");
|
||||||
|
|
||||||
$result = pg_query($koneksi, "SELECT MIN(k.id) AS kirimid
|
$result = pg_query($koneksi, "SELECT MIN(k.id) AS kirimid
|
||||||
FROM kirim k
|
FROM kirim k
|
||||||
INNER JOIN surat s ON k.surat_id = s.id
|
INNER JOIN surat s ON k.surat_id = s.id
|
||||||
LEFT JOIN teruskan t ON k.id = t.kirim_id_untuk
|
LEFT JOIN teruskan t ON k.id = t.kirim_id_untuk
|
||||||
WHERE k.kepada IS NOT NULL AND k.surat_id = $surat_id
|
WHERE k.kepada IS NOT NULL AND k.surat_id = $surat_id
|
||||||
AND t.jabatan_dari IS NULL AND k.satuan_kerja_penginput = $satuan_kerja_id
|
AND t.jabatan_dari IS NULL AND k.satuan_kerja_penginput = $satuan_kerja_id
|
||||||
");
|
");
|
||||||
$row = pg_fetch_assoc($result);
|
$row = pg_fetch_assoc($result);
|
||||||
$kirimid = $row['kirimid'];
|
$kirimid = $row['kirimid'];
|
||||||
@@ -342,38 +342,6 @@ switch ($key) {
|
|||||||
}
|
}
|
||||||
echo $hsl;
|
echo $hsl;
|
||||||
break;
|
break;
|
||||||
// case 'pengajuan_ulang':
|
|
||||||
// $surat_id = $_POST['surat_id'];
|
|
||||||
// var_dump($surat_id);
|
|
||||||
// pg_query($koneksi, "UPDATE surat SET stts_kendali =98 WHERE id=$surat_id ");
|
|
||||||
// break;
|
|
||||||
case 'selesai_kepada_tl':
|
|
||||||
$surat_id = $_POST['surat_id'];
|
|
||||||
$kepada = $_POST['kepada'];
|
|
||||||
$satuan_kerja_penginput = $_POST['satuan_kerja_penginput'];
|
|
||||||
|
|
||||||
foreach ($kepada as $kpd) {
|
|
||||||
$cek_satker = pg_query($koneksi, "SELECT id FROM kirim WHERE surat_id='$surat_id' AND kepada='$kpd' AND satuan_kerja_penginput='$satuan_kerja_penginput' AND satuan_kerja_tujuan IS NULL");
|
|
||||||
$row_satker = pg_fetch_row($cek_satker);
|
|
||||||
// var_dump($kpd);
|
|
||||||
// die();
|
|
||||||
if ($row_satker[0] == 0) {
|
|
||||||
$cdata = pg_query($koneksi, "SELECT COUNT(*) FROM kirim WHERE surat_id='$surat_id' AND satuan_kerja_penginput='$satuan_kerja_penginput' AND satuan_kerja_tujuan IS NULL");
|
|
||||||
$rcdata = pg_fetch_array($cdata);
|
|
||||||
$jdata = $rcdata[0];
|
|
||||||
|
|
||||||
if ($jdata == 0) {
|
|
||||||
$inp = pg_query($koneksi, "INSERT INTO kirim (surat_id, kepada, tgl_input, jam_input, satuan_kerja_penginput) VALUES ('$surat_id', '$kpd', NOW(), NOW(), '$satuan_kerja_penginput')");
|
|
||||||
} else {
|
|
||||||
$inp = pg_query($koneksi, "INSERT INTO kirim (surat_id, kepada, tgl_input, jam_input, satuan_kerja_penginput, isi) VALUES ('$surat_id', '$kpd', NOW(), NOW(), '$satuan_kerja_penginput', 'SM')");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
echo json_encode(['icon' => 'success', 'message' => 'Kirim Tujuan sudah Ditambahkan']);
|
|
||||||
break;
|
|
||||||
break;
|
|
||||||
case "gagal":
|
case "gagal":
|
||||||
echo 'gagaaaaaal';
|
echo 'gagaaaaaal';
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -31,15 +31,6 @@ if (($disp_thn == NULL) || ($disp_thn == '')) {
|
|||||||
|
|
||||||
<input type="hidden" id="sat" value="<?php echo $_POST['sat']; ?>">
|
<input type="hidden" id="sat" value="<?php echo $_POST['sat']; ?>">
|
||||||
<p class="judul_page"><i class="mdi mdi-email-outline m-r-5"></i>Surat Pengesahan</p>
|
<p class="judul_page"><i class="mdi mdi-email-outline m-r-5"></i>Surat Pengesahan</p>
|
||||||
<!-- <div class="alert alert-icon alert-info alert-dismissible fade in" role="alert" style="color:green">
|
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
|
||||||
<span aria-hidden="true">×</span>
|
|
||||||
</button>
|
|
||||||
<i class="mdi mdi-information"></i>
|
|
||||||
<span><strong>PERHATIAN!</strong></span><br>
|
|
||||||
<span>Surat-surat yang ditujukan KEPADA Direktur, mohon dikirim ke Sub Koordinator Tatausaha untuk diproses</span><br>
|
|
||||||
<span>Kecuali surat tembusan, bisa langsung diarahkan ke Direktur</span><br>
|
|
||||||
</div> -->
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-3">
|
<div class="col-lg-3">
|
||||||
<button type="button" class="btn btn-danger btn-rounded btn-block" id="tambah_kirim">
|
<button type="button" class="btn btn-danger btn-rounded btn-block" id="tambah_kirim">
|
||||||
@@ -63,12 +54,17 @@ if (($disp_thn == NULL) || ($disp_thn == '')) {
|
|||||||
</div>
|
</div>
|
||||||
<div class="pull-right" style="padding-right: 3%;">
|
<div class="pull-right" style="padding-right: 3%;">
|
||||||
<button class="download-collapse has_sub">Template <span class="fa fa-arrow-circle-o-down"> </span></button>
|
<button class="download-collapse has_sub">Template <span class="fa fa-arrow-circle-o-down"> </span></button>
|
||||||
<?php $base_url='app/master/naskah_dinas/template_naskah/SURKEL_RALAT_UNDANGAN_PENATAAN_GRAND_PAV.doc'?>
|
<?php
|
||||||
|
$base_url = '../../../public/doc/master/template_naskah/';
|
||||||
|
$result = pg_query($koneksi, "SELECT nama_file,keterangan FROM tmplt_naskah_dinas");
|
||||||
|
?>
|
||||||
<div class="container-download">
|
<div class="container-download">
|
||||||
<li class="has_sub" style="padding: 7px;"><a target="_blank" href='<?php echo $base_url; ?>'>Naskah Dinas</a></li>
|
<?php while ($query = pg_fetch_assoc($result)) { ?>
|
||||||
<!-- <li class="has_sub" style="padding: 7px;"><a href="http://">dsadasds</a></li> -->
|
<li class="has_sub" style="padding: 7px;">
|
||||||
|
<a target="_blank" href='<?php echo $base_url . $query['nama_file']; ?>'><?= $query['keterangan'] ?></a>
|
||||||
|
</li>
|
||||||
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -299,8 +295,8 @@ if (($disp_thn == NULL) || ($disp_thn == '')) {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
transition: max-height 0.2s ease-out;
|
transition: max-height 0.2s ease-out;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
position:fixed;
|
position: fixed;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container-download .has_sub {
|
.container-download .has_sub {
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ while ($row = pg_fetch_assoc($query_sifat)) {
|
|||||||
$kd_surat_options = '';
|
$kd_surat_options = '';
|
||||||
$query_kdSurat = $kd_surat_id !== ''
|
$query_kdSurat = $kd_surat_id !== ''
|
||||||
? pg_query_params($koneksi, 'SELECT id, kode, keterangan FROM kode WHERE id = $1', array($kd_surat_id))
|
? pg_query_params($koneksi, 'SELECT id, kode, keterangan FROM kode WHERE id = $1', array($kd_surat_id))
|
||||||
: pg_query($koneksi, 'SELECT id, kode, keterangan FROM kode');
|
: pg_query($koneksi, 'SELECT id, kode, keterangan FROM kode WHERE status = 1');
|
||||||
while ($row = pg_fetch_assoc($query_kdSurat)) {
|
while ($row = pg_fetch_assoc($query_kdSurat)) {
|
||||||
$kd_surat_options .= "<option kode_id='" . $row['id'] . "' value='" . $row['kode'] . " - " . $row['keterangan'] . "'></option>";
|
$kd_surat_options .= "<option kode_id='" . $row['id'] . "' value='" . $row['kode'] . " - " . $row['keterangan'] . "'></option>";
|
||||||
$kd_surat_optionsssss .= "<option value=" . $row['id'] . ">" . $row['kode'] . "-" . $row['keterangan'] . "</option>";
|
$kd_surat_optionsssss .= "<option value=" . $row['id'] . ">" . $row['kode'] . "-" . $row['keterangan'] . "</option>";
|
||||||
@@ -88,7 +88,8 @@ $perihal = $result_surat['perihal'] ?? '';
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Penandatangan</label>
|
<label>Penandatangan</label>
|
||||||
<select name="penandatangan_id" id="penandatangan_id" class="form-control" style="width: 40%;display: inline; margin-left: 1rem;">
|
<!-- -->
|
||||||
|
<select name="penandatangan_id" id="penandatangan_id" class="form-control" style="width: 40%;display: inline; margin-left: 3rem;">
|
||||||
<?php echo $penandatangan ?>
|
<?php echo $penandatangan ?>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,16 +1,40 @@
|
|||||||
<?php
|
<?php
|
||||||
include('../../koneksi.php');
|
include('../../koneksi.php');
|
||||||
|
$id = $_POST['id'];
|
||||||
$key = $_POST['key'];
|
$key = $_POST['key'];
|
||||||
|
$dir = '../../../public/doc/spengesahan/';
|
||||||
|
|
||||||
if ($key == 'delete_cv') {
|
if ($key == 'delete_cv') {
|
||||||
$id = $_POST['id'];
|
// Query untuk mengambil nama file dari database
|
||||||
//$del_pr=pg_query("DELETE FROM scan WHERE id='$id'");
|
$query = pg_query_params($koneksi, "SELECT file FROM scan WHERE id=$1", array($id));
|
||||||
$d = pg_query($koneksi, "SELECT file FROM scan WHERE id='$id'");
|
if ($query) {
|
||||||
while ($r = pg_fetch_array($d)) {
|
$r = pg_fetch_assoc($query);
|
||||||
$fil = $r[0];
|
if ($r) {
|
||||||
}
|
$fil = $r['file'];
|
||||||
$del_pr = pg_query($koneksi, "DELETE FROM scan WHERE id='$id'");
|
$path = $dir . 'dok/' . $fil;
|
||||||
$path = "pdf/" . $fil;
|
|
||||||
if (file_exists($path)) {
|
// Menghapus data dari database
|
||||||
unlink($path);
|
$del_pr = pg_query_params($koneksi, "DELETE FROM scan WHERE id=$1", array($id));
|
||||||
|
if ($del_pr) {
|
||||||
|
// Menghapus file jika ada
|
||||||
|
if (file_exists($path)) {
|
||||||
|
unlink($path);
|
||||||
|
http_response_code(200);
|
||||||
|
echo json_encode(['icon' => 'success', 'message' => 'Berhasil Dihapus..!!']);
|
||||||
|
} else {
|
||||||
|
http_response_code(404);
|
||||||
|
echo json_encode(['icon' => 'error', 'message' => 'File tidak ditemukan.']);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
http_response_code(500);
|
||||||
|
echo json_encode(['icon' => 'error', 'message' => 'Gagal menghapus data dari database.']);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
http_response_code(404);
|
||||||
|
echo json_encode(['icon' => 'error', 'message' => 'Data tidak ditemukan.']);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
http_response_code(500);
|
||||||
|
echo json_encode(['icon' => 'error', 'message' => 'Gagal mengambil data dari database.']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -5,6 +5,9 @@ if ($_POST['surat_idzz']) {
|
|||||||
} else {
|
} else {
|
||||||
$surat_id = '0';
|
$surat_id = '0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$baseURL = '../../../public/doc/';
|
||||||
|
$folder = 'spengesahan/dok/';
|
||||||
?>
|
?>
|
||||||
<input type="hidden" value="<?php echo $surat_id; ?>" id="surat_idxz" style="margin-bottom:6px">
|
<input type="hidden" value="<?php echo $surat_id; ?>" id="surat_idxz" style="margin-bottom:6px">
|
||||||
<?php
|
<?php
|
||||||
@@ -22,8 +25,7 @@ while ($rdata_pdf = pg_fetch_array($data_pdf)) {
|
|||||||
} else {
|
} else {
|
||||||
?>
|
?>
|
||||||
<div class="thumb" style="background-color:#ece9d8;padding:8px;margin-top:6px">
|
<div class="thumb" style="background-color:#ece9d8;padding:8px;margin-top:6px">
|
||||||
<a href='app/spengesahan/pdf/pdf/<?php echo $pdf; ?>' target='_blank'><?php echo $pdf; ?></a>
|
<a href='<?php echo $baseURL.$folder.$pdf; ?>' target='_blank'><?php echo $pdf; ?></a>
|
||||||
<!--<embed src="app/kirim/pdf/pdf/<?php echo $pdf; ?>#toolbar=0" width="100%" height="300"></embed>-->
|
|
||||||
<button type="button" name="cv_deletse" style="height:22px;border-radius: 50%" class="btn btn-danger btn-xs pull-right" id="<?php echo $rdata_pdf[1]; ?>" data-content="Hapus" rel="popover" data-placement="bottom" data-trigger="hover">
|
<button type="button" name="cv_deletse" style="height:22px;border-radius: 50%" class="btn btn-danger btn-xs pull-right" id="<?php echo $rdata_pdf[1]; ?>" data-content="Hapus" rel="popover" data-placement="bottom" data-trigger="hover">
|
||||||
<i class="fa fa-remove"></i>
|
<i class="fa fa-remove"></i>
|
||||||
</button>
|
</button>
|
||||||
@@ -43,7 +45,10 @@ while ($rdata_pdf = pg_fetch_array($data_pdf)) {
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "app/spengesahan/pdf/crud.php",
|
url: "app/spengesahan/pdf/crud.php",
|
||||||
data:{id:id,key:key},
|
data: {
|
||||||
|
id: id,
|
||||||
|
key: key
|
||||||
|
},
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
var surat_id = $('#surat_idxz').val();
|
var surat_id = $('#surat_idxz').val();
|
||||||
$('#tabel_upl_cvz').load("app/spengesahan/pdf/tabel_upl_cv.php", {
|
$('#tabel_upl_cvz').load("app/spengesahan/pdf/tabel_upl_cv.php", {
|
||||||
@@ -53,7 +58,10 @@ while ($rdata_pdf = pg_fetch_array($data_pdf)) {
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "app/spengesahan/crud.php",
|
url: "app/spengesahan/crud.php",
|
||||||
data: {surat_id:surat_id,key:key},
|
data: {
|
||||||
|
surat_id: surat_id,
|
||||||
|
key: key
|
||||||
|
},
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
$('.sr' + surat_id).html(' (' + data + ')');
|
$('.sr' + surat_id).html(' (' + data + ')');
|
||||||
$('.xr' + surat_id).html(data);
|
$('.xr' + surat_id).html(data);
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
include("../../koneksi.php");
|
include("../../koneksi.php");
|
||||||
|
|
||||||
$surat_id = $_POST['surat_id_uploadz'];
|
$surat_id = $_POST['surat_id_uploadz'];
|
||||||
$folder = "pdf";
|
$baseURL = '../../../public/doc/';
|
||||||
|
$folder = 'spengesahan/dok/';
|
||||||
|
|
||||||
// Cek apakah file yang diupload adalah PDF atau Dokumen Word
|
// Cek apakah file yang diupload adalah PDF atau Dokumen Word
|
||||||
$allowed_types = array(
|
$allowed_types = array(
|
||||||
@@ -18,7 +19,7 @@ $max_size = 1087152; // max 1Mb
|
|||||||
|
|
||||||
|
|
||||||
if (!in_array($file_type, $allowed_types)) {
|
if (!in_array($file_type, $allowed_types)) {
|
||||||
$response = array('status' => 'error', 'message' => 'File tidak diizinkan. <br> Hanya PDF, Word, , Excel size max 1 Mb yang diperbolehkan.');
|
$response = array('status' => 'error', 'message' => 'File tidak diizinkan. <br> Hanya PDF, Word, Excel size max 1 Mb yang diperbolehkan.');
|
||||||
echo json_encode($response);
|
echo json_encode($response);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@@ -29,7 +30,7 @@ if ($file_size > $max_size) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$tmp_name = $_FILES["input_load_cvz"]["tmp_name"];
|
$tmp_name = $_FILES["input_load_cvz"]["tmp_name"];
|
||||||
$name = $folder . "/" . $surat_id . "_" . $_FILES["input_load_cvz"]["name"];
|
$name = $baseURL.$folder . $surat_id . "_" . $_FILES["input_load_cvz"]["name"];
|
||||||
$name_pdf = $surat_id . "_" . $_FILES["input_load_cvz"]["name"];
|
$name_pdf = $surat_id . "_" . $_FILES["input_load_cvz"]["name"];
|
||||||
|
|
||||||
// Cek apakah file berhasil diupload
|
// Cek apakah file berhasil diupload
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ $satuan_kerja_id = $_POST['satuan_kerja_id'];
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody style="color:black">
|
<tbody style="color:black">
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$d = pg_query(
|
$d = pg_query(
|
||||||
$koneksi,
|
$koneksi,
|
||||||
"SELECT j.nama AS jabatan_nama, k.id, k.tgl_diterima, k.satuan_kerja_tujuan,
|
"SELECT j.nama AS jabatan_nama, k.id, k.tgl_diterima, k.satuan_kerja_tujuan,
|
||||||
@@ -50,12 +49,6 @@ $satuan_kerja_id = $_POST['satuan_kerja_id'];
|
|||||||
AND k.satuan_kerja_penginput = " . $satuan_kerja_id . "
|
AND k.satuan_kerja_penginput = " . $satuan_kerja_id . "
|
||||||
ORDER BY k.id;"
|
ORDER BY k.id;"
|
||||||
);
|
);
|
||||||
// $d = pg_query($koneksi, "SELECT
|
|
||||||
// (SELECT j.nama FROM jabatan_pegawai j WHERE j.id=k.kepada),k.id,k.tgl_diterima,k.satuan_kerja_tujuan,(row_number() OVER (ORDER BY k.id))
|
|
||||||
// FROM kirim k INNER JOIN surat s ON (k.surat_id=s.id)
|
|
||||||
// LEFT JOIN teruskan t ON (k.id=t.kirim_id_untuk)
|
|
||||||
// WHERE k.kepada IS NOT NULL AND k.surat_id='".$surat_id."' AND t.jabatan_dari IS NULL AND k.satuan_kerja_penginput=".$satuan_kerja_id."
|
|
||||||
// ORDER BY k.id ");
|
|
||||||
while ($r = pg_fetch_array($d)) {
|
while ($r = pg_fetch_array($d)) {
|
||||||
$terkirim = $r['satuan_kerja_tujuan'];
|
$terkirim = $r['satuan_kerja_tujuan'];
|
||||||
?>
|
?>
|
||||||
@@ -102,9 +95,7 @@ while ($rn = pg_fetch_array($n)) {
|
|||||||
$('#kirim_bos').hide();
|
$('#kirim_bos').hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$("#tabel_data_kepada_kr").on('click', '.delete_kepada_kr', function() {
|
$("#tabel_data_kepada_kr").on('click', '.delete_kepada_kr', function() {
|
||||||
|
|
||||||
var key = "delete_kepada_kr";
|
var key = "delete_kepada_kr";
|
||||||
var id = $(this).attr('id');
|
var id = $(this).attr('id');
|
||||||
var surat_id = $('#surat_idxxx').val();
|
var surat_id = $('#surat_idxxx').val();
|
||||||
|
|||||||
+86
-107
@@ -1,11 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
include("../koneksi.php");
|
include("../koneksi.php");
|
||||||
$satuan_kerja_id = $_POST['satker'];
|
$satuan_kerja_id = $_POST['satker'] ?? null;
|
||||||
$jenis_user = $_POST['jenis'];
|
$jenis_user = $_POST['jenis'];
|
||||||
$sess_nama = $_POST['sess_nama'];
|
$sess_nama = $_POST['sess_nama'];
|
||||||
|
|
||||||
$bln2 = $_POST['bln2'];
|
$bln2 = $_POST['bln2'] ?? '';
|
||||||
$thn2 = $_POST['thn2'];
|
$thn2 = $_POST['thn2'] ?? '';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<input type="hidden" id="jenis" value="<?php echo $jenis_user; ?>">
|
<input type="hidden" id="jenis" value="<?php echo $jenis_user; ?>">
|
||||||
@@ -44,133 +44,115 @@ $thn2 = $_POST['thn2'];
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
$data = pg_query($koneksi, "SELECT surat.tgl_surat_keluar, surat.perihal, surat.satuan_kerja_id, surat.id AS surat_id, sifat_surat.sifat, surat.stts_kendali, surat.no_surat, surat.flag_baca_tu,
|
$data = pg_query_params(
|
||||||
kirim.surat_id AS kirimid, surat.jenis_surat_id, surat.sifat_surat_id, surat.kode_id AS kd_surat,surat.penandatangan_id,surat.tgl_kirim, surat.no_register
|
$koneksi,
|
||||||
FROM surat
|
"SELECT surat.tgl_surat_keluar, surat.perihal, surat.satuan_kerja_id, surat.id AS surat_id, sifat_surat.sifat, surat.stts_kendali,
|
||||||
LEFT JOIN kirim ON kirim.surat_id = surat.id
|
surat.no_surat, surat.flag_baca_tu, kirim.surat_id AS kirimid, surat.jenis_surat_id, surat.sifat_surat_id, surat.kode_id AS kd_surat,
|
||||||
INNER JOIN sifat_surat ON sifat_surat.id = surat.sifat_surat_id
|
surat.penandatangan_id, surat.tgl_kirim, surat.no_register
|
||||||
WHERE surat.satuan_kerja_id = '$satuan_kerja_id'
|
FROM
|
||||||
AND COALESCE(tahun, '') <> 'batal'
|
surat
|
||||||
AND (('$thn2' = '') OR (EXTRACT(YEAR FROM DATE(surat.tgl_surat_keluar)) = '$thn2'))
|
LEFT JOIN
|
||||||
AND (('$bln2' = '0') OR (EXTRACT(MONTH FROM DATE(surat.tgl_surat_keluar)) = '$bln2'))
|
kirim ON kirim.surat_id = surat.id
|
||||||
AND surat.pengesahan = 1
|
INNER JOIN
|
||||||
GROUP BY surat.tgl_surat_keluar, surat.perihal, surat.satuan_kerja_id, surat.id, kirim.surat_id,kirimid, sifat_surat.sifat, surat.stts_kendali,surat.tgl_kirim,surat.flag_baca_tu
|
sifat_surat ON sifat_surat.id = surat.sifat_surat_id
|
||||||
ORDER BY surat.tgl_surat_keluar DESC
|
WHERE
|
||||||
");
|
surat.satuan_kerja_id = $1
|
||||||
|
AND COALESCE(surat.tahun, '') <> 'batal'
|
||||||
|
AND (('$thn2' = '') OR (EXTRACT(YEAR FROM DATE(surat.tgl_surat_keluar)) = '$thn2'))
|
||||||
|
AND (('$bln2' = '0') OR (EXTRACT(MONTH FROM DATE(surat.tgl_surat_keluar)) = '$bln2'))
|
||||||
|
AND surat.pengesahan = 1
|
||||||
|
GROUP BY surat.tgl_surat_keluar, surat.perihal, surat.satuan_kerja_id, surat.id,
|
||||||
|
sifat_surat.sifat, surat.stts_kendali, surat.no_surat, surat.flag_baca_tu, kirim.surat_id,
|
||||||
|
surat.jenis_surat_id, surat.sifat_surat_id, surat.kode_id, surat.penandatangan_id, surat.tgl_kirim,
|
||||||
|
surat.no_register
|
||||||
|
ORDER BY
|
||||||
|
surat.tgl_surat_keluar DESC;",
|
||||||
|
array($satuan_kerja_id)
|
||||||
|
);
|
||||||
|
|
||||||
$nomer = 1;
|
$nomer = 1;
|
||||||
while ($r = pg_fetch_array($data)) {
|
while ($r = pg_fetch_assoc($data)) {
|
||||||
$surat_id = htmlspecialchars($r['surat_id'], ENT_QUOTES, 'UTF-8');
|
$surat_id = $r['surat_id'];
|
||||||
$to = '';
|
$satuan_kerja_id = $r['satuan_kerja_id'];
|
||||||
|
$o = pg_query($koneksi, "SELECT t.jabatan_untuk FROM teruskan t INNER JOIN kirim k ON (k.id=t.kirim_id_untuk) WHERE t.surat_id=$surat_id
|
||||||
$o = pg_query($koneksi, "SELECT t.jabatan_untuk
|
AND k.isi IS NULL AND t.id=(SELECT MAX(t2.id) FROM teruskan t2 INNER JOIN kirim k2 ON (k2.id=t2.kirim_id_untuk) WHERE t2.surat_id=$surat_id
|
||||||
FROM teruskan t
|
AND k2.isi IS NULL)");
|
||||||
INNER JOIN kirim k ON k.id = t.kirim_id_untuk
|
while ($ro = pg_fetch_assoc($o)) {
|
||||||
WHERE t.surat_id = $surat_id
|
$to = $ro[0];
|
||||||
AND k.isi IS NULL
|
|
||||||
AND t.id = (SELECT MAX(t2.id)
|
|
||||||
FROM teruskan t2
|
|
||||||
INNER JOIN kirim k2 ON k2.id = t2.kirim_id_untuk
|
|
||||||
WHERE t2.surat_id = $surat_id
|
|
||||||
AND k2.isi IS NULL)
|
|
||||||
");
|
|
||||||
if ($ro = pg_fetch_array($o)) {
|
|
||||||
$to = htmlspecialchars($ro['jabatan_untuk'], ENT_QUOTES, 'UTF-8');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$p = pg_query($koneksi, "SELECT u.jabatan_pegawai_id
|
$p = pg_query($koneksi, "SELECT u.jabatan_pegawai_id FROM data_user u INNER JOIN jabatan_pegawai j ON (j.id=u.jabatan_pegawai_id) WHERE u.satuan_kerja_id=$satuan_kerja_id");
|
||||||
FROM data_user u
|
while ($rp = pg_fetch_assoc($p)) {
|
||||||
INNER JOIN jabatan_pegawai j ON j.id = u.jabatan_pegawai_id
|
$tp = $rp[0];
|
||||||
WHERE u.satuan_kerja_id = $r[satuan_kerja_id]");
|
|
||||||
if ($rp = pg_fetch_array($p)) {
|
|
||||||
$tp = htmlspecialchars($rp['jabatan_pegawai_id'], ENT_QUOTES, 'UTF-8');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width: 5%;">
|
<td style="width: 5%;">
|
||||||
<center><?= $nomer++ ?></center>
|
<center><?= $nomer++ ?></center>
|
||||||
</td>
|
</td>
|
||||||
<td style="width: 5%;"><?= $r['no_register'] ?></td>
|
<td style="width: 5%;"><?= htmlspecialchars($r['no_register'], ENT_QUOTES, 'UTF-8') ?></td>
|
||||||
<td style="width: 40%;"><?= htmlspecialchars($r['perihal'], ENT_QUOTES, 'UTF-8') ?></td>
|
<td style="width: 40%;"><?= htmlspecialchars($r['perihal'], ENT_QUOTES, 'UTF-8') ?></td>
|
||||||
<td style="width: 10%;">
|
<td style="width: 10%;">
|
||||||
<input type="hidden" name="surat_id" value="<?= htmlspecialchars($surat_id, ENT_QUOTES, 'UTF-8') ?>">
|
<?php foreach (['surat_id', 'no_register', 'sifat_surat_id', 'jenis_surat_id', 'kd_surat', 'kirimid', 'penandatangan_id'] as $field) : ?>
|
||||||
<input type="hidden" name="no_register" value="<?= htmlspecialchars($r['no_register'], ENT_QUOTES, 'UTF-8') ?>">
|
<input type="hidden" name="<?= $field ?>" value="<?= htmlspecialchars($r[$field], ENT_QUOTES, 'UTF-8') ?>">
|
||||||
<input type="hidden" name="sifat_surat" value="<?= htmlspecialchars($r['sifat_surat_id'], ENT_QUOTES, 'UTF-8') ?>">
|
<?php endforeach; ?>
|
||||||
<input type="hidden" name="jenis_surat" value="<?= htmlspecialchars($r['jenis_surat_id'], ENT_QUOTES, 'UTF-8') ?>">
|
|
||||||
<input type="hidden" name="kode_surat_id" value="<?= htmlspecialchars($r['kd_surat'], ENT_QUOTES, 'UTF-8') ?>">
|
|
||||||
<input type="hidden" name="kirim_id" value="<?= htmlspecialchars($r['kirimid'], ENT_QUOTES, 'UTF-8') ?>"> <!-- kode surat -->
|
|
||||||
<input type="hidden" name="penandatangan_id" value="<?= htmlspecialchars($r['penandatangan_id'], ENT_QUOTES, 'UTF-8') ?>"> <!-- kode surat -->
|
|
||||||
<center><?= htmlspecialchars($r['sifat'], ENT_QUOTES, 'UTF-8') ?></center>
|
<center><?= htmlspecialchars($r['sifat'], ENT_QUOTES, 'UTF-8') ?></center>
|
||||||
</td>
|
</td>
|
||||||
<td style="width: 15%;">
|
<td style="width: 15%;">
|
||||||
<center>
|
<center>
|
||||||
<?php
|
<?php
|
||||||
switch ($r['stts_kendali']) {
|
$status_texts = [
|
||||||
case '':
|
'' => '',
|
||||||
echo '';
|
0 => 'Pengajuan',
|
||||||
break;
|
1 => 'Verifikasi TU',
|
||||||
case 0:
|
3 => 'Verifikasi Kabag Umum',
|
||||||
echo '<span style="color:#0069D3;font-weight: 600;">Pengajuan</span>';
|
5 => 'Verifikasi Wadir Pelay. Medik dan Keperawatan',
|
||||||
break;
|
7 => 'Verifikasi Wadir Pend. dan Pengemb. Mutu Pelayanan',
|
||||||
case 1:
|
9 => 'Verifikasi Wadir Pelayanan Penunjang',
|
||||||
echo '<span style="color:#44A2FF;font-weight: 600;">Verifikasi TU</span>';
|
11 => 'Verifikasi Wadir Umum dan Keuangan',
|
||||||
break;
|
13 => 'Selesai',
|
||||||
case 3:
|
99 => 'Ditolak'
|
||||||
echo '<span style="color:#44A2FF;font-weight: 600;">Verifikasi Kabag Umum</span>';
|
];
|
||||||
break;
|
|
||||||
case 5:
|
$status_styles = [
|
||||||
echo '<span style="color:#44A2FF;font-weight: 600;">Verifikasi Wadir Pelay. Medik dan Keperawatan/span>';
|
'' => '',
|
||||||
break;
|
0 => 'color:#0069D3;font-weight:600;',
|
||||||
case 7:
|
1 => 'color:#44A2FF;font-weight:600;',
|
||||||
echo '<span style="color:#44A2FF;font-weight: 600;">Verifikasi Wadir Pend. dan Pengemb. Mutu Pelayanan</span>';
|
3 => 'color:#44A2FF;font-weight:600;',
|
||||||
break;
|
5 => 'color:#44A2FF;font-weight:600;',
|
||||||
case 9:
|
7 => 'color:#44A2FF;font-weight:600;',
|
||||||
echo '<span style="color:#44A2FF;font-weight: 600;">Verifikasi Wadir Pelayanan Penunjang</span>';
|
9 => 'color:#44A2FF;font-weight:600;',
|
||||||
break;
|
11 => 'color:#44A2FF;font-weight:600;',
|
||||||
case 11:
|
13 => 'color:#00D814;font-weight:600;',
|
||||||
echo '<span style="color:#44A2FF;font-weight: 600;">Verifikasi Wadir Umum dan Keuangan</span>';
|
99 => 'color:red;font-weight:bold;'
|
||||||
break;
|
];
|
||||||
case 13:
|
|
||||||
echo '<span style="color:#00D814;font-weight: 600;">Selesai</span>';
|
$status = $r['stts_kendali'];
|
||||||
break;
|
echo '<span style="' . $status_styles[$status] . '">' . $status_texts[$status] . '</span>';
|
||||||
// case 98 :
|
|
||||||
// echo '<span style="color:#0069D3;font-weight: 600;">Pengajuan Ulang</span>';
|
|
||||||
// break;
|
|
||||||
case 99:
|
|
||||||
echo '<span style="color: red; font-weight: bold;">Ditolak</span>';
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
echo '';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
</center>
|
</center>
|
||||||
</td>
|
</td>
|
||||||
<td style="width: 7%;">
|
<td style="width: 7%;">
|
||||||
<center><?php echo ($r['tgl_kirim'] == NULL) ? '<span style="color:red">Belum Dikirim</span>' : '<span style="color:green">' . date('d-m-Y H:i', strtotime($r['tgl_kirim'])) . '</span>'; ?></center>
|
<center><?= $r['tgl_kirim'] ? '<span style="color:green">' . date('d-m-Y H:i', strtotime($r['tgl_kirim'])) . '</span>' : '<span style="color:red">Belum Dikirim</span>' ?></center>
|
||||||
</td>
|
</td>
|
||||||
<td style="width: 10%;">
|
<td style="width: 10%;">
|
||||||
<center>
|
<center>
|
||||||
<?php if ($r['flag_baca_tu'] == 0) { ?>
|
<?php if ($r['flag_baca_tu'] == 0) : ?>
|
||||||
<button type="button" name="edit_surat" class="btn btn-primary btn-xs edit_surat" id="<?= $surat_id ?>" data-content="Edit" rel="popover" data-placement="top" data-trigger="hover">
|
<button type="button" name="edit_surat" class="btn btn-primary btn-xs edit_surat" id="<?= $surat_id ?>" data-content="Edit" rel="popover" data-placement="top" data-trigger="hover">
|
||||||
<i class="fa fa-pencil"></i>
|
<i class="fa fa-pencil"></i>
|
||||||
</button>
|
</button>
|
||||||
<?php } ?>
|
<?php endif; ?>
|
||||||
<button type="button" name="hapus_surat" class="btn btn-danger btn-xs hapus_surat" id="<?= $surat_id ?>" data-content="Hapus" rel="popover" data-placement="top" data-trigger="hover">
|
<button type="button" name="hapus_surat" class="btn btn-danger btn-xs hapus_surat" id="<?= $surat_id ?>" data-content="Hapus" rel="popover" data-placement="top" data-trigger="hover">
|
||||||
<i class="fa fa-trash"></i>
|
<i class="fa fa-trash"></i>
|
||||||
</button>
|
</button>
|
||||||
<button type="button" name="show_surat" class="btn btn-info btn-xs show_surat" id="<?= $surat_id ?>" data-content="Show" rel="popover" data-placement="top" data-trigger="hover">
|
<button type="button" name="show_surat" class="btn btn-info btn-xs show_surat" id="<?= $surat_id ?>" data-content="Show" rel="popover" data-placement="top" data-trigger="hover">
|
||||||
<?php
|
<?php
|
||||||
if ($to != $tp) {
|
if ($to != $tp) {
|
||||||
$jko = pg_query($koneksi, "SELECT COUNT(*) FROM komen WHERE surat_id = $surat_id");
|
$jko = pg_query_params($koneksi, "SELECT COUNT(*) FROM komen WHERE surat_id = $1", array($surat_id));
|
||||||
if ($rjko = pg_fetch_array($jko)) {
|
$rjko = pg_fetch_assoc($jko);
|
||||||
$tjko = $rjko[0];
|
$tjko = $rjko[0] ?? 0;
|
||||||
if ($tjko == 0) {
|
echo $tjko == 0 ? '<i class="fa fa-eye"></i>' : '<span style="color:red;font-family:Arial;font-weight:bold">' . $tjko . '</span>';
|
||||||
echo '<i class="fa fa-eye"></i>';
|
|
||||||
} else {
|
|
||||||
echo '<span style="color:red;font-family:Arial;font-weight:bold">' . $tjko . '</span>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
echo '<i class="fa fa-check"></i>';
|
echo '<i class="fa fa-check"></i>';
|
||||||
}
|
}
|
||||||
@@ -179,6 +161,7 @@ $thn2 = $_POST['thn2'];
|
|||||||
</center>
|
</center>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
||||||
@@ -206,7 +189,6 @@ $thn2 = $_POST['thn2'];
|
|||||||
var jenis_surat_id = $(this).closest('tr').find('input[name="jenis_surat"]').val();
|
var jenis_surat_id = $(this).closest('tr').find('input[name="jenis_surat"]').val();
|
||||||
var kode_surat_id = $(this).closest('tr').find('input[name="kode_surat_id"]').val();
|
var kode_surat_id = $(this).closest('tr').find('input[name="kode_surat_id"]').val();
|
||||||
var penandatangan_id = $(this).closest('tr').find('input[name="penandatangan_id"]').val();
|
var penandatangan_id = $(this).closest('tr').find('input[name="penandatangan_id"]').val();
|
||||||
|
|
||||||
var currentRow = $(this).closest("tr");
|
var currentRow = $(this).closest("tr");
|
||||||
var tolak = currentRow.find("td:eq(4)").text().replace(/\s+/g, '');
|
var tolak = currentRow.find("td:eq(4)").text().replace(/\s+/g, '');
|
||||||
|
|
||||||
@@ -230,6 +212,11 @@ $thn2 = $_POST['thn2'];
|
|||||||
success: function(data) {
|
success: function(data) {
|
||||||
$('#modal_body_kirim2').html(data);
|
$('#modal_body_kirim2').html(data);
|
||||||
$('#perihal').first().focus();
|
$('#perihal').first().focus();
|
||||||
|
$('#kdSurat').select2({
|
||||||
|
dropdownParent: $("#modal_kirim2"),
|
||||||
|
// matcher: matchCustom
|
||||||
|
minimumResultsForSearch: 20
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -276,10 +263,9 @@ $thn2 = $_POST['thn2'];
|
|||||||
var perihal = currentRow.find("td:eq(2)").text();
|
var perihal = currentRow.find("td:eq(2)").text();
|
||||||
var id = $(this).attr('id');
|
var id = $(this).attr('id');
|
||||||
var cek_satker = $('#satuan_kerja_idcek').val();
|
var cek_satker = $('#satuan_kerja_idcek').val();
|
||||||
var kirimid = $(this).closest('tr').find('input[name="kirim_id"]').val();
|
var kirimid = $(this).closest('tr').find('input[name="kirimid"]').val();
|
||||||
var key = 'kirim_awal';
|
var key = 'kirim_awal';
|
||||||
var l_noSurat = $('.no_surat_label').text();
|
var l_noSurat = $('.no_surat_label').text();
|
||||||
// $('#modal_body_tl').html("");
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "app/tindaklanjut/main.php",
|
url: "app/tindaklanjut/main.php",
|
||||||
@@ -295,13 +281,6 @@ $thn2 = $_POST['thn2'];
|
|||||||
$('#modal_tl').modal('show');
|
$('#modal_tl').modal('show');
|
||||||
$('#modal_body_tl').html(data);
|
$('#modal_body_tl').html(data);
|
||||||
var l_noSurat = $('#no_surat_label').val();
|
var l_noSurat = $('#no_surat_label').val();
|
||||||
// if (l_noSurat !== '') {
|
|
||||||
// document.getElementById('no_surat_tl').style.display = 'none';
|
|
||||||
// $('.no_surat_label').show();
|
|
||||||
// } else {
|
|
||||||
// $('#no_surat_tl').show();
|
|
||||||
// }
|
|
||||||
// $('#inkomen').hide();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -6,10 +6,22 @@ $stts_kendali = ($_POST['stts_kendali'] != '') ? $_POST['stts_kendali'] : '';
|
|||||||
|
|
||||||
switch ($key) {
|
switch ($key) {
|
||||||
case 'simpan_komen':
|
case 'simpan_komen':
|
||||||
|
$baseURL = '../../public/doc/';
|
||||||
|
$folder = 'tindaklanjut/dok/';
|
||||||
|
|
||||||
$surat_id = $_POST['surat_id'];
|
$surat_id = $_POST['surat_id'];
|
||||||
$jabatan_pegawai_id = $_POST['jabatan_pegawai_id'];
|
$jabatan_pegawai_id = $_POST['jabatan_pegawai_id'];
|
||||||
$satuan_kerja_penginput = $_POST['satuan_kerja_penginput'];
|
$satuan_kerja_penginput = $_POST['satuan_kerja_penginput'];
|
||||||
$komen = $_POST['komen'];
|
$komen = $_POST['komen'];
|
||||||
|
$file = $_FILES['file'];
|
||||||
|
// var_dump($file);die();
|
||||||
|
$allowed_types = array(
|
||||||
|
'application/pdf',
|
||||||
|
'application/msword',
|
||||||
|
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||||
|
'application/vnd.ms-excel',
|
||||||
|
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
||||||
|
);
|
||||||
|
|
||||||
if (!empty($komen)) {
|
if (!empty($komen)) {
|
||||||
pg_query($koneksi, "INSERT INTO komen (surat_id,jabatan_pegawai_id,tanggal,komen) VALUES ($surat_id,$jabatan_pegawai_id,NOW(),'$komen')");
|
pg_query($koneksi, "INSERT INTO komen (surat_id,jabatan_pegawai_id,tanggal,komen) VALUES ($surat_id,$jabatan_pegawai_id,NOW(),'$komen')");
|
||||||
@@ -18,14 +30,51 @@ switch ($key) {
|
|||||||
$db = pg_query($koneksi, "SELECT k.id FROM komen k WHERE k.surat_id=$surat_id AND k.jabatan_pegawai_id=$jabatan_pegawai_id AND k.komen='$komen' AND k.id=(SELECT MAX(k1.id) FROM komen k1
|
$db = pg_query($koneksi, "SELECT k.id FROM komen k WHERE k.surat_id=$surat_id AND k.jabatan_pegawai_id=$jabatan_pegawai_id AND k.komen='$komen' AND k.id=(SELECT MAX(k1.id) FROM komen k1
|
||||||
WHERE k1.surat_id=$surat_id AND k1.jabatan_pegawai_id=$jabatan_pegawai_id AND k1.komen='$komen'
|
WHERE k1.surat_id=$surat_id AND k1.jabatan_pegawai_id=$jabatan_pegawai_id AND k1.komen='$komen'
|
||||||
)");
|
)");
|
||||||
while ($rdb = pg_fetch_array($db)) {
|
while ($rdb = pg_fetch_assoc($db)) {
|
||||||
$komen_id = $rdb[0];
|
$komen_id = $rdb['id'];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Save Lampiran
|
||||||
|
if ($file['name'] != '') {
|
||||||
|
$file_type = $file["type"];
|
||||||
|
$file_size = $file["size"];
|
||||||
|
$max_size = 1087152; // max 1Mb
|
||||||
|
if (!in_array($file_type, $allowed_types)) {
|
||||||
|
http_response_code(400);
|
||||||
|
$response = array('icon' => 'error', 'message' => 'File tidak diizinkan. <br> Hanya PDF, Word, Excel size max 1 Mb yang diperbolehkan.');
|
||||||
|
echo json_encode($response);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if ($file_size > $max_size) {
|
||||||
|
http_response_code(400);
|
||||||
|
$response = array('icon' => 'error', 'message' => 'File yang diupload terlalu besar. Ukuran maksimum adalah 1MB.');
|
||||||
|
echo json_encode($response);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
$tmp_name = $file["tmp_name"];
|
||||||
|
$name = $baseURL . $folder . $komen_id . "_" . $file["name"];
|
||||||
|
$name_pdf = $komen_id . "_" . $file["name"];
|
||||||
|
// Cek apakah file berhasil diupload
|
||||||
|
if (!move_uploaded_file($tmp_name, $name)) {
|
||||||
|
http_response_code(400);
|
||||||
|
$response = array('status' => 'error', 'message' => 'Gagal upload file.');
|
||||||
|
echo json_encode($response);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
$ins = pg_query($koneksi, "INSERT INTO scan_komen (komen_id,file) VALUES ($komen_id,'$name_pdf')");
|
||||||
|
|
||||||
|
if (!$ins) {
|
||||||
|
http_response_code(400);
|
||||||
|
$response = array('status' => 'error', 'message' => 'Gagal insert data ke database.');
|
||||||
|
echo json_encode($response);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$d = pg_query($koneksi, "SELECT id,kepada FROM kirim WHERE surat_id='$surat_id' AND satuan_kerja_tujuan IS NULL AND lama IS NULL AND satuan_kerja_penginput=$satuan_kerja_penginput");
|
$d = pg_query($koneksi, "SELECT id,kepada FROM kirim WHERE surat_id='$surat_id' AND satuan_kerja_tujuan IS NULL AND lama IS NULL AND satuan_kerja_penginput=$satuan_kerja_penginput");
|
||||||
while (($r = pg_fetch_array($d)) !== FALSE) {
|
while (($r = pg_fetch_assoc($d)) !== FALSE) {
|
||||||
$kirim_id = $r[0];
|
$kirim_id = $r['id'];
|
||||||
$kepada = $r[1];
|
$kepada = $r['kepada'];
|
||||||
$sat = pg_query($koneksi, "SELECT satuan_kerja_id FROM data_user WHERE jabatan_pegawai_id='$kepada'");
|
$sat = pg_query($koneksi, "SELECT satuan_kerja_id FROM data_user WHERE jabatan_pegawai_id='$kepada'");
|
||||||
while ($r = pg_fetch_array($sat)) {
|
while ($r = pg_fetch_array($sat)) {
|
||||||
$satuan_kerja_tujuan = $r[0];
|
$satuan_kerja_tujuan = $r[0];
|
||||||
@@ -67,7 +116,9 @@ switch ($key) {
|
|||||||
}
|
}
|
||||||
pg_query($koneksi, "UPDATE surat SET stts_kendali =$_verif WHERE id=$surat_id");
|
pg_query($koneksi, "UPDATE surat SET stts_kendali =$_verif WHERE id=$surat_id");
|
||||||
}
|
}
|
||||||
echo $surat_id . ' ' . $komen_id . ' ' . $jabatan_pegawai_id . ' ' . $kirim_id . ' ' . $kepada;
|
http_response_code(200);
|
||||||
|
$response = array('icon' => 'success', 'message' => 'Surat Telah Terkirim');
|
||||||
|
echo json_encode($response);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'hapus_komen':
|
case 'hapus_komen':
|
||||||
@@ -200,9 +251,32 @@ switch ($key) {
|
|||||||
case 'update_noSurat':
|
case 'update_noSurat':
|
||||||
$surat_id = $_POST['surat_id'];
|
$surat_id = $_POST['surat_id'];
|
||||||
$no_surat = $_POST['no_surat'];
|
$no_surat = $_POST['no_surat'];
|
||||||
pg_query_params($koneksi,"UPDATE surat SET no_surat=$1 WHERE id = $2",array($no_surat,$surat_id));
|
pg_query_params($koneksi, "UPDATE surat SET no_surat=$1 WHERE id = $2", array($no_surat, $surat_id));
|
||||||
echo json_encode(['data'=>['no_surat'=>$no_surat],'icon'=>'success','message'=>'No Surat Berhasil Disimpan']);
|
echo json_encode(['data' => ['no_surat' => $no_surat], 'icon' => 'success', 'message' => 'No Surat Berhasil Disimpan']);
|
||||||
|
break;
|
||||||
|
case 'selesai_kepada_tl':
|
||||||
|
$surat_id = $_POST['surat_id'];
|
||||||
|
$kepada = $_POST['kepada'];
|
||||||
|
$satuan_kerja_penginput = $_POST['satuan_kerja_penginput'];
|
||||||
|
$jabatan_pegawai_id = $_POST['jabatan_pegawai_id'];
|
||||||
|
|
||||||
|
foreach ($kepada as $kpd) {
|
||||||
|
$cek_satker = pg_query($koneksi, "SELECT id FROM kirim WHERE surat_id='$surat_id' AND kepada='$kpd' AND satuan_kerja_penginput='$satuan_kerja_penginput' AND satuan_kerja_tujuan IS NULL");
|
||||||
|
$row_satker = pg_fetch_row($cek_satker);
|
||||||
|
if ($row_satker[0] == 0) {
|
||||||
|
$cdata = pg_query($koneksi, "SELECT COUNT(*) FROM kirim WHERE surat_id='$surat_id' AND satuan_kerja_penginput='$satuan_kerja_penginput' AND satuan_kerja_tujuan IS NULL");
|
||||||
|
$rcdata = pg_fetch_array($cdata);
|
||||||
|
$jdata = $rcdata[0];
|
||||||
|
|
||||||
|
if ($jdata == 0) {
|
||||||
|
$inp = pg_query($koneksi, "INSERT INTO kirim (surat_id, kepada, tgl_input, jam_input, satuan_kerja_penginput) VALUES ('$surat_id', '$kpd', NOW(), NOW(), '$satuan_kerja_penginput')");
|
||||||
|
} else {
|
||||||
|
$inp = pg_query($koneksi, "INSERT INTO kirim (surat_id, kepada, tgl_input, jam_input, satuan_kerja_penginput, isi) VALUES ('$surat_id', '$kpd', NOW(), NOW(), '$satuan_kerja_penginput', 'SM')");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
http_response_code(200);
|
||||||
|
echo json_encode(['icon' => 'success', 'message' => 'Kirim Tujuan sudah Ditambahkan']);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
echo "Invalid key provided.";
|
echo "Invalid key provided.";
|
||||||
|
|||||||
@@ -1,11 +1,58 @@
|
|||||||
<?php
|
<?php
|
||||||
include("../koneksi.php");
|
include("../koneksi.php");
|
||||||
$id=$_POST['id'];
|
// $id = $_POST['id'];
|
||||||
//$delete_dok=pg_query("DELETE FROM scan WHERE id='$id'");
|
// $baseURL = '../../public/doc/';
|
||||||
$d=pg_query("SELECT file FROM scan_komen WHERE id='$id'");
|
// $dir = 'tindaklanjut/img/';
|
||||||
while($r=pg_fetch_array($d)) {$fil=$r[0];}
|
|
||||||
$del_pr=pg_query("DELETE FROM scan_komen WHERE id='$id'");
|
|
||||||
$path = "dok/".$fil;
|
|
||||||
if(file_exists($path)){unlink($path);}
|
|
||||||
|
|
||||||
|
// var_dump($id);die();
|
||||||
|
|
||||||
|
// $d = pg_query($koneksi, "SELECT file FROM scan_komen WHERE id='$id'");
|
||||||
|
// while ($r = pg_fetch_assoc($d)) {
|
||||||
|
// $fil = $r['file'];
|
||||||
|
// }
|
||||||
|
// $path = "dok/" . $fil;
|
||||||
|
// if (file_exists($path)) {
|
||||||
|
// $del_pr = pg_query($koneksi, "DELETE FROM scan_komen WHERE id='$id'");
|
||||||
|
// unlink($path);
|
||||||
|
// http_response_code(200);
|
||||||
|
// json_encode(['icon'=>'success','message'=>'Berhasil Dihapus..!!']);
|
||||||
|
// }else{
|
||||||
|
// http_response_code(400);
|
||||||
|
// json_encode(['icon'=>'error','message'=>'File Tidak Ada..!!']);
|
||||||
|
// exit;
|
||||||
|
// }
|
||||||
|
$id = $_POST['id'];
|
||||||
|
$baseURL = '../../public/doc/';
|
||||||
|
$dir = 'tindaklanjut/img/';
|
||||||
|
|
||||||
|
// Pastikan variabel $id telah diverifikasi atau divalidasi sebelum digunakan.
|
||||||
|
|
||||||
|
$query = pg_query_params($koneksi, "SELECT file FROM scan_komen WHERE id=$1", array($id));
|
||||||
|
if ($query) {
|
||||||
|
$r = pg_fetch_assoc($query);
|
||||||
|
if ($r) {
|
||||||
|
$fil = $r['file'];
|
||||||
|
$path = $baseURL.$dir . $fil;
|
||||||
|
if (file_exists($path)) {
|
||||||
|
$del_pr = pg_query_params($koneksi, "DELETE FROM scan_komen WHERE id=$1", array($id));
|
||||||
|
if ($del_pr) {
|
||||||
|
unlink($path);
|
||||||
|
http_response_code(200);
|
||||||
|
echo json_encode(['icon' => 'success', 'message' => 'Berhasil Dihapus..!!']);
|
||||||
|
} else {
|
||||||
|
http_response_code(500);
|
||||||
|
echo json_encode(['icon' => 'error', 'message' => 'Gagal menghapus data dari database.']);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
http_response_code(400);
|
||||||
|
echo json_encode(['icon' => 'error', 'message' => 'File Tidak Ada..!!']);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
http_response_code(404);
|
||||||
|
echo json_encode(['icon' => 'error', 'message' => 'Data tidak ditemukan.']);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
http_response_code(500);
|
||||||
|
echo json_encode(['icon' => 'error', 'message' => 'Gagal mengambil data dari database.']);
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
@@ -12,13 +12,12 @@ $('button[name="simpan_no_surat"]').popover();
|
|||||||
|
|
||||||
$('button[name="file_inbox"]').click(function () {
|
$('button[name="file_inbox"]').click(function () {
|
||||||
var id = $(this).attr('id');
|
var id = $(this).attr('id');
|
||||||
$('#modal_inbox').modal('show');
|
|
||||||
$('#modal_body_inbox').html("");
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "app/inbox/modal.php",
|
url: "app/inbox/modal.php",
|
||||||
data: 'id=' + id,
|
data: 'id=' + id,
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
|
$('#modal_inbox').modal('show');
|
||||||
$('#modal_body_inbox').html(data);
|
$('#modal_body_inbox').html(data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -27,8 +26,6 @@ $('button[name="file_inbox"]').click(function () {
|
|||||||
$('button[name="lampiran_inbox"]').click(function () {
|
$('button[name="lampiran_inbox"]').click(function () {
|
||||||
var id = $(this).attr('id');
|
var id = $(this).attr('id');
|
||||||
var flag_pengesahan = $('#flag_pengesahan').val();
|
var flag_pengesahan = $('#flag_pengesahan').val();
|
||||||
$('#modal_file_inbox').modal('show');
|
|
||||||
$('#modal_body_file_inbox').html("");
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "app/inbox/modal_file.php",
|
url: "app/inbox/modal_file.php",
|
||||||
@@ -37,6 +34,7 @@ $('button[name="lampiran_inbox"]').click(function () {
|
|||||||
flag_pengesahan: flag_pengesahan
|
flag_pengesahan: flag_pengesahan
|
||||||
},
|
},
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
|
$('#modal_file_inbox').modal('show');
|
||||||
$('#modal_body_file_inbox').html(data);
|
$('#modal_body_file_inbox').html(data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -45,8 +43,6 @@ $('button[name="kepada_inbox"]').click(function () {
|
|||||||
var id = $(this).attr('id');
|
var id = $(this).attr('id');
|
||||||
var satker_pemilik_surat = $('#satker_pemilik_surat').val();
|
var satker_pemilik_surat = $('#satker_pemilik_surat').val();
|
||||||
var jabatan_pegawai_id_tl = $('#jabatan_pegawai_id_tl').val();
|
var jabatan_pegawai_id_tl = $('#jabatan_pegawai_id_tl').val();
|
||||||
$('#modal_kpdxxxx').modal('show');
|
|
||||||
$('#modal_body_kpdxxxx').html("");
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "app/tindaklanjut/modal_kepada_awal.php",
|
url: "app/tindaklanjut/modal_kepada_awal.php",
|
||||||
@@ -56,10 +52,12 @@ $('button[name="kepada_inbox"]').click(function () {
|
|||||||
jabatan_pegawai_id: jabatan_pegawai_id_tl
|
jabatan_pegawai_id: jabatan_pegawai_id_tl
|
||||||
},
|
},
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
|
$('#modal_kpdxxxx').modal('show');
|
||||||
$('#modal_body_kpdxxxx').html(data);
|
$('#modal_body_kpdxxxx').html(data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
var surat_id = $('#surat_id_tl').val();
|
var surat_id = $('#surat_id_tl').val();
|
||||||
var jabatan_pegawai_id_tl = $('#jabatan_pegawai_id_tl').val();
|
var jabatan_pegawai_id_tl = $('#jabatan_pegawai_id_tl').val();
|
||||||
$('#tabel_komen').load("app/tindaklanjut/tabel_komen.php", {
|
$('#tabel_komen').load("app/tindaklanjut/tabel_komen.php", {
|
||||||
@@ -79,6 +77,17 @@ if (jmlsm == 'SM') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$('#btn_load_file').click(function () {
|
||||||
|
$('#lamp_dok').click();
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#lamp_dok').change(function () {
|
||||||
|
var formData = new FormData();
|
||||||
|
var fileInput = $('#lamp_dok')[0].files[0];
|
||||||
|
formData.append('file', fileInput);
|
||||||
|
$('#lbl_file_up').text(fileInput.name);
|
||||||
|
});
|
||||||
|
|
||||||
$('#simpan_komen').click(function () {
|
$('#simpan_komen').click(function () {
|
||||||
var surat_id = $('#surat_id_tl').val();
|
var surat_id = $('#surat_id_tl').val();
|
||||||
var no_surat = $('.no_surat_label').text();
|
var no_surat = $('.no_surat_label').text();
|
||||||
@@ -87,11 +96,26 @@ $('#simpan_komen').click(function () {
|
|||||||
var jd9 = $('#jd9').val();
|
var jd9 = $('#jd9').val();
|
||||||
var satuan_kerja_penginput = $('#csatker').val();
|
var satuan_kerja_penginput = $('#csatker').val();
|
||||||
var flag_pengesahan = $('#flag_pengesahan').val();
|
var flag_pengesahan = $('#flag_pengesahan').val();
|
||||||
|
var formData = new FormData();
|
||||||
|
formData.append('surat_id', surat_id);
|
||||||
|
formData.append('jabatan_pegawai_id', jabatan_pegawai_id);
|
||||||
|
formData.append('satuan_kerja_penginput', satuan_kerja_penginput);
|
||||||
|
formData.append('komen', komen);
|
||||||
|
formData.append('key', 'simpan_komen');
|
||||||
if (flag_pengesahan == '1') {
|
if (flag_pengesahan == '1') {
|
||||||
if (!no_surat) {
|
if (!no_surat) {
|
||||||
infoToast('error', 'Nomer Surat harus Teriisi..!!');
|
infoToast('error', 'Nomer Surat harus Teriisi..!!');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
var fileInput = $('#lamp_dok')[0].files[0];
|
||||||
|
formData.append('file', fileInput);
|
||||||
|
|
||||||
|
if (satuan_kerja_penginput == 66 || satuan_kerja_penginput == 11) {
|
||||||
|
if ($('#lbl_file_up').text() === '') {
|
||||||
|
infoToast('error', 'Mohon untuk Melampirkan Dokumen..!!');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ((!komen) || (jd9 == 0)) {
|
if ((!komen) || (jd9 == 0)) {
|
||||||
infoToast('error', 'Tanggapan atau Teruskan mohon ditentukan terlebih dahulu..!!');
|
infoToast('error', 'Tanggapan atau Teruskan mohon ditentukan terlebih dahulu..!!');
|
||||||
@@ -99,21 +123,22 @@ $('#simpan_komen').click(function () {
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "app/tindaklanjut/crud.php",
|
url: "app/tindaklanjut/crud.php",
|
||||||
data: {
|
data: formData,
|
||||||
surat_id: surat_id,
|
processData: false,
|
||||||
jabatan_pegawai_id: jabatan_pegawai_id,
|
contentType: false,
|
||||||
satuan_kerja_penginput: satuan_kerja_penginput,
|
success: function (response) {
|
||||||
komen: komen,
|
var result = JSON.parse(response);
|
||||||
key: 'simpan_komen'
|
infoToast(result.icon, result.message)
|
||||||
},
|
|
||||||
success: function (data) {
|
|
||||||
infoToast('success', 'Surat Telah Dikirim');
|
|
||||||
$('#tabel_komen').load("app/tindaklanjut/tabel_komen.php", {
|
$('#tabel_komen').load("app/tindaklanjut/tabel_komen.php", {
|
||||||
surat_id: surat_id,
|
surat_id: surat_id,
|
||||||
jabatan_pegawai_id_tl: jabatan_pegawai_id
|
jabatan_pegawai_id_tl: jabatan_pegawai_id
|
||||||
});
|
});
|
||||||
$('#komen').val('');
|
$('#komen').val('');
|
||||||
$('#inkomen').hide();
|
$('#inkomen').hide();
|
||||||
|
},
|
||||||
|
error: function (xhr) {
|
||||||
|
var result = JSON.parse(xhr.responseText);
|
||||||
|
infoToast(result.icon, result.message)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -121,13 +146,12 @@ $('#simpan_komen').click(function () {
|
|||||||
|
|
||||||
$('button[name="jpg_kirim_tl"]').click(function () {
|
$('button[name="jpg_kirim_tl"]').click(function () {
|
||||||
var id = $(this).attr('id');
|
var id = $(this).attr('id');
|
||||||
$('#modal_pic').modal('show');
|
|
||||||
$('#modal_body_pic').html("");
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "app/tindaklanjut/modal_dok.php",
|
url: "app/tindaklanjut/modal_dok.php",
|
||||||
data: 'id=' + id,
|
data: 'id=' + id,
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
|
$('#modal_pic').modal('show');
|
||||||
$('#modal_body_pic').html(data);
|
$('#modal_body_pic').html(data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -135,13 +159,12 @@ $('button[name="jpg_kirim_tl"]').click(function () {
|
|||||||
|
|
||||||
$('button[name="file_kirim_tl"]').click(function () {
|
$('button[name="file_kirim_tl"]').click(function () {
|
||||||
var id = $(this).attr('id');
|
var id = $(this).attr('id');
|
||||||
$('#modal_file').modal('show');
|
|
||||||
$('#modal_body_file').html("");
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "app/tindaklanjut/upd_file.php",
|
url: "app/tindaklanjut/upd_file.php",
|
||||||
data: 'id=' + id,
|
data: 'id=' + id,
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
|
$('#modal_file').modal('show');
|
||||||
$('#modal_body_file').html(data);
|
$('#modal_body_file').html(data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -157,13 +180,12 @@ $(document).on('hidden.bs.modal', function (event) {
|
|||||||
$('#forward_tl').click(function () {
|
$('#forward_tl').click(function () {
|
||||||
var id = $('#surat_id_tl').val();
|
var id = $('#surat_id_tl').val();
|
||||||
var jabatan_pegawai_id_tl = $('#jabatan_pegawai_id_tl').val();
|
var jabatan_pegawai_id_tl = $('#jabatan_pegawai_id_tl').val();
|
||||||
$('#modal_kepada').modal('show');
|
|
||||||
$('#modal_body_kepada').html("");
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "app/tindaklanjut/modal_kepada.php",
|
url: "app/tindaklanjut/modal_kepada.php",
|
||||||
data: { id: id, jabatan_pegawai_id_tl: jabatan_pegawai_id_tl },
|
data: { id: id, jabatan_pegawai_id_tl: jabatan_pegawai_id_tl },
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
|
$('#modal_kepada').modal('show');
|
||||||
$('#modal_body_kepada').html(data);
|
$('#modal_body_kepada').html(data);
|
||||||
$('#kepada_k').first().focus().selected();
|
$('#kepada_k').first().focus().selected();
|
||||||
}
|
}
|
||||||
@@ -172,20 +194,21 @@ $('#forward_tl').click(function () {
|
|||||||
|
|
||||||
// Logic ketikan !approve
|
// Logic ketikan !approve
|
||||||
$('#kembalikan_surat').click(function () {
|
$('#kembalikan_surat').click(function () {
|
||||||
|
var surat_id = $('#surat_id_tl').val();
|
||||||
|
var kepada = $('#satker_pengirim_surat').val();
|
||||||
|
var csatker = $('#csatker').val();
|
||||||
|
var key = "simpan_kepada_tl";
|
||||||
|
|
||||||
$('#simpan_komen').hide()
|
$('#simpan_komen').hide()
|
||||||
$('#save_retur').show()
|
$('#save_retur').show()
|
||||||
$('#batal_retur').show()
|
$('#batal_retur').show()
|
||||||
$('#kembalikan_surat').hide()
|
$('#kembalikan_surat').hide()
|
||||||
// $('#forward_tl').hide()
|
// $('#forward_tl').hide()
|
||||||
if ($('#csatker').val() == 11) {
|
var inArray = [11, 172, 71, 72, 73, 74];
|
||||||
|
if (inArray.includes(parseInt($('#csatker').val()))) {
|
||||||
$('#selesai_komen').hide()
|
$('#selesai_komen').hide()
|
||||||
}
|
}
|
||||||
|
|
||||||
var surat_id = $('#surat_id_tl').val();
|
|
||||||
var kepada = $('#satker_pengirim_surat').val();
|
|
||||||
var csatker = $('#csatker').val();
|
|
||||||
var key = "simpan_kepada_tl";
|
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "app/spengesahan/controller.php",
|
url: "app/spengesahan/controller.php",
|
||||||
@@ -211,7 +234,8 @@ $('#batal_retur').click(function () {
|
|||||||
$('#batal_retur').hide()
|
$('#batal_retur').hide()
|
||||||
$('#kembalikan_surat').show()
|
$('#kembalikan_surat').show()
|
||||||
$('#forward_tl').show()
|
$('#forward_tl').show()
|
||||||
if ($('#csatker').val() == 11) {
|
var inArray = [11, 172, 71, 72, 73, 74];
|
||||||
|
if (inArray.includes(parseInt($('#csatker').val()))) {
|
||||||
$('#selesai_komen').show()
|
$('#selesai_komen').show()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -263,19 +287,27 @@ $('#selesai_komen').click(function () {
|
|||||||
var surat_id = $('#surat_id_tl').val();
|
var surat_id = $('#surat_id_tl').val();
|
||||||
var kepada = $('#satker_pengirim_surat').val();
|
var kepada = $('#satker_pengirim_surat').val();
|
||||||
var csatker = $('#csatker').val();
|
var csatker = $('#csatker').val();
|
||||||
var key = "selesai_kepada_tl";
|
var jabatan_pegawai_id = $('#jabatan_pegawai_id_tl').val();
|
||||||
|
var key = "selesai_kepada_tl";;
|
||||||
var komen = $('#komen').val();
|
var komen = $('#komen').val();
|
||||||
|
if (csatker == 11) {
|
||||||
|
if ($('#lbl_file_up').text() === '') {
|
||||||
|
infoToast('error', 'Mohon untuk Melampirkan Dokumen..!!');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (komen == '') {
|
if (komen == '') {
|
||||||
infoToast('error', 'Tanggapan Harus Teriisi..!!');
|
infoToast('error', 'Tanggapan Harus Teriisi..!!');
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "app/spengesahan/controller.php",
|
url: "app/tindaklanjut/crud.php",
|
||||||
data: {
|
data: {
|
||||||
surat_id: surat_id,
|
surat_id: surat_id,
|
||||||
kepada: [kepada, 165],
|
kepada: [kepada, 165],
|
||||||
satuan_kerja_penginput: csatker,
|
satuan_kerja_penginput: csatker,
|
||||||
|
jabatan_pegawai_id: jabatan_pegawai_id,
|
||||||
key: key
|
key: key
|
||||||
},
|
},
|
||||||
success: function (response) {
|
success: function (response) {
|
||||||
@@ -302,6 +334,10 @@ $('#selesai_komen').click(function () {
|
|||||||
simpan_komen_selesai();
|
simpan_komen_selesai();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
error: function (xhr) {
|
||||||
|
var result = JSON.parse(xhr.responseText);
|
||||||
|
infoToast(result.icon, result.message);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -310,10 +346,18 @@ $('#selesai_komen').click(function () {
|
|||||||
function simpan_komen_selesai() {
|
function simpan_komen_selesai() {
|
||||||
var surat_id = $('#surat_id_tl').val();
|
var surat_id = $('#surat_id_tl').val();
|
||||||
var csatker = $('#csatker').val();
|
var csatker = $('#csatker').val();
|
||||||
|
|
||||||
var komen = $('#komen').val();
|
var komen = $('#komen').val();
|
||||||
$('#kepada_kr').val('');
|
$('#kepada_kr').val('');
|
||||||
var jabatan_pegawai_id_tl = $('#jabatan_pegawai_id_tl').val();
|
var jabatan_pegawai_id_tl = $('#jabatan_pegawai_id_tl').val();
|
||||||
|
var fileInput = $('#lamp_dok')[0].files[0];
|
||||||
|
var formData = new FormData();
|
||||||
|
formData.append('surat_id', surat_id);
|
||||||
|
formData.append('jabatan_pegawai_id', jabatan_pegawai_id_tl);
|
||||||
|
formData.append('satuan_kerja_penginput', csatker);
|
||||||
|
formData.append('komen', komen);
|
||||||
|
formData.append('key', 'simpan_komen');
|
||||||
|
formData.append('file', fileInput);
|
||||||
|
|
||||||
$('#tabel_kepada_kr').load('app/tindaklanjut/tabel_kepada.php', {
|
$('#tabel_kepada_kr').load('app/tindaklanjut/tabel_kepada.php', {
|
||||||
surat_id: surat_id,
|
surat_id: surat_id,
|
||||||
jabatan_pegawai_id: jabatan_pegawai_id_tl
|
jabatan_pegawai_id: jabatan_pegawai_id_tl
|
||||||
@@ -321,13 +365,9 @@ function simpan_komen_selesai() {
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "app/tindaklanjut/crud.php",
|
url: "app/tindaklanjut/crud.php",
|
||||||
data: {
|
data: formData,
|
||||||
surat_id: surat_id,
|
processData: false,
|
||||||
jabatan_pegawai_id: jabatan_pegawai_id_tl,
|
contentType: false,
|
||||||
satuan_kerja_penginput: csatker,
|
|
||||||
komen: komen,
|
|
||||||
key: 'simpan_komen'
|
|
||||||
},
|
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
infoToast('success', 'Surat Telah Dikirim');
|
infoToast('success', 'Surat Telah Dikirim');
|
||||||
$('#tabel_komen').load("app/tindaklanjut/tabel_komen.php", {
|
$('#tabel_komen').load("app/tindaklanjut/tabel_komen.php", {
|
||||||
@@ -381,8 +421,6 @@ $('button[name="batal_ubah_tl"]').click(function () {
|
|||||||
$('#no_surat_tl').show();
|
$('#no_surat_tl').show();
|
||||||
$('button[name="simpan_no_surat"]').show();
|
$('button[name="simpan_no_surat"]').show();
|
||||||
}
|
}
|
||||||
// $('#no_surat_tl').hide();
|
|
||||||
// $('.no_surat_label').show();
|
|
||||||
|
|
||||||
$('.sif_label').show();
|
$('.sif_label').show();
|
||||||
$('#sif_naskah').hide();
|
$('#sif_naskah').hide();
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ while ($row = pg_fetch_assoc($query_sifat)) {
|
|||||||
|
|
||||||
// Kode Surat
|
// Kode Surat
|
||||||
$kd_surat_options = '';
|
$kd_surat_options = '';
|
||||||
$query_kdSurat = pg_query($koneksi, 'SELECT id, kode, keterangan FROM kode');
|
$query_kdSurat = pg_query($koneksi, 'SELECT id, kode, keterangan FROM kode WHERE status = 1');
|
||||||
while ($row = pg_fetch_assoc($query_kdSurat)) {
|
while ($row = pg_fetch_assoc($query_kdSurat)) {
|
||||||
$kd_surat_options .= "<option value=" . $row['id'] . ">" . $row['kode'] . "-" . $row['keterangan'] . "</option>";
|
$kd_surat_options .= "<option value=" . $row['id'] . ">" . $row['kode'] . "-" . $row['keterangan'] . "</option>";
|
||||||
// $kd_surat_options .= "<option kode_id='" . $row['id'] . "' value='" . $row['kode'] . " - " . $row['keterangan'] . "'></option>";
|
// $kd_surat_options .= "<option kode_id='" . $row['id'] . "' value='" . $row['kode'] . " - " . $row['keterangan'] . "'></option>";
|
||||||
@@ -260,7 +260,7 @@ while ($row = pg_fetch_assoc($query_penandatangan)) {
|
|||||||
</datalist>-->
|
</datalist>-->
|
||||||
<div style="margin-left: 2rem; width: 60%; display:<?php echo ($surat['kode_surat'] != '') ? 'none' : 'block' ?>">
|
<div style="margin-left: 2rem; width: 60%; display:<?php echo ($surat['kode_surat'] != '') ? 'none' : 'block' ?>">
|
||||||
<select class="form-control select2" id="kdSurat" name="state" style="width: 40%;display:<?php echo ($surat['kode_surat'] != '') ? 'none' : 'block' ?>; margin-left: 5rem;">
|
<select class="form-control select2" id="kdSurat" name="state" style="width: 40%;display:<?php echo ($surat['kode_surat'] != '') ? 'none' : 'block' ?>; margin-left: 5rem;">
|
||||||
<option value="<?= $surat['kode_id'] ?>" selected><?= $surat['kode_surat'] . ' - ' . $surat['kode_keterangan'] ?> </option>
|
<option value="<?= $surat['kode_id'] ?>" selected><?= $surat['kode_surat'] . ' - ' . $surat['kode_keterangan'] ?> </option>
|
||||||
<?php echo $kd_surat_options; ?>
|
<?php echo $kd_surat_options; ?>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -331,8 +331,20 @@ while ($row = pg_fetch_assoc($query_penandatangan)) {
|
|||||||
<div class="form-group" style="display: <?= $display ?>;">
|
<div class="form-group" style="display: <?= $display ?>;">
|
||||||
<textarea class="form-control" id="komen" name="message" rows="2" placeholder="Bagaimana tanggapan anda ?" required=""></textarea>
|
<textarea class="form-control" id="komen" name="message" rows="2" placeholder="Bagaimana tanggapan anda ?" required=""></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
<?php if ($_POST['link'] == 's_pengesahan') { ?>
|
||||||
|
<h6 class="text-muted m-t-0" style="font-family:InterSB;">Lampirkan Dokumen</h6>
|
||||||
|
<form id="fr_cvz" name="fr_cvz" class="form-inline" method="post" onsubmit="return false;" enctype="multipart/form-data">
|
||||||
|
<div class="btn-group btn-group-justified singit" style="width: 20%; ">
|
||||||
|
<a class="btn btn-default waves-effect waves-light" style="border-radius: 5px;" role="button" id="btn_load_file"><i class="fa fa-folder-open"></i> Pilih File</a>
|
||||||
|
</div>
|
||||||
|
<p id="lbl_file_up"></p>
|
||||||
|
<input type="file" name="lamp_dok" class="filestyle" style="display:none" data-buttonbefore="true" id="lamp_dok">
|
||||||
|
</form>
|
||||||
|
<?php } ?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-8"></div>
|
<div class="col-lg-8">
|
||||||
|
|
||||||
|
</div>
|
||||||
<div class="col-lg-4" style="display: flex; justify-content: flex-end;">
|
<div class="col-lg-4" style="display: flex; justify-content: flex-end;">
|
||||||
<?php
|
<?php
|
||||||
if ($_POST['link'] == 's_pengesahan' && in_array($cek_satker, [66, 172, 11, 71, 72, 73, 74])) {
|
if ($_POST['link'] == 's_pengesahan' && in_array($cek_satker, [66, 172, 11, 71, 72, 73, 74])) {
|
||||||
@@ -343,15 +355,20 @@ while ($row = pg_fetch_assoc($query_penandatangan)) {
|
|||||||
<button type="button" class="btn btn-danger btn-rounded" id="batal_retur" style="margin-right: 10px; display: none;">
|
<button type="button" class="btn btn-danger btn-rounded" id="batal_retur" style="margin-right: 10px; display: none;">
|
||||||
<i class="mdi mdi-undo-variant m-r-5"></i> Batal
|
<i class="mdi mdi-undo-variant m-r-5"></i> Batal
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-success btn-rounded" id="save_retur" style="display: none;">
|
<button type="button" class="btn btn-success btn-rounded" id="save_retur" style="margin-right: 10px;display: none;">
|
||||||
<i class="fa fa-floppy-o m-r-5"></i> Simpan
|
<i class="fa fa-floppy-o m-r-5"></i> Simpan
|
||||||
</button>
|
</button>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if ((int)$cek_satker == 11 && $_POST['link'] == 's_pengesahan') { ?>
|
<?php if (in_array($cek_satker, [172, 11, 71, 72, 73, 74]) && $_POST['link'] == 's_pengesahan') { ?>
|
||||||
<button type="button" class="btn btn-success btn-rounded" id="selesai_komen">
|
<button type="button" class="btn btn-info btn-rounded" id="selesai_komen" style="margin-right: 10px;">
|
||||||
<i class="mdi mdi-send m-r-5"></i> Selesai
|
<i class="fa fa-check m-r-5"></i> Selesai
|
||||||
</button>
|
</button>
|
||||||
|
<?php if(!in_array($cek_satker,[11])){?>
|
||||||
|
<button type="button" class="btn btn-success btn-rounded" id="simpan_komen">
|
||||||
|
<i class="mdi mdi-send m-r-5"></i> Kirim
|
||||||
|
</button>
|
||||||
|
<?php } ?>
|
||||||
<?php } elseif ($cek_satker != $satker_pemilik_surat) { ?>
|
<?php } elseif ($cek_satker != $satker_pemilik_surat) { ?>
|
||||||
<button type="button" class="btn btn-success btn-rounded" id="simpan_komen">
|
<button type="button" class="btn btn-success btn-rounded" id="simpan_komen">
|
||||||
<i class="mdi mdi-send m-r-5"></i> Kirim
|
<i class="mdi mdi-send m-r-5"></i> Kirim
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
include("../koneksi.php");
|
include("../koneksi.php");
|
||||||
$komen_id = $_POST['id'];
|
$komen_id = $_POST['id'];
|
||||||
|
$baseURL='../../../public/';
|
||||||
?>
|
?>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<form id="fr_ssn_dok" name="fr_ssn_dok" class="form-horizontal" method="post" onsubmit="return false;" enctype="multipart/form-data">
|
<form id="fr_ssn_dok" name="fr_ssn_dok" class="form-horizontal" method="post" onsubmit="return false;" enctype="multipart/form-data">
|
||||||
<div class="row clearfix">
|
<div class="row clearfix">
|
||||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
||||||
<input type="hidden" id="komen_idh" name="komen_id" value="<?php echo $_POST['id']; ?>">
|
<input type="hidden" id="komen_idh" name="komen_id" value="<?php echo $_POST['id']; ?>">
|
||||||
<center><img id='blah1_dok' class='thumbnail img-responsive' src='app/tindaklanjut/dok/no-avatar.png' style="width: 30%;" /></center>
|
<center><img id='blah1_dok' class='thumbnail img-responsive' src='<?=$baseURL?>/img/img-1.png' style="width: 30%;" /></center>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -36,10 +37,6 @@ $komen_id = $_POST['id'];
|
|||||||
$('#file_dok').trigger('click');
|
$('#file_dok').trigger('click');
|
||||||
});
|
});
|
||||||
|
|
||||||
/*$("button[name='input_foto_dokumen']").click(function(){
|
|
||||||
$('#file_dok').trigger('click');
|
|
||||||
});*/
|
|
||||||
|
|
||||||
var loadFile = function(event) {
|
var loadFile = function(event) {
|
||||||
var output = document.getElementById('blah1_dok');
|
var output = document.getElementById('blah1_dok');
|
||||||
output.src = URL.createObjectURL(event.target.files[0]);
|
output.src = URL.createObjectURL(event.target.files[0]);
|
||||||
@@ -66,7 +63,7 @@ $komen_id = $_POST['id'];
|
|||||||
$('#tabel_pic').load("app/tindaklanjut/tabel_pic.php", {
|
$('#tabel_pic').load("app/tindaklanjut/tabel_pic.php", {
|
||||||
komen_id: data
|
komen_id: data
|
||||||
});
|
});
|
||||||
$('#blah1_dok').attr("src", "app/tindaklanjut/dok/no-avatar.png");
|
$('#blah1_dok').attr("src", "../../../public/img/img-1.png");
|
||||||
$('#simpan_dokumen').hide();
|
$('#simpan_dokumen').hide();
|
||||||
var key = "jumlah_jpg";
|
var key = "jumlah_jpg";
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
|||||||
@@ -5,11 +5,12 @@
|
|||||||
include('../koneksi.php');
|
include('../koneksi.php');
|
||||||
$surat_id = (int)$_POST['id'];
|
$surat_id = (int)$_POST['id'];
|
||||||
$jabatan_pegawai_id_tl = $_POST['jabatan_pegawai_id_tl'];
|
$jabatan_pegawai_id_tl = $_POST['jabatan_pegawai_id_tl'];
|
||||||
$fromSatker_ = pg_query($koneksi,"SELECT satuan_kerja_id FROM surat WHERE id =$surat_id");
|
$fromSatker_ = pg_query($koneksi, "SELECT satuan_kerja_id FROM surat WHERE id =$surat_id");
|
||||||
$fromSatker=pg_fetch_array($fromSatker_);
|
$fromSatker = pg_fetch_array($fromSatker_);
|
||||||
|
|
||||||
$get_pengesahan = pg_query($koneksi, "SELECT pengesahan FROM surat WHERE id = $surat_id");
|
$get_pengesahan = pg_query($koneksi, "SELECT pengesahan FROM surat WHERE id = $surat_id");
|
||||||
$result_pengesahan = pg_fetch_array($get_pengesahan);
|
$result_pengesahan = pg_fetch_array($get_pengesahan);
|
||||||
|
$hide = ((int)$result_pengesahan['pengesahan'] == 1) ? 'none' : 'block';
|
||||||
?>
|
?>
|
||||||
<input type="hidden" id="surat_idg" value="<?php echo $surat_id; ?>">
|
<input type="hidden" id="surat_idg" value="<?php echo $surat_id; ?>">
|
||||||
<input type="hidden" id="jabatan_pegawai_id_tlg" value="<?php echo $jabatan_pegawai_id_tl; ?>">
|
<input type="hidden" id="jabatan_pegawai_id_tlg" value="<?php echo $jabatan_pegawai_id_tl; ?>">
|
||||||
@@ -76,7 +77,7 @@ $result_pengesahan = pg_fetch_array($get_pengesahan);
|
|||||||
<button type="button" class="btn btn-success btn-block md_kpd" id="simpan_kepada_kr">Simpan</button>
|
<button type="button" class="btn btn-success btn-block md_kpd" id="simpan_kepada_kr">Simpan</button>
|
||||||
</form>
|
</form>
|
||||||
<hr>
|
<hr>
|
||||||
<div class="row">
|
<div class="row" style="display: <?=$hide?>;">
|
||||||
<div class="col-lg-6">
|
<div class="col-lg-6">
|
||||||
<button type="button" class="btn btn-default btn-block" id="kirim_semua"><i class="fa fa-arrow-down m-r-5"></i>SEMUA SATKER</button>
|
<button type="button" class="btn btn-default btn-block" id="kirim_semua"><i class="fa fa-arrow-down m-r-5"></i>SEMUA SATKER</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -84,6 +85,7 @@ $result_pengesahan = pg_fetch_array($get_pengesahan);
|
|||||||
<button type="button" class="btn btn-default btn-block" id="clear_kepada"><i class="fa fa-remove m-r-5"></i>CLEAR LIST</button>
|
<button type="button" class="btn btn-default btn-block" id="clear_kepada"><i class="fa fa-remove m-r-5"></i>CLEAR LIST</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<div id="tabel_kepada_kr"></div>
|
<div id="tabel_kepada_kr"></div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,21 @@
|
|||||||
<?php
|
<?php
|
||||||
include('../koneksi.php');
|
include('../koneksi.php');
|
||||||
$komen_id=$_POST['id'];
|
$komen_id = $_POST['id'];
|
||||||
?>
|
$baseURL = '../../../public/doc/';
|
||||||
<input type="hidden" value="<?php echo $komen_id; ?>">
|
$folder = 'tindaklanjut/dok/';
|
||||||
<?php
|
?>
|
||||||
$data_pdf=pg_query("SELECT file,id FROM scan_komen WHERE komen_id='$komen_id' AND LOWER(file) NOT LIKE ALL (ARRAY['%jpg','%jpeg','%png']) ORDER BY id DESC");
|
<input type="hidden" value="<?php echo $komen_id; ?>">
|
||||||
while($rdata_pdf=pg_fetch_array($data_pdf)) {$pdf=$rdata_pdf[0];
|
<?php
|
||||||
if (($pdf==NULL) || ($pdf=='')) {/*echo "File PDF belum diupload..";*/} else {
|
$data_pdf = pg_query($koneksi, "SELECT file,id FROM scan_komen WHERE komen_id='$komen_id' AND LOWER(file) NOT LIKE ALL (ARRAY['%jpg','%jpeg','%png']) ORDER BY id DESC");
|
||||||
?>
|
while ($rdata_pdf = pg_fetch_array($data_pdf)) {
|
||||||
<div class="thumb" style="background-color:#ece9d8;padding:8px;margin-top:6px">
|
$pdf = $rdata_pdf[0];
|
||||||
<a href='app/tindaklanjut/pdf/pdf/<?php echo $pdf; ?>' target='_blank'><?php echo $pdf; ?></a>
|
if (($pdf == NULL) || ($pdf == '')) {/*echo "File PDF belum diupload..";*/
|
||||||
</div>
|
} else {
|
||||||
<?php
|
?>
|
||||||
}
|
<div class="thumb" style="background-color:#ece9d8;padding:8px;margin-top:6px">
|
||||||
}
|
<a href='<?= $baseURL.$folder.$pdf; ?>' target='_blank'><?php echo $pdf; ?></a>
|
||||||
?>
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
@@ -1,51 +1,55 @@
|
|||||||
<?php
|
<?php
|
||||||
include("../koneksi.php");
|
include("../koneksi.php");
|
||||||
$komen_id=$_POST['id'];
|
$komen_id = $_POST['id'];
|
||||||
|
$baseURL = '../../../public/doc/';
|
||||||
|
$dir = 'tindaklanjut/img/';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!--
|
<?php
|
||||||
<div class="row port">
|
$dok = pg_query($koneksi, "SELECT * FROM scan_komen WHERE komen_id='$komen_id'
|
||||||
<div class="portfolioContainer"> -->
|
AND LOWER(file) LIKE ANY (ARRAY['%jpg','%jpeg','%png'])
|
||||||
<?php
|
ORDER BY id DESC
|
||||||
$dok=pg_query("SELECT * FROM scan_komen WHERE komen_id='$komen_id' AND LOWER(file) LIKE ANY (ARRAY['%jpg','%jpeg','%png']) ORDER BY id DESC");
|
");
|
||||||
while($rdok=pg_fetch_array($dok)) {$foto=$rdok['file'];$file_id=$rdok['id'];
|
while ($rdok = pg_fetch_array($dok)) {
|
||||||
?>
|
$foto = $rdok['file'];
|
||||||
<div class="row">
|
$file_id = $rdok['id'];
|
||||||
<div class="col-lg-12">
|
?>
|
||||||
<button type="button" id="<?php echo $file_id; ?>" class="btn btn-block btn-success waves-effect waves-light pr_scan_surat">Print</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<br>
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
<!-- <div class="gal-detail"> -->
|
<button type="button" id="<?php echo $file_id; ?>" class="btn btn-block btn-success waves-effect waves-light pr_scan_surat">Print</button>
|
||||||
<img name="pic" id="<?php echo $rdok['id']; ?>" src="<?php echo 'app/tindaklanjut/dok/'.$foto; ?>" class="img-thumbnail" alt="work-thumbnail">
|
</div>
|
||||||
<!-- </div> -->
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<br>
|
||||||
<?php
|
<div class="row">
|
||||||
}
|
<div class="col-lg-12">
|
||||||
?>
|
<center>
|
||||||
<!--
|
<!-- <div class="gal-detail"> -->
|
||||||
|
<img name="pic" id="<?php echo $rdok['id']; ?>" src="<?= $baseURL . $dir . $foto; ?>" class="img-thumbnail" alt="work-thumbnail">
|
||||||
|
<!-- </div> -->
|
||||||
|
</center>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
<hr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$('.pr_scan_surat').click(function(){
|
$('.pr_scan_surat').click(function() {
|
||||||
var id = $(this).attr('id');
|
var id = $(this).attr('id');
|
||||||
var w = 1000;
|
var w = 1000;
|
||||||
var h = 800;
|
var h = 800;
|
||||||
var left = Number((screen.width/2)-(w/2));
|
var left = Number((screen.width / 2) - (w / 2));
|
||||||
var tops = Number((screen.height/2)-(h/2));
|
var tops = Number((screen.height / 2) - (h / 2));
|
||||||
$.post('app/tindaklanjut/print_pic.php', { id : id}, function (result) {
|
$.post('app/tindaklanjut/print_pic.php', {
|
||||||
WinId = window.open('toolbar=no, location=no, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+tops+', left='+left);
|
id: id
|
||||||
WinId.document.open();
|
}, function(result) {
|
||||||
WinId.document.write(result);
|
WinId = window.open('toolbar=no, location=no, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=no, width=' + w + ', height=' + h + ', top=' + tops + ', left=' + left);
|
||||||
WinId.document.close();
|
WinId.document.open();
|
||||||
WinId.focus();
|
WinId.document.write(result);
|
||||||
});
|
WinId.document.close();
|
||||||
|
WinId.focus();
|
||||||
});
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
@@ -1,12 +1,41 @@
|
|||||||
<?php
|
<?php
|
||||||
include('../../koneksi.php');
|
include('../../koneksi.php');
|
||||||
$key=$_POST['key'];
|
$key = $_POST['key'];
|
||||||
if ($key=='delete_cv') {
|
|
||||||
$id=$_POST['id'];
|
$id = $_POST['id'];
|
||||||
$d=pg_query("SELECT file FROM scan_komen WHERE id='$id'");
|
$key = $_POST['key'];
|
||||||
while($r=pg_fetch_array($d)) {$fil=$r[0];}
|
$dir = '../../../public/doc/tindaklanjut/';
|
||||||
$del_pr=pg_query("DELETE FROM scan_komen WHERE id='$id'");
|
|
||||||
$path = "pdf/".$fil;
|
if ($key == 'delete_cv') {
|
||||||
if(file_exists($path)){unlink($path);}
|
// Query untuk mengambil nama file dari database
|
||||||
|
$query = pg_query_params($koneksi, "SELECT file FROM scan_komen WHERE id=$1", array($id));
|
||||||
|
if ($r = pg_fetch_assoc($query)) {
|
||||||
|
if ($r) {
|
||||||
|
$fil = $r['file'];
|
||||||
|
$path = $dir . 'dok/' . $fil;
|
||||||
|
|
||||||
|
// Menghapus data dari database
|
||||||
|
$del_pr = pg_query_params($koneksi, "DELETE FROM scan_komen WHERE id=$1", array($id));
|
||||||
|
if ($del_pr) {
|
||||||
|
// Menghapus file jika ada
|
||||||
|
if (file_exists($path)) {
|
||||||
|
unlink($path);
|
||||||
|
http_response_code(200);
|
||||||
|
echo json_encode(['icon' => 'success', 'message' => 'Berhasil Dihapus..!!']);
|
||||||
|
} else {
|
||||||
|
http_response_code(404);
|
||||||
|
echo json_encode(['icon' => 'error', 'message' => 'File tidak ditemukan.']);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
http_response_code(500);
|
||||||
|
echo json_encode(['icon' => 'error', 'message' => 'Gagal menghapus data dari database.']);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
http_response_code(404);
|
||||||
|
echo json_encode(['icon' => 'error', 'message' => 'Data tidak ditemukan.']);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
http_response_code(500);
|
||||||
|
echo json_encode(['icon' => 'error', 'message' => 'Gagal mengambil data dari database.']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -5,6 +5,8 @@ if ($_POST['komen_idzz']) {
|
|||||||
} else {
|
} else {
|
||||||
$komen_id = '0';
|
$komen_id = '0';
|
||||||
}
|
}
|
||||||
|
$baseURL = '../../../public/doc/';
|
||||||
|
$folder = 'tindaklanjut/dok/';
|
||||||
?>
|
?>
|
||||||
<input type="hidden" value="<?php echo $komen_id; ?>" id="komen_idxz" style="margin-bottom:6px">
|
<input type="hidden" value="<?php echo $komen_id; ?>" id="komen_idxz" style="margin-bottom:6px">
|
||||||
<?php
|
<?php
|
||||||
@@ -20,13 +22,11 @@ $data_pdf = pg_query($koneksi, "SELECT file,id FROM scan_komen WHERE komen_id='$
|
|||||||
");
|
");
|
||||||
while ($rdata_pdf = pg_fetch_array($data_pdf)) {
|
while ($rdata_pdf = pg_fetch_array($data_pdf)) {
|
||||||
$pdf = $rdata_pdf[0];
|
$pdf = $rdata_pdf[0];
|
||||||
if (($pdf == NULL) || ($pdf == '')) {/*echo "File PDF belum diupload..";*/
|
if (!empty($pdf)) {
|
||||||
} else {
|
|
||||||
?>
|
?>
|
||||||
<div class="thumb" style="background-color:#ece9d8;padding:8px;margin-top:6px">
|
<div class="thumb" style="background-color:#ece9d8;padding:8px;margin-top:6px">
|
||||||
<a href='app/tindaklanjut/pdf/pdf/<?php echo $pdf; ?>' target='_blank'><?php echo $pdf; ?></a>
|
<a href='<?= $baseURL . $folder . $pdf; ?>' target='_blank'><?= $pdf; ?></a>
|
||||||
<!--<embed src="app/tindaklanjut/pdf/pdf/<?php echo $pdf; ?>#toolbar=0" width="100%" height="300"></embed>-->
|
<button type="button" name="cv_delete" style="height:22px;border-radius: 50%" class="btn btn-danger btn-xs pull-right" id="<?= $rdata_pdf[1]; ?>" data-content="Hapus" rel="popover" data-placement="bottom" data-trigger="hover">
|
||||||
<button type="button" name="cv_deletse" style="height:22px;border-radius: 50%" class="btn btn-danger btn-xs pull-right" id="<?php echo $rdata_pdf[1]; ?>" data-content="Hapus" rel="popover" data-placement="bottom" data-trigger="hover">
|
|
||||||
<i class="fa fa-remove"></i>
|
<i class="fa fa-remove"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -36,7 +36,7 @@ while ($rdata_pdf = pg_fetch_array($data_pdf)) {
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$('button[name="cv_deletse"]').click(function() {
|
$('button[name="cv_delete"]').click(function() {
|
||||||
var x = confirm("Anda yakin ingin menghapus ?");
|
var x = confirm("Anda yakin ingin menghapus ?");
|
||||||
if (x) {
|
if (x) {
|
||||||
var key = "delete_cv";
|
var key = "delete_cv";
|
||||||
@@ -45,9 +45,13 @@ while ($rdata_pdf = pg_fetch_array($data_pdf)) {
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "app/tindaklanjut/pdf/crud.php",
|
url: "app/tindaklanjut/pdf/crud.php",
|
||||||
data: 'id=' + id +
|
data: {
|
||||||
'&key=' + key,
|
id: id,
|
||||||
success: function(data) {
|
key: key
|
||||||
|
},
|
||||||
|
success: function(response) {
|
||||||
|
var result = JSON.parse(response);
|
||||||
|
infoToast(result.icon, result.message);
|
||||||
var komen_id = $('#komen_idxz').val();
|
var komen_id = $('#komen_idxz').val();
|
||||||
$('#tabel_upl_cvz').load("app/tindaklanjut/pdf/tabel_upl_cv.php", {
|
$('#tabel_upl_cvz').load("app/tindaklanjut/pdf/tabel_upl_cv.php", {
|
||||||
komen_idzz: komen_id
|
komen_idzz: komen_id
|
||||||
@@ -58,8 +62,23 @@ while ($rdata_pdf = pg_fetch_array($data_pdf)) {
|
|||||||
surat_id: surat_id,
|
surat_id: surat_id,
|
||||||
jabatan_pegawai_id_tl: jabatan_pegawai_id_tl
|
jabatan_pegawai_id_tl: jabatan_pegawai_id_tl
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
error: function(xhr) {
|
||||||
|
var result = JSON.parse(xhr.responseText);
|
||||||
|
infoToast(result.icon, result.message);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function infoToast(icone, infone) {
|
||||||
|
Swal.fire({
|
||||||
|
// position: posisine,
|
||||||
|
icon: icone,
|
||||||
|
title: infone,
|
||||||
|
showConfirmButton: false,
|
||||||
|
timer: 2500
|
||||||
|
});
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -2,25 +2,18 @@
|
|||||||
include("../../koneksi.php");
|
include("../../koneksi.php");
|
||||||
// $url = "/var/www/simdistu/app/tindaklanjut/pdf";
|
// $url = "/var/www/simdistu/app/tindaklanjut/pdf";
|
||||||
$komen_id = $_POST['komen_id_uploadz'];
|
$komen_id = $_POST['komen_id_uploadz'];
|
||||||
$folder = "pdf";
|
$baseURL = '../../../public/doc/';
|
||||||
|
$folder = 'tindaklanjut/dok/';
|
||||||
// $tmp_name = $_FILES["input_load_cvz"]["tmp_name"];
|
|
||||||
// $name = $url."/".$folder."/".$komen_id."_".$_FILES["input_load_cvz"]["name"];
|
|
||||||
// $name = $folder . "/" . $komen_id . "_" . $_FILES["input_load_cvz"]["name"];
|
|
||||||
// $name_pdf = $komen_id . "_" . $_FILES["input_load_cvz"]["name"];
|
|
||||||
|
|
||||||
// move_uploaded_file($tmp_name, $name);
|
|
||||||
// $ins=pg_query($koneksi,"INSERT INTO scan_komen (komen_id,file)
|
|
||||||
// VALUES ('$komen_id','$name_pdf')");
|
|
||||||
|
|
||||||
// Cek apakah file yang diupload adalah PDF atau Dokumen Word
|
// Cek apakah file yang diupload adalah PDF atau Dokumen Word
|
||||||
$allowed_types = array(
|
$allowed_types = array(
|
||||||
'application/pdf',
|
'application/pdf',
|
||||||
'application/msword',
|
'application/msword',
|
||||||
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||||
'application/vnd.ms-excel',
|
'application/vnd.ms-excel',
|
||||||
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
||||||
);
|
);
|
||||||
|
// var_dump($_FILES);die();
|
||||||
$file_type = $_FILES["input_load_cvz"]["type"];
|
$file_type = $_FILES["input_load_cvz"]["type"];
|
||||||
$file_size = $_FILES["input_load_cvz"]["size"];
|
$file_size = $_FILES["input_load_cvz"]["size"];
|
||||||
$max_size = 1087152; // max 1Mb
|
$max_size = 1087152; // max 1Mb
|
||||||
@@ -36,7 +29,7 @@ if (!in_array($file_type, $allowed_types)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$tmp_name = $_FILES["input_load_cvz"]["tmp_name"];
|
$tmp_name = $_FILES["input_load_cvz"]["tmp_name"];
|
||||||
$name = $folder . "/" . $komen_id . "_" . $_FILES["input_load_cvz"]["name"];
|
$name = $baseURL . $folder . $komen_id . "_" . $_FILES["input_load_cvz"]["name"];
|
||||||
$name_pdf = $komen_id . "_" . $_FILES["input_load_cvz"]["name"];
|
$name_pdf = $komen_id . "_" . $_FILES["input_load_cvz"]["name"];
|
||||||
// Cek apakah file berhasil diupload
|
// Cek apakah file berhasil diupload
|
||||||
if (!move_uploaded_file($tmp_name, $name)) {
|
if (!move_uploaded_file($tmp_name, $name)) {
|
||||||
|
|||||||
@@ -78,10 +78,6 @@ $dayList = array(
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
<li class="media">
|
<li class="media">
|
||||||
<!--<a class="pull-left" href="#">
|
|
||||||
<img class="media-object img-circle"
|
|
||||||
src="assets/images/no_profile2.png" alt="img">
|
|
||||||
</a>-->
|
|
||||||
<div class="media-body">
|
<div class="media-body">
|
||||||
<h5 class="media-heading" style="font-family:InterSB;color:#576CBC">
|
<h5 class="media-heading" style="font-family:InterSB;color:#576CBC">
|
||||||
<?php echo ' Dari ' . $r['nama_jabatan']; ?>
|
<?php echo ' Dari ' . $r['nama_jabatan']; ?>
|
||||||
@@ -121,8 +117,6 @@ $dayList = array(
|
|||||||
?>
|
?>
|
||||||
</table><br>
|
</table><br>
|
||||||
<div class="isi_komen" id="isi_komen<?php echo $r['id']; ?>">
|
<div class="isi_komen" id="isi_komen<?php echo $r['id']; ?>">
|
||||||
|
|
||||||
|
|
||||||
<div class="portlet">
|
<div class="portlet">
|
||||||
<div id="bg-default" class="panel-collapse collapse in">
|
<div id="bg-default" class="panel-collapse collapse in">
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
@@ -354,7 +348,6 @@ while ($rkmn = pg_fetch_array($kmn)) {
|
|||||||
var idne = $(this).attr('idne');
|
var idne = $(this).attr('idne');
|
||||||
var idna = $(this).attr('idna');
|
var idna = $(this).attr('idna');
|
||||||
$('#modal_pic').modal('show');
|
$('#modal_pic').modal('show');
|
||||||
$('#modal_body_pic').html("");
|
|
||||||
if (idne == idna) {
|
if (idne == idna) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
@@ -383,7 +376,6 @@ while ($rkmn = pg_fetch_array($kmn)) {
|
|||||||
var idno = $(this).attr('idno');
|
var idno = $(this).attr('idno');
|
||||||
var idnu = $(this).attr('idnu');
|
var idnu = $(this).attr('idnu');
|
||||||
$('#modal_file').modal('show');
|
$('#modal_file').modal('show');
|
||||||
$('#modal_body_file').html("");
|
|
||||||
if (idno == idnu) {
|
if (idno == idnu) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
@@ -398,7 +390,7 @@ while ($rkmn = pg_fetch_array($kmn)) {
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "app/tindaklanjut/modal_vfile.php",
|
url: "app/tindaklanjut/modal_vfile.php",
|
||||||
data: 'id=' + id,
|
data:{id:id},
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
$('#modal_body_file').html(data);
|
$('#modal_body_file').html(data);
|
||||||
$('#judul_modal_file').html('View Lampiran File');
|
$('#judul_modal_file').html('View Lampiran File');
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
include("../koneksi.php");
|
include("../koneksi.php");
|
||||||
$komen_id = $_POST['komen_id'];
|
$komen_id = $_POST['komen_id'];
|
||||||
|
$baseURL = '../../../../public/doc/';
|
||||||
|
$dir = 'tindaklanjut/img/';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
@@ -17,7 +20,7 @@ $komen_id = $_POST['komen_id'];
|
|||||||
<div class="row port">
|
<div class="row port">
|
||||||
<div class="portfolioContainer">
|
<div class="portfolioContainer">
|
||||||
<?php
|
<?php
|
||||||
$dok = pg_query($koneksi,"SELECT * FROM scan_komen
|
$dok = pg_query($koneksi, "SELECT * FROM scan_komen
|
||||||
WHERE komen_id=$komen_id AND LOWER(file) LIKE
|
WHERE komen_id=$komen_id AND LOWER(file) LIKE
|
||||||
ANY (ARRAY['%jpg','%jpeg','%png']) ORDER BY id DESC");
|
ANY (ARRAY['%jpg','%jpeg','%png']) ORDER BY id DESC");
|
||||||
while ($rdok = pg_fetch_array($dok)) {
|
while ($rdok = pg_fetch_array($dok)) {
|
||||||
@@ -25,7 +28,7 @@ $komen_id = $_POST['komen_id'];
|
|||||||
?>
|
?>
|
||||||
<div class="col-sm-6 col-lg-3 col-md-4 webdesign illustrator">
|
<div class="col-sm-6 col-lg-3 col-md-4 webdesign illustrator">
|
||||||
<div class="gal-detail thumb">
|
<div class="gal-detail thumb">
|
||||||
<img name="pic" id="<?php echo $rdok['id']; ?>" src="<?php echo 'app/tindaklanjut/dok/' . $foto; ?>" class="img-thumbnail" alt="work-thumbnail">
|
<img name="pic" id="<?php echo $rdok['id']; ?>" src="<?= $baseURL . $dir . $foto; ?>" class="img-thumbnail" alt="work-thumbnail">
|
||||||
<button type="button" name="dok_delete" style="height:22px;border-radius: 50%;" class="btn btn-danger btn-xs pull-right" id="<?php echo $rdok[0]; ?>" data-content="Hapus" rel="popover" data-placement="bottom" data-trigger="hover">
|
<button type="button" name="dok_delete" style="height:22px;border-radius: 50%;" class="btn btn-danger btn-xs pull-right" id="<?php echo $rdok[0]; ?>" data-content="Hapus" rel="popover" data-placement="bottom" data-trigger="hover">
|
||||||
<i class="fa fa-remove"></i>
|
<i class="fa fa-remove"></i>
|
||||||
</button>
|
</button>
|
||||||
@@ -47,10 +50,15 @@ $komen_id = $_POST['komen_id'];
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "app/tindaklanjut/delete.php",
|
url: "app/tindaklanjut/delete.php",
|
||||||
data: 'id=' + id +
|
data: {
|
||||||
'&key=' + key,
|
id: id,
|
||||||
success: function(data) {
|
key: key
|
||||||
|
},
|
||||||
|
success: function(response) {
|
||||||
|
var result = JSON.parse(response);
|
||||||
|
infoToast(result.icon,result.message);
|
||||||
var komen_id = $('#riwayat_keluhan_ida').val();
|
var komen_id = $('#riwayat_keluhan_ida').val();
|
||||||
|
|
||||||
$('#tabel_pic').load("app/tindaklanjut/tabel_pic.php", {
|
$('#tabel_pic').load("app/tindaklanjut/tabel_pic.php", {
|
||||||
komen_id: komen_id
|
komen_id: komen_id
|
||||||
});
|
});
|
||||||
@@ -60,8 +68,23 @@ $komen_id = $_POST['komen_id'];
|
|||||||
surat_id: surat_id,
|
surat_id: surat_id,
|
||||||
jabatan_pegawai_id_tl: jabatan_pegawai_id_tl
|
jabatan_pegawai_id_tl: jabatan_pegawai_id_tl
|
||||||
});
|
});
|
||||||
|
},error:function(xhr){
|
||||||
|
var result = JSON.parse(xhr.responseText);
|
||||||
|
infoToast(result.icon,result.message);
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function infoToast(icone, infone) {
|
||||||
|
Swal.fire({
|
||||||
|
// position: posisine,
|
||||||
|
icon: icone,
|
||||||
|
title: infone,
|
||||||
|
showConfirmButton: false,
|
||||||
|
timer: 2500
|
||||||
|
});
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -3,8 +3,8 @@ include('../koneksi.php');
|
|||||||
$komen_id = $_POST['id'];
|
$komen_id = $_POST['id'];
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form id="fr_cvz" name="fr_cvz" class="form-inline" method="post" onsubmit="return false;" enctype="multipart/form-data">
|
<form id="form_cvz" name="form_cvz" class="form-inline" method="post" onsubmit="return false;" enctype="multipart/form-data">
|
||||||
<input type="hidden" value="<?php echo $komen_id; ?>" name="komen_id_uploadz">
|
<input type="hidden" value="<?php echo $komen_id; ?>" name="komen_id_uploadz" id="komen_id_uploadz">
|
||||||
<div class="btn-group btn-group-justified singit">
|
<div class="btn-group btn-group-justified singit">
|
||||||
<a class="btn btn-default waves-effect waves-light" role="button" id="btn_load_cvz"><i class="fa fa-folder-open"></i> Load File</a>
|
<a class="btn btn-default waves-effect waves-light" role="button" id="btn_load_cvz"><i class="fa fa-folder-open"></i> Load File</a>
|
||||||
<a class="btn btn-danger waves-effect waves-light" role="button" id="btn_upl_cvz"><i class="fa fa-upload"></i> Upload</a>
|
<a class="btn btn-danger waves-effect waves-light" role="button" id="btn_upl_cvz"><i class="fa fa-upload"></i> Upload</a>
|
||||||
@@ -28,20 +28,26 @@ $komen_id = $_POST['id'];
|
|||||||
});
|
});
|
||||||
|
|
||||||
$('#input_load_cvz').change(function(e) {
|
$('#input_load_cvz').change(function(e) {
|
||||||
var fileName = e.target.files[0].name;
|
if (e.target.files.length > 0) {
|
||||||
$("#btn_upl_cvz").trigger('click');
|
$("#btn_upl_cvz").trigger('click');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#btn_upl_cvz').click(function() {
|
$('#btn_upl_cvz').click(function() {
|
||||||
$("#fr_cvz").trigger('submit');
|
$("#form_cvz").trigger('submit');
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#fr_cvz").on('submit', (function(e) {
|
$("#form_cvz").on('submit', (function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
var fileInput = $('#input_load_cvz')[0].files[0];
|
||||||
|
var formData = new FormData();
|
||||||
|
formData.append('komen_id_uploadz', $('#komen_id_uploadz').val());
|
||||||
|
formData.append('input_load_cvz', fileInput);
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "app/tindaklanjut/pdf/upl_cv.php",
|
url: "app/tindaklanjut/pdf/upl_cv.php",
|
||||||
type: "POST",
|
type: "POST",
|
||||||
data: new FormData(this),
|
data: formData,
|
||||||
contentType: false,
|
contentType: false,
|
||||||
cache: false,
|
cache: false,
|
||||||
processData: false,
|
processData: false,
|
||||||
|
|||||||
@@ -1,18 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
include("../koneksi.php");
|
include("../koneksi.php");
|
||||||
// $komen_id=$_POST['komen_id'];
|
|
||||||
// $url="/var/www/simdistu/app/tindaklanjut";
|
|
||||||
// $folder = "dok";
|
|
||||||
// $tmp_name = $_FILES["file_dok"]["tmp_name"];
|
|
||||||
// $name = $url."/".$folder."/".$komen_id."_".$_FILES["file_dok"]["name"];
|
|
||||||
// $name_ins = $komen_id."_".$_FILES["file_dok"]["name"];
|
|
||||||
// move_uploaded_file($tmp_name, $name);
|
|
||||||
// $input = pg_query("INSERT INTO scan_komen (file,komen_id) VALUES ('$name_ins','$komen_id')");
|
|
||||||
// echo $komen_id;
|
|
||||||
|
|
||||||
// $surat_id = $_POST['surat_id'];
|
|
||||||
$komen_id=$_POST['komen_id'];
|
$komen_id=$_POST['komen_id'];
|
||||||
$folder = "dok";
|
$baseURL = '../../public/doc/';
|
||||||
|
$dir = 'tindaklanjut/img/';
|
||||||
|
|
||||||
// Allowed MIME types and extensions
|
// Allowed MIME types and extensions
|
||||||
$allowed_types = array('image/png', 'image/jpeg');
|
$allowed_types = array('image/png', 'image/jpeg');
|
||||||
@@ -27,7 +17,7 @@ $file_extension = pathinfo($file_name, PATHINFO_EXTENSION);
|
|||||||
// Validate the file type and extension
|
// Validate the file type and extension
|
||||||
if (in_array($file_type, $allowed_types) && in_array($file_extension, $allowed_extensions)) {
|
if (in_array($file_type, $allowed_types) && in_array($file_extension, $allowed_extensions)) {
|
||||||
// Define the new file path
|
// Define the new file path
|
||||||
$name = $folder . "/" . $komen_id . "_" . $file_name;
|
$name = $baseURL.$dir . $komen_id . "_" . $file_name;
|
||||||
$name_ins = $komen_id . "_" . $file_name;
|
$name_ins = $komen_id . "_" . $file_name;
|
||||||
|
|
||||||
// Move the uploaded file
|
// Move the uploaded file
|
||||||
|
|||||||
+4
-2
@@ -8,7 +8,8 @@
|
|||||||
<meta name="author" content="Coderthemes">
|
<meta name="author" content="Coderthemes">
|
||||||
|
|
||||||
<!-- App favicon -->
|
<!-- App favicon -->
|
||||||
<link rel="shortcut icon" href="assets/images/logo_rssa.png">
|
<link rel="shortcut icon" href="assets/images/logo_rssa2.png">
|
||||||
|
<!-- <link rel="shortcut icon" href="assets/images/logo_rssa.png"> -->
|
||||||
<!-- App title -->
|
<!-- App title -->
|
||||||
<title>E-LETTER RSSA</title>
|
<title>E-LETTER RSSA</title>
|
||||||
|
|
||||||
@@ -49,7 +50,8 @@
|
|||||||
<div class="m-t-40 account-pages">
|
<div class="m-t-40 account-pages">
|
||||||
<div class="text-center account-logo-box" style="background-color:white">
|
<div class="text-center account-logo-box" style="background-color:white">
|
||||||
<span>
|
<span>
|
||||||
<center><img src="assets/images/logo_rssa.jpg" alt="image" class="img-responsive" width="200"></center>
|
<!-- <center><img src="assets/images/logo_rssa.jpg" alt="image" class="img-responsive" width="200"></center> -->
|
||||||
|
<center><img src="assets/images/logo_rssa2.png" alt="image" class="img-responsive" width="200" ></center>
|
||||||
</span>
|
</span>
|
||||||
<br>
|
<br>
|
||||||
<h2 class="text-uppercase">
|
<h2 class="text-uppercase">
|
||||||
|
|||||||
+2
-2
@@ -9,7 +9,8 @@
|
|||||||
<meta name="author" content="Coderthemes">
|
<meta name="author" content="Coderthemes">
|
||||||
|
|
||||||
<!-- App favicon -->
|
<!-- App favicon -->
|
||||||
<link rel="shortcut icon" href="assets/images/logo_rssa.png">
|
<link rel="shortcut icon" href="assets/images/logo_rssa2.png">
|
||||||
|
<!-- <link rel="shortcut icon" href="assets/images/logo_rssa.png"> -->
|
||||||
<!-- App title -->
|
<!-- App title -->
|
||||||
<title>E-LETTER RSSA</title>
|
<title>E-LETTER RSSA</title>
|
||||||
|
|
||||||
@@ -34,7 +35,6 @@
|
|||||||
<link href="plugins/datatables/dataTables.colVis.css" rel="stylesheet" type="text/css" />
|
<link href="plugins/datatables/dataTables.colVis.css" rel="stylesheet" type="text/css" />
|
||||||
<link href="plugins/datatables/dataTables.bootstrap.min.css" rel="stylesheet" type="text/css" />
|
<link href="plugins/datatables/dataTables.bootstrap.min.css" rel="stylesheet" type="text/css" />
|
||||||
<link href="plugins/datatables/fixedColumns.dataTables.min.css" rel="stylesheet" type="text/css" />
|
<link href="plugins/datatables/fixedColumns.dataTables.min.css" rel="stylesheet" type="text/css" />
|
||||||
<!-- <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" /> -->
|
|
||||||
<link href="assets/vendor/select2-4.1.0/dist/css/select2.min.css" rel="stylesheet" />
|
<link href="assets/vendor/select2-4.1.0/dist/css/select2.min.css" rel="stylesheet" />
|
||||||
|
|
||||||
<!-- HTML5 Shiv and Respond.js IE8 support of HTML5 elements and media queries -->
|
<!-- HTML5 Shiv and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 102 KiB |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 52 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 64 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 64 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user