function display()
 {
     // 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':
                     $helpfile = 'eff';
                     JToolBarHelper::title(JText::_('JOOMLAPACK') . ': <small><small>' . JText::_('EFF_PAGETITLE_NEW') . '</small></small>');
                     $this->_add();
                     break;
                 case 'edit':
                     $helpfile = 'eff';
                     JToolBarHelper::title(JText::_('JOOMLAPACK') . ': <small><small>' . JText::_('EFF_PAGETITLE_EDIT') . '</small></small>');
                     $this->_edit();
                     break;
             }
             break;
         default:
             $helpfile = 'eff';
             JToolBarHelper::title(JText::_('JOOMLAPACK') . ': <small><small>' . JText::_('EXTRADIRS') . '</small></small>');
             $this->_default();
             break;
     }
     // Load the util helper
     $this->loadHelper('utils');
     $document =& JFactory::getDocument();
     $document->addStyleSheet(JURI::base() . 'components/com_joomlapack/assets/css/joomlapack.css');
     // Add a spacer, a help button and show the template
     JToolBarHelper::spacer();
     JoomlapackHelperUtils::addLiveHelp('$helpfile');
     parent::display();
 }
Exemplo n.º 2
0
 function display()
 {
     $task = JRequest::getCmd('task', 'default');
     switch ($task) {
         case 'showcomment':
             JToolBarHelper::title(JText::_('JOOMLAPACK') . ': <small><small>' . JText::_('BUADMIN') . '</small></small>');
             JToolBarHelper::back('Back', 'index.php?option=' . JRequest::getCmd('option') . '&view=buadmin');
             JoomlapackHelperUtils::addLiveHelp('buadmin');
             $document =& JFactory::getDocument();
             $document->addStyleSheet(JURI::base() . 'components/com_joomlapack/assets/css/joomlapack.css');
             jpimport('models.statistics', true);
             $model =& JoomlapackModelStatistics::getInstance('Statistics', 'JoomlapackModel');
             $model->setId(JRequest::getInt('id'));
             $record =& $model->getStatistic();
             $this->assignRef('record', $record);
             JRequest::setVar('tpl', 'comment');
             break;
         case 'restore':
             JToolBarHelper::title(JText::_('JOOMLAPACK') . ': <small><small>' . JText::_('BUADMIN') . '</small></small>');
             JRequest::setVar('tpl', 'restore');
             $this->assign('password', JRequest::getVar('password'));
             $this->assign('link', JRequest::getVar('linktarget'));
             break;
         default:
             $registry =& JoomlapackModelRegistry::getInstance();
             $easy = $registry->get('easymode', false);
             if (!$easy) {
                 JToolBarHelper::title(JText::_('JOOMLAPACK') . ': <small><small>' . JText::_('BUADMIN') . '</small></small>');
             } else {
                 JToolBarHelper::title(JText::_('JOOMLAPACKEASY') . ': <small><small>' . JText::_('BUADMIN') . '</small></small>');
             }
             JToolBarHelper::back('Back', 'index.php?option=' . JRequest::getCmd('option'));
             JToolBarHelper::spacer();
             JToolBarHelper::deleteList();
             JToolBarHelper::custom('deletefiles', 'delete.png', 'delete_f2.png', JText::_('STATS_LABEL_DELETEFILES'), true);
             JToolBarHelper::save('download', JText::_('STATS_LOG_DOWNLOAD'));
             if (!$easy) {
                 JToolBarHelper::editList('showcomment', JText::_('STATS_LOG_VIEWCOMMENT'));
                 if (JPSPECIALEDITION) {
                     JToolBarHelper::publish('restore', JText::_('STATS_LOG_RESTORE'));
                 }
             }
             JToolBarHelper::spacer();
             if (!$easy) {
                 JoomlapackHelperUtils::addLiveHelp('buadmin');
             } else {
                 JoomlapackHelperUtils::addLiveHelp('buadmineasy');
             }
             $document =& JFactory::getDocument();
             $document->addStyleSheet(JURI::base() . 'components/com_joomlapack/assets/css/joomlapack.css');
             jpimport('models.statistics', true);
             $model =& JoomlapackModelStatistics::getInstance('Statistics', 'JoomlapackModel');
             $list =& $model->getStatisticsListWithMeta();
             $this->assignRef('list', $list);
             $this->assignRef('pagination', $model->getPagination());
             $this->assign('easy', $easy);
             break;
     }
     parent::display(JRequest::getVar('tpl'));
 }
 function display()
 {
     $tpl = JRequest::getVar('tpl');
     // Add toolbar buttons
     JToolBarHelper::title(JText::_('JOOMLAPACK') . ': <small><small>' . JText::_('DBEF') . '</small></small>');
     JToolBarHelper::back('Back', 'index.php?option=' . JRequest::getCmd('option'));
     JToolBarHelper::spacer();
     $bar =& JToolBar::getInstance('toolbar');
     switch ($tpl) {
         case 'tab':
             JToolBarHelper::deleteList();
             $bar->appendButton('Link', 'preview', JText::_('NORMALVIEW'), 'index.php?option=com_joomlapack&view=' . JRequest::getCmd('view'));
             break;
         case '':
         default:
             $bar->appendButton('Link', 'preview', JText::_('TABULARVIEW'), 'index.php?option=com_joomlapack&view=' . JRequest::getCmd('view') . '&tpl=tab');
             break;
     }
     JToolBarHelper::spacer();
     JoomlapackHelperUtils::addLiveHelp('dbef');
     if ($tpl == 'tab') {
         $model =& $this->getModel('Dbef');
         $task = JRequest::getCmd('task', 'default');
         $list =& $model->getRecordsList();
         $this->assignRef('list', $list);
         $this->assignRef('pagination', $model->getPagination());
         $this->assignRef('class', $model->_filterclass);
     }
     $document =& JFactory::getDocument();
     $document->addStyleSheet(JURI::base() . 'components/com_joomlapack/assets/css/joomlapack.css');
     parent::display($tpl);
 }
Exemplo n.º 4
0
 function display()
 {
     // Set the toolbar title; add a help button
     JToolBarHelper::title(JText::_('JOOMLAPACKEASY') . ':: <small><small>' . JText::_('CONFIGURATION') . '</small></small>');
     JToolBarHelper::apply();
     JToolBarHelper::save();
     JToolBarHelper::cancel();
     JoomlapackHelperUtils::addLiveHelp('configeasy');
     $document =& JFactory::getDocument();
     $document->addStyleSheet(JURI::base() . 'components/com_joomlapack/assets/css/joomlapack.css');
     // Load the util helper
     $this->loadHelper('utils');
     // Load the model
     $model =& $this->getModel();
     // Pass on the lists
     $this->assign('actionlogginglist', $model->getActionLoggingList());
     $this->assign('settingsmodelist', $model->getSettingsModeList());
     // Let's pass the data
     $this->assign('OutputDirectory', $model->getVar('OutputDirectoryConfig'));
     $this->assign('TarNameTemplate', $model->getVar('TarNameTemplate'));
     $this->assign('settingsmode', $model->getVar('settingsmode'));
     $this->assign('logLevel', $model->getVar('logLevel'));
     // Also load the Configuration HTML helper
     $this->loadHelper('config');
     parent::display();
 }
 function display()
 {
     // Decide what to do; delegate data loading to private methods
     $task = JRequest::getCmd('task', 'display');
     $layout = JRequest::getCmd('layout', 'default');
     JToolBarHelper::title(JText::_('JOOMLAPACK') . ': <small><small>' . JText::_('CRONMAN') . '</small></small>');
     switch ($layout) {
         case 'default_edit':
             // Get the CRON configuration definition
             if ($task == 'add') {
                 $definition = null;
                 $registry =& JoomlapackModelRegistry::getInstance();
                 $secret = $registry->get('secret_key');
                 $this->assign('secret', $secret);
             } else {
                 $id = JRequest::getInt('id', 0);
                 $model =& $this->getModel('cronman');
                 $definition = $model->getConfiguration($id);
             }
             $this->assign('definition', $definition);
             // Get some lists and pass them on
             $model =& $this->getModel('cronman');
             $postops = $model->getPostOpList();
             $this->assign('postops', $postops);
             // Add the buttons
             JToolBarHelper::save();
             JToolBarHelper::apply();
             JToolBarHelper::cancel();
             break;
         case 'default':
         default:
             $this->_default();
             break;
     }
     // Load the util helper
     $this->loadHelper('utils');
     // Add a spacer, a help button and show the template
     JToolBarHelper::spacer();
     JoomlapackHelperUtils::addLiveHelp('profiles');
     // Load a list of profiles
     $model =& $this->getModel('cronman');
     jpimport('models.profiles', true);
     $profilesmodel = new JoomlapackModelProfiles();
     $profiles_objects = $profilesmodel->getProfilesList(true);
     $profiles = array();
     foreach ($profiles_objects as $profile) {
         $id = $profile->id;
         $profiles[(string) $id] = $profile->description;
     }
     unset($profiles_objects);
     unset($profilesmodel);
     $this->assign('profiles', $profiles);
     // Add JoomlaPack CSS
     $document =& JFactory::getDocument();
     $document->addStyleSheet(JURI::base() . '/components/com_joomlapack/assets/css/joomlapack.css');
     // Show the view
     parent::display();
 }
Exemplo n.º 6
0
 function display()
 {
     // Add toolbar buttons
     JToolBarHelper::title(JText::_('JOOMLAPACK') . ': <small><small>' . JText::_('DEF') . '</small></small>');
     JToolBarHelper::back('Back', 'index.php?option=' . JRequest::getCmd('option'));
     JToolBarHelper::spacer();
     JoomlapackHelperUtils::addLiveHelp('def');
     parent::display();
 }
Exemplo n.º 7
0
 function display()
 {
     // Add toolbar buttons
     JToolBarHelper::title(JText::_('JOOMLAPACK') . ': <small><small>' . JText::_('VIEWLOG') . '</small></small>');
     JToolBarHelper::back('Back', 'index.php?option=' . JRequest::getCmd('option'));
     JToolBarHelper::spacer();
     $document =& JFactory::getDocument();
     $document->addStyleSheet(JURI::base() . 'components/com_joomlapack/assets/css/joomlapack.css');
     JoomlapackHelperUtils::addLiveHelp('log');
     parent::display();
 }
Exemplo n.º 8
0
 function display()
 {
     $task = JRequest::getCmd('task', 'default');
     $act = JRequest::getCmd('act', 'start');
     // Set the toolbar title
     JToolBarHelper::title(JText::_('JOOMLAPACK') . ':: <small><small>' . JText::_('BACKUP') . '</small></small>');
     // Load the util helper
     $this->loadHelper('utils');
     switch ($task) {
         case 'backup':
             if (!class_exists('JoomlapackModelRegistry')) {
                 jpimport('models.registry', true);
             }
             $registry =& JoomlapackModelRegistry::getInstance();
             $this->assign('backupMethod', $registry->get('backupMethod'));
             break;
         case 'error':
             $this->assign('errormessage', JRequest::getString('message'));
             JToolBarHelper::back('Back', 'index.php?option=' . JRequest::getCmd('option'));
             break;
         case 'finised':
             JToolBarHelper::back('Back', 'index.php?option=' . JRequest::getCmd('option'));
             JToolBarHelper::spacer();
             JoomlapackHelperUtils::addLiveHelp('backup');
             break;
         default:
             // Add some buttons
             JToolBarHelper::back('Back', 'index.php?option=' . JRequest::getCmd('option'));
             JToolBarHelper::spacer();
             JoomlapackHelperUtils::addLiveHelp('backup');
             // Load model
             $model =& $this->getModel('backup');
             // Load the Status Helper
             jpimport('helpers.status', true);
             $helper =& JoomlapackHelperStatus::getInstance();
             // Pass on data
             $this->assign('haserrors', !$helper->status);
             $this->assign('hasquirks', $helper->hasQuirks());
             $this->assign('quirks', $helper->getQuirksCell(!$helper->status));
             $this->assign('description', $model->getDescription());
             $this->assign('comment', $model->getComment());
             $this->assign('profile', $model->getProfileID());
             $this->assign('profilelist', $model->getProfilesList());
             break;
     }
     $css = JURI::base() . 'components/com_joomlapack/assets/css/joomlapack.css';
     $document =& JFactory::getDocument();
     $document->addStyleSheet($css);
     parent::display(JRequest::getCmd('tpl', null));
 }
Exemplo n.º 9
0
 function display()
 {
     $task = JRequest::getCmd('task');
     $force = $task == 'force';
     // Set the toolbar title; add a help button
     JToolBarHelper::title(JText::_('JOOMLAPACK') . ':: <small><small>' . JText::_('LIVEUPDATE')) . '</small></small>';
     JToolBarHelper::back('Back', 'index.php?option=' . JRequest::getCmd('option'));
     JoomlapackHelperUtils::addLiveHelp('liveupdate');
     // Load the model
     $model =& $this->getModel();
     $updates =& $model->getUpdates($force);
     $this->assignRef('updates', $updates);
     $document =& JFactory::getDocument();
     $document->addStyleSheet(JURI::base() . 'components/com_joomlapack/assets/css/joomlapack.css');
     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::_('JOOMLAPACK') . ': <small><small>' . JText::_('PROFILE_PAGETITLE_NEW') . '</small></small>');
                     $this->_add();
                     break;
                 case 'edit':
                     JToolBarHelper::title(JText::_('JOOMLAPACK') . ': <small><small>' . JText::_('PROFILE_PAGETITLE_EDIT') . '</small></small>');
                     $this->_edit();
                     break;
             }
             break;
         default:
             switch ($task) {
                 case "import":
                     JToolBarHelper::back('Back', 'index.php?option=com_joomlapack&view=profiles');
                     JToolBarHelper::spacer();
                     JRequest::setVar('tpl', 'import');
                     $tpl = 'import';
                     $this->assign('description', JRequest::getString('description', ''));
                     break;
                 default:
                     $this->_default();
                     JToolBarHelper::custom('export', 'export', 'export', JText::_('PROFILE_ICON_EXPORT'), true, false);
                     JToolBarHelper::custom('import', 'import', 'import', JText::_('PROFILE_ICON_IMPORT'), false, false);
                     break;
             }
             JToolBarHelper::title(JText::_('JOOMLAPACK') . ': <small><small>' . JText::_('PROFILES') . '</small></small>');
             break;
     }
     // Load the util helper
     $this->loadHelper('utils');
     // Add a spacer, a help button and show the template
     JToolBarHelper::spacer();
     JoomlapackHelperUtils::addLiveHelp('profiles');
     $document =& JFactory::getDocument();
     $document->addStyleSheet(JURI::base() . '/components/com_joomlapack/assets/css/joomlapack.css');
     parent::display($tpl);
 }
 function display()
 {
     $layout = JRequest::getCmd('layout', 'default');
     $task = JRequest::getCmd('task', 'components');
     // Add submenus (those nifty text links below the toolbar!)
     $link = JURI::base() . '?option=com_joomlapack&view=extfilter&task=components';
     JSubMenuHelper::addEntry(JText::_('EXTFILTER_COMPONENTS'), $link, $task == 'components');
     $link = JURI::base() . '?option=com_joomlapack&view=extfilter&task=modules';
     JSubMenuHelper::addEntry(JText::_('EXTFILTER_MODULES'), $link, $task == 'modules');
     $link = JURI::base() . '?option=com_joomlapack&view=extfilter&task=plugins';
     JSubMenuHelper::addEntry(JText::_('EXTFILTER_PLUGINS'), $link, $task == 'plugins');
     $link = JURI::base() . '?option=com_joomlapack&view=extfilter&task=languages';
     JSubMenuHelper::addEntry(JText::_('EXTFILTER_LANGUAGES'), $link, $task == 'languages');
     $link = JURI::base() . '?option=com_joomlapack&view=extfilter&task=templates';
     JSubMenuHelper::addEntry(JText::_('EXTFILTER_TEMPLATES'), $link, $task == 'templates');
     // Add toolbar buttons
     JToolBarHelper::title(JText::_('JOOMLAPACK') . ': <small><small>' . JText::_('EXTFILTER') . '</small></small>');
     JToolBarHelper::back('Back', 'index.php?option=' . JRequest::getCmd('option'));
     JToolBarHelper::spacer();
     $model =& $this->getModel();
     switch ($task) {
         case 'components':
             // Add "re-apply" button
             $bar =& JToolBar::getInstance('toolbar');
             $href = 'index.php?option=com_joomlapack&view=extfilter&task=reapplyComponents';
             $bar->appendButton('Link', 'apply', JText::_('EXTFILTER_LABEL_REAPPLY'), $href);
             JToolBarHelper::spacer();
             // Pass along the list of components
             $this->assignRef('components', $model->getComponents());
             break;
         case 'modules':
             // Add "re-apply" button
             $bar =& JToolBar::getInstance('toolbar');
             $href = 'index.php?option=com_joomlapack&view=extfilter&task=reapplyModules';
             $bar->appendButton('Link', 'apply', JText::_('EXTFILTER_LABEL_REAPPLY'), $href);
             JToolBarHelper::spacer();
             // Pass along the list of components
             $this->assignRef('modules', $model->getModules());
             break;
         case 'plugins':
             // Add "re-apply" button
             $bar =& JToolBar::getInstance('toolbar');
             $href = 'index.php?option=com_joomlapack&view=extfilter&task=reapplyPlugins';
             $bar->appendButton('Link', 'apply', JText::_('EXTFILTER_LABEL_REAPPLY'), $href);
             JToolBarHelper::spacer();
             // Pass along the list of components
             $this->assignRef('plugins', $model->getPlugins());
             break;
         case 'templates':
             // Add "re-apply" button
             $bar =& JToolBar::getInstance('toolbar');
             $href = 'index.php?option=com_joomlapack&view=extfilter&task=reapplyTemplates';
             $bar->appendButton('Link', 'apply', JText::_('EXTFILTER_LABEL_REAPPLY'), $href);
             JToolBarHelper::spacer();
             // Pass along the list of components
             $this->assignRef('templates', $model->getTemplates());
             break;
         case 'languages':
             // Add "re-apply" button
             $bar =& JToolBar::getInstance('toolbar');
             $href = 'index.php?option=com_joomlapack&view=extfilter&task=reapplyLanguages';
             $bar->appendButton('Link', 'apply', JText::_('EXTFILTER_LABEL_REAPPLY'), $href);
             JToolBarHelper::spacer();
             // Pass along the list of components
             $this->assignRef('languages', $model->getLanguages());
             break;
     }
     $document =& JFactory::getDocument();
     $document->addStyleSheet(JURI::base() . 'components/com_joomlapack/assets/css/joomlapack.css');
     JoomlapackHelperUtils::addLiveHelp('extfilter');
     parent::display();
 }
Exemplo n.º 12
0
 function display()
 {
     // Set the toolbar title; add a help button
     JToolBarHelper::title(JText::_('JOOMLAPACK') . ':: <small><small>' . JText::_('CONFIGURATION')) . '</small></small>';
     JToolBarHelper::apply();
     JToolBarHelper::save();
     JToolBarHelper::cancel();
     JoomlapackHelperUtils::addLiveHelp('config');
     $document =& JFactory::getDocument();
     $document->addStyleSheet(JURI::base() . 'components/com_joomlapack/assets/css/joomlapack.css');
     // Load the util helper
     $this->loadHelper('utils');
     // Load the model
     $model =& $this->getModel();
     // Pass on the lists
     $this->assign('backuptypelist', $model->getBackupTypeList());
     $this->assign('loglevellist', $model->getLogLevelList());
     $this->assign('sqlcompatlist', $model->getSqlCompatList());
     $this->assign('algolist', $model->getAlgoList());
     $this->assign('listerlist', $model->getFilelistEngineList());
     $this->assign('dumperlist', $model->getDatabaseEngineList());
     $this->assign('archiverlist', $model->getArchiverEngineList());
     $this->assign('installerlist', $model->getInstallerList());
     $this->assign('backupmethodlist', $model->getBackupMethodList());
     $this->assign('authlist', $model->getAuthLevelList());
     // Let's pass the data
     // -- Common Basic
     $this->assign('OutputDirectory', $model->getVar('OutputDirectory'));
     // -- Common Frontend
     $this->assign('enableFrontend', $model->getVar('enableFrontend'));
     $this->assign('secretWord', $model->getVar('secretWord'));
     $this->assign('frontendemail', $model->getVar('frontendemail'));
     $this->assign('arbitraryfeemail', $model->getVar('arbitraryfeemail'));
     // -- Basic
     $this->assign('BackupType', $model->getVar('BackupType'));
     $this->assign('TarNameTemplate', $model->getVar('TarNameTemplate'));
     $this->assign('logLevel', $model->getVar('logLevel'));
     $this->assign('authlevel', $model->getVar('authlevel'));
     $this->assign('cubeinfile', $model->getVar('cubeinfile'));
     // -- Advanced
     $this->assign('MySQLCompat', $model->getVar('MySQLCompat'));
     $this->assign('dbAlgorithm', $model->getVar('dbAlgorithm'));
     $this->assign('packAlgorithm', $model->getVar('packAlgorithm'));
     $this->assign('listerengine', $model->getVar('listerengine'));
     $this->assign('dbdumpengine', $model->getVar('dbdumpengine'));
     $this->assign('packerengine', $model->getVar('packerengine'));
     $this->assign('InstallerPackage', $model->getVar('InstallerPackage'));
     $this->assign('backupMethod', $model->getVar('backupMethod'));
     $this->assign('throttling', $model->getVar('throttling'));
     $this->assign('enableSizeQuotas', $model->getVar('enableSizeQuotas'));
     $this->assign('enableCountQuotas', $model->getVar('enableCountQuotas'));
     $this->assign('sizeQuota', $model->getVar('sizeQuota'));
     $this->assign('countQuota', $model->getVar('countQuota'));
     $this->assign('enableMySQLKeepalive', $model->getVar('enableMySQLKeepalive'));
     $this->assign('gzipbinary', $model->getVar('gzipbinary'));
     $this->assign('effvfolder', $model->getVar('effvfolder'));
     // -- Magic numbers
     $this->assign('mnRowsPerStep', $model->getVar('mnRowsPerStep'));
     $this->assign('mnMaxFragmentSize', $model->getVar('mnMaxFragmentSize'));
     $this->assign('mnMaxFragmentFiles', $model->getVar('mnMaxFragmentFiles'));
     $this->assign('mnZIPForceOpen', $model->getVar('mnZIPForceOpen'));
     $this->assign('mnZIPCompressionThreshold', $model->getVar('mnZIPCompressionThreshold'));
     $this->assign('mnZIPDirReadChunk', $model->getVar('mnZIPDirReadChunk'));
     $this->assign('mnMaxExecTimeAllowed', $model->getVar('mnMaxExecTimeAllowed'));
     $this->assign('mnMinimumExectime', $model->getVar('mnMinimumExectime'));
     $this->assign('mnExectimeBiasPercent', $model->getVar('mnExectimeBiasPercent'));
     $this->assign('mnMaxOpsPerStep', $model->getVar('mnMaxOpsPerStep'));
     $this->assign('mnArchiverChunk', $model->getVar('mnArchiverChunk'));
     // -- MySQLDump
     $this->assign('mysqldumpPath', $model->getVar('mysqldumpPath'));
     $this->assign('mnMSDDataChunk', $model->getVar('mnMSDDataChunk'));
     $this->assign('mnMSDMaxQueryLines', $model->getVar('mnMSDMaxQueryLines'));
     $this->assign('mnMSDLinesPerSession', $model->getVar('mnMSDLinesPerSession'));
     // Also load the Configuration HTML helper
     $this->loadHelper('config');
     parent::display();
 }
Exemplo n.º 13
0
    function display()
    {
        $task = JRequest::getCmd('task', 'default');
        switch ($task) {
            case 'showcomment':
                JToolBarHelper::title(JText::_('JOOMLAPACK') . ': <small><small>' . JText::_('BUADMIN') . '</small></small>');
                JToolBarHelper::back('Back', 'index.php?option=' . JRequest::getCmd('option') . '&view=buadmin');
                JToolBarHelper::save();
                JToolBarHelper::cancel();
                JoomlapackHelperUtils::addLiveHelp('buadmin');
                $document =& JFactory::getDocument();
                $document->addStyleSheet(JURI::base() . 'components/com_joomlapack/assets/css/joomlapack.css');
                jpimport('models.statistics', true);
                $model =& JoomlapackModelStatistics::getInstance('Statistics', 'JoomlapackModel');
                $model->setId(JRequest::getInt('id'));
                $record =& $model->getStatistic();
                $this->assignRef('record', $record);
                JRequest::setVar('tpl', 'comment');
                break;
            case 'restore':
                JToolBarHelper::title(JText::_('JOOMLAPACK') . ': <small><small>' . JText::_('BUADMIN') . '</small></small>');
                JRequest::setVar('tpl', 'restore');
                $document =& JFactory::getDocument();
                $document->addStyleSheet(JURI::base() . 'components/com_joomlapack/assets/css/joomlapack.css');
                $this->assign('password', JRequest::getVar('password'));
                $this->assign('link', JRequest::getVar('linktarget'));
                break;
            default:
                $registry =& JoomlapackModelRegistry::getInstance();
                $easy = $registry->get('easymode', false);
                if (!$easy) {
                    JToolBarHelper::title(JText::_('JOOMLAPACK') . ': <small><small>' . JText::_('BUADMIN') . '</small></small>');
                } else {
                    JToolBarHelper::title(JText::_('JOOMLAPACKEASY') . ': <small><small>' . JText::_('BUADMIN') . '</small></small>');
                }
                JToolBarHelper::back('Back', 'index.php?option=' . JRequest::getCmd('option'));
                JToolBarHelper::spacer();
                JToolBarHelper::deleteList();
                JToolBarHelper::custom('deletefiles', 'delete.png', 'delete_f2.png', JText::_('STATS_LABEL_DELETEFILES'), true);
                // "Show warning first" download button. Joomlantastic!
                //JToolBarHelper::save('download',JText::_('STATS_LOG_DOWNLOAD'));
                $confirmationText = addcslashes(JText::_('STATS_LOG_DOWNLOAD_CONFIRM'), "\n'");
                $baseURI = JURI::base();
                $js = <<<ENDSCRIPT
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_joomlapack&view=buadmin&task=download&id='+id;
\t\tif( part != '' ) newURL += '&part=' + part
\t\twindow.location = newURL;
\t}
}

ENDSCRIPT;
                $document =& JFactory::getDocument();
                $document->addScriptDeclaration($js);
                $bar =& JToolBar::getInstance('toolbar');
                $bar->appendButton('link', 'save', JText::_('STATS_LOG_DOWNLOAD'), "javascript:confirmDownloadButton();");
                if (!$easy) {
                    JToolBarHelper::editList('showcomment', JText::_('STATS_LOG_EDITCOMMENT'));
                    if (JPSPECIALEDITION) {
                        JToolBarHelper::publish('restore', JText::_('STATS_LOG_RESTORE'));
                    }
                }
                JToolBarHelper::spacer();
                if (!$easy) {
                    JoomlapackHelperUtils::addLiveHelp('buadmin');
                } else {
                    JoomlapackHelperUtils::addLiveHelp('buadmineasy');
                }
                $document =& JFactory::getDocument();
                $document->addStyleSheet(JURI::base() . 'components/com_joomlapack/assets/css/joomlapack.css');
                jpimport('models.statistics', true);
                $model =& JoomlapackModelStatistics::getInstance('Statistics', 'JoomlapackModel');
                $list =& $model->getStatisticsListWithMeta();
                $this->assignRef('list', $list);
                $this->assignRef('pagination', $model->getPagination());
                $this->assign('easy', $easy);
                break;
        }
        parent::display(JRequest::getVar('tpl'));
    }
Exemplo n.º 14
0
 function display()
 {
     $registry =& JoomlapackModelRegistry::getInstance();
     if ($registry->get('easymode', false)) {
         // Set the toolbar title; add a help button
         JToolBarHelper::title(JText::_('JOOMLAPACKEASY'));
         JoomlapackHelperUtils::addLiveHelp('cpanel');
         // Add submenus (those nifty text links below the toolbar!)
         // -- Configuration
         $link = JURI::base() . '?option=' . JRequest::getCmd('option') . '&view=configeasy';
         JSubMenuHelper::addEntry(JText::_('CONFIGURATION'), $link);
     } else {
         // Set the toolbar title; add a help button
         JToolBarHelper::title(JText::_('JOOMLAPACK'));
         JoomlapackHelperUtils::addLiveHelp('cpanel');
         // Add submenus (those nifty text links below the toolbar!)
         // -- Configuration
         $link = JURI::base() . '?option=' . JRequest::getCmd('option') . '&view=config';
         JSubMenuHelper::addEntry(JText::_('CONFIGURATION'), $link);
     }
     // -- Backup Now
     $link = JURI::base() . '?option=' . JRequest::getCmd('option') . '&view=backup';
     JSubMenuHelper::addEntry(JText::_('BACKUP'), $link);
     // -- Administer Backup Files
     $link = JURI::base() . '?option=' . JRequest::getCmd('option') . '&view=buadmin';
     JSubMenuHelper::addEntry(JText::_('BUADMIN'), $link);
     // -- View log
     $link = JURI::base() . '?option=' . JRequest::getCmd('option') . '&view=log';
     JSubMenuHelper::addEntry(JText::_('VIEWLOG'), $link);
     // Load the helper classes
     $this->loadHelper('utils');
     $this->loadHelper('status');
     $statusHelper = JoomlapackHelperStatus::getInstance();
     // Load the model
     jpimport('models.statistics', true);
     $model =& $this->getModel();
     $statmodel = new JoomlapackModelStatistics();
     $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('easymode', $registry->get('easymode', false));
     if ($model->isLastBackupFailed()) {
         $this->assign('troubleshooterstyle', 'display: block');
         $this->assign('showtroubleshooter', true);
         $mode = $model->nextSettingsMode();
         if (is_null($mode)) {
             $this->assign('troubleshootertext', JText::_('CPANEL_TROUBLESHOOTER_NOACTION'));
             $this->assign('troubleshooterurl', 'http://forum.joomlapack.net');
         } else {
             switch ($mode) {
                 case 'optimistic':
                     $modetext = JText::_('CONFIGEZ_OPT_SMOPTIMISTIC');
                     break;
                 case 'normal':
                     $modetext = JText::_('CONFIGEZ_OPT_SMNORMAL');
                     break;
                 case 'conservative':
                     $modetext = JText::_('CONFIGEZ_OPT_SMCONSERVATIVE');
                     break;
             }
             $this->assign('troubleshootertext', JText::sprintf('CPANEL_TROUBLESHOOTER_SETTING', $modetext));
             $this->assign('troubleshooterurl', JURI::base() . 'index.php?option=com_joomlapack&view=cpanel&task=troubleshooter');
         }
     } else {
         $this->assign('showtroubleshooter', false);
         $this->assign('troubleshooterstyle', 'display: none');
         $this->assign('troubleshootertext', '');
         $this->assign('troubleshooterurl', '');
     }
     $css = JURI::base() . 'components/com_joomlapack/assets/css/joomlapack.css';
     $document =& JFactory::getDocument();
     $document->addStyleSheet($css);
     parent::display();
 }