Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/mcoil.corals.io/resources/views/admin/website-setting/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/mcoil.corals.io/resources/views/admin/website-setting/index.blade.php
@extends('layouts.admin.app')
@section('content') 
<div class="row">
    <div class="col-md-12">
        <section class="content">
        @include('layouts.errors-and-messages')
            <div class="box">
               {!! Form::model($setting,['method' => 'POST','route' => ['admin.setting.update',$setting->id], 'id' => 'frm_edit', 'class'=>'form','enctype'=>'multipart/form-data']) !!}
                <div class="box-body">
                	<div class="col-md-12">
                		<h3 class="bold">Website Settings <small>- set your logos and favicon icon</small></h3>
                		<div class="row">
                            <div class="col-md-12">
                                <div class="form-group">
                                    <label for="name">Business Name <span class="text-danger">*</span></label>
                                    <input type="text" name="name" id="name" placeholder="Business Name" class="form-control input-lg @if(!empty($setting->name)) bg-success @endif" value="{{ $setting->name }}">
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label for="header_logo">Frontend - Header Logo</label>
                                    {!! Form::file('header_logo', array('placeholder' => 'Image One','class' => 'form-control input-lg','id'=>'header_logo','accept'=>'image/*')) !!}
                                    @if (!empty($setting->header_logo))
                                    <div class="col-md-12">
                                        <br>
                                        <img src="{{ URL::to('/') }}/public/img/images_uploaded/{{basename($setting->header_logo)}}" class="img-responsive img-thumbnail" id="image_header_logo-but">
                                        <div>
                                            <button type="button" class="btn btn-danger btn-sm btn-block remove_image" id="header_logo-but">Remove image?</button><br />
                                        </div>
                                    </div>
                                    @endif
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label for="header_logo">Frontend - Footer Logo</label>
                                    {!! Form::file('footer_logo', array('placeholder' => 'Image One','class' => 'form-control input-lg','id'=>'footer_logo','accept'=>'image/*')) !!}
                                    @if (!empty($setting->footer_logo))
                                    <div class="col-md-12">
                                        <br>
                                        <img src="{{ URL::to('/') }}/public/img/images_uploaded/{{basename($setting->footer_logo)}}" class="img-responsive img-thumbnail" id="image_footer_logo-but">
                                        <div>
                                            <button type="button" class="btn btn-danger btn-sm btn-block remove_image" id="footer_logo-but">Remove image?</button><br />
                                        </div>
                                    </div>
                                    @endif
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label for="backend_logo">Admin - Logo</label>
                                    {!! Form::file('backend_logo', array('placeholder' => 'Image One','class' => 'form-control input-lg','id'=>'backend_logo','accept'=>'image/*')) !!}
                                    @if (!empty($setting->backend_logo))
                                    <div class="col-md-12">
                                        <br>
                                        <img src="{{ URL::to('/') }}/public/img/images_uploaded/{{basename($setting->backend_logo)}}" class="img-responsive img-thumbnail" id="image_backend_logo-but">
                                        <div>
                                            <button type="button" class="btn btn-danger btn-sm btn-block remove_image" id="backend_logo-but">Remove image?</button><br />
                                        </div>
                                    </div>
                                    @endif
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label for="favicon">Favicon</label>
                                    {!! Form::file('favicon', array('placeholder' => 'Image One','class' => 'form-control input-lg','id'=>'favicon','accept'=>'image/*')) !!}
                                    @if (!empty($setting->favicon))
                                    <div class="col-md-12">
                                        <br>
                                        <img src="{{ URL::to('/') }}/public/img/images_uploaded/{{basename($setting->favicon)}}" class="img-responsive img-thumbnail img-favicon" id="image_favicon-but">
                                        <div>
                                            <button type="button" class="btn btn-danger btn-sm btn-block remove_image" id="favicon-but">Remove image?</button><br />
                                        </div>
                                    </div>
                                    @endif
                                </div>
                            </div>
                        </div>
                        <div class="row margin-top-30">
                            <div class="col-md-6">
                                <button type="submit" class="btn btn-lg btn-block btn-success">Update</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </div>
</div>
@endsection
@section('js')
<script src="{{ asset('https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.1/jquery.validate.min.js') }}"></script>
<script type="text/javascript">
$(document).ready(function () {
    $('#frm_edit').validate({
        rules: {
			name: { required: true }
		},
		messages: {
			name: { required: 'Please enter a business name' }
		}
    });
     $(document).on('click','.remove_image',function(e) {
        e.preventDefault();
        var attrVal = $(this).attr('id');
        var data = {'type':attrVal};
        var dataUrl = "{{url('/admin/setting/'.$setting->id.'/remove-image')}}";
        $.ajax({
            type: "POST",
            url:dataUrl,
            data : data,
            success: function(data) {
                if (data) {
                    $('#image_'+attrVal).remove();
                    $("#"+attrVal).remove();
                    toastr.remove();
                    toastr.clear();
                    toastr.options.closeButton = true;
                    toastr.options.debug = false;
                    toastr.options.progressBar = false;
                    toastr.options.positionClass = 'toast-bottom-full-width';
                    toastr.options.preventDuplicates = true;
                    toastr.options.onclick = null;
                    toastr.options.showDuration = 1000;
                    toastr.options.hideDuration = 1000;
                    toastr.options.timeOut = 5000;
                    toastr.options.extendedTimeOut = 1000;
                    toastr.options.showEasing = 'swing';
                    toastr.options.hideEasing = 'linear';
                    toastr.options.showMethod = 'fadeIn';
                    toastr.options.hideMethod = 'fadeOut';
                    toastr.success('Image Removed Successfully','Success');
                } else {
                    toastr.clear();
                    toastr.options.closeButton = true;
                    toastr.options.debug = false;
                    toastr.options.progressBar = false;
                    toastr.options.positionClass = 'toast-bottom-full-width';
                    toastr.options.preventDuplicates = true;
                    toastr.options.onclick = null;
                    toastr.options.showDuration = 1000;
                    toastr.options.hideDuration = 1000;
                    toastr.options.timeOut = 5000;
                    toastr.options.extendedTimeOut = 1000;
                    toastr.options.showEasing = 'swing';
                    toastr.options.hideEasing = 'linear';
                    toastr.options.showMethod = 'fadeIn';
                    toastr.options.hideMethod = 'fadeOut';
                    toastr.error('Invalid Request','Error');
                }
            }
        });
    });
});
</script>
@endsection

Spamworldpro Mini