Files
2025-10-17 13:38:25 +07:00

103 lines
6.1 KiB
PHP

<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_jadwaldokter/add/0/0' 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 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">&times;</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>Bulan</th>
<th>Tahun</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
<?php
$no=0; $cekbulan=""; $cekdokter="";
foreach ($jd as $data) {
$bulan = date("m", strtotime($data->pjd_date));
$tahun = date("Y", strtotime($data->pjd_date));
if($bulan=="01"){$blnindo = "Januari";}
else if($bulan=="02"){$blnindo = "Februari";}
else if($bulan=="03"){$blnindo = "Maret";}
else if($bulan=="04"){$blnindo = "April";}
else if($bulan=="05"){$blnindo = "Mei";}
else if($bulan=="06"){$blnindo = "Juni";}
else if($bulan=="07"){$blnindo = "Juli";}
else if($bulan=="08"){$blnindo = "Agustus";}
else if($bulan=="09"){$blnindo = "September";}
else if($bulan=="10"){$blnindo = "Oktober";}
else if($bulan=="11"){$blnindo = "November";}
else if($bulan=="12"){$blnindo = "Desember";}
//---------------------start check access action-------------------//
$editbutton ="";
$viewbutton ="";
if(!empty($this->varedit)){
$editbutton="<a href='".base_url()."index.php/ps_jadwaldokter/edit/".$bulan."/".$tahun."' 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_jadwaldokter/view/".$bulan."/".$tahun."' class='btn btn-primary btn-xs'><i class='fa fa-eye'></i> View</a> ";
}
//---------------------end check access action-------------------//
if($cekbulan!=$bulan){ $cekbulan=$bulan;$no++;
echo("
<tr>
<td>".$no."</td>
<td>".$blnindo."</td>
<td>".$tahun."</td>
<td>".$viewbutton.$editbutton."</td>
</tr>
");
}else{
}
}
?>
</tbody>
</table>
</div>
</div><!-- /.box-body -->
</div><!-- /.box -->
</div><!-- /.col -->
</div><!-- /.row -->
</section>
<div class="control-sidebar-bg"></div>
</body>