first commit

This commit is contained in:
2024-07-15 11:28:08 +02:00
commit f52d538ea5
21891 changed files with 6161164 additions and 0 deletions

View File

@@ -0,0 +1,361 @@
<?php
/**
* @package solo
* @copyright Copyright (c)2014-2022 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU General Public License version 3, or later
*/
namespace Solo\View\Main;
use Akeeba\Engine\Factory;
use Akeeba\Engine\Platform;
use Awf\Mvc\Model;
use Awf\Mvc\View;
use Awf\Utils\Template;
use RuntimeException;
use Solo\Helper\Status;
use Solo\Model\Main;
use Solo\Model\Stats;
class Html extends View
{
/**
* Active backup profile ID
*
* @var int
*/
public $profile;
/**
* A list of Akeeba Engine backup profiles in a format suitable for use with Html\Select::genericList
*
* @var array
*/
public $profileList;
/**
* List of profiles to display as Quick Icons in the control panel page
*
* @var array Array of stdClass objects
*/
public $quickIconProfiles;
/**
* Do I have to ask the user to provide a Download ID?
*
* @var bool
*/
public $needsDownloadId;
/**
* Did a Core edition user provide a Download ID instead of installing Akeeba Backup Professional?
*
* @var bool
*/
public $warnCoreDownloadId;
/**
* If front-end backup is enabled and the secret word has an issue (too insecure) we populate this variable
*
* @var string
*/
public $frontEndSecretWordIssue;
/**
* In case the existing Secret Word is insecure we generate a new one. This variable contains the new Secret Word.
*
* @var string
*/
public $newSecretWord;
/**
* Should I have the browser ask for desktop notification permissions?
*
* @var bool
*/
public $desktop_notifications;
/**
* If anonymous statistics collection is enabled and we have to collect statistics this will include the HTML for
* the IFRAME that performs the anonymous stats collection.
*
* @var string
*/
public $statsIframe;
/**
* Is the mbstring extension installed and enabled? This is required by Joomla and Akeeba Backup to correctly work
*
* @var bool
*/
public $checkMbstring = true;
/**
* ACL checks. This is set to the View by the Controller.
*
* @see \Solo\Controller\Main::onBeforeDefault()
*
* @var array
*/
public $aclChecks = [];
/**
* The HTML for the backup status cell
*
* @var string
*/
public $statusCell = '';
/**
* HTML for the warnings (status details)
*
* @var string
*/
public $detailsCell = '';
/**
* Details of the latest backup as HTML
*
* @var string
*/
public $latestBackupCell = '';
/**
* Do I have stuck updates pending?
*
* @var bool
*/
public $stuckUpdates = false;
/**
* Should I prompt the user ot run the configuration wizard?
*
* @var bool
*/
public $promptForConfigurationWizard = false;
/**
* How many warnings do I have to display?
*
* @var int
*/
public $countWarnings = 0;
/**
* The fancy formatted changelog of the component
*
* @var string
*/
public $formattedChangelog = '';
/**
* Timestamp when the Core user last dismissed the upsell to Pro
*
* @var int
* @since 7.0.0
*/
public $lastUpsellDismiss = 0;
/**
* Is the output directory under the site's root?
*
* @var bool
* @since 7.0.3
*/
public $isOutputDirectoryUnderSiteRoot = false;
/**
* Does the output directory have the expected security files?
*
* @var bool
* @since 7.0.3
*/
public $hasOutputDirectorySecurityFiles = false;
public function onBeforeMain()
{
/** @var Main $model */
$model = $this->getModel();
$statusHelper = Status::getInstance();
$session = $this->container->segment;
$this->profile = Platform::getInstance()->get_active_profile();
$this->profileList = $model->getProfileList();
$this->quickIconProfiles = $model->getQuickIconProfiles();
$this->statusCell = $statusHelper->getStatusCell();
$this->detailsCell = $statusHelper->getQuirksCell();
$this->latestBackupCell = $statusHelper->getLatestBackupDetails();
$this->needsDownloadId = $model->needsDownloadID();
$this->warnCoreDownloadId = $model->mustWarnAboutDownloadIdInCore();
$this->checkMbstring = $model->checkMbstring();
$this->frontEndSecretWordIssue = $model->getFrontendSecretWordError();
$this->newSecretWord = $session->get('newSecretWord', null);
$this->stuckUpdates = ($this->container->appConfig->get('updatedb', 0) == 1);
$this->promptForConfigurationWizard = Factory::getConfiguration()->get('akeeba.flag.confwiz', 0) == 0;
$this->countWarnings = count(Factory::getConfigurationChecks()->getDetailedStatus());
$this->desktop_notifications = Platform::getInstance()->get_platform_configuration_option('desktop_notifications', '0') ? 1 : 0;
$this->formattedChangelog = $this->formatChangelog();
$this->lastUpsellDismiss = $this->container->appConfig->get('lastUpsellDismiss', 0);
$this->hasOutputDirectorySecurityFiles = $model->hasOutputDirectorySecurityFiles();
$this->isOutputDirectoryUnderSiteRoot = $model->isOutputDirectoryUnderSiteRoot();
// Solo: the output directory may be under Solo's root, not the site's root. It's equally important to me.
if (!$this->container->segment->get('insideCMS', false))
{
$this->isOutputDirectoryUnderSiteRoot |= $model->isOutputDirectoryUnderSiteRoot(null, true);
}
/** @var Stats $statsModel */
$statsModel = Model::getTmpInstance($this->container->application_name, 'Stats', $this->container);
$this->statsIframe = $statsModel->collectStatistics(true);
// Load the Javascript for this page
Template::addJs('media://js/solo/main.js', $this->container->application);
$router = $this->container->router;
$document = $this->container->application->getDocument();
$document->addScriptOptions('akeeba.System.notification.hasDesktopNotification', $this->desktop_notifications);
$document->addScriptOptions('akeeba.ControlPanel.checkOutDirUrl', $router->route('index.php?view=main&format=raw&task=checkOutputDirectory'));
$document->addScriptOptions('akeeba.ControlPanel.outputDirUnderSiteRoot', (bool) $this->isOutputDirectoryUnderSiteRoot);
$document->addScriptOptions('akeeba.ControlPanel.hasSecurityFiles', (bool) $this->hasOutputDirectorySecurityFiles);
$document->addScriptOptions('akeeba.ControlPanel.cloudFlareURN', 'CLOUDFLARE::' . Template::parsePath('media://js/solo/system.js', false, $this->getContainer()->application));
$document->addScriptOptions('akeeba.ControlPanel.updateInfoURL', $router->route('index.php?view=main&format=raw&task=getUpdateInformation&' . $this->getContainer()->session->getCsrfToken()->getValue() . '=1'));
return true;
}
/**
* Performs automatic access control checks
*
* @param string $view The view being considered
* @param string $task The task being considered
*
* @return bool True if access is allowed
*
* @throws RuntimeException
*/
public function canAccess($view, $task)
{
$view = strtolower($view);
$task = strtolower($task);
if (!isset($this->aclChecks[$view]))
{
return true;
}
if (!isset($this->aclChecks[$view][$task]))
{
if (!isset($this->aclChecks[$view]['*']))
{
return true;
}
$requiredPrivileges = $this->aclChecks[$view]['*'];
}
else
{
$requiredPrivileges = $this->aclChecks[$view][$task];
}
$user = $this->container->userManager->getUser();
foreach ($requiredPrivileges as $privilege)
{
if (!$user->getPrivilege('akeeba.' . $privilege))
{
return false;
}
}
return true;
}
protected function formatChangelog($onlyLast = false)
{
$container = $this->getContainer();
$filePath = isset($container['changelogPath']) ? $container['changelogPath'] : null;
if (empty($filePath))
{
$filePath = APATH_BASE . '/CHANGELOG.php';
}
$ret = '';
$file = $filePath;
$lines = @file($file);
if (empty($lines))
{
return $ret;
}
array_shift($lines);
foreach ($lines as $line)
{
$line = trim($line);
if (empty($line))
{
continue;
}
$type = substr($line, 0, 1);
switch ($type)
{
case '=':
continue 2;
break;
case '+':
$ret .= "\t" . '<li><span class="akeeba-label--green">Added</span> ' . htmlentities(trim(substr($line, 2))) . "</li>\n";
break;
case '-':
$ret .= "\t" . '<li><span class="akeeba-label--grey">Removed</span> ' . htmlentities(trim(substr($line, 2))) . "</li>\n";
break;
case '~':
case '^':
$ret .= "\t" . '<li><span class="akeeba-label--grey">Changed</span> ' . htmlentities(trim(substr($line, 2))) . "</li>\n";
break;
case '*':
$ret .= "\t" . '<li><span class="akeeba-label--red">Security</span> ' . htmlentities(trim(substr($line, 2))) . "</li>\n";
break;
case '!':
$ret .= "\t" . '<li><span class="akeeba-label--orange">Important</span> ' . htmlentities(trim(substr($line, 2))) . "</li>\n";
break;
case '#':
$ret .= "\t" . '<li><span class="akeeba-label--teal">Fixed</span> ' . htmlentities(trim(substr($line, 2))) . "</li>\n";
break;
default:
if (!empty($ret))
{
$ret .= "</ul>";
if ($onlyLast)
{
return $ret;
}
}
if (!$onlyLast)
{
$ret .= "<h4>$line</h4>\n";
}
$ret .= "<ul class=\"akeeba-changelog\">\n";
break;
}
}
return $ret;
}
}

View File

@@ -0,0 +1,22 @@
<?php
/**
* @package solo
* @copyright Copyright (c)2014-2019 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU GPL version 3 or later
*/
defined('_AKEEBA') or die();
/** @var \Solo\View\Main\Html $this */
/** @var \Solo\Model\Main $model */
$container = $this->getContainer();
$filePath = isset($filePath['changelogPath']) ? $filePath['changelogPath'] : null;
if (empty($filePath))
{
$filePath = APATH_BASE . '/CHANGELOG.php';
}
$model = $this->getModel();
echo $model->coloriseChangelog($filePath, true);

View File

@@ -0,0 +1,74 @@
<?php
/**
* @package solo
* @copyright Copyright (c)2014-2019 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU GPL version 3 or later
*/
use Awf\Html;
use Awf\Text\Text;
defined('_AKEEBA') or die();
// Used for type hinting
/** @var \Solo\View\Main\Html $this */
$router = $this->container->router;
$inCMS = $this->container->segment->get('insideCMS', false);
$isJoomla = defined('_JEXEC');
$token = $this->container->session->getCsrfToken()->getValue();
echo $this->loadAnyTemplate('Main/warnings');
?>
<div id="soloUpdateNotification">
</div>
<div class="akeeba-container--66-33">
<div>
<?php echo $this->loadAnyTemplate('Main/profile'); ?>
<?php echo $this->loadAnyTemplate('Main/paypal'); ?>
<?php if(!empty($this->quickIconProfiles) && $this->canAccess('backup', 'main')): ?>
<?php echo $this->loadAnyTemplate('Main/oneclick'); ?>
<?php endif; ?>
<?php echo $this->loadAnyTemplate('Main/icons_basic'); ?>
<?php echo $this->loadAnyTemplate('Main/icons_troubleshooting'); ?>
<?php echo $this->loadAnyTemplate('Main/icons_advanced'); ?>
<?php if ($this->container->userManager->getUser()->getPrivilege('akeeba.configure')): ?>
<?php echo $this->loadAnyTemplate('Main/icons_includeexclude'); ?>
<?php endif; ?>
<?php if ($this->container->userManager->getUser()->getPrivilege('akeeba.configure')): ?>
<?php echo $this->loadAnyTemplate('Main/icons_system'); ?>
<?php endif; ?>
</div>
<div>
<?php echo $this->loadAnyTemplate('Main/status') ?>
<?php echo $this->loadAnyTemplate('Main/latest_backup') ?>
</div>
</div>
<div class="modal fade" id="changelogModal" tabindex="-1" role="dialog" aria-labelledby="changelogModalLabel" aria-hidden="true" style="display: none;">
<div class="modal-header">
<h4 class="modal-title" id="changelogModalLabel">Changelog</h4>
</div>
<div class="modal-body">
<?php echo $this->loadAnyTemplate('Main/changelog') ?>
</div>
</div>
<?php
if ($this->statsIframe)
{
echo $this->statsIframe;
}
?>

View File

@@ -0,0 +1,52 @@
<?php
/**
* @package solo
* @copyright Copyright (c)2014-2019 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU GPL version 3 or later
*/
use Awf\Html;
use Awf\Text\Text;
defined('_AKEEBA') or die();
// Used for type hinting
/** @var \Solo\View\Main\Html $this */
$router = $this->container->router;
$inCMS = $this->container->segment->get('insideCMS', false);
$isJoomla = defined('_JEXEC');
$token = $this->container->session->getCsrfToken()->getValue();
?>
<section class="akeeba-panel--info">
<header class="akeeba-block-header">
<h3>
<span class="akion-wand"></span>
<?php echo Text::_('COM_AKEEBA_CPANEL_HEADER_ADVANCED'); ?>
</h3>
</header>
<div class="akeeba-grid--small">
<?php if ($this->canAccess('schedule', 'main')): ?>
<a class="akeeba-action--teal" href="<?php echo $router->route('index.php?view=schedule') ?>">
<span class="akion-calendar"></span>
<?php echo Text::_('COM_AKEEBA_SCHEDULE') ?>
</a>
<?php endif; ?>
<?php if (defined('AKEEBABACKUP_PRO') && AKEEBABACKUP_PRO): ?>
<?php if ($this->canAccess('discover', 'main')): ?>
<a class="akeeba-action--orange" href="<?php echo $router->route('index.php?view=discover') ?>">
<span class="akion-ios-download"></span>
<?php echo Text::_('COM_AKEEBA_DISCOVER') ?>
</a>
<?php endif; ?>
<?php if ($this->canAccess('s3import', 'main')): ?>
<a class="akeeba-action--orange" href="<?php echo $router->route('index.php?view=s3import') ?>">
<span class="akion-ios-cloud-download"></span>
<?php echo Text::_('COM_AKEEBA_S3IMPORT') ?>
</a>
<?php endif; ?>
<?php endif; ?>
</div>
</section>

View File

@@ -0,0 +1,76 @@
<?php
/**
* @package solo
* @copyright Copyright (c)2014-2019 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU GPL version 3 or later
*/
use Awf\Html;
use Awf\Text\Text;
defined('_AKEEBA') or die();
// Used for type hinting
/** @var \Solo\View\Main\Html $this */
$router = $this->container->router;
$inCMS = $this->container->segment->get('insideCMS', false);
$isJoomla = defined('_JEXEC');
$token = $this->container->session->getCsrfToken()->getValue();
?>
<section class="akeeba-panel--info">
<header class="akeeba-block-header">
<h3>
<span class="akion-home"></span>
<?php echo Text::_('SOLO_MAIN_LBL_HEAD_BACKUPOPS'); ?>
</h3>
</header>
<div class="akeeba-grid--small">
<?php if ($this->canAccess('backup', 'main')): ?>
<a class="akeeba-action--green" href="<?php echo $router->route('index.php?view=backup') ?>">
<span class="akion-play"></span>
<?php echo Text::_('COM_AKEEBA_BACKUP') ?>
</a>
<?php endif; ?>
<?php if ($this->canAccess('transfer', 'main')): ?>
<a class="akeeba-action--green" href="<?php echo $router->route('index.php?view=transfer') ?>">
<span class="akion-android-open"></span>
<?php echo Text::_('COM_AKEEBA_TRANSFER'); ?>
</a>
<?php endif; ?>
<?php if ($this->canAccess('manage', 'main')): ?>
<a class="akeeba-action--teal" href="<?php echo $router->route('index.php?view=manage') ?>">
<span class="akion-ios-list"></span>
<span class="title"><?php echo Text::_('COM_AKEEBA_BUADMIN') ?></span>
</a>
<?php endif; ?>
<?php if ($this->canAccess('configuration', 'main')): ?>
<a class="akeeba-action--teal" href="<?php echo $router->route('index.php?view=configuration') ?>">
<span class="akion-ios-gear"></span>
<span class="title"><?php echo Text::_('COM_AKEEBA_CONFIG') ?></span>
</a>
<?php endif; ?>
<?php if ($this->canAccess('profiles', 'main')): ?>
<a class="akeeba-action--teal" href="<?php echo $router->route('index.php?view=profiles') ?>">
<span class="akion-person-stalker"></span>
<span class="title"><?php echo Text::_('COM_AKEEBA_PROFILES') ?></span>
</a>
<?php endif; ?>
<?php if (!$this->needsDownloadId && $this->canAccess('update', 'main')): ?>
<a class="akeeba-action--orange" href="<?php echo $router->route('index.php?view=update') ?>" id="soloUpdateContainer">
<span class="akion-checkmark-circled" id="soloUpdateIcon"></span>
<span id="soloUpdateAvailable" style="display: none">
<?php echo Text::_('SOLO_UPDATE_SUBTITLE_UPDATEAVAILABLE') ?>
</span>
<span id="soloUpdateUpToDate" style="display: none">
<?php echo Text::_('SOLO_UPDATE_SUBTITLE_UPTODATE') ?>
</span>
</a>
<?php endif; ?>
</div>
</section>

View File

@@ -0,0 +1,74 @@
<?php
/**
* @package solo
* @copyright Copyright (c)2014-2019 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU GPL version 3 or later
*/
use Awf\Html;
use Awf\Text\Text;
defined('_AKEEBA') or die();
// Used for type hinting
/** @var \Solo\View\Main\Html $this */
$router = $this->container->router;
$inCMS = $this->container->segment->get('insideCMS', false);
$isJoomla = defined('_JEXEC');
$token = $this->container->session->getCsrfToken()->getValue();
?>
<section class="akeeba-panel--info">
<header class="akeeba-block-header">
<h3>
<span class="akion-funnel"></span>
<?php echo Text::_('COM_AKEEBA_CPANEL_HEADER_INCLUDEEXCLUDE'); ?>
</h3>
</header>
<div class="akeeba-grid--small">
<?php if (defined('AKEEBABACKUP_PRO') && AKEEBABACKUP_PRO): ?>
<?php if ($this->canAccess('multidb', 'main')): ?>
<a class="akeeba-action--green" href="<?php echo $router->route('index.php?view=multidb') ?>">
<span class="akion-arrow-swap"></span>
<?php echo Text::_('COM_AKEEBA_MULTIDB') ?>
</a>
<?php endif; ?>
<?php if ($this->canAccess('extradirs', 'main')): ?>
<a class="akeeba-action--green" href="<?php echo $router->route('index.php?view=extradirs') ?>">
<span class="akion-folder"></span>
<?php echo Text::_('COM_AKEEBA_INCLUDEFOLDER') ?>
</a>
<?php endif; ?>
<?php endif; ?>
<?php if ($this->canAccess('fsfilters', 'main')): ?>
<a class="akeeba-action--red" href="<?php echo $router->route('index.php?view=fsfilters') ?>">
<span class="akion-filing"></span>
<?php echo Text::_('COM_AKEEBA_FILEFILTERS') ?>
</a>
<?php endif; ?>
<?php if ($this->canAccess('dbfilters', 'main')): ?>
<a class="akeeba-action--red" href="<?php echo $router->route('index.php?view=dbfilters') ?>">
<span class="akion-ios-grid-view"></span>
<?php echo Text::_('COM_AKEEBA_DBFILTER') ?>
</a>
<?php endif; ?>
<?php if (defined('AKEEBABACKUP_PRO') && AKEEBABACKUP_PRO): ?>
<?php if ($this->canAccess('regexfsfilters', 'main')): ?>
<a class="akeeba-action--red" href="<?php echo $router->route('index.php?view=regexfsfilters')?>">
<span class="akion-ios-folder"></span>
<?php echo Text::_('COM_AKEEBA_REGEXFSFILTERS') ?>
</a>
<?php endif; ?>
<?php if ($this->canAccess('regexdbfilters', 'main')): ?>
<a class="akeeba-action--red" href="<?php echo $router->route('index.php?view=regexdbfilters')?>">
<span class="akion-ios-box"></span>
<?php echo Text::_('COM_AKEEBA_REGEXDBFILTERS') ?>
</a>
<?php endif; ?>
<?php endif; ?>
</div>
</section>

View File

@@ -0,0 +1,50 @@
<?php
/**
* @package solo
* @copyright Copyright (c)2014-2019 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU GPL version 3 or later
*/
use Awf\Html;
use Awf\Text\Text;
defined('_AKEEBA') or die();
// Used for type hinting
/** @var \Solo\View\Main\Html $this */
$router = $this->container->router;
$inCMS = $this->container->segment->get('insideCMS', false);
$isJoomla = defined('_JEXEC');
$token = $this->container->session->getCsrfToken()->getValue();
?>
<section class="akeeba-panel--info">
<header class="akeeba-block-header">
<h3>
<span class="akion-ios-cog"></span>
<?php echo Text::_('SOLO_MAIN_LBL_SYSMANAGEMENT'); ?>
</h3>
</header>
<div class="akeeba-grid--small">
<?php if (!$inCMS): ?>
<?php if ($this->canAccess('users', 'main')): ?>
<a class="akeeba-action--teal" href="<?php echo $router->route('index.php?view=users') ?>">
<span class="akion-ios-people"></span>
<?php echo Text::_('SOLO_MAIN_LBL_USERS') ?>
</a>
<?php endif; ?>
<?php elseif ($isJoomla): ?>
<a class="akeeba-action--teal" href="#" onclick="akeeba.System.triggerEvent(document.querySelector('#toolbar-options>button'), 'click');">
<span class="akion-ios-people"></span>
<?php echo Text::_('SOLO_MAIN_LBL_USERS') ?>
</a>
<?php endif; ?>
<?php if ($this->canAccess('sysconfig', 'main')): ?>
<a class="akeeba-action--teal" href="<?php echo $router->route('index.php?view=sysconfig') ?>">
<span class="akion-ios-settings-strong"></span>
<?php echo Text::_('SOLO_MAIN_LBL_SYSCONFIG') ?>
</a>
<?php endif; ?>
</div>
</section>

View File

@@ -0,0 +1,44 @@
<?php
/**
* @package solo
* @copyright Copyright (c)2014-2019 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU GPL version 3 or later
*/
use Awf\Html;
use Awf\Text\Text;
defined('_AKEEBA') or die();
// Used for type hinting
/** @var \Solo\View\Main\Html $this */
$router = $this->container->router;
$inCMS = $this->container->segment->get('insideCMS', false);
$isJoomla = defined('_JEXEC');
$token = $this->container->session->getCsrfToken()->getValue();
?>
<section class="akeeba-panel--info">
<header class="akeeba-block-header">
<h3>
<span class="akion-help-buoy"></span>
<?php echo Text::_('COM_AKEEBA_CPANEL_HEADER_TROUBLESHOOTING'); ?>
</h3>
</header>
<div class="akeeba-grid--small">
<?php if ($this->canAccess('log', 'main')): ?>
<a class="akeeba-action--teal" href="<?php echo $router->route('index.php?view=log') ?>">
<span class="akion-ios-search-strong"></span>
<?php echo Text::_('COM_AKEEBA_LOG') ?>
</a>
<?php endif; ?>
<?php if ($this->canAccess('alice', 'main')): ?>
<a class="akeeba-action--teal" href="<?php echo $router->route('index.php?view=alice')?>">
<span class="akion-medkit"></span>
<?php echo Text::_('COM_AKEEBA_ALICE') ?>
</a>
<?php endif; ?>
</div>
</section>

View File

@@ -0,0 +1,83 @@
<?php
/**
* @package solo
* @copyright Copyright (c)2014-2019 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU GPL version 3 or later
*/
use Awf\Text\Text;
defined('_AKEEBA') or die();
/** @var \Solo\View\Main\Html $this */
?>
<div class="akeeba-panel">
<header class="akeeba-block-header">
<h3>
<?php echo Text::_('SOLO_MAIN_LBL_LATEST_BACKUP') ?>
</h3>
</header>
<div>
<?php if(empty($this->latestBackupDetails)): ?>
<div class="akeeba-label--info">
<?php echo Text::_('COM_AKEEBA_BACKUP_STATUS_NONE'); ?>
</div>
<?php else: ?>
<table class="akeeba-table--striped">
<tr>
<td>
<?php echo Text::_('COM_AKEEBA_BUADMIN_LABEL_START'); ?>
</td>
<td>
<?php $backupDate = new \Awf\Date\Date($this->latestBackupDetails['backupstart'], 'UTC');
$tz = new DateTimeZone(\Awf\Application\Application::getInstance()->getContainer()->appConfig->get('timezone', 'UTC'));
$backupDate->setTimezone($tz);
echo $backupDate->format(Text::_('DATE_FORMAT_LC2'), true); ?>
</td>
</tr>
<tr>
<td>
<?php echo Text::_('COM_AKEEBA_BUADMIN_LABEL_DESCRIPTION'); ?>
</td>
<td>
<?php echo $this->escape($this->latestBackupDetails['description']); ?>
</td>
</tr>
<tr>
<td>
<?php echo Text::_('COM_AKEEBA_BUADMIN_LABEL_STATUS'); ?>
</td>
<td>
<?php switch ($this->latestBackupDetails['status']):
case 'run': ?>
<span class="akeeba-label--orange"><?php echo Text::_('COM_AKEEBA_BUADMIN_LABEL_STATUS_PENDING') ?></span>
<?php break;case 'fail': ?>
<span class="akeeba-label--red"><?php echo Text::_('COM_AKEEBA_BUADMIN_LABEL_STATUS_FAIL') ?></span>
<?php break;case 'ok':
case 'complete': ?>
<span class="akeeba-label--green"><?php echo Text::_('COM_AKEEBA_BUADMIN_LABEL_STATUS_OK') ?></span>
<?php endswitch; ?>
</td>
</tr>
<tr>
<td>
<?php echo Text::_('COM_AKEEBA_BUADMIN_LABEL_ORIGIN'); ?>
</td>
<td>
<?php echo Text::_('COM_AKEEBA_BUADMIN_LABEL_ORIGIN_' . $this->latestBackupDetails['origin']) ?>
</td>
</tr>
<tr>
<td>
<?php echo Text::_('COM_AKEEBA_BUADMIN_LABEL_TYPE'); ?>
</td>
<td>
<?php echo $this->escape($this->latestBackupDetails['type_translated']); ?>
</td>
</tr>
</table>
<?php endif; ?>
</div>
</div>

View File

@@ -0,0 +1,39 @@
<?php
/**
* @package solo
* @copyright Copyright (c)2014-2019 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU GPL version 3 or later
*/
use Awf\Html;
use Awf\Text\Text;
defined('_AKEEBA') or die();
// Used for type hinting
/** @var \Solo\View\Main\Html $this */
$router = $this->container->router;
$inCMS = $this->container->segment->get('insideCMS', false);
$isJoomla = defined('_JEXEC');
$token = $this->container->session->getCsrfToken()->getValue();
?>
<section class="akeeba-panel--primary">
<header class="akeeba-block-header">
<h3>
<span class="akion-ios-play"></span>
<?php echo Text::_('COM_AKEEBA_CPANEL_HEADER_QUICKBACKUP'); ?>
</h3>
</header>
<div class="akeeba-grid--small">
<?php foreach($this->quickIconProfiles as $qiProfile): ?>
<a class="akeeba-action--green" href="<?php echo $router->route('index.php?view=backup&autostart=1&profile=' . (int) $qiProfile->id) . '&' . $token . '=1' ?>">
<span class="akion-play"></span>
<span>
<?php echo htmlentities($qiProfile->description) ?>
</span>
</a>
<?php endforeach; ?>
</div>
</section>

View File

@@ -0,0 +1,41 @@
<?php
/**
* @package solo
* @copyright Copyright (c)2014-2019 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU GPL version 3 or later
*/
use Awf\Html;
use Awf\Text\Text;
defined('_AKEEBA') or die();
// Used for type hinting
/** @var \Solo\View\Main\Html $this */
$router = $this->container->router;
$inCMS = $this->container->segment->get('insideCMS', false);
$isJoomla = defined('_JEXEC');
$token = $this->container->session->getCsrfToken()->getValue();
// Only show in the Core version with a 10% probability
if (AKEEBABACKUP_PRO || (rand(0, 9) != 0)) return;
?>
<div class="akeeba-panel--success">
<header class="akeeba-block-header">
<p><?php echo Text::_('SOLO_MAIN_LBL_SUBSCRIBE_TEXT') ?></p>
</header>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="text-align: center; margin: 0px;">
<input type="hidden" name="cmd" value="_s-xclick" />
<input type="hidden" name="hosted_button_id" value="3NTKQ3M2DYPYW" />
<button onclick="this.form.submit(); return false;" class="btn btn-success">
<img src="https://www.paypal.com/en_GB/i/btn/btn_donate_LG.gif" border="0">
Donate via PayPal
</button>
<a class="small" style="font-weight: normal; color: #666" href="https://www.akeebabackup.com/subscribe/new/backupwp.html?layout=default">
<?php echo Text::_('SOLO_MAIN_BTN_SUBSCRIBE_UNOBTRUSIVE'); ?>
</a>
</form>
</div>

View File

@@ -0,0 +1,42 @@
<?php
/**
* @package solo
* @copyright Copyright (c)2014-2019 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU GPL version 3 or later
*/
use Awf\Html;
use Awf\Text\Text;
defined('_AKEEBA') or die();
// Used for type hinting
/** @var \Solo\View\Main\Html $this */
$router = $this->container->router;
$inCMS = $this->container->segment->get('insideCMS', false);
$isJoomla = defined('_JEXEC');
$token = $this->container->session->getCsrfToken()->getValue();
?>
<div class="akeeba-panel--info">
<form action="<?php echo $router->route('index.php?view=main') ?>" method="post" name="profileForm" class="akeeba-form--inline">
<div class="akeeba-form-group">
<label>
<?php echo Text ::_('COM_AKEEBA_CPANEL_PROFILE_TITLE'); ?>: #<?php echo $this->profile; ?>
</label>
<?php echo Html\Select::genericList($this->profileList, 'profile', array('onchange' => "document.forms.profileForm.submit()"), 'value', 'text', $this->profile); ?>
</div>
<div class="akeeba-form-group--actions">
<button class="akeeba-btn--small--grey" onclick="this.form.submit(); return false;">
<span class="akion-android-share"></span>
<?php echo Text::_('COM_AKEEBA_CPANEL_PROFILE_BUTTON'); ?>
</button>
</div>
<div class="akeeba-form-group--actions">
<input type="hidden" name="token" value="<?php echo $this->container->session->getCsrfToken()->getValue() ?>">
<input type="hidden" name="task" value="switchProfile" />
</div>
</form>
</div>

View File

@@ -0,0 +1,131 @@
<?php
/**
* @package solo
* @copyright Copyright (c)2014-2019 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU GPL version 3 or later
*/
use Akeeba\Engine\Factory;
use Awf\Text\Text;
defined('_AKEEBA') or die();
// Used for type hinting
/** @var \Solo\View\Main\Html $this */
$router = $this->container->router;
$quirks = Factory::getConfigurationChecks()->getDetailedStatus(false);
$status = Factory::getConfigurationChecks()->getShortStatus();
if ($status && empty($quirks))
{
$alert_status = 'success';
}
elseif ($status && !empty($quirks))
{
$alert_status = 'warning';
foreach ($quirks as $quirk)
{
if (($quirk['severity'] == 'high') || $quirk['severity'] == 'critical')
{
$alert_status = 'failure';
break;
}
}
}
else
{
$alert_status = 'failure';
}
?>
<div class="akeeba-panel">
<header class="akeeba-block-header">
<h3><?php echo Text::_('COM_AKEEBA_CPANEL_LABEL_STATUSSUMMARY'); ?></h3>
</header>
<div>
<div class="akeeba-block--<?php echo $alert_status ?>">
<?php if ($alert_status == 'success'): ?>
<?php echo Text::_('SOLO_MAIN_LBL_STATUS_OK'); ?>
<?php elseif ($alert_status == 'warning'): ?>
<?php echo Text::_('SOLO_MAIN_LBL_STATUS_WARNING'); ?>
<?php else: ?>
<?php echo Text::_('SOLO_MAIN_LBL_STATUS_ERROR'); ?>
<?php endif; ?>
</div>
<?php if (!empty($quirks)): ?>
<div>
<table class="akeeba-table--striped">
<thead>
<tr>
<th>
<?php echo Text::_('COM_AKEEBA_CPANEL_LABEL_STATUSDETAILS'); ?>
</th>
</tr>
</thead>
<tbody>
<?php foreach ($quirks as $quirk):
switch ($quirk['severity'])
{
case 'critical':
$classSufix = 'red';
break;
case 'high':
$classSufix = 'orange';
break;
case 'medium':
$classSufix = 'teal';
break;
default:
$classSufix = 'grey';
break;
}
?>
<tr>
<td>
<a href="<?php echo $quirk['help_url']; ?>" target="_blank">
<span class="akeeba-label--<?php echo $classSufix ?>">
S<?php echo $quirk['code']; ?>
</span>
<?php echo $quirk['description']; ?>
</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<hr/>
<?php endif; ?>
<p>
<?php echo Text::_('SOLO_APP_TITLE'); ?>
<?php echo AKEEBABACKUP_PRO ? 'Professional' : 'Core' ?>
<span class="akeeba-label--teal"><?php echo AKEEBABACKUP_VERSION ?></span>
<?php echo (strlen(Text::_('SOLO_APP_TITLE')) > 14) ? '<br/>' : '' ?>
<button class="akeeba-btn--small--dark"
onclick="akeeba.Modal.open({inherit: '#changelogModal', width: '80%'}); return false;">
Changelog
</button>
</p>
<?php if (!AKEEBABACKUP_PRO): ?>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="text-align: center; margin: 0px;">
<input type="hidden" name="cmd" value="_s-xclick" />
<input type="hidden" name="hosted_button_id" value="3NTKQ3M2DYPYW" />
<button onclick="this.form.submit(); return false;" class="akeeba-btn--green">
<span class="akion-heart"></span>
Donate via PayPal
</button>
</form>
<?php endif; ?>
</div>
</div>

View File

@@ -0,0 +1,35 @@
<?php
/**
* @package solo
* @copyright Copyright (c)2014-2019 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU GPL version 3 or later
*/
use Awf\Text\Text;
defined('_AKEEBA') or die();
// Used for type hinting
/** @var \Solo\View\Main\Html $this */
$adblock = <<<JS
akeeba.System.documentReady(function(){
var test = document.createElement('div');
test.innerHTML = '&nbsp;';
test.className = 'adsbox';
document.body.appendChild(test);
window.setTimeout(function() {
if (test.offsetHeight === 0) {
document.getElementById('adblock-warning').style.display = 'block';
}
test.remove();
}, 100);
});
JS;
$this->getContainer()->application->getDocument()->addScriptDeclaration($adblock);
?>
<div id="adblock-warning" class="akeeba-block--failure" style="display: none;">
<?php echo Text::_('SOLO_SETUP_LBL_ADBLOCK_WARNING')?>
</div>

View File

@@ -0,0 +1,36 @@
<?php
/**
* @package solo
* @copyright Copyright (c)2014-2019 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU GPL version 3 or later
*/
use Awf\Text\Text;
defined('_AKEEBA') or die();
// Used for type hinting
/** @var \Solo\View\Main\Html $this */
// Obsolete PHP version check
if (!version_compare(PHP_VERSION, '5.6.0', 'lt'))
{
return;
}
$akeebaCommonDatePHP = new \Awf\Date\Date('2016-07-21 00:00:00', 'GMT');
$akeebaCommonDateObsolescence = new \Awf\Date\Date('2017-04-21 00:00:00', 'GMT');
?>
<div id="phpVersionCheck" class="akeeba-block--warning">
<h3><?php echo Text::_('COM_AKEEBA_COMMON_PHPVERSIONTOOOLD_WARNING_TITLE'); ?></h3>
<p>
<?php echo Text::sprintf(
'COM_AKEEBA_COMMON_PHPVERSIONTOOOLD_WARNING_BODY',
PHP_VERSION,
$akeebaCommonDatePHP->format(Text::_('DATE_FORMAT_LC1')),
$akeebaCommonDateObsolescence->format(Text::_('DATE_FORMAT_LC1')),
'7.0'
);
?>
</p>
</div>

View File

@@ -0,0 +1,139 @@
<?php
/**
* @package solo
* @copyright Copyright (c)2014-2019 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU GPL version 3 or later
*/
use Awf\Html;
use Awf\Text\Text;
defined('_AKEEBA') or die();
// Used for type hinting
/** @var \Solo\View\Main\Html $this */
$router = $this->container->router;
$inCMS = $this->container->segment->get('insideCMS', false);
$isJoomla = defined('_JEXEC');
$token = $this->container->session->getCsrfToken()->getValue();
?>
<?php
// Configuration Wizard prompt
if (!\Akeeba\Engine\Factory::getConfiguration()->get('akeeba.flag.confwiz', 0))
{
echo $this->loadAnyTemplate('Configuration/confwiz_modal');
}
?>
<?php /* AdBlock warning */ ?>
<?php echo $this->loadAnyTemplate('Main/warning_adblock') ?>
<?php /* Stuck database updates warning */ ?>
<?php if ($this->stuckUpdates):
$resetUrl = $router->route('index.php?view=Main&task=forceUpdateDb');
?>
<div class="akeeba-block--failure">
<p>
<?php
echo Text::sprintf('COM_AKEEBA_CPANEL_ERR_UPDATE_STUCK',
$this->getContainer()->appConfig->get('prefix', 'solo_'),
$resetUrl
) ?>
</p>
</div>
<?php endif; ?>
<?php if (!$this->checkMbstring): ?>
<div class="akeeba-block--failure">
<?php echo Text::sprintf('COM_AKEEBA_CPANEL_ERR_MBSTRING_' . ($inCMS ? 'WORDPRESS' : 'SOLO'), PHP_VERSION) ?>
</div>
<?php endif; ?>
<?php if (!empty($this->frontEndSecretWordIssue)): ?>
<div class="akeeba-block--warning">
<h3><?php echo Text::_('COM_AKEEBA_CPANEL_ERR_FESECRETWORD_HEADER'); ?></h3>
<p><?php echo Text::_('COM_AKEEBA_CPANEL_ERR_FESECRETWORD_INTRO'); ?></p>
<p><?php echo $this->frontEndSecretWordIssue ?></p>
<p>
<?php echo Text::_('COM_AKEEBA_CPANEL_ERR_FESECRETWORD_WHATTODO_SOLO'); ?>
<?php echo Text::sprintf('COM_AKEEBA_CPANEL_ERR_FESECRETWORD_WHATTODO_COMMON', $this->newSecretWord); ?>
</p>
<p>
<a class="akeeba-btn--green--large"
href="<?php echo $router->route('index.php?view=Main&task=resetSecretWord&' . $token . '=1') ?>">
<span class="akion-android-refresh"></span>
<?php echo Text::_('COM_AKEEBA_CPANEL_BTN_FESECRETWORD_RESET'); ?>
</a>
</p>
</div>
<?php endif; ?>
<?php echo $this->loadAnyTemplate('Main/warning_phpversion') ?>
<?php if (!empty($this->configUrl)): ?>
<div class="akeeba-block--failure" id="config-readable-error" style="display: none">
<h3>
<?php echo Text::_('SOLO_MAIN_ERR_CONFIGREADABLE_HEAD'); ?>
</h3>
<p>
<?php echo Text::sprintf('SOLO_MAIN_ERR_CONFIGREADABLE_BODY', $this->configUrl); ?>
</p>
</div>
<?php endif; ?>
<?php if (!empty($this->backupUrl)): ?>
<div class="akeeba-block--failure" id="output-readable-error" style="display: none">
<h3>
<?php echo Text::_('SOLO_MAIN_ERR_OUTPUTREADABLE_HEAD'); ?>
</h3>
<p>
<?php echo Text::sprintf('SOLO_MAIN_ERR_OUTPUTREADABLE_BODY', $this->backupUrl); ?>
</p>
</div>
<?php endif; ?>
<?php if ($this->needsDownloadId): ?>
<div class="akeeba-block--success">
<h3>
<?php echo Text::_('COM_AKEEBA_CPANEL_MSG_MUSTENTERDLID') ?>
</h3>
<p>
<?php if ($inCMS): ?>
<?php echo Text::sprintf('COM_AKEEBA_LBL_CPANEL_NEEDSDLID', 'https://www.akeebabackup.com/instructions/1557-akeeba-solo-download-id-2.html'); ?>
<?php else: ?>
<?php echo Text::sprintf('COM_AKEEBA_LBL_CPANEL_NEEDSDLID', 'https://www.akeebabackup.com/instructions/1539-akeeba-solo-download-id.html'); ?>
<?php endif; ?>
</p>
<form name="dlidform" action="<?php echo $router->route('index.php?view=main') ?>" method="post"
class="akeeba-form--inline">
<input type="hidden" name="task" value="applyDownloadId"/>
<input type="hidden" name="token"
value="<?php echo $this->container->session->getCsrfToken()->getValue() ?>">
<div class="akeeba-form-group">
<label for="dlid">
<?php echo Text::_('COM_AKEEBA_CPANEL_MSG_PASTEDLID') ?>
</label>
<input type="text" id="dlid" name="dlid"
placeholder="<?php echo Text::_('COM_AKEEBA_CONFIG_DOWNLOADID_LABEL') ?>" class="form-control">
</div>
<div class="akeeba-form-group--actions">
<button type="submit" class="akeeba-btn--green">
<span class="akion-checkmark"></span>
<?php echo Text::_('COM_AKEEBA_CPANEL_MSG_APPLYDLID') ?>
</button>
</div>
</form>
</div>
<?php elseif ($this->warnCoreDownloadId): ?>
<div class="akeeba-block--failure">
<?php echo Text::_('SOLO_MAIN_LBL_NEEDSUPGRADE'); ?>
</div>
<?php endif; ?>
<div class="akeeba-block--failure" style="display: none;" id="cloudFlareWarn">
<h3><?php echo Text::_('COM_AKEEBA_CPANEL_MSG_CLOUDFLARE_WARN') ?></h3>
<p><?php echo Text::sprintf('COM_AKEEBA_CPANEL_MSG_CLOUDFLARE_WARN1', 'https://support.cloudflare.com/hc/en-us/articles/200169456-Why-is-JavaScript-or-jQuery-not-working-on-my-site-') ?></p>
</div>

View File

@@ -0,0 +1,4 @@
{
"show": ["main", "joomla"],
"order": 1
}