first commit

This commit is contained in:
root
2024-08-13 05:44:19 +00:00
commit 2b7abf23e8
2299 changed files with 379710 additions and 0 deletions
+43
View File
@@ -0,0 +1,43 @@
<?php
include('../koneksi.php');
$key=$_POST['key'];
if ($key=='ch_pns') {
$syarat_ibel_id=$_POST['syarat_ibel_id'];
$cek=pg_query("SELECT pns FROM syarat_ibel WHERE id=$syarat_ibel_id");
while($r=pg_fetch_array($cek)) {$pns=$r[0];}
if ($pns==NULL) {pg_query("UPDATE syarat_ibel SET pns='y' WHERE id=$syarat_ibel_id");} else {pg_query("UPDATE syarat_ibel SET pns=NULL WHERE id=$syarat_ibel_id");}
} else
if ($key=='ch_blud') {
$syarat_ibel_id=$_POST['syarat_ibel_id'];
$cek=pg_query("SELECT blud FROM syarat_ibel WHERE id=$syarat_ibel_id");
while($r=pg_fetch_array($cek)) {$blud=$r[0];}
if ($blud==NULL) {pg_query("UPDATE syarat_ibel SET blud='y' WHERE id=$syarat_ibel_id");} else {pg_query("UPDATE syarat_ibel SET blud=NULL WHERE id=$syarat_ibel_id");}
} else
if ($key=='simpan_bel_setting') {
$id=$_POST['id'];
$berkas=$_POST['berkas'];
$cek_bel_setting=pg_query("SELECT id FROM syarat_ibel WHERE id='$id'");
$row_bel_setting = pg_fetch_row($cek_bel_setting);
if ($row_bel_setting[0] > 0) {
$upd_bel_setting = pg_query("UPDATE syarat_ibel SET
berkas='$berkas'
WHERE id=$id");
} else {
$ins_bel_setting = pg_query("INSERT into syarat_ibel (
berkas
) values(
'$berkas'
)
");
}
} else
if ($key=='delete_bel_setting') {
$id=$_POST['id'];
$d=pg_query("SELECT file FROM syarat_ibel WHERE id='$id'");
while($r=pg_fetch_array($d)) {$fil=$r[0];}
$path = "pdf/pdf/".$fil;
if(file_exists($path)){unlink($path);}
$del_bel_setting = pg_query("DELETE FROM syarat_ibel WHERE id='$id'");
}
?>
+119
View File
@@ -0,0 +1,119 @@
<style type="text/css">
.no-border{
border:none;
}
.modal-backdrop {
visibility: hidden !important;
}
.modal.in {
background-color: rgba(0,0,0,0.5);
}
</style>
<br>
<br>
<br>
<br>
<p class="judul_page"><i class="mdi mdi-settings m-r-5"></i>Setting Ijin Belajar</p>
<div class="row">
<div class="col-lg-2">
<button type="button" id="btn_baru_bel_setting" class="btn btn-default waves-effect waves-light" style="font-family:Arial;font-weight:bold;color:black">
<i class="fa fa-plus m-r-5"></i>
kelengkapan dan persyaratan pendidikan
</button>
</div>
</div>
<br>
<div class="row">
<div class="col-md-12">
<div id="tabel_bel_setting"></div>
</div>
</div>
<div id="modal_bel_setting" 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">Input</h4>
</div>
<div class="modal-body" id="modal_body_bel_setting"></div>
<div class="modal-footer no-border">
<button type="button" class="btn btn-default waves-effect" data-dismiss="modal" id="keluar_bel_setting">Keluar</button>
<button type="button" class="btn btn-primary waves-effect waves-light" id="simpan_bel_setting">Simpan</button>
</div>
</div>
</div>
</div>
<div id="modal_file" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header no-border">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel">Upload Contoh Dokumen</h4>
</div>
<div class="modal-body" id="modal_body_file"></div>
<div class="modal-footer no-border">
<button type="button" class="btn btn-success btn-block waves-effect" data-dismiss="modal" id="keluar_file">Keluar</button>
</div>
</div>
</div>
</div>
<script>
$('#tabel_bel_setting').load("app/bel_setting/tabel.php");
$('#btn_baru_bel_setting').click(function(){
var id = 0;
$('#modal_bel_setting').modal('show');
$('#modal_body_bel_setting').html("");
$.ajax({
type: "POST",
url: "app/bel_setting/modal.php",
data: 'id='+id,
success: function(data){
$('#modal_body_bel_setting').html(data);
$('#nama_bel_setting').first().focus().selected();
}
});
});
$('#simpan_bel_setting').click(function(){
var id = $('#syarat_ibel_id').val();
var berkas = $('#berkas').val();
var key = 'simpan_bel_setting';
$.ajax({
type: "POST",
url: "app/bel_setting/crud.php",
data: 'id='+id
+'&berkas='+berkas
+'&key='+key,
success: function(data){
$('#modal_bel_setting').modal('hide');
$('body').removeClass('modal-open');
$('.modal-backdrop').remove();
alert('tersimpan..');
$('#tabel_bel_setting').load("app/bel_setting/tabel.php");
}
});
});
$("#modal_bel_setting").on("hidden.bs.modal", function () {
$(this).off('hidden.bs.modal');
});
$(document).on('hidden.bs.modal', function (event) {
if ($('.modal:visible').length) {
$('body').addClass('modal-open');
}
});
</script>
+17
View File
@@ -0,0 +1,17 @@
<?php
include ('../koneksi.php');
$id=$_POST['id'];
$data=pg_query("SELECT * FROM syarat_ibel WHERE id=$id");
while($row=pg_fetch_array($data)) {
$id=$row['id'];
$berkas=$row['berkas'];
}
?>
<form role="form">
<div class="form-group">
<label for="exampleInputEmail1">Berkas</label>
<input type="hidden" value="<?php echo $id; ?>" id="syarat_ibel_id">
<input type="text" class="form-control" value="<?php echo $berkas; ?>" id="berkas">
</div>
</form>
+4
View File
@@ -0,0 +1,4 @@
php_value upload_max_filesize 900M
php_value post_max_size 900M
php_value max_execution_time 9000
php_value max_input_time 9000
+12
View File
@@ -0,0 +1,12 @@
<?php
include('../../koneksi.php');
$key=$_POST['key'];
if ($key=='delete_cv') {
$id=$_POST['id'];
$d=pg_query("SELECT file FROM syarat_ibel WHERE id='$id'");
while($r=pg_fetch_array($d)) {$fil=$r[0];}
$del_pr=pg_query("UPDATE syarat_ibel SET file=NULL WHERE id='$id'");
$path = "pdf/".$fil;
if(file_exists($path)){unlink($path);}
}
?>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+46
View File
@@ -0,0 +1,46 @@
<?php
include('../../koneksi.php');
$syarat_ibel_id=$_POST['syarat_ibel_idzz'];
?>
<input type="hidden" value="<?php echo $syarat_ibel_id; ?>" id="syarat_ibel_idxz" style="margin-bottom:6px">
<?php
$data_pdf=pg_query("SELECT file,id FROM syarat_ibel WHERE id='$syarat_ibel_id' ORDER BY id DESC");
while($rdata_pdf=pg_fetch_array($data_pdf)) {$pdf=$rdata_pdf[0];
if (($pdf==NULL) || ($pdf=='')) {/*echo "File PDF belum diupload..";*/} else {
?>
<div class="thumb" style="background-color:#ece9d8;padding:8px;margin-top:6px">
<a href='app/bel_setting/pdf/pdf/<?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>-->
<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>
</button>
</div>
<?php
}
}
?>
<script>
$('button[name="cv_deletse"]').click(function(){
var x = confirm("Anda yakin ingin menghapus ?");
if (x) {
var key = "delete_cv";
var id = $(this).attr('id');
var rowElement = $(this).parent().parent();
var syarat_ibel_id=$('#syarat_ibel_idxz').val();
$.ajax({
type: "POST",
url: "app/bel_setting/pdf/crud.php",
data: 'id='+id
+'&syarat_ibel_id='+syarat_ibel_id
+'&key='+key,
success: function(data){
var syarat_ibel_id=$('#syarat_ibel_idxz').val();
$('#tabel_upl_cvz').load("app/bel_setting/pdf/tabel_upl_cv.php",{syarat_ibel_idzz:syarat_ibel_id});
}
});
} else {}
});
</script>
+14
View File
@@ -0,0 +1,14 @@
<?php
print_r($_POST);
include("../../koneksi.php");
$syarat_ibel_id=$_POST['syarat_ibel_id_uploadz'];
$folder = "pdf";
$tmp_name = $_FILES["input_load_cvz"]["tmp_name"];
$name = $folder."/".$syarat_ibel_id."_".$_FILES["input_load_cvz"]["name"];
$name_pdf = $syarat_ibel_id."_".$_FILES["input_load_cvz"]["name"];
move_uploaded_file($tmp_name, $name);
$upd=pg_query("UPDATE syarat_ibel SET file='$name_pdf' WHERE id=$syarat_ibel_id");
?>
+145
View File
@@ -0,0 +1,145 @@
<?php
include('../koneksi.php');
?>
<script type="text/javascript">$("#tabel_data_bel_setting").DataTable({"stateSave": true,"paging": true,"lengthChange": true,"searching": true,"ordering": false,"info": true,"autoWidth": false,lengthMenu: [
[100, -1],
[100, 'All']
]});</script>
<table id="tabel_data_bel_setting" class="table table-striped table-condensed table-bordered" cellpadding="1"
style="font-family:'RubReg';font-size:13px"
>
<thead>
<tr style="text-align:center;color:black;font-weight:bold">
<td width="30">No</td>
<td>Berkas</td>
<td width="20px;">#</td>
<td width="30px;">PNS</td>
<td width="30px;">BLUD</td>
<td align="center" width="70px;">Tools</td>
</tr>
</thead>
<tbody style="color:black">
<?php
$no=1;
$data = pg_query("SELECT id,berkas,pns,blud FROM syarat_ibel ORDER BY id ASC");
while($row=pg_fetch_array($data)) {
$pns=$row['pns'];
$blud=$row['blud'];
?>
<tr>
<td class="kiri" align="center"><?php echo $no; ?></td>
<td><?php echo $row['berkas']; ?></td>
<td align="center">
<button type="button" name="file_contoh" style="height:22px;"class="btn btn-default btn-xs file_contoh"
id="<?php echo $row['id'];?>" data-content="Upload Contoh Dokumen"
rel="popover" data-placement="top" data-trigger="hover">
<i class="fa fa-file m-r-5"></i>
</button>
</td>
<td align="center" style="color:red" class="ch_pns" id="<?php echo $row['id'];?>"><?php if ($pns=='y') { ?><i class="fa fa-check"></i><?php } else {} ?></td>
<td align="center" style="color:red" class="ch_blud" id="<?php echo $row['id'];?>"><?php if ($blud=='y') { ?><i class="fa fa-check"></i><?php } else {} ?></td>
<td class="kanan" align="center">
<button type="button" name="edit_bel_setting" style="height:22px;" class="btn btn-teal btn-xs edit_bel_setting" id="<?php echo $row['id'];?>" data-content="Edit Data" rel="popover" data-placement="top" data-trigger="hover">
<i class="fa fa fa-pencil"></i>
</button>
<button type="button" name="delete_bel_setting" style="height:22px;"class="btn btn-danger btn-xs delete_bel_setting" id="<?php echo $row['id'];?>" data-content="Hapus" rel="popover" data-placement="top" data-trigger="hover">
<i class="fa fa-remove"></i>
</button>
</td>
</tr>
<?php
$no++;
}
?>
</tbody>
</table>
<script type="text/javascript">
$('button[name="file_contoh"]').popover();
$('button[name="edit_bel_setting"]').popover();
$('button[name="delete_bel_setting"]').popover();
$("#tabel_data_bel_setting").on('click','.ch_pns',function(){
var key = "ch_pns";
var syarat_ibel_id = $(this).attr('id');
$.ajax({
type: "POST",
url: "app/bel_setting/crud.php",
data: 'syarat_ibel_id='+syarat_ibel_id
+'&key='+key,
success: function(data){
$('#tabel_bel_setting').load("app/bel_setting/tabel.php");
}
});
});
$("#tabel_data_bel_setting").on('click','.ch_blud',function(){
var key = "ch_blud";
var syarat_ibel_id = $(this).attr('id');
$.ajax({
type: "POST",
url: "app/bel_setting/crud.php",
data: 'syarat_ibel_id='+syarat_ibel_id
+'&key='+key,
success: function(data){
$('#tabel_bel_setting').load("app/bel_setting/tabel.php");
}
});
});
$("#tabel_data_bel_setting").on('click','.file_contoh',function(){
var syarat_ibel_id = $(this).attr('id');
var currentRow=$(this).closest("tr");
var berkas = currentRow.find("td:eq(1)").text();
$('#modal_file').modal('show');
$('#modal_body_file').html("");
$.ajax({
type: "POST",
url: "app/bel_setting/upd_file.php",
data: 'syarat_ibel_id='+syarat_ibel_id
+'&berkas='+berkas,
success: function(data){
$('#modal_body_file').html(data);
}
});
});
$("#tabel_data_bel_setting").on('click','.edit_bel_setting',function(){
var id = $(this).attr('id');
$('#modal_bel_setting').modal('show');
$('#modal_body_bel_setting').html("");
$.ajax({
type: "POST",
url: "app/bel_setting/modal.php",
data: 'id='+id,
success: function(data){
$('#modal_body_bel_setting').html(data);
$('#berkas').first().focus().selected();
}
});
});
$("#tabel_data_bel_setting").on('click','.delete_bel_setting',function(){
var x = confirm("Anda yakin ingin menghapus ?");
if (x) {
var key = "delete_bel_setting";
var id = $(this).attr('id');
var rowElement = $(this).parent().parent();
$.ajax({
type: "POST",
url: "app/bel_setting/crud.php",
data: 'id='+id
+'&key='+key,
success: function(data){
rowElement.fadeOut(500).remove();
}
});
} else {}
});
</script>
+104
View File
@@ -0,0 +1,104 @@
<?php
include('../koneksi.php');
$syarat_ibel_id=$_POST['syarat_ibel_id'];
$berkas=$_POST['berkas'];
?>
<h4><?php echo $berkas; ?></h4>
<form id="fr_cvz" name="fr_cvz" class="form-inline" method="post" onsubmit="return false;" enctype="multipart/form-data">
<input type="hidden" value="<?php echo $syarat_ibel_id; ?>" name="syarat_ibel_id_uploadz">
<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>&nbsp;&nbsp;Load File</a>
<a class="btn btn-danger waves-effect waves-light" role="button" id="btn_upl_cvz"><i class="fa fa-upload"></i>&nbsp;&nbsp;Upload</a>
</div>
<input type="file" name="input_load_cvz" class="filestyle" style="display:none" data-buttonbefore="true" id="input_load_cvz">
</form>
<div id="tabel_upl_cvz"></div>
<script>
var syarat_ibel_id = $('input[name="syarat_ibel_id_uploadz"]').val();
$('#btn_upl_cvz').hide();
$('#tabel_upl_cvz').load("app/bel_setting/pdf/tabel_upl_cv.php",{syarat_ibel_idzz:syarat_ibel_id});
$('#btn_load_cvz').click(function(){
$('#input_load_cvz').trigger('click');
});
$('#input_load_cvz').change(function(e){
var fileName = e.target.files[0].name;
$("#btn_upl_cvz").trigger('click');
});
$('#btn_upl_cvz').click(function(){
$("#fr_cvz").trigger('submit');
});
$("#fr_cvz").on('submit',(function(e) {
e.preventDefault();
$.ajax({
url: "app/bel_setting/pdf/upl_cv.php",
type: "POST",
data: new FormData(this),
contentType: false,
cache: false,
processData:false,
success: function(data) {
alert('Data tersimpan..');
var syarat_ibel_id = $('input[name="syarat_ibel_id_uploadz"]').val();
$('#tabel_upl_cvz').load("app/bel_setting/pdf/tabel_upl_cv.php",{syarat_ibel_idzz:syarat_ibel_id});
}
});
}));
/*
var riwayat_syarat_ibel_id = $('input[name="riwayat_syarat_ibel_id_uploadz"]').val();
$('#btn_upl_cvz').hide();
$('#tabel_upl_cvz').load("app/bel_setting/tabel_upl_cv.php",{riwayat_syarat_ibel_idzz:riwayat_syarat_ibel_id});
$('#btn_load_cvz').click(function(){
$('#input_load_cvz').trigger('click');
});
$('#input_load_cvz').change(function(e){
var fileName = e.target.files[0].name;
$("#btn_upl_cvz").trigger('click');
});
$('#btn_upl_cvz').click(function(){
$("#fr_cvz").trigger('submit');
});
$("#fr_cvz").on('submit',(function(e) {
e.preventDefault();
$.ajax({
url: "app/bel_setting/upl_cv.php",
type: "POST",
data: new FormData(this),
contentType: false,
cache: false,
processData:false,
success: function(data) {
alert('Data tersimpan..');
var key="jumlah_nonjpg";
var riwayat_syarat_ibel_id = $('input[name="riwayat_syarat_ibel_id_uploadz"]').val();
$.ajax({
type: "POST",
url: "app/st_ibel/crud.php",
data: 'riwayat_syarat_ibel_id='+riwayat_syarat_ibel_id
+'&key='+key,
success: function(data){
$('.sr'+riwayat_syarat_ibel_id).html(' ('+data+')');
$('#tabel_upl_cvz').load("app/bel_setting/tabel_upl_cv.php",{riwayat_syarat_ibel_idzz:riwayat_syarat_ibel_id});
$("#btn_upl_cvz").hide();
var riwayat_ibel_id=$('#riwayat_ibel_id').val();
var data_pegawai_id=$('#data_pegawai_id').val();
$('#tabel_kelengkapan').load('app/st_ibel/tabel_daftar.php',{riwayat_ibel_id:riwayat_ibel_id, data_pegawai_id:data_pegawai_id});
}
});
}
});
}));
*/
</script>