示例#1
0
 function display($tpl = null)
 {
     JToolBarHelper::title(JText::_('COM_EASYJOOMLABACKUP') . " - " . JText::_('COM_EASYJOOMLABACKUP_SUBMENU_ENTRIES'), 'easyjoomlabackup');
     if (JFactory::getUser()->authorise('easyjoomlabackup.fullbackup', 'com_easyjoomlabackup')) {
         JToolBarHelper::custom('fullbackup', 'new', 'new', JText::_('COM_EASYJOOMLABACKUP_FULLBACKUP'), false);
     }
     if (JFactory::getUser()->authorise('easyjoomlabackup.databasebackup', 'com_easyjoomlabackup')) {
         JToolBarHelper::custom('databasebackup', 'new', 'new', JText::_('COM_EASYJOOMLABACKUP_DATABASEBACKUP'), false);
     }
     if (JFactory::getUser()->authorise('easyjoomlabackup.filebackup', 'com_easyjoomlabackup')) {
         JToolBarHelper::custom('filebackup', 'new', 'new', JText::_('COM_EASYJOOMLABACKUP_FILEBACKUP'), false);
     }
     if (JFactory::getUser()->authorise('easyjoomlabackup.discover', 'com_easyjoomlabackup')) {
         JToolBarHelper::custom('discover', 'refresh', 'refresh', JText::_('COM_EASYJOOMLABACKUP_DISCOVER'), false);
     }
     if (JFactory::getUser()->authorise('core.delete', 'com_easyjoomlabackup')) {
         JToolBarHelper::deleteList();
     }
     if (JFactory::getUser()->authorise('core.admin', 'com_easyjoomlabackup')) {
         JToolBarHelper::preferences('com_easyjoomlabackup', '500');
     }
     if (JFactory::getUser()->authorise('easyjoomlabackup.download', 'com_easyjoomlabackup')) {
         $download_allowed = true;
     } else {
         $download_allowed = false;
     }
     $items = $this->get('Data');
     $pagination = $this->get('Pagination');
     $this->state = $this->get('State');
     $this->plugin_state = $this->get('PluginStatus');
     $document = JFactory::getDocument();
     $document->addStyleSheet('components/com_easyjoomlabackup/css/easyjoomlabackup.css');
     $this->items = $items;
     $this->pagination = $pagination;
     $this->download_allowed = $download_allowed;
     // Check for database type
     $db_type = JFactory::getConfig()->get('dbtype');
     $this->db_type = $db_type;
     // Get donation code message
     require_once JPATH_COMPONENT . '/helpers/easyjoomlabackup.php';
     $donation_code_message = EasyJoomlaBackupHelper::getDonationCodeMessage();
     $this->donation_code_message = $donation_code_message;
     parent::display($tpl);
 }
示例#2
0
 function display($tpl = null)
 {
     $task = JFactory::getApplication()->input->get('task');
     if ($task == 'fullbackup') {
         JToolBarHelper::title(JText::_('COM_EASYJOOMLABACKUP') . ' - ' . JText::_('COM_EASYJOOMLABACKUP_CREATEBACKUP_FULLBACKUP'), 'easyjoomlabackup-add');
     } elseif ($task == 'databasebackup') {
         JToolBarHelper::title(JText::_('COM_EASYJOOMLABACKUP') . ' - ' . JText::_('COM_EASYJOOMLABACKUP_CREATEBACKUP_DATABASEBACKUP'), 'easyjoomlabackup-add');
     } elseif ($task == 'filebackup') {
         JToolBarHelper::title(JText::_('COM_EASYJOOMLABACKUP') . ' - ' . JText::_('COM_EASYJOOMLABACKUP_CREATEBACKUP_FILEBACKUP'), 'easyjoomlabackup-add');
     }
     JToolBarHelper::custom('backup_create_' . JFactory::getApplication()->input->get('task'), 'new', 'new', JText::_('COM_EASYJOOMLABACKUP_CREATEBACKUP_BUTTON'), false);
     JToolBarHelper::cancel('cancel');
     $document = JFactory::getDocument();
     $document->addStyleSheet('components/com_easyjoomlabackup/css/easyjoomlabackup.css');
     // Get donation code message
     require_once JPATH_COMPONENT . '/helpers/easyjoomlabackup.php';
     $donation_code_message = EasyJoomlaBackupHelper::getDonationCodeMessage();
     $this->donation_code_message = $donation_code_message;
     parent::display($tpl);
 }