136 lines
5.0 KiB
PHP
Executable File

<?php defined('BASEPATH') or exit('No direct script access allowed');
?>
<!--sidebar end-->
<!--main content start-->
<!-- <div class="app-content content">
<section class="content-wrapper"> -->
<div class="app-content content">
<section class="content-wrapper">
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-header">
<div class="row">
<div class="col-md-6">
<h3 class="font-weight-bold"><?php echo lang('List'); ?></h3>
</div>
<!-- <div class="col-md-6 no-print pull-right">
<a href="<?php echo base_url();?>website_settings/addContent" >
<div class="btn-group float-right">
<button id="" class="btn btn-info btn-min-width mr-1 mb-1">
<i class="fa fa-plus-circle"></i> <?php echo lang('add_new'); ?>
</button>
</div>
</a>
</div> -->
</div>
</div>
<hr class="mt-0 mb-0" />
<div class="card-content collapse show">
<div class="card-body card-dashboard">
<div class="panel-body">
<div class="adv-table editable-table ">
<div class="space15"></div>
<table class="table table-striped table-bordered dom-jQuery-events" id="editable-sample" cellspacing="0" width="100%">
<thead>
<tr>
<th>Sl.no</th>
<th>Heading</th>
<th>Description</th>
<th>Image</th>
<th class="no-print w-10">Actions</th>
</tr>
</thead>
<tbody>
<?php
$i=1;
foreach ($specialities as $spe) { ?>
<tr>
<td><?=$i?></td>
<td><?=$spe->heading?></td>
<td><?=$spe->description?></td>
<td>
<?php if($spe->image!=""){ ?>
<img src="<?php echo base_url().$spe->image; ?>" class="img-fluid" width="200px;">
<?php } ?>
</td>
<td class="w-10">
<a class="btn btn-primary" href="<?php echo base_url(); ?>website_settings/addSpecialities?id=<?=$spe->id?>" ><i class="la la-edit"></i>Edit </a>
</td>
</tr>
<?php $i++; } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
<!-- </section>
</div> -->
<!--main content end-->
<!--footer start-->
<script>
$(document).ready(function () {
$('#editable-sample').DataTable();
});
</script>
<?php
if(isset($_SESSION['msg_success']))
{
?>
<script>
$(function(){
Swal.fire({
position: 'center',
icon: 'success',
title: '<?=$_SESSION['msg_success']?>',
showConfirmButton: false,
timer: 2000
})
})
</script>
<?php
// session_destroy($_SESSION['msg_success']);
unset($_SESSION['msg_success']);
}
?>
<?php
if(isset($_SESSION['msg_error']))
{
?>
<script>
$(function(){
Swal.fire({
position: 'center',
icon: 'error',
title: '<?=$_SESSION['msg_error']?>',
showConfirmButton: false,
timer: 2000
})
})
</script>
<?php
// session_destroy($_SESSION['msg_error']);
unset($_SESSION['msg_error']);
}
?>