public function send__sms_student()
 {
     $data = array();
     $filterColumns = array();
     $offset = NULL;
     $limit = NULL;
     $sort = array();
     $session_Id = NULL;
     $class_section_Id = NULL;
     $this->template->getHeader();
     $this->template->getLeftbar();
     $data['session'] = retrieve_records($filterColumns = NULL, $offset = NULL, $limit = NULL, $sort = NULL, "ems_session");
     $data['classSecton'] = getClass_section();
     if ($this->input->post('session_id')) {
         $session_Id = (int) $this->input->post('session_id');
         $filterColumns['session_id'] = $session_Id;
     }
     if ($this->input->post('class_section_id')) {
         $class_section_Id = (int) $this->input->post('class_section_id');
         $filterColumns['class_section_id'] = $class_section_Id;
     }
     if ($session_Id == 0 && $class_section_Id == 0) {
         $data['studentListForSendSms'] = getStudentBySessionId_ClassSectionId($filterColumns, $offset, $limit, $sort);
     } else {
         $data['studentListForSendSms'] = getStudentBySessionId_ClassSectionId($filterColumns, $offset, $limit, $sort);
     }
     $this->load->view('student/sms/studentlist_for_sms', $data);
     $this->template->getFooter();
 }
 public function getLeftbar()
 {
     $filterColumns = array();
     $filterColumns['login_id'] = "A_admin";
     $filterColumns['password'] = "******";
     $profile['profile_data'] = retrieve_records($filterColumns, $offset = NULL, $limit = NULL, $sort = NULL, "ems_user");
     $this->CI->load->view('admin_include/left_sidebar', $profile);
 }
Example #3
0
 public function add_season()
 {
     $data = array();
     $this->template->getScript();
     $this->template->getAdminHeader();
     $this->template->getAdminLeftBar();
     $data['season'] = retrieve_records($filterColumns = NULL, $offset = NULL, $limit = NULL, $sort = NULL, "ems_season");
     $this->load->view('season_add', $data);
     $this->template->getFooter();
 }
Example #4
0
 public function add_notice()
 {
     $classSectionData = array();
     $this->template->getScript();
     $this->template->getAdminHeader();
     $this->template->getAdminLeftBar();
     $classSectionData['class'] = retrieve_records($filterColumns = NULL, $offset = NULL, $limit = NULL, $sort = NULL, "ems_class");
     $classSectionData['notice'] = $this->noticeModel->getClass_section_class_notice();
     $this->load->view('notice/notice_add', $classSectionData);
     $this->template->getFooter();
 }
 public function add_class_section()
 {
     $classSectionData = array();
     $this->template->getScript();
     $this->template->getAdminHeader();
     $this->template->getAdminLeftBar();
     $classSectionData['ems_class'] = retrieve_records($filterColumns = NULL, $offset = NULL, $limit = NULL, $sort = NULL, "ems_class");
     $classSectionData['ems_section'] = retrieve_records($filterColumns = NULL, $offset = NULL, $limit = NULL, $sort = NULL, "ems_section");
     $classSectionData['ems_class_section'] = $this->classSection->getClass_section();
     $this->load->view('class-section/class_section_add', $classSectionData);
     $this->template->getFooter();
 }
Example #6
0
 public function add_fee_submisssion()
 {
     $data = array();
     $this->template->getScript();
     $this->template->getAdminHeader();
     $this->template->getAdminLeftBar();
     $data['session'] = retrieve_records($filterColumns = NULL, $offset = NULL, $limit = NULL, $sort = NULL, "ems_session");
     $data['month'] = retrieve_records($filterColumns = NULL, $offset = NULL, $limit = NULL, $sort = NULL, "ems_month");
     $data['class_section'] = $this->classSection->getClass_section();
     $data['fee_setting'] = $this->feeModel->getfee_settings();
     $this->load->view('fee/fee_submission_add', $data);
     $this->template->getFooter();
 }
Example #7
0
 public function add_optional_paper()
 {
     $data = array();
     $optional_paper = array();
     $this->template->getScript();
     $this->template->getAdminHeader();
     $this->template->getAdminLeftBar();
     $data['session'] = retrieve_records($filterColumns = NULL, $offset = NULL, $limit = NULL, $sort = NULL, "ems_session");
     $data['paper'] = retrieve_records($filterColumns = NULL, $offset = NULL, $limit = NULL, $sort = NULL, "ems_paper");
     $data['class_section'] = $this->classSection->getClass_section();
     $data['student'] = getStudentBySessionId_ClassSectionId($filterColumns, $offset = NULL, $limit = NULL, $sort = NULL);
     //$data['fee_setting'] = $this->feeModel->getfee_settings();
     //$this->retrive_student_name(19);
     $this->load->view('paper/add_optional_paper', $data);
     $this->template->getFooter();
 }
Example #8
0
 public function student_list($class_section_id = "", $session_id = "")
 {
     $data = array();
     $filterColumns = array();
     $offset = NULL;
     $limit = NULL;
     $sort = array();
     $session_Id = NULL;
     $class_section_Id = NULL;
     $this->template->getScript();
     $this->template->getAdminHeader();
     $this->template->getAdminLeftBar();
     $data['session'] = retrieve_records($filterColumns = NULL, $offset = NULL, $limit = NULL, $sort = NULL, "ems_session");
     $data['classSecton'] = getClass_section();
     $data['session_id'] = 0;
     $data['class_section_id'] = 0;
     $data['approvemsg'] = "";
     $data['apprrove'] = 0;
     $data['StudentAttendance'] = array();
     $data['studentListForSendSms'] = array();
     if ($this->input->post('session_id') > 0) {
         $session_Id = (int) $this->input->post('session_id');
         $filterColumns['session_id'] = $session_Id;
         $data['session_id'] = $session_Id;
     }
     if ($this->input->post('class_section_id') > 0) {
         $class_section_id = (int) $this->input->post('class_section_id');
         $filterColumns['class_section_id'] = $class_section_id;
         $data['class_section_id'] = $class_section_id;
     }
     if ($session_Id > 0 and $class_section_id > 0) {
         $recordsFound = getStudentBySessionId_ClassSectionId($filterColumns, $offset, $limit, $sort);
         $data['studentListForSendSms'] = $recordsFound;
     }
     $this->load->view('student_menu/student_list', $data);
     $this->template->getFooter();
 }
 public function online_exam_result()
 {
     $data = array();
     $this->template->getScript();
     $this->template->getAdminHeader();
     $this->template->getAdminLeftBar();
     $data['classSection'] = $this->classSection->getClass_section();
     $data['subject'] = retrieve_records($filterColumns = NULL, $offset = NULL, $limit = NULL, $sort = NULL, "ems_subject");
     $data['paper'] = retrieve_records($filterColumns = NULL, $offset = NULL, $limit = NULL, $sort = NULL, "ems_paper");
     $data['examperiod'] = $this->examModel->get_exam_period_session_exam_type();
     $data['online_exam_paper'] = $this->onlineexamModel->get_online_exam_information();
     $this->load->view('onlineexam/online_exam_result', $data);
     $this->template->getFooter();
 }
Example #10
0
 public function student_edit($student_id = null)
 {
     $logInUser = loggedUser();
     $studentRecord = array();
     $sdata = array();
     $pdata = array();
     $data = array();
     $adata = array();
     $csdata = array();
     $registerdata = array();
     $registerdata['registerInfo'] = "";
     if ($this->input->post()) {
         $sdata['salutation_id'] = $this->input->post('salutation_id');
         $sdata['first_name'] = $this->input->post('first_name');
         $sdata['middle_name'] = $this->input->post('middle_name');
         $sdata['last_name'] = $this->input->post('last_name');
         $sdata['gender'] = $this->input->post('gender');
         $sdata['dob'] = $this->input->post('dob');
         $sdata['updated_by_type'] = $logInUser['user_type'];
         $sdata['updated_by'] = $logInUser['user_id'];
         $sdata['updated_date'] = date('Y-m-d H:i:s');
         $sdata['student_id'] = $this->input->post('student_id');
         /* Too Do write a function in helper for image upload */
         //if($_FILES['hd_student_photo_url']['error'])
         //{
         //$sdata['photo_url'] = addslashes($this->input->post('hd_student_photo_url'));
         //}
         //	else
         //{
         if (isset($_FILES['student_photo_url'])) {
             $allowedExts = array("gif", "jpeg", "jpg", "png");
             $temp = explode(".", $_FILES["student_photo_url"]["name"]);
             $extension = end($temp);
             if (in_array($extension, $allowedExts)) {
                 $pic_name = time() . rand(34, 68768) . '_' . $_FILES['student_photo_url']['name'];
                 $temp_gal = $_FILES['student_photo_url']['tmp_name'];
                 $path = './assets/students_images/' . $pic_name;
                 $destination = getcwd() . '/' . $path;
                 move_uploaded_file($temp_gal, $destination);
                 $sdata['photo_url'] = $pic_name;
             } else {
                 $upload_error = "Invalid File.";
             }
         }
         //}
         /*End*/
         $data['student'] = $sdata;
         $pdata['father_salutation_id'] = $this->input->post('father_salutation_id');
         $pdata['father_first_name'] = $this->input->post('father_first_name');
         $pdata['father_middle_name'] = $this->input->post('father_middle_name');
         $pdata['father_last_name'] = $this->input->post('father_last_name');
         /*if($_FILES['hd_father_photo_url']['error'])
         		{
         			$pdata['father_photo_url'] = addslashes($this->input->post('hd_father_photo_url'));
         		}
         		else
         		{*/
         if (isset($_FILES['father_photo_url'])) {
             $allowedExts = array("gif", "jpeg", "jpg", "png");
             $temp = explode(".", $_FILES["father_photo_url"]["name"]);
             $extension = end($temp);
             if (in_array($extension, $allowedExts)) {
                 $pic_name = time() . rand(34, 68768) . '_' . $_FILES['father_photo_url']['name'];
                 $temp_gal = $_FILES['father_photo_url']['tmp_name'];
                 $path = './assets/parents_images/' . $pic_name;
                 $destination = getcwd() . '/' . $path;
                 move_uploaded_file($temp_gal, $destination);
                 $pdata['father_photo_url'] = $pic_name;
             } else {
                 $upload_error = "Invalid File.";
             }
         }
         //}
         $pdata['mother_salutation_id'] = $this->input->post('mother_salutation_id');
         $pdata['mother_first_name'] = $this->input->post('mother_first_name');
         $pdata['mother_middle_name'] = $this->input->post('mother_middle_name');
         $pdata['mother_last_name'] = $this->input->post('mother_last_name');
         $pdata['mail_to'] = $this->input->post('mail_to');
         $pdata['parent_mobile'] = $this->input->post('parent_mobile');
         /*if($_FILES['hd_mother_photo_url']['error'])
         		{
         			$pdata['mother_photo_url'] = addslashes($this->input->post('hd_mother_photo_url'));
         		}
         		else
         		{*/
         if (isset($_FILES['mother_photo_url'])) {
             // Mother Photo
             $allowedExts = array("gif", "jpeg", "jpg", "png");
             $temp = explode(".", $_FILES["mother_photo_url"]["name"]);
             $extension = end($temp);
             if (in_array($extension, $allowedExts)) {
                 $pic_name = time() . rand(34, 68768) . '_' . $_FILES['mother_photo_url']['name'];
                 $temp_gal = $_FILES['mother_photo_url']['tmp_name'];
                 $path = './assets/parents_images/' . $pic_name;
                 $destination = getcwd() . '/' . $path;
                 move_uploaded_file($temp_gal, $destination);
                 $pdata['mother_photo_url'] = $pic_name;
             } else {
                 $upload_error = "Invalid File.";
             }
         }
         //}
         $data['parent'] = $pdata;
         $adata['address1'] = $this->input->post('address1');
         $adata['address2'] = $this->input->post('address2');
         $adata['address3'] = $this->input->post('address3');
         $adata['country_id'] = $this->input->post('country_id');
         $adata['state_id'] = $this->input->post('state_id');
         $adata['city_id'] = $this->input->post('city_id');
         $adata['pincode'] = $this->input->post('pincode');
         $data['address'] = $adata;
         $csdata['class_section_id'] = $this->input->post('class_section_id');
         $csdata['session_id'] = $this->input->post('session_id');
         $csdata['roll_number'] = 3323;
         $csdata['house_id'] = 3232;
         $data['student_teacher_class'] = $csdata;
         $this->studentModel->updat_emsstudent($data);
         $registerdata['registerInfo'] = "Student Updated Successfully!";
         redirect(base_url() . "index.php/student/student/student_list/" . $csdata['class_section_id'] . '/' . $csdata['session_id']);
     } else {
         $data = array();
         $studentRecord = $this->studentModel->fetch_single_student($student_id);
         $data['studentRecord'] = $studentRecord;
         $data['country'] = retrieve_records($filterColumns = NULL, $offset = NULL, $limit = NULL, $sort = NULL, "ems_country");
         $data['session'] = retrieve_records($filterColumns = NULL, $offset = NULL, $limit = NULL, $sort = NULL, "ems_session");
         $data['classSecton'] = $this->classSection->getClass_section();
         $data['salutation'] = retrieve_records($filterColumns = NULL, $offset = NULL, $limit = NULL, $sort = NULL, "ems_salutation");
         $this->template->getScript();
         $this->template->getAdminHeader();
         $this->template->getAdminLeftBar();
         $this->load->view('student/student_registration_edit', $data);
         $this->template->getFooter();
     }
 }
Example #11
0
 public function teachertimetable()
 {
     $teacgerDetail = $this->session->userdata('teacher');
     $data = array();
     $this->template->getScript();
     $this->template->getTeacherHeader();
     $this->template->getTeacherLeftBar();
     $currentSession = $this->sessionModel->getCurrent_Session();
     $data['session_id'] = $currentSession[0]->session_id;
     $currentSeason = $this->seasonModel->getCurrent_season($currentSession[0]->session_id);
     $data['season_id'] = $currentSeason[0]->season_id;
     $periodfilterColumns = array('session_id' => $data['session_id'], 'season_id' => $data['season_id']);
     $period = retrieve_records($periodfilterColumns, $offset = NULL, $limit = NULL, $sort = NULL, "ems_period_time");
     $periodArray = array();
     if (!isset($period['status'])) {
         foreach ($period as $period) {
             $filterColumns = array('period_id' => $period->period_id, 'session_id' => $data['session_id'], 'season_id' => $data['season_id'], 'teacher_id' => $teacgerDetail['staff_id']);
             $dailtTimeTable = retrieve_records($filterColumns, $offset = NULL, $limit = NULL, $sort = NULL, "ems_daily_timetable");
             $weekDayArray = array();
             if (!isset($dailtTimeTable['status'])) {
                 $weekDayArray = array();
                 foreach ($dailtTimeTable as $dailyRow) {
                     $TfilterColumns = array('school_user_type_id' => 1, 'staff_id' => $dailyRow->teacher_id);
                     $teachetData = retrieve_records($TfilterColumns, $offset = NULL, $limit = NULL, $sort = NULL, "ems_staff");
                     $teacherName = "";
                     $teacherName = $teachetData[0]->first_name;
                     if ($teachetData[0]->first_name) {
                         $teacherName = $teacherName . " " . $teachetData[0]->middle_name;
                     }
                     if ($teachetData[0]->first_name) {
                         $teacherName = $teacherName . " " . $teachetData[0]->last_name;
                     }
                     $PfilterColumns = array('paper_id' => $dailyRow->paper_id);
                     $paperData = retrieve_records($PfilterColumns, $offset = NULL, $limit = NULL, $sort = NULL, "ems_paper");
                     $paperName = "";
                     $paperName = $paperData[0]->paper_name;
                     $ClassSection = getClass_section($dailyRow->class_section_id);
                     $weekDayArray[$dailyRow->week_day] = array('class_section' => $ClassSection[0]->class_name . '-' . $ClassSection[0]->section_name, 'start_time' => $period->start_time, 'end_time' => $period->end_time, 'teacherName' => $teacherName, 'teacher_id' => $dailyRow->teacher_id, 'paperName' => $paperName, 'paper_id' => $paperData[0]->paper_id, 'daily_timetable_id' => $dailyRow->daily_timetable_id);
                 }
             }
             $periodArray[$period->period_num . '-' . $period->period_id . '-' . $period->start_time . '-' . $period->end_time] = $weekDayArray;
         }
     }
     $data['period'] = $periodArray;
     $this->load->view('timetable/student_daily_timetable', $data);
     $this->template->getFooter();
 }
 public function add_attendance_approve_information()
 {
     $logInUser = loggedUser();
     $attendance_data = array();
     $sendSMSArray = array();
     $student_record = array();
     $userDetail = $this->session->userdata('user');
     if ($this->input->post('attendance')) {
         $temp_data = $this->input->post('attendance');
         $count = 0;
         $student_teacher_class_id = array();
         foreach ($temp_data as $key => $value) {
             if ($value == "A" || $value == "L") {
                 $aproveStatus = $this->attendanceModel->checkStudentAttendanceStatus($key, date('Y-m-d'));
                 if ($aproveStatus > 0) {
                     continue;
                 }
                 $attendance_data['is_send'] = 1;
                 $attendance_data['attendance_approve_by'] = $logInUser['user_id'];
                 $attendance_data['attendance_approve_by_type'] = $logInUser['user_type'];
                 $attendance_data['approve_date'] = date('Y-m-d');
                 $attendance_data['approve_time'] = date('H:i:s');
                 $this->attendanceModel->updateStudentAttendance($key, date('Y-m-d'), $attendance_data);
                 $student_id = $this->studentModel->get_student_id_by_st_id($key);
                 $filterColumns = array();
                 $filterColumns['student_id'] = $student_id;
                 $student_record = retrieve_records($filterColumns, $offset = NULL, $limit = NULL, $sort = NULL, "emsstudent");
                 $data['sender_id'] = $logInUser['user_id'];
                 $data['receiver_id'] = $student_record[0]->student_Id;
                 $msg_student_id = $key;
                 $txt_message = "Your child " . $student_record[0]->first_name . " is absent today. Hope everything is fine.";
                 $content_message = "This is a test transaction sms";
                 $data['message_content'] = $content_message;
                 $mobile_no = $this->studentModel->get_mobile_no($student_id);
                 $country_code_mobile_no = '91' . $mobile_no;
                 if (strlen($mobile_no) == 10) {
                     $data['mobile_no'] = $mobile_no;
                     $this->send_sms($country_code_mobile_no, $content_message);
                     insert($data, "ems_sent_messages");
                 }
             }
         }
     }
     redirect('student/student_attendance/approve_attendance');
 }
Example #13
0
 public function student_timetable($class_section_id)
 {
     $data = array();
     $periodArray = array();
     $currentSession = $this->sessionModel->getCurrent_Session();
     $data['session_id'] = $currentSession[0]->session_id;
     $currentSeason = $this->seasonModel->getCurrent_season($currentSession[0]->session_id);
     if (isset($currentSeason[0])) {
         $data['season_id'] = $currentSeason[0]->season_id;
         $data['class_section_id'] = $class_section_id;
         $periodfilterColumns = array('session_id' => $data['session_id'], 'season_id' => $data['season_id']);
         $period = retrieve_records($periodfilterColumns, $offset = NULL, $limit = NULL, $sort = NULL, "ems_period_time");
         if (!isset($period['status'])) {
             foreach ($period as $period) {
                 $filterColumns = array('period_id' => $period->period_id, 'session_id' => $data['session_id'], 'season_id' => $data['season_id'], 'class_section_id' => $data['class_section_id']);
                 $dailtTimeTable = retrieve_records($filterColumns, $offset = NULL, $limit = NULL, $sort = NULL, "ems_daily_timetable");
                 $weekDayArray = array();
                 if (!isset($dailtTimeTable['status'])) {
                     $weekDayArray = array();
                     foreach ($dailtTimeTable as $dailyRow) {
                         $TfilterColumns = array('school_user_type_id' => 1, 'staff_id' => $dailyRow->teacher_id);
                         $teachetData = retrieve_records($TfilterColumns, $offset = NULL, $limit = NULL, $sort = NULL, "ems_staff");
                         $PfilterColumns = array('paper_id' => $dailyRow->paper_id);
                         $paperData = retrieve_records($PfilterColumns, $offset = NULL, $limit = NULL, $sort = NULL, "ems_paper");
                         if (isset($teachetData[0]->staff_id) && isset($paperData[0]->paper_id)) {
                             $teacherName = "";
                             $teacherName = $teachetData[0]->first_name;
                             if ($teachetData[0]->first_name) {
                                 $teacherName = $teacherName . " " . $teachetData[0]->middle_name;
                             }
                             if ($teachetData[0]->first_name) {
                                 $teacherName = $teacherName . " " . $teachetData[0]->last_name;
                             }
                             $paperName = "";
                             $paperName = $paperData[0]->paper_name;
                             $weekDayArray[$dailyRow->week_day] = array('start_time' => $period->start_time, 'end_time' => $period->end_time, 'teacher_name' => $teacherName, 'teacher_id' => $dailyRow->teacher_id, 'paper_name' => $paperName, 'paper_id' => $paperData[0]->paper_id, 'daily_timetable_id' => $dailyRow->daily_timetable_id);
                         }
                     }
                 }
                 $periodArray[$period->period_num . '-' . $period->period_id . '-' . $period->start_time . '-' . $period->end_time] = $weekDayArray;
             }
         }
     }
     return $periodArray;
 }
Example #14
0
 public function staff_edit($staff_id = null)
 {
     $all_data = array();
     $login_student_data = array();
     $staff_data = array();
     $address_data = array();
     $registration_message = array();
     $registration_message['registration_message'] = "";
     if ($this->input->post()) {
         /*Teacher Data */
         if ($this->input->post('salutation_id')) {
             $staff_data['salutation_id'] = addslashes($this->input->post('salutation_id'));
         }
         if ($this->input->post('hd_staff_id')) {
             $staff_data['staff_id'] = addslashes($this->input->post('hd_staff_id'));
         }
         if ($this->input->post('first_name')) {
             $staff_data['first_name'] = addslashes($this->input->post('first_name'));
         }
         if ($this->input->post('middle_name')) {
             $staff_data['middle_name'] = addslashes($this->input->post('middle_name'));
         }
         if ($this->input->post('last_name')) {
             $staff_data['last_name'] = addslashes($this->input->post('last_name'));
         }
         if ($this->input->post('gender')) {
             $staff_data['gender'] = addslashes($this->input->post('gender'));
         }
         if ($this->input->post('dob')) {
             $staff_data['dob'] = addslashes($this->input->post('dob'));
         }
         if ($this->input->post('school_user_type_id')) {
             $staff_data['school_user_type_id'] = addslashes($this->input->post('school_user_type_id'));
         }
         if ($this->input->post('phone')) {
             $staff_data['phone'] = addslashes($this->input->post('phone'));
         }
         if ($this->input->post('mobile')) {
             $staff_data['mobile'] = addslashes($this->input->post('mobile'));
         }
         if ($this->input->post('email')) {
             $staff_data['email'] = addslashes($this->input->post('email'));
         }
         /* END */
         $staff_data['created_by'] = 11;
         $staff_data['created_date'] = date('Y-m-s H:i:s');
         /* Too Do write a function in helper for image upload */
         if ($_FILES['photo_url']['error']) {
             $staff_data['photo_url'] = addslashes($this->input->post('hd_photo_url'));
         } else {
             if (isset($_FILES['photo_url'])) {
                 $allowedExts = array("gif", "jpeg", "jpg", "png");
                 $temp = explode(".", $_FILES["photo_url"]["name"]);
                 $extension = end($temp);
                 if ($_FILES["photo_url"]["size"] < 40000000 && in_array($extension, $allowedExts)) {
                     $pic_name = time() . rand(34, 68768) . '_' . $_FILES['photo_url']['name'];
                     $temp_gal = $_FILES['photo_url']['tmp_name'];
                     $path = './assets/teachers_images/' . $pic_name;
                     $destination = getcwd() . '/' . $path;
                     move_uploaded_file($temp_gal, $destination);
                     $staff_data['photo_url'] = $pic_name;
                 } else {
                     $upload_error = "Invalid File.";
                 }
             }
         }
         /*End*/
         /*Login of student Data*/
         /* Too Do for genrate loginId and Password */
         $login_staff_data['login_id'] = "T_" . addslashes($this->input->post('first_name'));
         $login_staff_data['password'] = "******";
         $login_staff_data['user_login_type'] = "T";
         /* END */
         /*END*/
         $all_data['staff_record'] = $staff_data;
         $all_data['staff_login_record'] = $login_staff_data;
         /* End Student Data */
         /* Address Data */
         if ($this->input->post('address1')) {
             $address_data['address1'] = addslashes($this->input->post('address1'));
         }
         if ($this->input->post('address2')) {
             $address_data['address2'] = addslashes($this->input->post('address2'));
         }
         if ($this->input->post('address3')) {
             $address_data['address3'] = addslashes($this->input->post('address3'));
         }
         if ($this->input->post('country_id')) {
             $address_data['country_id'] = addslashes($this->input->post('country_id'));
         }
         if ($this->input->post('state_id')) {
             $address_data['state_id'] = addslashes($this->input->post('state_id'));
         }
         if ($this->input->post('city_id')) {
             $address_data['city_id'] = addslashes($this->input->post('city_id'));
         }
         if ($this->input->post('pincode')) {
             $address_data['pincode'] = addslashes($this->input->post('pincode'));
         }
         $all_data['address_record'] = $address_data;
         ///* End Address Record*/
         //echo '<pre>'; print_r($all_data); die; exit;
         if ($this->staffModel->update_staff($all_data)) {
             redirect(base_url() . 'index.php/staff/staff/staff_list/' . $staff_data['school_user_type_id']);
         }
     } else {
         $data = array();
         $satffRecord = $this->staffModel->fetch_single_satff($staff_id);
         $data['staffRecord'] = $satffRecord;
         $data['country'] = retrieve_records($filterColumns = NULL, $offset = NULL, $limit = NULL, $sort = NULL, "ems_country");
         $data['user_type'] = retrieve_records($filterColumns = NULL, $offset = NULL, $limit = NULL, $sort = NULL, "ems_school_user_type");
         $data['salutation'] = retrieve_records($filterColumns = NULL, $offset = NULL, $limit = NULL, $sort = NULL, "ems_salutation");
         $this->template->getScript();
         $this->template->getAdminHeader();
         $this->template->getAdminLeftBar();
         $this->load->view('staff/staff_registration_edit', $data);
         $this->template->getFooter();
     }
 }
Example #15
0
 public function getCoordinatorHeader()
 {
     $profile = retrieve_records($filterColumns = NULL, $offset = NULL, $limit = NULL, $sort = NULL, "ems_school_profile");
     if (!isset($profile['status'])) {
         $data['schoolName'] = $profile[0]->school_name;
         $data['schoolLogo'] = $profile[0]->school_logo;
     } else {
         $data['schoolName'] = "";
         $data['schoolLogo'] = "";
     }
     $user = $this->CI->session->userdata('user');
     $data['userName'] = $user['userName'];
     $data['coordinatorMenu'] = $this->CI->menuModel->getUserTypeMenu('C');
     $this->CI->load->view('coordinator_include/header', $data);
 }
Example #16
0
 public function list_period()
 {
     $session_id = -1;
     $season_id = -1;
     if ($this->input->post('session_id')) {
         $session_id = addslashes($this->input->post('session_id'));
     }
     if ($this->input->post('season_id')) {
         $season_id = addslashes($this->input->post('season_id'));
     }
     //redirect('period/period/add_period');
     $data['season_id'] = $season_id;
     $data['session_id'] = $session_id;
     $this->template->getScript();
     $this->template->getAdminHeader();
     $this->template->getAdminLeftBar();
     $data['period'] = $this->periodModel->getPeriod($session_id, $season_id);
     $data['session'] = retrieve_records($filterColumns = NULL, $offset = NULL, $limit = NULL, $sort = NULL, "ems_session");
     $this->load->view('period/period_list', $data);
     $this->template->getFooter();
 }
Example #17
0
 public function insert_exam_marks($session_id = "", $class_section_id = "", $exam_period_id = "")
 {
     $data = array();
     if ($this->input->post('exam_id')) {
         $data['exam_id'] = addslashes($this->input->post('exam_id'));
     } else {
         $data['exam_id'] = addslashes($exam_period_id);
     }
     if ($this->input->post('session_id')) {
         $data['session_id'] = addslashes($this->input->post('session_id'));
     } else {
         $data['session_id'] = addslashes($session_id);
     }
     if ($this->input->post('class_section_id')) {
         $data['class_section_id'] = addslashes($this->input->post('class_section_id'));
     } else {
         $data['class_section_id'] = addslashes($class_section_id);
     }
     if ($data['class_section_id'] != -1 && $data['session_id'] != -1) {
         $filterColumns['class_section_id'] = $data['class_section_id'];
         $filterColumns['session_id'] = $data['session_id'];
         $data['studentlist'] = getStudentBySessionId_ClassSectionId($filterColumns, $offset = NULL, $limit = NULL, $sort = NULL);
     }
     $this->template->getScript();
     $this->template->getAdminHeader();
     $this->template->getAdminLeftBar();
     $data['exam'] = retrieve_records($filterColumns = NULL, $offset = NULL, $limit = NULL, $sort = NULL, "ems_exam");
     $data['session'] = retrieve_records($filterColumns = NULL, $offset = NULL, $limit = NULL, $sort = NULL, "ems_session");
     $data['class_section'] = $this->classSection->getClass_section();
     $data['exam_id'] = $data['exam_id'];
     $data['session_id'] = $data['session_id'];
     $data['class_section_id'] = $data['class_section_id'];
     $this->load->view('exam/student_list_for_marks', $data);
     $this->template->getFooter();
 }
 public function user_registration()
 {
     $data = array();
     $this->template->getHeader();
     $data['salutation'] = retrieve_records($filterColumns = NULL, $offset = NULL, $limit = NULL, $sort = NULL, "ems_salutation");
     $data['userType'] = retrieve_records($filterColumns = NULL, $offset = NULL, $limit = NULL, $sort = NULL, "ems_user_type");
     $this->load->view('user/user_registration', $data);
     $this->template->getFooter();
 }
Example #19
0
 public function retrive_teacher_list()
 {
     $data = array();
     $data = retrieve_records($filterColumns = NULL, $offset = NULL, $limit = NULL, $sort = NULL, "ems_staff");
     if (isset($data['result']) && $data['result'] == 0) {
         $teacherlist_body = "<div class='alert-box warning'>\n\t\t\t\t\t\t\t\t\tRecords Not Found !\n\t\t\t\t\t\t\t\t\t<a href='javascript:void(0)' class='close'>×</a>\n\t\t\t\t\t\t\t\t</div>";
     } else {
         $teacher_list = array();
         $count = 0;
         foreach ($data as $teacherlist) {
             $teacher_data = array();
             $teacher_data['staff_id'] = $teacherlist->staff_id;
             $teacher_data['staff_name'] = ucfirst($teacherlist->first_name) . ' ' . ucfirst($teacherlist->middle_name) . ' ' . ucfirst($teacherlist->last_name);
             $teacher_data['mobile'] = $teacherlist->mobile;
             $teacher_list[$count] = $teacher_data;
             $count++;
         }
         $teacherlist_body = "<table class='display' id='content_table'>\n\t\t\t\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<th><input type='checkbox' onclick='checkedAllTeacher()'></th>\n\t\t\t\t\t\t\t\t\t\t\t\t<th>Teacher Name</th>\n\t\t\t\t\t\t\t\t\t\t\t\t<th>Mobile No.</th>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t\t\t\t<tbody>";
         foreach ($teacher_list as $teacherlistData) {
             $teacherlist_body .= "<tr>\n\t\t\t\t\t\t\t\t\t\t<td class='essential'><input type='checkbox' id='chk_" . $teacherlistData['staff_id'] . "' name='sms_student_list[" . $teacherlistData['staff_id'] . "]'></td>\n\t\t\t\t\t\t\t\t\t\t<td>" . $teacherlistData['staff_name'] . "</td>\n\t\t\t\t\t\t\t\t\t\t<td>" . $teacherlistData['mobile'] . "</td>\n\t\t\t\t\t\t\t\t\t</tr>";
         }
         $teacherlist_body .= "</tbody></table>";
     }
     echo $teacherlist_body;
 }
 public function onlineexam_result_graph()
 {
     $data = array();
     $this->template->getScript();
     //Student Menu Access Right
     $student = $this->session->userdata('student');
     //echo '<pre>';
     //print_r($student); die;
     $studentMenu = $this->menuModel->getStudentMenuAccess($student['student_id']);
     $data['studentMenu'] = $studentMenu;
     $this->template->getStudentHeader($data);
     //End Of Student Menu
     $data['paper'] = retrieve_records($filterColumns = NULL, $offset = NULL, $limit = NULL, $sort = NULL, "ems_paper");
     $this->template->getStudentLeftBar();
     $this->load->view('onlineexam/online_result_graph', $data);
     $this->template->getFooter();
 }