Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 88
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 215
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 216
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 217
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 218
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 219
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 220
load->library('session');
$this->load->model('Login_model');
if($this->session->userdata('type')){
if($this->session->userdata('type') == 'user'){
$this->session->set_flashdata('flash_data', 'You don\'t have access!');
redirect('Admin');
}
}else{
redirect('login');
}
$id= $this->session->userdata('id');
$pass = $this->session->userdata('uniqueNumber');
$countPass = $this->db->where('id',$id)->where('password !=',md5($pass))->count_all_results('personalDetails');
if($countPass>0){
redirect('Officer');
}
}
/**
* Index Page for this controller.
*
* Maps to the following URL
* http://example.com/index.php/welcome
* - or -
* http://example.com/index.php/welcome/index
* - or -
* Since this controller is set as the default controller in
* config/routes.php, it's displayed at http://example.com/
*
* So any other public methods not prefixed with an underscore will
* map to /index.php/welcome/
* @see https://codeigniter.com/userguide3/general/urls.html
*/
public function index(){
$this->load->view('includes/officerHeader');
$this->load->view('officer/changePassword1');
$this->load->view('includes/officerFooter');
}
public function resetPassword(){
$currentPassword = md5($this->input->post('password'));
$newPassword1 = $this->input->post('password1');
$newPassword2 = $this->input->post('password2');
$id = $this->session->userdata('id');
foreach($this->db->where('id',$id)->get('personalDetails')->result() as $row){
$current = $row->password;
}
//echo $newPassword1.' = '.$newPassword2; exit;
if($currentPassword != $current ){
redirect('ChangePassword?currentError');
}elseif($newPassword1 != $newPassword2 ){
redirect('ChangePassword?newError');
}else{
$data=array(
'password' => md5($newPassword1),
'password1'=>$newPassword1,
);
$this->db->where('id',$id);
$this->db->update('personalDetails',$data);
redirect('officer');
}
}
}