本文整理汇总了PHP中AkeebaHelperIncludes类的典型用法代码示例。如果您正苦于以下问题:PHP AkeebaHelperIncludes类的具体用法?PHP AkeebaHelperIncludes怎么用?PHP AkeebaHelperIncludes使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了AkeebaHelperIncludes类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
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();
}
示例2: onAdd
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: onAdd
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: display
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);
}
示例5: onBrowse
public function onBrowse($tpl = null)
{
$model = $this->getModel();
$task = $model->getState('browse_task', 'normal');
// Add custom submenus
$toolbar = F0FToolbar::getAnInstance($this->input->get('option', 'com_foobar', 'cmd'), $this->config);
$toolbar->appendLink(JText::_('FILTERS_LABEL_NORMALVIEW'), JUri::base() . 'index.php?option=com_akeeba&view=dbef&task=normal', $task == 'normal');
$toolbar->appendLink(JText::_('FILTERS_LABEL_TABULARVIEW'), JUri::base() . 'index.php?option=com_akeeba&view=dbef&task=tabular', $task == 'tabular');
$media_folder = JUri::base() . '../media/com_akeeba/';
// Get the root URI for media files
$this->mediadir = AkeebaHelperEscape::escapeJS($media_folder . 'theme/');
// Get a JSON representation of the available roots
$model = $this->getModel();
$root_info = $model->get_roots();
$roots = array();
if (!empty($root_info)) {
// Loop all dir definitions
foreach ($root_info as $def) {
$roots[] = $def->value;
$options[] = JHTML::_('select.option', $def->value, $def->text);
}
}
$site_root = '[SITEDB]';
$attribs = 'onchange="akeeba_active_root_changed();"';
$this->root_select = JHTML::_('select.genericlist', $options, 'root', $attribs, 'value', 'text', $site_root, 'active_root');
$this->roots = $roots;
switch ($task) {
case 'normal':
default:
$this->setLayout('default');
// Get a JSON representation of the database data
$model = $this->getModel();
$json = json_encode($model->make_listing($site_root));
$this->json = $json;
break;
case 'tabular':
$this->setLayout('tabular');
// Get a JSON representation of the tabular filter data
$model = $this->getModel();
$json = json_encode($model->get_filters($site_root));
$this->json = $json;
break;
}
// Add live help
AkeebaHelperIncludes::addHelp('dbef');
// Get profile ID
$profileid = Platform::getInstance()->get_active_profile();
$this->profileid = $profileid;
// Get profile name
if (!class_exists('AkeebaModelProfiles')) {
JLoader::import('models.profiles', JPATH_COMPONENT_ADMINISTRATOR);
}
$model = new AkeebaModelProfiles();
$model->setId($profileid);
$profile_data = $model->getProfile();
$this->profilename = $profile_data->description;
return true;
}
示例6: onAdd
public function onAdd($tpl = null)
{
$aeconfig = AEFactory::getConfiguration();
// Load the Configuration Wizard Javascript file
AkeebaStrapper::addJSfile('media://com_akeeba/js/confwiz.js');
// Add live help
AkeebaHelperIncludes::addHelp('confwiz');
$this->setLayout('wizard');
return true;
}
示例7: onProfilesBrowse
public function onProfilesBrowse()
{
JToolBarHelper::title(JText::_('AKEEBA') . ': <small>' . JText::_('PROFILES') . '</small>', 'akeeba');
JToolBarHelper::back('AKEEBA_CONTROLPANEL', 'index.php?option=com_akeeba');
JToolBarHelper::spacer();
JToolBarHelper::addNew();
JToolBarHelper::custom('copy', 'copy.png', 'copy_f2.png', 'JLIB_HTML_BATCH_COPY', false);
JToolBarHelper::spacer();
JToolBarHelper::deleteList();
JToolBarHelper::spacer();
AkeebaHelperIncludes::addHelp('profiles');
}
示例8: onAdd
public function onAdd($tpl = null)
{
// Get profile ID
$profileid = AEPlatform::getInstance()->get_active_profile();
$this->profileid = $profileid;
// Get profile name
$profileName = FOFModel::getTmpInstance('Profiles', 'AkeebaModel')->setId($profileid)->getItem()->description;
$this->profilename = $profileName;
// Get the CRON paths
$this->croninfo = $this->getModel()->getPaths();
// Add live help
AkeebaHelperIncludes::addHelp('schedule');
}
示例9: onDisplay
public function onDisplay($tpl = null)
{
$model = $this->getModel();
$task = $model->getState('task', 'components');
// Add submenus (those nifty text links below the toolbar!)
$toolbar = FOFToolbar::getAnInstance($this->input->get('option', 'com_foobar', 'cmd'), $this->config);
$link = JURI::base() . '?option=com_akeeba&view=extfilter&task=components';
$toolbar->appendLink(JText::_('EXTFILTER_COMPONENTS'), $link, $task == 'components');
$link = JURI::base() . '?option=com_akeeba&view=extfilter&task=modules';
$toolbar->appendLink(JText::_('EXTFILTER_MODULES'), $link, $task == 'modules');
$link = JURI::base() . '?option=com_akeeba&view=extfilter&task=plugins';
$toolbar->appendLink(JText::_('EXTFILTER_PLUGINS'), $link, $task == 'plugins');
$link = JURI::base() . '?option=com_akeeba&view=extfilter&task=languages';
$toolbar->appendLink(JText::_('EXTFILTER_LANGUAGES'), $link, $task == 'languages');
$link = JURI::base() . '?option=com_akeeba&view=extfilter&task=templates';
$toolbar->appendLink(JText::_('EXTFILTER_TEMPLATES'), $link, $task == 'templates');
switch ($task) {
case 'components':
// Pass along the list of components
$this->components = $model->getComponents();
break;
case 'modules':
// Pass along the list of components
$this->modules = $model->getModules();
break;
case 'plugins':
// Pass along the list of components
$this->plugins = $model->getPlugins();
break;
case 'templates':
// Pass along the list of components
$this->templates = $model->getTemplates();
break;
case 'languages':
// Pass along the list of components
$this->languages = $model->getLanguages();
break;
}
$this->setLayout($task);
// Add live help
AkeebaHelperIncludes::addHelp('extfilter');
// Get profile ID
$profileid = AEPlatform::getInstance()->get_active_profile();
$this->profileid = $profileid;
// Get profile name
$pmodel = FOFModel::getAnInstance('Profiles', 'AkeebaModel');
$pmodel->setId($profileid);
$profile_data = $pmodel->getItem();
$this->profilename = $profile_data->description;
return true;
}
示例10: onBrowse
public function onBrowse($tpl = null)
{
$media_folder = JURI::base() . '../media/com_akeeba/';
$model = $this->getModel();
$directory = $model->getState('directory', '');
if (empty($directory)) {
$config = AEFactory::getConfiguration();
$this->directory = $config->get('akeeba.basic.output_directory', '[DEFAULT_OUTPUT]');
} else {
$this->directory = '';
}
AkeebaHelperIncludes::addHelp('discover');
return true;
}
示例11: display
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();
}
示例12: onAdd
protected function onAdd($tpl = null)
{
/** @var AkeebaModelCpanels $model */
$model = $this->getModel();
/**
$selfhealModel = F0FModel::getTmpInstance('Selfheal','AkeebaModel');
$schemaok = $selfhealModel->healSchema();
/**/
$schemaok = true;
$this->schemaok = $schemaok;
$aeconfig = AEFactory::getConfiguration();
if ($schemaok) {
// Load the helper classes
$this->loadHelper('utils');
$this->loadHelper('status');
$statusHelper = AkeebaHelperStatus::getInstance();
// Load the model
if (!class_exists('AkeebaModelStatistics')) {
JLoader::import('models.statistics', JPATH_COMPONENT_ADMINISTRATOR);
}
$statmodel = new AkeebaModelStatistics();
$this->icondefs = $model->getIconDefinitions();
// Icon definitions
$this->profileid = $model->getProfileID();
// Active profile ID
$this->profilelist = $model->getProfilesList();
// List of available profiles
$this->statuscell = $statusHelper->getStatusCell();
// Backup status
$this->detailscell = $statusHelper->getQuirksCell();
// Details (warnings)
$this->statscell = $statmodel->getLatestBackupDetails();
$this->fixedpermissions = $model->fixMediaPermissions();
// Fix media/com_akeeba permissions
$this->update_plugin = $model->isUpdatePluginEnabled();
$this->needsdlid = $model->needsDownloadID();
$this->needscoredlidwarning = $model->mustWarnAboutDownloadIDInCore();
$this->hasPostInstallationMessages = $model->hasPostInstallMessages();
$this->extension_id = $model->getState('extension_id', 0, 'int');
// Add live help
AkeebaHelperIncludes::addHelp('cpanel');
$this->statsIframe = F0FModel::getTmpInstance('Stats', 'AkeebaModel')->collectStatistics(true);
}
return $this->onDisplay($tpl);
}
示例13: onBrowse
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;
}
示例14: onBrowse
public function onBrowse($tpl = null)
{
// Add live help
AkeebaHelperIncludes::addHelp('log');
// Get a list of log names
$model = $this->getModel();
$this->logs = $model->getLogList();
$tag = $model->getState('tag');
if (empty($tag)) {
$tag = null;
}
$this->tag = $tag;
// Get profile ID
$profileid = AEPlatform::getInstance()->get_active_profile();
$this->profileid = $profileid;
// Get profile name
$pmodel = FOFModel::getAnInstance('Profiles', 'AkeebaModel');
$pmodel->setId($profileid);
$profile_data = $pmodel->getItem();
$this->profilename = $profile_data->description;
return true;
}
示例15: onDltoserver
public function onDltoserver($tpl = null)
{
$this->setLayout('downloading');
$model = $this->getModel();
// Add live help
AkeebaHelperIncludes::addHelp('s3import');
$total = JFactory::getApplication()->getUserState('com_akeeba.s3import.totalsize', 0);
$done = JFactory::getApplication()->getUserState('com_akeeba.s3import.donesize', 0);
$part = JFactory::getApplication()->getUserState('com_akeeba.s3import.part', 0) + 1;
$parts = JFactory::getApplication()->getUserState('com_akeeba.s3import.totalparts', 0);
if ($total <= 0) {
$percent = 0;
} else {
$percent = (int) (100 * ($done / $total));
if ($percent < 0) {
$percent = 0;
}
if ($percent > 100) {
$percent = 100;
}
}
$this->assign('total', $total);
$this->assign('done', $done);
$this->assign('percent', $percent);
$this->assign('total_parts', $parts);
$this->assign('current_part', $part);
// Render the progress bar
$document = JFactory::getDocument();
$step = $model->getState('step', 1) + 1;
$script = "window.addEvent( 'domready' , function() {\n";
$script .= "window.location='index.php?option=com_akeeba&view=s3import&layout=downloading&task=dltoserver&step={$step}';\n";
$script .= "});\n";
$document->addScriptDeclaration($script);
AkeebaHelperIncludes::addHelp('s3import');
return true;
}