?
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_attendance.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>Attendance Details</div> <div class="tools"> <a href="#" onclick="viewdata('student','viewinstudentsearch','search_attendance','view_attendance','<?= $_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'); echo form_open('student/addinstudent/update_attendance/view_attendance/1', $attributes); $start_time = explode(":", $viewinfo->start_time); $end_time = explode(":", $viewinfo->end_time); $batch_details = $this->mastermodel->get_data_srow('batch', $viewinfo->batch_id, 'batch_id'); ?> <div class="row-fluid"> <div class="span6 "> <div class="control-group"> <label class="control-label">Attendance Date</label> <div class="controls"> <span class="text bold"><?= $this->mastermodel->convertdatenormalformat($viewinfo->attendance_date) ?></span> </div> </div> </div> <div class="span6 "> <div class="control-group"> <label class="control-label">Batch Code / Name </label> <div class="controls"> <span class="text bold"> <?= $batch_details->batch_no; ?> </span> </div> </div> </div> </div> <div class="row-fluid"> <div class="span6 "> <div class="control-group"> <label class="control-label">Course Name</label> <div class="controls" id="course_name"> <span class="text bold"> <?= $this->mastermodel->get_single_field_value('course', 'course_name', 'course_id', $batch_details->course_id); ?> </span> </div> </div> </div> <div class="span6 "> <div class="control-group"> <label class="control-label">Teacher Name</label> <div class="controls"><span class="text bold"> <?= $this->mastermodel->get_single_field_value('employee', 'employee_name', 'employee_id', $viewinfo->teacher_id); ?> </span> </div> </div> </div> </div> <div class="row-fluid"> <div class="span6 "> <div class="control-group"> <label class="control-label">Start Time</label> <div class="controls"><span class="text bold"> <?= str_pad(number_format($start_time[0], 0), 2, '0', STR_PAD_LEFT) . " : " . str_pad(number_format($start_time[1], 0), 2, '0', STR_PAD_LEFT) ?> </span> </div> </div> </div> <div class="span6 "> <div class="control-group"> <label class="control-label">End Time</label> <div class="controls"><span class="text bold"> <?= str_pad(number_format($end_time[0], 0), 2, '0', STR_PAD_LEFT) . " : " . str_pad(number_format($end_time[1], 0), 2, '0', STR_PAD_LEFT) ?> </span> </div> </div> </div> </div> <div class="row-fluid"> <div class="span6 "> <div class="control-group"> <label class="control-label">Class Room</label> <div class="controls" id="class_code"><span class="text bold"> <?= $this->mastermodel->get_single_field_value('class', 'class_name', 'class_id', $viewinfo->class_id); ?> </span> </div> </div> </div> <div class="span6 "> <div class="control-group"> <label class="control-label">Subject</label> <div class="controls"><span class="text bold"> <?=$this->mastermodel->get_single_field_value('subject','subject_name','subject_id',$viewinfo->subject_id);?> </span> </div> </div> </div> </div> <div class="row-fluid"> <div class="span6 "> <div class="control-group"> <label class="control-label">Remarks</label> <div class="controls"> <span class="text bold"> <?= $viewinfo->remarks ?> </span> </div> </div> </div> </div> <div class="portlet box blue"> <div class="portlet-title"> <div class="caption"><i class="icon-check"></i>Attendance 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="stud_sub" style="background-color: white;"> <thead id="stud_sub_head"> <tr> <td style="text-align: center;height: 30px;">Sl no</td> <td style="text-align: center;">Student Name</td> <td style="text-align: center;" >Student No</td> <td style="text-align: center;" >Gender</td> <td style="text-align: center;" >Nationality</td> <td style="text-align: center;" >Attended Sessions</td> <td style="text-align: center;" >Attendance</td> <td style="text-align: center;">Remarks</td> </tr> <tr> <td colspan="6"> </td> <td style="text-align: center;">P/A (mark absent)</td> <td style="text-align: center;"></td> </tr> </thead> <tbody > <?php $html = ""; $students = $this->mastermodel->get_data('attendance_details', $viewinfo->attendance_id, 'attendance_id'); $j = 1; $k = 0; $l = 1; foreach ($students as $list) { $student_details = $this->mastermodel->get_student_batch($list['student_id'], $viewinfo->batch_id); $deactivate = $this->studentmodel->check_deactivate($viewinfo->batch_id, $list['student_id'], $viewinfo->attendance_date); $attended = $this->mastermodel->get_count_attended_class($list['student_id'], $viewinfo->batch_id); if ($deactivate > 0) { $sl = count($students) - $k; $html = '<tr> <input type="hidden" name="student_id_' . $j . '" value="' . $list['student_id'] . '"/> <td style="text-align: center;height: 30px;">' . $sl . '</td> <td>' . $student_details->first_name . " " . $student_details->last_name . ' </td> <td> ' . $student_details->reg_no . '</td> <td>' . $student_details->gender . '</td> <td>' . $student_details->nationality . '</td> <td>' . $attended . '/' . $student_details->no_sessions . '</td> <td style="text-align: center;"><input type="hidden" name="attendance' . $j . '" value="deactivate" />D</td> <td style="text-align: center;">' . $list['remarks'] . '</td> </tr>' . $html; $k++; } else { $sl = $l; ?> <tr> <input type="hidden" name="student_id_<?= $j ?>" value="<?= $list['student_id'] ?>" /> <td style="text-align: center;width: 120px;height: 30px;"><?= $l ?></td> <td><?= $student_details->first_name . " " . $student_details->last_name ?></td> <td><?= $student_details->reg_no; ?></td> <td><?= $student_details->gender; ?></td> <td><?= $student_details->nationality; ?></td> <td <?php if ($attended >= $student_details->no_sessions) {echo "style = 'color:red'";} ?>> <?= $attended . '/' . $student_details->no_sessions ?> </td> <td style="text-align: center;"> <?php if ($list['attendance'] == 1) echo "A"; else if ($list['attendance'] == 2) echo "D"; else if ($list['attendance'] == 3) echo "U"; else echo "P"; ?> </td> <td style="text-align: center;"><?= $list['remarks'] ?></td> </tr> <?php $l++; } $j++; } echo $html; ?> </tbody> </table> </div> </div> </div> </div> <?php echo form_close(); ?> <!-- END FORM--> </div> </div> </div> </div> </div>