| Current File : /www-data/newsites/adminpanel/application/views/gallery_view.php |
<div class="main-panel">
<div class="container">
<div class="page-inner">
<div class="page-header">
<h4 class="page-title">View Gallery</h4>
</div>
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header">
<div class="d-flex align-items-center">
<a href ="<?php echo base_url().'index.php/Gallery/galleryadd'?>" class="btn btn-primary btn-round ml-auto" style="color:#fff !important;">
<i class="fa fa-plus"></i>
Add Gallery
</a>
</div>
</div>
<div class="card-body">
<!-- view Modal Start-->
<div class="modal fade" id="ViewRowModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header border-0">
<h5 class="modal-title">
<span class="fw-mediumbold" style="color:#000 !important;">
View Gallery</span>
</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body" id="viewdata">
<!-- Ajax Data display here in id tabledata-->
</div>
<div class="modal-footer border-0">
<button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!--view End -->
<div id="del_success"><center><span style="color:green" ><h2>
<?php if($this->session->flashdata('success')){
echo $this->session->flashdata('success');
}?></h2></span></center></div>
<div class="table-responsive">
<table id="add-row" class="display table table-striped table-hover" >
<thead>
<tr>
<th>S.No</th>
<th>Host Name</th>
<th>Caption</th>
<th>Image</th>
<th>Active</th>
<th style="width: 10%">Action</th>
</tr>
</thead>
<tbody id="">
<?php
if($usersdata1){
foreach ($usersdata1 as $users_data)
{
?>
<tr class="row<?php echo $users_data['id'];?>">
<td><?php echo $users_data['sno'];?></td>
<td><?php echo $users_data['host_name'];?></td>
<td><?php echo $users_data['caption'];?></td>
<td><img style="width:30px;height:30px;" src="<?php echo base_url();?>assets/images/<?php echo $users_data['image'];?>"></td>
<td><?php echo $users_data['active'];?></td>
<td>
<div class="form-button-action">
<!--<button type="button" data-toggle="modal" id="view_<?php echo $users_data['id'];?>" name="view_<?php echo $users_data['id'];?>" onclick="viewuser('<?php echo $users_data['id'];?>')" data-target="#ViewRowModal" title="" class="btn-link btn-primary " data-original-title="View User">
<i class="fa fa-eye"></i>
</button>-->
<a href ="<?php echo base_url().'index.php/Gallery/galleryedit/'?><?php echo $users_data['id'];?>" class="btn-link btn-primary " >
<i class="fa fa-edit"></i>
</a>
<button type="button" data-toggle="tooltip" title="" class="btn-link btn-danger" onclick="javascript:gallery_delete('<?php echo $users_data['id'];?>')" data-original-title="Remove">
<i class="fa fa-times"></i>
</button>
</div>
</td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
function viewuser(id)
{
$.ajax({
type: "POST",
url: '<?php echo base_url().'index.php/Websites/viewwebsiteajaxdata';?>',
data: {'userid':id},
success: function(result) {
//alert(result);
$('#viewdata').html(result);
}
});
}
</script>
<style>
.form-group-default {
border:none !important;
}
</style>
<script>
function gallery_delete(id){
//alert(id);
$.ajax({
type : "POST",
url : "<?php echo site_url('Gallery/gallery_delete')?>",
dataType : "JSON",
data : {id:id},
success: function(data){
$('#del_success').html('<center><span style="color:green" ><h2>Gallery Deleted Successfully</h2></span></center>');
$(".row"+id).hide(2000);
}
});
}
</script>