| @@ 2239-2251 (lines=13) @@ | ||
| 2236 | $data['form'] = $this->form->build_form($this->accounts_form->get_reseller_own_form_fields(), $add_array); |
|
| 2237 | if ($add_array['id'] != '') { |
|
| 2238 | $data['page_title'] = 'Edit Reseller'; |
|
| 2239 | if ($this->form_validation->run() == FALSE) { |
|
| 2240 | $data['validation_errors'] = validation_errors(); |
|
| 2241 | } else { |
|
| 2242 | $this->accounts_model->edit_account($add_array, $add_array['id']); |
|
| 2243 | $accountinfo = $this->session->userdata('accountinfo'); |
|
| 2244 | if ($add_array['id'] == $accountinfo['id']) { |
|
| 2245 | $result = $this->db->get_where('accounts', array('id' => $add_array['id'])); |
|
| 2246 | $result = $result->result_array(); |
|
| 2247 | $this->session->set_userdata('accountinfo', $result[0]); |
|
| 2248 | } |
|
| 2249 | $this->session->set_flashdata('astpp_errormsg', 'Reseller updated successfully!'); |
|
| 2250 | redirect(base_url() . '/dashboard/'); |
|
| 2251 | } |
|
| 2252 | $this->load->view('view_reseller_edit_details_own', $data); |
|
| 2253 | } else { |
|
| 2254 | $data['page_title'] = 'Edit Reseller'; |
|
| @@ 686-699 (lines=14) @@ | ||
| 683 | if ($add_array['id'] != '') { |
|
| 684 | $add_array['type'] = $accountinfo['type']; |
|
| 685 | $data['form'] = $this->form->build_form($this->user_form->get_userprofile_form_fields($add_array), $add_array); |
|
| 686 | if ($this->form_validation->run() == FALSE) { |
|
| 687 | $data['validation_errors'] = validation_errors(); |
|
| 688 | } else { |
|
| 689 | if ($add_array['id'] == $accountinfo['id']) { |
|
| 690 | $this->user_model->edit_account($add_array, $add_array['id']); |
|
| 691 | $result = $this->db->get_where('accounts', array('id' => $add_array['id'])); |
|
| 692 | $result = $result->result_array(); |
|
| 693 | $this->session->set_userdata('accountinfo', $result[0]); |
|
| 694 | $this->session->set_flashdata('astpp_errormsg',' Your profile updated successfully!'); |
|
| 695 | redirect(base_url() . 'user/user_myprofile/'); |
|
| 696 | }else{ |
|
| 697 | $this->session->set_flashdata('astpp_notification', 'Something wrong.Please contact to administrator.'); |
|
| 698 | } |
|
| 699 | } |
|
| 700 | } else { |
|
| 701 | $where = array('id' => $accountinfo["id"]); |
|
| 702 | $account = $this->db_model->getSelect("*", "accounts", $where); |
|