?
Current Path : /home1/savoy/public_html/savoyglobal.net/sec/application/views/student/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : /home1/savoy/public_html/savoyglobal.net/sec/application/views/student/single_student_batch.php |
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); ?> <div class="row-fluid"> <div class="tab-pane " id="tab_2"> <div class="portlet box blue"> <div class="portlet-title"> <div class="caption"><i class="icon-reorder"></i>Batch Allocation Details</div> <div class="tools"> <a href="#" onclick="viewdata('student','viewinstudentsearch','search_student_batch','view_student_batch','<?= $_SESSION['pagenum']; ?>')" class="remove"></a> </div> </div> <div class="portlet-body form"> <div class="form-horizontal form-view form-bordered"> <!-- BEGIN FORM--> <?php $attributes = array('id' => 'validateform', 'class' => 'form-horizontal validate'); $course = $this->mastermodel->get_data_srow('course', $viewinfo->course_id, 'course_id'); echo form_open('', $attributes); ?> <div class="row-fluid"> <div class="span6 "> <div class="control-group"> <label class="control-label">Batch Code</label> <div class="controls"> <span class="text bold"> <?= $viewinfo->batch_no; ?> </span> </div> </div> </div> <div class="span6"> <div class="control-group"> <label class="control-label">Course Name</label> <div class="controls"> <span class="text bold"> <?= $course->course_name ?> </span> </div> </div> </div> </div> <div class="row-fluid"> <div class="span6"> <div class="control-group"> <label class="control-label">Teacher</label> <div class="controls"> <span class="text bold"> <?php $teacher = $this->mastermodel->get_teacher_batch($viewinfo->batch_id, date("d-m-Y")); if (!empty($teacher)) echo $teacher->employee_name; ?> </span> </div> </div> </div> <div class="span6"> <div class="control-group"> <label class="control-label">Course Code</label> <div class="controls"> <span class="text bold"> <?= $course->course_code ?> </span> </div> </div> </div> </div> <div class="row-fluid"> <div class="span6"> <div class="control-group"> <label class="control-label">Batch Start date</label> <div class="controls"> <span class="text bold"> <?= $this->mastermodel->convertdatenormalformat($viewinfo->start_date) ?></span> </div> </div> </div> <div class="span6"> <div class="control-group"> <label class="control-label">Batch Timing</label> <div class="controls"> <span class="text bold"> <?= $viewinfo->start_time ?> - <?= $viewinfo->end_time ?></span> </div> </div> </div> </div> <div class="portlet box blue"> <div class="portlet-title"> <div class="caption"><i class="icon-check"></i>Student Details</div> </div> <div class="portlet-body"> <div class="row-fluid"> <div class="control-group"> <table class="table table-striped table-hover table-bordered" id="sample_3" style="background-color: white;"> <tr> <th width="10%"> Sl No </th> <th width="30">Student Name</th> <th width="10%">Student No</th> <th width="10%">Gender</th> <th width="10%">Nationality</th> <th width="10%">Status</th> <th width="15%">No of Sessions</th> <th width="10%">Batch Allocation Date</th> <th width="10%">Registration Fee</th> <th width="10%">Books Fee</th> <th width="15%">Recurring</th> <th width="10%">Course Fee / WEF Date</th> <th> Certificate Issued ?<br/> <input type="checkbox" name="selectall" id="selectall"/> </th> </tr> <?php $slno = 1; $active = count($batch_students) - (count($cancelled_student) + count($deactivate_student)); $slno1 = $active + 1; $slno2 = $active + count($cancelled_student) + 1; foreach ($batch_students as $student) { $scf = $this->studentmodel->get_student_current_course_fee($student['student_batch_id'], 1); if (!empty($scf)) { $wef_date = $this->mastermodel->convertdatenormalformat($scf->scf_wef_date); $course_amount = $scf->scf_course_fee; } else { $wef_date = date("d-m-Y"); $course_amount = $student['course_fee']; } if (in_array($student['student_id'], $cancelled_student)) { $status = 'Cancelled'; ?> <tr class="cancelled_tr"> <td><?= $slno2 ?></td> <td> <?= $student['first_name'] . ' ' . $student['last_name'] ?> </td> <td> <?= $student['reg_no'] ?> </td> <td> <?= $student['gender'] ?> </td> <td> <?= $student['nationality'] ?> </td> <td> <?= $status ?> </td> <td style="text-align: right;"><?= $student['no_sessions'] ?></td> <td> <?= $this->mastermodel->convertdatenormalformat($student['date']) ?> </td> <td style="text-align: right;"><?= number_format($student['registration_fee'], 2) ?></td> <td style="text-align: right;"><?= number_format($student['books_fee'], 2) ?></td> <td><input type="checkbox" disabled name="recurring" <?php if ($student['recurring'] == 1) { echo "checked"; } ?> /></td> <td style="text-align: right;"><?= number_format($course_amount, 2) ?> / <?=$wef_date;?></td> <td> <input type="checkbox" onclick="update_certificate_issue(this,'<?= $student['student_batch_id'] ?>')" <?= $student['certificate_issued'] == "1" ? "checked" : ""; ?> id="chk_certificate<?=$slno;?>" value="<?= $student['certificate_issued']; ?>" class="certificate_issued" /> <div style="position: absolute;margin: -19px 23px;"> </div> </td> </tr> <?php $slno2++; } elseif (in_array($student['student_id'], $deactivate_student)) { $status = 'Deactivated'; ?> <tr class="deactivated_tr"> <td><?= $slno1 ?></td> <td> <?= $student['first_name'] . $student['last_name'] ?> </td> <td> <?= $student['reg_no'] ?> </td> <td> <?= $student['gender'] ?> </td> <td> <?= $student['nationality'] ?> </td> <td> <?= $status ?> </td> <td style="text-align: right;"><?= $student['no_sessions'] ?></td> <td> <?= $this->mastermodel->convertdatenormalformat($student['date']) ?> </td> <td style="text-align: right;"><?= number_format($student['registration_fee'], 2) ?></td> <td style="text-align: right;"><?= number_format($student['books_fee'], 2) ?></td> <td><input type="checkbox" disabled name="recurring" <?php if ($student['recurring'] == 1) { echo "checked"; } ?> /></td> <td style="text-align: right;"><?= number_format($course_amount, 2) ?> / <?=$wef_date;?></td> <td> <input type="checkbox" onclick="update_certificate_issue(this,'<?= $student['student_batch_id'] ?>')" <?= $student['certificate_issued'] == "1" ? "checked" : ""; ?> id="chk_certificate<?=$i;?>" value="<?= $student['certificate_issued']; ?>" class="certificate_issued" /> <div style="position: absolute;margin: -19px 23px;"> </div> </td> </tr> <?php $slno1++; } else { $status = 'Active'; ?> <tbody> <tr> <td><?= $slno; ?></td> <td> <?= $student['first_name'] . ' ' . $student['last_name'] ?> </td> <td> <?= $student['reg_no'] ?> </td> <td> <?= $student['gender'] ?> </td> <td> <?= $student['nationality'] ?> </td> <td> <?= $status; ?> </td> <td style="text-align: right;"><?= $student['no_sessions'] ?></td> <td> <?= $this->mastermodel->convertdatenormalformat($student['date']) ?> </td> <td style="text-align: right;"><?= number_format($student['registration_fee'], 2) ?></td> <td style="text-align: right;"><?= number_format($student['books_fee'], 2) ?></td> <td><input type="checkbox" disabled name="recurring" <?php if ($student['recurring'] == 1) { echo "checked"; } ?> /></td> <td style="text-align: right;"><?= number_format($course_amount, 2) ?> / <?=$wef_date;?></td> <td> <input type="checkbox" onclick="update_certificate_issue(this,'<?= $student['student_batch_id'] ?>')" <?= $student['certificate_issued'] == "1" ? "checked" : ""; ?> id="chk_certificate<?=$slno;?>" class="certificate_issued" value='<?= $student['student_batch_id'] ?>' /> <div style="position: absolute;margin: -19px 23px;"> </div> </td> </tr> </tbody> <?php $slno++; } } ?> </table> </div> </div> </div> </div> <?php echo form_close(); ?> <!-- END FORM--> </div> </div> </div> </div> </div> <script> $(document).ready(function() { $('#selectall').click(function(event) { var checked=this.checked; $('.certificate_issued').each(function() { this.checked = checked; update_certificate_issue(this, this.value) }); }); }); function update_certificate_issue(obj,student_batch_id) { var issued = 0; var $checkbox = $(obj); issued = $checkbox.is(':checked') ? 1 : 0; var $td = $checkbox.closest('td'); $td.find('div:first').html("<img src='<?= base_url('assets/img/loading.gif') ?>' />"); $.ajax({ url : "<?= site_url('student/update_certificate_issue') ?>/" + student_batch_id + "/" + issued, success : function(data){ $td.find('div:first').empty(); } }); } </script>