JezK
Edit File: updateexam_schedule.php
<?php session_start(); include_once("school_admin_access_app.php"); include 'android_push.php'; $fun=new adminaccess(); $school_id=$_SESSION['child']['log_school_id']; //school_id $academic_id=$_SESSION['child']['choosen_academic_id'];// academic_year_id $user_id=$_SESSION['child']['auth_id']; //user_id $exam_id=$_POST['examnames']; $data = $_POST['student']; $class_id = $_POST['classes']; $section_id = $_POST['sections']; $notesend=0; if(isset($_POST['examnames']) && isset($_POST['datetimepicker']) && isset($_POST['duration']) && isset($_POST['timepicker']) && isset($_POST['marks'])) { $kk=0; foreach($data as $subject_id) { $exam_date=$_POST['datetimepicker'][$kk]; $exam_time=$_POST['timepicker'][$kk]; $duration_time=$_POST['duration'][$kk]; $total_marks=$_POST['marks'][$kk]; if($_POST['marks'][$kk]!="") { $details=$fun->addexamination_schedule($exam_id,$subject_id,$exam_date,$exam_time,$duration_time,$class_id,$section_id,$academic_id,$user_id,$total_marks,$school_id); if($details && $notesend==0 && $_POST['student_ids_data']!='') { $check_parents_data = $fun->check_parent_data($_POST['student_ids_data']); $notesend=1; } } $kk++; } if(!empty($check_parents_data)) { $msg['type'] = "exam_sche"; $msg['exam_id']=$exam_id; $ename=$fun->getexam_name($exam_id); foreach($check_parents_data as $key=>$val) { $msg['message'] = "Exam Schedule for ".$ename." for ".$val[student_firstname]." ".$val[student_lastname]." has been updated"; $registatoin_ids = $val['device_id']; $msg['student_id'] = $val['student_id']; $nstate=$fun->getNotestate($val['authenticate_id']); $noteins="insert into ced_t_notifications set notify_name='".$msg['message']."',student_id=".(int)$val['student_id'].",notify_type='exam_sche',read_status=1,general_column1='".$exam_id."',created_on='".date('Y-m-d')."'"; mysql_query($noteins); if($registatoin_ids!='' && $nstate=='1') $resultss = $fun->send_notice($registatoin_ids, $msg); } } $sucurl = 'exam_schedule.php?section_id='.$section_id.'&class_id='.$class_id.'&exname_id='.$exam_id; echo "<script>location.replace('".$sucurl."');</script>"; /*if($details==1) { $sucurl = 'exam_schedule.php?section_id='.$section_id.'&class_id='.$class_id.'&exname_id='.$exam_id; echo "<script>location.replace('".$sucurl."');</script>"; } else if($details==2) { echo "<script>alert('Exam schedule not Added');</script>"; echo "<script>location.replace('update_examschedule.php');</script>"; }*/ } ?>