예제 #1
0
 public function onBeforeDispatch()
 {
     // You can't fix stupid… but you can try working around it
     if (!function_exists('json_encode') || !function_exists('json_decode')) {
         require_once JPATH_ADMINISTRATOR . '/components/' . $this->component . '/helpers/jsonlib.php';
     }
     $result = parent::onBeforeDispatch();
     if ($result) {
         // Merge the language overrides
         $paths = array(JPATH_ROOT, JPATH_ADMINISTRATOR);
         $jlang = JFactory::getLanguage();
         $jlang->load($this->component, $paths[0], 'en-GB', true);
         $jlang->load($this->component, $paths[0], null, true);
         $jlang->load($this->component, $paths[1], 'en-GB', true);
         $jlang->load($this->component, $paths[1], null, true);
         $jlang->load($this->component . '.override', $paths[0], 'en-GB', true);
         $jlang->load($this->component . '.override', $paths[0], null, true);
         $jlang->load($this->component . '.override', $paths[1], 'en-GB', true);
         $jlang->load($this->component . '.override', $paths[1], null, true);
         // Load Akeeba Strapper
         if (!defined('AKEEBASUBSMEDIATAG')) {
             $staticFilesVersioningTag = md5(AKEEBASUBS_VERSION . AKEEBASUBS_DATE);
             define('AKEEBASUBSMEDIATAG', $staticFilesVersioningTag);
         }
         include_once JPATH_ROOT . '/media/akeeba_strapper/strapper.php';
         AkeebaStrapper::$tag = AKEEBASUBSMEDIATAG;
         AkeebaStrapper::bootstrap();
         AkeebaStrapper::jQueryUI();
         AkeebaStrapper::addCSSfile('media://com_akeebasubs/css/backend.css');
         AkeebaStrapper::addJSfile('media://com_akeebasubs/js/backend.js');
     }
     return $result;
 }
예제 #2
0
 public function onAdd($tpl = null)
 {
     AkeebaStrapper::addJSfile('media://com_akeeba/js/configuration.js');
     $media_folder = JUri::base() . '../media/com_akeeba/';
     // Get a JSON representation of GUI data
     $json = AkeebaHelperEscape::escapeJS(Factory::getEngineParamsProvider()->getJsonGuiDefinition(), '"\\');
     $this->json = $json;
     // Get profile ID
     $profileid = Platform::getInstance()->get_active_profile();
     $this->profileid = $profileid;
     // Get profile name
     $profile = F0FModel::getTmpInstance('Profiles', 'AkeebaModel')->setId($profileid)->getItem();
     $this->profilename = $this->escape($profile->description);
     $this->quickicon = (int) $profile->quickicon;
     // Get the root URI for media files
     $this->mediadir = AkeebaHelperEscape::escapeJS($media_folder . 'theme/');
     // Are the settings secured?
     if (Platform::getInstance()->get_platform_configuration_option('useencryption', -1) == 0) {
         $this->securesettings = -1;
     } elseif (!Factory::getSecureSettings()->supportsEncryption()) {
         $this->securesettings = 0;
     } else {
         JLoader::import('joomla.filesystem.file');
         $filename = JPATH_COMPONENT_ADMINISTRATOR . '/engine/serverkey.php';
         if (JFile::exists($filename)) {
             $this->securesettings = 1;
         } else {
             $this->securesettings = 0;
         }
     }
 }
예제 #3
0
 public function onBrowse($tpl = null)
 {
     AkeebaStrapper::addJSfile('media://com_akeeba/js/fsfilter.js');
     $model = $this->getModel();
     $task = $model->getState('browse_task', 'normal');
     // Add custom submenus
     $toolbar = F0FToolbar::getAnInstance($this->input->get('option', 'com_foobar', 'cmd'), $this->config);
     $toolbar->appendLink(JText::_('FILTERS_LABEL_NORMALVIEW'), JUri::base() . 'index.php?option=com_akeeba&view=fsfilter&task=normal', $task == 'normal');
     $toolbar->appendLink(JText::_('FILTERS_LABEL_TABULARVIEW'), JUri::base() . 'index.php?option=com_akeeba&view=fsfilter&task=tabular', $task == 'tabular');
     $media_folder = JUri::base() . '../media/com_akeeba/';
     // Get the root URI for media files
     $this->mediadir = AkeebaHelperEscape::escapeJS($media_folder . 'theme/');
     // Get a JSON representation of the available roots
     $filters = Factory::getFilters();
     $root_info = $filters->getInclusions('dir');
     $roots = array();
     $options = array();
     if (!empty($root_info)) {
         // Loop all dir definitions
         foreach ($root_info as $dir_definition) {
             if (is_null($dir_definition[1])) {
                 // Site root definition has a null element 1. It is always pushed on top of the stack.
                 array_unshift($roots, $dir_definition[0]);
             } else {
                 $roots[] = $dir_definition[0];
             }
             $options[] = JHTML::_('select.option', $dir_definition[0], $dir_definition[0]);
         }
     }
     $site_root = $roots[0];
     $attribs = 'onchange="akeeba.Fsfilters.activeRootChanged();"';
     $this->root_select = JHTML::_('select.genericlist', $options, 'root', $attribs, 'value', 'text', $site_root, 'active_root');
     $this->roots = $roots;
     switch ($task) {
         case 'normal':
         default:
             $this->setLayout('default');
             // Get a JSON representation of the directory data
             $model = $this->getModel();
             $json = json_encode($model->make_listing($site_root, array(), ''));
             $this->json = $json;
             break;
         case 'tabular':
             $this->setLayout('tabular');
             // Get a JSON representation of the tabular filter data
             $model = $this->getModel();
             $json = json_encode($model->get_filters($site_root));
             $this->json = $json;
             break;
     }
     // Get profile ID
     $profileid = Platform::getInstance()->get_active_profile();
     $this->profileid = $profileid;
     // Get profile name
     $pmodel = F0FModel::getAnInstance('Profiles', 'AkeebaModel');
     $pmodel->setId($profileid);
     $profile_data = $pmodel->getItem();
     $this->profilename = $this->escape($profile_data->description);
     return true;
 }
예제 #4
0
 public function onBeforeDispatch()
 {
     $result = parent::onBeforeDispatch();
     if ($result) {
         // Load Akeeba Strapper
         include_once JPATH_ROOT . '/media/akeeba_strapper/strapper.php';
         AkeebaStrapper::$tag = AKEEBAMEDIATAG;
         AkeebaStrapper::bootstrap();
         AkeebaStrapper::jQueryUI();
         AkeebaStrapper::addJSfile('media://com_akeeba/js/gui-helpers.js');
         AkeebaStrapper::addJSfile('media://com_akeeba/js/akeebaui.js');
         AkeebaStrapper::addJSfile('media://com_akeeba/js/piecon.min.js');
         jimport('joomla.filesystem.file');
         if (JFile::exists(F0FTemplateUtils::parsePath('media://com_akeeba/plugins/js/akeebaui.js', true))) {
             AkeebaStrapper::addJSfile('media://com_akeeba/plugins/js/akeebaui.js');
         }
         AkeebaStrapper::addCSSfile('media://com_akeeba/theme/akeebaui.css');
         // Control Check
         $view = F0FInflector::singularize($this->input->getCmd('view', $this->defaultView));
         if ($view == 'liveupdate') {
             $url = JUri::base() . 'index.php?option=com_akeeba';
             JFactory::getApplication()->redirect($url);
             return;
         }
     }
     return $result;
 }
예제 #5
0
 public function onAdd($tpl = null)
 {
     $aeconfig = Factory::getConfiguration();
     // Load the Configuration Wizard Javascript file
     AkeebaStrapper::addJSfile('media://com_akeeba/js/confwiz.js');
     $this->setLayout('wizard');
     return true;
 }
예제 #6
0
 public function onBrowse($tpl = null)
 {
     AkeebaStrapper::addJSfile('media://com_akeeba/js/fsfilter.js');
     AkeebaStrapper::addJSfile('media://com_akeeba/js/dbef.js');
     $model = $this->getModel();
     $task = $model->getState('browse_task', 'normal');
     // Add custom submenus
     $toolbar = F0FToolbar::getAnInstance($this->input->get('option', 'com_foobar', 'cmd'), $this->config);
     $toolbar->appendLink(JText::_('FILTERS_LABEL_NORMALVIEW'), JUri::base() . 'index.php?option=com_akeeba&view=dbef&task=normal', $task == 'normal');
     $toolbar->appendLink(JText::_('FILTERS_LABEL_TABULARVIEW'), JUri::base() . 'index.php?option=com_akeeba&view=dbef&task=tabular', $task == 'tabular');
     $media_folder = JUri::base() . '../media/com_akeeba/';
     // Get the root URI for media files
     $this->mediadir = AkeebaHelperEscape::escapeJS($media_folder . 'theme/');
     // Get a JSON representation of the available roots
     $model = $this->getModel();
     $root_info = $model->get_roots();
     $roots = array();
     if (!empty($root_info)) {
         // Loop all dir definitions
         foreach ($root_info as $def) {
             $roots[] = $def->value;
             $options[] = JHTML::_('select.option', $def->value, $def->text);
         }
     }
     $site_root = '[SITEDB]';
     $attribs = 'onchange="akeeba.Dbfilters.activeRootChanged ();"';
     $this->root_select = JHTML::_('select.genericlist', $options, 'root', $attribs, 'value', 'text', $site_root, 'active_root');
     $this->roots = $roots;
     switch ($task) {
         case 'normal':
         default:
             $this->setLayout('default');
             // Get a JSON representation of the database data
             $model = $this->getModel();
             $json = json_encode($model->make_listing($site_root));
             $this->json = $json;
             break;
         case 'tabular':
             $this->setLayout('tabular');
             // Get a JSON representation of the tabular filter data
             $model = $this->getModel();
             $json = json_encode($model->get_filters($site_root));
             $this->json = $json;
             break;
     }
     // Get profile ID
     $profileid = Platform::getInstance()->get_active_profile();
     $this->profileid = $profileid;
     // Get profile name
     if (!class_exists('AkeebaModelProfiles')) {
         JLoader::import('models.profiles', JPATH_COMPONENT_ADMINISTRATOR);
     }
     $model = new AkeebaModelProfiles();
     $model->setId($profileid);
     $profile_data = $model->getProfile();
     $this->profilename = $this->escape($profile_data->description);
     return true;
 }
 public function onBeforeDispatch()
 {
     $result = parent::onBeforeDispatch();
     if ($result) {
         // Load Akeeba Strapper
         include_once JPATH_ROOT . '/media/akeeba_strapper/strapper.php';
         AkeebaStrapper::$tag = AKEEBAMEDIATAG;
         AkeebaStrapper::bootstrap();
         AkeebaStrapper::jQueryUI();
         AkeebaStrapper::addJSfile('media://com_akeeba/js/gui-helpers.js');
         AkeebaStrapper::addJSfile('media://com_akeeba/js/akeebaui.js');
         AkeebaStrapper::addJSfile('media://com_akeeba/plugins/js/akeebaui.js');
         AkeebaStrapper::addCSSfile('media://com_akeeba/theme/akeebaui.css');
     }
     return $result;
 }
예제 #8
0
 public function onBeforeDispatch()
 {
     $result = parent::onBeforeDispatch();
     if ($result) {
         // Load Akeeba Strapper
         include_once JPATH_ROOT . '/media/akeeba_strapper/strapper.php';
         AkeebaStrapper::$tag = AKEEBAMEDIATAG;
         AkeebaStrapper::bootstrap();
         AkeebaStrapper::jQueryUI();
         AkeebaStrapper::addJSfile('media://com_akeeba/js/gui-helpers.js');
         AkeebaStrapper::addJSfile('media://com_akeeba/js/akeebaui.js');
         jimport('joomla.filesystem.file');
         if (JFile::exists(FOFTemplateUtils::parsePath('media://com_akeeba/plugins/js/akeebaui.js', true))) {
             AkeebaStrapper::addJSfile('media://com_akeeba/plugins/js/akeebaui.js');
         }
         AkeebaStrapper::addCSSfile('media://com_akeeba/theme/akeebaui.css');
     }
     return $result;
 }
예제 #9
0
 /**
  * Runs on the wizard (default) task
  *
  * @param   string|null  $tpl  Ignored
  *
  * @return  bool  True to let the view display
  */
 public function onWizard($tpl = null)
 {
     AkeebaStrapper::addJSfile('media://com_akeeba/js/transfer.js');
     /** @var AkeebaModelTransfers $model */
     $model = $this->getModel();
     $session = JFactory::getSession();
     $this->latestBackup = $model->getLatestBackupInformation();
     $this->spaceRequired = $model->getApproximateSpaceRequired();
     $this->newSiteUrl = $session->get('transfer.url', '', 'akeeba');
     $this->newSiteUrlResult = $session->get('transfer.url_status', '', 'akeeba');
     $this->ftpSupport = $session->get('transfer.ftpsupport', null, 'akeeba');
     $this->transferOption = $session->get('transfer.transferOption', null, 'akeeba');
     $this->ftpHost = $session->get('transfer.ftpHost', null, 'akeeba');
     $this->ftpPort = $session->get('transfer.ftpPort', null, 'akeeba');
     $this->ftpUsername = $session->get('transfer.ftpUsername', null, 'akeeba');
     $this->ftpPassword = $session->get('transfer.ftpPassword', null, 'akeeba');
     $this->ftpPubKey = $session->get('transfer.ftpPubKey', null, 'akeeba');
     $this->ftpPrivateKey = $session->get('transfer.ftpPrivateKey', null, 'akeeba');
     $this->ftpDirectory = $session->get('transfer.ftpDirectory', null, 'akeeba');
     $this->ftpPassive = $session->get('transfer.ftpPassive', 1, 'akeeba');
     if (!empty($this->latestBackup)) {
         $lastBackupDate = JFactory::getDate($this->latestBackup['backupstart'], 'UTC');
         $this->lastBackupDate = $lastBackupDate->format(JText::_('DATE_FORMAT_LC'), true);
         $session->set('transfer.lastBackup', $this->latestBackup, 'akeeba');
     }
     if (empty($this->ftpSupport)) {
         $this->ftpSupport = $model->getFTPSupport();
         $session->set('transfer.ftpsupport', $this->ftpSupport, 'akeeba');
     }
     $this->transferOptions = $this->getTransferMethodOptions();
     /*
     foreach ($this->ftpSupport['firewalled'] as $method => $isFirewalled)
     {
     	if ($isFirewalled && $this->ftpSupport['supported'][$method])
     	{
     		$this->hasFirewalledMethods = true;
     
     		break;
     	}
     }
     */
     return true;
 }
예제 #10
0
 public function onDisplay($tpl = null)
 {
     AkeebaStrapper::addJSfile('media://com_akeeba/plugins/js/encryption.js');
     $model = $this->getModel();
     $restorationstep = $model->getState('restorationstep', 0);
     if ($restorationstep == 1) {
         $password = $model->getState('password');
         $this->password = $password;
         $this->setLayout('restore');
     } else {
         $id = $model->getId();
         $ftpparams = $model->getFTPParams();
         $extractionmodes = $model->getExtractionModes();
         $this->id = $id;
         $this->ftpparams = $ftpparams;
         $this->extractionmodes = $extractionmodes;
     }
     // Add live help
     AkeebaHelperIncludes::addHelp('restore');
     return true;
 }
예제 #11
0
// Protect from unauthorized access
defined('_JEXEC') or die;
// Workaround for IDIOT HOSTS. If you are one of these hosts, YOUR "ANTIVIRUS" IS CRAP!
$idiotHostWorkaround = 'h' . str_repeat('t', 2) . 'ps' . ':';
$idiotHostWorkaround .= str_repeat('/', 2) . substr('WTF api IDIOT HOST', 4, 3) . '.';
$idiotHostWorkaround .= strtolower('IP') . substr('signify', -3) . '.' . substr('organisation', 0, 3);
JHtml::_('behavior.modal');
F0FTemplateUtils::addCSS('admin://components/com_admintools/media/css/jquery.jqplot.min.css');
AkeebaStrapper::addJSfile('admin://components/com_admintools/media/js/excanvas.min.js?' . ADMINTOOLS_VERSION);
AkeebaStrapper::addJSfile('admin://components/com_admintools/media/js/jquery.jqplot.min.js?' . ADMINTOOLS_VERSION);
AkeebaStrapper::addJSfile('admin://components/com_admintools/media/js/jqplot.highlighter.min.js?' . ADMINTOOLS_VERSION);
AkeebaStrapper::addJSfile('admin://components/com_admintools/media/js/jqplot.dateAxisRenderer.min.js?' . ADMINTOOLS_VERSION);
AkeebaStrapper::addJSfile('admin://components/com_admintools/media/js/jqplot.barRenderer.min.js?' . ADMINTOOLS_VERSION);
AkeebaStrapper::addJSfile('admin://components/com_admintools/media/js/jqplot.pieRenderer.min.js?' . ADMINTOOLS_VERSION);
AkeebaStrapper::addJSfile('admin://components/com_admintools/media/js/jqplot.hermite.js?' . ADMINTOOLS_VERSION);
AkeebaStrapper::addJSfile('admin://components/com_admintools/media/js/cpanelgraphs.js?' . ADMINTOOLS_VERSION);
$lang = JFactory::getLanguage();
$option = 'com_admintools';
$isPro = $this->isPro;
$root = @realpath(JPATH_ROOT);
$root = trim($root);
$emptyRoot = empty($root);
$confirm = JText::_('ATOOLS_LBL_PURGESESSIONS_WARN', true);
$script = <<<JS

;// This comment is intentionally put here to prevent badly written plugins from causing a Javascript error
// due to missing trailing semicolon and/or newline in their code.
(function(\$){
\t\$(document).ready(function(){
\t\t\$('#optimize').click(warnBeforeOptimize);
\t\t\$('#btnchangelog').click(showChangelog);
예제 #12
0
 *  @package AkeebaSubs
 *  @copyright Copyright (c)2010-2014 Nicholas K. Dionysopoulos
 *  @license GNU General Public License version 3, or later
 */
defined('_JEXEC') or die;
JHTML::_('behavior.framework', true);
F0FTemplateUtils::addCSS('media://com_akeebasubs/css/jquery.jqplot.min.css?' . AKEEBASUBS_VERSIONHASH);
AkeebaStrapper::addJSfile('media://com_akeebasubs/js/expirations.js?' . AKEEBASUBS_VERSIONHASH);
AkeebaStrapper::addJSfile('media://com_akeebasubs/js/excanvas.min.js?' . AKEEBASUBS_VERSIONHASH);
AkeebaStrapper::addJSfile('media://com_akeebasubs/js/jquery.jqplot.min.js?' . AKEEBASUBS_VERSIONHASH);
AkeebaStrapper::addJSfile('media://com_akeebasubs/js/jqplot.json2.min.js?' . AKEEBASUBS_VERSIONHASH);
AkeebaStrapper::addJSfile('media://com_akeebasubs/js/jqplot.highlighter.min.js?' . AKEEBASUBS_VERSIONHASH);
AkeebaStrapper::addJSfile('media://com_akeebasubs/js/jqplot.dateAxisRenderer.min.js?' . AKEEBASUBS_VERSIONHASH);
AkeebaStrapper::addJSfile('media://com_akeebasubs/js/jqplot.canvasAxisTickRenderer.min.js?' . AKEEBASUBS_VERSIONHASH);
AkeebaStrapper::addJSfile('media://com_akeebasubs/js/jqplot.canvasTextRenderer.min.js?' . AKEEBASUBS_VERSIONHASH);
AkeebaStrapper::addJSfile('media://com_akeebasubs/js/jqplot.barRenderer.min.js?' . AKEEBASUBS_VERSIONHASH);
$exp_start = date('Y-m-d', strtotime('-2 months', strtotime('last monday')));
?>
<div style="padding-bottom: 80px;padding-left: 15px">
	<h3><?php 
echo JText::_('COM_AKEEBASUBS_REPORTS_EXPIRATIONS_WEEK_CHART');
?>
</h3>
	<?php 
echo JText::_('COM_AKEEBASUBS_DASHBOARD_FROMDATE');
?>
	<?php 
echo JHTML::calendar($exp_start, 'exp_start', 'exp_start');
?>
	<button class="btn btn-mini" id="exp_graph_reload" onclick="return false">
		<?php 
예제 #13
0
/**
 *  @package AkeebaSubs
 *  @copyright Copyright (c)2010-2015 Nicholas K. Dionysopoulos
 *  @license GNU General Public License version 3, or later
 */
defined('_JEXEC') or die;
F0FTemplateUtils::addCSS('media://com_akeebasubs/css/jquery.jqplot.min.css?' . AKEEBASUBS_VERSIONHASH);
AkeebaStrapper::addJSfile('media://com_akeebasubs/js/excanvas.min.js?' . AKEEBASUBS_VERSIONHASH);
AkeebaStrapper::addJSfile('media://com_akeebasubs/js/jquery.jqplot.min.js?' . AKEEBASUBS_VERSIONHASH);
AkeebaStrapper::addJSfile('media://com_akeebasubs/js/jqplot.json2.min.js?' . AKEEBASUBS_VERSIONHASH);
AkeebaStrapper::addJSfile('media://com_akeebasubs/js/jqplot.highlighter.min.js?' . AKEEBASUBS_VERSIONHASH);
AkeebaStrapper::addJSfile('media://com_akeebasubs/js/jqplot.dateAxisRenderer.min.js?' . AKEEBASUBS_VERSIONHASH);
AkeebaStrapper::addJSfile('media://com_akeebasubs/js/jqplot.canvasAxisTickRenderer.min.js?' . AKEEBASUBS_VERSIONHASH);
AkeebaStrapper::addJSfile('media://com_akeebasubs/js/jqplot.canvasTextRenderer.min.js?' . AKEEBASUBS_VERSIONHASH);
AkeebaStrapper::addJSfile('media://com_akeebasubs/js/jqplot.barRenderer.min.js?' . AKEEBASUBS_VERSIONHASH);
AkeebaStrapper::addJSfile('media://com_akeebasubs/js/expirations.js?' . AKEEBASUBS_VERSIONHASH);
$exp_start = date('Y-m-d', strtotime('-2 months', strtotime('last monday')));
?>
<div style="padding-bottom: 80px;padding-left: 15px">
	<h3><?php 
echo JText::_('COM_AKEEBASUBS_REPORTS_EXPIRATIONS_WEEK_CHART');
?>
</h3>
	<?php 
echo JText::_('COM_AKEEBASUBS_DASHBOARD_FROMDATE');
?>
	<?php 
echo JHTML::calendar($exp_start, 'exp_start', 'exp_start');
?>
	<button class="btn btn-mini" id="exp_graph_reload" onclick="return false">
		<?php 
예제 #14
0
파일: default.php 프로젝트: enjoy2000/smcd
// Protect from unauthorized access
defined('_JEXEC') or die;
// Workaround for IDIOT HOSTS. If you are one of these hosts, YOUR "ANTIVIRUS" IS CRAP!
$idiotHostWorkaround = 'h' . str_repeat('t', 2) . 'ps' . ':';
$idiotHostWorkaround .= str_repeat('/', 2) . substr('WTF api IDIOT HOST', 4, 3) . '.';
$idiotHostWorkaround .= strtolower('IP') . substr('signify', -3) . '.' . substr('organisation', 0, 3);
JHtml::_('behavior.modal');
F0FTemplateUtils::addCSS('media://com_admintools/css/jquery.jqplot.min.css');
AkeebaStrapper::addJSfile('media://com_admintools/js/excanvas.min.js?' . ADMINTOOLS_VERSION);
AkeebaStrapper::addJSfile('media://com_admintools/js/jquery.jqplot.min.js?' . ADMINTOOLS_VERSION);
AkeebaStrapper::addJSfile('media://com_admintools/js/jqplot.highlighter.min.js?' . ADMINTOOLS_VERSION);
AkeebaStrapper::addJSfile('media://com_admintools/js/jqplot.dateAxisRenderer.min.js?' . ADMINTOOLS_VERSION);
AkeebaStrapper::addJSfile('media://com_admintools/js/jqplot.barRenderer.min.js?' . ADMINTOOLS_VERSION);
AkeebaStrapper::addJSfile('media://com_admintools/js/jqplot.pieRenderer.min.js?' . ADMINTOOLS_VERSION);
AkeebaStrapper::addJSfile('media://com_admintools/js/jqplot.hermite.js?' . ADMINTOOLS_VERSION);
AkeebaStrapper::addJSfile('media://com_admintools/js/cpanelgraphs.js?' . ADMINTOOLS_VERSION);
$lang = JFactory::getLanguage();
$option = 'com_admintools';
$isPro = $this->isPro;
$root = @realpath(JPATH_ROOT);
$root = trim($root);
$emptyRoot = empty($root);
$confirm = JText::_('ATOOLS_LBL_PURGESESSIONS_WARN', true);
$script = <<<JS

;// This comment is intentionally put here to prevent badly written plugins from causing a Javascript error
// due to missing trailing semicolon and/or newline in their code.
(function(\$){
\t\$(document).ready(function(){
\t\t\$('#optimize').click(warnBeforeOptimize);
\t\t\$('#btnchangelog').click(showChangelog);
예제 #15
0
<?php

/**
 *  @package AkeebaSubs
 *  @copyright Copyright (c)2010-2015 Nicholas K. Dionysopoulos
 *  @license GNU General Public License version 3, or later
 */
// Protect from unauthorized access
defined('_JEXEC') or die;
AkeebaStrapper::addJSfile('media://com_akeebasubs/js/blockui.js?' . AKEEBASUBS_VERSIONHASH);
JHTML::_('behavior.tooltip');
$this->loadHelper('cparams');
$this->loadHelper('select');
$this->loadHelper('format');
$this->loadHelper('image');
$couponsRaw = F0FModel::getTmpInstance('Coupons', 'AkeebasubsModel')->savestate(0)->limit(0)->limitstart(0)->getList();
$coupons = array();
foreach ($couponsRaw as $coupon) {
    $coupons[$coupon->akeebasubs_coupon_id] = $coupon->coupon;
}
unset($couponsRaw);
$upgradesRaw = F0FModel::getTmpInstance('Upgrades', 'AkeebasubsModel')->savestate(0)->limit(0)->limitstart(0)->getList();
$upgrades = array();
foreach ($upgradesRaw as $upgrade) {
    $upgrades[$upgrade->akeebasubs_upgrade_id] = $upgrade->title;
}
unset($upgradesRaw);
JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('dropdown.init');
JHtml::_('formbehavior.chosen', 'select');
예제 #16
0
 /**
  * This mess of a code is probably not one of my highlights in my code
  * writing career. It's logically organized, badly architectured but I can
  * still maintain it - and it works!
  */
 public function onAdd($tpl = null)
 {
     AkeebaStrapper::addJSfile('media://com_akeeba/js/backup.js');
     /** @var AkeebaModelBackups $model */
     $model = $this->getModel();
     // Load the Status Helper
     if (!class_exists('AkeebaHelperStatus')) {
         JLoader::import('helpers.status', JPATH_COMPONENT_ADMINISTRATOR);
     }
     $helper = AkeebaHelperStatus::getInstance();
     // Determine default description
     JLoader::import('joomla.utilities.date');
     $jregistry = JFactory::getConfig();
     $tzDefault = $jregistry->get('offset');
     $user = JFactory::getUser();
     $tz = $user->getParam('timezone', $tzDefault);
     $dateNow = new JDate('now', $tz);
     $default_description = JText::_('BACKUP_DEFAULT_DESCRIPTION') . ' ' . $dateNow->format(JText::_('DATE_FORMAT_LC2'), true);
     $default_description = AkeebaHelperEscape::escapeJS($default_description, "'");
     $backup_description = $model->getState('description', $default_description);
     $comment = $model->getState('comment', '');
     // Get a potential return URL
     $returnurl = $model->getState('returnurl');
     if (empty($returnurl)) {
         $returnurl = '';
     }
     // Only allow internal URLs for the redirection
     if (!JUri::isInternal($returnurl)) {
         $returnurl = '';
     }
     // If a return URL is set *and* the profile's name is "Site Transfer
     // Wizard", we are running the Site Transfer Wizard
     if (!class_exists('AkeebaModelProfiles')) {
         JLoader::import('models.profiles', JPATH_COMPONENT_ADMINISTRATOR);
     }
     /** @var AkeebaModelCpanels $cpanelmodel */
     $cpanelmodel = F0FModel::getAnInstance('Cpanels', 'AkeebaModel');
     $profilemodel = new AkeebaModelProfiles();
     $profilemodel->setId($cpanelmodel->getProfileID());
     $profile_data = $profilemodel->getProfile();
     // Get the domain details from scripting facility
     $registry = Factory::getConfiguration();
     $tag = $model->getState('tag');
     $script = $registry->get('akeeba.basic.backup_type', 'full');
     $scripting = Factory::getEngineParamsProvider()->loadScripting();
     $domains = array();
     if (!empty($scripting)) {
         foreach ($scripting['scripts'][$script]['chain'] as $domain) {
             $description = JText::_($scripting['domains'][$domain]['text']);
             $domain_key = $scripting['domains'][$domain]['domain'];
             $domains[] = array($domain_key, $description);
         }
     }
     $json_domains = AkeebaHelperEscape::escapeJS(json_encode($domains), '"\\');
     // Get the maximum execution time and bias
     $maxexec = $registry->get('akeeba.tuning.max_exec_time', 14) * 1000;
     $bias = $registry->get('akeeba.tuning.run_time_bias', 75);
     // Check if the output directory is writable
     $quirks = Factory::getConfigurationChecks()->getDetailedStatus();
     $unwritableOutput = array_key_exists('001', $quirks);
     // Pass on data
     $this->haserrors = !$helper->status;
     $this->hasquirks = $helper->hasQuirks();
     $this->quirks = $helper->getQuirksCell(!$helper->status);
     $this->description = $backup_description;
     $this->default_descr = $default_description;
     $this->comment = $comment;
     $this->domains = $json_domains;
     $this->maxexec = $maxexec;
     $this->bias = $bias;
     $this->useiframe = $registry->get('akeeba.basic.useiframe', 0) ? 'true' : 'false';
     $this->returnurl = $returnurl;
     $this->unwritableoutput = $unwritableOutput;
     if ($registry->get('akeeba.advanced.archiver_engine', 'jpa') == 'jps') {
         $this->showjpskey = 1;
         $this->jpskey = $registry->get('engine.archiver.jps.key', '');
     } else {
         $this->showjpskey = 0;
     }
     if (AKEEBA_PRO) {
         $this->showangiekey = 1;
         $this->angiekey = $registry->get('engine.installer.angie.key', '');
     } else {
         $this->showangiekey = 0;
         $this->angiekey = '';
     }
     $this->autostart = $model->getState('autostart');
     // Pass on profile info
     $this->profileid = $cpanelmodel->getProfileID();
     // Active profile ID
     $this->profilelist = $cpanelmodel->getProfilesList();
     // List of available profiles
     // Should I ask for permission to display desktop notifications?
     JLoader::import('joomla.application.component.helper');
     $this->desktop_notifications = \Akeeba\Engine\Util\Comconfig::getValue('desktop_notifications', '0') ? 1 : 0;
     // Set the toolbar title
     $subtitle = JText::_('BACKUP');
     JToolBarHelper::title(JText::_('AKEEBA') . ':: <small>' . $subtitle . '</small>', 'akeeba');
     return true;
 }
예제 #17
0
/**
 *  @package AkeebaSubs
 *  @copyright Copyright (c)2010-2014 Nicholas K. Dionysopoulos
 *  @license GNU General Public License version 3, or later
 */
// Protect from unauthorized access
defined('_JEXEC') or die;
F0FTemplateUtils::addCSS('media://com_akeebasubs/css/jquery.jqplot.min.css?' . AKEEBASUBS_VERSIONHASH);
AkeebaStrapper::addJSfile('media://com_akeebasubs/js/excanvas.min.js?' . AKEEBASUBS_VERSIONHASH);
AkeebaStrapper::addJSfile('media://com_akeebasubs/js/jquery.jqplot.min.js?' . AKEEBASUBS_VERSIONHASH);
AkeebaStrapper::addJSfile('media://com_akeebasubs/js/jqplot.highlighter.min.js?' . AKEEBASUBS_VERSIONHASH);
AkeebaStrapper::addJSfile('media://com_akeebasubs/js/jqplot.dateAxisRenderer.min.js?' . AKEEBASUBS_VERSIONHASH);
AkeebaStrapper::addJSfile('media://com_akeebasubs/js/jqplot.barRenderer.min.js?' . AKEEBASUBS_VERSIONHASH);
AkeebaStrapper::addJSfile('media://com_akeebasubs/js/jqplot.pieRenderer.min.js?' . AKEEBASUBS_VERSIONHASH);
AkeebaStrapper::addJSfile('media://com_akeebasubs/js/jqplot.hermite.js?' . AKEEBASUBS_VERSIONHASH);
AkeebaStrapper::addJSfile('media://com_akeebasubs/js/cpanelgraphs.js?' . AKEEBASUBS_VERSIONHASH);
JHTML::_('behavior.framework', true);
$this->loadHelper('select');
$graphDayFrom = gmdate('Y-m-d', time() - 30 * 24 * 3600);
$graphDayTo = gmdate('Y-m-d', time());
?>
<div class="well well-small">
	<div class="form form-inline">
		<?php 
echo JHTML::_('calendar', $graphDayFrom, 'akeebasubs_graph_datepicker', 'akeebasubs_graph_datepicker');
?>
		<?php 
echo JHTML::_('calendar', $graphDayTo, 'akeebasubs_graph_todatepicker', 'akeebasubs_graph_todatepicker');
?>
		<?php 
echo AkeebasubsHelperSelect::subscriptionlevels(0, 'akeebasubs_graph_level_id', array('class' => 'input-small'));
예제 #18
0
<?php

/**
 * @package   AkeebaReleaseSystem
 * @copyright Copyright (c)2010-2015 Nicholas K. Dionysopoulos
 * @license   GNU General Public License version 3, or later
 * @version   $Id$
 */
defined('_JEXEC') or die;
AkeebaStrapper::addJSfile('media://com_admintools/js/scan.js?' . ADMINTOOLS_VERSION);
JLoader::import('joomla.utilities.date');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('dropdown.init');
JHtml::_('formbehavior.chosen', 'select');
$sortFields = array('id' => JText::_('COM_ADMINTOOLS_LBL_SCANS_ID'), 'backupstart' => JText::_('COM_ADMINTOOLS_LBL_SCANS_START'), 'files_modified' => JText::_('COM_ADMINTOOLS_LBL_SCANS_MODIFIED'), 'files_suspicious' => JText::_('COM_ADMINTOOLS_LBL_SCANS_THREATNONZERO'), 'files_new' => JText::_('COM_ADMINTOOLS_LBL_SCANS_ADDED'));
?>
	<div class="form-inline">
		<a class="btn btn-primary" href="index.php?option=com_admintools&view=scanner">
			<i class="icon icon-white icon-cog"></i>
			<?php 
echo JText::_('COM_ADMINTOOLS_LBL_SCANS_CONFIGURE');
?>
		</a>
	<span class="help-inline">
		<i class="icon-info-sign"></i>
		<?php 
echo JText::_('COM_ADMINTOOLS_MSG_SCANS_CONFIGUREHELP');
?>
	</span>
	</div>
예제 #19
0
 * FIELDS PRESENT IN THIS FILE WILL RESULT IN INABILITY TO SUBSCRIBE, STRANGE
 * ERROR MESSAGES AND GENERAL MALFUNCTION OF THE COMPONENT.
 *
 * YOU ARE SUPPOSED TO HIDE THE FIELDS YOU DO NOT WANT DISPLAYED ON THE PAGE
 * USING CSS. THIS IS WHY EACH OF THESE FIELDS HAS A UNIQUE ID ATTRIBUTE. IF
 * YOU ARE IN DOUBT DO NOT TOUCH OR OVERRIDE THIS FILE.
 *
 * IF YOU EVER REMOVE FIELDS FROM THIS FILE YOU WILL HAVE TO MODIFY THE ENTIRE
 * COMPONENT AND ALL PAYMENT PLUGINS.
 *
 * IF YOU DECIDE TO IGNORE THIS STRICT WARNING, DO NOT FILE "BUG" REPORTS OR
 * SEEK ASSISTANCE.
 */
defined('_JEXEC') or die;
AkeebaStrapper::addJSfile('media://com_akeebasubs/js/signup.js?' . AKEEBASUBS_VERSIONHASH);
AkeebaStrapper::addJSfile('media://com_akeebasubs/js/autosubmit.js?' . AKEEBASUBS_VERSIONHASH);
require_once JPATH_ADMINISTRATOR . '/components/com_akeebasubs/helpers/cparams.php';
require_once JPATH_ADMINISTRATOR . '/components/com_akeebasubs/helpers/format.php';
require_once JPATH_ADMINISTRATOR . '/components/com_akeebasubs/helpers/select.php';
if (isset($this->item)) {
    $akeebasubs_subscription_level = $this->item->akeebasubs_level_id;
} else {
    $akeebasubs_subscription_level = null;
}
$apply_validation = true;
if (property_exists($this, 'apply_validation')) {
    $apply_validation = $this->apply_validation == 'true';
}
$field_data = array('name' => !empty($this->userparams->name) ? $this->userparams->name : $this->cache['name'], 'email' => !empty($this->userparams->email) ? $this->userparams->email : $this->cache['email'], 'email2' => !empty($this->userparams->email2) ? $this->userparams->email2 : $this->cache['email2'], 'address1' => !empty($this->userparams->address1) ? $this->userparams->address1 : $this->cache['address1'], 'address2' => !empty($this->userparams->address2) ? $this->userparams->address2 : $this->cache['address2'], 'city' => !empty($this->userparams->city) ? $this->userparams->city : $this->cache['city'], 'state' => !empty($this->userparams->state) ? $this->userparams->state : $this->cache['state'], 'zip' => !empty($this->userparams->zip) ? $this->userparams->zip : $this->cache['zip'], 'country' => !empty($this->userparams->country) && $this->userparams->country != 'XX' ? $this->userparams->country : $this->cache['country'], 'businessname' => !empty($this->userparams->businessname) ? $this->userparams->businessname : $this->cache['businessname'], 'occupation' => !empty($this->userparams->occupation) ? $this->userparams->occupation : $this->cache['occupation'], 'vatnumber' => !empty($this->userparams->vatnumber) ? $this->userparams->vatnumber : $this->cache['vatnumber']);
$group_classes = array('username' => '', 'password' => '', 'password2' => '', 'name' => $this->validation->validation->name ? '' : 'error has-error', 'email' => $this->validation->validation->email ? '' : 'error has-error', 'email2' => $this->validation->validation->email2 ? '' : 'error has-error', 'address1' => $this->validation->validation->address1 ? '' : 'error has-error', 'city' => $this->validation->validation->city ? '' : 'error has-error', 'state' => $this->validation->validation->state ? '' : 'error has-error', 'zip' => $this->validation->validation->zip ? '' : 'error has-error', 'country' => $this->validation->validation->country ? '' : 'error has-error', 'businessname' => $this->validation->validation->businessname ? '' : 'error has-error', 'occupation' => !empty($field_data['occupation']) ? '' : 'error has-error', 'vatnumber' => $this->validation->validation->vatnumber ? '' : 'warning has-warning');
if (JFactory::getUser()->guest) {
<?php

defined('_JEXEC') or die;
if (empty($this->log)) {
    $this->log = null;
}
JHtml::_('behavior.framework');
JText::script('AKEEBA_ALICE_SUCCESSS');
JText::script('AKEEBA_ALICE_WARNING');
JText::script('AKEEBA_ALICE_ERROR');
AkeebaStrapper::addJSfile('media://com_akeeba/js/stepper.js');
AkeebaStrapper::addJSfile('media://com_akeeba/plugins/js/alice.js');
if (count($this->logs)) {
    ?>
	<form name="adminForm" id="adminForm" action="index.php" method="post" class="form-inline">
		<input name="option" value="com_akeeba" type="hidden" />
		<input name="view" value="alices" type="hidden" />
		<input type="hidden" name="<?php 
    echo JFactory::getSession()->getFormToken();
    ?>
" value="1" />

		<fieldset>
			<label for="tag"><?php 
    echo JText::_('LOG_CHOOSE_FILE_TITLE');
    ?>
</label>
			<?php 
    echo JHTML::_('select.genericlist', $this->logs, 'log', '', 'value', 'text', $this->log, 'log');
    ?>