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
pass1 == $request->pass2){ $data = array( 'password'=>Hash::make($request->pass1), 'recover_password'=>$request->pass1, ); DB::table('users')->where('id',Auth::id())->update($data); }else{ $url = explode('?',$_SERVER['HTTP_REFERER']); if(count($url) > 1){ redirect($_SERVER['HTTP_REFERER'].'&pass_changed=true'); }else{ redirect($_SERVER['HTTP_REFERER'].'?pass_changed=true'); } } } } public function authenticate(Request $request) { $email = $request->input('email'); $password = $request->input('password'); if (Auth::attempt(['email' => $email, 'password' => $password])) { return redirect()->intended('home'); }else{ $superuser = DB::table('superusers')->where('email',$email)->where('password',md5($password))->get(); if($superuser->count() > 0){ foreach($superuser as $row){ $session = array( 'name'=>$row->name, 'role'=>'superuser', 'email'=>$row->email, ); Session::put('user', $session); return redirect()->intended('/api/superuser'); } }else{ $client = DB::table('borrowers') ->where('email',$email) ->where('status',1) ->where('password',md5($password)) ->orWhere('phone',$email) ->where('status',1) ->where('password',md5($password)) ->orWhere('uniqueNumber',$email) ->where('status',1) ->where('password',md5($password)) ->get(); if($client->count() > 0){ foreach($client as $row){ Session::start(); Session::put( 'client', collect([ 'id'=>$row->id, 'name'=>$row->firstName." ".$row->lastName, 'role'=>'client', 'uniqueNumber'=>$row->uniqueNumber, 'email'=>$row->email, 'phone'=>$row->phone, 'branch_id'=>$row->branch_id ]) ); Session::save(); return redirect()->intended('/api/client?id='.base64_encode($row->uniqueNumber)); } }else{ return redirect()->intended('/?err'); } } } } public function logout(Request $request) { Auth::logout(); return redirect('/'); } public function checklogin(){ if(!Auth::check()){ return view('auth.login'); }else{ return view('pages.home'); } } }