!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/uploads/script/app/Http/Controllers/Seller/   drwxr-xr-x
Free 13.21 GB of 57.97 GB (22.78%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace App\Http\Controllers\Seller;

use 
App\Http\Controllers\Controller;
use 
Illuminate\Http\Request;
use 
App\Stock;
use 
Auth;
class 
InventoryController extends Controller
{
    
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    
public function index(Request $request)
    {
      
$plan=user_limit();
      
$plan=filter_var($plan['inventory']);
            if(
$plan == false){
               return 
back();
               
      } 

        if (!empty(
$request->src)) {
            
$posts=Stock::where('sku','LIKE','%'.$request->src.'%')->whereHas('term',function($q){
                return 
$q->where('user_id',Auth::id());
            })->
with('term')->paginate(50);
        }
        elseif(!empty(
$request->status)){
            if (
$request->status=='in') {
                
$posts=Stock::where('stock_status',1)->whereHas('term',function($q){
                    return 
$q->where('user_id',Auth::id());
                })->
with('term')->paginate(50);
            }
            else{
                
$posts=Stock::where('stock_status',0)->whereHas('term',function($q){
                    return 
$q->where('user_id',Auth::id());
                })->
with('term')->paginate(50); 
            }
           

        }
        else{
           
$posts=Stock::with('term')->whereHas('term',function($q){
                return 
$q->where('user_id',Auth::id());
            })->
paginate(30);
        } 

       
       
$src=$request->src ?? '';
       
$status=$request->status ?? '';
       
$in_stock=Stock::where('stock_status',1)->whereHas('term',function($q){
                return 
$q->where('user_id',Auth::id());
            })->
count();
       
$out_stock=Stock::where('stock_status',0)->whereHas('term',function($q){
                return 
$q->where('user_id',Auth::id());
            })->
count();
       
$total=Stock::whereHas('term',function($q){
                return 
$q->where('user_id',Auth::id());
            })->
count();

       return 
view('seller.inventory.index',compact('posts','total','in_stock','out_stock','status'));
    }

   

    
/**
     * Display the specified resource.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    
public function show($id)
    {
        
//
    
}

   

    
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    
public function update(Request $request$id)
     {
         
$id=base64_decode($id);
         
$stock=Stock::with('term')->find($id);
        if(
$stock->term->user_id != Auth::id()){
            die();
        }
         if (!empty(
$stock)) {

            if (!empty(
$request->stock_manage)) {
              
$stock->stock_manage=$request->stock_manage;
          }



          if (!empty(
$request->stock_qty)) {
              
$stock->stock_qty=$request->stock_qty;
          }
          if (!empty(
$request->sku)) {
              
$stock->sku=$request->sku;
          }

          
$stock->stock_status=$request->stock_status ?? 0;


          
$stock->save();
         }

          return 
response()->json(['Stock Update Successfully']);
    }

   
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0066 ]--