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


Viewing file:     NoticeController.php (4.43 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\Notice;
use 
Illuminate\Http\Request;

class 
NoticeController extends Controller
{
    public function 
index(){

        return 
view('admin.notice.index');
    }

    public function 
getAll()
    {

        
$customers auth()->user()->notices()->select(['id''title''description','for''status']);
        return 
datatables()->of($customers)
            ->
addColumn('for', function ($q) {
                if(
$q->for=='normal'){
                    
$type='Customer' ;
                }else {
                    
$type ucfirst(str_replace('_''-'$q->for));
                }
                return 
$type;
            })
            ->
addColumn('description', function ($q) {
                
$descclean($q->description);
                return 
$desc;
            })
            ->
addColumn('status', function ($q) {
                if(
$q->status=='active'){
                    
$status'<strong class="text-white bg-success px-2 py-1 rounded status-font-size"> '.ucfirst($q->status).' </strong>';
                }else{
                    
$status'<strong class="text-white bg-danger px-2 py-1 rounded status-font-size"> '.ucfirst($q->status).' </strong>';
                }
                return 
$status;
            })
            ->
addColumn('action', function (Notice $q) {
                return 
"<a class='btn btn-sm btn-info' href='" route('admin.notice.edit', [$q->id]) . "'>Edit</a>".'&nbsp;&nbsp;&nbsp;
                <button class="btn btn-sm btn-danger" data-message="Are you sure you want to delete this notice?"
                                        data-action=' 
route('admin.notice.destroy', [$q]) . '
                                        data-input={"_method":"delete"}
                                        data-toggle="modal" data-target="#modal-confirm">Delete</button>'
;
            })
            ->
rawColumns(['action''for''description','status'])
            ->
toJson();
    }
    public function 
create(){

        return 
view('admin.notice.create');
    }

    public function 
store(Request $request){
        
$request->validate([
            
'title'=>'required',
            
'description'=>'required',
            
'type'=>'required|in:reseller,normal,master_reseller,reseller_customer,master_reseller_customer,all',
            
'status'=>'required|in:active,inactive',
        ]);
        
$attached_data='';
        if (
$request->hasFile('attached_data')) {
            
$file $request->file('attached_data');
            
$filename time() . '.' $file->getClientOriginalExtension();
            
$file->move(public_path('/uploads'), $filename);
            
$attached_data $filename;
        }
        
$notice= new Notice();
        
$notice->admin_id=auth()->user()->id;
        
$notice->title=$request->title;
        
$notice->descriptionclean($request->description);
        
$notice->attached_data=$attached_data;
        
$notice->for=$request->type;
        
$notice->status=$request->status;
        
$notice->save();

        return 
redirect()->route('admin.notice.index')->with('success'trans('admin.message.notice_created'));
    }

    public function 
edit(Notice $notice){
        
$data['notice']=$notice;
        return 
view('admin.notice.edit'$data);
    }

    public function 
update(Request $requestNotice $notice){

        
$request->validate([
            
'title'=>'required',
            
'description'=>'required',
            
'type'=>'required|in:reseller,normal,master_reseller,reseller_customer,master_reseller_customer,all',
            
'status'=>'required|in:active,inactive',
        ]);
        
$notice->admin_id=auth()->user()->id;
        
$notice->title=$request->title;
        
$notice->description=clean($request->description);
        
$notice->for=$request->type;
        
$notice->status=$request->status;

        if (
$request->hasFile('attached_data')) {
            
$file $request->file('attached_data');
            
$filename time() . '.' $file->getClientOriginalExtension();
            
$file->move(public_path('/uploads'), $filename);
            
$notice->attached_data $filename;
        }
        
$notice->save();

        return 
redirect()->route('admin.notice.index')->with('success',  trans('admin.message.notice_updated'));
    }


    public function 
destroy(Notice $notice){
        
$notice->delete();
        return 
redirect()->route('admin.notice.index')->with('success'trans('admin.message.notice_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.0037 ]--