コード例 #1
0
 /**
  * @author Gaurav Dhiman.
  * @method edit student	
  */
 public function edit($stud_id)
 {
     if (isset($_POST['submit']) && !empty($_POST)) {
         //
         $arrData = array();
         $arrData = copy_posted($arrData, array('std', 'stream', 'division', 'semester', 'admit_to', 'medium', 'fname', 'mname', 'lname', 'father_mname', 'father_qualification', 'father_occupation', 'father_pq', 'father_mobile', 'father_ofc_num', 'father_ofc_name', 'adrs_father_ofc', 'father_email', 'father_aadhar', 'father_ai', 'father_pan', 'mother_fname', 'mother_qualification', 'mother_occupation', 'mother_pq', 'mother_mobile', 'mother_ofc_num', 'mother_ofc_name', 'adrs_mother_ofc', 'mother_email', 'mother_aadhar', 'mother_ai', 'mother_pan', 'is_divorced', 'is_adopted', 'sibbling1', 'sibbling2', 'sibbling3', 'adrs_residence', 'adrs_native', 'city', 'pincode', 'district', 'birth_place', 'alt_phone', 'gender', 'religion', 'caste', 's_caste', 'weight', 'height', 'birth_date', 'admission_date', 'fee_scheme', 'start_std', 'blood_grp', 'status', 'mother_tongue', 'nationality', 'near_rly_stn', 'seat_num', 'child_num', 'passed_out', 'last_percentage', 'handicap', 'nss', 'leaving_date'));
         $arrData['modified'] = date('y-m-d H:i:s');
         $arrData['updated_by'] = "Gaurav Dhiman";
         $arrData['admit_to'] = date('Y-m-d H:i:s', strtotime($arrData['admit_to']));
         $arrData['birth_date'] = date('Y-m-d H:i:s', strtotime($arrData['birth_date']));
         $arrData['admission_date'] = date('Y-m-d H:i:s', strtotime($arrData['admission_date']));
         //pre_print($arrData);
         $response = $this->model_student->update_student($stud_id, $arrData);
         pre_print($response);
         if ($response > 0) {
             redirect('student/listing');
         } else {
             $arrData['student_details'] = $this->model_student->get_student($stud_id);
             //pre_print($arrData);
             superadmin_view('student/edit_student', $arrData);
         }
     } else {
         $arrData['student_details'] = $this->model_student->get_student($stud_id);
         //pre_print($arrData);
         superadmin_view('student/edit_student', $arrData);
     }
 }
コード例 #2
0
ファイル: User.php プロジェクト: Gaurav-Dhiman/esuvidya
 /**
  * @author Gaurav Dhiman.
  * @method edit	
  */
 public function edit_user($user_id)
 {
     if (isset($_POST['submit']) && !empty($_POST)) {
         //
         $arrData = array();
         $arrData = copy_posted($arrData, array('fullname', 'username', 'password', 'email', 'gender', 'user_type'));
         $arrData['modified'] = date('y-m-d H:i:s');
         $arrData['password'] = md5($arrData['password']);
         //pre_print($arrData);
         $response = $this->model_user->update_user($user_id, $arrData);
         if ($response > 0) {
             redirect('user/listing');
         } else {
             superadmin_view('edit_user');
         }
     } else {
         $arrData['user_details'] = $this->model_user->get_user($user_id);
         //pre_print($arrData);
         superadmin_view('edit_user', $arrData);
     }
 }
コード例 #3
0
ファイル: Master.php プロジェクト: Gaurav-Dhiman/esuvidya
 /**
  * @author Gaurav Dhiman.
  * @method Edit Division 	
  */
 public function edit_division($div_id)
 {
     if (isset($_POST['submit']) && !empty($_POST['std_code'])) {
         //pre_print($_POST);
         $arrData = array();
         $arrData = copy_posted($arrData, array('std_code', 'division_name'));
         if ($result = $this->model_master->update_division($div_id, $arrData)) {
             //pre_print('success');
             $this->session->set_flashdata('success_msg', 'A division Updated successfully.');
             redirect('master/division_listing');
         } else {
             $arrData['division'] = $this->model_master->get_division($std_id);
             $this->session->set_flashdata('success_msg', 'Something went wrong Please Try Again.');
             superadmin_view('masters/edit_division');
         }
     } else {
         $arrData = $this->model_master->get_division($div_id);
         $arrData['standards'] = $this->model_master->get_all_standards();
         //pre_print($arrData);
         superadmin_view('masters/edit_division', $arrData);
     }
     //pre_print('here');\
 }