• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getArrayKey函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getArrayKey函数的典型用法代码示例。如果您正苦于以下问题:PHP getArrayKey函数的具体用法?PHP getArrayKey怎么用?PHP getArrayKey使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了getArrayKey函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: stream_open

 public function stream_open($vd6fe1d0be6347b8ef2427fa629c04485, $v15d61712450a686a7f365adf4fef581f, $v93da65a9fd0004d9477aeac024e08e15, $v6385a5865e0b96f09e4142ab2d9e3736)
 {
     $vb99eb979e6f6efabc396f777b503f7e7 = cacheFrontend::getInstance();
     if ($v8d777f385d3dfec8815d20f7496026dc = $vb99eb979e6f6efabc396f777b503f7e7->loadData($vd6fe1d0be6347b8ef2427fa629c04485)) {
         return $this->setData($v8d777f385d3dfec8815d20f7496026dc);
     }
     $v264a818e305e0550c3ee63761dd3d911 = $this->parsePath($vd6fe1d0be6347b8ef2427fa629c04485);
     try {
         if (!is_array($v8d777f385d3dfec8815d20f7496026dc)) {
             $v8d777f385d3dfec8815d20f7496026dc = $this->executeMacros($v264a818e305e0550c3ee63761dd3d911);
             if ($v8d777f385d3dfec8815d20f7496026dc === false) {
                 $v8d777f385d3dfec8815d20f7496026dc = array('error' => array('attribute:code' => 'require-more-permissions', 'node:message' => getLabel('error-require-more-permissions')));
             }
         }
     } catch (publicException $ve1671797c52e15f763380b45e841ec32) {
         $vcb5e100e5a9a3e7f6d1fd97512215282 = array();
         if ($v8e95bd427d65fbeeedb980f640074ea2 = $ve1671797c52e15f763380b45e841ec32->getCode()) {
             $vcb5e100e5a9a3e7f6d1fd97512215282['attribute:code'] = $v8e95bd427d65fbeeedb980f640074ea2;
         }
         if ($v1634f20805d929bd08a1f418a78c0615 = $ve1671797c52e15f763380b45e841ec32->getStrCode()) {
             $vcb5e100e5a9a3e7f6d1fd97512215282['attribute:str-code'] = $v1634f20805d929bd08a1f418a78c0615;
         }
         $vcb5e100e5a9a3e7f6d1fd97512215282['node:message'] = $ve1671797c52e15f763380b45e841ec32->getMessage();
         $v8d777f385d3dfec8815d20f7496026dc = array("error" => $vcb5e100e5a9a3e7f6d1fd97512215282);
     }
     if ($v8d777f385d3dfec8815d20f7496026dc === false) {
         return true;
     } else {
         $v8d777f385d3dfec8815d20f7496026dc = $this->translateToXml(getArrayKey($v264a818e305e0550c3ee63761dd3d911, 'module'), getArrayKey($v264a818e305e0550c3ee63761dd3d911, 'method'), $v8d777f385d3dfec8815d20f7496026dc);
         if ($this->expire) {
             $vb99eb979e6f6efabc396f777b503f7e7->saveData($vd6fe1d0be6347b8ef2427fa629c04485, $v8d777f385d3dfec8815d20f7496026dc, $this->expire);
         }
         return $this->setData($v8d777f385d3dfec8815d20f7496026dc);
     }
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:35,代码来源:udataStream.php


示例2: onModifyObject

		public function onModifyObject(iUmiEventPoint $event) {
			static $modifiedCache = array();
			$object = $event->getRef("object");
			$typeId = umiObjectTypesCollection::getInstance()->getBaseType('emarket', 'order');
			if($object->getTypeId() != $typeId) return;
			if($event->getMode() == "before") {
				$data = getRequest("data");
				$id   = $object->getId();
				$newOrderStatus    = getArrayKey($data[$id], 'status_id');
				$newPaymentStatus  = getArrayKey($data[$id], 'payment_status_id');
				$newDeliveryStatus = getArrayKey($data[$id], 'delivery_status_id');
				switch(true) {
				   case ($newOrderStatus != $object->getValue("status_id") ) : $modifiedCache[$object->getId()] = "status_id"; break;
				   case ($newDeliveryStatus != $object->getValue("delivery_status_id")) : $modifiedCache[$object->getId()] = "delivery_status_id"; break;
				   case ($newPaymentStatus != $object->getValue("payment_status_id") ) : $modifiedCache[$object->getId()] = "payment_status_id"; break;				   
				}
			} else {
				if(isset($modifiedCache[$object->getId()])) {
					if ($modifiedCache[$object->getId()] == 'payment_status_id' && $object->getValue("payment_status_id") == order::getStatusByCode('accepted', 'order_payment_status')) {
						self::addBonus($object->getId());
					}
					if ($modifiedCache[$object->getId()] == 'status_id' && ($object->getValue("status_id") == order::getStatusByCode('canceled') || $object->getValue("status_id") == order::getStatusByCode('rejected'))) {
						self::returnBonus($object->getId());
					}
					$this->notifyOrderStatusChange(order::get($object->getId()), $modifiedCache[$object->getId()]);
				}
			}
		}
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:28,代码来源:__events.php


示例3: stream_open

 public function stream_open($vd6fe1d0be6347b8ef2427fa629c04485, $v15d61712450a686a7f365adf4fef581f, $v93da65a9fd0004d9477aeac024e08e15, $v6385a5865e0b96f09e4142ab2d9e3736)
 {
     $vb99eb979e6f6efabc396f777b503f7e7 = cacheFrontend::getInstance();
     if ($v8d777f385d3dfec8815d20f7496026dc = $vb99eb979e6f6efabc396f777b503f7e7->loadData($vd6fe1d0be6347b8ef2427fa629c04485)) {
         return $this->setData($v8d777f385d3dfec8815d20f7496026dc);
     }
     $vaf31437ce61345f416579830a98c91e5 = $this->parsePath($vd6fe1d0be6347b8ef2427fa629c04485);
     $va8cfde6331bd59eb2ac96f8911c4b666 = umiObjectsCollection::getInstance()->getObject($vaf31437ce61345f416579830a98c91e5);
     if ($va8cfde6331bd59eb2ac96f8911c4b666 instanceof iUmiObject) {
         if (is_null($this->prop_name)) {
             $v164d124aa1de584618cde85506eb8cd4 = translatorWrapper::$showEmptyFields;
             if (!is_null(getArrayKey($this->params, 'show-empty'))) {
                 translatorWrapper::$showEmptyFields = true;
             }
             $v8d777f385d3dfec8815d20f7496026dc = $this->translateToXml($va8cfde6331bd59eb2ac96f8911c4b666);
             translatorWrapper::$showEmptyFields = $v164d124aa1de584618cde85506eb8cd4;
         } else {
             $v23a5b8ab834cb5140fa6665622eb6417 = $va8cfde6331bd59eb2ac96f8911c4b666->getPropByName($this->prop_name);
             if ($v23a5b8ab834cb5140fa6665622eb6417 instanceof iUmiObjectProperty) {
                 $v8d777f385d3dfec8815d20f7496026dc = $this->translateToXml($va8cfde6331bd59eb2ac96f8911c4b666, $v23a5b8ab834cb5140fa6665622eb6417);
             } else {
                 return $this->setDataError('not-found');
             }
         }
         if ($this->expire) {
             $vb99eb979e6f6efabc396f777b503f7e7->saveObject($vd6fe1d0be6347b8ef2427fa629c04485, $v8d777f385d3dfec8815d20f7496026dc, $this->expire);
         }
         return $this->setData($v8d777f385d3dfec8815d20f7496026dc);
     } else {
         return $this->setDataError('not-found');
     }
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:32,代码来源:uobjectStream.php


示例4: stream_open

 public function stream_open($vd6fe1d0be6347b8ef2427fa629c04485, $v15d61712450a686a7f365adf4fef581f, $v93da65a9fd0004d9477aeac024e08e15, $v6385a5865e0b96f09e4142ab2d9e3736)
 {
     $vb99eb979e6f6efabc396f777b503f7e7 = cacheFrontend::getInstance();
     if ($v8d777f385d3dfec8815d20f7496026dc = $vb99eb979e6f6efabc396f777b503f7e7->loadData($vd6fe1d0be6347b8ef2427fa629c04485)) {
         return $this->setData($v8d777f385d3dfec8815d20f7496026dc);
     }
     $v7057e8409c7c531a1a6e9ac3df4ed549 = $this->parsePath($vd6fe1d0be6347b8ef2427fa629c04485);
     $v8e2dcfd7e7e24b1ca76c1193f645902b = umiHierarchy::getInstance()->getElement($v7057e8409c7c531a1a6e9ac3df4ed549);
     if ($v8e2dcfd7e7e24b1ca76c1193f645902b instanceof iUmiHierarchyElement) {
         if (is_null($this->prop_name)) {
             $v164d124aa1de584618cde85506eb8cd4 = translatorWrapper::$showEmptyFields;
             if (!is_null(getArrayKey($this->params, 'show-empty'))) {
                 translatorWrapper::$showEmptyFields = true;
             }
             $v8d777f385d3dfec8815d20f7496026dc = $this->translateToXml($v8e2dcfd7e7e24b1ca76c1193f645902b);
             translatorWrapper::$showEmptyFields = $v164d124aa1de584618cde85506eb8cd4;
         } else {
             $v23a5b8ab834cb5140fa6665622eb6417 = $v8e2dcfd7e7e24b1ca76c1193f645902b->getObject()->getPropByName($this->prop_name);
             if ($v23a5b8ab834cb5140fa6665622eb6417 instanceof iUmiObjectProperty) {
                 $v8d777f385d3dfec8815d20f7496026dc = $this->translateToXml($v8e2dcfd7e7e24b1ca76c1193f645902b, $v23a5b8ab834cb5140fa6665622eb6417);
             } else {
                 return $this->setDataError('not-found');
             }
         }
         if ($this->expire) {
             $vb99eb979e6f6efabc396f777b503f7e7->saveData($vd6fe1d0be6347b8ef2427fa629c04485, $v8d777f385d3dfec8815d20f7496026dc, $this->expire);
         }
         return $this->setData($v8d777f385d3dfec8815d20f7496026dc);
     } else {
         return $this->setDataError('not-found');
     }
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:32,代码来源:upageStream.php


示例5: guides

	public function guides() {
		$objectTypes = umiObjectTypesCollection::getInstance();

		if(isset($_REQUEST['search-all-text'][0])) {
			$searchAllText = array_extract_values($_REQUEST['search-all-text']);
			foreach($searchAllText as $i => $v) {
				$searchAllText[$i] = wa_strtolower($v);
			}
		} else {
			$searchAllText = false;
		}

		$rel = umiObjectTypesCollection::getInstance()->getTypeIdByGUID('root-guides-type');
		if(($rels = getRequest('rel')) && sizeof($rels)) {
			$rel = getArrayKey($rels, 0);
		}

		$per_page = getRequest('per_page_limit');
		$curr_page = (int) getRequest('p');

		$types = umiObjectTypesCollection::getInstance();
		$guides_list = $types->getGuidesList(true, $rel);

		$tmp = Array();
		foreach($guides_list as $typeId => $name) {
			if($searchAllText) {
				$match = false;
				foreach($searchAllText as $searchString) {
					if(strstr(wa_strtolower($name), $searchString) !== false) {
						$match = true;
					}
				}
				if(!$match) {
					continue;
				}
			}
			$tmp[$typeId] = $name;
		}

		if(isset($_REQUEST['order_filter']['name'])) {
			natsort($tmp);
			if($_REQUEST['order_filter']['name'] == "desc") {
				$tmp = array_reverse($tmp, true);
			}
		}
		$guides_list = array_keys($tmp);
		unset($tmp);
		$guides_list = $this->excludeNestedTypes($guides_list);

		$total = sizeof($guides_list);
		$guides = array_slice($guides_list, $per_page * $curr_page, $per_page);

		$this->setDataType("list");
		$this->setActionType("view");
		$this->setDataRange($per_page, $curr_page * $per_page);

		$data = $this->prepareData($guides, "types");
		$this->setData($data, $total);
		return $this->doData();
	}
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:60,代码来源:__guides.php


示例6: checkCaptcha

 public static function checkCaptcha()
 {
     $v2245023265ae4cf87d02c8b6ba991139 = mainConfiguration::getInstance();
     if (!$v2245023265ae4cf87d02c8b6ba991139->get('anti-spam', 'captcha.enabled')) {
         return true;
     }
     $v41275a535677f79ff347e01bc530c176 = permissionsCollection::getInstance();
     if ($v41275a535677f79ff347e01bc530c176->isAuth()) {
         return true;
     }
     if (isset($_COOKIE['umi_captcha']) && strlen($_COOKIE['umi_captcha'])) {
         if ($_COOKIE['umi_captcha'] == md5(getArrayKey($_COOKIE, 'user_captcha')) || $_COOKIE['umi_captcha'] == md5(getRequest('captcha'))) {
             $v70b29c4920daf4e51e8175179027e668 = getRequest('captcha');
             if (md5($v70b29c4920daf4e51e8175179027e668) == $_COOKIE['umi_captcha']) {
                 setcookie("user_captcha", $v70b29c4920daf4e51e8175179027e668, time() + 3600 * 24 * 31, "/");
             }
             $_SESSION['is_human'] = 1;
             return true;
         } else {
             unset($_SESSION['is_human']);
             return false;
         }
     }
     return false;
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:25,代码来源:umiCaptcha.php


示例7: applyPriceCurrency

 public function applyPriceCurrency($price = 0, $template = 'default')
 {
     list($tpl_block) = def_module::loadTemplates("emarket/{$template}", 'price_block');
     $price = $this->parsePriceTpl($template, $this->formatCurrencyPrice(array('actual' => $price)));
     $result = array('price' => $price);
     $result['void:price-original'] = getArrayKey($result['price'], 'original');
     $result['void:price-actual'] = getArrayKey($result['price'], 'actual');
     return def_module::parseTemplate($tpl_block, $result);
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:9,代码来源:__currency.php


示例8: basketAdd

 public function basketAdd($itemType = false, $itemId = false)
 {
     $order = $this->getBasketOrder(false);
     $itemType = $itemType ? $itemType : getRequest('param1');
     $itemId = (int) ($itemId ? $itemId : getRequest('param2'));
     $amount = (int) getRequest('amount');
     $options = getRequest('options');
     if ($amount == 0) {
         $amount = 1;
     }
     if ($itemType == 'element') {
         if (is_array($options)) {
             $orderItems = $order->getItems();
             foreach ($orderItems as $tOrderItem) {
                 if (!$tOrderItem instanceof optionedOrderItem) {
                     $itemOptions = null;
                     $tOrderItem = null;
                     continue;
                 }
                 $itemOptions = $tOrderItem->getOptions();
                 if (sizeof($itemOptions) != sizeof($options)) {
                     $itemOptions = null;
                     $tOrderItem = null;
                     continue;
                 }
                 if ($tOrderItem->getItemElement()->id != $itemId) {
                     $itemOptions = null;
                     $tOrderItem = null;
                     continue;
                 }
                 foreach ($options as $optionName => $optionId) {
                     $itemOption = getArrayKey($itemOptions, $optionName);
                     if (getArrayKey($itemOption, 'option-id') != $optionId) {
                         $tOrderItem = null;
                         continue 2;
                     }
                 }
                 break;
             }
             if ($tOrderItem) {
                 $orderItem = $tOrderItem;
                 $itemType = 'item';
                 $itemId = $orderItem->getId();
                 unset($_REQUEST['options']);
             }
         } else {
             $orderItem = $this->getBasketItem($itemId);
         }
     } else {
         $orderItem = $order->getItem($itemId);
     }
     if ($orderItem instanceof orderItem) {
         $_REQUEST['amount'] = $orderItem->getAmount() + $amount;
     }
     $_REQUEST['no-redirect'] = 1;
     return $this->basket('put', $itemType, $itemId);
 }
开发者ID:ziL318,项目名称:moon,代码行数:57,代码来源:class.php


示例9: execute

 public function execute($v58309fbfe87fa90ec9f4b9d78ead9d77, $v21ffce5b8a6cc8cc6a41448dd69623c9)
 {
     $v7f2db423a49b305459147332fb01cf87 = outputBuffer::current();
     $v7f2db423a49b305459147332fb01cf87->clear();
     $v7f2db423a49b305459147332fb01cf87->charset('utf-8');
     $v7f2db423a49b305459147332fb01cf87->contentType('text/xml');
     $this->sendHTTPHeaders($v21ffce5b8a6cc8cc6a41448dd69623c9);
     $v7f2db423a49b305459147332fb01cf87->push($v58309fbfe87fa90ec9f4b9d78ead9d77);
     $v6a2a431fe8b621037ea949531c28551d = getArrayKey($v21ffce5b8a6cc8cc6a41448dd69623c9, 'output');
     if ($v6a2a431fe8b621037ea949531c28551d) {
         file_put_contents($v6a2a431fe8b621037ea949531c28551d, $v58309fbfe87fa90ec9f4b9d78ead9d77);
     } else {
     }
     $v7f2db423a49b305459147332fb01cf87->end();
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:15,代码来源:file.php


示例10: getArrayKey

function getArrayKey($arr, $value)
{
    if (!is_array($arr)) {
        return null;
    }
    foreach ($arr as $k => $v) {
        $return = getArrayKey($v, $value);
        if ($v == $value) {
            return $k;
        }
        if (!is_null($return)) {
            return $return;
        }
    }
}
开发者ID:GobYang,项目名称:thaidh,代码行数:15,代码来源:F_Array.php


示例11: discount_add

 public function discount_add()
 {
     $inputData = array("type" => "discount");
     $mode = (string) getRequest('param0');
     if ($mode == "do") {
         $data = getArrayKey(getRequest('data'), 'new');
         //Create new dicsount
         $discountName = getRequest('name');
         $discountTypeId = getArrayKey($data, 'discount_type_id');
         try {
             $discount = discount::add($discountName, $discountTypeId);
             //Apply modificator
             $modificatorId = getArrayKey($data, 'discount_modificator_id');
             try {
                 $modificatorTypeObject = $this->expectObject($modificatorId, true, true);
             } catch (publicAdminException $e) {
                 if ($discount) {
                     $discount->delete();
                 }
                 $this->errorNewMessage(getLabel('error-modificator-required'));
                 $this->errorPanic();
             }
             $modificatorObject = discountModificator::create($discount, $modificatorTypeObject);
             $discount->setDiscountModificator($modificatorObject);
             //Apply rules
             $rulesId = getArrayKey($data, 'discount_rules_id');
             foreach ($rulesId as $ruleId) {
                 $ruleTypeObject = $this->expectObject($ruleId, true, true);
                 $ruleObject = discountRule::create($discount, $ruleTypeObject);
                 if ($ruleObject instanceof discountRule == false) {
                     $discount->delete();
                     throw new publicAdminException("discountRule #{$ruleId} \"{$ruleTypeObject->name}\" class not found");
                 }
                 $discount->appendDiscountRule($ruleObject);
             }
             $discount->commit();
         } catch (valueRequiredException $e) {
             $this->errorNewMessage($e->getMessage());
             $this->errorPanic();
         }
         $this->chooseRedirect($this->pre_lang . "/admin/emarket/discount_edit/" . $discount->getId() . "/");
     }
     $this->setDataType("form");
     $this->setActionType("create");
     $data = $this->prepareData($inputData, "object");
     $this->setData($data);
     return $this->doData();
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:48,代码来源:__admin_discounts.php


示例12: getType

 public function getType($v94757cae63fd3e398c0811a976dd6bbe)
 {
     if (!$v94757cae63fd3e398c0811a976dd6bbe) {
         return false;
     }
     if (!is_numeric($v94757cae63fd3e398c0811a976dd6bbe)) {
         $v94757cae63fd3e398c0811a976dd6bbe = $this->getTypeIdByGUID($v94757cae63fd3e398c0811a976dd6bbe);
     }
     if ($this->isLoaded($v94757cae63fd3e398c0811a976dd6bbe)) {
         return $this->types[$v94757cae63fd3e398c0811a976dd6bbe];
     } else {
         $this->loadType($v94757cae63fd3e398c0811a976dd6bbe);
         return getArrayKey($this->types, $v94757cae63fd3e398c0811a976dd6bbe);
     }
     throw new coreException("Unknow error");
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:16,代码来源:umiObjectTypesCollection.php


示例13: end

 public function end()
 {
     if (!DEBUG) {
         @ob_clean();
     }
     if (getArrayKey($this->options, 'quick-edit')) {
         umiTemplater::prepareQuickEdit();
     }
     if (CALC_E_TAG) {
         $this->sendETag();
     }
     $this->push($this->getCallTime());
     $this->send();
     session_write_close();
     exit;
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:16,代码来源:HTTPOutputBuffer.php


示例14: stores

 public function stores($elementId, $template = 'default')
 {
     if (!$template) {
         $tempate = 'default';
     }
     $hierarchy = umiHierarchy::getInstance();
     $objects = umiObjectsCollection::getInstance();
     list($tpl_block, $tpl_block_empty, $tpl_item) = def_module::loadTemplates("emarket/stores/" . $template, 'stores_block', 'stores_block_empty', 'stores_item');
     $elementId = $this->analyzeRequiredPath($elementId);
     if ($elementId == false) {
         throw new publicException("Wrong element id given");
     }
     $element = $hierarchy->getElement($elementId);
     if ($element instanceof iUmiHierarchyElement == false) {
         throw new publicException("Wrong element id given");
     }
     $storesInfo = $element->stores_state;
     $items_arr = array();
     $stores = array();
     $total = 0;
     if (is_array($storesInfo)) {
         foreach ($storesInfo as $storeInfo) {
             $object = $objects->getObject(getArrayKey($storeInfo, 'rel'));
             if ($object instanceof iUmiObject) {
                 $amount = (int) getArrayKey($storeInfo, 'int');
                 $total += $amount;
                 $store = array('attribute:amount' => $amount);
                 if ($object->primary) {
                     $reserved = (int) $element->reserved;
                     $store['attribute:amount'] -= $reserved;
                     $store['attribute:reserved'] = $reserved;
                     $store['attribute:primary'] = 'primary';
                 }
                 $store['item'] = $object;
                 $stores[] = $store;
                 $items_arr[] = def_module::parseTemplate($tpl_item, array('store_id' => $object->id, 'amount' => $amount, 'name' => $object->name), false, $object->id);
             }
         }
     }
     $result = array('stores' => array('attribute:total-amount' => $total, 'nodes:store' => $stores));
     $result['void:total-amount'] = $total;
     $result['void:items'] = $items_arr;
     if (!$total) {
         $tpl_block = $tpl_block_empty;
     }
     return def_module::parseTemplate($tpl_block, $result);
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:47,代码来源:__stores.php


示例15: sendHTTPHeaders

 protected function sendHTTPHeaders($v21ffce5b8a6cc8cc6a41448dd69623c9)
 {
     if (is_array($v21ffce5b8a6cc8cc6a41448dd69623c9)) {
         $v7f2db423a49b305459147332fb01cf87 = outputBuffer::current();
         $v4340fd73e75df7a9d9e45902a59ba3a4 = getArrayKey($v21ffce5b8a6cc8cc6a41448dd69623c9, 'headers');
         if (is_array($v4340fd73e75df7a9d9e45902a59ba3a4)) {
             foreach ($v4340fd73e75df7a9d9e45902a59ba3a4 as $v865c0c0b4ab0e063e5caa3387c1a8741 => $v9e3669d19b675bd57058fd4664205d2a) {
                 if (strtolower($v865c0c0b4ab0e063e5caa3387c1a8741) == 'content-type') {
                     $v7f2db423a49b305459147332fb01cf87->contentType($v9e3669d19b675bd57058fd4664205d2a);
                     continue;
                 }
                 $v7f2db423a49b305459147332fb01cf87->header($v865c0c0b4ab0e063e5caa3387c1a8741, $v9e3669d19b675bd57058fd4664205d2a);
             }
         }
     } else {
         throw new coreException("First argument must be ad array in sendHTTPHeaders()");
     }
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:18,代码来源:baseSerialize.php


示例16: widget_create

 public function widget_create()
 {
     $cmsController = cmsController::getInstance();
     $hierarchy = umiHierarchy::getInstance();
     $element_id = $this->expectElementId('param0');
     $mode = getRequest('do');
     $element = $hierarchy->getElement($element_id);
     if ($element instanceof umiHierarchyElement) {
         $module_name = $element->getModule();
         $method_name = $element->getMethod();
         $module = $cmsController->getModule($module_name);
         if ($module instanceof def_module) {
             $links = $module->getEditLink($element_id, $method_name);
             if (isset($links[0])) {
                 $link = $links[0];
             }
         } else {
             throw new publicException("Module \"{$module_name}\" not found. So I can't get edit link for element #{$element_id}");
         }
         if (preg_match("/admin\\/([^\\/]+)\\/([^\\/]+)\\/([^\\/]+)?\\/?([^\\/]+)?\\/?/", $link, $out)) {
             $method = getArrayKey($out, 2);
             $_REQUEST['param0'] = getArrayKey($out, 3);
             $_REQUEST['param1'] = getArrayKey($out, 4) ? getArrayKey($out, 4) : $mode;
             $_REQUEST['param2'] = getArrayKey($out, 5) ? getArrayKey($out, 5) : $mode;
             $_REQUEST['param3'] = $mode;
             return $module->{$method}();
         } else {
             throw new publicAdminException("Unknown error occured");
         }
     } else {
         $module_name = "content";
         $method_name = "add";
         $_REQUEST['param0'] = "0";
         $_REQUEST['param1'] = "page";
         $_REQUEST['param2'] = $mode;
         $_REQUEST['domain'] = $cmsController->getCurrentDomain()->getHost();
         $module = $cmsController->getModule($module_name);
         return $module->{$method_name}();
     }
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:40,代码来源:__lib.php


示例17: setStreamsCacheSettings

 public static function setStreamsCacheSettings($settings)
 {
     if (!is_array($settings)) {
         return false;
     }
     $config = mainConfiguration::getInstance();
     $config->set('cache', 'streams.cache-enabled', getArrayKey($settings, 'cache-enabled'));
     $config->set('cache', 'streams.cache-lifetime', getArrayKey($settings, 'cache-lifetime'));
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:9,代码来源:__cache.php


示例18: getLastMessageId

 protected function getLastMessageId($elementId)
 {
     $element = selector::get('page')->id($elementId);
     if ($element) {
         $lastMessage = $element->last_message;
         if (sizeof($lastMessage) && false) {
             $lastMessage = getArrayKey($lastMessage, 0);
             return $lastMessage instanceof iUmiHierarchyElement ? $lastMessage->id : false;
         } else {
             $lastMessage = $this->calculateLastMessageId($element);
             if ($lastMessage) {
                 if (!defined('DISABLE_SEARCH_REINDEX')) {
                     define('DISABLE_SEARCH_REINDEX', '1');
                 }
                 $element->last_message = $lastMessage;
                 $element->commit();
                 return $lastMessage->id;
             }
         }
     }
     return false;
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:22,代码来源:class.php


示例19: prepareRequest

function prepareRequest($v3c6e0b8a9c15224a8228b9a98ca1531d)
{
    $v8b1dc169bf460ee884fceef66c6607d6 = cmsController::getInstance();
    if ($v8b1dc169bf460ee884fceef66c6607d6->getCurrentMode() != 'admin') {
        return false;
    }
    $ve4e46deb7f9cc58c7abfb32e5570b6f3 = getRequest('domain_id');
    $v5a05866850c28651fe234659f6c92ada = getRequest('lang_id');
    $v48908871a0d20dd2e5bd0a3d634ac745 = getRequest('rel');
    if (!is_array($ve4e46deb7f9cc58c7abfb32e5570b6f3) || !is_array($v5a05866850c28651fe234659f6c92ada)) {
        return false;
    }
    $v22884db148f0ffb0d830ba431102b0b5 = $v8b1dc169bf460ee884fceef66c6607d6->getCurrentModule();
    $vea9f6aca279138c58f705c8d4cb4b8ce = $v8b1dc169bf460ee884fceef66c6607d6->getCurrentMethod();
    if (!$v22884db148f0ffb0d830ba431102b0b5 || !$vea9f6aca279138c58f705c8d4cb4b8ce) {
        return false;
    }
    if (!isset($_SESSION['paging'])) {
        $_SESSION['paging'] = array();
    }
    $v72ee76c5c29383b7c9f9225c1fa4d10b = $ve4e46deb7f9cc58c7abfb32e5570b6f3[0];
    if (!isset($_SESSION['paging'][$v72ee76c5c29383b7c9f9225c1fa4d10b])) {
        $_SESSION['paging'][$v72ee76c5c29383b7c9f9225c1fa4d10b] = array();
    }
    $vf585b7f018bb4ced15a03683a733e50b = $v5a05866850c28651fe234659f6c92ada[0];
    if (!isset($_SESSION['paging'][$v72ee76c5c29383b7c9f9225c1fa4d10b][$vf585b7f018bb4ced15a03683a733e50b])) {
        $_SESSION['paging'][$v72ee76c5c29383b7c9f9225c1fa4d10b][$vf585b7f018bb4ced15a03683a733e50b] = array();
    }
    if (!isset($_SESSION['paging'][$v72ee76c5c29383b7c9f9225c1fa4d10b][$vf585b7f018bb4ced15a03683a733e50b][$v22884db148f0ffb0d830ba431102b0b5])) {
        $_SESSION['paging'][$v72ee76c5c29383b7c9f9225c1fa4d10b][$vf585b7f018bb4ced15a03683a733e50b][$v22884db148f0ffb0d830ba431102b0b5] = array();
    }
    if (!isset($_SESSION['paging'][$v72ee76c5c29383b7c9f9225c1fa4d10b][$vf585b7f018bb4ced15a03683a733e50b][$v22884db148f0ffb0d830ba431102b0b5][$vea9f6aca279138c58f705c8d4cb4b8ce])) {
        $_SESSION['paging'][$v72ee76c5c29383b7c9f9225c1fa4d10b][$vf585b7f018bb4ced15a03683a733e50b][$v22884db148f0ffb0d830ba431102b0b5][$vea9f6aca279138c58f705c8d4cb4b8ce] = array();
    }
    if (!isset($_SESSION['paging'][$v72ee76c5c29383b7c9f9225c1fa4d10b][$vf585b7f018bb4ced15a03683a733e50b][$v22884db148f0ffb0d830ba431102b0b5][$vea9f6aca279138c58f705c8d4cb4b8ce]['per_page_limit'])) {
        $_SESSION['paging'][$v72ee76c5c29383b7c9f9225c1fa4d10b][$vf585b7f018bb4ced15a03683a733e50b][$v22884db148f0ffb0d830ba431102b0b5][$vea9f6aca279138c58f705c8d4cb4b8ce]['per_page_limit'] = 20;
    }
    if (is_array($v48908871a0d20dd2e5bd0a3d634ac745)) {
        $va722790b49e8eb1f37a1c672326ec501 = $v48908871a0d20dd2e5bd0a3d634ac745[0];
    } else {
        $va722790b49e8eb1f37a1c672326ec501 = 0;
    }
    if (!isset($_SESSION['paging'][$v72ee76c5c29383b7c9f9225c1fa4d10b][$vf585b7f018bb4ced15a03683a733e50b][$v22884db148f0ffb0d830ba431102b0b5][$vea9f6aca279138c58f705c8d4cb4b8ce][$va722790b49e8eb1f37a1c672326ec501])) {
        $_SESSION['paging'][$v72ee76c5c29383b7c9f9225c1fa4d10b][$vf585b7f018bb4ced15a03683a733e50b][$v22884db148f0ffb0d830ba431102b0b5][$vea9f6aca279138c58f705c8d4cb4b8ce][$va722790b49e8eb1f37a1c672326ec501] = NULL;
    }
    if ($v3c6e0b8a9c15224a8228b9a98ca1531d == 'per_page_limit') {
        $vfd99915015add1d849c02ad4b17e9336 = getArrayKey($_REQUEST, $v3c6e0b8a9c15224a8228b9a98ca1531d);
        if (!is_null($vfd99915015add1d849c02ad4b17e9336)) {
            $v9de78d59f762eb7ae7bb1b6b828bea0b = $_SESSION['paging'][$v72ee76c5c29383b7c9f9225c1fa4d10b][$vf585b7f018bb4ced15a03683a733e50b][$v22884db148f0ffb0d830ba431102b0b5][$vea9f6aca279138c58f705c8d4cb4b8ce]['per_page_limit'];
            $_SESSION['paging'][$v72ee76c5c29383b7c9f9225c1fa4d10b][$vf585b7f018bb4ced15a03683a733e50b][$v22884db148f0ffb0d830ba431102b0b5][$vea9f6aca279138c58f705c8d4cb4b8ce]['per_page_limit'] = $vfd99915015add1d849c02ad4b17e9336;
            $v70317dcda32ebeb34e3c30445a495bf7 = $v9de78d59f762eb7ae7bb1b6b828bea0b / $vfd99915015add1d849c02ad4b17e9336;
            foreach ($_SESSION['paging'][$v72ee76c5c29383b7c9f9225c1fa4d10b][$vf585b7f018bb4ced15a03683a733e50b][$v22884db148f0ffb0d830ba431102b0b5][$vea9f6aca279138c58f705c8d4cb4b8ce] as $v7ffc4d510260a8544e5550e62ec56bc1 => $v71860c77c6745379b0d44304d66b6a13) {
                if ((string) $v7ffc4d510260a8544e5550e62ec56bc1 == 'per_page_limit') {
                    continue;
                }
                $_SESSION['paging'][$v72ee76c5c29383b7c9f9225c1fa4d10b][$vf585b7f018bb4ced15a03683a733e50b][$v22884db148f0ffb0d830ba431102b0b5][$vea9f6aca279138c58f705c8d4cb4b8ce][$v7ffc4d510260a8544e5550e62ec56bc1] = (int) ($v71860c77c6745379b0d44304d66b6a13 * $v70317dcda32ebeb34e3c30445a495bf7);
            }
            if ($v9de78d59f762eb7ae7bb1b6b828bea0b != $vfd99915015add1d849c02ad4b17e9336 && isset($_REQUEST['p']) && $_REQUEST['p'] != 'all') {
                $_REQUEST['p'] = $_SESSION['paging'][$v72ee76c5c29383b7c9f9225c1fa4d10b][$vf585b7f018bb4ced15a03683a733e50b][$v22884db148f0ffb0d830ba431102b0b5][$vea9f6aca279138c58f705c8d4cb4b8ce][$va722790b49e8eb1f37a1c672326ec501];
            }
        }
        return $_SESSION['paging'][$v72ee76c5c29383b7c9f9225c1fa4d10b][$vf585b7f018bb4ced15a03683a733e50b][$v22884db148f0ffb0d830ba431102b0b5][$vea9f6aca279138c58f705c8d4cb4b8ce]['per_page_limit'];
    }
    if ($v3c6e0b8a9c15224a8228b9a98ca1531d == 'p') {
        $vd58c61d4baf203c327ec51adbd377a4e = getArrayKey($_REQUEST, $v3c6e0b8a9c15224a8228b9a98ca1531d);
        if (!is_null($vd58c61d4baf203c327ec51adbd377a4e)) {
            $_SESSION['paging'][$v72ee76c5c29383b7c9f9225c1fa4d10b][$vf585b7f018bb4ced15a03683a733e50b][$v22884db148f0ffb0d830ba431102b0b5][$vea9f6aca279138c58f705c8d4cb4b8ce][$va722790b49e8eb1f37a1c672326ec501] = $vd58c61d4baf203c327ec51adbd377a4e;
        }
    }
    return $_SESSION['paging'][$v72ee76c5c29383b7c9f9225c1fa4d10b][$vf585b7f018bb4ced15a03683a733e50b][$v22884db148f0ffb0d830ba431102b0b5][$vea9f6aca279138c58f705c8d4cb4b8ce][$va722790b49e8eb1f37a1c672326ec501];
}
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:71,代码来源:lib.php


示例20: autoImport

 public static function autoImport(selector $v8be74552df93e31bbdd6b36ed74bdb6a, $vb8c8ec69026adfe891bf5e618eabb17b = false)
 {
     $v7f2db423a49b305459147332fb01cf87 = outputBuffer::current();
     $v7f2db423a49b305459147332fb01cf87->contentType('text/html');
     $v7f2db423a49b305459147332fb01cf87->push("<script type='text/javascript'>\n");
     if (isset($_FILES['csv-file'])) {
         $v1ded0622d3320f26b47f514fabab54f1 = getArrayKey($_FILES, 'csv-file');
         $vb068931cc450442b63f5b3d276ea4297 = getArrayKey($v1ded0622d3320f26b47f514fabab54f1, 'name');
         $v656840677a2dbd5ab56a2202e415b293 = getArrayKey($v1ded0622d3320f26b47f514fabab54f1, 'tmp_name');
         $vcb5e100e5a9a3e7f6d1fd97512215282 = getArrayKey($v1ded0622d3320f26b47f514fabab54f1, 'error');
         $vf7bd60b75b29d79b660a2859395c1a24 = getArrayKey($v1ded0622d3320f26b47f514fabab54f1, 'size');
         if ($vcb5e100e5a9a3e7f6d1fd97512215282) {
             $v7f2db423a49b305459147332fb01cf87->push("alert('Failed to upload file');\n");
         } else {
             $v2245023265ae4cf87d02c8b6ba991139 = mainConfiguration::getInstance();
             $v8c7dd922ad47494fc02c388e12c00eac = umiFile::manualUpload($vb068931cc450442b63f5b3d276ea4297, $v656840677a2dbd5ab56a2202e415b293, $vf7bd60b75b29d79b660a2859395c1a24, $v2245023265ae4cf87d02c8b6ba991139->includeParam('system.runtime-cache'));
             if (!$v8c7dd922ad47494fc02c388e12c00eac instanceof iUmiFile || $v8c7dd922ad47494fc02c388e12c00eac->getIsBroken()) {
                 $v7f2db423a49b305459147332fb01cf87->push("alert('Upload file is broken');\n");
             } else {
                 $v93473a7344419b15c4219cc2b6c64c6f = new quickCsvImporter($v8c7dd922ad47494fc02c388e12c00eac);
                 $v93473a7344419b15c4219cc2b6c64c6f->forceHierarchy = $vb8c8ec69026adfe891bf5e618eabb17b;
                 $v0e8133eb006c0f85ed9444ae07a60842 = array();
                 $v6942e8fa62b3cc9d93881a58210e2fd7 = array();
                 foreach ($v8be74552df93e31bbdd6b36ed74bdb6a->types as $v599dcce2998a6b40b1e38e8c6006cb0a) {
                     if (!is_null($v599dcce2998a6b40b1e38e8c6006cb0a->objectType)) {
                         $v0e8133eb006c0f85ed9444ae07a60842[] = $v599dcce2998a6b40b1e38e8c6006cb0a->objectType;
                     }
                     if (!is_null($v599dcce2998a6b40b1e38e8c6006cb0a->hierarchyType)) {
                         $v6942e8fa62b3cc9d93881a58210e2fd7[] = $v599dcce2998a6b40b1e38e8c6006cb0a->hierarchyType;
                     }
                 }
                 if (!$vb8c8ec69026adfe891bf5e618eabb17b && !sizeof($v8be74552df93e31bbdd6b36ed74bdb6a->hierarchy)) {
                     if (sizeof($v0e8133eb006c0f85ed9444ae07a60842)) {
                         $v93473a7344419b15c4219cc2b6c64c6f->importAsObjects($v0e8133eb006c0f85ed9444ae07a60842[0]);
                         $v7f2db423a49b305459147332fb01cf87->push("//Upload completed\n");
                     }
                 } else {
                     if (sizeof($v6942e8fa62b3cc9d93881a58210e2fd7) > 1) {
                         $vacf567c9c3d6cf7c6e2cc0ce108e0631 = false;
                         for ($v865c0c0b4ab0e063e5caa3387c1a8741 = sizeof($v6942e8fa62b3cc9d93881a58210e2fd7) - 1; $v865c0c0b4ab0e063e5caa3387c1a8741 >= 0; $v865c0c0b4ab0e063e5caa3387c1a8741--) {
                             if ($v6942e8fa62b3cc9d93881a58210e2fd7[$v865c0c0b4ab0e063e5caa3387c1a8741]->getId() == umiHierarchyTypesCollection::getInstance()->getTypeByName('comments', 'comment')->getId()) {
                                 continue;
                             }
                             $vacf567c9c3d6cf7c6e2cc0ce108e0631 = $v6942e8fa62b3cc9d93881a58210e2fd7[$v865c0c0b4ab0e063e5caa3387c1a8741]->getId();
                             break;
                         }
                         $v72352a4d26581ef082a6d2243c5a6b88 = false;
                         if (is_array($v8be74552df93e31bbdd6b36ed74bdb6a->hierarchy) && sizeof($v8be74552df93e31bbdd6b36ed74bdb6a->hierarchy)) {
                             $v72352a4d26581ef082a6d2243c5a6b88 = $v8be74552df93e31bbdd6b36ed74bdb6a->hierarchy[0]->elementId;
                         }
                         if ($v72352a4d26581ef082a6d2243c5a6b88) {
                             $vfabf67ff39a368b3c0eae3c66d81cc5e = umiHierarchy::getInstance()->getDominantTypeId($v72352a4d26581ef082a6d2243c5a6b88);
                             if ($vfabf67ff39a368b3c0eae3c66d81cc5e) {
                                 $v726e8e4809d4c1b28a6549d86436a124 = umiObjectTypesCollection::getInstance()->getType($vfabf67ff39a368b3c0eae3c66d81cc5e);
                                 if ($ve6d258c789c675bb2d39aa58e3bc6fb0 = $v726e8e4809d4c1b28a6549d86436a124->getHierarchyTypeId()) {
                                     $vacf567c9c3d6cf7c6e2cc0ce108e0631 = $ve6d258c789c675bb2d39aa58e3bc6fb0;
                                 }
                             }
                         }
                         $v93473a7344419b15c4219cc2b6c64c6f->importAsElements($vacf567c9c3d6cf7c6e2cc0ce108e0631, $v72352a4d26581ef082a6d2243c5a6b88);
                     }
                 }
                 $v8c7dd922ad47494fc02c388e12c00eac->delete();
             }
         }
     } else {
         $v7f2db423a49b305459147332fb01cf87->push("alert('File is not posted');\n");
     }
     $v7f2db423a49b305459147332fb01cf87->push("window.parent.csvQuickImportCallback();\n</script>\n");
     $v7f2db423a49b305459147332fb01cf87->end();
 }
开发者ID:BGCX261,

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getArrayString函数代码示例发布时间:2022-05-15
下一篇:
PHP getArrayCombo函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap