���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
/
cutunix-shot
/
app
/
Livewire
/
Site
/
Pages
/
Analyze
/
MakeSlice
/
Viewing: Index.php
<?php namespace App\Livewire\Site\Pages\Analyze\MakeSlice; use Livewire\Component; use App\Models\UnitList; use App\Models\AnalyzeMaterial; use App\Helpers\HelperClass\GeneralUseV2; use Masmerise\Toaster\Toastable; class Index extends Component { use Toastable; public $project_id; public $form = [ 'rotate_status' => 0, 'num_slice' => 1, 'material_id' => '', 'panel_description' => '', 'slice' => [ 0 => [ 'length' => '', 'width' => '', 'count' => '1', 'length_one' => 0, 'length_two' => 0, 'width_one' => 0, 'width_two' => 0, 'rotate_status' => 0, 'description' => '' ] ] ]; public function handleIncrementingOrDecrementingRow($type) { if ($type == 'increment') { $this->form['num_slice'] = $this->form['num_slice'] + 1; array_push($this->form['slice'], [ 'length' => '', 'width' => '', 'count' => '1', 'length_one' => 0, 'length_two' => 0, 'width_one' => 0, 'width_two' => 0, 'rotate_status' => 0, 'description' => '', ]); } elseif (1 < $this->form['num_slice']) { $this->form['num_slice'] = $this->form['num_slice'] - 1; array_splice($this->form['slice'], $this->form['num_slice'], 1); } } public function removeSliceRow($s = null) { array_splice($this->form['slice'], $s, 1); $this->form['num_slice'] = $this->form['num_slice'] - 1; } public function handelSubmit() { //VALIDATION $validateUnit = validateSliceData($this->form); if ($validateUnit) { $this->error($validateUnit); return; } if ($this->form['rotate_status'] != 0) { foreach ($this->form['slice'] as $key => $row) { $this->form['slice'][$key]['rotate_status'] = 1; } } $material = AnalyzeMaterial::where('id', $this->form['material_id'])->first(); $result = GeneralUseV2::CustomList($this->form, $material,null,$this->project_id); if($this->project_id){ return redirect()->to('/' . app()->getLocale() . '/analyze/projects/units/'.$this->project_id)->success(trans('container.operation successful')); }else{ return redirect()->to('/' . app()->getLocale() . '/analyze/list')->success(trans('container.operation successful')); } } public function mount($id=null) { if($id){ $this->project_id=$id; } } public function render() { $materials = AnalyzeMaterial::get(); return view('livewire.site.pages.analyze.make-slice.index', ['materials' => $materials]) ->layout('components.layouts.site.app', ['page_name' => 'analyze', 'previousRoute' => $this->project_id ? route('analyze.projects.units', ['locale' => app()->getLocale(), 'id' => $this->project_id]) : route('analyze.category', ['locale' => 'fa'])]); } }
Coded With 💗 by
0x6ick Mod By V1rus_Alfa