BBnepal-Accounts/hr/application/views/bustracking-admin/students.php

164 lines
7.0 KiB
PHP
Raw Normal View History

2024-07-10 12:43:19 +00:00
<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>assets-bustracking/css/style-drivers.css">
<main class="common_margin" id="main">
<div class="row dash-main-row deleted-row">
<div class="col-md-12 col-lg-12 p-0">
<div class="block-head student-block-head">
<h3 class="student-tab-head">Students</h3>
</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">&times;</span>
</button>
</div>
<?php } ?>
<?php if($this->session->flashdata('danger')) { ?>
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<p><?php echo $this->session->flashdata('danger') ?></p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<table id="tbl" class="table dash-table">
<thead>
<tr>
<th scope="col" class="dash-th">SI.No</th>
<th scope="col" class="dash-th rooms-th">Student ID</th>
<th scope="col" class="dash-th rooms-th">Student Name</th>
<th scope="col" class="dash-th rooms-th">Stop Name</th>
<th scope="col" class="dash-th rooms-th">Class</th>
<th scope="col" class="dash-th rooms-th">Contact number</th>
<th scope="col" class="dash-th-action">Actions</th>
</tr>
</thead>
<tbody>
<?php
if (isset($student_list) && !empty($student_list)) {
$i=1;
foreach ($student_list as $key => $value) { ?>
<tr>
<td class="rooms-td"><?php echo $i ?></td>
<td class="rooms-td"><?php echo $value['student_id'] ?></td>
<td class="rooms-td"><?php echo $value['student_name'] ?></td>
<td class="rooms-td"><?php echo $value['stop_name'] ?></td>
<td class="rooms-td"><?php echo $value['class_name'] ?></td>
<td class="rooms-td"><?php echo $value['contact_no'] ?></td>
<td class="preview-img">
<div class="sub_tabbtnsec">
<a href="<?php echo base_url()?>students/view/<?php echo $value['id']; ?>">
<div class="sub_viewbtn" title="View">
<i class="fa fa-eye" aria-hidden="true"></i>
</div>
</a>
<a href="<?php echo base_url()?>students/update/<?php echo $value['id']; ?>">
<div class="sub_editbtn">
<i class="fas fa-pencil-alt"></i>
</div>
</a>
<!-- <a data-toggle="modal" onclick = "busdel(<?php echo $value['id']; ?>)" href="#deleteModal">
<div class="sub_delbtn">
<i class="fa fa-trash" aria-hidden="true"></i>
</div>
</a> -->
</div>
</tr>
<?php $i++; }
}else{ ?>
<tr>
<td colspan="7" class="text-center"> No Data Found</td>
</tr>
<?php }
?>
</tbody>
</table>
</div>
</div>
</main>
<!--End right-top side-->
</div>
<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">&times;</button>
<div class="delete-modal">
<i class="far fa-times-circle"></i>
<input type = "hidden" id = "thid" />
<h4>Are you sure?</h4>
<p>You want to delete this item?</p>
<div class="delete-modal-btn">
<button type="button" class="subject_addbtn subject_addbtn_red" onclick="deletedata($('#thid').val(), 'bt_students_bus_route_details');">Delete</button>
<button type="button" class="subject_addbtn subject_addbtn_cancel" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- <script>
function busdel(icn){
//alert(icn);
$('#thid').val(icn);
}
function deletedata(id, table){
$(".alert-dismissible").hide();
$.ajax({
type : 'POST',
url : "<?php echo base_url(); ?>delete-Student",
data : {id : id, table : table},
success:function(resposne){
if(resposne == '1'){
window.location.href = "<?php echo base_url(); ?>BustrackingAdmin/student_list/1";
}else if(resposne == '0'){
window.location.href = "<?php echo base_url(); ?>BustrackingAdmin/student_list/0";
}
}
});
}
</script> -->
<script src="<?php echo base_url();?>assets-bustracking/js/jquery-3.4.1.min.js" ></script>
<script src="<?php echo base_url();?>assets-bustracking/js/bootstrap.min.js"></script>
<script src="<?php echo base_url();?>assets-bustracking/js/jquery-3.4.1.min.js" ></script>
<script src="<?php echo base_url();?>assets-bustracking/js/popper.min.js"></script>
<script src="<?php echo base_url();?>assets-bustracking/js/bootstrap.min.js"></script>
<script defer src="<?php echo base_url();?>assets-bustracking/js/all.js"></script>
<script defer src="<?php echo base_url();?>assets-bustracking/js/main.js"></script>
<script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.1/js/bootstrap-select.min.js"></script>
<script>
$(document).ready(function(){
$('.user-drpdown').click(function(){
$('.drpdown-items').toggle();
});
});
//table js
$('#tbl').DataTable( {
"lengthMenu": [[5,10, 25, 50, -1], [5,10, 25, 50, "All"]]
} );
//table js end
</script>
<script>
function goBack() {
window.history.back();
}
</script>
</body>
</html>