File manager - Edit - /home/verseaumee/empowernetkenyajuly2026/backuponupdate.zip
Back
PK oi.]�KF tmpl/default.html.phpnu &1i� <?php /** * @package akeebabackup * @copyright Copyright (c)2006-2019 Nicholas K. Dionysopoulos / Akeeba Ltd * @license GNU General Public License version 3, or later */ defined('_JEXEC') or die(); /** * @package AkeebaBackup * @subpackage backuponupdate * @copyright Copyright (c)2006-2019 Nicholas K. Dionysopoulos / Akeeba Ltd * @license GNU General Public License version 3, or later * * @since 5.4.1 * * This file contains the CSS for rendering the status (footer) icon for the Backup on Update plugin. The icon is only * rendered in the administrator backend of the site. * * You can override this file WITHOUT overwriting it. Copy this file into: * * administrator/templates/YOUR_TEMPLATE/html/plg_system_backuponupdate/default.html.php * * where YOUR_TEMPLATE is the folder of the administrator template you are using. Modify that copy. It will be loaded * instead of the file in plugins/system/backuponupdate. */ $token = urlencode(JFactory::getSession()->getToken()); $js = <<< JS ; // Work around broken third party Javascript function akeeba_backup_on_update_toggle() { window.jQuery.get('index.php?_akeeba_backup_on_update_toggle=$token', function() { location.reload(true); }); } JS; $document = JFactory::getApplication()->getDocument(); if (empty($document)) { $document = JFactory::getDocument(); } if (empty($document)) { return; } $document->addScriptDeclaration($js); ?> <div class="btn-group viewsite pull-right" id="akeebaBackupOnUpdateStatusContainer"> <a href="javascript:akeeba_backup_on_update_toggle()" class="hasPopover" data-title="<?php echo JText::_('PLG_SYSTEM_BACKUPONUPDATE_LBL_POPOVER_TITLE') ?>" data-content="<p><?php echo JText::_('PLG_SYSTEM_BACKUPONUPDATE_LBL_POPOVER_CONTENT_' . ($params['active'] ? 'ACTIVE' : 'INACTIVE')) ?></p><p class='small'><?php echo JText::_('PLG_SYSTEM_BACKUPONUPDATE_LBL_POPOVER_CONTENT_COMMON') ?></p>" data-placement="top"> <span class="badge badge-<?php echo $params['active'] ? 'success' : 'none' ?>"> <span class="icon-akeeba-backup-on-update"></span> </span> <?php echo JText::_('PLG_SYSTEM_BACKUPONUPDATE_LBL_' . ($params['active'] ? 'ACTIVE' : 'INACTIVE')) ?> </a> <span class="btn-group separator"></span> </div> PK oi.]&�G�� � tmpl/default.css.phpnu &1i� <?php /** * @package akeebabackup * @copyright Copyright (c)2006-2019 Nicholas K. Dionysopoulos / Akeeba Ltd * @license GNU General Public License version 3, or later */ defined('_JEXEC') or die(); /** * @package AkeebaBackup * @subpackage backuponupdate * @copyright Copyright (c)2006-2019 Nicholas K. Dionysopoulos / Akeeba Ltd * @license GNU General Public License version 3, or later * * @since 5.4.1 * * This file contains the CSS for rendering the status (footer) icon for the Backup on Update plugin. The icon is only * rendered in the administrator backend of the site. * * You can override this file WITHOUT overwriting it. Copy this file into: * * administrator/templates/YOUR_TEMPLATE/html/plg_system_backuponupdate/default.css.php * * where YOUR_TEMPLATE is the folder of the administrator template you are using. Modify that copy. It will be loaded * instead of the file in plugins/system/backuponupdate. */ ?> .icon-akeeba-backup-on-update { background-image: url("../media/com_akeeba/icons/akeeba-16-white.png"); width: 16px; height: 16px; } #akeebaBackupOnUpdateStatusContainer a span.badge { float: left; } #akeebaBackupOnUpdateStatusContainer a span.icon-akeeba-backup-on-update { margin: 0 -4px -3px; } PK oi.]�J� tmpl/joomla4.html.phpnu &1i� <?php /** * @package akeebabackup * @copyright Copyright (c)2006-2019 Nicholas K. Dionysopoulos / Akeeba Ltd * @license GNU General Public License version 3, or later */ defined('_JEXEC') or die(); /** * @package AkeebaBackup * @subpackage backuponupdate * @copyright Copyright (c)2006-2019 Nicholas K. Dionysopoulos / Akeeba Ltd * @license GNU General Public License version 3, or later * * @since 6.4.1 * * This file contains the CSS for rendering the status (footer) icon for the Backup on Update plugin. The icon is only * rendered in the administrator backend of the site. * * You can override this file WITHOUT overwriting it. Copy this file into: * * administrator/templates/YOUR_TEMPLATE/html/plg_system_backuponupdate/joomla4.html.php * * where YOUR_TEMPLATE is the folder of the administrator template you are using. Modify that copy. It will be loaded * instead of the file in plugins/system/backuponupdate. */ $document = JFactory::getDocument(); $document->addScript('../media/com_akeeba/js/System.min.js'); $token = urlencode(JFactory::getSession()->getToken()); $js = <<< JS ; // Work around broken third party Javascript function akeeba_backup_on_update_toggle() { window.jQuery.get('index.php?_akeeba_backup_on_update_toggle=$token', function() { location.reload(true); }); } akeeba.System.documentReady(function() { var newListItemArray = document.getElementById('akeebabackup-bou-container').querySelectorAll('ul > li'); var headerLinks = document.getElementById('header').querySelectorAll('div.header-items ul.nav'); var newItem = newListItemArray[0]; var headerLink = headerLinks[0]; if (headerLink.childNodes.length < 2) { headerLink.appendChild(newItem); } else { headerLink.insertBefore(newItem, headerLink.childNodes[headerLink.childNodes.length - 2]); } var oldChild = document.getElementById('akeebabackup-bou-container'); oldChild.parentElement.removeChild(oldChild); }) JS; $document = JFactory::getApplication()->getDocument(); if (empty($document)) { $document = JFactory::getDocument(); } if (empty($document)) { return; } $document->addScriptDeclaration($js); ?> <div id="akeebabackup-bou-container"> <ul> <li class="nav-item"> <a class="nav-link dropdown-toggle" href="javascript:akeeba_backup_on_update_toggle()" title="<?php echo JText::_('PLG_SYSTEM_BACKUPONUPDATE_LBL_POPOVER_CONTENT_' . ($params['active'] ? 'ACTIVE' : 'INACTIVE')) ?>"> <span class="fa fa-akbou <?php echo $params['active'] ? 'fa-akbou-active' : 'fa-akbou-inactive' ?>" aria-hidden="true"></span> <span class="sr-only"> <?php echo JText::_('PLG_SYSTEM_BACKUPONUPDATE_LBL_' . ($params['active'] ? 'ACTIVE' : 'INACTIVE')) ?> </span> </a> </li> </ul> </div> PK oi.]�a �e e tmpl/joomla4.css.phpnu &1i� <?php /** * @package akeebabackup * @copyright Copyright (c)2006-2019 Nicholas K. Dionysopoulos / Akeeba Ltd * @license GNU General Public License version 3, or later */ defined('_JEXEC') or die(); /** * @package AkeebaBackup * @subpackage backuponupdate * @copyright Copyright (c)2006-2019 Nicholas K. Dionysopoulos / Akeeba Ltd * @license GNU General Public License version 3, or later * * @since 6.4.1 * * This file contains the CSS for rendering the status (footer) icon for the Backup on Update plugin. The icon is only * rendered in the administrator backend of the site. * * You can override this file WITHOUT overwriting it. Copy this file into: * * administrator/templates/YOUR_TEMPLATE/html/plg_system_backuponupdate/joomla4.css.php * * where YOUR_TEMPLATE is the folder of the administrator template you are using. Modify that copy. It will be loaded * instead of the file in plugins/system/backuponupdate. */ ?> @font-face { font-family: "Akeeba Products for Joomla Status"; font-style: normal; font-weight: normal; src: url("../media/com_akeeba/fonts/akeeba/Akeeba-Products.woff") format("woff"); } span.fa-akbou:before { display: inline-block; font-family: 'Akeeba Products for Joomla Status'; font-style: normal; font-weight: normal; line-height: 1; -webkit-font-smoothing: antialiased; position: relative; -moz-osx-font-smoothing: grayscale; color: var(--primary-dark); background: transparent; } span[class*=fa-akbou]:before { content: 'B'; } span.fa-akbou-active:before { color: var(--primary-dark); } span.fa-akbou-inactive:before { color: var(--warning); } PK oi.]��_� � script.phpnu &1i� <?php /** * @package akeebabackup * @copyright Copyright (c)2006-2019 Nicholas K. Dionysopoulos / Akeeba Ltd * @license GNU General Public License version 3, or later */ defined('_JEXEC') or die; // Load FOF if not already loaded if (!defined('FOF30_INCLUDED') && !@include_once(JPATH_LIBRARIES . '/fof30/include.php')) { throw new RuntimeException('This extension requires FOF 3.0.'); } class plgSystemBackuponupdateInstallerScript extends FOF30\Utils\InstallScript\Plugin { } PK oi.]|��N web.confignu &1i� <?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>PK oi.]nД�� � backuponupdate.phpnu &1i� <?php /** * @package akeebabackup * @copyright Copyright (c)2006-2019 Nicholas K. Dionysopoulos / Akeeba Ltd * @license GNU General Public License version 3, or later */ defined('_JEXEC') or die(); if (!version_compare(PHP_VERSION, '5.6.0', '>=')) { return; } // Make sure Akeeba Backup is installed if (!file_exists(JPATH_ADMINISTRATOR . '/components/com_akeeba')) { return; } // Load FOF if (!defined('FOF30_INCLUDED') && !@include_once(JPATH_LIBRARIES . '/fof30/include.php')) { return; } JLoader::import('joomla.filesystem.file'); $db = JFactory::getDbo(); // Is Akeeba Backup enabled? $query = $db->getQuery(true) ->select($db->qn('enabled')) ->from($db->qn('#__extensions')) ->where($db->qn('element') . ' = ' . $db->q('com_akeeba')) ->where($db->qn('type') . ' = ' . $db->q('component')); $db->setQuery($query); $enabled = $db->loadResult(); if (!$enabled) { return; } JLoader::import('joomla.application.plugin'); class plgSystemBackuponupdate extends JPlugin { /** * Constructor * * @param object $subject The object to observe * @param array $config An array that holds the plugin configuration * * @since 2.5 */ public function __construct(& $subject, $config) { /** * I know that this piece of code cannot possibly be executed since I have already returned BEFORE declaring * the class when eAccelerator is detected. However, eAccelerator is a GINORMOUS, STINKY PILE OF BULL CRAP. The * stupid thing will return above BUT it will also declare the class EVEN THOUGH according to how PHP works * this part of the code should be unreachable o_O Therefore I have to define this constant and exit the * constructor when we have already determined that this class MUST NOT be defined. Because screw you * eAccelerator, that's why. */ if (defined('AKEEBA_EACCELERATOR_IS_SO_BORKED_IT_DOES_NOT_EVEN_RETURN')) { return; } parent::__construct($subject, $config); } public function onAfterInitialise() { // Make sure this is the back-end $app = JFactory::getApplication(); if (!in_array($app->getName(), array('administrator', 'admin'))) { return; } // Handle the flag toggle through AJAX $ji = new JInput(); $toggleParam = $ji->getCmd('_akeeba_backup_on_update_toggle'); if ($toggleParam && ($toggleParam == JFactory::getSession()->getToken())) { $this->toggleBoUFlag(); return; } // Make sure we are active if ($this->getBoUFlag() != 1) { return; } // Get the input variables $component = $ji->getCmd('option', ''); $task = $ji->getCmd('task', ''); $backedup = $ji->getInt('is_backed_up', 0); // Perform a redirection on Joomla! Update download or install task, unless we have already backed up the site if (($component == 'com_joomlaupdate') && ($task == 'update.install') && !$backedup) { // Get the backup profile ID $profileId = (int) $this->params->get('profileid', 1); if ($profileId <= 0) { $profileId = 1; } $jtoken = JFactory::getSession()->getFormToken(); // Get the return URL $return_url = JUri::base() . 'index.php?option=com_joomlaupdate&task=update.install&is_backed_up=1&'.$jtoken.'=1'; // Get the redirect URL $redirect_url = JUri::base() . 'index.php?option=com_akeeba&view=Backup&autostart=1&returnurl=' . urlencode($return_url) . '&profileid=' . $profileId . "&$jtoken=1"; // Perform the redirection $app = JFactory::getApplication(); $app->redirect($redirect_url); } } /** * Renders the Backup on Update status icon in the Joomla! backend. * * We use a bit of fine trickery to accomplish that. The onAfterModuleList event is triggered after Joomla! has * loaded a list of the modules to render on the page. We use that event to inject a fake module object of type * mod_custom with the HTML we want to render in the 'status' position of the template. * * @param array $modules The array of module objects passed to us by Joomla! * * @since 5.4.1 * @throws Exception */ public function onAfterModuleList(&$modules) { $app = JFactory::getApplication(); // Only work when format=html (since we try adding CSS and Javascript on the page which is only valid in HTML). if ($app->input->getCmd('format', 'html') != 'html') { return; } // Am I in the administrator application to begin with? if (version_compare(JVERSION, '3.7.0', 'lt')) { $isAdmin = $app->isAdmin(); } else { $isAdmin = $app->isClient('administrator'); } if (!$isAdmin) { return; } // Load the language $this->loadLanguage(); JHtml::_('bootstrap.popover'); try { /** * Apparently you may have format=html with an application that returns no document...?! I can't see how it's * possible lest a 3PD has screwed up. In any case, this happened in tickets 28218, 28223, 28224 and 28225. My * workaround is to first check if the application can and does return a document. If not, try to get the document * via JFactory (legacy method). If that fails too, skip the "Disable plugin" feature altogether. */ $document = null; if (method_exists($app, 'getDocument')) { $document = $app->getDocument(); } if (is_null($document) || !method_exists($document, 'addStyleDeclaration')) { /** * Don't remove the class_exists. Joomla! 3.8 will have JFactor as an alias to a namespaced class so I might * need to load it with the class_exists trick. As for the method_exists, it's us trying to make sure future * versions of Joomla! won't break anything. */ if (class_exists('JFactory', true) && method_exists('JFactory', 'getDocument')) { $document = JFactory::getDocument(); } } /** * Now, if the document is still unset (a 3PD seriously cocked up a JApplicationCms subclass) OR the document is * quite obviously not JDocumentHtml (which means a 3PD should be tarred, feathered and stringed for cocking up an * application AND a document subclass) we have to skip our "Disable plugin" feature since it, well, not work at * all. */ if (is_null($document) || !method_exists($document, 'addStyleDeclaration')) { return; } $isJoomla4 = version_compare(JVERSION, '3.999999.999999', 'gt'); $baseDocumentName = $isJoomla4 ? 'joomla4' : 'default'; $document->addStyleDeclaration($this->loadTemplate($baseDocumentName . '.css')); $fakeModule = (object)[ 'id' => -1, 'title' => 'Backup on Update', 'module' => 'mod_custom', 'position' => 'status', 'content' => $this->loadTemplate($baseDocumentName . '.html', [ 'active' => $this->getBoUFlag() ]), 'showtitle' => 0, 'params' => '{"prepare_content":"0","layout":"_:default","moduleclass_sfx":"","cache":"0","cache_time":"1","module_tag":"div","bootstrap_size":"0","header_tag":"h3","header_class":"","style":"0"}', 'menuid' => 0, ]; } catch (Exception $e) { return; } $modules[] = $fakeModule; } /** * Load a plugin layout file. These files can be overridden with standard Joomla! template overrides. * * @param string $layout The layout file to load * @param array $params An array passed verbatim to the layout file as the `$params` variable * * @return string The rendered contents of the file * * @since 5.4.1 */ private function loadTemplate($layout, array $params = []) { $file = JPluginHelper::getLayoutPath('system', 'backuponupdate', $layout); ob_start(); require_once $file; $ret = ob_get_clean(); return $ret; } private function getBoUFlag() { return JFactory::getSession()->get('active', 1, 'plg_system_backuponupdate'); } private function toggleBoUFlag() { $status = 1 - $this->getBoUFlag(); JFactory::getSession()->set('active', $status, 'plg_system_backuponupdate'); } } PK oi.]ř�Z Z backuponupdate.xmlnu &1i� <?xml version="1.0" encoding="utf-8"?> <!-- ~ @package akeebabackup ~ @copyright Copyright (c)2006-2019 Nicholas K. Dionysopoulos / Akeeba Ltd ~ @license GNU General Public License version 3, or later --> <extension version="2.5.0" type="plugin" group="system" method="upgrade"> <name>PLG_SYSTEM_BACKUPONUPDATE</name> <author>Nicholas K. Dionysopoulos</author> <authorEmail>nicholas@dionysopoulos.me</authorEmail> <authorUrl>http://www.akeebabackup.com</authorUrl> <copyright>Copyright (c)2006-2019 Nicholas K. Dionysopoulos</copyright> <license>GNU General Public License version 3, or later</license> <creationDate>2019-03-18</creationDate> <version>6.4.2.1</version> <description>PLG_SYSTEM_BACKUPONUPDATE_XML_DESCRIPTION</description> <files> <filename plugin="backuponupdate">backuponupdate.php</filename> <filename>.htaccess</filename> <filename>web.config</filename> <folder>tmpl</folder> </files> <languages folder="language"> <language tag="en-GB">en-GB/en-GB.plg_system_backuponupdate.ini</language> <language tag="en-GB">en-GB/en-GB.plg_system_backuponupdate.sys.ini</language> </languages> <config addfieldpath="/administrator/components/com_akeeba/fields"> <fields name="params"> <fieldset name="basic"> <field name="profileid" type="backupprofiles" default="1" label="PLG_SYSTEM_BACKUPONUPDATE_PROFILE_LABEL" description="PLG_SYSTEM_BACKUPONUPDATE_PROFILE_DESC" /> </fieldset> </fields> </config> <scriptfile>script.php</scriptfile> </extension> PK oi.] fields/adminer.phpnu �[��� PK oi.]j�K fields/backupprofiles.phpnu &1i� <?php /** * @package AkeebaBackup * @subpackage backuponupdate * @copyright Copyright (c)2009-2016 Nicholas K. Dionysopoulos * @license GNU General Public License version 3, or later * * @since 3.11.1 */ defined('_JEXEC') or die(); if (class_exists('JFormFieldBackupprofiles')) { return; } /** * Our main element class, creating a multi-select list out of an SQL statement */ class JFormFieldBackupprofiles extends JFormField { /** * Element name * * @access protected * @var string */ var $_name = 'Backupprofiles'; function getInput() { $db = JFactory::getDBO(); $query = $db->getQuery(true) ->select(array( $db->qn('id'), $db->qn('description'), ))->from($db->qn('#__ak_profiles')); $db->setQuery($query); $key = 'id'; $val = 'description'; $objectList = $db->loadObjectList(); if (!is_array($objectList)) { $objectList = array(); } return JHTML::_('select.genericlist', $objectList, $this->name, 'class="inputbox"', $key, $val, $this->value, $this->id); } }PK oi.]�KF tmpl/default.html.phpnu &1i� PK oi.]&�G�� � X tmpl/default.css.phpnu &1i� PK oi.]�J� � tmpl/joomla4.html.phpnu &1i� PK oi.]�a �e e � tmpl/joomla4.css.phpnu &1i� PK oi.]��_� � � script.phpnu &1i� PK oi.]|��N �"