!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)

/var/www/html/main_file/app/Http/Controllers/   drwxrwxr-x
Free 13.16 GB of 57.97 GB (22.71%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace App\Http\Controllers;

use 
App\Models\Employee;
use 
App\Models\OtherPayment;
use 
Illuminate\Http\Request;

class 
OtherPaymentController extends Controller
{
    public function 
otherpaymentCreate($id)
    {
        
$employee Employee::find($id);
        
$otherpaytype=OtherPayment::$otherPaymenttype;

        return 
view('otherpayment.create'compact('employee','otherpaytype'));
    }

    public function 
store(Request $request)
    {
        if(
\Auth::user()->can('create other payment'))
        {
            
$validator \Validator::make(
                
$request->all(), [
                                   
'employee_id' => 'required',
                                   
'title' => 'required',
                                   
'amount' => 'required',
                               ]
            );
            if(
$validator->fails())
            {
                
$messages $validator->getMessageBag();

                return 
redirect()->back()->with('error'$messages->first());
            }

            
$otherpayment              = new OtherPayment();
            
$otherpayment->employee_id $request->employee_id;
            
$otherpayment->title       $request->title;
            
$otherpayment->type       $request->type;
            
$otherpayment->amount      $request->amount;
            
$otherpayment->created_by  \Auth::user()->creatorId();
            
$otherpayment->save();

            return 
redirect()->back()->with('success'__('OtherPayment  successfully created.'));
        }
        else
        {
            return 
redirect()->back()->with('error'__('Permission denied.'));
        }
    }

    public function 
show(OtherPayment $otherpayment)
    {
        return 
redirect()->route('commision.index');
    }

    public function 
edit($otherpayment)
    {
        
$otherpayment OtherPayment::find($otherpayment);
        if(
\Auth::user()->can('edit other payment'))
        {
            if(
$otherpayment->created_by == \Auth::user()->creatorId())
            {
                
$otherpaytypes=OtherPayment::$otherPaymenttype;

                return 
view('otherpayment.edit'compact('otherpayment','otherpaytypes'));
            }
            else
            {
                return 
response()->json(['error' => __('Permission denied.')], 401);
            }
        }
        else
        {
            return 
response()->json(['error' => __('Permission denied.')], 401);
        }
    }

    public function 
update(Request $requestOtherPayment $otherpayment)
    {
        if(
\Auth::user()->can('edit other payment'))
        {
            if(
$otherpayment->created_by == \Auth::user()->creatorId())
            {
                
$validator \Validator::make(
                    
$request->all(), [

                                       
'title' => 'required',
                                       
'amount' => 'required',
                                   ]
                );
                if(
$validator->fails())
                {
                    
$messages $validator->getMessageBag();

                    return 
redirect()->back()->with('error'$messages->first());
                }

                
$otherpayment->title  $request->title;
                
$otherpayment->type  $request->type;
                
$otherpayment->amount $request->amount;
                
$otherpayment->save();

                return 
redirect()->back()->with('success'__('OtherPayment successfully updated.'));
            }
            else
            {
                return 
redirect()->back()->with('error'__('Permission denied.'));
            }
        }
        else
        {
            return 
redirect()->back()->with('error'__('Permission denied.'));
        }
    }

    public function 
destroy(OtherPayment $otherpayment)
    {
        if(
\Auth::user()->can('delete other payment'))
        {
            if(
$otherpayment->created_by == \Auth::user()->creatorId())
            {
                
$otherpayment->delete();

                return 
redirect()->back()->with('success'__('OtherPayment successfully deleted.'));
            }
            else
            {
                return 
redirect()->back()->with('error'__('Permission denied.'));
            }
        }
        else
        {
            return 
redirect()->back()->with('error'__('Permission denied.'));
        }
    }
}

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