159 lines
6.3 KiB
PHP
Executable File
159 lines
6.3 KiB
PHP
Executable File
<?php defined('BASEPATH') or exit('No direct script access allowed');
|
|
?>
|
|
<!--sidebar end-->
|
|
<!--main content start-->
|
|
<?php
|
|
if(get_cookie('pref_language')){
|
|
$lan=get_cookie('pref_language');
|
|
}else{
|
|
$lan="english";
|
|
}
|
|
?>
|
|
<style type="text/css">
|
|
/*.css-truncate{white-space:nowrap;width:200px;overflow: hidden;text-overflow: ellipsis;}*/
|
|
.css-truncate{display: -webkit-box;max-width: 250px;-webkit-line-clamp: 2;-webkit-box-orient: vertical;overflow: hidden;}
|
|
</style>
|
|
<!-- <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>Sub Heading</th>
|
|
<th>Description</th>
|
|
<th>Image</th>
|
|
<th class="no-print" style="width: 30%;">Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
$i=1;
|
|
foreach ($content as $con)
|
|
{
|
|
$descrip=json_decode($con->description,true);
|
|
?>
|
|
<tr>
|
|
<td class="w-10"><?=$i?></td>
|
|
<td class="w-15"><?=$con->heading?></td>
|
|
<td class="w-15"><?=$con->sub_heading?></td>
|
|
<td class="w-40">
|
|
<div class="css-truncate">
|
|
<small class="css-truncate">
|
|
<?php echo $descrip[$lan];?>
|
|
</small>
|
|
</div>
|
|
</td>
|
|
<td class="w-10">
|
|
<?php if($con->image!=""){ ?>
|
|
<img src="<?php echo base_url().$con->image; ?>" class="img-fluid" width="200px;">
|
|
<?php } ?>
|
|
</td>
|
|
<td class="w-10">
|
|
<a class="btn btn-primary" href="<?php echo base_url(); ?>website_settings/addContent?id=<?=$con->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
|
|
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
|
|
unset($_SESSION['msg_error']);
|
|
}
|
|
?>
|
|
|