| Class | Department | Student Type | Section | Total Stuednt | Preseant | Absent | Late | Leave | ' ; $table_name=" _atd_daily_status_class"; $column="*"; $where_cond='_atd_status = 1 && DATE(_entry_date) = "'.$today.'" '; $all_section_id=$obj->View_all_data_row_column_By_Cond($table_name,$column,$where_cond); $j = 1; $total_student = 0; $for_total_absent = 0; $for_total_late = 0; $for_total_leave = 0; if(!empty($all_section_id)){ foreach($all_section_id as $value ){ $section_id = $value['_section_id']; $status_comments = $value['_comments']; $_atd_time = $value['_atd_time']; $approved_status = $value['_approve_satus']; $atd_status_id = $value['_id']; $table_name="_int_institute_setup_vw iv LEFT JOIN _atd_daily_status_class hs ON hs._section_id = iv.section_id"; $column="iv.section,iv.section,iv.student_type,iv.class,iv.department"; $where_cond='_atd_status = 1 && iv.section_id = '.$section_id.' && DATE(_entry_date) = "'.$today.'" order by TIME(_entry_date) ASC limit 1 '; $list = $obj->View_all_data_row_column_By_Cond($table_name,$column,$where_cond); $class_name = $list[0]['class'] ; $department_name = $list[0]['department'] ; $student_type = $list[0]['student_type'] ; $section_name = $list[0]['section'] ; $table_name1 = '_pf_std_basic_info'; $where_cond1 = '_section_id='.$section_id; $total_row = $obj->View_All_By_Cond($table_name1,$where_cond1 ); $i=0; $p = 0 ; $ab= 0; $la = 0; $le= 0; $where_cond = 'sc._id='.$section_id.' AND pf_std._status!="D" && DATE(hmc._entry_date) ="'.$today.'" ORDER BY hmc._atd_status ASC'; foreach($obj->View_Student_List_atttd_with_comment($where_cond) as $value){ extract($value); $_late_time = $value['_late_time'] ; if($_atd_status=='P'){ $atd_status = 'Present'; } elseif( $_atd_status=='A') { $atd_status = 'Absent'; $ab = $ab +1 ; }elseif($_atd_status=='LA'){ $atd_status = 'Late'; $la = $la +1 ; }elseif($_atd_status=='LE'){ $atd_status = 'Leave'; $le = $le +1 ; } $i++; } $selected_student = $i; $total_row = $obj->View_Student_List_rows("sc._id='$section_id' AND pf_std._status!='D'"); $present = $total_row-($ab+$la +$le) ; $prsent_persentage = round(($present * 100)/$total_row, 1); $sing_ab_persentage = round(($ab * 100)/$total_row, 1); $sing_la_persentage = round(($la * 100)/$total_row, 1); $single_le_persentage = round(($le * 100)/$total_row, 1); /// count at every loop, this is for counting total info of all $for_total_absent = $for_total_absent + $ab ; $for_total_late = $for_total_late + $la ; $for_total_leave = $for_total_leave + $le ; $total_student = $total_student + $total_row ; $design .= '
|---|---|---|---|---|---|---|---|---|
| '. $class_name.' | '. $department_name.' | '. $student_type.' | '. $section_name.' | '. $total_row." " .' | '.($total_row-($ab+$la +$le))." ( ".$prsent_persentage."%) ".' | '. $ab." ( ".$sing_ab_persentage."%), ".' | '.$la." ( ".$sing_la_persentage."%) ".' | '. $le." ( ".$single_le_persentage."%) " .' |
| Total Student | Preseant | Absent | Late | Leave | .' ; $total_present = $total_student-($for_total_absent+$for_total_late +$for_total_leave) ; $prsent_persentage = round(($total_present * 100)/$total_student, 1); $absent_persentage = round(($for_total_absent * 100)/$total_student, 1); $late_persentage = round(($for_total_late * 100)/$total_student, 1); $leave_persentage = round(($for_total_leave * 100)/$total_student, 1); $design .= '
|---|---|---|---|---|
| '.$total_student.' | '. $total_present." ( ".$prsent_persentage.'%)'.' | '.$for_total_absent." ( ".$absent_persentage.'%)'.' | '.$for_total_late." ( ".$late_persentage.'%)'.' | '. $for_total_leave." ( ".$leave_persentage.'%)' .' |