- Timestamp:
- 06/05/24 13:35:43 (5 months ago)
- Branches:
- main
- Children:
- 768f473
- Parents:
- f7acd52
- Location:
- app/Http/Controllers
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
app/Http/Controllers/CrimeCaseController.php
rf7acd52 r249bf91 28 28 ]); 29 29 30 } 31 function register_statement(){ 32 return view('register-statement'); 33 } 34 function register_statement_post() 35 { 36 //TODO: so kiki i bojan vodete se po logikata na add policeman 37 } 38 function finished_cases(){ 39 40 if(Session::get('is_policeman')){ 41 $police_station = DB::select('select * from police_station where p_id=:p_id;',['p_id'=> Session::get('p_id')]); 42 } else { 43 $police_station = DB::select('select * from police_station where pe_id=:pe_id;',['pe_id'=> Session::get('pe_id')]); 44 } 45 46 $cases = DB::select('select * from crime_case where p_id=:p_id and c_status=\'Z\';', ['p_id' => $police_station[0]->p_id]); 47 48 return view('archive', [ 49 'cases' => $cases, 50 'p_address'=>$police_station[0]->p_address 51 ]); 30 52 } 31 53 function case($wildcard){ -
app/Http/Controllers/OfficerController.php
rf7acd52 r249bf91 31 31 } 32 32 33 function show($id){ 34 if(Session::get('is_policeman')){ 35 $police_station = DB::select('select * from police_station where p_id=:p_id;',['p_id'=> Session::get('p_id')]); 36 } else { 37 $police_station = DB::select('select * from police_station where pe_id=:pe_id;',['pe_id'=> Session::get('pe_id')]); 38 } 39 $result = DB::select('select * from policeman join people on policeman.pe_id = people.pe_id where p_id=:p_id and people.pe_id=:pe_id;',['p_id'=> $police_station[0]->p_id, 'pe_id' => $id]); 40 $cases = DB::select('select * from statements where pe_id=:pe_id;',['pe_id' => $id]); 41 42 return view('employee', [ 43 'employee' => $result[0], 44 'p_address'=>$police_station[0]->p_address, 45 'cases' => $cases 46 ]); 47 } 48 33 49 function register() 34 50 { -
app/Http/Controllers/SessionsController.php
rf7acd52 r249bf91 42 42 Session::put('is_policeman', $policeman); 43 43 if($policeman){ 44 Session::put('p _id', $exists[0]->p_id);44 Session::put('pe_id', $exists[0]->p_id); 45 45 } else { 46 46 Session::put('pe_id', $exists[0]->pe_id);
Note:
See TracChangeset
for help on using the changeset viewer.