本文整理汇总了PHP中AEPlatform类的典型用法代码示例。如果您正苦于以下问题:PHP AEPlatform类的具体用法?PHP AEPlatform怎么用?PHP AEPlatform使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了AEPlatform类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: processPart
public function processPart($absolute_filename)
{
// Retrieve engine configuration data
$config = AEFactory::getConfiguration();
$address = trim($config->get('engine.postproc.email.address', ''));
$subject = $config->get('engine.postproc.email.subject', '0');
// Sanity checks
if (empty($address)) {
$this->setError('You have not set up a recipient\'s email address for the backup files');
return false;
}
// Send the file
$basename = basename($absolute_filename);
AEUtilLogger::WriteLog(_AE_LOG_INFO, "Preparing to email {$basename} to {$address}");
if (empty($subject)) {
$subject = JText::_('AKEEBA_DEFAULT_EMAIL_SUBJECT');
}
$body = "Emailing {$basename}";
AEUtilLogger::WriteLog(_AE_LOG_DEBUG, "Subject: {$subject}");
AEUtilLogger::WriteLog(_AE_LOG_DEBUG, "Body: {$body}");
$result = AEPlatform::getInstance()->send_email($address, $subject, $body, $absolute_filename);
// Return the result
if ($result !== true) {
// An error occured
$this->setError($result);
// Notify that we failed
return false;
} else {
// Return success
AEUtilLogger::WriteLog(_AE_LOG_INFO, "Email sent successfully");
return true;
}
}
开发者ID:alvarovladimir,项目名称:messermeister_ab_rackservers,代码行数:33,代码来源:email.php
示例2: __construct
function __construct()
{
$useSVNSource = AEPlatform::getInstance()->get_platform_configuration_option('usesvnsource', 0);
// Determine the appropriate update URL based on whether we're on Core or Professional edition
AEPlatform::getInstance()->load_version_defines();
if (!$useSVNSource) {
$fname = 'http://nocdn.akeebabackup.com/updates/ab';
$fname .= AKEEBA_PRO == 1 ? 'pro' : 'core';
$fname .= '.ini';
} else {
$fname = 'http://www.akeebabackup.com/updates/ab';
$fname .= AKEEBA_PRO == 1 ? 'pro' : 'core';
$fname .= 'svn.ini';
}
$this->_updateURL = $fname;
$this->_extensionTitle = 'Akeeba Backup ' . (AKEEBA_PRO == 1 ? 'Professional' : 'Core');
$this->_requiresAuthorization = AKEEBA_PRO == 1;
$this->_currentVersion = AKEEBA_VERSION;
$this->_currentReleaseDate = AKEEBA_DATE;
parent::__construct();
$this->_downloadID = AEPlatform::getInstance()->get_platform_configuration_option('update_dlid', '');
if (AKEEBA_PRO) {
$this->_minStability = AEPlatform::getInstance()->get_platform_configuration_option('minstability', 'stable');
} else {
$this->_minStability = 'stable';
}
$this->_cacerts = dirname(__FILE__) . '/../akeeba/assets/cacert.pem';
if (substr($this->_currentVersion, 0, 3) == 'svn') {
$this->_versionStrategy = 'newest';
}
}
开发者ID:alvarovladimir,项目名称:messermeister_ab_rackservers,代码行数:31,代码来源:config.php
示例3: _default
/**
* The default layout, shows a list of profiles
*
*/
function _default()
{
// Get reference to profiles model
$model =& $this->getModel('profiles');
// Load list of profiles
$profiles = $model->getProfilesList();
$this->assign('profiles', $profiles);
// Get profile ID
$profileid = AEPlatform::getInstance()->get_active_profile();
$this->assign('profileid', $profileid);
// Get profile name
$model->setId($profileid);
$profile_data = $model->getProfile();
$this->assign('profilename', $profile_data->description);
// Add toolbar buttons
JToolBarHelper::back('AKEEBA_CONTROLPANEL', 'index.php?option=' . JRequest::getCmd('option'));
JToolBarHelper::spacer();
JToolBarHelper::addNew();
if (version_compare(JVERSION, '1.6.0', 'ge')) {
JToolBarHelper::custom('copy', 'copy.png', 'copy_f2.png', 'JLIB_HTML_BATCH_COPY', false);
} else {
JToolBarHelper::custom('copy', 'copy.png', 'copy_f2.png', 'Copy', false);
}
JToolBarHelper::spacer();
JToolBarHelper::deleteList();
JToolBarHelper::spacer();
}
开发者ID:bizanto,项目名称:Hooked,代码行数:31,代码来源:view.html.php
示例4: getauth
/**
* Fetches the authentication token from Dropbox.com, after you've run the
* first step of the OAuth process.
*
* @return array
*/
public function getauth()
{
$keys = $this->_getKeys();
$api = new AEUtilDropbox();
$api->setAppKeys($keys);
$data = AEPlatform::getInstance()->get_flash_variable('dropbox.reqtoken', null);
$reqToken = unserialize(base64_decode($data));
$api->setReqToken($reqToken);
$token = null;
try {
$api->setSignatureMethod('HMAC-SHA1');
$api->getAccessToken();
$token = true;
} catch (Exception $e) {
$api->setSignatureMethod('PLAINTEXT');
}
if (is_null($token)) {
try {
$token = $api->getAccessToken();
} catch (Exception $e) {
return array('error' => 'Did not receive token from Dropbox', 'token' => $e->getMessage());
}
}
$token = $api->getToken();
return array('error' => '', 'token' => $token);
}
开发者ID:sillysachin,项目名称:teamtogether,代码行数:32,代码来源:dropbox.php
示例5: download
public function download()
{
AEPlatform::getInstance()->load_configuration(AEPlatform::getInstance()->get_active_profile());
$tag = JRequest::getCmd('tag', null);
$filename = AEUtilLogger::logName($tag);
@ob_end_clean();
// In case some braindead plugin spits its own HTML
header("Cache-Control: no-cache, must-revalidate");
// HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
// Date in the past
header("Content-Description: File Transfer");
header('Content-Type: text/plain');
header('Content-Disposition: attachment; filename="Akeeba Backup Debug Log.txt"');
echo "WARNING: Do not copy and paste lines from this file!\r\n";
echo "You are supposed to ZIP and attach it in your support forum post.\r\n";
echo "If you fail to do so, your support request will receive minimal priority.\r\n";
echo "\r\n";
echo "--- START OF RAW LOG --\r\n";
@readfile($filename);
// The at sign is necessary to skip showing PHP errors if the file doesn't exist or isn't readable for some reason
echo "--- END OF RAW LOG ---\r\n";
flush();
JFactory::getApplication()->close();
}
开发者ID:srbsnkr,项目名称:sellingonlinemadesimple,代码行数:25,代码来源:log.php
示例6: __construct
public function __construct()
{
$this->object = 'dir';
$this->subtype = 'inclusion';
$this->method = 'direct';
// FIXME This filter doesn't work very well on many live hosts. Disabled for now.
parent::__construct();
return;
if (empty($this->filter_name)) {
$this->filter_name = strtolower(basename(__FILE__, '.php'));
}
// Get the saved library path and compare it to the default
$jlibdir = AEPlatform::getInstance()->get_platform_configuration_option('jlibrariesdir', '');
if (empty($jlibdir)) {
if (defined('JPATH_LIBRARIES')) {
$jlibdir = JPATH_LIBRARIES;
} elseif (defined('JPATH_PLATFORM')) {
$jlibdir = JPATH_PLATFORM;
} else {
$jlibdir = false;
}
}
if ($jlibdir !== false) {
$jlibdir = AEUtilFilesystem::TranslateWinPath($jlibdir);
$defaultLibraries = AEUtilFilesystem::TranslateWinPath(JPATH_SITE . '/libraries');
if ($defaultLibraries != $jlibdir) {
// The path differs, add it here
$this->filter_data['JPATH_LIBRARIES'] = $jlibdir;
}
} else {
$this->filter_data = array();
}
parent::__construct();
}
开发者ID:srbsnkr,项目名称:sellingonlinemadesimple,代码行数:34,代码来源:libraries.php
示例7: 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);
}
开发者ID:srbsnkr,项目名称:sellingonlinemadesimple,代码行数:35,代码来源:view.html.php
示例8: __construct
/**
* Database object constructor
* @param array List of options used to configure the connection
*/
public function __construct($options = array())
{
// Get best matching Akeeba Backup driver instance
if (class_exists('JFactory')) {
$db = JFactory::getDBO();
switch ($db->name) {
case 'mysql':
$driver = 'mysql';
break;
case 'mysqli':
$driver = 'mysqli';
break;
case 'sqlsrv':
case 'mssql':
$driver = 'sqlsrv';
break;
case 'sqlazure':
$driver = 'sqlsrv';
break;
default:
$driver = '';
return;
// Brace yourself, this engine is going down crashing in flames.
break;
}
$options['connection'] = $db->getConnection();
$driver = 'AEDriver' . ucfirst($driver);
} else {
$driver = AEPlatform::getInstance()->get_default_database_driver(false);
}
$this->dbo = new $driver($options);
// Propagate errors
$this->propagateFromObject($this->dbo);
}
开发者ID:brojask,项目名称:colegio-abogados-joomla,代码行数:38,代码来源:joomla.php
示例9: __construct
public function __construct()
{
$this->object = 'dir';
$this->subtype = 'content';
$this->method = 'direct';
$this->filter_name = 'PlatformSkipfiles';
if (AEFactory::getKettenrad()->getTag() == 'restorepoint') {
$this->enabled = false;
}
// We take advantage of the filter class magic to inject our custom filters
$configuration = AEFactory::getConfiguration();
$jreg = JFactory::getConfig();
if (version_compare(JVERSION, '3.0', 'ge')) {
$tmpdir = $jreg->get('tmp_path');
} else {
$tmpdir = $jreg->getValue('config.tmp_path');
}
// Get the site's root
if ($configuration->get('akeeba.platform.override_root', 0)) {
$root = $configuration->get('akeeba.platform.newroot', '[SITEROOT]');
} else {
$root = '[SITEROOT]';
}
$this->filter_data[$root] = array(self::treatDirectory($configuration->get('akeeba.basic.output_directory')), self::treatDirectory($tmpdir), 'tmp', self::treatDirectory(JPATH_CACHE), self::treatDirectory(JPATH_ADMINISTRATOR . '/cache'), self::treatDirectory(JPATH_ROOT . '/cache'), 'cache', 'administrator/cache', self::treatDirectory(JPATH_ROOT . '/installation'), 'installation', self::treatDirectory(AEPlatform::getInstance()->get_site_root() . '/cache'), self::treatDirectory(AEPlatform::getInstance()->get_site_root() . '/administrator/cache'), 'administrator/components/com_akeeba/backup', self::treatDirectory(AEPlatform::getInstance()->get_site_root() . '/components/libraries/cmslib/cache'), 'components/libraries/cmslib/cache', 'logs');
parent::__construct();
}
开发者ID:WineWorld,项目名称:joomlatrialcmbg,代码行数:26,代码来源:skipfiles.php
示例10: 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');
}
开发者ID:alvarovladimir,项目名称:messermeister_ab_rackservers,代码行数:31,代码来源:view.html.php
示例11: __construct
public function __construct()
{
// This is a directory inclusion filter.
$this->object = 'db';
$this->subtype = 'inclusion';
$this->method = 'direct';
$this->filter_name = 'PlatformSitedb';
// Add a new record for the core Joomla! database
// Get core database options
$options = AEPlatform::getInstance()->get_platform_database_options();
$host = $options['host'];
$port = NULL;
$socket = NULL;
$targetSlot = substr(strstr($host, ":"), 1);
if (!empty($targetSlot)) {
// Get the port number or socket name
if (is_numeric($targetSlot)) {
$port = $targetSlot;
} else {
$socket = $targetSlot;
}
// Extract the host name only
$host = substr($host, 0, strlen($host) - (strlen($targetSlot) + 1));
// This will take care of the following notation: ":3306"
if ($host == '') {
$host = 'localhost';
}
}
// This is the format of the database inclusion filters
$entry = array('host' => $host, 'port' => is_null($socket) ? is_null($port) ? '' : $port : $socket, 'username' => $options['user'], 'password' => $options['password'], 'database' => $options['database'], 'prefix' => $options['prefix'], 'dumpFile' => 'joomla.sql', 'driver' => AEPlatform::getInstance()->get_default_database_driver(true));
// We take advantage of the filter class magic to inject our custom filters
$configuration =& AEFactory::getConfiguration();
$this->filter_data['[SITEDB]'] = $entry;
parent::__construct();
}
开发者ID:bizanto,项目名称:Hooked,代码行数:35,代码来源:sitedb.php
示例12: apply
/**
* Handle the apply task which saves settings and shows the editor again
*
*/
public function apply()
{
// CSRF prevention
if (!JRequest::getVar(JUtility::getToken(), false, 'POST')) {
JError::raiseError('403', JText::_(version_compare(JVERSION, '1.6.0', 'ge') ? 'JLIB_APPLICATION_ERROR_ACCESS_FORBIDDEN' : 'Request Forbidden'));
}
// Get the var array from the request
$var = JRequest::getVar('var', array(), 'default', 'array');
// Make it into Akeeba Engine array format
$data = array();
foreach ($var as $key => $value) {
$data[$key] = $value;
}
// Forbid stupidly selecting the site's root as the output or temporary directory
if (array_key_exists('akeeba.basic.output_directory', $data)) {
$folder = $data['akeeba.basic.output_directory'];
$folder = AEUtilFilesystem::translateStockDirs($folder, true, true);
$check = AEUtilFilesystem::translateStockDirs('[SITEROOT]', true, true);
if ($check == $folder) {
JError::raiseWarning(503, JText::_('CONFIG_OUTDIR_ROOT'));
$data['akeeba.basic.output_directory'] = '[DEFAULT_OUTPUT]';
}
}
// Merge it
$config = AEFactory::getConfiguration();
$config->mergeArray($data, false, false);
// Save configuration
AEPlatform::getInstance()->save_configuration();
$this->setRedirect(JURI::base() . 'index.php?option=' . JRequest::getCmd('option') . '&view=config', JText::_('CONFIG_SAVE_OK'));
}
开发者ID:srbsnkr,项目名称:sellingonlinemadesimple,代码行数:34,代码来源:config.php
示例13: import
public function import($file)
{
$directory = $this->getState('directory', '');
$directory = AEUtilFilesystem::translateStockDirs($directory);
// Find out how many parts there are
$multipart = 0;
$base = substr($file, 0, -4);
$ext = substr($file, -3);
$found = true;
$total_size = @filesize($directory . '/' . $file);
while ($found) {
$multipart++;
$newExtension = substr($ext, 0, 1) . sprintf('%02u', $multipart);
$newFile = $directory . '/' . $base . '.' . $newExtension;
$found = file_exists($newFile);
if ($found) {
$total_size += @filesize($newFile);
}
}
$filetime = @filemtime($directory . '/' . $file);
if (empty($filetime)) {
$filetime = time();
}
// Create a new backup record
$record = array('description' => JText::_('DISCOVER_LABEL_IMPORTEDDESCRIPTION'), 'comment' => '', 'backupstart' => date('Y-m-d H:i:s', $filetime), 'backupend' => date('Y-m-d H:i:s', $filetime + 1), 'status' => 'complete', 'origin' => 'backend', 'type' => 'full', 'profile_id' => 1, 'archivename' => $file, 'absolute_path' => $directory . '/' . $file, 'multipart' => $multipart, 'tag' => 'backend', 'filesexist' => 1, 'remote_filename' => '', 'total_size' => $total_size);
$id = null;
$id = AEPlatform::getInstance()->set_or_update_statistics($id, $record, $this);
}
开发者ID:alvarovladimir,项目名称:messermeister_ab_rackservers,代码行数:28,代码来源:discovers.php
示例14: onBrowse
public function onBrowse($tpl = null)
{
$model = $this->getModel();
$task = $model->getState('browse_task', 'normal');
// Add custom submenus
$toolbar = FOFToolbar::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->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:
$this->setLayout('default');
// 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':
$this->setLayout('tabular');
// 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('dbef');
// 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);
return true;
}
开发者ID:alvarovladimir,项目名称:messermeister_ab_rackservers,代码行数:58,代码来源:view.html.php
示例15: onEdit
public function onEdit($tpl = null)
{
$model = $this->getModel();
$id = $model->getId();
$record = AEPlatform::getInstance()->get_statistics($id);
$this->record = $record;
$this->record_id = $id;
$this->setLayout('comment');
}
开发者ID:01J,项目名称:topm,代码行数:9,代码来源:view.html.php
示例16: array
/**
* Returns a database connection object. It caches the created objects for future use.
* @param array $options Options to use when instanciating the database connection
* @return AEAbstractDriver
*/
public static function &getDatabase($options, $unset = false)
{
static $instances;
if (!isset( $instances )) {
$instances = array();
}
$signature = serialize( $options );
if($unset)
{
if (!empty($instances[$signature]))
{
$db =& $instances[$signature];
$db = null;
unset($instances[$signature]);
}
$null = null;
return $null;
}
if (empty($instances[$signature]))
{
$driver = array_key_exists('driver', $options) ? $options['driver'] : '';
$select = array_key_exists('select', $options) ? $options['select'] : true;
$database = array_key_exists('database', $options) ? $options['database'] : null;
$driver = preg_replace('/[^A-Z0-9_\.-]/i', '', $driver);
if(empty($driver))
{
// No driver specified; try to guess
$default_signature = serialize( AEPlatform::get_platform_database_options() );
if($signature == $default_signature)
{
$driver = AEPlatform::get_default_database_driver(true);
}
else
{
$driver = AEPlatform::get_default_database_driver(false);
}
}
else
{
// Make sure a full driver name was given
if(substr($driver,0,2) != 'AE') $driver = 'AEDriver'.ucfirst($driver);
}
$instance = new $driver($options);
$instances[$signature] = & $instance;
}
return $instances[$signature];
}
开发者ID:rkern21,项目名称:videoeditor,代码行数:60,代码来源:database.php
示例17: _run
protected function _run()
{
if ($this->getState() == 'postrun') {
AliceUtilLogger::WriteLog(_AE_LOG_DEBUG, __CLASS__ . " :: Already finished");
$this->setStep('');
$this->setSubstep('');
return;
} else {
$this->setState('running');
}
// Load the version defines
AEPlatform::getInstance()->load_version_defines();
$registry = AliceFactory::getConfiguration();
// Write log file's header
AliceUtilLogger::WriteLog(_AE_LOG_INFO, "--------------------------------------------------------------------------------");
AliceUtilLogger::WriteLog(_AE_LOG_INFO, "Alice Log Inspector and Correction of Errors " . AKEEBA_VERSION . ' (' . AKEEBA_DATE . ')');
AliceUtilLogger::WriteLog(_AE_LOG_INFO, "What went wrong?");
AliceUtilLogger::WriteLog(_AE_LOG_INFO, "--------------------------------------------------------------------------------");
AliceUtilLogger::WriteLog(_AE_LOG_INFO, "--- System Information ---");
AliceUtilLogger::WriteLog(_AE_LOG_INFO, "PHP Version :" . PHP_VERSION);
AliceUtilLogger::WriteLog(_AE_LOG_INFO, "PHP OS :" . PHP_OS);
AliceUtilLogger::WriteLog(_AE_LOG_INFO, "PHP SAPI :" . PHP_SAPI);
if (function_exists('php_uname')) {
AliceUtilLogger::WriteLog(_AE_LOG_INFO, "OS Version :" . php_uname('s'));
}
if (isset($_SERVER['SERVER_SOFTWARE'])) {
$server = $_SERVER['SERVER_SOFTWARE'];
} elseif ($sf = getenv('SERVER_SOFTWARE')) {
$server = $sf;
} else {
$server = 'n/a';
}
AliceUtilLogger::WriteLog(_AE_LOG_INFO, "Web Server :" . $server);
$platformData = AEPlatform::getInstance()->getPlatformVersion();
AliceUtilLogger::WriteLog(_AE_LOG_INFO, $platformData['name'] . " version :" . $platformData['version']);
if (isset($_SERVER['HTTP_USER_AGENT'])) {
AliceUtilLogger::WriteLog(_AE_LOG_INFO, "User agent :" . phpversion() <= "4.2.1" ? getenv("HTTP_USER_AGENT") : $_SERVER['HTTP_USER_AGENT']);
}
AliceUtilLogger::WriteLog(_AE_LOG_INFO, "Safe mode :" . ini_get("safe_mode"));
AliceUtilLogger::WriteLog(_AE_LOG_INFO, "Display errors :" . ini_get("display_errors"));
AliceUtilLogger::WriteLog(_AE_LOG_INFO, "Error reporting :" . self::error2string());
AliceUtilLogger::WriteLog(_AE_LOG_INFO, "Error display :" . self::errordisplay());
AliceUtilLogger::WriteLog(_AE_LOG_INFO, "Disabled functions :" . ini_get("disable_functions"));
AliceUtilLogger::WriteLog(_AE_LOG_INFO, "open_basedir restr.:" . ini_get('open_basedir'));
AliceUtilLogger::WriteLog(_AE_LOG_INFO, "Max. exec. time :" . ini_get("max_execution_time"));
AliceUtilLogger::WriteLog(_AE_LOG_INFO, "Memory limit :" . ini_get("memory_limit"));
if (function_exists("memory_get_usage")) {
AliceUtilLogger::WriteLog(_AE_LOG_INFO, "Current mem. usage :" . memory_get_usage());
}
AliceUtilLogger::WriteLog(_AE_LOG_INFO, "--------------------------------------------------------------------------------");
if (!version_compare(PHP_VERSION, '5.3.0', 'ge')) {
AliceUtilLogger::WriteLog(_AE_LOG_WARNING, "You are using an outdated version of PHP. Akeeba Engine may not work properly. Please upgrade to PHP 5.3 or later.");
}
$this->setState('postrun');
}
开发者ID:sillysachin,项目名称:teamtogether,代码行数:55,代码来源:init.php
示例18: display
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();
}
开发者ID:rkern21,项目名称:videoeditor,代码行数:53,代码来源:view.html.php
示例19: onBeforeBrowse
public function onBeforeBrowse()
{
$result = parent::onBeforeBrowse();
if ($result) {
$params = JComponentHelper::getParams('com_akeeba');
$model = $this->getThisModel();
$view = $this->getThisView();
/** @var AkeebaModelCpanels $model */
$view->setModel($model);
$aeconfig = AEFactory::getConfiguration();
// Invalidate stale backups
AECoreKettenrad::reset(array('global' => true, 'log' => false, 'maxrun' => $params->get('failure_timeout', 180)));
// Just in case the reset() loaded a stale configuration...
AEPlatform::getInstance()->load_configuration();
// Let's make sure the temporary and output directories are set correctly and writable...
$wizmodel = F0FModel::getAnInstance('Confwiz', 'AkeebaModel');
$wizmodel->autofixDirectories();
// Check if we need to toggle the settings encryption feature
$model->checkSettingsEncryption();
// Update the magic component parameters
$model->updateMagicParameters();
// Run the automatic database check
$model->checkAndFixDatabase();
// Run the automatic update site refresh
/** @var AkeebaModelUpdates $updateModel */
$updateModel = F0FModel::getTmpInstance('Updates', 'AkeebaModel');
$updateModel->refreshUpdateSite();
// Check the last installed version and show the post-setup page on Joomla! 3.1 or earlier
if (!version_compare(JVERSION, '3.2.0', 'ge')) {
$versionLast = null;
if (file_exists(JPATH_COMPONENT_ADMINISTRATOR . '/akeeba.lastversion.php')) {
include_once JPATH_COMPONENT_ADMINISTRATOR . '/akeeba.lastversion.php';
if (defined('AKEEBA_LASTVERSIONCHECK')) {
$versionLast = AKEEBA_LASTVERSIONCHECK;
}
}
if (is_null($versionLast)) {
$component = JComponentHelper::getComponent('com_akeeba');
if (is_object($component->params) && $component->params instanceof JRegistry) {
$params = $component->params;
} else {
$params = new JParameter($component->params);
}
$versionLast = $params->get('lastversion', '');
}
if (version_compare(AKEEBA_VERSION, $versionLast, 'ne') || empty($versionLast)) {
$this->setRedirect('index.php?option=com_akeeba&view=postsetup');
return true;
}
}
}
return $result;
}
开发者ID:WineWorld,项目名称:joomlatrialcmbg,代码行数:53,代码来源:cpanel.php
示例20: 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');
}
开发者ID:greyhat777,项目名称:vuslinterliga,代码行数:13,代码来源:view.html.php
注:本文中的AEPlatform类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论