⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.1
Server IP:
185.238.29.86
Server:
Linux server2 6.8.12-6-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-6 (2024-12-19T19:05Z) x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.31
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
dnc
/
@core
/
resources
/
views
/
backend
/
pages
/
View File Name :
offers.blade.php
@extends('backend.admin-master') @section('site-title') {{__('Offers Section')}} @endsection @section('style') @include('backend.partials.datatable.style-enqueue') @endsection @section('content') <div class="col-lg-12 col-ml-12 padding-bottom-30"> <div class="row"> <div class="col-lg-12"> <div class="margin-top-40"></div> @include('backend/partials/message') @include('backend/partials/error') </div> <div class="col-lg-12 mt-t"> <div class="card"> <div class="card-body"> <div class="header-wrapp"> <h4 class="header-title">{{__('Offer Items')}} </h4> <div class="header-title"> <button type="submit" class="btn btn-primary mt-4 pr-4 pl-4" data-toggle="modal" data-target="#add_new_offer">{{__('Add New Offer')}}</button> </div> </div> <x-bulk-action/> <ul class="nav nav-tabs" id="myTab" role="tablist"> @php $a=0; @endphp @foreach($all_offers as $key => $offers) <li class="nav-$all_offer"> <a class="nav-link @if($a == 0) active @endif" data-toggle="tab" href="#slider_tab_{{$key}}" role="tab" aria-controls="home" aria-selected="true">{{get_language_by_slug($key)}}</a> </li> @php $a++; @endphp @endforeach </ul> <div class="tab-content margin-top-40" id="myTabContent"> @php $b=0; @endphp @foreach($all_offers as $key => $offers) <div class="tab-pane fade @if($b == 0) show active @endif" id="slider_tab_{{$key}}" role="tabpanel" > <div class="table-wrap table-responsive"> <table class="table table-default"> <thead> <th class="no-sort"> <div class="mark-all-checkbox"> <input type="checkbox" class="all-checkbox"> </div> </th> <th>{{__('ID')}}</th> <th>{{__('Title')}}</th> <th>{{__('Icon')}}</th> <th>{{__('Description')}}</th> <th>{{__('Action')}}</th> </thead> <tbody> @foreach($offers as $data) <tr> <td> <x-bulk-delete-checkbox :id="$data->id"/> </td> <td>{{$data->id}}</td> <td>{{$data->title}}</td> <td class="view"><i class="{{$data->icon}}"></i></td> <td>{{$data->description}}</td> <td> <x-delete-popover :url="route('admin.offer.delete',$data->id)"/> <a href="#" data-toggle="modal" data-target="#offer_item_edit_modal" class="btn btn-primary btn-xs mb-3 mr-1 offer_edit_btn" data-id="{{$data->id}}" data-action="{{route('admin.offer.update')}}" data-title="{{$data->title}}" data-iconFeature="{{$data->icon}}" data-description="{{$data->description}}" data-lang="{{$data->lang}}" > <i class="ti-pencil"></i> </a> </td> </tr> @endforeach </tbody> </table> </div> </div> @php $b++; @endphp @endforeach </div> </div> </div> </div> </div> </div> <!-- Start Add New Offers --> <!-- Modal --> <div class="modal fade" id="add_new_offer" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header "> <h5 class="modal-title">{{__('New Offers')}}</h5> <button type="button" class="close" data-dismiss="modal"><span>×</span></button> </div> <form action="{{route('admin.offer')}}" id="add_new_offer_modal_form" method="post" enctype="multipart/form-data"> <div class="modal-body"> @csrf <div class="form-group"> <label for="lang">{{__('Languages')}}</label> <select name="lang" id="lang" class="form-control"> @foreach($all_languages as $lang) <option value="{{$lang->slug}}">{{$lang->name}}</option> @endforeach </select> </div> <div class="form-group"> <label for="title">{{__('Title')}}</label> <input type="text" class="form-control" id="title" name="title" placeholder="{{__('Title')}}"> </div> <div class="form-group"> <label for="icon" class="d-block">{{__('Icon')}}</label> <div class="btn-group icon"> <button type="button" class="btn btn-primary iconpicker-component"> <i class="fas fa-phone"></i> </button> <button type="button" class="icp icp-dd btn btn-primary dropdown-toggle" data-selected="fas fa-phone" data-toggle="dropdown"> <span class="caret"></span> <span class="sr-only">Toggle Dropdown</span> </button> <div class="dropdown-menu"></div> </div> <input type="hidden" class="form-control" id="icon" value="fas fa-phone" name="icon"> </div> <div class="form-group"> <label for="description">{{__('Description')}}</label> <textarea id="description" name="description" class="form-control max-height-120" cols="30" rows="10" placeholder="{{__('Description')}}"></textarea> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal">{{__('Close')}}</button> <button type="submit" class="btn btn-primary">{{__('Submit')}}</button> </div> </form> </div> </div> </div> <!-- End Add New Offers --> <div class="modal fade" id="offer_item_edit_modal" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title">{{__('Edit Key Feature Item')}}</h5> <button type="button" class="close" data-dismiss="modal"><span>×</span></button> </div> <form action="{{route('admin.offer.update')}}" method="post"> <div class="modal-body"> @csrf <input type="hidden" name="id" id="offer_id" value=""> <div class="form-group"> <label for="edit_language">{{__('Languages')}}</label> <select name="lang" id="edit_language" class="form-control"> @foreach($all_languages as $lang) <option value="{{$lang->slug}}">{{$lang->name}}</option> @endforeach </select> </div> <div class="form-group"> <label for="edit_title">{{__('Title')}}</label> <input type="text" class="form-control" id="edit_title" name="title" placeholder="{{__('Title')}}"> </div> <div class="form-group"> <label for="edit_icon" class="d-block">{{__('Icon')}}</label> <div class="btn-group edit_icon"> <button type="button" class="btn btn-primary iconpicker-component"> <i class="fas fa-exclamation-triangle"></i> </button> <button type="button" class="icp icp-dd btn btn-primary dropdown-toggle" data-selected="fas fa-exclamation-triangle" data-toggle="dropdown"> <span class="caret"></span> <span class="sr-only">Toggle Dropdown</span> </button> <div class="dropdown-menu"></div> </div> <input type="hidden" class="form-control" id="edit_icon" value="fas fa-exclamation-triangle" name="icon"> </div> <div class="form-group"> <label for="edit_description">{{__('Description')}}</label> <textarea id="edit_description" name="description" class="form-control max-height-120" cols="30" rows="10" placeholder="{{__('Description')}}"></textarea> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal">{{__('Close')}}</button> <button type="submit" class="btn btn-primary">{{__('Save Changes')}}</button> </div> </form> </div> </div> </div> @endsection @section('script') @include('backend.partials.datatable.script-enqueue') <script> (function($){ "use strict"; $(document).ready(function () { <x-bulk-action-js :url="route('admin.offer.bulk.action')" /> <x-icon-picker/> $(document).on('click','.offer_edit_btn',function(){ var el = $(this); var id = el.data('id'); var title = el.data('title'); var icon = el.data('icon'); var description = el.data('description'); var form = $('#offer_item_edit_modal'); form.find('#offer_id').val(id); form.find('#edit_title').val(title); form.find('#edit_description').val(description); form.find('#edit_language option[value='+el.data("lang")+']').attr('selected',true); form.find('#edit_icon').val(el.data('iconfeature')); form.find('.edit_icon .icp-dd').attr('data-selected',el.data('iconfeature')); form.find('.edit_icon .iconpicker-component i').attr('class',el.data('iconfeature')); }); }); })(jQuery); </script> @endsection