first commit
This commit is contained in:
No files matched your search
@@ -0,0 +1,136 @@
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<small></small>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="<?php echo base_url()?>index.php/home"><i class="fa fa-dashboard"></i> Dashboard</a></li>
|
||||
<li>Setting</li>
|
||||
<li><a href="<?php echo base_url()?>index.php/hakakses">Hak Akses</a></li>
|
||||
<li class="active"><?php echo $title ?></li>
|
||||
</ol>
|
||||
</section>
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"><?php echo $title ?> | <?php echo $tu->row('mt_nama');?> </h3>
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<!-- form start -->
|
||||
<?php if(validation_errors()){ ?>
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4><i class="icon fa fa-ban"></i> Alert!</h4>
|
||||
<?php echo validation_errors() ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<form class="form-horizontal" id="form" action="<?php echo(base_url()); ?>index.php/ps_hakakses/prosesedithakakses" method="post">
|
||||
<?php //echo form_open_multipart('index.php/user/prosesedit');?>
|
||||
<div class="box-body form-horizontal">
|
||||
<div class="box-body">
|
||||
<div class="box">
|
||||
<div class="box-body no-padding">
|
||||
<input type="hidden" name="id" value="<?php echo $tu->row('mt_id');?>"/>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th width="5%">No</th>
|
||||
<th width="55%">Menu</th>
|
||||
<th width="10%">Akses</th>
|
||||
<th width="10%">View</th>
|
||||
<th width="10%">Tambah</th>
|
||||
<th width="10%">Edit</th>
|
||||
<th width="10%">Delete</th>
|
||||
</tr>
|
||||
<?php
|
||||
$no=0;
|
||||
//$id_input="";
|
||||
foreach ($mn as $menu) {
|
||||
$parentmenu="";
|
||||
//----cek parent menu----------------------------//
|
||||
$this->db->where('mm_id', $menu->mm_parent);
|
||||
$cekParent = $this->db->get('master_menu');
|
||||
foreach ($cekParent->result() as $par)
|
||||
{
|
||||
$parentmenu="<code>".$par->mm_nama." /</code> ";
|
||||
}
|
||||
//----cek parent menu----------------------------//
|
||||
|
||||
$no++;
|
||||
echo("
|
||||
<tr>
|
||||
<td>".$no."</td>
|
||||
<td><input type='hidden' name='id_menu' value='".$menu->mm_id."'>".$parentmenu.$menu->mm_nama."</td>
|
||||
");
|
||||
$cekakses="";
|
||||
$cekview="";
|
||||
$cektambah="";
|
||||
$cekedit="";
|
||||
$cekdelete="";
|
||||
$idusermenu="";
|
||||
$setdisabled="";
|
||||
foreach($um as $usermenu){
|
||||
if($usermenu->mum_menu_id==$menu->mm_id){
|
||||
$cekakses="checked";
|
||||
|
||||
$this->db->where('mum_id', $usermenu->mum_id);
|
||||
$query1 = $this->db->get('master_user_menu');
|
||||
foreach ($query1->result() as $row1)
|
||||
{
|
||||
if($row1->mum_lihat=="lihat"){
|
||||
$cekview="checked";
|
||||
}
|
||||
if($row1->mum_tambah=="tambah"){
|
||||
$cektambah="checked";
|
||||
}
|
||||
if($row1->mum_ubah=="ubah"){
|
||||
$cekedit="checked";
|
||||
}
|
||||
if($row1->mum_hapus=="hapus"){
|
||||
$cekdelete="checked";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($actionform=="prosesview"){
|
||||
$setdisabled="disabled=''";
|
||||
}
|
||||
if($menu->mm_action=='true'){
|
||||
echo ("
|
||||
<td><input type='checkbox'".$setdisabled." id='action".$no."' name='akses[]' class='flat-red'".$cekakses." value='".$tu->row('mt_id')."-".$menu->mm_id."'></td>
|
||||
<td><input type='checkbox'".$setdisabled." id='view".$no."' name='view[]' class='flat-red'".$cekview." value='".$menu->mm_id."' ></td>
|
||||
<td><input type='checkbox'".$setdisabled." id='tambah".$no."' name='tambah[]' class='flat-red'".$cektambah." value='".$menu->mm_id."' ></td>
|
||||
<td><input type='checkbox'".$setdisabled." id='edit".$no."' name='edit[]' class='flat-red'".$cekedit." value='".$menu->mm_id."'></td>
|
||||
<td><input type='checkbox'".$setdisabled." id='delete".$no."' name='delete[]' class='flat-red'".$cekdelete." value='".$menu->mm_id."'></td>
|
||||
</tr>
|
||||
");
|
||||
|
||||
}else{
|
||||
echo ("
|
||||
<td><input type='checkbox'".$setdisabled." id='action".$no."' name='akses[]' class='flat-red'".$cekakses." value='".$tu->row('mt_id')."-".$menu->mm_id."'></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
");
|
||||
}
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div><!-- /.box-body -->
|
||||
</div>
|
||||
</div><!-- /.box-body -->
|
||||
<div class="box-footer">
|
||||
<a href="<?php echo base_url();?>index.php/ps_hakakses" class="btn btn-default">Cancel</a>
|
||||
<?php if ($actionform!="prosesview"){ ?>
|
||||
<button type="submit" class="btn btn-warning">Submit</button>
|
||||
<?php } ?>
|
||||
</div><!-- /.box-footer -->
|
||||
</form>
|
||||
<!-- form end -->
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</section>
|
||||
@@ -0,0 +1,62 @@
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<small></small>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="<?php echo base_url()?>index.php"><i class="fa fa-dashboard"></i> Dashboard</a></li>
|
||||
<li>Setting</li>
|
||||
<li><a href="<?php echo base_url()?>index.php/hakakses">Hak Akses</a></li>
|
||||
<li class="active"><?php echo $title;?></li>
|
||||
</ol>
|
||||
</section>
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"><?php echo $title; ?></h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<?php if(validation_errors()){ ?>
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4><i class="icon fa fa-ban"></i> Alert!</h4>
|
||||
<?php echo validation_errors() ?>
|
||||
</div>
|
||||
<?php }
|
||||
|
||||
$setdisabled="";
|
||||
$setidedit="";
|
||||
$setnameedit="";
|
||||
if ($actionform=="prosesview"){
|
||||
$setdisabled="disabled=''";
|
||||
}
|
||||
if ($actionform!="prosesadd"){
|
||||
$setidedit=$ha->row('mt_id');
|
||||
$setnameedit=$ha->row('mt_nama');
|
||||
}
|
||||
|
||||
?>
|
||||
<form class="form-horizontal" id="form" action="<?php echo(base_url()); ?>index.php/ps_hakakses/<?php echo $actionform; ?>" method="post">
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="namatipeuser" class="col-sm-2 control-label">Nama Tipe User</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="hidden" name="id" value="<?php echo $setidedit;?>"/>
|
||||
<input id="namatipeuser" class="form-control" <?php echo $setdisabled; ?> name="namatipeuser" type="text" placeholder="Masukan Nama Tipe User" autocomplete="off" value="<?php echo $setnameedit;?>"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<a href="<?php echo base_url();?>index.php/ps_hakakses" class="btn btn-default">Cancel</a>
|
||||
<?php if ($actionform!="prosesview"){ ?>
|
||||
<button type="submit" class="btn btn-warning">Submit</button>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,95 @@
|
||||
<body class="hold-transition skin-blue sidebar-mini">
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<?php
|
||||
//---------------------start check access action TAMBAH-------------------//
|
||||
if(!empty($this->vartambah)){ echo "<small> <a href='".base_url()."index.php/ps_hakakses/add' class='btn btn-block btn-primary btn-sm'>Tambah Baru</a> </small>";
|
||||
}else{ echo "<small></small>";}
|
||||
//---------------------end check access action TAMBAH-------------------//
|
||||
?>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="<?php echo base_url()?>index.php"><i class="fa fa-dashboard"></i> Dashboard</a></li>
|
||||
<li>Setting</li>
|
||||
<li class="active"><?php echo $title ?></li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"><?php echo $title ?></h3>
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<?php if($this->session->flashdata('message')){?>
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4> <i class="icon fa fa-check"></i> Alert!</h4>
|
||||
<?php echo $this->session->flashdata('message');?>
|
||||
</div>
|
||||
<?php }?>
|
||||
<div class="box-body table-responsive no-padding">
|
||||
<table id="example1" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5%">No</th>
|
||||
<th>Nama Tipe User</th>
|
||||
<th width="25%">Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$no=0;
|
||||
foreach ($ha as $tipeuser) {
|
||||
$no++;
|
||||
//---------------------start check access action-------------------//
|
||||
$editbutton="";
|
||||
$edithakakses="";
|
||||
$deletebutton="";
|
||||
$viewbutton="";
|
||||
if(!empty($this->varedit)){
|
||||
$editbutton="<a href='".base_url()."index.php/ps_hakakses/edit/".$tipeuser->mt_id."' class='btn btn-warning btn-xs'><i class='fa fa-edit'></i> Edit</a> ";
|
||||
}
|
||||
if(!empty($this->varedit)){
|
||||
$edithakakses="<a href='".base_url()."index.php/ps_hakakses/edithakakses/".$tipeuser->mt_id."' class='btn btn-success btn-xs'><i class='fa fa-gear'></i> Hak Akses</a> ";
|
||||
}
|
||||
if(!empty($this->vardelete)){
|
||||
$deletebutton="<a onclick='del(".$tipeuser->mt_id.")' class='btn btn-danger btn-xs'><i class='fa fa-trash'></i> Delete</a><input type='hidden' id='isi".$tipeuser->mt_id."' value='".$tipeuser->mt_nama."'> ";
|
||||
}
|
||||
if(!empty($this->varview)){
|
||||
$viewbutton="<a href='".base_url()."index.php/ps_hakakses/view/".$tipeuser->mt_id."' class='btn btn-primary btn-xs'><i class='fa fa-eye'></i> View</a> ";
|
||||
}
|
||||
//---------------------end check access action-------------------//
|
||||
echo("
|
||||
<tr>
|
||||
<td>".$no."</td>
|
||||
<td>".$tipeuser->mt_nama."</td>
|
||||
<td>".$viewbutton.$editbutton.$deletebutton.$edithakakses."</td>
|
||||
</tr>
|
||||
");
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</section>
|
||||
<div class="control-sidebar-bg"></div>
|
||||
</body>
|
||||
<script type="text/javascript">
|
||||
var url="<?php echo base_url();?>";
|
||||
function del(id){
|
||||
var isi=document.getElementById('isi'+id).value;
|
||||
var r=confirm("Apakah anda ingin menghapus tipe user "+isi+"?")
|
||||
if (r==true)
|
||||
window.location = url+"index.php/ps_hakakses/delete/"+id;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,283 @@
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<small></small>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="<?php echo base_url()?>index.php"><i class="fa fa-dashboard"></i> Dashboard</a></li>
|
||||
<li>Setting</li>
|
||||
<li><a href="<?php echo base_url()?>index.php/ps_klinik">Master Klinik</a></li>
|
||||
<li class="active"><?php echo $title;?></li>
|
||||
</ol>
|
||||
</section>
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"><?php echo $title; ?></h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<?php if(validation_errors()){ ?>
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4><i class="icon fa fa-ban"></i> Alert!</h4>
|
||||
<?php echo validation_errors() ?>
|
||||
</div>
|
||||
<?php }
|
||||
|
||||
$setdisabled ="";
|
||||
$setidedit ="";
|
||||
|
||||
$setnama ="";
|
||||
$setkode ="";
|
||||
$setshift ="";
|
||||
//$setmenit ="";
|
||||
$setquota ="";
|
||||
$setquotabangku ="";
|
||||
$setstatusshift ="";
|
||||
$setaktif ="";
|
||||
$setjadwal ="";
|
||||
$setautoshift ="";
|
||||
|
||||
$jamawal ="";
|
||||
$menitawal ="";
|
||||
$waktu ="";
|
||||
|
||||
$senin="";$selasa="";$rabu="";$kamis="";$jumat="";
|
||||
|
||||
if ($actionform=="prosesview"){
|
||||
$setdisabled="disabled=''";
|
||||
}
|
||||
if ($actionform!="prosesadd"){
|
||||
$setidedit =$mk->row('mk_id');
|
||||
|
||||
$setnama =$mk->row('mk_nama');
|
||||
$setkode =$mk->row('mk_kode');
|
||||
$setshift =$mk->row('mk_shift');
|
||||
//$setmenit =$mk->row('mk_menit');
|
||||
$setquota =$mk->row('mk_quota');
|
||||
$setquotabangku =$mk->row('mk_quota_bangku');
|
||||
$setstatusshift =$mk->row('mk_status_shift');
|
||||
$setaktif =$mk->row('mk_aktif');
|
||||
|
||||
|
||||
if($mk->row('mk_auto_shift')=="1"){$setautoshift="checked";}
|
||||
|
||||
$setjadwal =$mk->row('mk_jadwal');
|
||||
$pecahjadwal = explode("|",$setjadwal);
|
||||
$jumdat = count($pecahjadwal);
|
||||
for ($x = 0; $x <= $jumdat; $x++){
|
||||
if(isset($pecahjadwal[$x])){
|
||||
if($pecahjadwal[$x]=="senin"){$senin="checked";}
|
||||
if($pecahjadwal[$x]=="selasa"){$selasa="checked";}
|
||||
if($pecahjadwal[$x]=="rabu"){$rabu="checked";}
|
||||
if($pecahjadwal[$x]=="kamis"){$kamis="checked";}
|
||||
if($pecahjadwal[$x]=="jumat"){$jumat="checked";}
|
||||
}
|
||||
}
|
||||
|
||||
$pecahwaktu = explode("|",$mk->row('mk_jam_shift'));
|
||||
$jumwaktu = count($pecahwaktu);
|
||||
for ($x = 0; $x < $jumwaktu; $x++){
|
||||
$pecahjammenit = explode(":",$pecahwaktu[$x]);
|
||||
$jam = $pecahjammenit[0];
|
||||
if(isset($pecahjammenit[1])){$menit = $pecahjammenit[1];}else{$menit = "00";}
|
||||
//$menit = $pecahjammenit[1];
|
||||
$numset = $x+1;
|
||||
|
||||
if($x==0){
|
||||
$jamawal =$jam;
|
||||
$menitawal =$menit;
|
||||
}else{
|
||||
if($x!=($jumwaktu-1)){
|
||||
$waktu =$waktu."
|
||||
<div class='box-body'>
|
||||
<div class='form-group'>
|
||||
<label class='col-sm-2 control-label'></label>
|
||||
<div class='col-sm-2'>
|
||||
<input id='jam$numset' class='form-control' $setdisabled name='jam[]' placeholder='Jam Buka Shift $numset' autocomplete='off' value='$jam'/>
|
||||
</div>
|
||||
<label for='jammulai' class='col-sm-2 control-label' style='text-align: center;'> : </label>
|
||||
<div class='col-sm-2'>
|
||||
<input id='menit$numset' class='form-control' $setdisabled name='menit[]' placeholder='Menit Buka Shift $numset' autocomplete='off' value='$menit' />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<form class="form-horizontal" id="form" action="<?php echo(base_url()); ?>index.php/ps_klinik/<?php echo $actionform; ?>" method="post" autocomplete="off">
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="kode" class="col-sm-2 control-label">Kode</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="hidden" name="id" value="<?php echo $setidedit;?>"/>
|
||||
<input id="kode" class="form-control" <?php echo $setdisabled; ?> name="kode" type="text" placeholder="Masukan Kode Klinik" autocomplete="off" value="<?php echo $setkode;?>" data-inputmask='"mask": "AA"' data-mask />
|
||||
</div>
|
||||
<label class="col-sm-3 control-label"><code>Masukan Kode Klinik 2 Huruf</code></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="nama" class="col-sm-2 control-label">Nama</label>
|
||||
<div class="col-sm-6">
|
||||
<input id="nama" class="form-control" <?php echo $setdisabled; ?> name="nama" type="text" placeholder="Masukan Nama Klinik" autocomplete="off" value="<?php echo $setnama;?>"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="shift" class="col-sm-2 control-label">Shift</label>
|
||||
<div class="col-sm-2">
|
||||
<input id="shift" onchange="jamshift()" class="form-control" <?php echo $setdisabled; ?> name="shift" type="number" placeholder="Jumlah Shift" autocomplete="off" value="<?php echo $setshift;?>"/>
|
||||
</div>
|
||||
<label for="quota" class="col-sm-2 control-label" style="text-align: center;">Quota Shift</label>
|
||||
<div class="col-sm-2">
|
||||
<input id="quota" class="form-control" <?php echo $setdisabled; ?> name="quota" type="number" placeholder="Quota Per Shift" autocomplete="off" value="<?php echo $setquota;?>"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function jamshift(){
|
||||
$("#deletejam").remove();
|
||||
$("#appendhere").append("<div id='deletejam'></div>");
|
||||
//----mulai jam 07:00 s/d 15:00 (8 jam = 480 menit)
|
||||
var jumshift = document.getElementById('shift').value;
|
||||
var bagijam = 480/jumshift;
|
||||
//var jamawal = "08:00";
|
||||
var jamakhir = "";
|
||||
|
||||
document.getElementById('jam1').value="07";
|
||||
document.getElementById('menit1').value="00";
|
||||
|
||||
var d = new Date("2015-03-25 07:00");
|
||||
|
||||
for(i=2;i<=jumshift;i++){
|
||||
d.setMinutes(d.getMinutes() + bagijam);
|
||||
var h = d.getHours("H");
|
||||
var m = d.getMinutes("M");
|
||||
if(h<10){h="0"+h;}
|
||||
if(m<10){m="0"+m;}
|
||||
$("#deletejam").append(""+
|
||||
"<div class='box-body'>"+
|
||||
"<div class='form-group'>"+
|
||||
"<label class='col-sm-2 control-label'></label>"+
|
||||
"<div class='col-sm-2'>"+
|
||||
"<input id='jam"+i+"' class='form-control' name='jam[]' placeholder='Jam Buka Shift "+i+"' autocomplete='off' value='"+h+"' />"+
|
||||
"</div>"+
|
||||
"<label class='col-sm-2 control-label' style='text-align: center;'> : </label>"+
|
||||
"<div class='col-sm-2'>"+
|
||||
"<input id='menit"+i+"' class='form-control' name='menit[]' placeholder='Menit Buka Shift "+i+"' autocomplete='off' value='"+m+"' />"+
|
||||
"</div>"+
|
||||
"</div>"+
|
||||
"</div>"
|
||||
);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="jammulai" class="col-sm-2 control-label">Jam Shift</label>
|
||||
<div class="col-sm-2">
|
||||
<input id="jam1" class="form-control" <?php echo $setdisabled; ?> name="jam[]" placeholder="Jam Buka Shift 1" autocomplete="off" value="<?php echo $jamawal;?>"/>
|
||||
</div>
|
||||
<label for="jammulai" class="col-sm-2 control-label" style="text-align: center;"> : </label>
|
||||
<div class="col-sm-2">
|
||||
<input id="menit1" class="form-control" <?php echo $setdisabled; ?> name="menit[]" placeholder="Menit Buka Shift 1" autocomplete="off" value="<?php echo $menitawal;?>" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="appendhere"><div id="deletejam"><?php echo $waktu;?><!-- Append JS Shift Jam --></div></div>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="autoshift" class="col-sm-2 control-label">Auto Shift</label>
|
||||
<div class="col-sm-6">
|
||||
<input id="autoshift" name="autoshift" type="checkbox" class="flat-red" <?php echo $setdisabled; ?> <?php echo $setautoshift;?> />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="quotabangku" class="col-sm-2 control-label">Quota Bangku</label>
|
||||
<div class="col-sm-6">
|
||||
<input id="quotabangku" class="form-control" <?php echo $setdisabled; ?> name="quotabangku" type="number" placeholder="Masukan Quota Bangku Klinik" autocomplete="off" value="<?php echo $setquotabangku;?>"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="jadwal" class="col-sm-2 control-label">Jadwal Klinik</label>
|
||||
<div class="col-sm-6">
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th style="width: 10px">#</th>
|
||||
<th>Hari</th>
|
||||
<th style="width: 40px">Pilih</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1.</td>
|
||||
<td>Senin</td>
|
||||
<td>
|
||||
<label>
|
||||
<input id="senin" name="senin" type="checkbox" class="flat-red" <?php echo $setdisabled; ?> <?php echo $senin;?> />
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2.</td>
|
||||
<td>Selasa</td>
|
||||
<td>
|
||||
<label>
|
||||
<input id="selasa" name="selasa" type="checkbox" class="flat-red" <?php echo $setdisabled; ?> <?php echo $selasa;?> />
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>3.</td>
|
||||
<td>Rabu</td>
|
||||
<td>
|
||||
<label>
|
||||
<input id="rabu" name="rabu" type="checkbox" class="flat-red" <?php echo $setdisabled; ?> <?php echo $rabu;?> />
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>4.</td>
|
||||
<td>Kamis</td>
|
||||
<td>
|
||||
<label>
|
||||
<input id="kamis" name="kamis" type="checkbox" class="flat-red" <?php echo $setdisabled; ?> <?php echo $kamis;?> />
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>5.</td>
|
||||
<td>Jum'at</td>
|
||||
<td>
|
||||
<label>
|
||||
<input id="jumat" name="jumat" type="checkbox" class="flat-red" <?php echo $setdisabled; ?> <?php echo $jumat;?> />
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<a href="<?php echo base_url();?>index.php/ps_klinik" class="btn btn-default">Cancel</a>
|
||||
<?php if ($actionform!="prosesview"){ ?>
|
||||
<button type="submit" class="btn btn-warning">Submit</button>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div><!-- /.box -->
|
||||
@@ -0,0 +1,117 @@
|
||||
<body class="hold-transition skin-blue sidebar-mini">
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<?php
|
||||
//---------------------start check access action TAMBAH-------------------//
|
||||
if(!empty($this->vartambah)){ echo "<small> <a href='".base_url()."index.php/ps_klinik/add' class='btn btn-block btn-primary btn-sm'>Tambah Baru</a> </small>";
|
||||
}else{ echo "<small></small>";}
|
||||
//---------------------end check access action TAMBAH-------------------//
|
||||
?>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="<?php echo base_url()?>index.php"><i class="fa fa-dashboard"></i> Dashboard</a></li>
|
||||
<li>Setting</li>
|
||||
<li class="active"><?php echo $title ?></li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"><?php echo $title ?></h3>
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<?php if($this->session->flashdata('message')){?>
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4> <i class="icon fa fa-check"></i> Alert!</h4>
|
||||
<?php echo $this->session->flashdata('message');?>
|
||||
</div>
|
||||
<?php }
|
||||
//$this->session->userdata('s_klinik');
|
||||
?>
|
||||
|
||||
<div class="box-body table-responsive no-padding">
|
||||
<table id="example1" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5%">No</th>
|
||||
<th>Kode</th>
|
||||
<th>Nama Klinik</th>
|
||||
<th>Shift</th>
|
||||
<th>Quota Shift</th>
|
||||
<th width="20%">Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$no=0;
|
||||
foreach ($mk as $masterklinik) {
|
||||
$no++;
|
||||
//---------------------start check access action-------------------//
|
||||
$editbutton="";
|
||||
$edithakakses="";
|
||||
$deletebutton="";
|
||||
$viewbutton="";
|
||||
$isidata ="";
|
||||
if(!empty($this->varedit)){
|
||||
$editbutton="<a href='".base_url()."index.php/ps_klinik/edit/".$masterklinik->mk_id."' class='btn btn-warning btn-xs'><i class='fa fa-edit'></i> Edit</a> ";
|
||||
}
|
||||
if(!empty($this->vardelete)){
|
||||
$deletebutton="<a onclick='del(".$masterklinik->mk_id.")' class='btn btn-danger btn-xs'><i class='fa fa-trash'></i> Delete</a><input type='hidden' id='isi".$masterklinik->mk_id."' value='".$masterklinik->mk_nama."'> ";
|
||||
}
|
||||
if(!empty($this->varview)){
|
||||
$viewbutton="<a href='".base_url()."index.php/ps_klinik/view/".$masterklinik->mk_id."' class='btn btn-primary btn-xs'><i class='fa fa-eye'></i> View</a> ";
|
||||
}
|
||||
//---------------------end check access action-------------------//
|
||||
if($this->session->userdata('s_FK_TipeUser')=="4"){
|
||||
if($this->session->userdata('s_klinik')==$masterklinik->mk_id){
|
||||
echo ("
|
||||
<tr>
|
||||
<td>".$no."</td>
|
||||
<td>".$masterklinik->mk_kode."</td>
|
||||
<td>".$masterklinik->mk_nama."</td>
|
||||
<td>".$masterklinik->mk_shift."</td>
|
||||
<td>".$masterklinik->mk_quota."</td>
|
||||
<td>".$viewbutton.$editbutton.$deletebutton.$edithakakses."</td>
|
||||
</tr>
|
||||
");
|
||||
}
|
||||
}else{
|
||||
echo ("
|
||||
<tr>
|
||||
<td>".$no."</td>
|
||||
<td>".$masterklinik->mk_kode."</td>
|
||||
<td>".$masterklinik->mk_nama."</td>
|
||||
<td>".$masterklinik->mk_shift."</td>
|
||||
<td>".$masterklinik->mk_quota."</td>
|
||||
<td>".$viewbutton.$editbutton.$deletebutton.$edithakakses."</td>
|
||||
</tr>
|
||||
");
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</section>
|
||||
<div class="control-sidebar-bg"></div>
|
||||
</body>
|
||||
<script type="text/javascript">
|
||||
var url="<?php echo base_url();?>";
|
||||
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,165 @@
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<small></small>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="<?php echo base_url()?>index.php"><i class="fa fa-dashboard"></i> Dashboard</a></li>
|
||||
<li>Setting</li>
|
||||
<li><a href="<?php echo base_url()?>index.php/ps_loket">Master Loket</a></li>
|
||||
<li class="active"><?php echo $title;?></li>
|
||||
</ol>
|
||||
</section>
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"><?php echo $title; ?></h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<?php if(validation_errors()){ ?>
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4><i class="icon fa fa-ban"></i> Alert!</h4>
|
||||
<?php echo validation_errors() ?>
|
||||
</div>
|
||||
<?php }
|
||||
$setdisabled ="";
|
||||
$setidedit ="";
|
||||
|
||||
$setnama ="";
|
||||
$setpelayanan ="";
|
||||
$setquotabangku ="";
|
||||
$statuspelayanan ="";
|
||||
$pembayaran ="";
|
||||
$online ="";
|
||||
|
||||
if ($actionform=="prosesview"){
|
||||
$setdisabled="disabled=''";
|
||||
}
|
||||
if ($actionform!="prosesadd"){
|
||||
$setidedit =$ml->row('ml_id');
|
||||
$setnama =$ml->row('ml_nama');
|
||||
$setpelayanan =$ml->row('ml_pelayanan');
|
||||
$setquotabangku =$ml->row('ml_quota_bangku');
|
||||
$statuspelayanan =$ml->row('ml_statuspelayanan');
|
||||
$pembayaran =$ml->row('ml_pembayaran');
|
||||
$online =$ml->row('ml_online');
|
||||
}
|
||||
|
||||
?>
|
||||
<form class="form-horizontal" id="form" action="<?php echo(base_url()); ?>index.php/ps_loket/<?php echo $actionform; ?>" method="post" autocomplete="off">
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="nama" class="col-sm-2 control-label">Nama</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="hidden" name="id" value="<?php echo $setidedit;?>"/>
|
||||
<input id="nama" class="form-control" <?php echo $setdisabled; ?> name="nama" type="text" placeholder="Masukan Nama Loket" autocomplete="off" value="<?php echo $setnama;?>"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="quota" class="col-sm-2 control-label">Quota Bangku</label>
|
||||
<div class="col-sm-6">
|
||||
<input id="quota" class="form-control" <?php echo $setdisabled; ?> name="quota" type="number" placeholder="Masukan Quota Bangku" autocomplete="off" value="<?php echo $setquotabangku;?>"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="statuspelayanan" class="col-sm-2 control-label">Status Pelayanan</label>
|
||||
<div class="col-sm-6">
|
||||
<select id="statuspelayanan" name="statuspelayanan" class="form-control select">
|
||||
<option value=""> Pilih Status Pelayanan </option>
|
||||
<option <?php if($statuspelayanan=="1"){echo "selected=''";} ?> value="1"> RAWAT JALAN</option>
|
||||
<option <?php if($statuspelayanan=="2"){echo "selected=''";} ?> value="2"> RAWAT INAP </option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="pembayaran" class="col-sm-2 control-label">Pembayaran</label>
|
||||
<div class="col-sm-6">
|
||||
<select id="pembayaran" name="pembayaran" class="form-control select">
|
||||
<option value="0"> Pilih Pembayaran </option>
|
||||
<option <?php if($pembayaran=="1"){echo "selected=''";} ?> value="1"> UMUM / SPM / JKMM / JAMPERSAL / T4 / KARYAWAN</option>
|
||||
<option <?php if($pembayaran=="2"){echo "selected=''";} ?> value="2"> JKN </option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="online" class="col-sm-2 control-label">Keterangan</label>
|
||||
<div class="col-sm-6">
|
||||
<select id="online" name="online" class="form-control select">
|
||||
<option value="0"> Pilih Keterangan </option>
|
||||
<option <?php if($online=="1"){echo "selected=''";} ?> value="1"> OFFLINE</option>
|
||||
<option <?php if($online=="2"){echo "selected=''";} ?> value="2"> ONLINE</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="pelayanan" class="col-sm-2 control-label">Pelayanan</label>
|
||||
<div class="col-sm-6">
|
||||
<!--input id="pelayanan" class="form-control" <?php echo $setdisabled; ?> name="pelayanan" type="text" placeholder="Masukan Pelayanan" autocomplete="off" value="<?php echo $setpelayanan;?>"/-->
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th style="width: 10px">#</th>
|
||||
<th>Kode</th>
|
||||
<th>Klinik</th>
|
||||
<th style="width: 40px">Pilih</th>
|
||||
</tr>
|
||||
<?php
|
||||
$setcek="";
|
||||
$no=0;
|
||||
foreach ($mk as $masterklinik) {
|
||||
$no++;
|
||||
if ($actionform!="prosesadd"){
|
||||
$pedat_pelayanan = explode(",",$setpelayanan);
|
||||
$jumrow = (count($pedat_pelayanan))-1;
|
||||
for($x=0;$x<=$jumrow;$x++){
|
||||
if(isset($pedat_pelayanan[$x])){
|
||||
if($pedat_pelayanan[$x]==$masterklinik->mk_id){
|
||||
$setcek="checked";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo ("
|
||||
<tr>
|
||||
<td>$no.</td>
|
||||
<td>".$masterklinik->mk_kode."</td>
|
||||
<td>".$masterklinik->mk_nama."</td>
|
||||
<td>
|
||||
<label>
|
||||
<input id='klinik' name='klinik[]' type='checkbox' value='".$masterklinik->mk_id."' $setcek class='flat-red' $setdisabled />
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
");
|
||||
$setcek="";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<a href="<?php echo base_url();?>index.php/ps_loket" class="btn btn-default">Cancel</a>
|
||||
<?php if ($actionform!="prosesview"){ ?>
|
||||
<button type="submit" class="btn btn-warning">Submit</button>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,139 @@
|
||||
<body class="hold-transition skin-blue sidebar-mini">
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<?php
|
||||
//---------------------start check access action TAMBAH-------------------//
|
||||
if(!empty($this->vartambah)){ echo "<small> <a href='".base_url()."index.php/ps_loket/add' class='btn btn-block btn-primary btn-sm'>Tambah Baru</a> </small>";
|
||||
}else{ echo "<small></small>";}
|
||||
//---------------------end check access action TAMBAH-------------------//
|
||||
?>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="<?php echo base_url()?>index.php"><i class="fa fa-dashboard"></i> Dashboard</a></li>
|
||||
<li>Setting</li>
|
||||
<li class="active"><?php echo $title ?></li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"><?php echo $title ?></h3>
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<?php if($this->session->flashdata('message')){?>
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4> <i class="icon fa fa-check"></i> Alert!</h4>
|
||||
<?php echo $this->session->flashdata('message');?>
|
||||
</div>
|
||||
<?php }?>
|
||||
<div class="box-body table-responsive no-padding">
|
||||
<table id="example1" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5%">No</th>
|
||||
<th>Nama Loket</th>
|
||||
<th>Quota</th>
|
||||
<th>Pelayanan</th>
|
||||
<th>Pembayaran</th>
|
||||
<th>Keterangan</th>
|
||||
<th width="20%">Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$no=0;
|
||||
foreach ($ml as $masterloket) {
|
||||
$no++;
|
||||
//---------------------start check access action-------------------//
|
||||
$editbutton="";
|
||||
$edithakakses="";
|
||||
$deletebutton="";
|
||||
$viewbutton="";
|
||||
|
||||
$infoklinik="";
|
||||
$infopembayaran="";
|
||||
$infoonline="";
|
||||
|
||||
$pecahpel = explode(",",$masterloket->ml_pelayanan);
|
||||
$jumrow = (count($pecahpel));
|
||||
for($x=0;$x<=$jumrow;$x++){
|
||||
if(isset($pecahpel[$x])){
|
||||
$this->db->where('mk_id', $pecahpel[$x]);
|
||||
$selectklinik = $this->db->get('master_klinik');
|
||||
foreach ($selectklinik->result() as $datklin){
|
||||
$infoklinik=$infoklinik."<code>".$datklin->mk_nama."</code> ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($masterloket->ml_pembayaran=="1"){$infopembayaran="<b>UMUM / DLL</b>";}
|
||||
if($masterloket->ml_pembayaran=="2"){$infopembayaran="JKN";}
|
||||
|
||||
if($masterloket->ml_online=="1"){$infoonline="OFFLINE";}
|
||||
if($masterloket->ml_online=="2"){$infoonline="<b>ONLINE</b>";}
|
||||
|
||||
if(!empty($this->varedit)){
|
||||
$editbutton="<a href='".base_url()."index.php/ps_loket/edit/".$masterloket->ml_id."' class='btn btn-warning btn-xs'><i class='fa fa-edit'></i> Edit</a> ";
|
||||
}
|
||||
if(!empty($this->vardelete)){
|
||||
$deletebutton="<a onclick='del(".$masterloket->ml_id.")' class='btn btn-danger btn-xs'><i class='fa fa-trash'></i> Delete</a><input type='hidden' id='isi".$masterloket->ml_id."' value='".$masterloket->ml_nama."'> ";
|
||||
}
|
||||
if(!empty($this->varview)){
|
||||
$viewbutton="<a href='".base_url()."index.php/ps_loket/view/".$masterloket->ml_id."' class='btn btn-primary btn-xs'><i class='fa fa-eye'></i> View</a> ";
|
||||
}
|
||||
//---------------------end check access action-------------------//
|
||||
if($this->session->userdata('s_FK_TipeUser')=="3"){
|
||||
if($this->session->userdata('s_loket')==$masterloket->ml_id){
|
||||
echo("
|
||||
<tr>
|
||||
<td>".$no."</td>
|
||||
<td>".$masterloket->ml_nama."</td>
|
||||
<td>".$masterloket->ml_quota_bangku."</td>
|
||||
<td>".$infoklinik."</td>
|
||||
<td>".$infopembayaran."</td>
|
||||
<td>".$infoonline."</td>
|
||||
<td>".$viewbutton.$editbutton.$deletebutton.$edithakakses."</td>
|
||||
</tr>
|
||||
");
|
||||
}
|
||||
}else{
|
||||
echo("
|
||||
<tr>
|
||||
<td>".$no."</td>
|
||||
<td>".$masterloket->ml_nama."</td>
|
||||
<td>".$masterloket->ml_quota_bangku."</td>
|
||||
<td>".$infoklinik."</td>
|
||||
<td>".$infopembayaran."</td>
|
||||
<td>".$infoonline."</td>
|
||||
<td>".$viewbutton.$editbutton.$deletebutton.$edithakakses."</td>
|
||||
</tr>
|
||||
");
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</section>
|
||||
<div class="control-sidebar-bg"></div>
|
||||
</body>
|
||||
<script type="text/javascript">
|
||||
var url="<?php echo base_url();?>";
|
||||
function del(id){
|
||||
var isi=document.getElementById('isi'+id).value;
|
||||
var r=confirm("Apakah anda ingin menghapus loket "+isi+"?")
|
||||
if (r==true)
|
||||
window.location = url+"index.php/ps_loket/delete/"+id;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,151 @@
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<small></small>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="<?php echo base_url()?>index.php"><i class="fa fa-dashboard"></i> Dashboard</a></li>
|
||||
<li>Setting</li>
|
||||
<li><a href="<?php echo base_url()?>index.php/ps_loket">Master Loket</a></li>
|
||||
<li class="active"><?php echo $title;?></li>
|
||||
</ol>
|
||||
</section>
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"><?php echo $title; ?></h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<?php if(validation_errors()){ ?>
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4><i class="icon fa fa-ban"></i> Alert!</h4>
|
||||
<?php echo validation_errors() ?>
|
||||
</div>
|
||||
<?php }
|
||||
$setdisabled ="";
|
||||
$setidedit ="";
|
||||
|
||||
$setnama ="";
|
||||
$setpelayanan ="";
|
||||
$setquotabangku ="";
|
||||
$pembayaran ="";
|
||||
$online ="";
|
||||
|
||||
if ($actionform=="prosesview"){
|
||||
$setdisabled="disabled=''";
|
||||
}
|
||||
if ($actionform!="prosesadd"){
|
||||
$setidedit =$ml->row('ml_id');
|
||||
$setnama =$ml->row('ml_nama');
|
||||
$setpelayanan =$ml->row('ml_pelayanan');
|
||||
$setquotabangku =$ml->row('ml_quota_bangku');
|
||||
$pembayaran =$ml->row('ml_pembayaran');
|
||||
$online =$ml->row('ml_online');
|
||||
}
|
||||
|
||||
?>
|
||||
<form class="form-horizontal" id="form" action="<?php echo(base_url()); ?>index.php/ps_loket/<?php echo $actionform; ?>" method="post" autocomplete="off">
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="nama" class="col-sm-2 control-label">Nama</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="hidden" name="id" value="<?php echo $setidedit;?>"/>
|
||||
<input id="nama" class="form-control" <?php echo $setdisabled; ?> name="nama" type="text" placeholder="Masukan Nama Loket" autocomplete="off" value="<?php echo $setnama;?>"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="quota" class="col-sm-2 control-label">Quota Bangku</label>
|
||||
<div class="col-sm-6">
|
||||
<input id="quota" class="form-control" <?php echo $setdisabled; ?> name="quota" type="number" placeholder="Masukan Quota Bangku" autocomplete="off" value="<?php echo $setquotabangku;?>"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="pembayaran" class="col-sm-2 control-label">Pembayaran</label>
|
||||
<div class="col-sm-6">
|
||||
<select id="pembayaran" name="pembayaran" class="form-control select">
|
||||
<option value=""> Pilih Pembayaran </option>
|
||||
<option <?php if($pembayaran=="1"){echo "selected=''";} ?> value="1"> UMUM / SPM / JKMM / JAMPERSAL / T4 / KARYAWAN</option>
|
||||
<option <?php if($pembayaran=="2"){echo "selected=''";} ?> value="2"> JKN </option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="online" class="col-sm-2 control-label">Keterangan</label>
|
||||
<div class="col-sm-6">
|
||||
<select id="online" name="online" class="form-control select">
|
||||
<option value=""> Pilih Keterangan </option>
|
||||
<option <?php if($online=="1"){echo "selected=''";} ?> value="1"> OFFLINE</option>
|
||||
<option <?php if($online=="2"){echo "selected=''";} ?> value="2"> ONLINE</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="pelayanan" class="col-sm-2 control-label">Pelayanan</label>
|
||||
<div class="col-sm-6">
|
||||
<!--input id="pelayanan" class="form-control" <?php echo $setdisabled; ?> name="pelayanan" type="text" placeholder="Masukan Pelayanan" autocomplete="off" value="<?php echo $setpelayanan;?>"/-->
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th style="width: 10px">#</th>
|
||||
<th>Kode</th>
|
||||
<th>Klinik</th>
|
||||
<th style="width: 40px">Pilih</th>
|
||||
</tr>
|
||||
<?php
|
||||
$setcek="";
|
||||
$no=0;
|
||||
foreach ($mk as $masterklinik) {
|
||||
$no++;
|
||||
if ($actionform!="prosesadd"){
|
||||
$pedat_pelayanan = explode(",",$setpelayanan);
|
||||
$jumrow = (count($pedat_pelayanan))-1;
|
||||
for($x=0;$x<=$jumrow;$x++){
|
||||
if(isset($pedat_pelayanan[$x])){
|
||||
if($pedat_pelayanan[$x]==$masterklinik->mk_id){
|
||||
$setcek="checked";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo ("
|
||||
<tr>
|
||||
<td>$no.</td>
|
||||
<td>".$masterklinik->mk_kode."</td>
|
||||
<td>".$masterklinik->mk_nama."</td>
|
||||
<td>
|
||||
<label>
|
||||
<input id='klinik' name='klinik[]' type='checkbox' value='".$masterklinik->mk_id."' $setcek class='flat-red' $setdisabled />
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
");
|
||||
$setcek="";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<a href="<?php echo base_url();?>index.php/ps_loket" class="btn btn-default">Cancel</a>
|
||||
<?php if ($actionform!="prosesview"){ ?>
|
||||
<button type="submit" class="btn btn-warning">Submit</button>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,139 @@
|
||||
<body class="hold-transition skin-blue sidebar-mini">
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<?php
|
||||
//---------------------start check access action TAMBAH-------------------//
|
||||
if(!empty($this->vartambah)){ echo "<small> <a href='".base_url()."index.php/ps_loket/add' class='btn btn-block btn-primary btn-sm'>Tambah Baru</a> </small>";
|
||||
}else{ echo "<small></small>";}
|
||||
//---------------------end check access action TAMBAH-------------------//
|
||||
?>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="<?php echo base_url()?>index.php"><i class="fa fa-dashboard"></i> Dashboard</a></li>
|
||||
<li>Setting</li>
|
||||
<li class="active"><?php echo $title ?></li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"><?php echo $title ?></h3>
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<?php if($this->session->flashdata('message')){?>
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4> <i class="icon fa fa-check"></i> Alert!</h4>
|
||||
<?php echo $this->session->flashdata('message');?>
|
||||
</div>
|
||||
<?php }?>
|
||||
<div class="box-body table-responsive no-padding">
|
||||
<table id="example1" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5%">No</th>
|
||||
<th>Nama Loket</th>
|
||||
<th>Quota</th>
|
||||
<th>Pelayanan</th>
|
||||
<th>Pembayaran</th>
|
||||
<th>Keterangan</th>
|
||||
<th width="20%">Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$no=0;
|
||||
foreach ($ml as $masterloket) {
|
||||
$no++;
|
||||
//---------------------start check access action-------------------//
|
||||
$editbutton="";
|
||||
$edithakakses="";
|
||||
$deletebutton="";
|
||||
$viewbutton="";
|
||||
|
||||
$infoklinik="";
|
||||
$infopembayaran="";
|
||||
$infoonline="";
|
||||
|
||||
$pecahpel = explode(",",$masterloket->ml_pelayanan);
|
||||
$jumrow = (count($pecahpel));
|
||||
for($x=0;$x<=$jumrow;$x++){
|
||||
if(isset($pecahpel[$x])){
|
||||
$this->db->where('mk_id', $pecahpel[$x]);
|
||||
$selectklinik = $this->db->get('master_klinik');
|
||||
foreach ($selectklinik->result() as $datklin){
|
||||
$infoklinik=$infoklinik."<code>".$datklin->mk_nama."</code> ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($masterloket->ml_pembayaran=="1"){$infopembayaran="<b>UMUM / DLL</b>";}
|
||||
if($masterloket->ml_pembayaran=="2"){$infopembayaran="JKN";}
|
||||
|
||||
if($masterloket->ml_online=="1"){$infoonline="OFFLINE";}
|
||||
if($masterloket->ml_online=="2"){$infoonline="<b>ONLINE</b>";}
|
||||
|
||||
if(!empty($this->varedit)){
|
||||
$editbutton="<a href='".base_url()."index.php/ps_loket/edit/".$masterloket->ml_id."' class='btn btn-warning btn-xs'><i class='fa fa-edit'></i> Edit</a> ";
|
||||
}
|
||||
if(!empty($this->vardelete)){
|
||||
$deletebutton="<a onclick='del(".$masterloket->ml_id.")' class='btn btn-danger btn-xs'><i class='fa fa-trash'></i> Delete</a><input type='hidden' id='isi".$masterloket->ml_id."' value='".$masterloket->ml_nama."'> ";
|
||||
}
|
||||
if(!empty($this->varview)){
|
||||
$viewbutton="<a href='".base_url()."index.php/ps_loket/view/".$masterloket->ml_id."' class='btn btn-primary btn-xs'><i class='fa fa-eye'></i> View</a> ";
|
||||
}
|
||||
//---------------------end check access action-------------------//
|
||||
if($this->session->userdata('s_FK_TipeUser')=="3"){
|
||||
if($this->session->userdata('s_loket')==$masterloket->ml_id){
|
||||
echo("
|
||||
<tr>
|
||||
<td>".$no."</td>
|
||||
<td>".$masterloket->ml_nama."</td>
|
||||
<td>".$masterloket->ml_quota_bangku."</td>
|
||||
<td>".$infoklinik."</td>
|
||||
<td>".$infopembayaran."</td>
|
||||
<td>".$infoonline."</td>
|
||||
<td>".$viewbutton.$editbutton.$deletebutton.$edithakakses."</td>
|
||||
</tr>
|
||||
");
|
||||
}
|
||||
}else{
|
||||
echo("
|
||||
<tr>
|
||||
<td>".$no."</td>
|
||||
<td>".$masterloket->ml_nama."</td>
|
||||
<td>".$masterloket->ml_quota_bangku."</td>
|
||||
<td>".$infoklinik."</td>
|
||||
<td>".$infopembayaran."</td>
|
||||
<td>".$infoonline."</td>
|
||||
<td>".$viewbutton.$editbutton.$deletebutton.$edithakakses."</td>
|
||||
</tr>
|
||||
");
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</section>
|
||||
<div class="control-sidebar-bg"></div>
|
||||
</body>
|
||||
<script type="text/javascript">
|
||||
var url="<?php echo base_url();?>";
|
||||
function del(id){
|
||||
var isi=document.getElementById('isi'+id).value;
|
||||
var r=confirm("Apakah anda ingin menghapus loket "+isi+"?")
|
||||
if (r==true)
|
||||
window.location = url+"index.php/ps_loket/delete/"+id;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,83 @@
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<small></small>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="<?php echo base_url()?>index.php"><i class="fa fa-dashboard"></i> Dashboard</a></li>
|
||||
<li><a href="<?php echo base_url()?>index.php/ps_screen">Screen</a></li>
|
||||
<li class="active"><?php echo $title;?></li>
|
||||
</ol>
|
||||
</section>
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"><?php echo $title; ?></h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<?php if(validation_errors()){ ?>
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4><i class="icon fa fa-ban"></i> Alert!</h4>
|
||||
<?php echo validation_errors() ?>
|
||||
</div>
|
||||
<?php }
|
||||
|
||||
$setdisabled ="";
|
||||
$setidedit ="";
|
||||
|
||||
if ($actionform=="prosesview"){
|
||||
$setdisabled="disabled=''";
|
||||
}
|
||||
|
||||
?>
|
||||
<form class="form-horizontal" id="form" action="<?php echo(base_url()); ?>index.php/ps_screen/<?php echo $actionform; ?>" method="post" autocomplete="off">
|
||||
<div class="box-body form-horizontal">
|
||||
<div class="box-body">
|
||||
<div class="box">
|
||||
<div class="box-body no-padding">
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th width="5%">No</th>
|
||||
<th>Nama Klinik</th>
|
||||
<th width="15%">Screen 1</th>
|
||||
<th width="15%">Screen 2</th>
|
||||
<th width="15%">Screen 3</th>
|
||||
</tr>
|
||||
<?php
|
||||
$no=0;
|
||||
foreach ($ms as $dataklinik){$no++;
|
||||
|
||||
|
||||
?>
|
||||
<input hidden="" id="idk<?php echo $no;?>" name="idk<?php echo $no;?>" value="<?php echo $dataklinik->mk_id;?>" />
|
||||
<tr>
|
||||
<td><?php echo $no;?></td>
|
||||
<td><?php echo $dataklinik->mk_nama;?></td>
|
||||
<td><input type="radio" name="sc<?php echo $no;?>" value="1" class="flat-red" <?php if($dataklinik->mk_screen==1){echo "checked";}else{echo $setdisabled;}?> /></td>
|
||||
<td><input type="radio" name="sc<?php echo $no;?>" value="2" class="flat-red" <?php if($dataklinik->mk_screen==2){echo "checked";}else{echo $setdisabled;}?> /></td>
|
||||
<td><input type="radio" name="sc<?php echo $no;?>" value="3" class="flat-red" <?php if($dataklinik->mk_screen==3){echo "checked";}else{echo $setdisabled;}?> /></td>
|
||||
</tr>
|
||||
<?php
|
||||
}$lastnumber = $no;
|
||||
|
||||
?>
|
||||
</table>
|
||||
<input hidden="" id="lastnumber" name="lastnumber" value="<?php echo $no;?>" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<a href="<?php echo base_url();?>index.php/ps_screen" class="btn btn-default">Cancel</a>
|
||||
<?php if ($actionform!="prosesview"){ ?>
|
||||
<button type="submit" class="btn btn-warning">Submit</button>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,82 @@
|
||||
<?php
|
||||
//---------------------start check access action-------------------//
|
||||
$editbutton="";
|
||||
$viewbutton="";
|
||||
if(!empty($this->varedit)){
|
||||
$editbutton="<a href='".base_url()."index.php/ps_screen/edit' class='btn btn-warning btn-sm'><i class='fa fa-edit'></i> Edit</a> ";
|
||||
}
|
||||
if(!empty($this->varview)){
|
||||
$viewbutton="<a href='".base_url()."index.php/ps_screen/view' class='btn btn-primary btn-sm'><i class='fa fa-eye'></i> View</a> ";
|
||||
}
|
||||
//---------------------end check access action-------------------//
|
||||
?>
|
||||
|
||||
<body class="hold-transition skin-blue sidebar-mini">
|
||||
<section class="content-header">
|
||||
<h1><small>
|
||||
<?php echo $viewbutton.$editbutton;?>
|
||||
</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="<?php echo base_url()?>index.php"><i class="fa fa-dashboard"></i> Dashboard</a></li>
|
||||
<li>Setting</li>
|
||||
<li class="active"><?php echo $title ?></li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"><?php echo $title ?></h3>
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<?php if($this->session->flashdata('message')){?>
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4> <i class="icon fa fa-check"></i> Alert!</h4>
|
||||
<?php echo $this->session->flashdata('message');?>
|
||||
</div>
|
||||
<?php }?>
|
||||
<div class="box-body table-responsive no-padding">
|
||||
<table id="example1" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5%">No</th>
|
||||
<th>Nama Screen</th>
|
||||
<th>Klinik</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$no=0;
|
||||
for($i=1;$i<=3;$i++){
|
||||
$appendklinik ="";
|
||||
foreach ($ms as $dataklinik) {
|
||||
if($dataklinik->mk_screen==$i){
|
||||
$appendklinik = $appendklinik."<code>$dataklinik->mk_nama | </code>";
|
||||
}
|
||||
}
|
||||
|
||||
$no++;
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $no;?></td>
|
||||
<td>Layar Screen <?php echo $i;?></td>
|
||||
<td><?php echo $appendklinik;?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</section>
|
||||
<div class="control-sidebar-bg"></div>
|
||||
</body>
|
||||
@@ -0,0 +1,217 @@
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<small></small>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="<?php echo base_url()?>index.php"><i class="fa fa-dashboard"></i> Dashboard</a></li>
|
||||
<li>Setting</li>
|
||||
<li><a href="<?php echo base_url()?>index.php/ps_userlogin">User Login</a></li>
|
||||
<li class="active"><?php echo $title;?></li>
|
||||
</ol>
|
||||
</section>
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"><?php echo $title; ?></h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<?php if(validation_errors()){ ?>
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4><i class="icon fa fa-ban"></i> Alert!</h4>
|
||||
<?php echo validation_errors() ?>
|
||||
</div>
|
||||
<?php }
|
||||
|
||||
$setdisabled ="";
|
||||
$setidedit ="";
|
||||
$setnama_lengkap ="";
|
||||
$setnama_user ="";
|
||||
$setpassword ="";
|
||||
$setklinik ="";
|
||||
$setloket ="";
|
||||
$settipeuser ="";
|
||||
|
||||
|
||||
if ($actionform=="prosesview"){
|
||||
$setdisabled="disabled=''";
|
||||
}
|
||||
if ($actionform!="prosesadd"){
|
||||
$setidedit =$ul->row('mu_id');
|
||||
$setnama_lengkap =$ul->row('mu_nama_lengkap');
|
||||
$setnama_user =$ul->row('mu_nama_user');
|
||||
$setpassword =$ul->row('mu_password');
|
||||
$setklinik =$ul->row('mu_klinik_id');
|
||||
$setloket =$ul->row('mu_loket_id');
|
||||
$settipeuser =$ul->row('mu_tipeuser_id');
|
||||
}
|
||||
|
||||
?>
|
||||
<form class="form-horizontal" id="form" action="<?php echo(base_url()); ?>index.php/ps_userlogin/<?php echo $actionform; ?>" method="post" autocomplete="off">
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="namalengkapuser" class="col-sm-2 control-label">Nama Lengkap</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="hidden" name="id" value="<?php echo $setidedit;?>"/>
|
||||
<input id="namalengkapuser" class="form-control" <?php echo $setdisabled; ?> name="namalengkapuser" type="text" placeholder="Masukan Nama Lengkap" autocomplete="off" value="<?php echo $setnama_lengkap;?>"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="namauser" class="col-sm-2 control-label">Nama User</label>
|
||||
<div class="col-sm-6">
|
||||
<input id="namauser" class="form-control" <?php echo $setdisabled; ?> name="namauser" type="text" placeholder="Masukan Nama User" autocomplete="off" value="<?php echo $setnama_user;?>"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
if($actionform!="prosesadd"){
|
||||
?>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="passworduser" class="col-sm-2 control-label">Password</label>
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group">
|
||||
<input disabled="" id="passworduser" class="form-control" name="passworduser" type="password" placeholder="Masukan Password" autocomplete="off" value=""/>
|
||||
<span class="input-group-addon">
|
||||
<input <?php echo $setdisabled; ?> id="setaktif" type="checkbox" onchange="aktif()" />
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<code>Ubah Password</code>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="passworduser" class="col-sm-2 control-label">Retype Password</label>
|
||||
<div class="col-sm-6">
|
||||
<input disabled="" id="repassworduser" class="form-control" <?php if($actionform!="prosesadd"){}?> name="repassworduser" type="password" placeholder="Masukan Retype Password" autocomplete="off" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function aktif(){
|
||||
if ($('#setaktif').is(":checked"))
|
||||
{
|
||||
$("#passworduser").prop('disabled', false);
|
||||
$("#repassworduser").prop('disabled', false);
|
||||
}else{
|
||||
document.getElementById('passworduser').value="";
|
||||
document.getElementById('repassworduser').value="";
|
||||
$("#passworduser").prop('disabled', true);
|
||||
$("#repassworduser").prop('disabled', true);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<?php }else{
|
||||
?>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="passworduser" class="col-sm-2 control-label">Password</label>
|
||||
<div class="col-sm-6">
|
||||
<input id="passworduser" class="form-control" name="passworduser" type="password" placeholder="Masukan Password" autocomplete="off" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="passworduser" class="col-sm-2 control-label">Retype Password</label>
|
||||
<div class="col-sm-6">
|
||||
<input id="repassworduser" class="form-control" name="repassworduser" type="password" placeholder="Masukan Retype Password" autocomplete="off" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}?>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="tipeuser" class="col-sm-2 control-label">Tipe User</label>
|
||||
<div class="col-sm-6">
|
||||
<select onchange="setbagian()" <?php echo $setdisabled; ?> id="tipeuser" name="tipeuser" class="form-control select" >
|
||||
<option value="">Pilih Tipe User</option>
|
||||
<?php
|
||||
foreach ($tu as $dat) {
|
||||
$select="";
|
||||
if($settipeuser==$dat->mt_id){$select="selected='selected'";}
|
||||
echo "<option value='".$dat->mt_id."'".$select.">".$dat->mt_nama."</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function setbagian(){
|
||||
var tipeuser = document.getElementById('tipeuser').value;
|
||||
if(tipeuser==3){
|
||||
document.getElementById('klinik').value="";
|
||||
$("#klinik").prop('disabled', true);
|
||||
$("#loket").prop('disabled', false);
|
||||
}else if(tipeuser==4){
|
||||
document.getElementById('loket').value="";
|
||||
$("#loket").prop('disabled', true);
|
||||
$("#klinik").prop('disabled', false);
|
||||
}else if(tipeuser==10){
|
||||
document.getElementById('klinik').value="";
|
||||
$("#klinik").prop('disabled', true);
|
||||
$("#loket").prop('disabled', false);
|
||||
}else{
|
||||
document.getElementById('klinik').value="";
|
||||
document.getElementById('loket').value="";
|
||||
$("#loket").prop('disabled', true);
|
||||
$("#klinik").prop('disabled', true);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="loket" class="col-sm-2 control-label">Loket</label>
|
||||
<div class="col-sm-6">
|
||||
<select <?php echo $setdisabled; if($settipeuser!=3 && $settipeuser!=7){echo "disabled=''";} ?> id="loket" name="loket" class="form-control select" >
|
||||
<option value="">Pilih Loket</option>
|
||||
<?php
|
||||
foreach ($ml as $datml) {
|
||||
$select="";
|
||||
if($setloket==$datml->ml_id){$select="selected='selected'";}
|
||||
echo "<option value='".$datml->ml_id."'".$select.">".$datml->ml_nama."</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="klinik" class="col-sm-2 control-label">Klinik</label>
|
||||
<div class="col-sm-6">
|
||||
<select <?php echo $setdisabled; if($settipeuser!=4){echo "disabled=''";}?> id="klinik" name="klinik" class="form-control select" >
|
||||
<option value="">Pilih Klinik</option>
|
||||
<?php
|
||||
foreach ($mk as $datmk) {
|
||||
$select="";
|
||||
if($setklinik==$datmk->mk_id){$select="selected='selected'";}
|
||||
echo "<option value='".$datmk->mk_id."'".$select.">".$datmk->mk_nama."</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<a href="<?php echo base_url();?>index.php/ps_userlogin" class="btn btn-default">Cancel</a>
|
||||
<?php if ($actionform!="prosesview"){ ?>
|
||||
<button type="submit" class="btn btn-warning">Submit</button>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,100 @@
|
||||
<body class="hold-transition skin-blue sidebar-mini">
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<?php
|
||||
//---------------------start check access action TAMBAH-------------------//
|
||||
if(!empty($this->vartambah)){ echo "<small> <a href='".base_url()."index.php/ps_userlogin/add' class='btn btn-block btn-primary btn-sm'>Tambah Baru</a> </small>";
|
||||
}else{ echo "<small></small>";}
|
||||
//---------------------end check access action TAMBAH-------------------//
|
||||
?>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="<?php echo base_url()?>index.php"><i class="fa fa-dashboard"></i> Dashboard</a></li>
|
||||
<li>Setting</li>
|
||||
<li class="active"><?php echo $title ?></li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"><?php echo $title ?></h3>
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<?php if($this->session->flashdata('message')){?>
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4> <i class="icon fa fa-check"></i> Alert!</h4>
|
||||
<?php echo $this->session->flashdata('message');?>
|
||||
</div>
|
||||
<?php }?>
|
||||
<div class="box-body table-responsive no-padding">
|
||||
<table id="example1" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5%">No</th>
|
||||
<th>Nama Lengkap</th>
|
||||
<th>Nama User</th>
|
||||
<th>Tipe User</th>
|
||||
<th>Ket</th>
|
||||
<th width="20%">Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$no=0;
|
||||
foreach ($ul as $userlogin) {
|
||||
if($userlogin->mu_tipeuser_id!="1"){
|
||||
$no++;
|
||||
//---------------------start check access action-------------------//
|
||||
$editbutton="";
|
||||
$edithakakses="";
|
||||
$deletebutton="";
|
||||
$viewbutton="";
|
||||
if(!empty($this->varedit)){
|
||||
$editbutton="<a href='".base_url()."index.php/ps_userlogin/edit/".$userlogin->mu_id."' class='btn btn-warning btn-xs'><i class='fa fa-edit'></i> Edit</a> ";
|
||||
}
|
||||
if(!empty($this->vardelete)){
|
||||
$deletebutton="<a onclick='del(".$userlogin->mu_id.")' class='btn btn-danger btn-xs'><i class='fa fa-trash'></i> Delete</a><input type='hidden' id='isi".$userlogin->mu_id."' value='".$userlogin->mu_nama_user."'> ";
|
||||
}
|
||||
if(!empty($this->varview)){
|
||||
$viewbutton="<a href='".base_url()."index.php/ps_userlogin/view/".$userlogin->mu_id."' class='btn btn-primary btn-xs'><i class='fa fa-eye'></i> View</a> ";
|
||||
}
|
||||
//---------------------end check access action-------------------//
|
||||
echo("
|
||||
<tr>
|
||||
<td>".$no."</td>
|
||||
<td>".$userlogin->mu_nama_lengkap."</td>
|
||||
<td>".$userlogin->mu_nama_user."</td>
|
||||
<td>".$userlogin->mt_nama."</td>
|
||||
<td>".$userlogin->mk_nama."".$userlogin->ml_nama."</td>
|
||||
<td>".$viewbutton.$editbutton.$deletebutton.$edithakakses."</td>
|
||||
</tr>
|
||||
");
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</section>
|
||||
<div class="control-sidebar-bg"></div>
|
||||
</body>
|
||||
<script type="text/javascript">
|
||||
var url="<?php echo base_url();?>";
|
||||
function del(id){
|
||||
var isi=document.getElementById('isi'+id).value;
|
||||
var r=confirm("Apakah anda ingin menghapus user "+isi+"?")
|
||||
if (r==true)
|
||||
window.location = url+"index.php/ps_userlogin/delete/"+id;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user