add rssa-pintar to git
This commit is contained in:
@@ -0,0 +1,126 @@
|
||||
<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_pasien/add' class='btn btn-block bg-blue 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>Master</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 box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title info-box-number"><?php echo $title ?></h3>
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<?php if($this->session->flashdata('message')){?>
|
||||
<div id="mydivs" 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>
|
||||
<script>
|
||||
setTimeout(function() {
|
||||
$('#mydivs').hide('fast');
|
||||
}, 5000);
|
||||
</script>
|
||||
<?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</th>
|
||||
<th>Nama User</th>
|
||||
<th>NIK</th>
|
||||
<th>Telp</th>
|
||||
<th>Status</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$no=0;
|
||||
foreach ($ps as $pasien) {
|
||||
$no++;
|
||||
//---------------------start check access action-------------------//
|
||||
$editbutton ="";
|
||||
$edithakakses ="";
|
||||
$viewbutton ="";
|
||||
$disabledbutton ="";
|
||||
$aktifbutton ="";
|
||||
|
||||
if(!empty($this->varedit)){
|
||||
$editbutton="<a href='".base_url()."index.php/ps_pasien/edit/".$pasien->mu_id."' class='btn btn-warning btn-xs'><i class='fa fa-edit'></i> Edit</a> ";
|
||||
}
|
||||
if(!empty($this->varview)){
|
||||
$viewbutton="<a href='".base_url()."index.php/ps_pasien/view/".$pasien->mu_id."' class='btn btn-primary btn-xs'><i class='fa fa-eye'></i> View</a> ";
|
||||
}
|
||||
|
||||
$setstatus = "<span class='badge bg-green'> Active</span>";
|
||||
if($pasien->mu_status==0){
|
||||
$setstatus = "<span class='badge bg-red'> Disabled</span>";
|
||||
if(!empty($this->varedit)){
|
||||
$aktifbutton="<a onclick='aktif(".$pasien->mu_id.")' class='btn btn-success btn-xs'><i class='fa fa-check-square-o'></i> On</a><input type='hidden' id='isi".$pasien->mu_id."' value='".$pasien->mu_nama_lengkap."'> ";
|
||||
}
|
||||
}else{
|
||||
if(!empty($this->varedit)){
|
||||
$disabledbutton="<a onclick='disabled(".$pasien->mu_id.")' class='btn btn-danger btn-xs'><i class='fa fa-ban'></i> Off</a><input type='hidden' id='isi".$pasien->mu_id."' value='".$pasien->mu_nama_lengkap."'> ";
|
||||
}
|
||||
}
|
||||
//---------------------end check access action-------------------//
|
||||
echo("
|
||||
<tr>
|
||||
<td>".$no."</td>
|
||||
<td>".$pasien->mu_nama_lengkap."</td>
|
||||
<td>".$pasien->mu_nama_user."</td>
|
||||
<td>".$pasien->mu_NIK."</td>
|
||||
<td>".$pasien->mu_telepon_1."</td>
|
||||
<td style='text-align: center;'>".$setstatus."</td>
|
||||
<td>".$viewbutton.$editbutton.$disabledbutton.$aktifbutton.$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 disabled(id){
|
||||
var isi=document.getElementById('isi'+id).value;
|
||||
var r=confirm("Apakah anda ingin disabled Pasien "+isi+"?")
|
||||
if (r==true)
|
||||
window.location = url+"index.php/ps_pasien/disabled/"+id;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
function aktif(id){
|
||||
var isi=document.getElementById('isi'+id).value;
|
||||
var r=confirm("Apakah anda ingin aktifkan Pasien "+isi+"?")
|
||||
if (r==true)
|
||||
window.location = url+"index.php/ps_pasien/aktif/"+id;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user