first commit - report data
This commit is contained in:
@@ -0,0 +1,301 @@
|
||||
<section class="content-header">
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1>
|
||||
|
||||
</h1>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="<?php echo base_url();?>">Dashboard</a></li>
|
||||
<li class="breadcrumb-item"><?php echo $parent;?></li>
|
||||
<li class="breadcrumb-item"><a href="<?php echo base_url()."index.php/".$link;?>"><?php echo $titlebefore;?></a></li>
|
||||
<li class="breadcrumb-item active"><?php echo $title;?></li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card card-default">
|
||||
<?php
|
||||
$setdisabled = "";
|
||||
$setid = "";
|
||||
$setnama = "";
|
||||
$setkode = "";
|
||||
$setketerangan = "";
|
||||
$setquotabangku = "";
|
||||
|
||||
$setstatus = 1;
|
||||
if ($actionform=="prosesview"){
|
||||
$setdisabled="disabled='disabled'";
|
||||
}
|
||||
if ($actionform!="prosesadd"){
|
||||
$setid = $kl->row('mk_id');
|
||||
$setnama = $kl->row('mk_nama');
|
||||
$setkode = $kl->row('mk_kode');
|
||||
$setketerangan = $kl->row('mk_ket');
|
||||
$setquotabangku = $kl->row('mk_quota_bangku');
|
||||
$setstatus = $kl->row('mk_status');
|
||||
}
|
||||
?>
|
||||
<form action="<?php echo(base_url()); ?>index.php/<?php echo $link;?>/<?php echo $actionform; ?>" method="post" autocomplete="off">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?php echo $title;?></h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<?php if(validation_errors()){ ?>
|
||||
<div id="alert" class="alert alert-danger alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<i class="icon fa fa-ban"></i> Alert!
|
||||
<?php echo validation_errors() ?>
|
||||
</div>
|
||||
<script>
|
||||
setTimeout(function() {
|
||||
$('#alert').hide('fast');
|
||||
}, 5000);
|
||||
</script>
|
||||
<?php } ?>
|
||||
<div class="form-group row">
|
||||
<label for="nama" class="col-sm-2 col-form-label">Nama</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="hidden" name="id" value="<?php echo $setid;?>"/>
|
||||
<input id="nama" name="nama" type="text" <?php echo $setdisabled;?> class="form-control" placeholder="Nama Klinik" value="<?php echo $setnama;?>" />
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<input id="kode" name="kode" type="text" <?php echo $setdisabled;?> class="form-control" placeholder="Kode" value="<?php echo $setkode;?>" maxlength="2" style="text-transform:uppercase" />
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<input id="quotabangku" name="quotabangku" type="number" <?php echo $setdisabled;?> class="form-control" placeholder="Quota Bangku" value="<?php echo $setquotabangku;?>" />
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<input id="keterangan" name="keterangan" type="text" <?php echo $setdisabled;?> class="form-control" placeholder="Keterangan" value="<?php echo $setketerangan;?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">Jadwal Klinik</label>
|
||||
<div class="col-sm-10">
|
||||
<table class="table table-sm table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 5%">#</th>
|
||||
<th style="width: 10%">Hari</th>
|
||||
<th style="width: 10%">Shift</th>
|
||||
<th style="width: 10%">Quota</th>
|
||||
<th style="width: 10%">Buka</th>
|
||||
<th style="width: 10%">Tutup</th>
|
||||
<th style="width: 5%">Pilih</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?php
|
||||
for($i=1;$i<=7;$i++){
|
||||
$hari = ""; $haritext = "";
|
||||
switch ($i) {
|
||||
case 1: $hari = "senin"; $haritext = "Senin"; break;
|
||||
case 2: $hari = "selasa"; $haritext = "Selasa"; break;
|
||||
case 3: $hari = "rabu"; $haritext = "Rabu"; break;
|
||||
case 4: $hari = "kamis"; $haritext = "Kamis"; break;
|
||||
case 5: $hari = "jumat"; $haritext = "Jum'at"; break;
|
||||
case 6: $hari = "sabtu"; $haritext = "Sabtu"; break;
|
||||
case 7: $hari = "minggu"; $haritext = "Minggu"; break;
|
||||
}
|
||||
|
||||
$setidjadwal = "";
|
||||
$setshiftjadwal = "";
|
||||
$setquotajadwal = "";
|
||||
$setbukajadwal = "";
|
||||
$settutupjadwal = "";
|
||||
$setcheckedjadwal = "";
|
||||
$setdisabledjadawal = "disabled='disabled'";
|
||||
if ($actionform!="prosesadd"){
|
||||
foreach($jd as $datjadwal){
|
||||
if($datjadwal->mkj_kode_jadwal==$i){
|
||||
$setidjadwal = $datjadwal->mkj_id;
|
||||
$setshiftjadwal = $datjadwal->mkj_jumlah_shift;
|
||||
$setquotajadwal = $datjadwal->mkj_total_quota;
|
||||
$setbukajadwal = $datjadwal->mkj_jam_buka;
|
||||
$settutupjadwal = $datjadwal->mkj_jam_tutup;
|
||||
$setcheckedjadwal = "checked";
|
||||
$setdisabledjadawal = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td class="bg-info"><?php echo $i;?></td>
|
||||
<td class="bg-info"><?php echo $haritext;?></td>
|
||||
<td>
|
||||
<input <?php echo $setdisabledjadawal;?> onkeyup="addcolomjadwal(<?php echo $i;?>)" id="shift<?php echo $i;?>" name="shift<?php echo $hari;?>" type="number" <?php echo $setdisabled;?> class="form-control form-control-sm" value="<?php echo $setshiftjadwal;?>" />
|
||||
<input hidden id='idjadwal<?php echo $i;?>' name="idjadwal<?php echo $hari;?>" type="text" value="<?php echo $setidjadwal;?>" />
|
||||
</td>
|
||||
<td>
|
||||
<input <?php echo $setdisabledjadawal;?> onkeyup="bagiquota(<?php echo $i;?>)" id="quota<?php echo $i;?>" name="quota<?php echo $hari;?>" type="number" <?php echo $setdisabled;?> class="form-control form-control-sm" value="<?php echo $setquotajadwal;?>" />
|
||||
</td>
|
||||
<td>
|
||||
<input <?php echo $setdisabledjadawal;?> onkeyup="bagijam(<?php echo $i;?>)" id="jambuka<?php echo $i;?>" name="jambuka<?php echo $hari;?>" type="text" <?php echo $setdisabled;?> class="form-control form-control-sm" data-inputmask="'mask': ['99:99', '99:99']" data-mask value="<?php echo $setbukajadwal;?>" />
|
||||
</td>
|
||||
<td>
|
||||
<input <?php echo $setdisabledjadawal;?> onkeyup="bagijam(<?php echo $i;?>)" id="jamtutup<?php echo $i;?>" name="jamtutup<?php echo $hari;?>" type="text" <?php echo $setdisabled;?> class="form-control form-control-sm" data-inputmask="'mask': ['99:99', '99:99']" data-mask value="<?php echo $settutupjadwal;?>" />
|
||||
</td>
|
||||
<td style="text-align: center;">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input <?php echo $setcheckedjadwal;?> onchange="enablecolom(<?php echo $i;?>)" <?php echo $setdisabled; ?> id="jadwal<?php echo $i;?>" name="jadwalklinik[]" class="custom-control-input custom-control-input-danger custom-control-input-outline" type="checkbox" id="customCheckbox5" value="<?php echo $i;?>" />
|
||||
<label for="jadwal<?php echo $i;?>" class="custom-control-label"></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7" id="app<?php echo $i;?>">
|
||||
<?php
|
||||
if ($actionform!="prosesadd"){
|
||||
$numshift=0;
|
||||
echo "<table>";
|
||||
foreach($sh as $datshift){
|
||||
if($datshift->mks_klinik_jadwal_id==$setidjadwal){
|
||||
$numshift++;
|
||||
$sjbuka = $datshift->mks_jam_buka;
|
||||
$splitsjb = explode(":",$sjbuka);
|
||||
?>
|
||||
<tr class="shiftremove<?php echo $i;?>">
|
||||
<td style="width: 10%">Mulai Shift <?php echo $numshift;?></td>
|
||||
<td style="width: 10%"><input id="jambukashift<?php echo $i.$numshift;?>" name="jambuka<?php echo $i;?>[]" type="text" class="form-control form-control-sm" placeholder="00 (Jam)" maxlength="2" value="<?php echo $splitsjb[0];?>"/></td>
|
||||
<td style="width: 2%;text-align: center;">:</td>
|
||||
<td style="width: 10%"><input id="menitbukashift<?php echo $i.$numshift;?>" name="menitbuka<?php echo $i;?>[]" type="text" class="form-control form-control-sm" placeholder="00 (Menit)" maxlength="2" value="<?php echo $splitsjb[1];?>"/></td>
|
||||
<td style="width: 5%">Quota Shift </td>
|
||||
<td style="width: 10%">
|
||||
<input onkeyup="tambahquota(<?php echo $i;?>)" id="quotashift<?php echo $i.$numshift;?>" name="quotashift<?php echo $i;?>[]" type="number" class="form-control form-control-sm" value="<?php echo $datshift->mks_quota;?>"/>
|
||||
<input hidden name="idshift<?php echo $i;?>[]" type="text" value="<?php echo $datshift->mks_id;?>"/>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
echo "</table>";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<script>
|
||||
function enablecolom(num){
|
||||
if( $('#jadwal'+num).is(':checked') ){
|
||||
$('.shiftremove'+num).remove();
|
||||
document.getElementById("shift"+num).disabled = false;
|
||||
document.getElementById("quota"+num).disabled = false;
|
||||
document.getElementById("jambuka"+num).disabled = false;
|
||||
document.getElementById("jamtutup"+num).disabled = false;
|
||||
}
|
||||
else{
|
||||
$("#shift"+num).val("");
|
||||
$("#quota"+num).val("");
|
||||
$("#jambuka"+num).val("");
|
||||
$("#jamtutup"+num).val("");
|
||||
document.getElementById("shift"+num).disabled = true;
|
||||
document.getElementById("quota"+num).disabled = true;
|
||||
document.getElementById("jambuka"+num).disabled = true;
|
||||
document.getElementById("jamtutup"+num).disabled = true;
|
||||
var idjadwal = $("#idjadwal"+num).val();
|
||||
$('.shiftremove'+num).remove();
|
||||
$("#app"+num).append("<div class='shiftremove"+num+"'><input hidden name='iddeljadwal"+num+"' type='text' value='"+idjadwal+"' /></div>");
|
||||
}
|
||||
}
|
||||
|
||||
function addcolomjadwal(num){
|
||||
$('.shiftremove'+num).remove();
|
||||
var jumapp = $("#shift"+num).val();
|
||||
for(let i=1;i<=jumapp;i++){
|
||||
$("#app"+num).append(" <tr class='shiftremove"+num+"'>"+
|
||||
"<td style='width: 10%'>Mulai Shift "+i+"</td>"+
|
||||
"<td style='width: 10%'><input id='jambukashift"+num+i+"' name='jambuka"+num+"[]' type='text' class='form-control form-control-sm' placeholder='00 (Jam)' maxlength='2' /></td>"+
|
||||
"<td style='width: 2%;text-align: center;'>:</td>"+
|
||||
"<td style='width: 10%'><input id='menitbukashift"+num+i+"' name='menitbuka"+num+"[]' type='text' class='form-control form-control-sm' placeholder='00 (Menit)' maxlength='2' /></td>"+
|
||||
"<td style='width: 5%'>Quota Shift </td>"+
|
||||
"<td style='width: 10%'><input onkeyup='tambahquota("+num+")' id='quotashift"+num+i+"' name='quotashift"+num+"[]' type='number' class='form-control form-control-sm' /></td>"+
|
||||
"</tr>");
|
||||
}
|
||||
this.bagiquota(num);
|
||||
this.bagijam(num);
|
||||
}
|
||||
|
||||
function bagiquota(num){
|
||||
var shift = parseInt($("#shift"+num).val());
|
||||
var quota = parseInt($("#quota"+num).val());
|
||||
var hasil = quota / shift;
|
||||
for(let i=1;i<=shift;i++){
|
||||
$("#quotashift"+num+i).val(Math.floor(hasil));
|
||||
}
|
||||
}
|
||||
|
||||
function tambahquota(num){
|
||||
var shift = parseInt($("#shift"+num).val());
|
||||
var hasil = 0;
|
||||
for(let i=1;i<=shift;i++){
|
||||
hasil = parseInt(hasil) + parseInt($("#quotashift"+num+i).val());
|
||||
}
|
||||
$("#quota"+num).val(hasil);
|
||||
}
|
||||
|
||||
function bagijam(num){
|
||||
var shift = parseInt($("#shift"+num).val());
|
||||
var jambuka = new Date("2023-01-01 "+$("#jambuka"+num).val());
|
||||
var jamtutup= new Date("2023-01-01 "+$("#jamtutup"+num).val());
|
||||
var diff = Math.abs(jamtutup - jambuka);
|
||||
var minutes = Math.floor((diff/1000)/60);
|
||||
var selshift= parseInt(minutes)/parseInt(shift);
|
||||
|
||||
for(let i=1;i<=shift;i++){
|
||||
if(parseInt(i)==1){
|
||||
var h = jambuka.getHours("H");
|
||||
var m = jambuka.getMinutes("M");
|
||||
if(h<10){$("#jambukashift"+num+i).val("0"+h);
|
||||
}else{$("#jambukashift"+num+i).val(h);}
|
||||
if(m<10){$("#menitbukashift"+num+i).val("0"+m);
|
||||
}else{$("#menitbukashift"+num+i).val(m);}
|
||||
}else{
|
||||
jambuka.setMinutes(jambuka.getMinutes() + selshift);
|
||||
var h = jambuka.getHours("H");
|
||||
var m = jambuka.getMinutes("M");
|
||||
if(h<10){$("#jambukashift"+num+i).val("0"+h);
|
||||
}else{$("#jambukashift"+num+i).val(h);}
|
||||
if(m<10){$("#menitbukashift"+num+i).val("0"+m);
|
||||
}else{$("#menitbukashift"+num+i).val(m);}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"></label>
|
||||
<div class="col-sm-2">
|
||||
<input id="status" name="status" type="checkbox" value="1" <?php echo $setdisabled;?> <?php if($setstatus==1){echo "checked";}?> data-bootstrap-switch data-off-color="danger" data-on-color="success"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<?php if ($actionform!="prosesview"){ ?>
|
||||
<button type="submit" class="btn btn-info">Simpan</button>
|
||||
<?php } ?>
|
||||
<a href="<?php echo base_url()."index.php/".$link;?>" class="btn btn-default float-right">Cancel</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,152 @@
|
||||
<section class="content-header">
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1>
|
||||
<?php
|
||||
//---------------------start check access action TAMBAH-------------------//
|
||||
if(!empty($this->vartambah)){
|
||||
echo "<a href='".base_url()."index.php/$link/add' class='btn btn-outline-info btn-sm'>Tambah Baru</a>";
|
||||
}
|
||||
//---------------------end check access action TAMBAH-------------------//
|
||||
?>
|
||||
</h1>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="<?php echo base_url();?>">Dashboard</a></li>
|
||||
<li class="breadcrumb-item"><?php echo $parent;?></li>
|
||||
<li class="breadcrumb-item active"><?php echo $title;?></li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card card-default">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?php echo $title;?></h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<?php if($this->session->flashdata('message')){?>
|
||||
<div id="alert" class="alert alert-success alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<i class="icon fa fa-check"></i> Alert!
|
||||
<?php echo $this->session->flashdata('message');?>
|
||||
</div>
|
||||
<?php }?>
|
||||
<script>
|
||||
setTimeout(function() {
|
||||
$('#alert').hide('fast');
|
||||
}, 3000);
|
||||
</script>
|
||||
<table id="example1" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>Nama</th>
|
||||
<th>Kode</th>
|
||||
<th>Keterangan</th>
|
||||
<th>Quota Bangku</th>
|
||||
<th>Jadwal</th>
|
||||
<th>Status</th>
|
||||
<th width="15%">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$no=0;
|
||||
foreach ($kl as $dat) {
|
||||
$no++;
|
||||
//---------------------start check access action-------------------//
|
||||
$editbutton = "";
|
||||
$viewbutton = "";
|
||||
$deletebutton = "";
|
||||
$disabledbutton = "";
|
||||
$aktifbutton = "";
|
||||
|
||||
if(!empty($this->varview)){
|
||||
$viewbutton="<a href='".base_url()."index.php/$link/view/".$dat->mk_id."' class='btn btn-info btn-xs'><i class='fa fa-eye'></i></a> ";
|
||||
}
|
||||
if(!empty($this->varedit)){
|
||||
$editbutton="<a href='".base_url()."index.php/$link/edit/".$dat->mk_id."' class='btn btn-warning btn-xs'><i class='fa fa-edit'></i></a> ";
|
||||
}
|
||||
if(!empty($this->vardelete)){
|
||||
$deletebutton="<a onclick='del(".$dat->mk_id.")' class='btn btn-danger btn-xs'><i class='fa fa-times'></i></a> ";
|
||||
}
|
||||
|
||||
$setstatus = "<span class='badge bg-teal'> Active</span>";
|
||||
if($dat->mk_status==0){
|
||||
$setstatus = "<span class='badge bg-red'> Disabled</span>";
|
||||
if(!empty($this->varedit)){
|
||||
$aktifbutton="<a onclick='aktif(".$dat->mk_id.")' class='btn btn-outline-success btn-xs'><i class='fa fa-check'></i></a> ";
|
||||
}
|
||||
}else{
|
||||
if(!empty($this->varedit)){
|
||||
$disabledbutton="<a onclick='disabled(".$dat->mk_id.")' class='btn btn-outline-danger btn-xs'><i class='fa fa-ban'></i></a> ";
|
||||
}
|
||||
}
|
||||
|
||||
$jadwal = "";
|
||||
foreach($jd as $datjadwal){
|
||||
if($datjadwal->mkj_klinik_id==$dat->mk_id){
|
||||
$jadwal = $jadwal." <span class='badge bg-info'>".$datjadwal->mkj_jadwal." (".$datjadwal->mkj_jumlah_shift." Shift / ".$datjadwal->mkj_total_quota.")</span>";
|
||||
}
|
||||
}
|
||||
|
||||
echo("
|
||||
<tr>
|
||||
<input type='hidden' id='isi".$dat->mk_id."' value='".$dat->mk_nama."'>
|
||||
<td>".$no."</td>
|
||||
<td>".$dat->mk_nama."</td>
|
||||
<td>".$dat->mk_kode."</td>
|
||||
<td>".$dat->mk_ket."</td>
|
||||
<td>".$dat->mk_quota_bangku."</td>
|
||||
<td>".$jadwal."</td>
|
||||
<td style='text-align: center;'>".$setstatus."</td>
|
||||
<td>".$viewbutton.$editbutton.$disabledbutton.$aktifbutton.$deletebutton."</td>
|
||||
</tr>
|
||||
");
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<script type="text/javascript">
|
||||
var url="<?php echo base_url();?>";
|
||||
function disabled(id){
|
||||
var isi=document.getElementById('isi'+id).value;
|
||||
var r=confirm("Apakah anda ingin Disbaled Klinik '"+isi+"'?")
|
||||
if (r==true)
|
||||
window.location = url+"index.php/ps_klinik/disabled/"+id;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
function aktif(id){
|
||||
var isi=document.getElementById('isi'+id).value;
|
||||
var r=confirm("Apakah anda ingin Aktifkan Klinik '"+isi+"'?")
|
||||
if (r==true)
|
||||
window.location = url+"index.php/ps_klinik/active/"+id;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
function del(id){
|
||||
var isi=document.getElementById('isi'+id).value;
|
||||
var r=confirm("Apakah anda ingin Menghapus Klinik '"+isi+"'?")
|
||||
if (r==true)
|
||||
window.location = url+"index.php/ps_klinik/delete/"+id;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,205 @@
|
||||
<section class="content-header">
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1>
|
||||
|
||||
</h1>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="<?php echo base_url();?>">Dashboard</a></li>
|
||||
<li class="breadcrumb-item"><?php echo $parent;?></li>
|
||||
<li class="breadcrumb-item"><a href="<?php echo base_url()."index.php/".$link;?>"><?php echo $titlebefore;?></a></li>
|
||||
<li class="breadcrumb-item active"><?php echo $title;?></li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card card-default">
|
||||
<?php
|
||||
$setdisabled = "";
|
||||
$setid = "";
|
||||
$setnama = "";
|
||||
$setkode = "";
|
||||
$setquota = "";
|
||||
$setpembayaran = "";
|
||||
$setonline = "";
|
||||
$setpelayanan = "";
|
||||
$setstatus = 1;
|
||||
if ($actionform=="prosesview"){
|
||||
$setdisabled="disabled='disabled'";
|
||||
}
|
||||
if ($actionform!="prosesadd"){
|
||||
$setid = $lkrj->row('mlrj_id');
|
||||
$setnama = $lkrj->row('mlrj_nama');
|
||||
$setkode = $lkrj->row('mlrj_kode');
|
||||
$setquota = $lkrj->row('mlrj_quotabangku');
|
||||
$setpembayaran = $lkrj->row('mlrj_pembayaran');
|
||||
$setonline = $lkrj->row('mlrj_online');
|
||||
$setpelayanan = $lkrj->row('mlrj_pelayanan');
|
||||
$setstatus = $lkrj->row('mlrj_status');
|
||||
}
|
||||
?>
|
||||
<form action="<?php echo(base_url()); ?>index.php/<?php echo $link;?>/<?php echo $actionform; ?>" method="post" autocomplete="off">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?php echo $title;?></h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<?php if(validation_errors()){ ?>
|
||||
<div id="alert" class="alert alert-danger alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<i class="icon fa fa-ban"></i> Alert!
|
||||
<?php echo validation_errors() ?>
|
||||
</div>
|
||||
<script>
|
||||
setTimeout(function() {
|
||||
$('#alert').hide('fast');
|
||||
}, 5000);
|
||||
</script>
|
||||
<?php } ?>
|
||||
<div class="form-group row">
|
||||
<label for="nama" class="col-sm-2 col-form-label">Nama</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="hidden" name="id" value="<?php echo $setid;?>"/>
|
||||
<input id="nama" name="nama" type="text" <?php echo $setdisabled;?> class="form-control" placeholder="Nama Loket" value="<?php echo $setnama;?>" />
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<input id="kode" name="kode" type="text" <?php echo $setdisabled;?> class="form-control" placeholder="Kode" value="<?php echo $setkode;?>" maxlength="2" style="text-transform:uppercase" />
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<input id="quota" name="quota" type="number" <?php echo $setdisabled;?> class="form-control" placeholder="Quota Bangku" value="<?php echo $setquota;?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="online" class="col-sm-2 col-form-label">Keterangan</label>
|
||||
<div class="col-sm-6">
|
||||
<select <?php echo $setdisabled; ?> id="online" name="online" class="form-control">
|
||||
<option value="">Pilih Keterangan</option>
|
||||
<option <?php if($setonline==1){echo "selected='selected'";} ?> value="1">Online</option>
|
||||
<option <?php if($setonline==2){echo "selected='selected'";} ?> value="2">Offline</option>
|
||||
<option <?php if($setonline==3){echo "selected='selected'";} ?> value="3">Semua</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="pembayaran" class="col-sm-2 col-form-label">Pembayaran</label>
|
||||
<div class="col-sm-6">
|
||||
<table class="table table-sm table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 10px">#</th>
|
||||
<th>Pembayaran</th>
|
||||
<th style="width: 40px">Pilih</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$no=0;
|
||||
foreach($pm as $dat){
|
||||
$no++;
|
||||
$checkedpem = "";
|
||||
$pecahpem = explode("|",$setpembayaran);
|
||||
$jumpem = (count($pecahpem));
|
||||
for($y=0;$y<=$jumpem;$y++){
|
||||
if(isset($pecahpem[$y])){
|
||||
if($pecahpem[$y]==$dat->mp_id){
|
||||
$checkedpem = "Checked";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $no."."; ?></td>
|
||||
<td><?php echo $dat->mp_nama; ?></td>
|
||||
<td>
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input <?php echo $setdisabled; echo $checkedpem;?> id="pembayaran<?php echo $no;?>" name="pembayaran[]" class="custom-control-input custom-control-input-danger custom-control-input-outline" type="checkbox" id="customCheckbox5" value="<?php echo $dat->mp_id;?>" />
|
||||
<label for="pembayaran<?php echo $no;?>" class="custom-control-label"></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="Pelayanan" class="col-sm-2 col-form-label">Pelayanan</label>
|
||||
<div class="col-sm-6">
|
||||
<table class="table table-sm table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 10px">#</th>
|
||||
<th style="width: 100px">Kode</th>
|
||||
<th>Klinik</th>
|
||||
<th style="width: 40px">Pilih</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$no=0;
|
||||
foreach($kl as $dat){
|
||||
$no++;
|
||||
$checkedpel = "";
|
||||
$pecahpel = explode("|",$setpelayanan);
|
||||
$jumpel = (count($pecahpel));
|
||||
for($y=0;$y<=$jumpel;$y++){
|
||||
if(isset($pecahpel[$y])){
|
||||
if($pecahpel[$y]==$dat->mk_id){
|
||||
$checkedpel = "Checked";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $no."."; ?></td>
|
||||
<td><?php echo $dat->mk_kode; ?></td>
|
||||
<td><?php echo $dat->mk_nama; ?></td>
|
||||
<td>
|
||||
<label>
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input <?php echo $setdisabled; echo $checkedpel; ?> id="pelayanan<?php echo $no;?>" name="pelayanan[]" class="custom-control-input custom-control-input-danger custom-control-input-outline" type="checkbox" id="customCheckbox5" value="<?php echo $dat->mk_id;?>" />
|
||||
<label for="pelayanan<?php echo $no;?>" class="custom-control-label"></label>
|
||||
</div>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"></label>
|
||||
<div class="col-sm-2">
|
||||
<input id="status" name="status" type="checkbox" value="1" <?php echo $setdisabled;?> <?php if($setstatus==1){echo "checked";}?> data-bootstrap-switch data-off-color="danger" data-on-color="success"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<?php if ($actionform!="prosesview"){ ?>
|
||||
<button type="submit" class="btn btn-info">Simpan</button>
|
||||
<?php } ?>
|
||||
<a href="<?php echo base_url()."index.php/".$link;?>" class="btn btn-default float-right">Cancel</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,188 @@
|
||||
<section class="content-header">
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1>
|
||||
<?php
|
||||
//---------------------start check access action TAMBAH-------------------//
|
||||
if(!empty($this->vartambah)){
|
||||
echo "<a href='".base_url()."index.php/$link/add' class='btn btn-outline-info btn-sm'>Tambah Baru</a>";
|
||||
}
|
||||
//---------------------end check access action TAMBAH-------------------//
|
||||
?>
|
||||
</h1>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="<?php echo base_url();?>">Dashboard</a></li>
|
||||
<li class="breadcrumb-item"><?php echo $parent;?></li>
|
||||
<li class="breadcrumb-item active"><?php echo $title;?></li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card card-default">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?php echo $title;?></h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<?php if($this->session->flashdata('message')){?>
|
||||
<div id="alert" class="alert alert-success alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<i class="icon fa fa-check"></i> Alert!
|
||||
<?php echo $this->session->flashdata('message');?>
|
||||
</div>
|
||||
<?php }?>
|
||||
<script>
|
||||
setTimeout(function() {
|
||||
$('#alert').hide('fast');
|
||||
}, 3000);
|
||||
</script>
|
||||
<table id="example1" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>Nama</th>
|
||||
<th>Kode</th>
|
||||
<th>Quota</th>
|
||||
<th>Pelayanan</th>
|
||||
<th>Pembayaran</th>
|
||||
<th>Online</th>
|
||||
<th>Status</th>
|
||||
<th width="15%">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$no=0;
|
||||
foreach ($lkrj as $dat) {
|
||||
$no++;
|
||||
//---------------------start check access action-------------------//
|
||||
$editbutton = "";
|
||||
$viewbutton = "";
|
||||
$deletebutton = "";
|
||||
$disabledbutton = "";
|
||||
$aktifbutton = "";
|
||||
|
||||
if(!empty($this->varview)){
|
||||
$viewbutton="<a href='".base_url()."index.php/$link/view/".$dat->mlrj_id."' class='btn btn-info btn-xs'><i class='fa fa-eye'></i></a> ";
|
||||
}
|
||||
if(!empty($this->varedit)){
|
||||
$editbutton="<a href='".base_url()."index.php/$link/edit/".$dat->mlrj_id."' class='btn btn-warning btn-xs'><i class='fa fa-edit'></i></a> ";
|
||||
}
|
||||
if(!empty($this->vardelete)){
|
||||
$deletebutton="<a onclick='del(".$dat->mlrj_id.")' class='btn btn-danger btn-xs'><i class='fa fa-times'></i></a> ";
|
||||
}
|
||||
|
||||
$setstatus = "<span class='badge bg-teal'> Active</span>";
|
||||
if($dat->mlrj_status==0){
|
||||
$setstatus = "<span class='badge bg-red'> Disabled</span>";
|
||||
if(!empty($this->varedit)){
|
||||
$aktifbutton="<a onclick='aktif(".$dat->mlrj_id.")' class='btn btn-outline-success btn-xs'><i class='fa fa-check'></i></a> ";
|
||||
}
|
||||
}else{
|
||||
if(!empty($this->varedit)){
|
||||
$disabledbutton="<a onclick='disabled(".$dat->mlrj_id.")' class='btn btn-outline-danger btn-xs'><i class='fa fa-ban'></i></a> ";
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------end check access action-------------------//
|
||||
//----------start pelayanan-------------//
|
||||
$pecahpel = explode("|",$dat->mlrj_pelayanan);
|
||||
$jumpel = (count($pecahpel));
|
||||
$infoklinik = "";
|
||||
for($x=0;$x<=$jumpel;$x++){
|
||||
if(isset($pecahpel[$x])){
|
||||
foreach ($kl as $datkli){
|
||||
if($pecahpel[$x]==$datkli->mk_id){
|
||||
$infoklinik=$infoklinik."<small class='badge badge-success'>".$datkli->mk_nama."</small> ";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//------------end pelayanan-------------//
|
||||
|
||||
//----------start pembayaran------------//
|
||||
$pecahpem = explode("|",$dat->mlrj_pembayaran);
|
||||
$jumpem = (count($pecahpem));
|
||||
$infopem = "";
|
||||
for($y=0;$y<=$jumpem;$y++){
|
||||
if(isset($pecahpem[$y])){
|
||||
foreach ($pm as $datpem){
|
||||
if($pecahpem[$y]==$datpem->mp_id){
|
||||
$infopem=$infopem."<small class='badge badge-warning'>".$datpem->mp_nama."</small> ";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//------------end pembayaran------------//
|
||||
//------------start online--------------//
|
||||
if($dat->mlrj_online==1){
|
||||
$infoonl="<small class='badge badge-primary'>Online</small> ";
|
||||
}elseif($dat->mlrj_online==2){
|
||||
$infoonl="<small class='badge badge-secondary'>Offline</small> ";
|
||||
}elseif($dat->mlrj_online==3){
|
||||
$infoonl="<small class='badge badge-info'>Semua</small> ";
|
||||
}
|
||||
|
||||
//--------------end online--------------//
|
||||
|
||||
echo("
|
||||
<tr>
|
||||
<input type='hidden' id='isi".$dat->mlrj_id."' value='".$dat->mlrj_nama."'>
|
||||
<td>".$no."</td>
|
||||
<td>".$dat->mlrj_nama."</td>
|
||||
<td>".$dat->mlrj_kode."</td>
|
||||
<td>".$dat->mlrj_quotabangku."</td>
|
||||
<td>".$infoklinik."</td>
|
||||
<td>".$infopem."</td>
|
||||
<td>".$infoonl."</td>
|
||||
<td style='text-align: center;'>".$setstatus."</td>
|
||||
<td>".$viewbutton.$editbutton.$disabledbutton.$aktifbutton.$deletebutton."</td>
|
||||
</tr>
|
||||
");
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<script type="text/javascript">
|
||||
var url="<?php echo base_url();?>";
|
||||
function disabled(id){
|
||||
var isi=document.getElementById('isi'+id).value;
|
||||
var r=confirm("Apakah anda ingin Disbaled Loket Rajal '"+isi+"'?")
|
||||
if (r==true)
|
||||
window.location = url+"index.php/ps_loket_rajal/disabled/"+id;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
function aktif(id){
|
||||
var isi=document.getElementById('isi'+id).value;
|
||||
var r=confirm("Apakah anda ingin Aktifkan Loket Rajal '"+isi+"'?")
|
||||
if (r==true)
|
||||
window.location = url+"index.php/ps_loket_rajal/active/"+id;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
function del(id){
|
||||
var isi=document.getElementById('isi'+id).value;
|
||||
var r=confirm("Apakah anda ingin Menghapus Loket Rajal '"+isi+"'?")
|
||||
if (r==true)
|
||||
window.location = url+"index.php/ps_loket_rajal/delete/"+id;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,82 @@
|
||||
<section class="content-header">
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1>
|
||||
|
||||
</h1>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="<?php echo base_url();?>">Dashboard</a></li>
|
||||
<li class="breadcrumb-item"><?php echo $parent;?></li>
|
||||
<li class="breadcrumb-item"><a href="<?php echo base_url()."index.php/".$link;?>"><?php echo $titlebefore;?></a></li>
|
||||
<li class="breadcrumb-item active"><?php echo $title;?></li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card card-default">
|
||||
<?php
|
||||
$setdisabled = "";
|
||||
$setid = "";
|
||||
$setnama = "";
|
||||
$setstatus = 1;
|
||||
if ($actionform=="prosesview"){
|
||||
$setdisabled="disabled='disabled'";
|
||||
}
|
||||
if ($actionform!="prosesadd"){
|
||||
$setid = $pm->row('mp_id');
|
||||
$setnama = $pm->row('mp_nama');
|
||||
$setstatus = $pm->row('mp_status');
|
||||
}
|
||||
?>
|
||||
<form action="<?php echo(base_url()); ?>index.php/<?php echo $link;?>/<?php echo $actionform; ?>" method="post" autocomplete="off">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?php echo $title;?></h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<?php if(validation_errors()){ ?>
|
||||
<div id="alert" class="alert alert-danger alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<i class="icon fa fa-ban"></i> Alert!
|
||||
<?php echo validation_errors() ?>
|
||||
</div>
|
||||
<script>
|
||||
setTimeout(function() {
|
||||
$('#alert').hide('fast');
|
||||
}, 5000);
|
||||
</script>
|
||||
<?php } ?>
|
||||
<div class="form-group row">
|
||||
<label for="nama" class="col-sm-2 col-form-label">Nama</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="hidden" name="id" value="<?php echo $setid;?>"/>
|
||||
<input id="nama" name="nama" type="text" <?php echo $setdisabled;?> class="form-control" placeholder="Nama Pembayaran" value="<?php echo $setnama;?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"></label>
|
||||
<div class="col-sm-2">
|
||||
<input id="status" name="status" type="checkbox" value="1" <?php echo $setdisabled;?> <?php if($setstatus==1){echo "checked";}?> data-bootstrap-switch data-off-color="danger" data-on-color="success"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<?php if ($actionform!="prosesview"){ ?>
|
||||
<button type="submit" class="btn btn-info">Simpan</button>
|
||||
<?php } ?>
|
||||
<a href="<?php echo base_url()."index.php/".$link;?>" class="btn btn-default float-right">Cancel</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,138 @@
|
||||
<section class="content-header">
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1>
|
||||
<?php
|
||||
//---------------------start check access action TAMBAH-------------------//
|
||||
if(!empty($this->vartambah)){
|
||||
echo "<a href='".base_url()."index.php/$link/add' class='btn btn-outline-info btn-sm'>Tambah Baru</a>";
|
||||
}
|
||||
//---------------------end check access action TAMBAH-------------------//
|
||||
?>
|
||||
</h1>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="<?php echo base_url();?>">Dashboard</a></li>
|
||||
<li class="breadcrumb-item"><?php echo $parent;?></li>
|
||||
<li class="breadcrumb-item active"><?php echo $title;?></li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card card-default">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?php echo $title;?></h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<?php if($this->session->flashdata('message')){?>
|
||||
<div id="alert" class="alert alert-success alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<i class="icon fa fa-check"></i> Alert!
|
||||
<?php echo $this->session->flashdata('message');?>
|
||||
</div>
|
||||
<?php }?>
|
||||
<script>
|
||||
setTimeout(function() {
|
||||
$('#alert').hide('fast');
|
||||
}, 3000);
|
||||
</script>
|
||||
<table id="example1" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>Nama</th>
|
||||
<th>Status</th>
|
||||
<th width="15%">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$no=0;
|
||||
foreach ($pm as $dat) {
|
||||
$no++;
|
||||
//---------------------start check access action-------------------//
|
||||
$editbutton = "";
|
||||
$viewbutton = "";
|
||||
$deletebutton = "";
|
||||
$disabledbutton = "";
|
||||
$aktifbutton = "";
|
||||
|
||||
if(!empty($this->varview)){
|
||||
$viewbutton="<a href='".base_url()."index.php/$link/view/".$dat->mp_id."' class='btn btn-info btn-xs'><i class='fa fa-eye'></i></a> ";
|
||||
}
|
||||
if(!empty($this->varedit)){
|
||||
$editbutton="<a href='".base_url()."index.php/$link/edit/".$dat->mp_id."' class='btn btn-warning btn-xs'><i class='fa fa-edit'></i></a> ";
|
||||
}
|
||||
if(!empty($this->vardelete)){
|
||||
$deletebutton="<a onclick='del(".$dat->mp_id.")' class='btn btn-danger btn-xs'><i class='fa fa-times'></i></a> ";
|
||||
}
|
||||
|
||||
$setstatus = "<span class='badge bg-teal'> Active</span>";
|
||||
if($dat->mp_status==0){
|
||||
$setstatus = "<span class='badge bg-red'> Disabled</span>";
|
||||
if(!empty($this->varedit)){
|
||||
$aktifbutton="<a onclick='aktif(".$dat->mp_id.")' class='btn btn-outline-success btn-xs'><i class='fa fa-check'></i></a> ";
|
||||
}
|
||||
}else{
|
||||
if(!empty($this->varedit)){
|
||||
$disabledbutton="<a onclick='disabled(".$dat->mp_id.")' class='btn btn-outline-danger btn-xs'><i class='fa fa-ban'></i></a> ";
|
||||
}
|
||||
}
|
||||
//---------------------end check access action-------------------//
|
||||
|
||||
echo("
|
||||
<tr>
|
||||
<input type='hidden' id='isi".$dat->mp_id."' value='".$dat->mp_nama."'>
|
||||
<td>".$no."</td>
|
||||
<td>".$dat->mp_nama."</td>
|
||||
<td style='text-align: center;'>".$setstatus."</td>
|
||||
<td>".$viewbutton.$editbutton.$disabledbutton.$aktifbutton.$deletebutton."</td>
|
||||
</tr>
|
||||
");
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<script type="text/javascript">
|
||||
var url="<?php echo base_url();?>";
|
||||
function disabled(id){
|
||||
var isi=document.getElementById('isi'+id).value;
|
||||
var r=confirm("Apakah anda ingin Disbaled Pembayaran '"+isi+"'?")
|
||||
if (r==true)
|
||||
window.location = url+"index.php/ps_pembayaran/disabled/"+id;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
function aktif(id){
|
||||
var isi=document.getElementById('isi'+id).value;
|
||||
var r=confirm("Apakah anda ingin Aktifkan Pembayaran '"+isi+"'?")
|
||||
if (r==true)
|
||||
window.location = url+"index.php/ps_pembayaran/active/"+id;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
function del(id){
|
||||
var isi=document.getElementById('isi'+id).value;
|
||||
var r=confirm("Apakah anda ingin Menghapus Pembayaran '"+isi+"'?")
|
||||
if (r==true)
|
||||
window.location = url+"index.php/ps_pembayaran/delete/"+id;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user