first commit
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
/**
|
||||
* @package akeebabackup
|
||||
* @copyright Copyright (c)2006-2022 Nicholas K. Dionysopoulos / Akeeba Ltd
|
||||
* @license GNU General Public License version 3, or later
|
||||
*/
|
||||
|
||||
/** @var $this \Akeeba\Component\AkeebaBackup\Administrator\View\Controlpanel\HtmlView */
|
||||
|
||||
// Protect from unauthorized access
|
||||
use Joomla\CMS\Component\ComponentHelper;
|
||||
|
||||
defined('_JEXEC') || die();
|
||||
|
||||
?>
|
||||
|
||||
<?= $this->loadAnyTemplate('Controlpanel/warnings') ?>
|
||||
|
||||
<?php // Main area ?>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<?php // LEFT COLUMN (66% desktop width) ?>
|
||||
<div class="col col-12 col-lg-8">
|
||||
<?php // Active profile switch ?>
|
||||
<?= $this->loadAnyTemplate('Controlpanel/profile') ?>
|
||||
|
||||
<?php // One Click Backup icons ?>
|
||||
<?php if( ! (empty($this->quickIconProfiles)) && $this->permissions['backup']): ?>
|
||||
<?= $this->loadAnyTemplate('Controlpanel/oneclick') ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php // Web Push ?>
|
||||
<?php
|
||||
if (ComponentHelper::getParams('com_akeebabackup')->get('push_preference') === 'webpush') {
|
||||
echo $this->loadAnyTemplate('Controlpanel/webpush');
|
||||
}
|
||||
?>
|
||||
|
||||
<?php // Basic operations ?>
|
||||
<?= $this->loadAnyTemplate('Controlpanel/icons_basic') ?>
|
||||
|
||||
<?php // Core Upgrade ?>
|
||||
<?= $this->loadAnyTemplate('Controlpanel/upgrade') ?>
|
||||
|
||||
<?php // Troubleshooting ?>
|
||||
<?= $this->loadAnyTemplate('Controlpanel/icons_troubleshooting') ?>
|
||||
|
||||
<?php // Advanced operations ?>
|
||||
<?= $this->loadAnyTemplate('Controlpanel/icons_advanced') ?>
|
||||
|
||||
<?php // Include / Exclude data ?>
|
||||
<?php if($this->permissions['configure']): ?>
|
||||
<?= $this->loadAnyTemplate('Controlpanel/icons_includeexclude') ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<?php // RIGHT COLUMN (33% desktop width) ?>
|
||||
<div class="col-12 col-lg-4">
|
||||
<?php // Status Summary ?>
|
||||
<?= $this->loadAnyTemplate('Controlpanel/sidebar_status') ?>
|
||||
|
||||
<?php // Backup stats ?>
|
||||
<?= $this->loadAnyTemplate('Controlpanel/sidebar_backup') ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<?php // Footer ?>
|
||||
<?= $this->loadAnyTemplate('Controlpanel/footer') ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php // Usage statistics collection IFRAME ?>
|
||||
<?php if ($this->statsIframe): ?>
|
||||
<?= $this->statsIframe ?>
|
||||
<?php endif ?>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--~
|
||||
~ @package akeebabackup
|
||||
~ @copyright Copyright (c)2006-2022 Nicholas K. Dionysopoulos / Akeeba Ltd
|
||||
~ @license GNU General Public License version 3, or later
|
||||
-->
|
||||
<metadata>
|
||||
<layout title="COM_AKEEBABACKUP_VIEW_CPANEL_TITLE">
|
||||
<message>
|
||||
<![CDATA[COM_AKEEBABACKUP_VIEW_CPANEL_DESC]]>
|
||||
</message>
|
||||
</layout>
|
||||
</metadata>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* @package akeebabackup
|
||||
* @copyright Copyright (c)2006-2022 Nicholas K. Dionysopoulos / Akeeba Ltd
|
||||
* @license GNU General Public License version 3, or later
|
||||
*/
|
||||
|
||||
/** @var $this \Akeeba\Component\AkeebaBackup\Administrator\View\Controlpanel\HtmlView */
|
||||
|
||||
// Protect from unauthorized access
|
||||
defined('_JEXEC') || die();
|
||||
|
||||
?>
|
||||
<div class="mt-3 p-3 bg-light border-top border-4 d-flex flex-column">
|
||||
<p class="text-muted">
|
||||
Copyright 2006-<?= date('Y') ?> <a href="https://www.akeeba.com">Akeeba Ltd</a>. All legal rights reserved.
|
||||
<br/>
|
||||
Akeeba Backup is Free Software and is distributed under the terms of the
|
||||
<a href="http://www.gnu.org/licenses/gpl-3.0.html">GNU General Public License</a>, version 3 or –
|
||||
at your option - any later version.
|
||||
</p>
|
||||
|
||||
<?php if(AKEEBABACKUP_PRO != 1): ?>
|
||||
<p>
|
||||
If you use Akeeba Backup Core, please post a rating and a review at the
|
||||
<a href="https://extensions.joomla.org/extensions/extension/access-a-security/site-security/akeeba-backup/">Joomla! Extensions Directory</a>.
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
/**
|
||||
* @package akeebabackup
|
||||
* @copyright Copyright (c)2006-2022 Nicholas K. Dionysopoulos / Akeeba Ltd
|
||||
* @license GNU General Public License version 3, or later
|
||||
*/
|
||||
|
||||
/** @var $this \Akeeba\Component\AkeebaBackup\Administrator\View\Controlpanel\HtmlView */
|
||||
|
||||
// Protect from unauthorized access
|
||||
defined('_JEXEC') || die();
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
// All of the buttons in this panel require the Configure privilege
|
||||
if (!$this->permissions['configure'])
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!AKEEBABACKUP_PRO)
|
||||
{
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<div class="card mb-2">
|
||||
<h3 class="card-header">
|
||||
<?= Text::_('COM_AKEEBABACKUP_CPANEL_HEADER_ADVANCED') ?>
|
||||
</h3>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="d-flex flex-row flex-wrap align-items-stretch">
|
||||
<?php if($this->permissions['configure']): ?>
|
||||
<a class="text-center align-self-stretch btn btn-outline-primary border-0" style="width: 10em"
|
||||
href="index.php?option=com_akeebabackup&view=Schedule">
|
||||
<div class="bg-primary text-white d-block text-center p-3 h2">
|
||||
<span class="fa fa-calendar"></span>
|
||||
</div>
|
||||
<span>
|
||||
<?= Text::_('COM_AKEEBABACKUP_SCHEDULE') ?>
|
||||
</span>
|
||||
</a>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if($this->permissions['configure']): ?>
|
||||
<a class="text-center align-self-stretch btn btn-outline-warning text-dark border-0" style="width: 10em"
|
||||
href="index.php?option=com_akeebabackup&view=Discover">
|
||||
<div class="bg-warning d-block text-center p-3 h2">
|
||||
<span class="fa fa-file-import"></span>
|
||||
</div>
|
||||
<span>
|
||||
<?= Text::_('COM_AKEEBABACKUP_DISCOVER') ?>
|
||||
</span>
|
||||
</a>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if($this->permissions['configure']): ?>
|
||||
<a class="text-center align-self-stretch btn btn-outline-warning text-dark border-0" style="width: 10em"
|
||||
href="index.php?option=com_akeebabackup&view=S3import">
|
||||
<div class="bg-warning d-block text-center p-3 h2">
|
||||
<span class="fa fa-cloud-download-alt"></span>
|
||||
</div>
|
||||
<span>
|
||||
<?= Text::_('COM_AKEEBABACKUP_S3IMPORT') ?>
|
||||
</span>
|
||||
</a>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,82 @@
|
||||
<?php
|
||||
/**
|
||||
* @package akeebabackup
|
||||
* @copyright Copyright (c)2006-2022 Nicholas K. Dionysopoulos / Akeeba Ltd
|
||||
* @license GNU General Public License version 3, or later
|
||||
*/
|
||||
|
||||
/** @var $this \Akeeba\Component\AkeebaBackup\Administrator\View\Controlpanel\HtmlView */
|
||||
|
||||
// Protect from unauthorized access
|
||||
defined('_JEXEC') || die();
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
?>
|
||||
<div class="card mb-2">
|
||||
<h3 class="card-header">
|
||||
<?= Text::_('COM_AKEEBABACKUP_CPANEL_HEADER_BASICOPS') ?>
|
||||
</h3>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="d-flex flex-row flex-wrap align-items-stretch">
|
||||
<?php if ($this->permissions['backup']): ?>
|
||||
<a class="text-center align-self-stretch btn btn-outline-success border-0" style="width: 10em"
|
||||
href="index.php?option=com_akeebabackup&view=Backup">
|
||||
<div class="bg-success text-white d-block text-center p-3 h2">
|
||||
<span class="fa fa-play"></span>
|
||||
</div>
|
||||
<span>
|
||||
<?= Text::_('COM_AKEEBABACKUP_BACKUP') ?>
|
||||
</span>
|
||||
</a>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($this->permissions['download'] && AKEEBABACKUP_PRO): ?>
|
||||
<a class="text-center align-self-stretch btn btn-outline-success border-0" style="width: 10em"
|
||||
href="index.php?option=com_akeebabackup&view=Transfer">
|
||||
<div class="bg-success text-white d-block text-center p-3 h2">
|
||||
<span class="fa fa-external-link-alt"></span>
|
||||
</div>
|
||||
<span>
|
||||
<?= Text::_('COM_AKEEBABACKUP_TRANSFER') ?>
|
||||
</span>
|
||||
</a>
|
||||
<?php endif ?>
|
||||
|
||||
<a class="text-center align-self-stretch btn btn-outline-primary border-0" style="width: 10em"
|
||||
href="index.php?option=com_akeebabackup&view=Manage">
|
||||
<div class="bg-primary text-white d-block text-center p-3 h2">
|
||||
<span class="fa fa-list-alt"></span>
|
||||
</div>
|
||||
<span>
|
||||
<?= Text::_('COM_AKEEBABACKUP_BUADMIN') ?>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<?php if ($this->permissions['configure']): ?>
|
||||
<a class="text-center align-self-stretch btn btn-outline-primary border-0" style="width: 10em"
|
||||
href="index.php?option=com_akeebabackup&view=Configuration">
|
||||
<div class="bg-primary text-white d-block text-center p-3 h2">
|
||||
<span class="fa fa-cog"></span>
|
||||
</div>
|
||||
<span>
|
||||
<?= Text::_('COM_AKEEBABACKUP_CONFIG') ?>
|
||||
</span>
|
||||
</a>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($this->permissions['configure']): ?>
|
||||
<a class="text-center align-self-stretch btn btn-outline-primary border-0" style="width: 10em"
|
||||
href="index.php?option=com_akeebabackup&view=Profiles">
|
||||
<div class="bg-primary text-white d-block text-center p-3 h2">
|
||||
<span class="fa fa-user-friends"></span>
|
||||
</div>
|
||||
<span>
|
||||
<?= Text::_('COM_AKEEBABACKUP_PROFILES') ?>
|
||||
</span>
|
||||
</a>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,90 @@
|
||||
<?php
|
||||
/**
|
||||
* @package akeebabackup
|
||||
* @copyright Copyright (c)2006-2022 Nicholas K. Dionysopoulos / Akeeba Ltd
|
||||
* @license GNU General Public License version 3, or later
|
||||
*/
|
||||
|
||||
/** @var $this \Akeeba\Component\AkeebaBackup\Administrator\View\Controlpanel\HtmlView */
|
||||
|
||||
// Protect from unauthorized access
|
||||
defined('_JEXEC') || die();
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
?>
|
||||
|
||||
<div class="card mb-2">
|
||||
<h3 class="card-header">
|
||||
<?= Text::_('COM_AKEEBABACKUP_CPANEL_HEADER_INCLUDEEXCLUDE') ?>
|
||||
</h3>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="d-flex flex-row flex-wrap align-items-stretch">
|
||||
<?php if(AKEEBABACKUP_PRO): ?>
|
||||
<a class="text-center align-self-stretch btn btn-outline-success border-0" style="width: 10em"
|
||||
href="index.php?option=com_akeebabackup&view=Multipledatabases">
|
||||
<div class="bg-success text-white d-block text-center p-3 h2">
|
||||
<span class="fa fa-database"></span>
|
||||
</div>
|
||||
<span>
|
||||
<?= Text::_('COM_AKEEBABACKUP_MULTIDB') ?>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<a class="text-center align-self-stretch btn btn-outline-success border-0" style="width: 10em"
|
||||
href="index.php?option=com_akeebabackup&view=Includefolders">
|
||||
<div class="bg-success text-white d-block text-center p-3 h2">
|
||||
<span class="fa fa-folder-plus"></span>
|
||||
</div>
|
||||
<span>
|
||||
<?= Text::_('COM_AKEEBABACKUP_INCLUDEFOLDER') ?>
|
||||
</span>
|
||||
</a>
|
||||
<?php endif ?>
|
||||
|
||||
<a class="text-center align-self-stretch btn btn-outline-danger border-0" style="width: 10em"
|
||||
href="index.php?option=com_akeebabackup&view=Databasefilters">
|
||||
<div class="bg-danger text-white d-block text-center p-3 h2">
|
||||
<span class="fa fa-table"></span>
|
||||
</div>
|
||||
<span>
|
||||
<?= Text::_('COM_AKEEBABACKUP_DBFILTER') ?>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<a class="text-center align-self-stretch btn btn-outline-danger border-0" style="width: 10em"
|
||||
href="index.php?option=com_akeebabackup&view=Filefilters">
|
||||
<div class="bg-danger text-white d-block text-center p-3 h2">
|
||||
<span class="fa fa-folder-minus"></span>
|
||||
</div>
|
||||
<span>
|
||||
<?= Text::_('COM_AKEEBABACKUP_FILEFILTERS') ?>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<?php if(AKEEBABACKUP_PRO): ?>
|
||||
<a class="text-center align-self-stretch btn btn-outline-danger border-0" style="width: 10em"
|
||||
href="index.php?option=com_akeebabackup&view=Regexdatabasefilters">
|
||||
<div class="bg-danger text-white d-block text-center p-3 h2">
|
||||
<span class="fa fa-clipboard"></span>
|
||||
</div>
|
||||
<span>
|
||||
<?= Text::_('COM_AKEEBABACKUP_REGEXDBFILTERS') ?>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<a class="text-center align-self-stretch btn btn-outline-danger border-0" style="width: 10em"
|
||||
href="index.php?option=com_akeebabackup&view=Regexfilefilters">
|
||||
<div class="bg-danger text-white d-block text-center p-3 h2">
|
||||
<span class="fa fa-folder"></span>
|
||||
</div>
|
||||
<span>
|
||||
<?= Text::_('COM_AKEEBABACKUP_REGEXFSFILTERS') ?>
|
||||
</span>
|
||||
</a>
|
||||
<?php endif ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/**
|
||||
* @package akeebabackup
|
||||
* @copyright Copyright (c)2006-2022 Nicholas K. Dionysopoulos / Akeeba Ltd
|
||||
* @license GNU General Public License version 3, or later
|
||||
*/
|
||||
|
||||
/** @var $this \Akeeba\Component\AkeebaBackup\Administrator\View\Controlpanel\HtmlView */
|
||||
|
||||
// Protect from unauthorized access
|
||||
defined('_JEXEC') || die();
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
?>
|
||||
<div class="card mb-2">
|
||||
<h3 class="card-header">
|
||||
<?= Text::_('COM_AKEEBABACKUP_CPANEL_HEADER_TROUBLESHOOTING')?>
|
||||
</h3>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="d-flex flex-row flex-wrap align-items-stretch">
|
||||
<?php if($this->permissions['backup']): ?>
|
||||
<a class="text-center align-self-stretch btn btn-outline-primary border-0" style="width: 10em"
|
||||
href="index.php?option=com_akeebabackup&view=Log">
|
||||
<div class="bg-primary text-white d-block text-center p-3 h2">
|
||||
<span class="fa fa-search"></span>
|
||||
</div>
|
||||
<span>
|
||||
<?= Text::_('COM_AKEEBABACKUP_LOG') ?>
|
||||
</span>
|
||||
</a>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if(AKEEBABACKUP_PRO && $this->permissions['configure']): ?>
|
||||
<a class="text-center align-self-stretch btn btn-outline-primary border-0" style="width: 10em"
|
||||
href="index.php?option=com_akeebabackup&view=Alice">
|
||||
<div class="bg-primary text-white d-block text-center p-3 h2">
|
||||
<span class="fa fa-briefcase-medical"></span>
|
||||
</div>
|
||||
<span>
|
||||
<?= Text::_('COM_AKEEBABACKUP_ALICE') ?>
|
||||
</span>
|
||||
</a>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* @package akeebabackup
|
||||
* @copyright Copyright (c)2006-2022 Nicholas K. Dionysopoulos / Akeeba Ltd
|
||||
* @license GNU General Public License version 3, or later
|
||||
*/
|
||||
|
||||
/** @var $this \Akeeba\Component\AkeebaBackup\Administrator\View\Controlpanel\HtmlView */
|
||||
|
||||
// Protect from unauthorized access
|
||||
defined('_JEXEC') || die();
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
?>
|
||||
<div class="card mb-2">
|
||||
<h3 class="card-header bg-primary text-white">
|
||||
<?= Text::_('COM_AKEEBABACKUP_CPANEL_HEADER_QUICKBACKUP') ?>
|
||||
</h3>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="d-flex flex-row flex-wrap align-items-stretch">
|
||||
<?php foreach($this->quickIconProfiles as $qiProfile): ?>
|
||||
<a class="text-center align-self-stretch btn btn-outline-success border-0" style="width: 10em"
|
||||
href="index.php?option=com_akeebabackup&view=Backup&autostart=1&profileid=<?= (int) $qiProfile->id ?>&<?= Factory::getApplication()->getFormToken() ?>=1">
|
||||
<div class="bg-success text-white d-block text-center p-3 h2">
|
||||
<span class="fa fa-play"></span>
|
||||
</div>
|
||||
<span><?= $this->escape($qiProfile->description) ?></span>
|
||||
</a>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
/**
|
||||
* @package akeebabackup
|
||||
* @copyright Copyright (c)2006-2022 Nicholas K. Dionysopoulos / Akeeba Ltd
|
||||
* @license GNU General Public License version 3, or later
|
||||
*/
|
||||
|
||||
/** @var $this \Akeeba\Component\AkeebaBackup\Administrator\View\Controlpanel\HtmlView */
|
||||
|
||||
// Protect from unauthorized access
|
||||
defined('_JEXEC') || die();
|
||||
|
||||
/**
|
||||
* Call this template with:
|
||||
* [
|
||||
* 'returnURL' => 'index.php?......'
|
||||
* ]
|
||||
* to set up a custom return URL
|
||||
*/
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
$this->document->getWebAssetManager()
|
||||
->usePreset('choicesjs')
|
||||
->useScript('webcomponent.field-fancy-select');
|
||||
?>
|
||||
<div class="akeeba-panel">
|
||||
<form action="index.php" method="post"
|
||||
name="switchActiveProfileForm" id="switchActiveProfileForm"
|
||||
class="d-md-flex flex-md-row justify-content-md-evenly align-items-center border border-1 bg-light border-rounded rounded-2 mt-1 mb-2 p-2">
|
||||
<input type="hidden" name="option" value=com_akeebabackup" />
|
||||
<input type="hidden" name="view" value="Controlpanel" />
|
||||
<input type="hidden" name="task" value="SwitchProfile" />
|
||||
<?php if(isset($returnURL)): ?>
|
||||
<input type="hidden" name="returnurl" value="<?= $this->escape($returnURL) ?>" />
|
||||
<?php endif ?>
|
||||
<?= HTMLHelper::_('form.token') ?>
|
||||
|
||||
<div class="m-2">
|
||||
<label>
|
||||
<?= Text::_('COM_AKEEBABACKUP_CPANEL_PROFILE_TITLE') ?>: #<?= (int)$this->profileId ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="flex-grow-1">
|
||||
<joomla-field-fancy-select
|
||||
search-placeholder="<?= Text::_('COM_AKEEBABACKUP_BUADMIN_LABEL_PROFILEID') ?>"
|
||||
><?=
|
||||
HTMLHelper::_('select.genericlist', $this->profileList, 'profileid', [
|
||||
'list.select' => $this->profileId,
|
||||
'id' => 'comAkeebaControlPanelProfileSwitch',
|
||||
])
|
||||
?></joomla-field-fancy-select>
|
||||
</div>
|
||||
|
||||
<div class="m-2">
|
||||
<button type="button"
|
||||
class="btn btn-primary btn-sm d-xs-none d-sm-none" type="submit">
|
||||
<span class="akion-forward"></span>
|
||||
<?= Text::_('COM_AKEEBABACKUP_CPANEL_PROFILE_BUTTON') ?>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* @package akeebabackup
|
||||
* @copyright Copyright (c)2006-2022 Nicholas K. Dionysopoulos / Akeeba Ltd
|
||||
* @license GNU General Public License version 3, or later
|
||||
*/
|
||||
|
||||
/** @var $this \Akeeba\Component\AkeebaBackup\Administrator\View\Controlpanel\HtmlView */
|
||||
|
||||
// Protect from unauthorized access
|
||||
defined('_JEXEC') || die();
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
?>
|
||||
<div class="card mb-2">
|
||||
<h3 class="card-header">
|
||||
<?= Text::_('COM_AKEEBABACKUP_BACKUP_STATS') ?>
|
||||
</h3>
|
||||
|
||||
<div class="card-body">
|
||||
<?= $this->latestBackupCell ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,90 @@
|
||||
<?php
|
||||
/**
|
||||
* @package akeebabackup
|
||||
* @copyright Copyright (c)2006-2022 Nicholas K. Dionysopoulos / Akeeba Ltd
|
||||
* @license GNU General Public License version 3, or later
|
||||
*/
|
||||
|
||||
/** @var $this \Akeeba\Component\AkeebaBackup\Administrator\View\Controlpanel\HtmlView */
|
||||
|
||||
// Protect from unauthorized access
|
||||
defined('_JEXEC') || die();
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
?>
|
||||
<div class="card mb-2">
|
||||
<h3 class="card-header">
|
||||
<?= Text::_('COM_AKEEBABACKUP_CPANEL_LABEL_STATUSSUMMARY') ?>
|
||||
</h3>
|
||||
|
||||
<div class="card-body">
|
||||
<?php // Backup status summary ?>
|
||||
<?= $this->statusCell ?>
|
||||
|
||||
<?php // Warnings ?>
|
||||
<?php if($this->countWarnings): ?>
|
||||
<div>
|
||||
<?= $this->detailsCell ?>
|
||||
</div>
|
||||
<hr />
|
||||
<?php endif ?>
|
||||
|
||||
<?php // Version ?>
|
||||
<p class="ak_version">
|
||||
<strong><?= Text::_('COM_AKEEBABACKUP_' . (AKEEBABACKUP_PRO ? 'PRO' : 'CORE')) ?></strong>
|
||||
<?= AKEEBABACKUP_VERSION ?>
|
||||
<span class="text-muted">
|
||||
(<?= AKEEBABACKUP_DATE ?>)
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<div class="d-flex flex-column">
|
||||
<?php // Changelog ?>
|
||||
<button type="button"
|
||||
id="btnchangelog" class="btn btn-outline-primary mb-2 me-2"
|
||||
data-bs-toggle="modal" data-bs-target="#akeeba-changelog">
|
||||
<span class="fa fa-clipboard-check"></span>
|
||||
CHANGELOG
|
||||
</button>
|
||||
|
||||
<?php // Donation CTA ?>
|
||||
<?php if(!AKEEBABACKUP_PRO): ?>
|
||||
<a
|
||||
href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KDVQPB4EREBPY&source=url"
|
||||
class="btn btn-outline-success mb-2 me-2">
|
||||
<span class="fa fa-donate"></span>
|
||||
Donate via PayPal
|
||||
</a>
|
||||
<?php endif ?>
|
||||
|
||||
<?php // Pro upsell ?>
|
||||
<?php if(!AKEEBABACKUP_PRO && (time() - $this->lastUpsellDismiss < 1296000)): ?>
|
||||
<a href="https://www.akeeba.com/landing/akeeba-backup.html"
|
||||
class="btn btn-sm btn-outline-dark mb-2 me-2">
|
||||
<span class="icon-akeeba"></span>
|
||||
<?= Text::_('COM_AKEEBABACKUP_CONTROLPANEL_BTN_LEARNMORE') ?>
|
||||
</a>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="akeeba-changelog" tabindex="-1"
|
||||
aria-labelledby="akeeba-changelog-header" aria-hidden="true"
|
||||
role="dialog">
|
||||
<div class="modal-dialog modal-dialog-scrollable modal-dialog-centered modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title" id="akeeba-changelog-header">
|
||||
<?= Text::_('CHANGELOG') ?>
|
||||
</h3>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="<?= Text::_('JLIB_HTML_BEHAVIOR_CLOSE') ?>"></button>
|
||||
</div>
|
||||
<div class="modal-body p-3">
|
||||
<?= $this->formattedChangelog ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
/**
|
||||
* @package akeebabackup
|
||||
* @copyright Copyright (c)2006-2022 Nicholas K. Dionysopoulos / Akeeba Ltd
|
||||
* @license GNU General Public License version 3, or later
|
||||
*/
|
||||
|
||||
/** @var $this \Akeeba\Component\AkeebaBackup\Administrator\View\Controlpanel\HtmlView */
|
||||
|
||||
// Protect from unauthorized access
|
||||
defined('_JEXEC') || die();
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Router\Route;
|
||||
|
||||
// Only show in the Core version with a 10% probability
|
||||
if (AKEEBABACKUP_PRO) return;
|
||||
|
||||
// Only show if it's at least 15 days since the last time the user dismissed the upsell
|
||||
if (time() - $this->lastUpsellDismiss < 1296000) return;
|
||||
|
||||
?>
|
||||
<div class="card my-4 border border-info">
|
||||
<h3 class="card-header bg-info text-white">
|
||||
<span class="fa fa-star"></span>
|
||||
<?= Text::_('COM_AKEEBABACKUP_CONTROLPANEL_HEAD_PROUPSELL') ?>
|
||||
</h3>
|
||||
|
||||
<div class="card-body">
|
||||
<p>
|
||||
<?= Text::_('COM_AKEEBABACKUP_CONTROLPANEL_HEAD_LBL_PROUPSELL_1') ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?= Text::_('COM_AKEEBABACKUP_CONTROLPANEL_HEAD_LBL_PROUPSELL_2') ?>
|
||||
</p>
|
||||
|
||||
<div class="mb-2 text-center">
|
||||
<a href="https://www.akeeba.com/landing/akeeba-backup.html"
|
||||
class="btn btn-info btn-lg">
|
||||
<span class="icon-akeeba"></span>
|
||||
<?= Text::_('COM_AKEEBABACKUP_CONTROLPANEL_BTN_LEARNMORE') ?>
|
||||
</a>
|
||||
|
||||
|
||||
<a href="<?= Route::_('index.php?option=com_akeebabackup&view=Controlpanel&task=dismissUpsell') ?>"
|
||||
class="btn btn-sm btn-outline-danger m-2">
|
||||
<span class="fa fa-bell"></span>
|
||||
<?= Text::_('COM_AKEEBABACKUP_CONTROLPANEL_BTN_HIDE') ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,288 @@
|
||||
<?php
|
||||
/**
|
||||
* @package akeebabackup
|
||||
* @copyright Copyright (c)2006-2022 Nicholas K. Dionysopoulos / Akeeba Ltd
|
||||
* @license GNU General Public License version 3, or later
|
||||
*/
|
||||
|
||||
/** @var $this \Akeeba\Component\AkeebaBackup\Administrator\View\Controlpanel\HtmlView */
|
||||
|
||||
use Joomla\CMS\Application\ApplicationHelper;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
// Protect from unauthorized access
|
||||
defined('_JEXEC') || die();
|
||||
|
||||
$cloudFlareTestFile = 'CLOUDFLARE::' . Uri::base() . 'media/com_akeebabackup/ControlPanel.min.js';
|
||||
$cloudFlareTestFile .= '?' . ApplicationHelper::getHash(AKEEBABACKUP_VERSION . AKEEBABACKUP_DATE);
|
||||
|
||||
$token = Factory::getApplication()->getFormToken();
|
||||
?>
|
||||
<?php // Configuration Wizard pop-up ?>
|
||||
<?php if($this->promptForConfigurationwizard && !defined('AKEEBADEBUG')): ?>
|
||||
<?= $this->loadAnyTemplate('Configuration/confwiz_modal') ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php // Potentially web accessible output directory ?>
|
||||
<!--
|
||||
Oh, hi there! It looks like you got curious and are peeking around your browser's developer tools – or just the
|
||||
source code of the page that loaded on your browser. Cool! May I explain what we are seeing here?
|
||||
|
||||
Just to let you know, the next three DETAILS (outDirSystem, insecureOutputDirectory and missingRandomFromFilename) are
|
||||
HIDDEN and their existence doesn't mean that your site has an insurmountable security issue. To the contrary.
|
||||
Whenever Akeeba Backup detects that the backup output directory is under your site's root it will CHECK its security
|
||||
i.e. if it's really accessible over the web. This check is performed with an AJAX call to your browser so if it
|
||||
takes forever or gets stuck you won't see a frustrating blank page in your browser. If AND ONLY IF a problem is
|
||||
detected said JavaScript will display one of the following DIVs, depending on what is applicable.
|
||||
|
||||
So, to recap. These hidden DIVs? They don't indicate a problem with your site. If one becomes visible then – and
|
||||
ONLY then – should you do something about it, as instructed. But thank you for being curious. Curiosity is how you
|
||||
get involved with and better at web development. Stay curious!
|
||||
-->
|
||||
<?php // Web accessible output directory that coincides with or is inside in a CMS system folder ?>
|
||||
<details class="alert alert-danger" id="outDirSystem" style="display: none">
|
||||
<summary class="h3 fs-3 m-0 p-0 text-danger">
|
||||
<?= Text::_('COM_AKEEBABACKUP_CPANEL_HEAD_OUTDIR_INVALID') ?>
|
||||
</summary>
|
||||
<p>
|
||||
<?= Text::sprintf('COM_AKEEBABACKUP_CPANEL_LBL_OUTDIR_LISTABLE', realpath($this->getModel()->getOutputDirectory())) ?>
|
||||
</p>
|
||||
<p>
|
||||
<?= Text::_('COM_AKEEBABACKUP_CPANEL_LBL_OUTDIR_ISSYSTEM') ?>
|
||||
</p>
|
||||
<p>
|
||||
<?= Text::_('COM_AKEEBABACKUP_CPANEL_LBL_OUTDIR_ISSYSTEM_FIX') ?>
|
||||
<?= Text::_('COM_AKEEBABACKUP_CPANEL_LBL_OUTDIR_DELETEORBEHACKED') ?>
|
||||
</p>
|
||||
</details>
|
||||
|
||||
<?php // Output directory can be listed over the web ?>
|
||||
<details class="alert alert-<?= $this->hasOutputDirectorySecurityFiles ? 'danger' : 'warning' ?>" id="insecureOutputDirectory" style="display: none">
|
||||
<summary class="h3 fs-3 m-0 p-0 text-<?= $this->hasOutputDirectorySecurityFiles ? 'danger' : 'body' ?>">
|
||||
<?php if ($this->hasOutputDirectorySecurityFiles): ?>
|
||||
<?= Text::_('COM_AKEEBABACKUP_CPANEL_HEAD_OUTDIR_UNFIXABLE') ?>
|
||||
<?php else: ?>
|
||||
<?= Text::_('COM_AKEEBABACKUP_CPANEL_HEAD_OUTDIR_INSECURE') ?>
|
||||
<?php endif ?>
|
||||
</summary>
|
||||
<p>
|
||||
<?= Text::sprintf('COM_AKEEBABACKUP_CPANEL_LBL_OUTDIR_LISTABLE', realpath($this->getModel()->getOutputDirectory())) ?>
|
||||
</p>
|
||||
<?php if (!$this->hasOutputDirectorySecurityFiles): ?>
|
||||
<p>
|
||||
<?= Text::_('COM_AKEEBABACKUP_CPANEL_LBL_OUTDIR_CLICKTHEBUTTON') ?>
|
||||
</p>
|
||||
<p>
|
||||
<?= Text::_('COM_AKEEBABACKUP_CPANEL_LBL_OUTDIR_FIX_SECURITYFILES') ?>
|
||||
</p>
|
||||
|
||||
<form action="index.php" method="POST" class="akeeba-form--inline">
|
||||
<input type="hidden" name="option" value="com_akeebabackup">
|
||||
<input type="hidden" name="view" value="Controlpanel">
|
||||
<input type="hidden" name="task" value="fixOutputDirectory">
|
||||
<input type="hidden" name="<?= $token ?>" value="1">
|
||||
|
||||
<button type="submit" class="btn btn-success w-100">
|
||||
<span class="fa fa-hammer"></span>
|
||||
<?= Text::_('COM_AKEEBABACKUP_CPANEL_BTN_FIXSECURITY') ?>
|
||||
</button>
|
||||
</form>
|
||||
<?php else: ?>
|
||||
<p>
|
||||
<?= Text::_('COM_AKEEBABACKUP_CPANEL_LBL_OUTDIR_TRASHHOST') ?>
|
||||
<?= Text::_('COM_AKEEBABACKUP_CPANEL_LBL_OUTDIR_DELETEORBEHACKED') ?>
|
||||
</p>
|
||||
<?php endif ?>
|
||||
</details>
|
||||
|
||||
<?php // Output directory cannot be listed over the web but I can download files ?>
|
||||
<details class="alert alert-warning" id="missingRandomFromFilename" style="display: none">
|
||||
<summary class="h3 fs-3 m-0 p-0">
|
||||
<?= Text::_('COM_AKEEBABACKUP_CPANEL_HEAD_OUTDIR_INSECURE_ALT') ?>
|
||||
</summary>
|
||||
<p>
|
||||
<?= Text::sprintf('COM_AKEEBABACKUP_CPANEL_LBL_OUTDIR_FILEREADABLE', realpath($this->getModel()->getOutputDirectory())) ?>
|
||||
</p>
|
||||
<p>
|
||||
<?= Text::_('COM_AKEEBABACKUP_CPANEL_LBL_OUTDIR_CLICKTHEBUTTON') ?>
|
||||
</p>
|
||||
<p>
|
||||
<?= Text::_('COM_AKEEBABACKUP_CPANEL_LBL_OUTDIR_FIX_RANDOM') ?>
|
||||
</p>
|
||||
|
||||
<form action="index.php" method="POST" class="akeeba-form--inline">
|
||||
<input type="hidden" name="option" value="com_akeebabackup">
|
||||
<input type="hidden" name="view" value="Controlpanel">
|
||||
<input type="hidden" name="task" value="addRandomToFilename">
|
||||
<input type="hidden" name="<?= $token ?>" value="1">
|
||||
|
||||
<button type="submit" class="btn btn-success w-100">
|
||||
<span class="fa fa-hammer"></span>
|
||||
<?= Text::_('COM_AKEEBABACKUP_CPANEL_BTN_FIXSECURITY') ?>
|
||||
</button>
|
||||
</form>
|
||||
</details>
|
||||
|
||||
|
||||
<?php // mbstring warning ?>
|
||||
<?php if(!$this->checkMbstring): ?>
|
||||
<details class="alert alert-error">
|
||||
<summary class="h4 fs-4 m-0 p-0 text-danger">
|
||||
<?= Text::_('COM_AKEEBABACKUP_CPANL_ERR_MBSTRING_TITLE') ?>
|
||||
</summary>
|
||||
<p>
|
||||
<?= Text::sprintf('COM_AKEEBABACKUP_CPANL_ERR_MBSTRING_BODY', PHP_VERSION) ?>
|
||||
</p>
|
||||
</details>
|
||||
<?php endif ?>
|
||||
|
||||
<?php // Front-end backup secret word reminder ?>
|
||||
<?php if(!empty($this->frontEndSecretWordIssue)): ?>
|
||||
<details class="alert alert-danger alert-dismissible">
|
||||
<summary class="h3 fs-3 m-0 p-0 text-danger">
|
||||
<?= Text::_('COM_AKEEBABACKUP_CPANEL_ERR_FESECRETWORD_HEADER') ?>
|
||||
</summary>
|
||||
<p><?= Text::_('COM_AKEEBABACKUP_CPANEL_ERR_FESECRETWORD_INTRO') ?></p>
|
||||
<p><?= $this->frontEndSecretWordIssue ?></p>
|
||||
<p>
|
||||
<?= Text::_('COM_AKEEBABACKUP_CPANEL_ERR_FESECRETWORD_WHATTODO_JOOMLA') ?>
|
||||
<?= Text::sprintf('COM_AKEEBABACKUP_CPANEL_ERR_FESECRETWORD_WHATTODO_COMMON', $this->newSecretWord) ?>
|
||||
</p>
|
||||
<p>
|
||||
<a class="btn btn-success btn-lg"
|
||||
href="index.php?option=com_akeebabackup&view=Controlpanel&task=resetSecretWord&<?= $token ?>=1">
|
||||
<span class="fa fa-sync"></span>
|
||||
<?= Text::_('COM_AKEEBABACKUP_CPANEL_BTN_FESECRETWORD_RESET') ?>
|
||||
</a>
|
||||
</p>
|
||||
</details>
|
||||
<?php endif ?>
|
||||
|
||||
<?php // Wrong media directory permissions ?>
|
||||
<?php if(!$this->areMediaPermissionsFixed): ?>
|
||||
<details id="notfixedperms" class="alert alert-danger alert-dismissible">
|
||||
<summary class="h3 fs-3 m-0 p-0 text-danger">
|
||||
<?= Text::_('COM_AKEEBABACKUP_CONTROLPANEL_WARN_PERMS_L1') ?>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="<?= Text::_('JLIB_HTML_BEHAVIOR_CLOSE') ?>"></button>
|
||||
</summary>
|
||||
<p><?= Text::_('COM_AKEEBABACKUP_CONTROLPANEL_WARN_PERMS_L2') ?></p>
|
||||
<ol>
|
||||
<li><?= Text::_('COM_AKEEBABACKUP_CONTROLPANEL_WARN_PERMS_L3A') ?></li>
|
||||
<li><?= Text::_('COM_AKEEBABACKUP_CONTROLPANEL_WARN_PERMS_L3B') ?></li>
|
||||
</ol>
|
||||
<p><?= Text::_('COM_AKEEBABACKUP_CONTROLPANEL_WARN_PERMS_L4') ?></p>
|
||||
</details>
|
||||
<?php endif ?>
|
||||
|
||||
<?php // You need to enter your Download ID ?>
|
||||
<?php if($this->needsDownloadID):
|
||||
$updateSiteEditUrl = Route::_('index.php?option=com_installer&task=updatesite.edit&update_site_id=' . $this->updateSiteId); ?>
|
||||
<details class="alert alert-info">
|
||||
<summary class="h3 fs-3 m-0 p-0 text-info">
|
||||
<?= Text::_('COM_AKEEBABACKUP_CPANEL_MSG_MUSTENTERDLID') ?>
|
||||
</summary>
|
||||
<p><?= Text::sprintf('COM_AKEEBABACKUP_LBL_CPANEL_NEEDSDLID','https://www.akeeba.com/download/official/add-on-dlid.html') ?></p>
|
||||
<p>
|
||||
<?= Text::sprintf('COM_AKEEBABACKUP_CPANEL_MSG_WHERETOENTERDLID', $updateSiteEditUrl) ?>
|
||||
</p>
|
||||
<p class="text-muted">
|
||||
<?= Text::_('COM_AKEEBABACKUP_CPANEL_MSG_JOOMLABUGGYUPDATES') ?>
|
||||
</p>
|
||||
</details>
|
||||
<?php endif ?>
|
||||
|
||||
<?php // You have CORE; you need to upgrade, not just enter a Download ID ?>
|
||||
<?php if($this->coreWarningForDownloadID): ?>
|
||||
<details class="alert alert-warning">
|
||||
<summary class="h3 fs-3 m-0 p-0">
|
||||
<?= Text::_('COM_AKEEBABACKUP_LBL_CPANEL_NEEDSUPGRADE_HEAD') ?>
|
||||
</summary>
|
||||
<p>
|
||||
<?= Text::sprintf('COM_AKEEBABACKUP_LBL_CPANEL_NEEDSUPGRADE_BODY','http://akee.ba/abcoretopro') ?>
|
||||
</p>
|
||||
</details>
|
||||
<?php endif ?>
|
||||
|
||||
<?php // Upgrade from Akeeba Backup 7 or 8? ?>
|
||||
<?php if ($this->canUpgradeFromAkeebaBackup8): ?>
|
||||
<div class="alert alert-info alert-dismissible">
|
||||
<h3>
|
||||
<?= Text::_('COM_AKEEBABACKUP_LBL_CPANEL_UPGRADE_FROM_AKEEBABACKUP8_HEAD') ?>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="<?= Text::_('JLIB_HTML_BEHAVIOR_CLOSE') ?>"></button>
|
||||
</h3>
|
||||
<p>
|
||||
<?= Text::_('COM_AKEEBABACKUP_LBL_CPANEL_UPGRADE_FROM_AKEEBABACKUP8_BODY') ?>
|
||||
</p>
|
||||
<p>
|
||||
<a class="btn btn-primary btn-lg"
|
||||
href="<?= Route::_('index.php?option=com_akeebabackup&view=Upgrade') ?>"
|
||||
>
|
||||
<span class="fa fa-hat-wizard"></span>
|
||||
<?= Text::_('COM_AKEEBABACKUP_LBL_CPANEL_UPGRADE_FROM_AKEEBABACKUP8_BTN') ?>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<?php elseif(!empty($this->akeebaBackup8PackageId)): ?>
|
||||
<div class="alert alert-info alert-dismissible">
|
||||
<h3>
|
||||
<?= Text::_('COM_AKEEBABACKUP_LBL_CPANEL_UPGRADED_FROM_AKEEBABACKUP8_HEAD') ?>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="<?= Text::_('JLIB_HTML_BEHAVIOR_CLOSE') ?>"></button>
|
||||
</h3>
|
||||
<p>
|
||||
<?= Text::_('COM_AKEEBABACKUP_LBL_CPANEL_UPGRADE_FROM_AKEEBABACKUP8_BODY') ?>
|
||||
</p>
|
||||
<p class="small">
|
||||
<?= Text::_('COM_AKEEBABACKUP_LBL_CPANEL_UPGRADED_FROM_AKEEBABACKUP8_NOTE') ?>
|
||||
</p>
|
||||
<p>
|
||||
<a class="btn btn-primary btn-lg"
|
||||
href="<?= Uri::base() ?>index.php?option=com_installer&view=manage&filter[search]=id:<?= $this->akeebaBackup8PackageId ?>"
|
||||
>
|
||||
<span class="fa fa-trash"></span>
|
||||
<?= Text::_('COM_AKEEBABACKUP_LBL_CPANEL_UPGRADED_FROM_AKEEBABACKUP8_BTN') ?>
|
||||
</a>
|
||||
<a class="btn btn-warning btn-sm"
|
||||
href="<?= Route::_('index.php?option=com_akeebabackup&view=Upgrade') ?>"
|
||||
>
|
||||
<span class="fa fa-hat-wizard"></span>
|
||||
<?= Text::_('COM_AKEEBABACKUP_LBL_CPANEL_UPGRADE_FROM_AKEEBABACKUP8_BTN') ?>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php // Warn about CloudFlare Rocket Loader ?>
|
||||
<details class="alert alert-warning" style="display: none;" id="cloudFlareWarn">
|
||||
<summary class="h4 fs-4 m-0 p-0">
|
||||
<?= Text::_('COM_AKEEBABACKUP_CPANEL_MSG_CLOUDFLARE_WARN')?>
|
||||
</summary>
|
||||
<p><?= Text::sprintf('COM_AKEEBABACKUP_CPANEL_MSG_CLOUDFLARE_WARN1', 'https://support.cloudflare.com/hc/en-us/articles/200169456-Why-is-JavaScript-or-jQuery-not-working-on-my-site-') ?></p>
|
||||
</details>
|
||||
<?php
|
||||
/**
|
||||
* DO NOT REMOVE THE ATTRIBUTES.
|
||||
*
|
||||
* This is a specialised test which looks for CloudFlare's completely broken RocketLoader feature and warns the user
|
||||
* about it.
|
||||
*/
|
||||
|
||||
$js = <<< JS
|
||||
window.addEventListener('DOMContentLoaded', function() {
|
||||
var test = localStorage.getItem('$cloudFlareTestFile');
|
||||
if (test)
|
||||
{
|
||||
document.getElementById("cloudFlareWarn").style.display = "block";
|
||||
}
|
||||
});
|
||||
|
||||
JS;
|
||||
|
||||
$this->document->getWebAssetManager()->addInlineScript($js, [], [
|
||||
'type' => 'text/javascript',
|
||||
'data-cfasync' => 'true'
|
||||
])
|
||||
?>
|
||||
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
/**
|
||||
* @package akeebabackup
|
||||
* @copyright Copyright (c)2006-2022 Nicholas K. Dionysopoulos / Akeeba Ltd
|
||||
* @license GNU General Public License version 3, or later
|
||||
*/
|
||||
|
||||
/** @var $this \Akeeba\Component\AkeebaBackup\Administrator\View\Controlpanel\HtmlView */
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Router\Route;
|
||||
|
||||
// Protect from unauthorized access
|
||||
defined('_JEXEC') || die();
|
||||
|
||||
// Pass parameters to the JavaScript
|
||||
$vapidKeys = $this->getModel('push')->getVapidKeys('com_akeebabackup');
|
||||
|
||||
if ($vapidKeys === null):
|
||||
?>
|
||||
<div class="card mb-2">
|
||||
<h3 class="card-header bg-info text-white">
|
||||
<?= Text::_('COM_AKEEBABACKUP_CONTROLPANEL_WEBPUSH_HEAD') ?>
|
||||
</h3>
|
||||
<div class="card-body">
|
||||
<div class="alert alert-warning" id="webPushNotAvailable">
|
||||
<h3 class="alert-heading"><?= Text::_('COM_AKEEBABACKUP_CONTROLPANEL_WEBPUSH_LBL_UNAVAILABLE_HEAD') ?></h3>
|
||||
<p><?= Text::_('COM_AKEEBABACKUP_CONTROLPANEL_WEBPUSH_LBL_UNAVAILABLE_SERVER_BODY') ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
endif;
|
||||
|
||||
$this->document->addScriptOptions('com_akeebabackup.webPush', [
|
||||
'workerUri' => $this->document
|
||||
->getWebAssetManager()
|
||||
->getAsset('script', 'com_akeebabackup.webpush-worker')
|
||||
->getUri('true'),
|
||||
'subscribeUri' => Route::_(
|
||||
'index.php?option=com_akeebabackup&task=push.webpushsubscribe',
|
||||
false,
|
||||
Route::TLS_IGNORE,
|
||||
true
|
||||
),
|
||||
'unsubscribeUri' => Route::_(
|
||||
'index.php?option=com_akeebabackup&task=push.webpushunsubscribe',
|
||||
false,
|
||||
Route::TLS_IGNORE,
|
||||
true
|
||||
),
|
||||
'vapidKeys' => $vapidKeys,
|
||||
'subscribeButton' => '#btnWebPushSubscribe',
|
||||
'unsubscribeButton' => '#btnWebPushUnsubscribe',
|
||||
'unavailableInfo' => '#webPushNotAvailable',
|
||||
]);
|
||||
// Load the JavaScript
|
||||
$this->document->getWebAssetManager()->useScript('com_akeebabackup.webpush');
|
||||
|
||||
?>
|
||||
<div class="card mb-2">
|
||||
<h3 class="card-header bg-info text-white">
|
||||
<?= Text::_('COM_AKEEBABACKUP_CONTROLPANEL_WEBPUSH_HEAD') ?>
|
||||
</h3>
|
||||
<div class="card-body">
|
||||
<details id="webPushDetails">
|
||||
<summary><?= Text::_('COM_AKEEBABACKUP_CONTROLPANEL_WEBPUSH_SUMMARY') ?></summary>
|
||||
<p>
|
||||
<?= Text::_('COM_AKEEBABACKUP_CONTROLPANEL_WEBPUSH_DETAILS') ?>
|
||||
</p>
|
||||
</details>
|
||||
|
||||
<div class="alert alert-warning" id="webPushNotAvailable">
|
||||
<h3 class="alert-heading"><?= Text::_('COM_AKEEBABACKUP_CONTROLPANEL_WEBPUSH_LBL_UNAVAILABLE_HEAD') ?></h3>
|
||||
<p><?= Text::_('COM_AKEEBABACKUP_CONTROLPANEL_WEBPUSH_LBL_UNAVAILABLE_BODY') ?></p>
|
||||
</div>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
id="btnWebPushSubscribe"
|
||||
class="btn btn-primary d-none disabled"
|
||||
>
|
||||
<?= Text::_('COM_AKEEBABACKUP_CONTROLPANEL_WEBPUSH_BTN_SUBSCRIBE') ?>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
id="btnWebPushUnsubscribe"
|
||||
class="btn btn-danger d-none disabled"
|
||||
>
|
||||
<?= Text::_('COM_AKEEBABACKUP_CONTROLPANEL_WEBPUSH_BTN_UNSUBSCRIBE') ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user