���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
/
Start
/
Viewing: Index.php
<?php namespace App\Livewire\Site\Pages\Analyze\Start; use Livewire\Component; use Modules\Central\Models\AnalyzeProject; use Modules\Project\Models\Order; class Index extends Component { public $form = []; public $analyzeMessage; public $latestAnalyzeProject; public function mount() { $this->latestAnalyzeProject = AnalyzeProject::where('user_id', auth()->id())->latest()->first(); if (!is_null($this->latestAnalyzeProject)) $this->form['name'] = $this->latestAnalyzeProject->name; else $this->form['name'] = trans('container.project 1'); $this->form['width_strip'] = $this->latestAnalyzeProject?->width_strip ?? 1; $this->form['height_strip'] = $this->latestAnalyzeProject?->height_strip ?? 'single'; $this->form['description'] = $this->latestAnalyzeProject?->description ?? null; $this->form['user_id'] = auth()->id(); $this->checkAttentionShowed(); } public function handelSubmit() { $orders = Order::where('user_id', auth('web')->user()->id) ->where('mode', Order::MODE_ANALYZE) ->where('name', $this->form['name'])->get(); if (count($orders)) { $this->dispatch('error', 'شما یک پروژه ثبت شده با این نام دارید؛ لطفا آن را تغییر دهید'); return; } $this->saveAnalyzeProject(); if (!auth()->user()->hasAnyMaterialDimension()) $this->dispatch('openModal', component: 'site.pages.analyze.start.modal.confirm'); else return redirect()->to('/' . app()->getLocale() . '/analyze/category'); } public function render() { return view('livewire.site.pages.analyze.start.index') ->layout('components.layouts.site.app', ['page_name' => 'analyze', 'previousRoute' => route('analyze.index', ['locale' => 'fa'])]); } protected function checkAttentionShowed() { if (session()->has('analyze_new_project_attention') && session('analyze_new_project_attention') == 'not show') { session()->put('analyze_new_project_attention', 'show'); } if (!session()->has('analyze_new_project_attention')) { session()->put('analyze_new_project_attention', 'not show'); } $this->analyzeMessage = trans('container.' . 'Dear user; Thank you for your choice. Before any activity or use of the Analyze application, please customize your desired settings in the advanced settings section. Thank you'); } public function saveAnalyzeProject() { $existsProject = AnalyzeProject::where('user_id', auth()->id())->latest()->first(); if ($existsProject) { $existsProject->update([ 'name' => $this->form['name'], 'width_strip' => $this->form['width_strip'], 'height_strip' => $this->form['height_strip'], 'description' => $this->form['description'], ]); } else { AnalyzeProject::create($this->form); } } }
Coded With 💗 by
0x6ick Mod By V1rus_Alfa