コード例 #1
0
ファイル: view.html.php プロジェクト: densem-2013/exikom
 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;
 }
コード例 #2
0
ファイル: view.html.php プロジェクト: ForAEdesWeb/AEW2
 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');
 }
コード例 #3
0
 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');
 }
コード例 #4
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;
 }
コード例 #5
0
ファイル: view.html.php プロジェクト: rkern21/videoeditor
	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();
	}
コード例 #6
0
 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;
 }
コード例 #7
0
 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;
 }
コード例 #8
0
 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;
 }
コード例 #9
0
ファイル: view.html.php プロジェクト: ppantilla/bbninja
 /**
  * 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)
 {
     /** @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();
     if (version_compare(JVERSION, '3.0', 'ge')) {
         $tzDefault = $jregistry->get('offset');
     } else {
         $tzDefault = $jregistry->getValue('config.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 = '';
     }
     // 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();
     $isSTW = $profile_data->description == 'Site Transfer Wizard (do not rename)' && !empty($returnurl);
     $this->isSTW = $isSTW;
     // Get the domain details from scripting facility
     $registry = Factory::getConfiguration();
     $tag = $model->getState('tag');
     $script = $tag == 'restorepoint' ? 'full' : $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'];
             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 = 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
     // Pass on state information pertaining to SRP
     $this->srpinfo = $model->getState('srpinfo');
     // Add live help
     AkeebaHelperIncludes::addHelp('backup');
     // Set the toolbar title
     if ($this->srpinfo['tag'] == 'restorepoint') {
         $subtitle = JText::_('AKEEBASRP');
     } elseif ($isSTW) {
         $subtitle = JText::_('SITETRANSFERWIZARD');
     } else {
         $subtitle = JText::_('BACKUP');
     }
     JToolBarHelper::title(JText::_('AKEEBA') . ':: <small>' . $subtitle . '</small>', 'akeeba');
     return true;
 }
コード例 #10
0
<link rel="stylesheet" type="text/css"
	href="<?php 
echo JURI::base();
?>
../media/com_akeeba/theme/browser.css?<?php 
echo AKEEBAMEDIATAG;
?>
" />
	<script type="text/javascript">
		function akeeba_browser_useThis()
		{
			var rawFolder = document.forms.adminForm.folderraw.value;
			if( rawFolder == '[SITEROOT]' )
			{
				alert('<?php 
echo AkeebaHelperEscape::escapeJS(JText::_('CONFIG_UI_ROOTDIR'));
?>
');
				rawFolder = '[SITETMP]';
			}
			window.parent.akeeba_browser_callback( rawFolder );
		}
	</script>
</head>
<body>

<?php 
if (empty($this->folder)) {
    ?>
<form action="index.php" method="post" name="adminForm">
	<input type="hidden" name="option" value="com_akeeba" />
コード例 #11
0
ファイル: default.php プロジェクト: ppantilla/bbninja
	akeeba_time_bias = <?php 
echo $this->bias;
?>
;

	// Create a function for saving the editor's contents
	akeeba_comment_editor_save = function() {
	}

	// Push some translations
	akeeba_translations['UI-LASTRESPONSE'] = '<?php 
echo AkeebaHelperEscape::escapeJS(JText::_('BACKUP_TEXT_LASTRESPONSE'));
?>
';
	akeeba_translations['UI-STW-CONTINUE'] = '<?php 
echo AkeebaHelperEscape::escapeJS(JText::_('STW_MSG_CONTINUE'));
?>
';

	//Parse the domain keys
	akeeba_domains = JSON.parse("<?php 
echo $this->domains;
?>
");

	// Setup AJAX proxy URL
	akeeba_ajax_url = 'index.php?option=com_akeeba&view=backup&task=ajax';

	// Setup base View Log URL
	akeeba_logview_url = '<?php 
echo JUri::base();
コード例 #12
0
ファイル: view.html.php プロジェクト: rkern21/videoeditor
	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);
	}
コード例 #13
0
ファイル: default.php プロジェクト: rkern21/videoeditor
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title><?php echo JText::_('CONFIG_UI_BROWSER_TITLE'); ?></title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1" />
<link rel="stylesheet" type="text/css"
	href="<?php echo JURI::base(); ?>../media/com_akeeba/theme/browser.css?<?php echo AKEEBAMEDIATAG?>" />
	<script type="text/javascript">
		function akeeba_browser_useThis()
		{
			var rawFolder = document.forms.adminForm.folderraw.value;
			if( rawFolder == '[SITEROOT]' )
			{
				alert('<?php echo AkeebaHelperEscape::escapeJS(JText::_('CONFIG_UI_ROOTDIR')); ?>');
				rawFolder = '[SITETMP]';
			}
			window.parent.akeeba_browser_callback( rawFolder );
		}
	</script>
</head>
<body>

<?php if(empty($this->folder)): ?>
<form action="index.php" method="post" name="adminForm">
	<input type="hidden" name="option" value="com_akeeba" />
	<input type="hidden" name="view" value="browser" />
	<input type="hidden" name="format" value="html" />
	<input type="hidden" name="tmpl" value="component" />
	<input type="hidden" name="folder" id="folder" value="" />
コード例 #14
0
ファイル: default.php プロジェクト: JozefAB/neoacu
					"OK": sftp_callback,
					"Cancel": function() {
						sftp_dialog_element.dialog("close");
					}
				}
			});

			$('#sftpBrowserErrorContainer').css('display','none');
			$('#sftpBrowserFolderList').html('');
			$('#sftpBrowserCrumbs').html('');

			sftp_dialog_element.dialog('open');

			// URL to load the browser
			akeeba_ajax_url = '<?php 
echo AkeebaHelperEscape::escapeJS(JUri::base() . 'index.php?option=com_akeeba&view=sftpbrowser');
?>
';

			if(empty(akeeba_sftpbrowser_directory)) akeeba_sftpbrowser_directory = '';

			var data = {
				'host'		: akeeba_sftpbrowser_host,
				'port'		: akeeba_sftpbrowser_port,
				'username'	: akeeba_sftpbrowser_username,
				'password'	: akeeba_sftpbrowser_password,
				'pubkey'	: akeeba_sftpbrowser_pubkey,
				'privkey'	: akeeba_sftpbrowser_privkey,
				'directory'	: akeeba_sftpbrowser_directory
			};
コード例 #15
0
ファイル: default.php プロジェクト: sillysachin/teamtogether
');
		$(document.createElement('p')).html('<?php 
echo AkeebaHelperEscape::escapeJS(JText::_('CONFIG_UI_AJAXERRORDLG_TEXT'));
?>
').appendTo(dialog_element);
		$(document.createElement('pre')).html( message ).appendTo(dialog_element);
		dialog_element.dialog('open');
	};
	// Push translations
	akeeba_translations['UI-ROOT'] = '<?php 
echo AkeebaHelperEscape::escapeJS(JText::_('FILTERS_LABEL_UIROOT'));
?>
';
	akeeba_translations['UI-ERROR-FILTER'] = '<?php 
echo AkeebaHelperEscape::escapeJS(JText::_('FILTERS_LABEL_UIERRORFILTER'));
?>
';
<?php 
$keys = array('UI-MULTIDB-HOST', 'UI-MULTIDB-PORT', 'UI-MULTIDB-USERNAME', 'UI-MULTIDB-PASSWORD', 'UI-MULTIDB-DATABASE', 'UI-MULTIDB-PREFIX', 'UI-MULTIDB-TEST', 'UI-MULTIDB-SAVE', 'UI-MULTIDB-CANCEL', 'UI-MULTIDB-LOADING', 'UI-MULTIDB-CONNECTOK', 'UI-MULTIDB-CONNECTFAIL', 'UI-MULTIDB-SAVEFAIL', 'UI-MULTIDB-DRIVER');
foreach ($keys as $key) {
    echo "\takeeba_translations['" . $key . "'] = '" . AkeebaHelperEscape::escapeJS(JText::_($key)) . "';\n";
}
?>
	// Bootstrap the page display
	var data = JSON.parse('<?php 
echo AkeebaHelperEscape::escapeJS($this->json, "'");
?>
');
	multidb_render(data);
});
</script>
コード例 #16
0
ファイル: default_tab.php プロジェクト: rkern21/videoeditor
		position: 'center',
		show: 'slide'
	});
	// Create an AJAX error trap
	akeeba_error_callback = function( message ) {
		var dialog_element = $("#dialog");
		dialog_element.html(''); // Clear the dialog's contents
		dialog_element.dialog('option', 'title', '<?php echo AkeebaHelperEscape::escapeJS(JText::_('CONFIG_UI_AJAXERRORDLG_TITLE')) ?>');
		$(document.createElement('p')).html('<?php echo AkeebaHelperEscape::escapeJS(JText::_('CONFIG_UI_AJAXERRORDLG_TEXT')) ?>').appendTo(dialog_element);
		$(document.createElement('pre')).html( message ).appendTo(dialog_element);
		dialog_element.dialog('open');
	};
	// Push translations
	akeeba_translations['UI-ROOT'] = '<?php echo AkeebaHelperEscape::escapeJS(JText::_('FILTERS_LABEL_UIROOT')) ?>';
	akeeba_translations['UI-ERROR-FILTER'] = '<?php echo AkeebaHelperEscape::escapeJS(JText::_('FILTERS_LABEL_UIERRORFILTER')) ?>';
<?php
	$filters = array('directories', 'skipfiles', 'skipdirs', 'files');
	foreach($filters as $type)
	{
		echo "\takeeba_translations['UI-FILTERTYPE-".strtoupper($type)."'] = '".
			AkeebaHelperEscape::escapeJS(JText::_('FSFILTER_TYPE_'.strtoupper($type))).
			"';\n";
	}
?>
	// Bootstrap the page display
	var data = JSON.parse('<?php echo AkeebaHelperEscape::escapeJS($this->json,"'"); ?>');
	fsfilter_render_tab(data);
});
</script>

</div>
コード例 #17
0
ファイル: view.html.php プロジェクト: bizanto/Hooked
 /**
  * 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));
 }
コード例 #18
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;
 }
コード例 #19
0
ファイル: default.php プロジェクト: rkern21/videoeditor
			buttons		: {
				"OK": ftp_callback,
				"Cancel": function() {
					ftp_dialog_element.dialog("close");
				}
			}
		});

		$('#ftpBrowserErrorContainer').css('display','none');
		$('#ftpBrowserFolderList').html('');
		$('#ftpBrowserCrumbs').html('');

		ftp_dialog_element.dialog('open');
		
		// URL to load the browser
		akeeba_ajax_url = '<?php echo AkeebaHelperEscape::escapeJS(JURI::base().'index.php?option=com_akeeba&view=ftpbrowser' ) ?>';

		if(empty(akeeba_ftpbrowser_directory)) akeeba_ftpbrowser_directory = '';
		
		var data = {
			'host'		: akeeba_ftpbrowser_host,
			'username'	: akeeba_ftpbrowser_username,
			'password'	: akeeba_ftpbrowser_password,
			'passive'	: (akeeba_ftpbrowser_passive ? 1 : 0),
			'ssl'		: (akeeba_ftpbrowser_ssl ? 1 : 0),
			'directory'	: akeeba_ftpbrowser_directory
		};

		// Ugly, ugly, UGLY hack...
		//$.data($('#ftpdialog'), 'directory', akeeba_ftpbrowser_directory);
コード例 #20
0
ファイル: view.html.php プロジェクト: rkern21/videoeditor
	public function display()
	{
		$task = JRequest::getCmd('task','default');

		switch($task)
		{
			case 'showcomment':
				JToolBarHelper::title(JText::_('AKEEBA').': <small>'.JText::_('BUADMIN').'</small>','akeeba');
				JToolBarHelper::back('AKEEBA_CONTROLPANEL', 'index.php?option='.JRequest::getCmd('option'));
				JToolBarHelper::save();
				JToolBarHelper::cancel();
				$document =& JFactory::getDocument();
				$document->addStyleSheet(JURI::base().'../media/com_akeeba/theme/akeebaui.css?'.AKEEBAMEDIATAG);

				$id = JRequest::getInt('id',0);
				$record = AEPlatform::get_statistics($id);
				$this->assign('record', $record);
				$this->assign('record_id', $id);

				JRequest::setVar('tpl','comment');
				break;

			default:
				$registry =& AEFactory::getConfiguration();

				if($task == 'default') {
					JToolBarHelper::title(JText::_('AKEEBA').': <small>'.JText::_('BUADMIN').'</small>','akeeba');
				} else {
					JToolBarHelper::title(JText::_('AKEEBA').': <small>'.JText::_('BUADMINSRP').'</small>','akeeba');
				}

				JToolBarHelper::back('AKEEBA_CONTROLPANEL', 'index.php?option='.JRequest::getCmd('option'));
				JToolBarHelper::spacer();
				JToolBarHelper::deleteList();
				JToolBarHelper::custom( 'deletefiles', 'delete.png', 'delete_f2.png', JText::_('STATS_LABEL_DELETEFILES'), true );

				// Add custom submenus
				JSubMenuHelper::addEntry(
					JText::_('BUADMIN_LABEL_BACKUPS'),
					JURI::base().'index.php?option=com_akeeba&view='.JRequest::getCmd('view').'&task=default',
					($task == 'default')
				);
				JSubMenuHelper::addEntry(
					JText::_('BUADMIN_LABEL_SRP'),
					JURI::base().'index.php?option=com_akeeba&view='.JRequest::getCmd('view').'&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 = JModel::getInstance('Profiles','AkeebaModel');
					$enginesPerPprofile = $pModel->getPostProcessingEnginePerProfile();
					$this->assign('enginesPerProfile', $enginesPerPprofile);
				}
				JToolBarHelper::spacer();

				// "Show warning first" download button. Joomlantastic!
				$confirmationText = AkeebaHelperEscape::escapeJS( JText::_('STATS_LOG_DOWNLOAD_CONFIRM'), "'\n" );
				$baseURI = JURI::base();
				$js = <<<ENDSCRIPT
function confirmDownloadButton()
{
	var answer = confirm('$confirmationText');
	if(answer) submitbutton('download');
}

function confirmDownload(id, part)
{
	var answer = confirm('$confirmationText');
	var newURL = '$baseURI';
	if(answer) {
		newURL += 'index.php?option=com_akeeba&view=buadmin&task=download&id='+id;
		if( part != '' ) newURL += '&part=' + part
		window.location = newURL;
	}
}

ENDSCRIPT;

				$document =& JFactory::getDocument();
				$document->addScriptDeclaration($js);				
				$document->addStyleSheet(JURI::base().'../media/com_akeeba/theme/akeebaui.css?'.AKEEBAMEDIATAG);
				
				$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.DS.'models'.DS.'statistics.php';
				$model = new AkeebaModelStatistics();
				$list =& $model->getStatisticsListWithMeta(false, $filters, $ordering);

				// Assign data to the view
				$this->assignRef( 'lists',		$this->lists); // Filter lists
				$this->assignRef( 'list',		$list); // Data
				$this->assignRef( 'pagination',	$model->getPagination($filters)); // Pagination object
				break;
		}

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

		parent::display(JRequest::getVar('tpl'));
	}
コード例 #21
0
 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);
 }
コード例 #22
0
ファイル: default.php プロジェクト: esorone/efcpw
?>
';
    akeeba.Backup.translations['UI-BACKUPRESUME'] = '<?php 
echo AkeebaHelperEscape::escapeJS(JText::_('COM_AKEEBA_BACKUP_TEXT_BACKUPRESUME'));
?>
';
    akeeba.Backup.translations['UI-BACKUPHALT_DESC'] = '<?php 
echo AkeebaHelperEscape::escapeJS(JText::_('COM_AKEEBA_BACKUP_TEXT_BACKUPHALT_DESC'));
?>
';
    akeeba.Backup.translations['UI-BACKUPFAILED'] = '<?php 
echo AkeebaHelperEscape::escapeJS(JText::_('COM_AKEEBA_BACKUP_TEXT_BACKUPFAILED'));
?>
';
    akeeba.Backup.translations['UI-BACKUPWARNING'] = '<?php 
echo AkeebaHelperEscape::escapeJS(JText::_('COM_AKEEBA_BACKUP_TEXT_BACKUPWARNING'));
?>
';

	//Parse the domain keys
    akeeba.Backup.domains = JSON.parse("<?php 
echo $this->domains;
?>
");

	// Setup AJAX proxy URL
    akeeba.System.params.AjaxURL = 'index.php?option=com_akeeba&view=backup&task=ajax';

	// Setup base View Log URL
    akeeba.Backup.URLs.LogURL = '<?php 
echo JUri::base();
コード例 #23
0
ファイル: restores.php プロジェクト: sillysachin/teamtogether
    function createRestorationINI()
    {
        // Get a password
        $this->password = $this->makeRandomPassword(32);
        $this->setState('password', $this->password);
        // Do we have to use FTP?
        $procengine = $this->getState('procengine', 'direct');
        // Get the absolute path to site's root
        $siteroot = JPATH_SITE;
        // Get the JPS password
        $password = AkeebaHelperEscape::escapeJS($this->getState('jps_key'));
        $data = "<?php\ndefined('_AKEEBA_RESTORATION') or die();\n";
        $data .= '$restoration_setup = array(' . "\n";
        $data .= <<<ENDDATA
\t'kickstart.security.password' => '{$this->password}',
\t'kickstart.tuning.max_exec_time' => '5',
\t'kickstart.tuning.run_time_bias' => '75',
\t'kickstart.tuning.min_exec_time' => '0',
\t'kickstart.procengine' => '{$procengine}',
\t'kickstart.setup.sourcefile' => '{$this->path}',
\t'kickstart.setup.destdir' => '{$siteroot}',
\t'kickstart.setup.restoreperms' => '0',
\t'kickstart.setup.filetype' => '{$this->extension}',
\t'kickstart.setup.dryrun' => '0',
\t'kickstart.jps.password' => '{$password}'
ENDDATA;
        if ($procengine == 'ftp') {
            $ftp_host = $this->getState('ftp_host', '');
            $ftp_port = $this->getState('ftp_port', '21');
            $ftp_user = $this->getState('ftp_user', '');
            $ftp_pass = $this->getState('ftp_pass', '');
            $ftp_root = $this->getState('ftp_root', '');
            $ftp_ssl = $this->getState('ftp_ssl', 0);
            $ftp_pasv = $this->getState('ftp_root', 1);
            $tempdir = $this->getState('tmp_path', '');
            $data .= <<<ENDDATA
\t,
\t'kickstart.ftp.ssl' => '{$ftp_ssl}',
\t'kickstart.ftp.passive' => '{$ftp_pasv}',
\t'kickstart.ftp.host' => '{$ftp_host}',
\t'kickstart.ftp.port' => '{$ftp_port}',
\t'kickstart.ftp.user' => '{$ftp_user}',
\t'kickstart.ftp.pass' => '{$ftp_pass}',
\t'kickstart.ftp.dir' => '{$ftp_root}',
\t'kickstart.ftp.tempdir' => '{$tempdir}'
ENDDATA;
        }
        $data .= ');';
        // Remove the old file, if it's there...
        JLoader::import('joomla.filesystem.file');
        $configpath = JPATH_COMPONENT_ADMINISTRATOR . '/restoration.php';
        if (JFile::exists($configpath)) {
            JFile::delete($configpath);
        }
        // Write new file
        $result = JFile::write($configpath, $data);
        return $result;
    }
コード例 #24
0
ファイル: default.php プロジェクト: rkern21/videoeditor
akeeba.jQuery(document).ready(function($){
	// The return URL
	akeeba_return_url = '<?php echo AkeebaHelperEscape::escapeJS($this->returnurl) ?>';
	akeeba_is_stw = <?php echo ($this->isSTW) ? 'true' : 'false' ?>;

	// Used as parameters to start_timeout_bar()
	akeeba_max_execution_time = <?php echo $this->maxexec; ?>;
	akeeba_time_bias = <?php echo $this->bias; ?>;

	// Create a function for saving the editor's contents
	akeeba_comment_editor_save = function() {
	}

	// Push some translations
	akeeba_translations['UI-LASTRESPONSE'] = '<?php echo AkeebaHelperEscape::escapeJS(JText::_('BACKUP_TEXT_LASTRESPONSE')) ?>';
	akeeba_translations['UI-STW-CONTINUE'] = '<?php echo AkeebaHelperEscape::escapeJS(JText::_('STW_MSG_CONTINUE')) ?>';

	//Parse the domain keys
	akeeba_domains = JSON.parse("<?php echo $this->domains ?>");

	// Setup AJAX proxy URL
	akeeba_ajax_url = 'index.php?option=com_akeeba&view=backup&task=ajax';

	// Setup the IFRAME mode
	akeeba_use_iframe = <?php echo $this->useiframe ?>;
	
	// Publish the SRP info
	akeeba_srp_info = JSON.parse('<?php echo json_encode($this->srpinfo) ?>');

	<?php if( ($this->srpinfo['tag'] == 'restorepoint') || ($this->autostart) ):?>
	backup_start();
コード例 #25
0
ファイル: default.php プロジェクト: rkern21/videoeditor
		position: 'center',
		show: 'slide'
	});
	// Create an AJAX error trap
	akeeba_error_callback = function( message ) {
		var dialog_element = $("#dialog");
		dialog_element.html(''); // Clear the dialog's contents
		dialog_element.dialog('option', 'title', '<?php echo AkeebaHelperEscape::escapeJS(JText::_('CONFIG_UI_AJAXERRORDLG_TITLE')) ?>');
		$(document.createElement('p')).html('<?php echo AkeebaHelperEscape::escapeJS(JText::_('CONFIG_UI_AJAXERRORDLG_TEXT')) ?>').appendTo(dialog_element);
		$(document.createElement('pre')).html( message ).appendTo(dialog_element);
		dialog_element.dialog('open');
	};
	// Push translations
	akeeba_translations['UI-ROOT'] = '<?php echo AkeebaHelperEscape::escapeJS(JText::_('FILTERS_LABEL_UIROOT')) ?>';
	akeeba_translations['UI-ERROR-FILTER'] = '<?php echo AkeebaHelperEscape::escapeJS(JText::_('FILTERS_LABEL_UIERRORFILTER')) ?>';
<?php
	$filters = array('directories', 'skipfiles', 'skipdirs', 'files');
	foreach($filters as $type)
	{
		echo "\takeeba_translations['UI-FILTERTYPE-".strtoupper($type)."'] = '".
			AkeebaHelperEscape::escapeJS(JText::_('FSFILTER_TYPE_'.strtoupper($type))).
			"';\n";
	}
?>
	// Bootstrap the page display
	var data = eval(<?php echo AkeebaHelperEscape::escapeJS($this->json,"'"); ?>);
	fsfilter_render(data);
});
</script>

</div>
コード例 #26
0
ファイル: default.php プロジェクト: Nileshsaini/teamhead
<?php

/**
 * @package AkeebaBackup
 * @copyright Copyright (c)2009-2014 Nicholas K. Dionysopoulos
 * @license GNU General Public License version 3, or later
 *
 * @since 1.3
 */
// Protect from unauthorized access
defined('_JEXEC') or die;
JHtml::_('behavior.framework');
$rootDirWarning = AkeebaHelperEscape::escapeJS(JText::_('CONFIG_UI_ROOTDIR'));
JFactory::getDocument()->addScriptDeclaration(<<<ENDJS
\tfunction akeeba_browser_useThis()
\t{
\t\tvar rawFolder = document.forms.adminForm.folderraw.value;
\t\tif( rawFolder == '[SITEROOT]' )
\t\t{
\t\t\talert('{$rootDirWarning}');
\t\t\trawFolder = '[SITETMP]';
\t\t}
\t\twindow.parent.akeeba_browser_callback( rawFolder );
\t}
ENDJS
, 'text/javascript');
if (empty($this->folder)) {
    ?>
	<form action="index.php" method="post" name="adminForm" id="adminForm">
		<input type="hidden" name="option" value="com_akeeba" />
		<input type="hidden" name="view" value="browser" />
コード例 #27
0
index.php?option=com_akeeba&view=config'; return false;">
			<i class="icon-wrench"></i>
			<?php 
echo JText::_('CONFIGURATION');
?>
		</button>
	</div>

</div>

</div>

<script type="text/javascript" language="javascript">
    akeeba.System.params.AjaxURL = 'index.php?option=com_akeeba&view=confwiz&task=ajax';
    akeeba.Backup.translations['UI-LASTRESPONSE'] = '<?php 
echo AkeebaHelperEscape::escapeJS(JText::_('BACKUP_TEXT_LASTRESPONSE'));
?>
';
<?php 
$keys = array('tryajax', 'tryiframe', 'cantuseajax', 'minexectry', 'cantsaveminexec', 'saveminexec', 'cantdetermineminexec', 'cantfixdirectories', 'cantdbopt', 'exectoolow', 'savingmaxexec', 'cantsavemaxexec', 'cantdeterminepartsize', 'partsize');
foreach ($keys as $key) {
    ?>
akeeba.Wizard.translation['UI-<?php 
    echo strtoupper($key);
    ?>
']="<?php 
    echo JText::_('AKEEBA_WIZARD_UI_' . strtoupper($key));
    ?>
";
<?php 
}
コード例 #28
0
				handler:	'adopt',
				size:		{x: 600, y: 400}
			});
		};

        akeeba.Configuration.onBrowser = function( folder, element )
		{
			// Close dialog callback (user confirmed the new folder)
			akeeba_browser_callback = function( myFolder ) {
				$(element).val( myFolder );
				SqueezeBox.close();
			};

			// URL to load the browser
			var browserSrc = '<?php 
echo AkeebaHelperEscape::escapeJS(JUri::base() . 'index.php?option=com_akeeba&view=browser&tmpl=component&processfolder=1&folder=');
?>
';
			browserSrc = browserSrc + encodeURIComponent(folder);

			SqueezeBox.open(browserSrc, {
				handler:	'iframe',
				size:		{x: 600, y: 400}
			});
		};

		// Enable popovers
		akeeba.jQuery('[rel="popover"]').popover({
			trigger: 'manual',
			animate: false,
			html: true,
コード例 #29
0
ファイル: view.html.php プロジェクト: 01J/topm
    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;
    }
コード例 #30
0
			position: 'center',
			show: 'slide'
		});

		$('#browserbutton').click(function(el){
			akeeba_browser_hook( $('#directory').val(), $('#directory') );
		});

		// Create the browser hook
		akeeba_browser_hook = function( folder, element )
		{
			var dialog_element = $("#dialog");
			dialog_element.html(''); // Clear the dialog's contents
			dialog_element.removeClass('ui-state-error');
			dialog_element.dialog('option', 'title', '<?php 
echo AkeebaHelperEscape::escapeJS(JText::_('CONFIG_UI_BROWSER_TITLE'));
?>
');

			// URL to load the browser
			var browserSrc = 'index.php?option=com_akeeba&view=browser&processfolder=1&tmpl=component&folder=';
			browserSrc = browserSrc + encodeURIComponent(folder);

			// IFrame holding the browser
			var akeeba_browser_iframe = $(document.createElement('iframe')).attr({
				'id':			'akeeba_browser_iframe',
				width:			'100%',
				height:			'98%',
				marginWidth		: 0,
				marginHeight	: 0,
				frameBorder		: 0,