BBnepal-Accounts/application/views/admin/classroom-students.php
Sampanna Rimal 9cd05ef3cb commitall
2024-07-10 18:28:19 +05:45

178 lines
8.7 KiB
PHP

<div class="wraper responsive-width">
<main class="long-tbl-main students_list_table" id="main">
<div class="from-group adding-class form-group_lng form_group_twobtn">
<a href="<?php echo base_url(); ?>admin/classroom"><button type="button" class="btn btn-success btn-sm btn-dark">Back</button></a>
<a href="<?php echo base_url(); ?>admin/students_notassign/<?php echo $class_id; ?>/<?php echo $course_id; ?>"><button type="button" class="btn btn-success btn-sm">Assign students</button></a>
</div>
<!-- admin template section -->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<form>
<div class="subsec_sec">
<div class="subject_r">
<div class="subject_lsec">
<div class="subject_lhead">Manage Student</div>
<!-- tab added -->
<div class="top-filter">
<div class="filter_lbl">
<i class="fas fa-filter"></i>
Filter
</div>
<div class="date-filter">
<div class="date-fil-row">
<label>Start date</label>
<input type="date" name="dd/mm/yy" class="form-control">
</div>
<div class="date-fil-row">
<label>End date</label>
<input type="date" name="dd/mm/yy" class="form-control">
</div>
</div>
<div class="filter-reset">
<button type="button" id="filter_reset" class="subject_addbtn subject_addbtn_nobg"><i class="fas fa-redo"></i>Reset Filters</button>
</div>
</div>
<div class="applicnts-list-wrap ">
<div class=" ">
<table id="tbl1" class="display table-responsive">
<thead>
<tr>
<th>S.No.</th>
<th>StudentId</th>
<th>Photo</th>
<th>Name of Student</th>
<th>Contact No.</th>
<th>Course</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php $i = 0;
foreach ($students as $s) { ?>
<tr>
<td><?php echo ++$i; ?></td>
<td><?= $s['studentId']; ?></td>
<td>
<img src="<?= base_url(); ?>assets_student/application/<?= $s['photo']; ?>" class="student_img_list">
</td>
<td>
<div class="applicant_nme"><?= $s['name']; ?></div>
</td>
<td><?= $s['mobile']; ?></td>
<td><?= $s['course_name']; ?></td>
<td>
<div class="sub_tabbtnsec stud_tabbtnsec">
<div class="sub_viewbtn" title="View">
<a href="<?php echo base_url(); ?>Admin/view_classstudent/<?php echo $s['id']; ?>">
<i class="fa fa-eye" aria-hidden="true"></i>
</div>
<a data-toggle="modal" onclick="subdel(<?php echo $s['id']; ?>)" href="#deleteModal">
<div class="sub_delbtn" title="Remove"><i class="fas fa-times-circle"></i></div>
</a>
</div>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<!-- admin template section end -->
</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="text" id="sdid" />
<h4>Are you sure?</h4>
<p>Are you sure you want to delete this item?</p>
<div class="delete-modal-btn">
<button type="button" class="subject_addbtn subject_addbtn_red" onclick="removestudent($('#sdid').val(), 'students');">Delete</button>
<button type="button" class="subject_addbtn subject_addbtn_cancel" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
function subdel(icn) {
// alert(icn);
$('#sdid').val(icn);
}
$(document).ready(function() {
$('.user-drpdown').click(function() {
$('.drpdown-items').toggle();
});
//table js
$('#tbl1').DataTable({
"lengthMenu": [
[5, 10, 25, 50, -1],
[5, 10, 25, 50, "All"]
]
});
$('#tbl2').DataTable({
"lengthMenu": [
[5, 10, 25, 50, -1],
[5, 10, 25, 50, "All"]
]
});
$('#tbl3').DataTable({
"lengthMenu": [
[5, 10, 25, 50, -1],
[5, 10, 25, 50, "All"]
]
});
//table js end
//multiple select js start
$('select').selectpicker();
//multiple select js end
});
function removestudent(id, table) {
$('#deleteModal').modal('hide');
$.ajax({
type: 'POST',
url: "<?php echo base_url(); ?>Admin/remove_student",
data: {
id: id,
table: table
},
success: function(resposne) {
if (resposne == '1') {
// $('#success').html('Data deleted successfully.');
// setTimeout(function() {
location.reload();
// }, 3000);
}
}
});
}
</script>
</body>
</html>