public function getInfo() { $info = array(); $version = new JVersion(); $platform = new JPlatform(); $db = JFactory::getDbo(); if (isset($_SERVER['SERVER_SOFTWARE'])) { $sf = $_SERVER['SERVER_SOFTWARE']; } else { $sf = getenv('SERVER_SOFTWARE'); } $info['php'] = php_uname(); $info['dbversion'] = $db->getVersion(); $info['dbcollation'] = $db->getCollation(); $info['phpversion'] = phpversion(); $info['server'] = $sf; $info['sapi_name'] = php_sapi_name(); $info['version'] = $version->getLongVersion(); $info['platform'] = $platform->getLongVersion(); $info['useragent'] = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : ""; $info['j2store_version'] = $this->getJ2storeVerion(); $info['is_pro'] = J2Store::isPro(); $info['curl'] = $this->_isCurl(); $info['json'] = $this->_isJson(); $config = JFactory::getConfig(); $info['error_reporting'] = $config->get('error_reporting'); $caching = $config->get('caching'); $info['caching'] = $caching ? JText::_('J2STORE_ENABLED') : JText::_('J2STORE_DISABLED'); $cache_plugin = JPluginHelper::isEnabled('system', 'cache'); $info['plg_cache_enabled'] = $cache_plugin; $info['memory_limit'] = ini_get('memory_limit'); return $info; }
/** * This checks for correct operation of the __set_state() magic function, if it exists. * * @return void */ public function testSetState() { if (method_exists('JPlatform', '__set_state')) { $testData = array('PRODUCT' => 'Joomla!', 'RELEASE' => '1.6', 'DEV_STATUS' => 'Alpha', 'DEV_LEVEL' => '0', 'BUILD' => '', 'CODENAME' => 'Hope', 'RELDATE' => '22-June-2009', 'RELTIME' => '23:00', 'RELTZ' => 'GMT', 'COPYRIGHT' => 'Copyright (C) 2005 - 2013 Open Source Matters. All rights reserved.', 'URL' => '<a href="http://www.joomla.org">Joomla!</a> is Free Software released under the GNU General Public License.'); $testInstance = $this->object->__set_state($testData); foreach ($testData as $key => $value) { $this->assertThat($testInstance->{$key}, $this->equalTo($value)); } $this->assertThat($testInstance, $this->isInstanceOf('JPlatform')); } }
/** * Method to get the system information * * @return array system information values * * @since 1.6 */ public function &getInfo() { if (!is_null($this->info)) { return $this->info; } $this->info = array(); $version = new JVersion(); $platform = new JPlatform(); $db = JFactory::getDbo(); $this->info['php'] = php_uname(); $this->info['dbversion'] = $db->getVersion(); $this->info['dbcollation'] = $db->getCollation(); $this->info['phpversion'] = phpversion(); $this->info['server'] = isset($_SERVER['SERVER_SOFTWARE']) ? $_SERVER['SERVER_SOFTWARE'] : getenv('SERVER_SOFTWARE'); $this->info['sapi_name'] = php_sapi_name(); $this->info['version'] = $version->getLongVersion(); $this->info['platform'] = $platform->getLongVersion(); $this->info['useragent'] = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : ""; return $this->info; }
/** * Method to generate the log file header. * * @return string The log file header * * @since 11.1 */ protected function generateFileHeader() { $head = array(); // Build the log file header. // If the no php flag is not set add the php die statement. if (empty($this->options['text_file_no_php'])) { // Blank line to prevent information disclose: https://bugs.php.net/bug.php?id=60677 $head[] = '#'; $head[] = '#<?php die(\'Forbidden.\'); ?>'; } $head[] = '#Date: ' . gmdate('Y-m-d H:i:s') . ' UTC'; $head[] = '#Software: ' . JPlatform::getLongVersion(); $head[] = ''; // Prepare the fields string $head[] = '#Fields: ' . strtolower(str_replace('}', '', str_replace('{', '', $this->format))); $head[] = ''; return implode("\n", $head); }
/** * Method to get the system information * * @return array System information values * * @since 1.6 */ public function &getInfo() { if (!empty($this->info)) { return $this->info; } $version = new JVersion(); $platform = new JPlatform(); $db = $this->getDbo(); $this->info = array('php' => php_uname(), 'dbversion' => $db->getVersion(), 'dbcollation' => $db->getCollation(), 'dbconnectioncollation' => $db->getConnectionCollation(), 'phpversion' => phpversion(), 'server' => isset($_SERVER['SERVER_SOFTWARE']) ? $_SERVER['SERVER_SOFTWARE'] : getenv('SERVER_SOFTWARE'), 'sapi_name' => php_sapi_name(), 'version' => $version->getLongVersion(), 'platform' => $platform->getLongVersion(), 'useragent' => isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : ""); return $this->info; }
public function onBeforeDisplayCheckoutStep2View(&$view) { $session = JFactory::getSession(); $db = JFactory::getDbo(); // Получение списка городов/стран (через кэш) $list = $this->getDestinations(); // Формирования значения по умолчанию для поля city/state $code_city = $view->user->city ? array_search($view->user->city, $list['city']) : 0; $code_region = $view->user->state ? array_search($view->user->state, $list['region']) : 0; // Формирования значения по умолчанию для поля d_city/d_state $code_d_city = $view->user->d_city ? array_search($view->user->d_city, $list['city']) : 0; $code_d_region = $view->user->d_state ? array_search($view->user->d_state, $list['region']) : 0; $q = "SELECT `country_id` FROM `#__jshopping_countries` WHERE `name_en-GB` = 'Russian Federation' LIMIT 1"; $db->setQuery($q); $russia_code = $db->loadResult(); // Проверка наличия способов доставки кроме eDost // Если есть, то пропускать на след.шаг с неверно заполненным полем город/область $ship = JTable::getInstance('shippingmethod', 'jshop'); $shipCount = count($ship->getAllShippingMethods(1)); // Проверка текущей версии Joomla $isJ25 = version_compare(JPlatform::getShortVersion(), '12.0') < 0; // Добавление директории tmpl для поиска layot'ов (специальное оформление страницы адреса) $edExt = JTable::getInstance('shippingExt', 'jshop'); $edExt->load(array('alias' => 'edost')); $edCfg = $edExt->getParams(); $tmpl = $edCfg['layout'] ? $edCfg['layout'] : 'default'; $view->addTemplatePath(JPATH_ROOT . '/components/com_jshopping/shippings/edost/tmpl/layout/' . $tmpl); $view->assign('code_city', $code_city); $view->assign('code_region', $code_region); $view->assign('code_d_city', $code_d_city); $view->assign('code_d_region', $code_d_region); $view->assign('russia_code', $russia_code); $view->assign('edostRequired', $shipCount > 1 ? false : true); $view->assign('edostRegions', $list['region']); $view->assign('edostCitys', $list['city']); $view->assign('regionGroups', $list['region_group']); $view->assign('cityLink', $list['city_link']); $view->assign('def_region', $edCfg['def_region']); $view->assign('isJ25', $isJ25); // Принудительная настройка полей для основного адреса $view->config_fields['city']['display'] = 1; $view->config_fields['city']['require'] = 0; $view->config_fields['country']['display'] = 1; $view->config_fields['country']['require'] = 0; $view->config_fields['zip']['display'] = 1; $view->config_fields['zip']['require'] = 0; $view->config_fields['state']['display'] = 1; $view->config_fields['state']['require'] = 0; // Принудительная настройка полей для дополнительного адреса $view->config_fields['d_city']['display'] = 1; $view->config_fields['d_city']['require'] = 0; $view->config_fields['d_country']['display'] = 1; $view->config_fields['d_country']['require'] = 0; $view->config_fields['d_zip']['display'] = 1; $view->config_fields['d_zip']['require'] = 0; $view->config_fields['d_state']['display'] = 1; $view->config_fields['d_state']['require'] = 0; return true; }
/** * method to get the system information * * @return array system information values */ function &getInfo() { if (is_null($this->info)) { $this->info = array(); $version = new JVersion(); $platform = new JPlatform(); $db = JFactory::getDBO(); if (isset($_SERVER['SERVER_SOFTWARE'])) { $sf = $_SERVER['SERVER_SOFTWARE']; } else { $sf = getenv('SERVER_SOFTWARE'); } $this->info['php'] = php_uname(); $this->info['dbversion'] = $db->getVersion(); $this->info['dbcollation'] = $db->getCollation(); $this->info['phpversion'] = phpversion(); $this->info['server'] = $sf; $this->info['sapi_name'] = php_sapi_name(); $this->info['version'] = $version->getLongVersion(); $this->info['platform'] = $platform->getLongVersion(); $this->info['useragent'] = phpversion() <= '4.2.1' ? getenv("HTTP_USER_AGENT") : $_SERVER['HTTP_USER_AGENT']; } return $this->info; }
<?php /** * @package Joomla.Platform * * @copyright Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ defined('JPATH_PLATFORM') or die; // Define the Joomla Platform version if not already defined. if (!defined('JPLATFORM')) { define('JPLATFORM', JPlatform::getShortVersion()); } /** * Version information class for the Joomla Platform. * * @package Joomla.Platform * @since 11.1 */ final class JPlatform { // Product name. const PRODUCT = 'Joomla Platform'; // Release version. const RELEASE = '11.1'; // Maintenance version. const MAINTENANCE = '0'; // Development STATUS. const STATUS = 'Dev'; // Build number. const BUILD = 0;
/** * Method to get the system information * * @return array System information values */ public function getInfo() { if (is_null($this->info)) { $version = new \JVersion(); $platform = new \JPlatform(); $db = \App::get('db'); if (isset($_SERVER['SERVER_SOFTWARE'])) { $sf = $_SERVER['SERVER_SOFTWARE']; } else { $sf = getenv('SERVER_SOFTWARE'); } $this->info = array(); $this->info['php'] = php_uname(); $this->info['dbversion'] = $db->getVersion(); $this->info['dbcollation'] = $db->getCollation(); $this->info['phpversion'] = phpversion(); $this->info['server'] = $sf; $this->info['sapi_name'] = php_sapi_name(); $this->info['version'] = $version->getLongVersion(); $this->info['platform'] = $platform->getLongVersion(); $this->info['useragent'] = $_SERVER['HTTP_USER_AGENT']; } return $this->info; }
<?php /* * pm_edost.php * * Copyright 2015 Bass <*****@*****.**> * */ defined('_JEXEC') or die('Restricted access'); if (version_compare(JPlatform::getShortVersion(), '12.0') >= 0) { // Joomla 3.x define('IS_J2x', false); } else { // Joomla 2.5 define('IS_J2x', true); } class pm_edost extends PaymentRoot { const NAME = "pm_edost"; const LOG_NAME = "PMED"; function __construct() { $lang = JFactory::getLanguage(); $lang->load('plg_jshoppingcheckout_edost.sys', JPATH_ADMINISTRATOR); } // ------------------------------------------------------------------------- // Формирование интерфейса конфигурирования (админка) // ------------------------------------------------------------------------- // cfg Текущая конфигурация модуля // ------------------------------------------------------------------------- function showAdminFormParams($cfg)
/** * Method to get the system information * * @return array system information values * * @since 1.6 */ public function &getInfo() { if (is_null($this->info)) { $this->info = array(); $version = new JVersion(); $platform = new JPlatform(); $db = JFactory::getDbo(); if (isset($_SERVER['SERVER_SOFTWARE'])) { $sf = $_SERVER['SERVER_SOFTWARE']; } else { $sf = getenv('SERVER_SOFTWARE'); } //Get PlayJoom Version require_once JPATH_BASE . '/components/com_playjoomupdate/helpers/pjversion.php'; if (!defined('PJVERSION')) { $jversion = new PJVersion(); $this->info['pj_version'] = $jversion->getLongVersion(); } //Get getID3 Version require_once JPATH_BASE . '/components/com_playjoom/helpers/id3/getid3.php'; $getID3 = new getID3(); $this->info['getID3_version'] = $getID3->version(); $this->info['php'] = php_uname(); $this->info['dbversion'] = $db->getVersion(); $this->info['dbcollation'] = $db->getCollation(); $this->info['phpversion'] = phpversion(); $this->info['server'] = $sf; $this->info['sapi_name'] = php_sapi_name(); $this->info['version'] = $version->getLongVersion(); $this->info['platform'] = $platform->getLongVersion(); $this->info['useragent'] = $_SERVER['HTTP_USER_AGENT']; } return $this->info; }