/** * Includes Akeeba Backup's Javascript files * @param $plugins bool Should I also include the files from the plugins directory? */ static function includeJS($plugins = false) { // Load jQuery self::jQueryLoad(); self::jQueryUILoad(); // Repeat after me: "Joomla! 1.6.2 and later is a piece of utter crap because it requires me // to MANUALLY add this line to make its STANDARD toolbar buttons work". Yes, the PLT is a // bunch of morons. JHTML::_('behavior.mootools'); $document = JFactory::getDocument(); // In Joomla! 1.6 we have to load jQuery and jQuery UI without the hackish onAfterRender method :( jimport('joomla.filesystem.file'); if (AKEEBA_JVERSION == '16') { foreach (self::$scriptURLs as $url) { $document->addScript($url); } foreach (self::$scriptDefs as $script) { $document->addScriptDeclaration($script); } } // Joomla! 1.5 method self::$usePlugins = $plugins; $scriptDefs = self::getScriptDefs(); foreach ($scriptDefs as $scriptURI) { $document->addScript($scriptURI); } }
public function display() { JToolBarHelper::title(JText::_('AKEEBA').': <small>'.JText::_('SRPRESTORATION').'</small>','akeeba'); JToolBarHelper::back('AKEEBA_CONTROLPANEL', 'index.php?option='.JRequest::getCmd('option')); // Add references to scripts and CSS AkeebaHelperIncludes::includeMedia(true); $task = JRequest::getVar('task',''); $model =& $this->getModel(); if($task == 'start') { $password = JRequest::getVar('password','','default','none',2); $this->assign('password', $password ); $this->setLayout('restore'); } else { $model->validateRequest(); $id = $model->getId(); $ftpparams = $model->getFTPParams(); $extractionmodes = $model->getExtractionModes(); $this->assign('id', $id); $this->assign('ftpparams', $ftpparams); $this->assign('extractionmodes', $extractionmodes); $this->assignRef('info', $model->info); } // Add live help AkeebaHelperIncludes::addHelp(); parent::display(); }
public function onAdd($tpl = null) { $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 $profileName = F0FModel::getTmpInstance('Profiles', 'AkeebaModel')->setId($profileid)->getItem()->description; $this->profilename = $profileName; // 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; } } // Add live help AkeebaHelperIncludes::addHelp('config'); }
function display() { // Add references to CSS and JS files AkeebaHelperIncludes::includeMedia(false); parent::display(); }
public function onAdd($tpl = null) { $media_folder = JURI::base() . '../media/com_akeeba/'; // Get a JSON representation of GUI data $json = AkeebaHelperEscape::escapeJS(AEUtilInihelper::getJsonGuiDefinition(), '"\\'); $this->assignRef('json', $json); // Get profile ID $profileid = AEPlatform::getInstance()->get_active_profile(); $this->assign('profileid', $profileid); // Get profile name $profileName = FOFModel::getTmpInstance('Profiles', 'AkeebaModel')->setId($profileid)->getItem()->description; $this->assign('profilename', $profileName); // Get the root URI for media files $this->assign('mediadir', AkeebaHelperEscape::escapeJS($media_folder . 'theme/')); // Are the settings secured? if (AEPlatform::getInstance()->get_platform_configuration_option('useencryption', -1) == 0) { $this->assign('securesettings', -1); } elseif (!AEUtilSecuresettings::supportsEncryption()) { $this->assign('securesettings', 0); } else { JLoader::import('joomla.filesystem.file'); $filename = JPATH_COMPONENT_ADMINISTRATOR . '/akeeba/serverkey.php'; if (JFile::exists($filename)) { $this->assign('securesettings', 1); } else { $this->assign('securesettings', 0); } } // Add live help AkeebaHelperIncludes::addHelp('config'); }
public function display($tpl = null) { // Add toolbar buttons JToolBarHelper::title(JText::_('AKEEBA') . ': <small>' . JText::_('VIEWLOG') . '</small>', 'akeeba'); JToolBarHelper::back('AKEEBA_CONTROLPANEL', 'index.php?option=' . JRequest::getCmd('option')); JToolBarHelper::spacer(); $document = JFactory::getDocument(); $document->addStyleSheet(JURI::base() . '../media/com_akeeba/theme/akeebaui.css?' . AKEEBAMEDIATAG); // Add live help AkeebaHelperIncludes::addHelp(); // Get a list of log names if (!class_exists('AkeebaModelLog')) { JLoader::import('models.log', JPATH_COMPONENT_ADMINISTRATOR); } $model = new AkeebaModelLog(); $this->assign('logs', $model->getLogList()); $tag = JRequest::getCmd('tag', null); if (empty($tag)) { $tag = null; } $this->assign('tag', $tag); // Get profile ID $profileid = AEPlatform::getInstance()->get_active_profile(); $this->assign('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->assign('profilename', $profile_data->description); AkeebaHelperIncludes::includeMedia(false); parent::display($tpl); }
function display() { $registry =& AEFactory::getConfiguration(); // Set the toolbar title JToolBarHelper::title(JText::_('AKEEBA').':: <small>'.JText::_('SITETRANSFERWIZARD').'</small>','akeeba'); JToolBarHelper::back('AKEEBA_CONTROLPANEL', 'index.php?option='.JRequest::getCmd('option')); // Add references to CSS and JS files AkeebaHelperIncludes::includeMedia(false); // Add live help AkeebaHelperIncludes::addHelp(); $model = $this->getModel(); $task = JRequest::getCmd('task','default'); switch($task) { case 'step1': case 'default': default: $cpanelmodel = JModel::getInstance('Cpanel','AkeebaModel'); $this->assign('profilelist', $cpanelmodel->getProfilesList()); $this->assign('stw_profile_id', $model->getSTWProfileID()); break; case 'step2': $this->assignRef('opts', $model->getTransferSettings()); break; case 'step3': break; } parent::display(); }
public function onBrowse($tpl = null) { $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_active_root_changed();"'; $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; } // Add live help AkeebaHelperIncludes::addHelp('dbef'); // 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 = $profile_data->description; return true; }
function display() { $selfhealModel = JModel::getInstance('Selfheal','AkeebaModel'); $schemaok = $selfhealModel->healSchema(); $this->assign('schemaok', $schemaok); $registry =& AEFactory::getConfiguration(); // Set the toolbar title; add a help button JToolBarHelper::title(JText::_('AKEEBA').':: <small>'.JText::_('AKEEBA_CONTROLPANEL').'</small>','akeeba'); //JToolBarHelper::preferences('com_akeeba', '500', '660'); if($schemaok) { // Add submenus (those nifty text links below the toolbar!) // -- Configuration $link = JURI::base().'index.php?option='.JRequest::getCmd('option').'&view=config'; JSubMenuHelper::addEntry(JText::_('CONFIGURATION'), $link); // -- Backup Now $link = JURI::base().'index.php?option='.JRequest::getCmd('option').'&view=backup'; JSubMenuHelper::addEntry(JText::_('BACKUP'), $link); // -- Administer Backup Files $link = JURI::base().'index.php?option='.JRequest::getCmd('option').'&view=buadmin'; JSubMenuHelper::addEntry(JText::_('BUADMIN'), $link); // -- View log $link = JURI::base().'index.php?option='.JRequest::getCmd('option').'&view=log'; JSubMenuHelper::addEntry(JText::_('VIEWLOG'), $link); // Load the helper classes $this->loadHelper('utils'); $this->loadHelper('status'); $statusHelper = AkeebaHelperStatus::getInstance(); // Load the model akimport('models.statistics', true); $model =& $this->getModel(); $statmodel = new AkeebaModelStatistics(); $this->assign('icondefs', $model->getIconDefinitions()); // Icon definitions $this->assign('profileid', $model->getProfileID()); // Active profile ID $this->assign('profilelist', $model->getProfilesList()); // List of available profiles $this->assign('statuscell', $statusHelper->getStatusCell() ); // Backup status $this->assign('newscell', $statusHelper->getNewsCell() ); // News $this->assign('detailscell', $statusHelper->getQuirksCell() ); // Details (warnings) $this->assign('statscell', $statmodel->getLatestBackupDetails() ); $this->assign('fixedpermissions', $model->fixMediaPermissions() ); // Fix media/com_akeeba permissions // Add live help AkeebaHelperIncludes::addHelp(); } // Add references to CSS and JS files AkeebaHelperIncludes::includeMedia(false); parent::display(); }
public function onAdd($tpl = null) { $aeconfig = AEFactory::getConfiguration(); // Load the Configuration Wizard Javascript file AkeebaStrapper::addJSfile('media://com_akeeba/js/confwiz.js'); // Add live help AkeebaHelperIncludes::addHelp('confwiz'); $this->setLayout('wizard'); return true; }
public function display($tpl = null) { JToolBarHelper::title(JText::_('AKEEBA') . ': <small>' . JText::_('AKEEBA_POSTSETUP') . '</small>', 'akeeba'); // Add a spacer, a help button and show the template JToolBarHelper::spacer(); $this->_setSRPStatus(); $this->_setAutoupdateStatus(); $this->_setConfWizStatus(); AkeebaHelperIncludes::includeMedia(false); parent::display($tpl); }
public function onProfilesBrowse() { JToolBarHelper::title(JText::_('AKEEBA') . ': <small>' . JText::_('PROFILES') . '</small>', 'akeeba'); JToolBarHelper::back('AKEEBA_CONTROLPANEL', 'index.php?option=com_akeeba'); JToolBarHelper::spacer(); JToolBarHelper::addNew(); JToolBarHelper::custom('copy', 'copy.png', 'copy_f2.png', 'JLIB_HTML_BATCH_COPY', false); JToolBarHelper::spacer(); JToolBarHelper::deleteList(); JToolBarHelper::spacer(); AkeebaHelperIncludes::addHelp('profiles'); }
function display() { // Toolbar buttons JToolBarHelper::title(JText::_('AKEEBA').':: <small>'.JText::_('CONFIGURATION').'</small>','akeeba'); JToolBarHelper::preferences('com_akeeba', '500', '660'); JToolBarHelper::spacer(); JToolBarHelper::apply(); JToolBarHelper::save(); JToolBarHelper::cancel(); JToolBarHelper::spacer(); // Add references to scripts and CSS AkeebaHelperIncludes::includeMedia(false); $media_folder = JURI::base().'../media/com_akeeba/'; // Get a JSON representation of GUI data $json = AkeebaHelperEscape::escapeJS(AEUtilInihelper::getJsonGuiDefinition(),'"\\'); $this->assignRef( 'json', $json ); // Get profile ID $profileid = AEPlatform::get_active_profile(); $this->assign('profileid', $profileid); // Get profile name akimport('models.profiles',true); $model = new AkeebaModelProfiles(); $model->setId($profileid); $profile_data = $model->getProfile(); $this->assign('profilename', $profile_data->description); // Get the root URI for media files $this->assign( 'mediadir', AkeebaHelperEscape::escapeJS($media_folder.'theme/') ); // Are the settings secured? if( AEPlatform::get_platform_configuration_option('useencryption', -1) == 0 ) { $this->assign('securesettings', -1); } elseif( !AEUtilSecuresettings::supportsEncryption() ) { $this->assign('securesettings', 0); } else { jimport('joomla.filesystem.file'); $filename = JPATH_COMPONENT_ADMINISTRATOR.'/akeeba/serverkey.php'; if(JFile::exists($filename)) { $this->assign('securesettings', 1); } else { $this->assign('securesettings', 0); } } // Add live help AkeebaHelperIncludes::addHelp(); parent::display(); }
public function onAdd($tpl = null) { // Get profile ID $profileid = AEPlatform::getInstance()->get_active_profile(); $this->profileid = $profileid; // Get profile name $profileName = FOFModel::getTmpInstance('Profiles', 'AkeebaModel')->setId($profileid)->getItem()->description; $this->profilename = $profileName; // Get the CRON paths $this->croninfo = $this->getModel()->getPaths(); // Add live help AkeebaHelperIncludes::addHelp('schedule'); }
public function onDisplay($tpl = null) { $model = $this->getModel(); $task = $model->getState('task', 'components'); // Add submenus (those nifty text links below the toolbar!) $toolbar = FOFToolbar::getAnInstance($this->input->get('option', 'com_foobar', 'cmd'), $this->config); $link = JURI::base() . '?option=com_akeeba&view=extfilter&task=components'; $toolbar->appendLink(JText::_('EXTFILTER_COMPONENTS'), $link, $task == 'components'); $link = JURI::base() . '?option=com_akeeba&view=extfilter&task=modules'; $toolbar->appendLink(JText::_('EXTFILTER_MODULES'), $link, $task == 'modules'); $link = JURI::base() . '?option=com_akeeba&view=extfilter&task=plugins'; $toolbar->appendLink(JText::_('EXTFILTER_PLUGINS'), $link, $task == 'plugins'); $link = JURI::base() . '?option=com_akeeba&view=extfilter&task=languages'; $toolbar->appendLink(JText::_('EXTFILTER_LANGUAGES'), $link, $task == 'languages'); $link = JURI::base() . '?option=com_akeeba&view=extfilter&task=templates'; $toolbar->appendLink(JText::_('EXTFILTER_TEMPLATES'), $link, $task == 'templates'); switch ($task) { case 'components': // Pass along the list of components $this->components = $model->getComponents(); break; case 'modules': // Pass along the list of components $this->modules = $model->getModules(); break; case 'plugins': // Pass along the list of components $this->plugins = $model->getPlugins(); break; case 'templates': // Pass along the list of components $this->templates = $model->getTemplates(); break; case 'languages': // Pass along the list of components $this->languages = $model->getLanguages(); break; } $this->setLayout($task); // Add live help AkeebaHelperIncludes::addHelp('extfilter'); // Get profile ID $profileid = AEPlatform::getInstance()->get_active_profile(); $this->profileid = $profileid; // Get profile name $pmodel = FOFModel::getAnInstance('Profiles', 'AkeebaModel'); $pmodel->setId($profileid); $profile_data = $pmodel->getItem(); $this->profilename = $profile_data->description; return true; }
public function onBrowse($tpl = null) { $media_folder = JURI::base() . '../media/com_akeeba/'; $model = $this->getModel(); $directory = $model->getState('directory', ''); if (empty($directory)) { $config = AEFactory::getConfiguration(); $this->directory = $config->get('akeeba.basic.output_directory', '[DEFAULT_OUTPUT]'); } else { $this->directory = ''; } AkeebaHelperIncludes::addHelp('discover'); return true; }
function display() { $registry =& AEFactory::getConfiguration(); // Set the toolbar title JToolBarHelper::title(JText::_('AKEEBA') . ':: <small>' . JText::_('AKEEBA_CONFWIZ') . '</small>', 'akeeba'); JToolBarHelper::back('AKEEBA_CONTROLPANEL', 'index.php?option=' . JRequest::getCmd('option')); // Add references to CSS and JS files AkeebaHelperIncludes::includeMedia(false); // Load the Configuration Wizard Javascript file $document = JFactory::getDocument(); $document->addScript(JURI::base() . '../media/com_akeeba/js/confwiz.js'); // Add live help AkeebaHelperIncludes::addHelp(); $this->setLayout('wizard'); parent::display(); }
function display($tpl = null) { // Decide what to do; delegate data loading to private methods $task = JRequest::getCmd('task','display'); $layout = JRequest::getCmd('layout','default'); switch($layout) { case 'default_edit': switch($task) { case 'add': JToolBarHelper::title(JText::_('AKEEBA').': <small>'.JText::_('PROFILE_PAGETITLE_NEW').'</small>','akeeba'); $this->_add(); break; case 'edit': JToolBarHelper::title(JText::_('AKEEBA').': <small>'.JText::_('PROFILE_PAGETITLE_EDIT').'</small>','akeeba'); $this->_edit(); break; } break; default: switch($task) { default: $this->_default(); break; } JToolBarHelper::title(JText::_('AKEEBA').': <small>'.JText::_('PROFILES').'</small>','akeeba'); break; } // Load the util helper $this->loadHelper('utils'); // Add a spacer, a help button and show the template JToolBarHelper::spacer(); AkeebaHelperIncludes::includeMedia(false); // Add live help AkeebaHelperIncludes::addHelp(); parent::display($tpl); }
function display() { // Set the toolbar title JToolBarHelper::title(JText::_('AKEEBA') . ':: <small>' . JText::_('AKEEBA_ACL_TITLE') . '</small>', 'akeeba'); // Add some buttons JToolBarHelper::back('AKEEBA_CONTROLPANEL', 'index.php?option=' . JRequest::getCmd('option')); JToolBarHelper::spacer(); // Add references to CSS and JS files AkeebaHelperIncludes::includeMedia(false); // Add live help AkeebaHelperIncludes::addHelp(); // Get the users from manager and above $model = JModel::getInstance('Acl', 'AkeebaModel'); $list = $model->getUserList(); $this->assignRef('userlist', $list); parent::display(JRequest::getCmd('tpl', null)); }
protected function onAdd($tpl = null) { /** @var AkeebaModelCpanels $model */ $model = $this->getModel(); /** $selfhealModel = F0FModel::getTmpInstance('Selfheal','AkeebaModel'); $schemaok = $selfhealModel->healSchema(); /**/ $schemaok = true; $this->schemaok = $schemaok; $aeconfig = AEFactory::getConfiguration(); if ($schemaok) { // Load the helper classes $this->loadHelper('utils'); $this->loadHelper('status'); $statusHelper = AkeebaHelperStatus::getInstance(); // Load the model if (!class_exists('AkeebaModelStatistics')) { JLoader::import('models.statistics', JPATH_COMPONENT_ADMINISTRATOR); } $statmodel = new AkeebaModelStatistics(); $this->icondefs = $model->getIconDefinitions(); // Icon definitions $this->profileid = $model->getProfileID(); // Active profile ID $this->profilelist = $model->getProfilesList(); // List of available profiles $this->statuscell = $statusHelper->getStatusCell(); // Backup status $this->detailscell = $statusHelper->getQuirksCell(); // Details (warnings) $this->statscell = $statmodel->getLatestBackupDetails(); $this->fixedpermissions = $model->fixMediaPermissions(); // Fix media/com_akeeba permissions $this->update_plugin = $model->isUpdatePluginEnabled(); $this->needsdlid = $model->needsDownloadID(); $this->needscoredlidwarning = $model->mustWarnAboutDownloadIDInCore(); $this->hasPostInstallationMessages = $model->hasPostInstallMessages(); $this->extension_id = $model->getState('extension_id', 0, 'int'); // Add live help AkeebaHelperIncludes::addHelp('cpanel'); $this->statsIframe = F0FModel::getTmpInstance('Stats', 'AkeebaModel')->collectStatistics(true); } return $this->onDisplay($tpl); }
public function onBrowse($tpl = null) { $media_folder = JURI::base() . '../media/com_akeeba/'; // Get the root URI for media files $this->assign('mediadir', AkeebaHelperEscape::escapeJS($media_folder . 'theme/')); // Get a JSON representation of the available roots $filters = AEFactory::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_active_root_changed();"'; $this->assign('root_select', JHTML::_('select.genericlist', $options, 'root', $attribs, 'value', 'text', $site_root, 'active_root')); $this->assign('roots', $roots); $tpl = null; // Get a JSON representation of the directory data $model = $this->getModel(); $json = json_encode($model->get_regex_filters($site_root)); $this->assignRef('json', $json); // Add live help AkeebaHelperIncludes::addHelp('regexfsfilter'); // Get profile ID $profileid = AEPlatform::getInstance()->get_active_profile(); $this->assign('profileid', $profileid); // Get profile name $pmodel = FOFModel::getAnInstance('Profiles', 'AkeebaModel'); $pmodel->setId($profileid); $profile_data = $pmodel->getItem(); $this->assign('profilename', $profile_data->description); return true; }
protected function onAdd($tpl = null) { // Used in FOF 1.x where the behaviour was kinda clunky $model = $this->getModel(); /** $selfhealModel = FOFModel::getTmpInstance('Selfheal','AkeebaModel'); $schemaok = $selfhealModel->healSchema(); **/ $schemaok = true; $this->schemaok = $schemaok; $aeconfig = AEFactory::getConfiguration(); if ($schemaok) { // Load the helper classes $this->loadHelper('utils'); $this->loadHelper('status'); $statusHelper = AkeebaHelperStatus::getInstance(); // Load the model if (!class_exists('AkeebaModelStatistics')) { JLoader::import('models.statistics', JPATH_COMPONENT_ADMINISTRATOR); } $statmodel = new AkeebaModelStatistics(); //$model->applyJoomlaExtensionUpdateChanges(); $this->icondefs = $model->getIconDefinitions(); // Icon definitions $this->profileid = $model->getProfileID(); // Active profile ID $this->profilelist = $model->getProfilesList(); // List of available profiles $this->statuscell = $statusHelper->getStatusCell(); // Backup status $this->detailscell = $statusHelper->getQuirksCell(); // Details (warnings) $this->statscell = $statmodel->getLatestBackupDetails(); $this->fixedpermissions = $model->fixMediaPermissions(); // Fix media/com_akeeba permissions $this->needsdlid = $model->needsDownloadID(); $this->needscoredlidwarning = $model->mustWarnAboutDownloadIDInCore(); // Add live help AkeebaHelperIncludes::addHelp('cpanel'); } return $this->onDisplay($tpl); }
public function onDisplay($tpl = null) { $model = $this->getModel(); $step = $model->getState('restorestep', 0); if ($step == 1) { $this->setLayout('restore'); } else { $model->validateRequest(); $id = $model->getId(); $ftpparams = $model->getFTPParams(); $extractionmodes = $model->getExtractionModes(); $this->id = $id; $this->ftpparams = $ftpparams; $this->extractionmodes = $extractionmodes; $this->info = $model->info; } // Add live help AkeebaHelperIncludes::addHelp('srprestore'); return true; }
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; }
public function onBrowse($tpl = null) { // Add live help AkeebaHelperIncludes::addHelp('log'); // Get a list of log names $model = $this->getModel(); $this->logs = $model->getLogList(); $tag = $model->getState('tag'); if (empty($tag)) { $tag = null; } $this->tag = $tag; // Get profile ID $profileid = AEPlatform::getInstance()->get_active_profile(); $this->profileid = $profileid; // Get profile name $pmodel = FOFModel::getAnInstance('Profiles', 'AkeebaModel'); $pmodel->setId($profileid); $profile_data = $pmodel->getItem(); $this->profilename = $profile_data->description; return true; }
public function onBrowse($tpl = null) { $media_folder = JURI::base() . '../media/com_akeeba/'; // Get the root URI for media files $this->assign('mediadir', AkeebaHelperEscape::escapeJS($media_folder . 'theme/')); // Get a JSON representation of the directories data $model = $this->getModel(); $directories = $model->get_directories(); $json = json_encode($directories); $this->assign('json', $json); // Add live help AkeebaHelperIncludes::addHelp('eff'); // Get profile ID $profileid = AEPlatform::getInstance()->get_active_profile(); $this->assign('profileid', $profileid); // Get profile name $pmodel = FOFModel::getAnInstance('Profiles', 'AkeebaModel'); $pmodel->setId($profileid); $profile_data = $pmodel->getItem(); $this->assign('profilename', $profile_data->description); return true; }
public function onDisplay($tpl = null) { $aeconfig = AEFactory::getConfiguration(); // Add live help AkeebaHelperIncludes::addHelp('stw'); $model = $this->getModel(); $step = $model->getState('stwstep', 1); switch ($step) { case 1: default: $cpanelmodel = FOFModel::getTmpInstance('Cpanels', 'AkeebaModel'); $this->profilelist = $cpanelmodel->getProfilesList(); $this->stw_profile_id = $model->getSTWProfileID(); break; case 2: $this->opts = $model->getTransferSettings(); break; case 3: break; } $this->setLayout('step' . $step); return true; }
public function onBrowse($tpl = null) { $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_active_root_changed();"'; $this->root_select = JHTML::_('select.genericlist', $options, 'root', $attribs, 'value', 'text', $site_root, 'active_root'); $this->roots = $roots; $tpl = null; // Get a JSON representation of the directory data $model = $this->getModel(); $json = json_encode($model->get_regex_filters($site_root)); $this->json = $json; // Add live help AkeebaHelperIncludes::addHelp('regexdbfilter'); // Get profile ID $profileid = AEPlatform::getInstance()->get_active_profile(); $this->profileid = $profileid; // Get profile name $pmodel = FOFModel::getAnInstance('Profiles', 'AkeebaModel'); $pmodel->setId($profileid); $profile_data = $pmodel->getItem(); $this->profilename = $profile_data->description; return true; }
public function onDltoserver($tpl = null) { $this->setLayout('downloading'); $model = $this->getModel(); // Add live help AkeebaHelperIncludes::addHelp('s3import'); $total = JFactory::getApplication()->getUserState('com_akeeba.s3import.totalsize', 0); $done = JFactory::getApplication()->getUserState('com_akeeba.s3import.donesize', 0); $part = JFactory::getApplication()->getUserState('com_akeeba.s3import.part', 0) + 1; $parts = JFactory::getApplication()->getUserState('com_akeeba.s3import.totalparts', 0); if ($total <= 0) { $percent = 0; } else { $percent = (int) (100 * ($done / $total)); if ($percent < 0) { $percent = 0; } if ($percent > 100) { $percent = 100; } } $this->assign('total', $total); $this->assign('done', $done); $this->assign('percent', $percent); $this->assign('total_parts', $parts); $this->assign('current_part', $part); // Render the progress bar $document = JFactory::getDocument(); $step = $model->getState('step', 1) + 1; $script = "window.addEvent( 'domready' , function() {\n"; $script .= "window.location='index.php?option=com_akeeba&view=s3import&layout=downloading&task=dltoserver&step={$step}';\n"; $script .= "});\n"; $document->addScriptDeclaration($script); AkeebaHelperIncludes::addHelp('s3import'); return true; }
public function onBrowse($tpl = null) { $session = JFactory::getSession(); $task = $session->get('buadmin.task', 'default', 'akeeba'); if ($task != 'restorepoint') { $task = 'default'; } $aeconfig = AEFactory::getConfiguration(); // Add custom submenus if (AKEEBA_PRO) { $toolbar = F0FToolbar::getAnInstance($this->input->get('option', 'com_foobar', 'cmd'), $this->config); $toolbar->appendLink(JText::_('BUADMIN_LABEL_BACKUPS'), JURI::base() . 'index.php?option=com_akeeba&view=buadmin&task=browse', $task == 'default'); $toolbar->appendLink(JText::_('BUADMIN_LABEL_SRP'), JURI::base() . 'index.php?option=com_akeeba&view=buadmin&task=restorepoint', $task == 'restorepoint'); } if (AKEEBA_PRO && $task == 'default') { $bar = JToolBar::getInstance('toolbar'); $bar->appendButton('Link', 'restore', JText::_('DISCOVER'), 'index.php?option=com_akeeba&view=discover'); JToolBarHelper::publish('restore', JText::_('STATS_LABEL_RESTORE')); } if ($task == 'default') { JToolBarHelper::editList('showcomment', JText::_('STATS_LOG_EDITCOMMENT')); $pModel = F0FModel::getTmpInstance('Profiles', 'AkeebaModel'); $enginesPerPprofile = $pModel->getPostProcessingEnginePerProfile(); $this->enginesPerProfile = $enginesPerPprofile; } JToolBarHelper::spacer(); // "Show warning first" download button. Joomlantastic! $confirmationText = AkeebaHelperEscape::escapeJS(JText::_('STATS_LOG_DOWNLOAD_CONFIRM'), "'\n"); $baseURI = JURI::base(); $js = <<<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 confirmDownloadButton() { \tvar answer = confirm('{$confirmationText}'); \tif(answer) submitbutton('download'); } function confirmDownload(id, part) { \tvar answer = confirm('{$confirmationText}'); \tvar newURL = '{$baseURI}'; \tif(answer) { \t\tnewURL += 'index.php?option=com_akeeba&view=buadmin&task=download&id='+id; \t\tif( part != '' ) newURL += '&part=' + part \t\twindow.location = newURL; \t} } JS; $document = JFactory::getDocument(); $document->addScriptDeclaration($js); $hash = 'akeebabuadmin'; // ...ordering $app = JFactory::getApplication(); $this->lists->set('order', $app->getUserStateFromRequest($hash . 'filter_order', 'filter_order', 'backupstart')); $this->lists->set('order_Dir', $app->getUserStateFromRequest($hash . 'filter_order_Dir', 'filter_order_Dir', 'DESC')); // ...filter state $this->lists->set('fltDescription', $app->getUserStateFromRequest($hash . 'filter_description', 'description', null)); $this->lists->set('fltFrom', $app->getUserStateFromRequest($hash . 'filter_from', 'from', null)); $this->lists->set('fltTo', $app->getUserStateFromRequest($hash . 'filter_to', 'to', null)); $this->lists->set('fltOrigin', $app->getUserStateFromRequest($hash . 'filter_origin', 'origin', null)); $this->lists->set('fltProfile', $app->getUserStateFromRequest($hash . 'filter_profile', 'profile', null)); $filters = $this->_getFilters(); $ordering = $this->_getOrdering(); require_once JPATH_COMPONENT_ADMINISTRATOR . '/models/statistics.php'; $model = new AkeebaModelStatistics(); $list = $model->getStatisticsListWithMeta(false, $filters, $ordering); // Assign data to the view $this->lists = $this->lists; // Filter lists $this->list = $list; // Data $this->pagination = $model->getPagination($filters); // Pagination object // Add live help if ($task == 'restorepoint') { $this->setLayout('restorepoint'); AkeebaHelperIncludes::addHelp('restorepoint'); } else { AkeebaHelperIncludes::addHelp('buadmin'); } return true; }