Sh3ll
OdayForums


Server : Apache
System : Linux 145.162.205.92.host.secureserver.net 5.14.0-611.45.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Apr 1 05:56:53 EDT 2026 x86_64
User : tradze ( 1001)
PHP Version : 8.1.34
Disable Function : NONE
Directory :  /home/tradze/public_html/storage/framework/views/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/tradze/public_html/storage/framework/views/3adae3ef3739f571b48a1b1a274a95c11c7807ae.php
<?php $__env->startSection('title'); ?>

    <?php echo $page_title; ?>

<?php $__env->stopSection(); ?>

<?php $__env->startSection('css_page'); ?>
    <link href="<?php echo e(asset('/themes/admin/assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.css')); ?>" rel="stylesheet">
<?php $__env->stopSection(); ?>



<?php $__env->startSection('content'); ?>

    <!-- BEGIN PAGE HEADER-->
    <div class="page-bar">
        <ul class="page-breadcrumb">
            <li>
                <i class="fa fa-home"></i>
                <a href="#">Home</a>
                <i class="fa fa-angle-right"></i>
            </li>
            <li>
                <a href="#">Website</a>
                <i class="fa fa-angle-right"></i>
            </li>
            <li>
                <a href="#">Radius</a>
            </li>
        </ul>
    </div>
    <!-- END PAGE HEADER-->

    <!--display messaged-->
    <?php echo $__env->make('flash::message', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <!--/ display messaged-->

    <div class="row">
        <div class="col-md-12">
            <div class="portlet">
                <div class="portlet-title">
                    <div class="caption">
                        Radius Setting
                    </div>
                </div>
                <div class="portlet-body">
                    <div class="container-fluid">
                        <div class="row">
                            <div class="row" style="margin-bottom: 20px;">
                                <div class="col-md-6">
                                    <div class="alert alert-info">
                                        <strong>Default Radius:</strong> 
                                        <span id="defaultRadiusText"><?php echo e($radius->value ?? 10); ?> km</span>
                            
                                        <button class="btn btn-xs blue pull-right" id="editDefaultRadius">
                                            Edit
                                        </button>
                                    </div>
                                </div>
                            </div>
                            <table class="table table-striped table-bordered table-hover" id="table">
                                <thead>
                                <tr class="heading">
                                    <th width="20%">Name</th>
                                    <th width="20%">Radius</th>
                                    <th width="10%">Action</th>
                                </tr>
                                </thead>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="modal fade" id="radiusModal" tabindex="-1">
    <div class="modal-dialog">
        <div class="modal-content">
            <form id="radiusForm">
                <?php echo csrf_field(); ?>
                <div class="modal-header">
                    <h4 class="modal-title">Update Radius</h4>
                </div>

                <div class="modal-body">
                    <input type="hidden" name="id" id="radius_id">
                    <input type="hidden" name="type" id="radius_type">

                    <div class="form-group">
                        <label>Radius (km)</label>
                        <input type="number" name="radius" id="radius_value" class="form-control" required>
                    </div>
                </div>

                <div class="modal-footer">
                    <button type="submit" class="btn green">Save</button>
                    <button type="button" class="btn default" data-dismiss="modal">Cancel</button>
                </div>
            </form>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts_page_plugins'); ?>
    <script src="<?php echo e(asset('/themes/admin/assets/global/scripts/datatable.js')); ?>" type="text/javascript"></script>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts_page2'); ?>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts_custom'); ?>
    Demo.init();
<?php $__env->stopSection(); ?>


<?php $__env->startSection('scripts_custom2'); ?>
    <script>
    // =========================
    // OPEN USER EDIT MODAL
    // =========================
    $(document).on('click', '.edit-radius', function () {
        $('#radius_id').val($(this).data('id'));
        $('#radius_type').val('user');
        $('#radius_value').val($(this).data('radius'));

        $('#radiusModal').modal('show');
    });

    // =========================
    // OPEN DEFAULT EDIT MODAL
    // =========================
    $(document).on('click', '#editDefaultRadius', function () {
        let currentRadius = $('#defaultRadiusText').text().replace(' km', '');

        $('#radius_id').val(0);
        $('#radius_type').val('default');
        $('#radius_value').val(currentRadius);

        $('#radiusModal').modal('show');
    });

    // =========================
    // SUBMIT FORM
    // =========================
    $('#radiusForm').submit(function (e) {
        e.preventDefault();

        let type = $('#radius_type').val();

        $.ajax({
            url: '<?php echo e(route("admin.settings.radius.update")); ?>',
            method: 'POST',
            data: $(this).serialize(),
            success: function (res) {
                if (res.success) {

                    $('#radiusModal').modal('hide');

                    // Update UI based on type
                    if (type === 'default') {
                        $('#defaultRadiusText').text(res.radius + ' km');
                    } else {
                        $('#table').DataTable().ajax.reload(null, false);
                    }

                    // Optional toast
                    if (typeof toastr !== 'undefined') {
                        toastr.success(res.message);
                    }
                }
            },
            error: function () {
                alert('Something went wrong!');
            }
        });
    });

    // =========================
    // INIT DATATABLE
    // =========================
    $(document).ready(function()
    {
        $(".select2").select2();

        $(".select2filter").select2({
            placeholder: 'Tag-uri'
        });

        $('.date-picker').datepicker({
            orientation: "left",
            autoclose: true,
            format: 'yyyy-mm-dd',
        });

        var grid = new Datatable();

        grid.init({
            src: $("#table"),

            onSuccess: function (grid) {},
            onError: function (grid) {},
            onDataLoad: function(grid) {},

            loadingMessage: 'Loading...',

            dataTable: {
                sDom: '"top"i',
                bStateSave: true,

                columns: [
                    { data: 'name', name: 'name' },
                    { data: 'radius', name: 'radius' },
                    { data: 'actions', name: 'actions', orderable: false, searchable: false },
                ],

                lengthMenu: [
                    [10, 20, 50],
                    [10, 20, 50]
                ],

                pageLength: 20,

                ajax: {
                    url: '<?php echo route('admin.settings.radius.data'); ?>',
                    beforeSend: function(){
                        $("#table").find('tbody').html(
                            "<tr><td align='center' colspan='3' class='bold'>" +
                            "<i class='fa fa-spinner fa-spin'></i> <?php echo e(trans('general.action_is_loading')); ?>" +
                            "</td></tr>"
                        );
                    },
                },

                bSort: false,
            }
        });

    });
</script>
<?php $__env->stopSection(); ?>



<?php echo $__env->make('admin.layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/tradze/public_html/app/Modules/Accounts/Resources/Views/admin/settings/radius/index.blade.php ENDPATH**/ ?>

ZeroDay Forums Mini