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);
 }
示例#2
0
	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();
	}
示例#3
0
	function display()
	{
		// Add references to CSS and JS files
		AkeebaHelperIncludes::includeMedia(false);
		
		parent::display();
	}
示例#4
0
	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();
	}
示例#5
0
	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 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);
 }
示例#7
0
	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();
	}
示例#8
0
 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();
 }
示例#9
0
	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));
 }
示例#11
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!
  */
 function display()
 {
     // Add some buttons
     JToolBarHelper::back('AKEEBA_CONTROLPANEL', 'index.php?option=' . JRequest::getCmd('option'));
     JToolBarHelper::spacer();
     // Load the Status Helper
     if (!class_exists('AkeebaHelperStatus')) {
         JLoader::import('helpers.status', JPATH_COMPONENT_ADMINISTRATOR);
     }
     $helper =& AkeebaHelperStatus::getInstance();
     // Determine default description
     jimport('joomla.utilities.date');
     $jregistry =& JFactory::getConfig();
     $tzDefault = $jregistry->getValue('config.offset');
     $user =& JFactory::getUser();
     $tz = $user->getParam('timezone', $tzDefault);
     if (AKEEBA_JVERSION == '16') {
         $dateNow = new JDate('now', $tz);
         $backup_description = JText::_('BACKUP_DEFAULT_DESCRIPTION') . ' ' . $dateNow->format(JText::_('DATE_FORMAT_LC2'), true);
     } else {
         $dateNow = new JDate();
         $dateNow->setOffset($tz);
         $backup_description = JText::_('BACKUP_DEFAULT_DESCRIPTION') . ' ' . $dateNow->toFormat(JText::_('DATE_FORMAT_LC2'));
     }
     $backup_description = AkeebaHelperEscape::escapeJS($backup_description, "'");
     $default_description = $backup_description;
     $backup_description = JRequest::getVar('description', $default_description);
     $comment = JRequest::getVar('comment', '', 'default', 'none', 2);
     // Get a potential return URL
     $returnurl = JRequest::getVar('returnurl', null);
     if (empty($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);
     }
     if (!class_exists('AkeebaModelCpanel')) {
         JLoader::import('models.cpanel', JPATH_COMPONENT_ADMINISTRATOR);
     }
     $cpanelmodel = new AkeebaModelCpanel();
     $profilemodel = new AkeebaModelProfiles();
     $profilemodel->setId($cpanelmodel->getProfileID());
     $profile_data = $profilemodel->getProfile();
     $isSTW = $profile_data->description == 'Site Transfer Wizard (do not rename)' && !empty($returnurl);
     $this->assign('isSTW', $isSTW);
     // Get the domain details from scripting facility
     $registry =& AEFactory::getConfiguration();
     $script = $registry->get('akeeba.basic.backup_type', 'full');
     $scripting = AEUtilScripting::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'];
             if ($isSTW && $domain_key == 'Packing') {
                 $description = JText::_('BACKUP_LABEL_DOMAIN_PACKING_STW');
             }
             $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 = AEUtilQuirks::get_quirks();
     $unwritableOutput = array_key_exists('001', $quirks);
     // Pass on data
     $this->assign('haserrors', !$helper->status);
     $this->assign('hasquirks', $helper->hasQuirks());
     $this->assign('quirks', $helper->getQuirksCell(!$helper->status));
     $this->assign('description', $backup_description);
     $this->assign('comment', $comment);
     $this->assign('domains', $json_domains);
     $this->assign('maxexec', $maxexec);
     $this->assign('bias', $bias);
     $this->assign('useiframe', $registry->get('akeeba.basic.useiframe', 0) ? 'true' : 'false');
     $this->assign('returnurl', $returnurl);
     $this->assign('unwritableoutput', $unwritableOutput);
     if ($registry->get('akeeba.advanced.archiver_engine', 'jpa') == 'jps') {
         $this->assign('showjpskey', 1);
         $this->assign('jpskey', $registry->get('engine.archiver.jps.key', ''));
     } else {
         $this->assign('showjpskey', 0);
     }
     $this->assign('autostart', JRequest::getInt('autostart', 0));
     // Pass on profile info
     $this->assign('profileid', $cpanelmodel->getProfileID());
     // Active profile ID
     $this->assign('profilelist', $cpanelmodel->getProfilesList());
     // List of available profiles
     // Pass on state information pertaining to SRP
     $srpinfo = array('tag' => JRequest::getCmd('tag', 'backend'), 'type' => JRequest::getCmd('type', ''), 'name' => JRequest::getCmd('name', ''), 'group' => JRequest::getCmd('group', ''), 'customdirs' => JRequest::getVar('customdirs', array(), 'default', 'array', 2), 'extraprefixes' => JRequest::getVar('extraprefixes', array(), 'default', 'array', 2), 'customtables' => JRequest::getVar('customtables', array(), 'default', 'array', 2), 'xmlname' => JRequest::getString('xmlname', ''));
     $this->assign('srpinfo', $srpinfo);
     // Add references to CSS and JS files
     AkeebaHelperIncludes::includeMedia(false);
     // Add live help
     AkeebaHelperIncludes::addHelp();
     // Set the toolbar title
     if ($srpinfo['tag'] == 'restorepoint') {
         $subtitle = JText::_('AKEEBASRP');
     } elseif ($isSTW) {
         $subtitle = JText::_('SITETRANSFERWIZARD');
     } else {
         $subtitle = JText::_('BACKUP');
     }
     JToolBarHelper::title(JText::_('AKEEBA') . ':: <small>' . $subtitle . '</small>', 'akeeba');
     parent::display(JRequest::getCmd('tpl', null));
 }
 function display()
 {
     $task = JRequest::getCmd('task', 'normal');
     // Add toolbar buttons
     JToolBarHelper::title(JText::_('AKEEBA') . ': <small>' . JText::_('DBEF') . '</small>', 'akeeba');
     JToolBarHelper::back('AKEEBA_CONTROLPANEL', 'index.php?option=' . JRequest::getCmd('option'));
     // Add custom submenus
     JSubMenuHelper::addEntry(JText::_('FILTERS_LABEL_NORMALVIEW'), JURI::base() . 'index.php?option=com_akeeba&view=' . JRequest::getCmd('view') . '&task=normal', $task == 'normal');
     JSubMenuHelper::addEntry(JText::_('FILTERS_LABEL_TABULARVIEW'), JURI::base() . 'index.php?option=com_akeeba&view=' . JRequest::getCmd('view') . '&task=tabular', $task == 'tabular');
     // Add references to scripts and CSS
     AkeebaHelperIncludes::includeMedia(false);
     $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
     $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->assign('root_select', JHTML::_('select.genericlist', $options, 'root', $attribs, 'value', 'text', $site_root, 'active_root'));
     $this->assign('roots', $roots);
     switch ($task) {
         case 'normal':
         default:
             $tpl = null;
             // Get a JSON representation of the database data
             $model = $this->getModel();
             $json = json_encode($model->make_listing($site_root));
             $this->assignRef('json', $json);
             break;
         case 'tabular':
             $tpl = 'tab';
             // Get a JSON representation of the tabular filter data
             $model = $this->getModel();
             $json = json_encode($model->get_filters($site_root));
             $this->assignRef('json', $json);
             break;
     }
     // Add live help
     AkeebaHelperIncludes::addHelp();
     // 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);
     parent::display($tpl);
 }
示例#13
0
	public function display()
	{
		$task = JRequest::getCmd('task','normal');

		// Add toolbar buttons
		JToolBarHelper::title(JText::_('AKEEBA').': <small>'.JText::_('FSFILTERS').'</small>','akeeba');
		JToolBarHelper::back('AKEEBA_CONTROLPANEL', 'index.php?option='.JRequest::getCmd('option'));
		
		// Add custom submenus
		JSubMenuHelper::addEntry(
			JText::_('FILTERS_LABEL_NORMALVIEW'),
			JURI::base().'index.php?option=com_akeeba&view='.JRequest::getCmd('view').'&task=normal',
			($task == 'normal')
		);
		JSubMenuHelper::addEntry(
			JText::_('FILTERS_LABEL_TABULARVIEW'),
			JURI::base().'index.php?option=com_akeeba&view='.JRequest::getCmd('view').'&task=tabular',
			($task == 'tabular')
		);

		// Add references to scripts and CSS
		AkeebaHelperIncludes::includeMedia(false);
		$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);

		switch($task)
		{
			case 'normal':
			default:
				$tpl = null;

				// Get a JSON representation of the directory data
				$model = $this->getModel();
				$json = json_encode($model->make_listing($site_root, array(), ''));
				$this->assignRef( 'json', $json );
				break;

			case 'tabular':
				$tpl = 'tab';

				// Get a JSON representation of the tabular filter data
				$model = $this->getModel();
				$json = json_encode( $model->get_filters($site_root) );
				$this->assignRef( 'json', $json );

				break;
		}

		// Add live help
		AkeebaHelperIncludes::addHelp();

		// 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);

		parent::display($tpl);
	}