[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: 99609f4fe8ef38a0706b1e9082c50592.php
<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag; ?> <?php foreach($attributes->onlyProps([ 'headers' => [], 'collection' => [], 'actions' => [], 'search_action' => '', 'limits' => [10, 20, 50, 100, 500, -1], 'defaultSearch' => true ]) as $__key => $__value) { $$__key = $$__key ?? $__value; } ?> <?php $attributes = $attributes->exceptProps([ 'headers' => [], 'collection' => [], 'actions' => [], 'search_action' => '', 'limits' => [10, 20, 50, 100, 500, -1], 'defaultSearch' => true ]); ?> <?php foreach (array_filter(([ 'headers' => [], 'collection' => [], 'actions' => [], 'search_action' => '', 'limits' => [10, 20, 50, 100, 500, -1], 'defaultSearch' => true ]), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) { $$__key = $$__key ?? $__value; } ?> <?php $__defined_vars = get_defined_vars(); ?> <?php foreach ($attributes as $__key => $__value) { if (array_key_exists($__key, $__defined_vars)) unset($$__key); } ?> <?php unset($__defined_vars); ?> <?php function tableCellText($item, array $header) { if (!isset($header['value'])) { return ''; } elseif (is_callable($header['value'])) { return $header['value']($item); } elseif (is_object($item) || is_array($item)) { return data_get($item, $header['value']); } else { return $header['value']; } } function tableActionLink($item,$action) { if (!isset($action['link'])) { return ''; } elseif (is_callable($action['link'])) { return $action['link']($item); } else { return $action['link']; } } $hasActions = is_array($actions) && count($actions); $hasPagination = $collection instanceof Illuminate\Pagination\LengthAwarePaginator; $successStatus = ['active','complete','received']; $dangerStatus = ['inactive','pending','deactive']; ?> <div class="col-md-12"> <div class="row mb-1 pe-2 justify-content-between"> <div class="col-3"> <?php if($hasPagination): ?> <div class="col-4"> <select name="limit" class="form-select" > <?php $__currentLoopData = $limits; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $limit): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php if($limit == -1): ?> <option value="-1">All</option> <?php else: ?> <option value="<?php echo e($limit); ?>" <?php echo e(request('limit') == $limit ? 'selected':''); ?>><?php echo e($limit); ?></option> <?php endif; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </div> <?php endif; ?> </div> <div class="col-9"> <form action="<?php echo e($search_action); ?>" method="GET"> <?php if($defaultSearch): ?> <div class="col-lg-12"> <div class="row"> <div class="col-3"> <select name="field" class="form-select"> <?php $__currentLoopData = $headers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $header): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php if(array_key_exists('searchable',$header) && $header['searchable']): ?> <option value="<?php echo e($header['value']); ?>" <?php if($header['value'] == request('field')): ?> selected <?php endif; ?>> <?php echo e($header['text']); ?> </option> <?php endif; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </div> <div class="col-8"> <input type="search" name="keyword" class="form-control" value="<?php echo e(request('keyword')); ?>"> </div> <div class="col-1"> <button type="submit" class="btn btn-primary"><i class="fas fa-search"></i></button> </div> </div> </div> <?php else: ?> <?php echo e($searchForm ?? null); ?> <?php endif; ?> </form> </div> </div> </div> <div <?php echo e($attributes->merge(['class' => 'basetable table-responsive pt-0'])); ?>> <table class="table"> <thead class="table-primary"> <tr> <th>#</th> <?php $__currentLoopData = $headers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $header): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <th> <span class="text-width-90" title="<?php echo e($header['text'] ?? null); ?>"> <?php echo e(translate($header['text'] ?? null)); ?> </span> </th> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php if($hasActions): ?> <th><?php echo e(translate('Action')); ?></th> <?php endif; ?> </tr> </thead> <tbody> <?php $__empty_1 = true; $__currentLoopData = $collection; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?> <tr> <td> <?php echo e($hasPagination ? $collection->firstItem() + $loop->index : $loop->iteration); ?> </td> <?php $__currentLoopData = $headers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $header): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php $field = tableCellText($item, $header); ?> <td> <?php if(in_array($field, $successStatus)): ?> <span class="badge bg-success text-capitalize"> <?php echo e($field); ?> </span> <?php elseif(in_array($field, $dangerStatus)): ?> <span class="badge bg-danger text-capitalize"> <?php echo e($field); ?> </span> <?php elseif(array_key_exists('image',$header) && $header['image']): ?> <img height="40" width="40" src="<?php echo e($field); ?>" alt=""> <?php else: ?> <span class="text-width-120" title="<?php echo e($field); ?>"> <?php echo e($field); ?> </span> <?php endif; ?> </td> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php if($hasActions): ?> <td> <?php $__currentLoopData = $actions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $action): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php if(!empty($action)): ?> <?php if(isset($action['method']) && strtolower($action['method']) == 'delete'): ?> <form action="<?php echo e(tableActionLink($item, $action)); ?>" onclick="return confirm('Are you sure?')" class="d-inline-block" method="POST"> <?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?> <button type="submit" class="<?php echo \Illuminate\Support\Arr::toCssClasses([ 'btn', 'btn-sm', $action['class'] ?? 'btn-outline-danger']); ?>"> <i class="<?php echo e($action['icon'] ?? null); ?>"></i> <?php echo e($action['text'] ?? null); ?> </button> </form> <?php else: ?> <a id="<?php echo e($action['id'] ?? null); ?>" href="<?php echo e(tableActionLink($item, $action)); ?>" class="<?php echo \Illuminate\Support\Arr::toCssClasses(['btn', 'btn-sm', $action['class'] ?? 'btn-outline-light']); ?>"> <i class="<?php echo e($action['icon'] ?? null); ?>"></i> <?php echo e($action['text'] ?? null); ?> </a> <?php endif; ?> <?php endif; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </td> <?php endif; ?> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?> <tr> <td colspan="<?php echo e(count($headers) + 2); ?>" class="text-center"> <h4 class="py-5 text-muted">No data found ):</h4> </td> </tr> <?php endif; ?> </tbody> </table> </div> <?php if($hasPagination): ?> <?php echo e($collection->links()); ?> <?php $__env->startPush('scripts'); ?> <script> var limitSelects = document.querySelectorAll('select[name="limit"]'); var totalLimitSelects = limitSelects.length; for (let i = 0; i < totalLimitSelects; i++) { var element = limitSelects[i]; element.addEventListener('change', function (ev) { var url = new URL('', "<?php echo e($collection->path()); ?>"); url.searchParams.set('limit', ev.target.value); window.location.href = url.toString(); }); } </script> <?php $__env->stopPush(); ?> <?php endif; ?> <?php /**PATH /home/eliosofonline/pham.eliosof.com/resources/views/components/basetable.blade.php ENDPATH**/ ?>
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.7 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002