154 lines
4.5 KiB
PHP
154 lines
4.5 KiB
PHP
|
|
<main class="wraper responsive-width" id="main">
|
|
<div class="from-group adding-class form-group_lng form-group_full-width ">
|
|
<a href="<?php echo base_url() . 'admin/ae-section/0' ?>"><button type="button" class="btn btn-success btn-sm">Add New Section</button></a>
|
|
</div>
|
|
<!----admin template section---->
|
|
<div class="admin_tempblock form-group_full-width">
|
|
<div class="admin_tempsec">
|
|
<div class="admin_sec">
|
|
<form>
|
|
<div class="subsec_sec ">
|
|
<div class="subject_r subject_r_lng">
|
|
<div class="subject_lsec">
|
|
<div class="subject_lhead">Sections List</div>
|
|
|
|
<?php if($this->session->flashdata('success')) { ?>
|
|
|
|
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
|
<p><?php echo $this->session->flashdata('success') ?></p>
|
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
</div>
|
|
|
|
<?php } ?>
|
|
|
|
<?php if($this->session->flashdata('failed')) { ?>
|
|
|
|
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
|
<p><?php echo $this->session->flashdata('failed') ?></p>
|
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
</div>
|
|
|
|
<?php } ?>
|
|
|
|
|
|
</div>
|
|
<div class="">
|
|
<table id="tbl" class="display table-responsive">
|
|
<thead>
|
|
<tr>
|
|
<th>Sl.No</th>
|
|
<th>Section</th>
|
|
<th>Is Active</th>
|
|
<th>Created On</th>
|
|
<th>Modified On</th>
|
|
<th class="textCenter">Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
|
|
foreach($result as $key => $value) {
|
|
$createdDate = date(MY_DATE_FORMAT, strtotime($value['created']));
|
|
$modifiedDate = date(MY_DATE_FORMAT, strtotime($value['modified']));
|
|
|
|
?>
|
|
<tr>
|
|
<td><?php echo $key + 1 ?></td>
|
|
<td><?php echo ucfirst($value['section_name']) ?></td>
|
|
<td><?php echo ucfirst($value['is_active']) ?></td>
|
|
<td><?php echo $createdDate ?></td>
|
|
<td><?php echo $modifiedDate ?></td>
|
|
<td>
|
|
<div class="sub_tabbtnsec">
|
|
<div class="sub_editbtn"><a href="<?php echo base_url() ?>admin/ae-section/<?php echo $value['id'] ?>"><i class="fas fa-pencil-alt"></i></a></div>
|
|
|
|
|
|
<a data-toggle="modal" onclick = "coursedel(<?php echo $value['id'] ?>)" href="#deleteModal">
|
|
<div class="sub_delbtn" >
|
|
<i class="fa fa-trash" aria-hidden="true"></i>
|
|
</div>
|
|
</a>
|
|
</div>
|
|
</td>
|
|
|
|
</tr>
|
|
<?php } ?>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!----admin template section end---->
|
|
</main>
|
|
<!--End right-top side-->
|
|
|
|
<div class="viewDoc delete-modal-wrap">
|
|
<div class="modal fade" id="deleteModal" role="dialog">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
<div class="delete-modal">
|
|
|
|
<i class="far fa-times-circle"></i>
|
|
<input type = "hidden" id = "btid" />
|
|
<h4>Are you sure?</h4>
|
|
<p>Are you sure you want to delete this Section?</p>
|
|
<div class="delete-modal-btn">
|
|
|
|
<a onclick="deletedata($('#btid').val());" class="text-white subject_addbtn subject_addbtn_red">Delete</a>
|
|
<button type="button" class="subject_addbtn subject_addbtn_cancel" data-dismiss="modal">Cancel</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script>
|
|
$(document).ready(function(){
|
|
$('.user-drpdown').click(function(){
|
|
$('.drpdown-items').toggle();
|
|
});
|
|
|
|
|
|
//table js
|
|
$('#tbl').DataTable( {
|
|
"lengthMenu": [[50, 75, 100, -1],
|
|
[50, 75, 100, "All"]]
|
|
} );
|
|
//table js end
|
|
//multiple select js start
|
|
$('select').selectpicker();
|
|
//multiple select js end
|
|
});
|
|
|
|
</script>
|
|
|
|
<script type="text/javascript">
|
|
function coursedel(icn){
|
|
// alert(icn);
|
|
$('#btid').val(icn);
|
|
}
|
|
function deletedata(id){
|
|
let url = window.location.pathname.split( '/' );
|
|
let postUrl = url[1] +'/'+ url[2];
|
|
// console.log('admin/delete-section/'+postUrl + id);
|
|
window.location.replace('<?php echo base_url() ?>' + 'admin/delete-section/' + id);
|
|
}
|
|
</script>
|
|
|