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
+232
View File
@@ -0,0 +1,232 @@
<?php
include("../koneksi.php");
$thn_skrg=date('Y');
?>
<script type="text/javascript">$("#tabel_data_persiapan").DataTable({"stateSave": true,"paging": true,"lengthChange": true,"searching": true,"ordering": false,"info": true,"autoWidth": false});</script>
<input type="hidden" id="jenis" value="<?php echo $jenis_user; ?>">
<table id="tabel_data_persiapan" class="table table-striped table-condensed" cellpadding="1" >
<thead>
<tr>
<tr>
<td width="190"><b>Jenis</b></td>
<td><b>Nama Kegiatan</b></td>
<td width="100"><b>Tanggal</b></td>
<td><b>Pukul</b></td>
<td><b>Tempat</b></td>
<td width="110"><b>Penyelenggara</b></td>
<td width="60"><b>Status</b></td>
<td width="20"><b>TU</b></td>
<td width="160px;"><b>Tools</b></td>
</tr>
</thead>
<tbody>
<?php
$data=pg_query("SELECT p.nama_pelatihan,(SELECT j.nama FROM jenis_pelatihan j WHERE j.id=p.jenis_pelatihan_id),
p.penyelenggara,p.status,p.id,p.jatuh_tempo_reg,
p.tanggal_mulai,p.tanggal_selesai,p.waktu_mulai,p.waktu_selesai,p.tempat,p.no_tu
FROM riwayat_kegiatan p WHERE p.thn='$thn_skrg' AND p.status='Ready' ORDER BY p.jatuh_tempo_reg ASC
");
while($r=pg_fetch_array($data)) {
?>
<tr>
<td class="kiri"><b><?php echo $r[0]; ?></b></td>
<td><b><?php echo $r[1]; ?></b></td>
<td><b><?php echo date('d-m-Y',strtotime($r['tanggal_mulai'])).' s/d '.date('d-m-Y',strtotime($r['tanggal_selesai'])); ?></b></td>
<td><b> <?php
if (date('H:i',strtotime($r['waktu_selesai']))=='00:00') {
echo date('H:i',strtotime($r['waktu_mulai'])).' s/d Selesai';
} else {
echo date('H:i',strtotime($r['waktu_mulai'])).' s/d '.date('H:i',strtotime($r['waktu_selesai']));
}
?></b></td>
<td><b><?php echo $r['tempat']; ?></b></td>
<td><b><?php echo $r[2]; ?></b></td>
<td><b><?php echo $r[3]; ?></b></td>
<td align="right"><b><?php echo $r['no_tu']; ?></b></td>
<td class="kanan">
<button type="button" name="daftar_hadir" style="height:22px;"class="btn btn-danger btn-xs daftar_hadir" id="<?php echo $r['id'];?>" data-content="Daftar Hadir" rel="popover" data-placement="top" data-trigger="hover"
><i style="margin-top:3px" class="fa fa-sign-in"></i>
</button>
<button type="button" name="jadwal" style="height:22px;"class="btn btn-inverse btn-xs jadwal" id="<?php echo $r['id'];?>" data-content="Susunan Acara" rel="popover" data-placement="top" data-trigger="hover"
><i style="margin-top:3px" class="fa fa-list-ul"></i>
</button>
<button type="button" name="test" style="height:22px;"class="btn btn-brown btn-xs test" id="<?php echo $r['id'];?>" data-content="Test" rel="popover" data-placement="top" data-trigger="hover"
><i style="margin-top:3px" class="fa fa-question-circle"></i>
</button>
<button type="button" name="dokumentasi" style="height:22px;"class="btn btn-purple btn-xs dokumentasi" id="<?php echo $r['id'];?>" data-content="Dokumentasi" rel="popover" data-placement="top" data-trigger="hover"
><i style="margin-top:3px" class="fa fa-file-image-o"></i>
</button>
<button type="button" name="sertifikat" style="height:22px;"class="btn btn-primary btn-xs sertifikat" id="<?php echo $r['id'];?>" data-content="Sertifikat" rel="popover" data-placement="top" data-trigger="hover"
><i style="margin-top:3px" class="fa fa-certificate"></i>
</button>
<button type="button" name="selesai" style="height:22px;"class="btn btn-success btn-xs selesai" id="<?php echo $r['id'];?>" data-content="Selesai" rel="popover" data-placement="top" data-trigger="hover"
><i style="margin-top:3px" class="fa fa-check"></i>
</button>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
<div id="modal_pdetail" 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">Detail Kegiatan</h4>
</div>
<div class="modal-body" id="modal_body_pdetail"></div>
<div class="modal-footer no-border">
<button type="button" class="btn btn-default waves-effect" data-dismiss="modal" id="keluar_pdetail">Keluar</button>
<button type="button" class="btn btn-primary waves-effect waves-light" id="simpan_pdetail">Simpan</button>
</div>
</div>
</div>
</div>
<div id="modal_sertifikat" 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">Nomor dari TU</h4>
</div>
<div class="modal-body" id="modal_body_sertifikat"></div>
<div class="modal-footer no-border">
<button type="button" class="btn btn-default waves-effect" data-dismiss="modal" id="keluar_sertifikat">Keluar</button>
<button type="button" class="btn btn-primary waves-effect waves-light" id="simpan_sertifikat">Simpan</button>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$('button[name="daftar_hadir"]').popover();
$('button[name="jadwal"]').popover();
$('button[name="test"]').popover();
$('button[name="selesai"]').popover();
$('button[name="dokumentasi"]').popover();
$('button[name="sertifikat"]').popover();
$("#tabel_data_persiapan").on('click','.selesai',function(){
var id = $(this).attr('id');
var key="simpan_selesai";
$.ajax({
type: "POST",
url: "app/kehadiran/crud.php",
data: 'id='+id
+'&key='+key,
success: function(data){
alert('Selesai..');
$('#pel_evaluasipp').trigger('click');
}
});
});
$("#tabel_data_persiapan").on('click','.daftar_hadir',function(){
var id = $(this).attr('id');
$.post('app/kehadiran/hadir/main.php',{riwayat_kegiatan_id : id},function(html){$("#main_tag").html(html);$('#peserta_ready').hide();$('#peserta_batal').hide();$('#back_2').hide();$('#back_1').show();});
});
$("#tabel_data_persiapan").on('click','.jadwal',function(){
var id = $(this).attr('id');
$.post('app/kehadiran/jadwal/main.php',{riwayat_kegiatan_id : id},function(html){$("#main_tag").html(html);$('#peserta_ready').hide();$('#peserta_batal').hide();$('#back_2').hide();$('#back_1').show();});
});
$("#tabel_data_persiapan").on('click','.dokumentasi',function(){
var id = $(this).attr('id');
$.post('app/kehadiran/dokumentasi/main.php',{riwayat_kegiatan_id : id},function(html){$("#main_tag").html(html);$('#peserta_ready').hide();$('#peserta_batal').hide();$('#back_2').hide();$('#back_1').show();});
});
$("#tabel_data_persiapan").on('click','.sertifikat',function(){
var id = $(this).attr('id');
$('#modal_sertifikat').modal('show');
$('#modal_body_sertifikat').html("");
$.ajax({
type: "POST",
url: "app/kehadiran/sertifikat/modal.php",
data: 'id='+id,
success: function(data){
$('#modal_body_sertifikat').html(data);
$('#no_tu').first().focus().selected();
}
});
});
$('#simpan_pdetail').click(function(){
var id = $('#riwayat_kegiatan_id').val();
var bln = $('#bln').val();
var kode_pelatihan = $('#kode_pelatihan').val();
var tanggal_sk = $('#tanggal_sk').val();
var tempat=$('#tempat').val();
var tanggal_mulai=$('#tanggal_mulai').val();
var tanggal_selesai=$('#tanggal_selesai').val();
var lama=$('#lama').val();
var jenis_biaya=$('#jenis_biaya').val();
var status=$('#status').val();
var key="simpan_pdetail";
$.ajax({
type: "POST",
url: "app/kehadiran/detail/crud.php",
data: 'id='+id
+'&bln='+bln
+'&kode_pelatihan='+kode_pelatihan
+'&tanggal_sk='+tanggal_sk
+'&tempat='+tempat
+'&tanggal_mulai='+tanggal_mulai
+'&tanggal_selesai='+tanggal_selesai
+'&lama='+lama
+'&jenis_biaya='+jenis_biaya
+'&status='+status
+'&key='+key,
success: function(data){
alert('Data tersimpan..');
$('#modal_pdetail').modal('hide');
$('body').removeClass('modal-open');
$('.modal-backdrop').remove();
if (status=='Ready') {
$('#pel_kehadiran').trigger('click');
} else
if (status=='Selesai') {
$('#pel_evaluasipp').trigger('click');
}
}
});
});
$('#simpan_sertifikat').click(function(){
var riwayat_kegiatan_id = $('#riwayat_kegiatan_id').val();
var no_tu = $('#no_tu').val();
var key="simpan_sertifikat";
$.ajax({
type: "POST",
url: "app/kehadiran/sertifikat/crud.php",
data: 'riwayat_kegiatan_id='+riwayat_kegiatan_id
+'&no_tu='+no_tu
+'&key='+key,
success: function(data){
$('#modal_sertifikat').modal('hide');
$('body').removeClass('modal-open');
$('.modal-backdrop').remove();
alert('Data tersimpan..');
$('#tabel_kehadiran').load("app/kehadiran/tabel.php");
}
});
});
$("#modal_pdetail").on("hidden.bs.modal", function () {
$(this).off('hidden.bs.modal');
});
$("#modal_sertifikat").on("hidden.bs.modal", function () {
$(this).off('hidden.bs.modal');
});
</script>