| Server IP : 81.19.159.101 / Your IP : 216.73.217.111 Web Server : Apache System : Linux www58.world4you.com 4.18.0-553.126.2.lve.el8.x86_64 #1 SMP Thu May 28 14:12:30 UTC 2026 x86_64 User : ftp8817043 ( 2681) PHP Version : 8.4.21 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/.sites/103/site8817043/web/wp-content/plugins/akeebabackupwp/app/Solo/View/Restore/ |
Upload File : |
<?php
/**
* @package solo
* @copyright Copyright (c)2014-2025 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU General Public License version 3, or later
*/
namespace Solo\View\Restore;
use Akeeba\Engine\Factory;
use Akeeba\Engine\Platform;
use Awf\Mvc\View;
use Awf\Uri\Uri;
use Awf\Utils\Template;
class Html extends View
{
public $password;
public $id;
public $ftpparams;
public $extractionmodes;
public $extension;
public $siteURL;
public function display($tpl = null)
{
$this->loadCommonJavascript();
return parent::display($tpl);
}
public function onBeforeMain()
{
/** @var \Solo\Model\Restore $model */
$model = $this->getModel();
$this->id = $model->getState('id', 0, 'int');
$this->ftpparams = $model->getFTPParams();
$this->extractionmodes = $model->getExtractionModes();
$backup = Platform::getInstance()->get_statistics($this->id);
$this->extension = strtolower(substr($backup['absolute_path'], -3));
$router = $this->container->router;
$document = $this->container->application->getDocument();
$document->addScriptOptions(
'akeeba.Configuration.URLs', [
'browser' => $router->route('index.php?view=browser&tmpl=component&processfolder=1&folder='),
'ftpBrowser' => $router->route('index.php?view=ftpbrowser'),
'testFtp' => $router->route('index.php?view=restore&task=ajax&ajax=testftp'),
]
);
return true;
}
public function onBeforeStart()
{
/** @var \Solo\Model\Restore $model */
$model = $this->getModel();
$inCMS = $this->container->segment->get('insideCMS', false);
if ($inCMS)
{
$this->siteURL = $this->container->appConfig->get('cms_url', '');
}
else
{
$this->siteURL = Factory::getConfiguration()->get('akeeba.platform.site_url', '');
}
$this->siteURL = trim($this->siteURL);
$this->siteURL = rtrim($this->siteURL, '/');
$this->setLayout('restore');
$document = $this->container->application->getDocument();
$document->addScriptOptions('akeeba.Restore.password', $model->getState('password'));
$document->addScriptOptions('akeeba.Restore.ajaxURL', Uri::base(false, $this->container) . 'restore.php');
$document->addScriptOptions('akeeba.Restore.mainURL', $this->siteURL);
$document->addScriptOptions('akeeba.Restore.inMainRestoration', true);
return true;
}
public function loadCommonJavascript()
{
Template::addJs('media://js/solo/showon.js', $this->container->application);
Template::addJs('media://js/solo/configuration.js', $this->container->application);
Template::addJs('media://js/solo/restore.js', $this->container->application);
// Push translations
$doc = $this->container->application->getDocument();
$doc->lang('COM_AKEEBA_CONFIG_UI_BROWSE');
$doc->lang('COM_AKEEBA_CONFIG_UI_CONFIG');
$doc->lang('COM_AKEEBA_CONFIG_UI_REFRESH');
$doc->lang('COM_AKEEBA_FILEFILTERS_LABEL_UIROOT');
$doc->lang('COM_AKEEBA_CONFIG_UI_FTPBROWSER_TITLE');
$doc->lang('COM_AKEEBA_CONFIG_DIRECTFTP_TEST_OK');
$doc->lang('COM_AKEEBA_CONFIG_DIRECTFTP_TEST_FAIL');
$doc->lang('COM_AKEEBA_CONFIG_DIRECTSFTP_TEST_OK');
$doc->lang('COM_AKEEBA_CONFIG_DIRECTSFTP_TEST_FAIL');
$doc->lang('COM_AKEEBA_BACKUP_TEXT_LASTRESPONSE');
}
}