Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by deZender.Net
- * @ deZender (PHP5 Decoder for ionCube Loader)
- *
- * @ Version : 2.0.0.4
- * @ Author : DeZender
- * @ Release on : 21.10.2015
- * @ Official site : http://DeZender.Net
- *
- */
- class Evirtual_Xautoimport_Helper_Data extends Mage_Core_Helper_Abstract {
- protected $array = array();
- protected $subarray = array();
- protected $categoryarray = array();
- protected $_CollectionProducts = array();
- protected $_productArray = array();
- public $_helperProductArray = array();
- protected $_tmpArray = array();
- protected $_oldRootFieldMapping = null;
- protected $_oldSRootFieldMapping = null;
- public function licenseCheck($key) {
- $domain = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
- $domainName = $this->getDomain($domain);
- $options = array("location" => "http://development4magento.com/dev/xautoimportlicense/license.php", "uri" => "http://development4magento.com/dev/xautoimportlicense/", "soap_version" => SOAP_1_2);
- $client = new SoapClient(null, $options);
- $result = $client->checkLicense($domainName, $key);
- if ($result == "Valid")
- {
- $Switch = new Mage_Core_Model_Config();
- $Switch->saveConfig("evirtual_xautoimport/general/enable", "1", "default", 1);
- $Switch->saveConfig("evirtual_xautoimport/general/status", $result, "default", $result);
- return null;
- }
- $Switch = new Mage_Core_Model_Config();
- $Switch->saveConfig("evirtual_xautoimport/general/status", $result, "default", $result);
- return;
- }
- public function globlelicenseCheck($key) {
- $domain = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
- $domainName = $this->getDomain($domain);
- $options = array("location" => "http://development4magento.com/dev/xautoimportlicense/license.php", "uri" => "http://development4magento.com/dev/xautoimportlicense/", "soap_version" => SOAP_1_2);
- $client = new SoapClient(null, $options);
- $result = $client->checkLicense($domainName, $key);
- return $result;
- }
- protected function getDomain($url) {
- $pieces = parse_url($url);
- return $pieces["host"] . $pieces["path"];
- }
- public function convertOptions($options) {
- $converted = array();
- foreach ($options as $option)
- {
- if ((isset($option["value"]) && !is_array($option["value"]) && isset($option["label"]) && !is_array($option["label"])))
- {
- $converted[$option["value"]] = $option["label"];
- continue;
- }
- continue;
- }
- return $converted;
- }
- public function keycasechange($array, $case = CASE_LOWER) {
- $array = array_change_key_case($array, $case);
- foreach ($array as $key => $value)
- {
- if (!is_array($value))
- {
- continue;
- }
- $array[$key] = $this->keycasechange($value, $case);
- continue;
- }
- return $array;
- }
- public function changeKeyHirarchy($array) {
- $this->subarray = array();
- if (is_array($array))
- {
- $this->_changeKeyHirarchy($array);
- }
- Zend_Debug::dump($this->subarray);
- exit();
- return $this->subarray;
- }
- public function _changeKeyHirarchy($child, $parent = "") {
- if (is_array($child))
- {
- foreach ($child as $key => $value)
- {
- if ($parent == "")
- {
- if (!is_int($key) && !is_array($value))
- {
- $this->subarray[$key] = $value;
- continue;
- }
- $this->_changeKeyHirarchy($value, $key);
- continue;
- }
- if (is_array($value))
- {
- if (!is_int($key) && !is_array($value))
- {
- .........................................................................
- ..................................
- ...............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement