protected static final function loadWrapper($v6f66e878c62db60568a3487869695820)
 {
     static $v2430fe39e225818bd957ed4cb53eb770 = array(), $v2245023265ae4cf87d02c8b6ba991139;
     if (isset($v2430fe39e225818bd957ed4cb53eb770[$v6f66e878c62db60568a3487869695820])) {
         return $v2430fe39e225818bd957ed4cb53eb770[$v6f66e878c62db60568a3487869695820];
     }
     if (is_null($v2245023265ae4cf87d02c8b6ba991139)) {
         $v2245023265ae4cf87d02c8b6ba991139 = mainConfiguration::getInstance();
     }
     $v46d111d8fa2089a051889becc4736cc4 = $v6f66e878c62db60568a3487869695820 . 'Wrapper';
     if (!class_exists($v46d111d8fa2089a051889becc4736cc4)) {
         $v47826cacc65c665212b821e6ff80b9b0 = $v2245023265ae4cf87d02c8b6ba991139->includeParam('system.kernel') . 'utils/translators/wrappers/' . $v6f66e878c62db60568a3487869695820 . 'Wrapper.php';
         if (is_file($v47826cacc65c665212b821e6ff80b9b0) == false) {
             $v2430fe39e225818bd957ed4cb53eb770[$v6f66e878c62db60568a3487869695820] = false;
             throw new coreException("Can't load file \"{$v47826cacc65c665212b821e6ff80b9b0}\" to translate object of class \"{$v6f66e878c62db60568a3487869695820}\"");
         }
         require $v47826cacc65c665212b821e6ff80b9b0;
     }
     if (!class_exists($v46d111d8fa2089a051889becc4736cc4)) {
         $v2430fe39e225818bd957ed4cb53eb770[$v6f66e878c62db60568a3487869695820] = false;
         throw new coreException("Translation wrapper class \"{$v46d111d8fa2089a051889becc4736cc4}\" not found");
     }
     $v7c27535f88bae9519ceb14a8983c57ff = new $v46d111d8fa2089a051889becc4736cc4($v607f2f3099f2a347b327caa70e0be4b2);
     if ($v7c27535f88bae9519ceb14a8983c57ff instanceof translatorWrapper == false) {
         $v2430fe39e225818bd957ed4cb53eb770[$v6f66e878c62db60568a3487869695820] = false;
         throw new coreException("Translation wrapper class \"{$v46d111d8fa2089a051889becc4736cc4}\" should be instance of translatorWrapper");
     }
     return $v2430fe39e225818bd957ed4cb53eb770[$v6f66e878c62db60568a3487869695820] = $v7c27535f88bae9519ceb14a8983c57ff;
 }
 private static final function loadWrapper($v6f66e878c62db60568a3487869695820)
 {
     static $v2430fe39e225818bd957ed4cb53eb770 = array(), $v2245023265ae4cf87d02c8b6ba991139;
     if (isset($v2430fe39e225818bd957ed4cb53eb770[$v6f66e878c62db60568a3487869695820])) {
         return $v2430fe39e225818bd957ed4cb53eb770[$v6f66e878c62db60568a3487869695820];
     }
     if (is_null($v2245023265ae4cf87d02c8b6ba991139)) {
         $v2245023265ae4cf87d02c8b6ba991139 = mainConfiguration::getInstance();
     }
     $v46d111d8fa2089a051889becc4736cc4 = $v6f66e878c62db60568a3487869695820 . 'Splitter';
     $v47826cacc65c665212b821e6ff80b9b0 = $v2245023265ae4cf87d02c8b6ba991139->includeParam('system.kernel') . 'subsystems/import/splitters/' . $v46d111d8fa2089a051889becc4736cc4 . '.php';
     if (is_file($v47826cacc65c665212b821e6ff80b9b0) == false) {
         $v2430fe39e225818bd957ed4cb53eb770[$v6f66e878c62db60568a3487869695820] = false;
         throw new publicException("Can't load splitter \"{$v47826cacc65c665212b821e6ff80b9b0}\" for \"{$v6f66e878c62db60568a3487869695820}\" file type");
     }
     require $v47826cacc65c665212b821e6ff80b9b0;
     if (!class_exists($v46d111d8fa2089a051889becc4736cc4)) {
         $v2430fe39e225818bd957ed4cb53eb770[$v6f66e878c62db60568a3487869695820] = false;
         throw new publicException("Spliter class \"{$v46d111d8fa2089a051889becc4736cc4}\" not found");
     }
     $v7c27535f88bae9519ceb14a8983c57ff = new $v46d111d8fa2089a051889becc4736cc4($v6f66e878c62db60568a3487869695820);
     if ($v7c27535f88bae9519ceb14a8983c57ff instanceof self == false) {
         $v2430fe39e225818bd957ed4cb53eb770[$v6f66e878c62db60568a3487869695820] = false;
         throw new publicException("Splitter class \"{$v46d111d8fa2089a051889becc4736cc4}\" should be instance of umiImportSplitter");
     }
     return $v2430fe39e225818bd957ed4cb53eb770[$v6f66e878c62db60568a3487869695820] = $v7c27535f88bae9519ceb14a8983c57ff;
 }
Esempio n. 3
0
 public function process($template = null)
 {
     $this->order->order();
     $currency = strtoupper(mainConfiguration::getInstance()->get('system', 'default-currency'));
     // NB! Possible values for PayOnline are RUB (not RUR!), EUR and USD
     if (!in_array($currency, array('RUB', 'EUR', 'USD'))) {
         $currency = 'RUB';
     }
     $merchantId = $this->object->merchant_id;
     $privateKey = $this->object->private_key;
     $orderId = $this->order->getId();
     $amount = number_format($this->order->getActualPrice(), 2, '.', '');
     $keyString = "MerchantId={$merchantId}&OrderId={$orderId}&Amount={$amount}&Currency={$currency}&PrivateSecurityKey={$privateKey}";
     $securityKey = md5($keyString);
     $formAction = "?MerchantId={$merchantId}&OrderId={$orderId}&Amount={$amount}&Currency={$currency}&SecurityKey={$securityKey}&order-id={$orderId}";
     $formAction = "https://secure.payonlinesystem.com/ru/payment/" . $formAction;
     $param = array();
     $param['formAction'] = $formAction;
     $param['MerchantId'] = $merchantId;
     $param['OrderId'] = $orderId;
     $param['Amount'] = $amount;
     $param['Currency'] = $currency;
     $param['SecurityKey'] = $securityKey;
     $param['orderId'] = $orderId;
     $param['ReturnUrl'] = 'http://' . cmsController::getInstance()->getCurrentDomain()->getHost();
     $this->order->setPaymentStatus('initialized');
     list($templateString) = def_module::loadTemplates("emarket/payment/payonline/" . $template, "form_block");
     return def_module::parseTemplate($templateString, $param);
 }
 public static final function get(iUmiObject $currencyObject)
 {
     $codeName = $currencyObject->codename;
     if (!$codeName) {
         throw new coreException("Can't get currency codename");
     }
     $codeName = strtolower($codeName);
     $config = mainConfiguration::getInstance();
     $includePath = $config->includeParam('system.default-module') . 'emarket/classes/currency/updaters/' . $codeName . '.php';
     if (is_file($includePath) == false) {
         throw new coreException("Can't load updater file \"{$includePath}\"");
     }
     require $includePath;
     $className = $codeName . 'CurrencyUpdater';
     if (class_exists($className)) {
         $updater = new $className($currencyObject);
         if ($updater instanceof currencyUpdater) {
             return $updater;
         } else {
             throw new coreException("Class \"{$className}\" MUST be extended from currencyUpdater class");
         }
     } else {
         throw new coreException("Class \"{$className}\" not found");
     }
 }
Esempio n. 5
0
 protected function connect()
 {
     if (class_exists("Memcache")) {
         if (function_exists("getMemcached")) {
             if ($vc6b2148720c14fb58871f480a7cc042e = getmemcached()) {
                 $this->memcache = $vc6b2148720c14fb58871f480a7cc042e;
                 $this->connected = true;
                 return true;
             }
         }
         $vc6b2148720c14fb58871f480a7cc042e = new Memcache();
         $v3a8e4c06e471595f6eb262bb9b5582d9 = mainConfiguration::getInstance();
         $v67b3dba8bc6778101892eb77249db32e = $v3a8e4c06e471595f6eb262bb9b5582d9->get('cache', 'memcache.host');
         if (empty($v67b3dba8bc6778101892eb77249db32e)) {
             $v67b3dba8bc6778101892eb77249db32e = 'localhost';
         }
         $v901555fb06e346cb065ceb9808dcfc25 = $v3a8e4c06e471595f6eb262bb9b5582d9->get('cache', 'memcache.port');
         if (is_null($v901555fb06e346cb065ceb9808dcfc25)) {
             $v901555fb06e346cb065ceb9808dcfc25 = '11211';
         }
         if ($vc6b2148720c14fb58871f480a7cc042e->connect($v67b3dba8bc6778101892eb77249db32e, $v901555fb06e346cb065ceb9808dcfc25)) {
             $this->memcache = $vc6b2148720c14fb58871f480a7cc042e;
             $this->connected = true;
             return true;
         }
         return false;
     } else {
         return false;
     }
 }
 public static function getInstance()
 {
     if (!self::$instance) {
         self::$instance = new mainConfiguration();
     }
     return self::$instance;
 }
Esempio n. 7
0
 public function __construct()
 {
     parent::__construct();
     $cmsController = cmsController::getInstance();
     if ($cmsController->getCurrentMode() == "admin") {
         $commonTabs = $this->getCommonTabs();
         if ($commonTabs) {
             $commonTabs->add('lists');
             $commonTabs->add('places');
         }
         $this->__loadLib("__banners.php");
         $this->__implement("__banners_banners");
         $this->__loadLib("__admin.php");
         $this->__implement("__banners_admin");
         $this->__loadLib("__places.php");
         $this->__implement("__places_banners");
     } else {
         $this->__loadLib("__custom.php");
         $this->__implement("__custom_banners");
     }
     $this->isStaticCache = file_exists("./cache.config") || file_exists("banners.config") ? true : false;
     $this->per_page = 20;
     $config = mainConfiguration::getInstance();
     $this->disableUpdateOpt = (int) $config->get('modules', 'banners.disable-update-optimization');
 }
 public static function autoExport(selector $v8be74552df93e31bbdd6b36ed74bdb6a, $vb8c8ec69026adfe891bf5e618eabb17b = false)
 {
     $v4aed429835809b0214b31d7ff74f05ba = new quickCsvExporter($v8be74552df93e31bbdd6b36ed74bdb6a);
     $v0e8133eb006c0f85ed9444ae07a60842 = umiObjectTypesCollection::getInstance();
     foreach ($v8be74552df93e31bbdd6b36ed74bdb6a->types as $v599dcce2998a6b40b1e38e8c6006cb0a) {
         if (is_null($v599dcce2998a6b40b1e38e8c6006cb0a->objectType) == false) {
             $v6301cee35ea764a1e241978f93f01069 = $v599dcce2998a6b40b1e38e8c6006cb0a->objectType->getId();
             $v4aed429835809b0214b31d7ff74f05ba->setObjectTypeId($v6301cee35ea764a1e241978f93f01069);
         }
         if (is_null($v599dcce2998a6b40b1e38e8c6006cb0a->hierarchyType) == false) {
             $vacf567c9c3d6cf7c6e2cc0ce108e0631 = $v599dcce2998a6b40b1e38e8c6006cb0a->hierarchyType->getId();
             $v6301cee35ea764a1e241978f93f01069 = $v0e8133eb006c0f85ed9444ae07a60842->getTypeByHierarchyTypeId($vacf567c9c3d6cf7c6e2cc0ce108e0631);
             $v4aed429835809b0214b31d7ff74f05ba->setObjectTypeId($v6301cee35ea764a1e241978f93f01069);
         }
     }
     if ($v8be74552df93e31bbdd6b36ed74bdb6a->mode == "pages" || $v8be74552df93e31bbdd6b36ed74bdb6a->hierarchy || $vb8c8ec69026adfe891bf5e618eabb17b) {
         $v4aed429835809b0214b31d7ff74f05ba->setResultsMode("element");
     } else {
         $v4aed429835809b0214b31d7ff74f05ba->setResultsMode("object");
     }
     $v52a43e48ec4649dee819dadabcab1bde = cmsController::getInstance()->getCurrentModule();
     $v2245023265ae4cf87d02c8b6ba991139 = mainConfiguration::getInstance();
     $v435ed7e9f07f740abf511a62c00eef6e = $v52a43e48ec4649dee819dadabcab1bde ? $v52a43e48ec4649dee819dadabcab1bde . "-" . date("Y-m-d_H.i.s") : "csv-export-" . uniqid();
     $vedcf819b71ce7a0689cd83e44f16b702 = $v2245023265ae4cf87d02c8b6ba991139->includeParam('system.runtime-cache') . $v435ed7e9f07f740abf511a62c00eef6e . ".csv";
     $v4aed429835809b0214b31d7ff74f05ba->setUsedFields(getRequest('used-fields'));
     $v4aed429835809b0214b31d7ff74f05ba->exportToFile($vedcf819b71ce7a0689cd83e44f16b702);
     $v8c7dd922ad47494fc02c388e12c00eac = new umiFile($vedcf819b71ce7a0689cd83e44f16b702);
     $v8c7dd922ad47494fc02c388e12c00eac->download(true);
 }
Esempio n. 9
0
 public function process($template = null)
 {
     $this->order->order();
     $currency = strtoupper(mainConfiguration::getInstance()->get('system', 'default-currency'));
     if ($currency == 'RUR') {
         $currency = 'RUB';
     }
     $amount = number_format($this->order->getActualPrice(), 2, '.', '');
     $orderId = $this->order->getId() . '.' . time();
     $merchantId = $this->object->mnt_id;
     $dataIntegrityCode = $this->object->mnt_data_integrity_code;
     $successUrl = $this->object->mnt_success_url;
     $failUrl = $this->object->mnt_fail_url;
     $testMode = $this->object->mnt_test_mode;
     $systemUrl = $this->object->mnt_system_url;
     if (empty($testMode)) {
         $testMode = 0;
     }
     $signature = md5("{$merchantId}{$orderId}{$amount}{$currency}{$testMode}{$dataIntegrityCode}");
     $param = array();
     $param['formAction'] = "https://{$systemUrl}/assistant.htm";
     $param['mntId'] = $merchantId;
     $param['mnTransactionId'] = $orderId;
     $param['mntCurrencyCode'] = $currency;
     $param['mntAmount'] = $amount;
     $param['mntTestMode'] = $testMode;
     $param['mntSignature'] = $signature;
     $param['mntSuccessUrl'] = $successUrl;
     $param['mntFailUrl'] = $failUrl;
     $this->order->setPaymentStatus('initialized');
     list($templateString) = def_module::loadTemplates("emarket/payment/payanyway/" . $template, "form_block");
     return def_module::parseTemplate($templateString, $param);
 }
Esempio n. 10
0
		public function _network_settings($network) {
			$this->setHeaderLabel(getLabel("header-social_networks-settings") . $network->getName());

			$mode = getRequest("param0");
			$cmsController = cmsController::getInstance();

			$type = $network->getCodeName();

			$module = $cmsController->getCurrentModule();
			$method = $cmsController->getCurrentMethod();
			$config = mainConfiguration::getInstance();
			$templateId = $config->get("templates", "{$module}.{$method}");

			$inputData = array(
				'object' => $network->getObject(),
				'type' => $type
			);

			if($mode == "do") {
				$config->set("templates", "{$module}.{$method}", getRequest('template-id'));
				$object = $this->saveEditedObjectData($inputData);
				$this->chooseRedirect($this->pre_lang . '/admin/social_networks/' . $type . '/');
			}

			$this->setDataType("form");
			$this->setActionType("modify");

			$data = $this->prepareData($inputData, "object");
			$data['template-id'] = array('@id' => $templateId);

			$this->setData($data);
			return $this->doData();
		}
Esempio n. 11
0
		public function prepareElementsToExport() {

			$objectId = getRequest('param0');

			$complete = false;
			$objects = umiObjectsCollection::getInstance();
			$object = $objects->getObject($objectId);
			$formatId = $object->format;
			$format = $objects->getObject($formatId);
			$suffix = $format->sid;
			if($suffix != 'YML') {
				$data = array(
					"attribute:complete" => (int) $complete,
					"attribute:preparation" => (int) !$complete,
				);

				baseModuleAdmin::setData($data);
				return baseModuleAdmin::doData();
			}

			$offset = (int) getSession("export_offset_" . $objectId);
			$blockSize = mainConfiguration::getInstance()->get("modules", "exchange.splitter.limit") ? mainConfiguration::getInstance()->get("modules", "exchange.splitter.limit") : 25;

			if(!file_exists(CURRENT_WORKING_DIR . "/sys-temp/yml/" . $objectId . 'el')) {
				throw new publicException('<a href="' . getLabel("label-errors-no-information") . '" target="blank">' . getLabel("label-errors-no-information") .'</a>');
			}

			$elementsToExport = unserialize(file_get_contents(CURRENT_WORKING_DIR . "/sys-temp/yml/" . $objectId . 'el'));
			$elements = umiHierarchy::getInstance();

			$errors = array();
			for ($i = $offset; $i <= $offset + $blockSize -1; $i++) {
				if(!array_key_exists($i, $elementsToExport)) {
					$complete = true;
					break;
				}
				$element = $elements->getElement($elementsToExport[$i]);
				if($element instanceof umiHierarchyElement) {
					try {
						$element->updateYML();
					} catch (Exception $e) {
						$errors[] = $e->getMessage() . " #{$elementsToExport[$i]}";
					}
				}
			}

			$_SESSION["export_offset_" . $objectId] = $offset + $blockSize;
			if ($complete) {
				unset($_SESSION["export_offset_" . $objectId]);
			}

			$data = array(
				"attribute:complete" => (int) $complete,
				"nodes:log" => $errors
			);

			baseModuleAdmin::setData($data);
			return baseModuleAdmin::doData();
		}
 public static function getAllowedTplMacroses()
 {
     if (defined('XML_MACROSES_DISABLE') && XML_MACROSES_DISABLE) {
         return mainConfiguration::getInstance()->get('kernel', 'xml-macroses.allowed');
     } else {
         return null;
     }
 }
Esempio n. 13
0
 public function main()
 {
     $regedit = regedit::getInstance();
     $config = mainConfiguration::getInstance();
     include_once 'timezones.php';
     $timezones['value'] = $config->get("system", "time-zone");
     $params = array("globals" => array("string:keycode" => NULL, "boolean:chache_browser" => NULL, "boolean:disable_url_autocorrection" => NULL, "boolean:disable_captcha" => NULL, "int:max_img_filesize" => NULL, "status:upload_max_filesize" => NULL, "boolean:allow-alt-name-with-module-collision" => NULL, "boolean:allow-redirects-watch" => NULL, "int:session_lifetime" => NULL, "status:busy_quota_files_and_images" => NULL, "int:quota_files_and_images" => NULL, "boolean:search_morph_disabled" => NULL, "boolean:disable_too_many_childs_notification" => NULL, 'select:timezones' => NULL));
     $upload_max_filesize = cmsController::getInstance()->getModule('data')->getAllowedMaxFileSize();
     $mode = getRequest("param0");
     if ($mode == "do") {
         $params = $this->expectParams($params);
         $regedit->setVar("//settings/chache_browser", $params['globals']['boolean:chache_browser']);
         $regedit->setVar("//settings/keycode", $params['globals']['string:keycode']);
         $regedit->setVar("//settings/disable_url_autocorrection", $params['globals']['boolean:disable_url_autocorrection']);
         $config->set('anti-spam', 'captcha.enabled', !$params['globals']['boolean:disable_captcha']);
         $maxImgFilesize = $params['globals']['int:max_img_filesize'];
         if ($maxImgFilesize <= 0 || $maxImgFilesize > $upload_max_filesize) {
             $maxImgFilesize = $upload_max_filesize;
         }
         $regedit->setVar("//settings/max_img_filesize", $maxImgFilesize);
         $config->set('kernel', 'ignore-module-names-overwrite', $params['globals']['boolean:allow-alt-name-with-module-collision']);
         $config->set('seo', 'watch-redirects-history', $params['globals']['boolean:allow-redirects-watch']);
         $config->set("system", "session-lifetime", $params['globals']['int:session_lifetime']);
         $quota = (int) $params['globals']['int:quota_files_and_images'];
         if ($quota < 0) {
             $quota = 0;
         }
         $config->set("system", "quota-files-and-images", $quota * 1024 * 1024);
         $config->set("system", "search-morph-disabled", $params['globals']['boolean:search_morph_disabled']);
         $config->set("system", "disable-too-many-childs-notification", $params['globals']['boolean:disable_too_many_childs_notification']);
         $config->set("system", "time-zone", $params['globals']['select:timezones']);
         $this->chooseRedirect();
     }
     $params['globals']['boolean:chache_browser'] = $regedit->getVal("//settings/chache_browser");
     $params['globals']['string:keycode'] = $regedit->getVal("//settings/keycode");
     $params['globals']['boolean:disable_url_autocorrection'] = $regedit->getVal("//settings/disable_url_autocorrection");
     $params['globals']['boolean:disable_captcha'] = !$config->get('anti-spam', 'captcha.enabled');
     $params['globals']['status:upload_max_filesize'] = $upload_max_filesize;
     $max_img_filesize = $regedit->getVal("//settings/max_img_filesize");
     $params['globals']['int:max_img_filesize'] = $max_img_filesize ? $max_img_filesize : $upload_max_filesize;
     $params['globals']['boolean:allow-alt-name-with-module-collision'] = $config->get('kernel', 'ignore-module-names-overwrite');
     $params['globals']['boolean:allow-redirects-watch'] = $config->get('seo', 'watch-redirects-history');
     $params['globals']['status:busy_quota_files_and_images'] = ceil(getBusyDiskSize() / (1024 * 1024));
     $params['globals']['int:quota_files_and_images'] = (int) (getBytesFromString($config->get('system', 'quota-files-and-images')) / (1024 * 1024));
     $params['globals']['int:session_lifetime'] = $config->get('system', 'session-lifetime');
     $params['globals']['boolean:search_morph_disabled'] = $config->get('system', 'search-morph-disabled');
     $params['globals']['boolean:disable_too_many_childs_notification'] = $config->get('system', 'disable-too-many-childs-notification');
     $params['globals']['select:timezones'] = $timezones;
     $this->setDataType("settings");
     $this->setActionType("modify");
     if (is_demo()) {
         unset($params["globals"]['string:keycode']);
     }
     $data = $this->prepareData($params, "settings");
     $this->setData($data);
     return $this->doData();
 }
Esempio n. 14
0
 public function __construct()
 {
     $v8b1dc169bf460ee884fceef66c6607d6 = cmsController::getInstance();
     $v2245023265ae4cf87d02c8b6ba991139 = mainConfiguration::getInstance();
     $va1f3f985f72b398ceb0cf19b2c85aeee = 'http://' . $v8b1dc169bf460ee884fceef66c6607d6->getCurrentDomain()->getHost() . '/';
     $vc9ff119073ea2567730fb42e3a4fe805 = (string) $v2245023265ae4cf87d02c8b6ba991139->get('anti-spam', 'akisment.wp-api-key');
     if (!$vc9ff119073ea2567730fb42e3a4fe805) {
         throw new coreException("Specify [anti-spam] akisment.wp-api-key in config.ini");
     }
     $this->doer = new Akismet($va1f3f985f72b398ceb0cf19b2c85aeee, $vc9ff119073ea2567730fb42e3a4fe805);
 }
Esempio n. 15
0
 public function cleanup($v9a0364b9e99bb480dd25e1f0284c8555)
 {
     $v41275a535677f79ff347e01bc530c176 = permissionsCollection::getInstance();
     $v2245023265ae4cf87d02c8b6ba991139 = mainConfiguration::getInstance();
     if (!$v41275a535677f79ff347e01bc530c176->isAdmin() && (int) $v2245023265ae4cf87d02c8b6ba991139->get('system', 'clean-eip-attributes')) {
         $v9a0364b9e99bb480dd25e1f0284c8555 = $this->cleanEIPAttributes($v9a0364b9e99bb480dd25e1f0284c8555);
     }
     if (!intval($v2245023265ae4cf87d02c8b6ba991139->get("kernel", "show-broken-macro"))) {
         $v9a0364b9e99bb480dd25e1f0284c8555 = $this->cleanBrokenMacro($v9a0364b9e99bb480dd25e1f0284c8555);
     }
     return $v9a0364b9e99bb480dd25e1f0284c8555;
 }
Esempio n. 16
0
 public function process($template = null)
 {
     $this->order->order();
     $currency = strtoupper(mainConfiguration::getInstance()->get('system', 'default-currency'));
     $amount = number_format($this->order->getActualPrice(), 2, '.', '');
     $orderId = $this->order->getId();
     $mnt_ubrir_id = $this->object->mnt_ubrir_id;
     $mnt_secret_key = $this->object->mnt_secret_key;
     $mnt_uni_id = $this->object->mnt_uni_id;
     $mnt_uni_login = $this->object->mnt_uni_login;
     $mnt_uni_pass = $this->object->mnt_uni_pass;
     $mnt_uni_emp = $this->object->mnt_uni_emp;
     $mnt_two = $this->object->mnt_two;
     $cmsController = cmsController::getInstance();
     $answerUrl = 'http://' . $cmsController->getCurrentDomain()->getHost() . "/emarket/gateway/" . $this->order->getId() . '/';
     $failUrl = 'http://' . $cmsController->getCurrentDomain()->getHost() . '/emarket/purchase/result/fail/';
     $successUrl = 'http://' . $cmsController->getCurrentDomain()->getHost() . '/emarket/purchase/result/successful/';
     if (is_array($mnt_ubrir_id)) {
         $mnt_ubrir_id = $mnt_ubrir_id[0];
     }
     if (is_array($mnt_secret_key)) {
         $mnt_secret_key = $mnt_secret_key[0];
     }
     $bankHandler = new Ubrir(array('shopId' => $mnt_ubrir_id, 'order_id' => $orderId, 'sert' => $mnt_secret_key, 'amount' => $amount, 'approve_url' => $answerUrl, 'cancel_url' => $failUrl, 'decline_url' => $failUrl));
     $response_order = $bankHandler->prepare_to_pay();
     $new_order_twpg = l_mysql_query('INSERT INTO `umi_twpg` (`umi_id`, `twpg_id`, `session_id`) VALUES ("' . $orderId . '", "' . $response_order->OrderID[0] . '", "' . $response_order->SessionID[0] . '")');
     $param = array();
     if (is_array($mnt_uni_id)) {
         $mnt_uni_id = $mnt_uni_id[0];
     }
     //if(is_array($mnt_uni_login))
     if (is_array($mnt_uni_pass)) {
         $mnt_uni_pass = $mnt_uni_pass[0];
     }
     //var_dump($mnt_uni_login); die;
     $param['sign'] = strtoupper(md5(md5($mnt_uni_id) . '&' . md5($mnt_uni_login) . '&' . md5($mnt_uni_pass) . '&' . md5($orderId) . '&' . md5($amount)));
     $param['twpg_url'] = $response_order->URL[0] . '?orderid=' . $response_order->OrderID[0] . '&sessionid=' . $response_order->SessionID[0];
     $param['uni_id'] = $mnt_uni_id;
     $param['uni_login'] = $mnt_uni_login;
     $param['amount'] = $amount;
     $param['order_id'] = $orderId;
     $param['urlno'] = $failUrl;
     $param['urlok'] = $successUrl;
     if ($mnt_two == 1) {
         $param['uni_submit'] = ' <INPUT TYPE="button" onclick="document.forms.uniteller.submit()" value="Оплатить MasterCard">';
     } else {
         $param['uni_submit'] = '';
     }
     $this->order->setPaymentStatus('initialized');
     list($templateString) = def_module::loadTemplates("tpls/emarket/payment/ubrir/ubrir.tpl", "form_block");
     return def_module::parseTemplate($templateString, $param);
 }
Esempio n. 17
0
 public function getTranslatorSettings()
 {
     $cfg = mainConfiguration::getInstance();
     $arr_settings = $cfg->getList('modules');
     $translator_settings = array();
     for ($i = 0; $i < count($arr_settings); $i++) {
         $key = $arr_settings[$i];
         if (strpos($key, 'exchange.translator') !== false) {
             $translator_settings[] = array('attribute:key' => $key, 'node:value' => $cfg->get('modules', $key));
         }
     }
     return array('subnodes:settings' => $translator_settings);
 }
Esempio n. 18
0
function check_autothumbs_bytes($dirs)
{
    $max_size = getBytesFromString(mainConfiguration::getInstance()->get("system", "quota-files-and-images"));
    if ($max_size != 0) {
        $busy_size = 0;
        foreach ($dirs as $dir) {
            $busy_size += getDirSize($dir);
        }
        if ($busy_size >= $max_size) {
            header('Status: 404 Not Found', true, 404);
            header('HTTP/1.0 404 Not Found', true, 404);
            exit;
        }
    }
}
Esempio n. 19
0
 public function __construct()
 {
     parent::__construct();
     $cmsController = cmsController::getInstance();
     $config = mainConfiguration::getInstance();
     if ($cmsController->getCurrentMode() == 'admin') {
         $commonTabs = $this->getCommonTabs();
         if ($commonTabs) {
             $commonTabs->add('config');
             $commonTabs->add('backup_copies');
         }
     }
     $this->__loadLib("__admin.php");
     $this->__implement("__backup");
 }
Esempio n. 20
0
		public function process($template = null) {
			$this->order->order();
			$currency = strtoupper( mainConfiguration::getInstance()->get('system', 'default-currency') );
			$amount = number_format($this->order->getActualPrice(), 2, '.', '');
			$param = array();
			$param["formAction"] = "https://rbkmoney.ru/acceptpurchase.aspx";
			$param["eshopId"] = $this->object->eshopId;
			$param["orderId"] = $this->order->id;
			$param["recipientAmount"] = $amount;
			$param["recipientCurrency"] = $currency;
			$param["version"] = "2"; // May be 1 or 2, see documentation
			$this->order->setPaymentStatus('initialized');
			list($templateString) = def_module::loadTemplates("emarket/payment/rbk/".$template, "form_block");
			return def_module::parseTemplate($templateString, $param);
		}
 public static function includeClass($vcd3fff114c1e7ae001e9f0e995a21bc7, $v6f65638723a69dfa99474478b83b7b17)
 {
     static $v99f78c54130e752954404fff0707dcbd = array();
     if (in_array($vcd3fff114c1e7ae001e9f0e995a21bc7 . $v6f65638723a69dfa99474478b83b7b17, $v99f78c54130e752954404fff0707dcbd)) {
         return;
     } else {
         $v99f78c54130e752954404fff0707dcbd[] = $vcd3fff114c1e7ae001e9f0e995a21bc7 . $v6f65638723a69dfa99474478b83b7b17;
     }
     $v2245023265ae4cf87d02c8b6ba991139 = mainConfiguration::getInstance();
     $v47826cacc65c665212b821e6ff80b9b0 = $v2245023265ae4cf87d02c8b6ba991139->includeParam('system.default-module') . $vcd3fff114c1e7ae001e9f0e995a21bc7 . $v6f65638723a69dfa99474478b83b7b17 . '.php';
     if (is_file($v47826cacc65c665212b821e6ff80b9b0) == false) {
         throw new coreException("Required source file {$v47826cacc65c665212b821e6ff80b9b0} is not found");
     }
     require $v47826cacc65c665212b821e6ff80b9b0;
 }
 public static function checkForSpam($v7552cd149af7495ee7d8225974e50f80, $v5180805afcdc53d067cf7c6b96c68c9d = 'content')
 {
     $vcda4cbf02569e4ebcf42d8adc923a52c = false;
     $vaaabf0d39951f3e6c3e8a7911df524c2 = antiSpamService::get();
     $v8e2dcfd7e7e24b1ca76c1193f645902b = umiHierarchy::getInstance()->getElement($v7552cd149af7495ee7d8225974e50f80);
     if ($vaaabf0d39951f3e6c3e8a7911df524c2 && $v8e2dcfd7e7e24b1ca76c1193f645902b) {
         self::fillFields($vaaabf0d39951f3e6c3e8a7911df524c2, $v8e2dcfd7e7e24b1ca76c1193f645902b, $v5180805afcdc53d067cf7c6b96c68c9d);
         $vcda4cbf02569e4ebcf42d8adc923a52c = $vaaabf0d39951f3e6c3e8a7911df524c2->isSpam();
         $v8e2dcfd7e7e24b1ca76c1193f645902b->setValue('is_spam', $vcda4cbf02569e4ebcf42d8adc923a52c);
         $v2245023265ae4cf87d02c8b6ba991139 = mainConfiguration::getInstance();
         if ((int) $v2245023265ae4cf87d02c8b6ba991139->get('anti-spam', 'hide-spam')) {
             $v8e2dcfd7e7e24b1ca76c1193f645902b->setIsActive(!$vcda4cbf02569e4ebcf42d8adc923a52c);
         }
     }
     return $vcda4cbf02569e4ebcf42d8adc923a52c;
 }
Esempio n. 23
0
 public function import_do()
 {
     $this->setDataType("list");
     $this->setActionType("view");
     $id = getRequest('param0');
     $objects = umiObjectsCollection::getInstance();
     $settings = $objects->getObject($id);
     if (!$settings instanceof umiObject) {
         throw new publicException(getLabel("exchange-err-settings_notfound"));
     }
     $importFile = $settings->file;
     if (!$importFile instanceof umiFile || $importFile->getIsBroken()) {
         throw new publicException(getLabel("exchange-err-importfile"));
     }
     $format_id = $settings->format;
     $importFormat = $objects->getObject($format_id);
     if (!$importFormat instanceof umiObject) {
         throw new publicException(getLabel("exchange-err-format_undefined"));
     }
     $suffix = $importFormat->sid;
     $import_offset = (int) getSession("import_offset_" . $id);
     $blockSize = mainConfiguration::getInstance()->get("modules", "exchange.splitter.limit") ? mainConfiguration::getInstance()->get("modules", "exchange.splitter.limit") : 25;
     $splitter = umiImportSplitter::get($suffix);
     $splitter->load($importFile->getFilePath(), $blockSize, $import_offset);
     $doc = $splitter->getDocument();
     $dump = $splitter->translate($doc);
     $oldIgnoreSiteMap = umiHierarchy::$ignoreSiteMap;
     umiHierarchy::$ignoreSiteMap = true;
     $importer = new xmlImporter();
     $importer->loadXmlString($dump);
     $elements = $settings->elements;
     if (is_array($elements) && count($elements)) {
         $importer->setDestinationElement($elements[0]);
     }
     $importer->setIgnoreParentGroups($splitter->ignoreParentGroups);
     $importer->setAutoGuideCreation($splitter->autoGuideCreation);
     $importer->setRenameFiles($splitter->getRenameFiles());
     $importer->execute();
     umiHierarchy::$ignoreSiteMap = $oldIgnoreSiteMap;
     $_SESSION["import_offset_" . $id] = $splitter->getOffset();
     if ($splitter->getIsComplete()) {
         unset($_SESSION["import_offset_" . $id]);
     }
     $data = array("attribute:complete" => (int) $splitter->getIsComplete(), "attribute:created" => $importer->created_elements, "attribute:updated" => $importer->updated_elements, "attribute:deleted" => $importer->deleted_elements, "attribute:errors" => $importer->import_errors, "nodes:log" => $importer->getImportLog());
     $this->setData($data);
     return $this->doData();
 }
Esempio n. 24
0
		public function onCronSyncCurrency(iUmiEventPoint $event) {
			$regedit = regedit::getInstance();
			if(!$regedit->getVal('//modules/emarket/enable-currency')) return false;
			
			$config = mainConfiguration::getInstance();
			$sourceUrl = $config->get('modules', 'emarket.currency.sync.source');
			$xslPath = CURRENT_WORKING_DIR .'/xsl/currencies/' . $config->get('modules', 'emarket.currency.sync.xsl');
			
			$originalXml = umiRemoteFileGetter::get($sourceUrl);
			if(function_exists('mb_detect_encoding') && (mb_detect_encoding($originalXml, "UTF-8, ISO-8859-1, GBK, CP1251") != "UTF-8")) {
				$originalXml = iconv ("CP1251", "UTF-8", $originalXml);
				$originalXml = preg_replace("/(encoding=\"windows-1251\")/i", "encoding=\"UTF-8\"", $originalXml);
			}
			
			$xslt = new xsltProcessor;
			$dom = new DomDocument();
			$dom->loadXML($originalXml);
			$xslt->importStyleSheet(DomDocument::load($xslPath));
			$resultXml = $xslt->transformToXML($dom);
			$tmpPath = SYS_CACHE_RUNTIME . 'tmpcurrencies.xml';
			file_put_contents($tmpPath, $resultXml);
			
			$currenciesList = new baseXmlConfig($tmpPath);
			$currencies = $currenciesList->getList('/Exchange/Exchange_Rates', array (
				'code'		=> '/New_Country',
				'rate'		=> '/Rate',
				'nominal'	=> '/Nominal'
			));
			
			foreach($currencies as $currencyInfo) {
				$code = getArrayKey($currencyInfo, 'code');
				
				try {
					if($currency = $this->getCurrency($code)) {
						$currency->nominal = getArrayKey($currencyInfo, 'nominal');
						$currency->rate = getArrayKey($currencyInfo, 'rate');
						$currency->commit();
					}
				} catch(privateException $e) {}
			}
			
			unlink($tmpPath);
		}
Esempio n. 25
0
 public static function upload($veeeb23fbd23e52a6a6ff78b9f18cbc4e, $v86536e21993c5a96a4d4c9c9afcc9b17, $vb2ed5fc91c9760886b14c955ac6c82d7, $vb80bb7740288fda1f201890375a60c8f = false)
 {
     self::$class_name = __CLASS__;
     $v6a2a431fe8b621037ea949531c28551d = parent::upload($veeeb23fbd23e52a6a6ff78b9f18cbc4e, $v86536e21993c5a96a4d4c9c9afcc9b17, $vb2ed5fc91c9760886b14c955ac6c82d7, $vb80bb7740288fda1f201890375a60c8f);
     $vb1444fb0c07653567ad325aa25d4e37a = regedit::getInstance();
     $ve6a7ab42343e8bc9131d89646abcb773 = (int) $vb1444fb0c07653567ad325aa25d4e37a->getVal("//settings/max_img_filesize");
     $v79001f389eb5f5185f6945430cb57be1 = (int) ini_get("upload_max_filesize");
     $ve6a7ab42343e8bc9131d89646abcb773 = $ve6a7ab42343e8bc9131d89646abcb773 < $v79001f389eb5f5185f6945430cb57be1 ? $ve6a7ab42343e8bc9131d89646abcb773 : $v79001f389eb5f5185f6945430cb57be1;
     $v11b4278c7e5a79003db77272c1ed2cf5 = (int) filesize("." . $v6a2a431fe8b621037ea949531c28551d);
     $ve6a7ab42343e8bc9131d89646abcb773 = (int) $ve6a7ab42343e8bc9131d89646abcb773 * 1024 * 1024;
     if ($ve6a7ab42343e8bc9131d89646abcb773 > 0) {
         if ($ve6a7ab42343e8bc9131d89646abcb773 < $v11b4278c7e5a79003db77272c1ed2cf5) {
             unlink("." . $v6a2a431fe8b621037ea949531c28551d);
             return false;
         }
     }
     $vcaf9b6b99962bf5c2264824231d7a40c = @getimagesize("." . $v6a2a431fe8b621037ea949531c28551d);
     if (!is_array($vcaf9b6b99962bf5c2264824231d7a40c)) {
         @unlink("." . $v6a2a431fe8b621037ea949531c28551d);
         return false;
     }
     $vf9a3266ad8c9b1c7135d1e0d787fe91b = (bool) mainConfiguration::getInstance()->get("kernel", "jpg-through-gd");
     if ($vf9a3266ad8c9b1c7135d1e0d787fe91b) {
         list(, , $v566bbee0f961ad71b54c3c2fd36db053) = array_values(getPathInfo("." . $v6a2a431fe8b621037ea949531c28551d));
         $v566bbee0f961ad71b54c3c2fd36db053 = strtolower($v566bbee0f961ad71b54c3c2fd36db053);
         if ($v566bbee0f961ad71b54c3c2fd36db053 == 'jpg' || $v566bbee0f961ad71b54c3c2fd36db053 == 'jpeg') {
             $v9b207167e5381c47682c6b4f58a623fb = imagecreatefromjpeg("." . $v6a2a431fe8b621037ea949531c28551d);
             if ($v9b207167e5381c47682c6b4f58a623fb) {
                 imagejpeg($v9b207167e5381c47682c6b4f58a623fb, "." . $v6a2a431fe8b621037ea949531c28551d, 100);
                 imagedestroy($v9b207167e5381c47682c6b4f58a623fb);
             } else {
                 return false;
             }
         }
     }
     if (self::$useWatermark) {
         self::addWatermark("./" . $v6a2a431fe8b621037ea949531c28551d);
     }
     self::setWatermarkOff();
     return $v6a2a431fe8b621037ea949531c28551d;
 }
Esempio n. 26
0
 public function __construct()
 {
     parent::__construct();
     $cmsController = cmsController::getInstance();
     $config = mainConfiguration::getInstance();
     if ($cmsController->getCurrentMode() == 'admin') {
         $commonTabs = $this->getCommonTabs();
         if ($commonTabs) {
             $commonTabs->add('main');
             $commonTabs->add('modules');
             $commonTabs->add('langs');
             $commonTabs->add('domains', array('domain_mirrows'));
             $commonTabs->add('mails');
             $commonTabs->add('cache');
             $commonTabs->add('security');
             $commonTabs->add('watermark');
         }
         $this->__loadLib("__admin.php");
         $this->__implement("__config");
         $this->__loadLib("__cache.php");
         $this->__implement("__cache_config");
         $this->__loadLib("__security.php");
         $this->__implement("__security_config");
         $this->__loadLib("__mails.php");
         $this->__implement("__mails_config");
         $this->__loadLib("__langs.php");
         $this->__implement("__langs_config");
         $this->__loadLib("__watermark.php");
         $this->__implement("__watermark_config");
         $this->__loadLib("__branching.php");
         $this->__implement("__branching_config");
         $this->__loadLib("__domains.php");
         $this->__implement("__domains_config");
         $this->__loadLib("__custom_adm.php");
         $this->__implement("__custom_adm");
     }
     if ($config->get('messages', 'catch-system-events')) {
         $this->__loadLib("__mess_events.php");
         $this->__implement("__events_config");
     }
 }
 public static function get()
 {
     $v2245023265ae4cf87d02c8b6ba991139 = mainConfiguration::getInstance();
     if ((int) $v2245023265ae4cf87d02c8b6ba991139->get('anti-spam', 'service.enabled')) {
         $v0f096338b64a1d1b348b86df38313c01 = $v2245023265ae4cf87d02c8b6ba991139->get('anti-spam', 'service.name');
         $vcd3fff114c1e7ae001e9f0e995a21bc7 = SYS_KERNEL_PATH . 'utils/antispam/services/' . $v0f096338b64a1d1b348b86df38313c01 . '.php';
         $v6f66e878c62db60568a3487869695820 = $v0f096338b64a1d1b348b86df38313c01 . 'AntiSpamService';
         if (!is_file($vcd3fff114c1e7ae001e9f0e995a21bc7)) {
             throw new coreException("Antispam service \"{$v0f096338b64a1d1b348b86df38313c01}\" file not found in \"{$vcd3fff114c1e7ae001e9f0e995a21bc7}\"");
         }
         require_once $vcd3fff114c1e7ae001e9f0e995a21bc7;
         if (class_exists($v6f66e878c62db60568a3487869695820) == false) {
             throw new coreException("Antispam service class \"{$v6f66e878c62db60568a3487869695820}\" not found");
         }
         $vaaabf0d39951f3e6c3e8a7911df524c2 = new $v6f66e878c62db60568a3487869695820();
         if ($vaaabf0d39951f3e6c3e8a7911df524c2 instanceof antiSpamService == false) {
             throw new coreException("Class \"{$v6f66e878c62db60568a3487869695820}\" must be instance of antiSpamService class");
         }
         return $vaaabf0d39951f3e6c3e8a7911df524c2;
     }
     return false;
 }
Esempio n. 28
0
    public function process($template = null)
    {
        $currency = strtoupper(mainConfiguration::getInstance()->get('system', 'default-currency'));
        if ($currency == 'RUR') {
            $currency = 'RUB';
        }
        list($templateString, $modeItem) = def_module::loadTemplates("emarket/payment/dengionline/" . $template, 'form_block', 'mode_type_item');
        $modeTypeItems = array();
        $xml = '<request>
				<action>get_project_paymodes</action>
				<projectId>' . $this->object->project . '</projectId>
			</request>';
        $headers = array("Content-type" => "application/x-www-form-urlencoded");
        $paymentsXML = umiRemoteFileGetter::get('http://www.onlinedengi.ru/dev/xmltalk.php', false, $headers, array('xml' => $xml));
        $dom = new DOMDocument('1.0', 'utf-8');
        $dom->loadXML($paymentsXML);
        if ($dom->getElementsByTagName('paymentMode')->length) {
            foreach ($dom->getElementsByTagName('paymentMode') as $payment) {
                $modeTypeItems[] = def_module::parseTemplate($modeItem, array('id' => $payment->getAttribute('id'), 'label' => $payment->getAttribute('title'), 'banner' => $payment->getAttribute('banner')));
            }
        }
        $order = $this->order;
        $order->order();
        $orderId = $order->getId();
        $param = array();
        $param['formAction'] = "http://www.onlinedengi.ru/wmpaycheck.php?priznak=UMI";
        $param['project'] = $this->object->project;
        // Задаётся пользователем в настройках магазина, поле "ID проекта"
        $param['amount'] = $order->getActualPrice();
        $param['nickname'] = $orderId;
        $param['order_id'] = $orderId;
        $param['source'] = $this->object->source;
        // Задаётся пользователем в настройках магазина, поле "Source (если есть)"
        $param['comment'] = "Payment for order " . $orderId;
        $param['paymentCurrency'] = $currency;
        $param['subnodes:items'] = $param['void:mode_type_list'] = $modeTypeItems;
        $order->setPaymentStatus('initialized');
        return def_module::parseTemplate($templateString, $param);
    }
Esempio n. 29
0
 public static function getDrawer()
 {
     static $v062fa598b0c2852221e15e2085f0959a = null;
     if (!is_null($v062fa598b0c2852221e15e2085f0959a)) {
         return $v062fa598b0c2852221e15e2085f0959a;
     }
     $v2245023265ae4cf87d02c8b6ba991139 = mainConfiguration::getInstance();
     $v66941754547f94a40384649db36113e0 = $v2245023265ae4cf87d02c8b6ba991139->get('anti-spam', 'captcha.drawer');
     if (!$v66941754547f94a40384649db36113e0) {
         $v66941754547f94a40384649db36113e0 = 'default';
     }
     $vd6fe1d0be6347b8ef2427fa629c04485 = CURRENT_WORKING_DIR . '/classes/system/utils/captcha/drawers/' . $v66941754547f94a40384649db36113e0 . '.php';
     if (!is_file($vd6fe1d0be6347b8ef2427fa629c04485)) {
         throw new coreException("Captcha image drawer named \"{$v66941754547f94a40384649db36113e0}\" not found");
     }
     require $vd6fe1d0be6347b8ef2427fa629c04485;
     $v6f66e878c62db60568a3487869695820 = $v66941754547f94a40384649db36113e0 . 'CaptchaDrawer';
     if (class_exists($v6f66e878c62db60568a3487869695820)) {
         return $v062fa598b0c2852221e15e2085f0959a = new $v6f66e878c62db60568a3487869695820();
     } else {
         throw new coreException("Class \"{$v6f66e878c62db60568a3487869695820}\" not found in \"{$vd6fe1d0be6347b8ef2427fa629c04485}\"");
     }
 }
Esempio n. 30
0
 /**
  * Добавляет страницу к списку последних просмотреных страниц
  *
  * @param int $elementId Текущая страница
  * @param string $scope Тэг(группировка страниц)
  *
  * @return null
  */
 public function addRecentPage($elementId, $scope = "default")
 {
     if (!$scope) {
         $scope = "default";
     }
     if ($elementId != cmsController::getInstance()->getCurrentElementId()) {
         return null;
     }
     $limit = mainConfiguration::getInstance()->get("modules", "content.recent-pages.max-items");
     $limit = $limit ? $limit : 100;
     session::getInstance();
     if (!isset($_SESSION['content:recent_pages'])) {
         $_SESSION['content:recent_pages'] = array();
     }
     if (!isset($_SESSION['content:recent_pages'][$scope])) {
         $_SESSION['content:recent_pages'][$scope] = array();
     }
     $_SESSION['content:recent_pages'][$scope][$elementId] = time();
     asort($_SESSION['content:recent_pages'][$scope]);
     $_SESSION['content:recent_pages'][$scope] = array_reverse($_SESSION['content:recent_pages'][$scope], true);
     $_SESSION['content:recent_pages'][$scope] = array_slice($_SESSION['content:recent_pages'][$scope], 0, $limit, true);
     return null;
 }