File manager - Edit - /home/autoph/.trash/.TicketController.php.swp
Back
b0VIM 7.4 ��hVt� PL root 5127700.autohub.ph /home/autoph/public_html/projects/AutoHub-Ticketing-System-FinalV2/app/Http/Controllers/TicketController.php utf-8 U3210 #"! U tp h ��������R i W � ��������c ��������O v ��������U � ��������I ��������^ c ��������U � ��������O ��������] e ��������s � �����^ 5 �����\ � �����] � �����` L �����n � ������` ������R z ������V � ������M " ������W o ������j � ������B 0 ad � h � � � � � � e M 6 � � � � � p M ) � � � � � x p T S 1 + � � � � � s [ Q . � � � c Y � � � � � � J � � � j . ( ' � � � � � � � � � B 9 � � � � / % � � c 2 � b � � � � e � � � � � � � case "Email": break; $array_data['search'] =" AND (`sender`.`f_name` LIKE '%{$array_data['search_keyword']}%' OR `sender`.`l_name` LIKE '%{$array_data['search_keyword']}%') "; case "Sender": break; $array_data['search'] =" AND (`t`.`ticket_no` LIKE '%{$array_data['search_keyword']}%' OR CONCAT(`usr`.`f_name`,' ',`usr`.`l_name`) LIKE '%{$array_data['search_keyword']}%')"; case "Ticket No.": break; $array_data['search'] = " AND (`t`.`id` = {$array_data['search_keyword']}) "; case "ID": switch($array_data['search_type']){ if(!empty($array_data['search_keyword'])){ $array_data['search'] = ""; $array_data['sort'] = " ORDER BY {$array_data['order']} {$array_data['sort']} "; $array_data['order']=($array_data['order'] =='#' ? $array_data['order'] = 'id' : $array_data['order'] ); $array_data['offset_limit'] = " LIMIT {$array_data['offset']},{$array_data['limit']}"; $array_data['limit'] = $request->length; $array_data['offset'] = $request->start; $array_data['order'] = $request->columns[$request->order[0]['column']]['data']; $array_data['sort'] = $request->order[0]['dir']; } $array_data['search_type'] = json_decode($request->search_type,true)[0]; } else { $array_data['search_type'] = ""; if(empty($request->search_type)){ $array_data['search_keyword'] = $request->search['value']; public function fetchDepartmentTickets(Request $request){ } // { public function create() */ * @return \Illuminate\Http\Response * * Show the form for creating a new resource. /** } ->with(['title_page' => "Department Tickets"]); return view('layouts.authentication.admin.department_ticket.index') } abort(503); if($this->auth->checkMaintenance() == "true"){ } abort(403, 'Unauthorized action.'); if (!auth()->user()->can('view-department-ticket')) { { public function deptIndex() } ->with(['title_page'=>"My Tickets"]); return view('layouts.authentication.ticket_component.index',['user_current_company_id'=>$current_company_id]) } $current_company_id =$user_company_id['id']; if($user_company_id){ $user_company_id =\App\Models\Company::select('id')->where('comp_code',Auth::user()->comp_code)->first(); $current_company_id =null; } abort(503); if($this->auth->checkMaintenance() == "true"){ { public function index() } $this->auth = new AuthenticationController; $this->ticket = new Ticket; { public function __construct() private $ticket, $auth; */ * @return \Illuminate\Http\Response * * Display a listing of the resource. /** { class TicketController extends Controller use Silber\Bouncer\Database\Role; use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Auth; use Illuminate\Http\Request; use DateTime; use Carbon\Carbon; use App\Models\User; use App\Models\TicketUser; use App\Models\Ticket; use App\Models\Department; use App\Models\Dealer; use App\Models\Company; use App\Events\TransferTicket; use App\Events\PickTicket; use App\Events\CreateTicket; use App\Events\AssignTicket; namespace App\Http\Controllers; <?php ad � � B � j i E " � � � � � � � � Y S ) � � u < � � � � � J 4 � � � � G # � � � w h ^ ] 5 / . � � � � f : * � � � � } } return response()->json(['error' => 'User not found'], 404); } ]); 'anydesk' => $user->anydesk 'viber' => $user->viber, return response()->json([ if ($user) { $user = \App\Models\User::find($id); { public function getUserDetails($id) } return response()->json($data); } ]; 'text' => $user->dept_name 'id' => $user->id, $data['results'][] = [ foreach ($dept as $user) { ->get(); // ->where('active', 1) $dept = \App\Models\Department::select('id', 'dept_name') // Otherwise, return the full list of users } return response()->json(['error' => 'User not found'], 404); } ]); ] ['id' => $dept->id, 'text' => $dept->dept_name] 'results' => [ return response()->json([ if ($dept) { ->first(); // ->where('active', 1) ->where('id', $request->input('userID')) $dept = \App\Models\Department::select('id','dept_name') if ($request->has('deptID')) { // Check if a specific user ID is provided $data = []; // dd($request->input('userID')); { public function DepartmentList(Request $request) } return response()->json($data); } ]; 'text' => $user->name 'id' => $user->id, $data['results'][] = [ foreach ($users as $user) { ->get(); ->where('active', 1) $users = \App\Models\User::select('id', DB::raw("CONCAT(f_name, ' ', l_name) as name")) ad � � � � � : "support_position" => $row->support_position ad H � W � � i 9 � � � � � ' � � | v u @ � � � � 6 , + � � & � � e � � � v m : � � t Q � � � � � � � p o / � � � { � � v l f e * ) � � � � l K � � � V $ � � � b & � � � � "sdfasdfasupport" => $row->sup "support" => $row->support, "ticket_creator" => $row->ticket_creator, "sender_position" => $row->sender_position, "sender_email" => $row->sender_email, "sender" => $row->SENDER, "solution" => $row->solution, "end_date" => $row->end_date, "start_date" => $row->start_date, "created_at" => $row->created_at, "status" => $row->status, "level" => $row->level, "description" => $row->description, "ticket_no" => $row->ticket_no, "#" => $count++, "id" => $row->id, $result['data'][] = [ foreach($results as $row){ $count =1; $result['data'] = array(); // dd($results); $results = $this->ticket->fetchMyTickets($array_data); } } $array_data['where'] .= " AND `t`.`status` LIKE '%{$data['option']}%' "; if($data['option'] != "all"){ if(!empty($data['option'])){ } $array_data['where'] .= " AND DATE(`t`.`created_at`) BETWEEN '$fromdate' AND '$todate' "; $todate = $to->toDateString(); $fromdate = $from->toDateString(); $to = Carbon::parse($data['to_date']); $from = Carbon::parse($data['from_date']); if(!empty($data['from_date']) && !empty($data['to_date'])){ $data = $request->data; $array_data['where'] = ""; } } break; $array_data['search'] =" AND `t`.`ticket_no` LIKE '%{$array_data['search_keyword']}%' "; case "Ticket No.": break; $array_data['search'] = " AND `t`.`id` = {$array_data['search_keyword']} "; case "ID": switch($array_data['search_type']){ if(!empty($array_data['search_keyword'])){ $array_data['search'] = ""; $array_data['sort'] = " ORDER BY {$array_data['order']} {$array_data['sort']} "; $array_data['order']=($array_data['order'] =='#' ? $array_data['order'] = 'id' : $array_data['order'] ); $array_data['offset_limit'] = " LIMIT {$array_data['offset']},{$array_data['limit']}"; $array_data['limit'] = $request->length; $array_data['offset'] = $request->start; // $array_data['order']=($array_data['order'] =='#' ? $array_data['order'] = 'id' : $array_data['order'] ); $array_data['order'] = $request->columns[$request->order[0]['column']]['data']; $array_data['sort'] = $request->order[0]['dir']; } $array_data['search_type'] = json_decode($request->search_type,true)[0]; } else { $array_data['search_type'] = ""; if(empty($request->search_type)){ $array_data['search_keyword'] = $request->search['value']; public function fetchMyTicket(Request $request){ } return response()->json($result); $result['recordsFiltered'] = $this->ticket->getMyDepartmentTicketsFilteredCount($array_data)[0]->FilteredCount; $result['recordsTotal'] = $this->ticket->getMyDepartmentTicketsCount($array_data)[0]->Count; $result['draw'] = $request->draw; } ]; "support_position" => $row->support_position "support" => $row->support, "assignee" => $row->assignee, "condition" => $row->ticket_condition, "end_date" =>$row->end_date, "start_date" => $row->start_date,
| ver. 1.4 |
.
| PHP 8.1.32 | Generation time: 0 |
proxy
|
phpinfo
|
Settings