✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ server.blackpussy.asia ​🇻​♯➤ 5.14.0-611.20.1.el9_7.x86_64 #1 SMP 🇾​♯➤ 2026

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 163.245.207.76 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.243
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗞 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ mail,mb_send_mail
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /usr/src/lsws/lsws-6.3.4/add-ons/webcachemgr/src//WPDashMsgs.php
<?php

/* * *********************************************
 * LiteSpeed Web Server WordPress Dash Notifier
 *
 * @author LiteSpeed Technologies, Inc. (https://www.litespeedtech.com)
 * @copyright (c) 2019
 * *******************************************
 */

namespace Lsc\Wp;

class WPDashMsgs
{

    const MSG_TYPE_RAP = 'rap';
    const MSG_TYPE_BAM = 'bam';
    const KEY_RAP_MSGS = 'rapMsgs';
    const KEY_BAM_MSGS = 'bamMsgs';

    /**
     * Do not change these values, substr 'msg' is used in PanelController to
     * determine action.
     */
    const ACTION_GET_MSG = 'msgGet';
    const ACTION_ADD_MSG = 'msgAdd';
    const ACTION_DELETE_MSG = 'msgDelete';

    /**
     * @var string
     */
    protected $dataFile;

    /**
     * @var string[][]
     */
    protected $msgData = array();


    /**
     *
     * @param string  $dataFile
     */
    public function __construct( )
    {
        $this->dataFile = realpath(__DIR__ . '/../../..') . '/admin/lscdata/wpDashMsgs.data';

        $this->init();
    }

    protected function init()
    {
        if ( file_exists($this->dataFile) ) {
            $data = json_decode(file_get_contents($this->dataFile), true);

            if ( $data != false && is_array($data) ) {
                $this->msgData = $data;
            }
        }

        if ( !isset($this->msgData[self::KEY_RAP_MSGS]) ) {
            $this->msgData[self::KEY_RAP_MSGS] = array();
        }

        if ( !isset($this->msgData[self::KEY_BAM_MSGS]) ) {
            $this->msgData[self::KEY_BAM_MSGS] = array();
        }

        /**
         * Set default rap message and plugin slug.
         */
        $defaultRap = array(
            'default' => array(
                'msg' => 'Greetings! This is your hosting company encouraging you to click the button '
                    . 'to install the LiteSpeed Cache plugin. This plugin will speed up your '
                    . 'WordPress site dramatically. Please contact us with any questions.',
                'slug' => 'litespeed-cache')
        );

        $this->msgData[self::KEY_RAP_MSGS] =
                array_merge($defaultRap, $this->msgData[self::KEY_RAP_MSGS]);
    }

    /**
     *
     * @param string  $type
     * @return sting[]|string[][]
     */
    public function getMsgData( $type = '' )
    {
        switch ($type) {
            case self::MSG_TYPE_RAP:
                return $this->msgData[self::KEY_RAP_MSGS];

            case self::MSG_TYPE_BAM:
                return $this->msgData[self::KEY_BAM_MSGS];

            default:
                return $this->msgData;
        }
    }

    /**
     *
     * @param string $type
     * @param string $msgId
     * @param string $msg
     * @param string $slug
     * @return boolean
     */
    public function addMsg( $type, $msgId, $msg, $slug = '' )
    {
        if ( $msgId === ''
                || $msgId === NULL
                || ($msgId == 'default' && $type == self::MSG_TYPE_RAP)
                || strlen($msgId) > 50
                || preg_match('/[^a-zA-Z0-9_-]/', $msgId) ) {

            return false;
        }

        switch ($type) {
            case self::MSG_TYPE_RAP:
                $this->msgData[self::KEY_RAP_MSGS][$msgId] =
                        array( 'msg' => $msg, 'slug' => $slug );
                break;
            case self::MSG_TYPE_BAM:
                $this->msgData[self::KEY_BAM_MSGS][$msgId] =
                        array( 'msg' => $msg );
                break;
            default:
                return false;
        }

        $this->saveDataFile();
        return true;
    }

    /**
     *
     * @param string $type
     * @param string $msgId
     * @return boolean
     */
    public function deleteMsg( $type, $msgId )
    {
        if ( $msgId === '' || $msgId === NULL ) {
            return false;
        }

        switch ($type) {
            case self::MSG_TYPE_RAP:

                if ( $msgId == 'default' ) {
                    return false;
                }

                $key = self::KEY_RAP_MSGS;
                break;
            case self::MSG_TYPE_BAM:
                $key = self::KEY_BAM_MSGS;
                break;
            default:
                return false;
        }

        if ( isset($this->msgData[$key][$msgId]) ) {
            unset($this->msgData[$key][$msgId]);

            $this->saveDataFile();
            return true;
        }

        return false;
    }

    protected function saveDataFile()
    {
        $jsonData = json_encode($this->msgData);

        file_put_contents($this->dataFile, $jsonData);
    }

}

Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]

Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
1 Jan 1970 12.00 AM
root / root
0
Context
--
7 Jan 2026 7.08 PM
1000 / users
0755
Panel
--
7 Jan 2026 7.08 PM
1000 / users
0755
View
--
7 Jan 2026 7.08 PM
1000 / users
0755
AjaxResponse.php
1.9 KB
18 Oct 2019 4.45 PM
1000 / users
0644
CliController.php
30.491 KB
8 Dec 2021 3.14 PM
1000 / users
0644
DashNotifier.php
8.014 KB
18 Nov 2020 10.34 PM
1000 / users
0644
LSCMException.php
0.636 KB
18 Aug 2020 8.02 PM
1000 / users
0644
LogEntry.php
1.721 KB
18 Nov 2020 10.34 PM
1000 / users
0644
Logger.php
16.572 KB
18 Nov 2020 10.34 PM
1000 / users
0644
PanelController.php
43.204 KB
7 Oct 2020 5.23 PM
1000 / users
0644
PluginVersion.php
17.475 KB
24 Feb 2021 9.19 PM
1000 / users
0644
UserCommand.php
24.618 KB
18 Nov 2020 10.34 PM
1000 / users
0644
Util.php
11.205 KB
18 Nov 2020 10.34 PM
1000 / users
0644
WPCaller.php
48.711 KB
8 Dec 2021 3.14 PM
1000 / users
0644
WPDashMsgs.php
4.491 KB
5 Dec 2019 4.18 PM
1000 / users
0644
WPInstall.php
15.268 KB
8 Dec 2021 3.14 PM
1000 / users
0644
WPInstallStorage.php
26.697 KB
8 Dec 2021 3.14 PM
1000 / users
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF