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

PHP cmsController类代码示例

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

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



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

示例1: merge

		/**
			* Слить все заказы покупателя в профиль пользователя.
			* Объект покупателя после этого будет уничтожен
		*/
		public function merge(umiObject $customer) {

			$cmsController = cmsController::getInstance();
			$domain = $cmsController->getCurrentDomain();
			$domainId = $domain->getId();

			$sel = new selector('objects');
			$sel->types('object-type')->name('emarket', 'order');
			$sel->where('customer_id')->equals($customer->id);
			$sel->where('domain_id')->equals($domainId);
			$sel->order('id')->desc();

			$permissions = permissionsCollection::getInstance();
			$userId = $permissions->getUserId();

			foreach($sel as $order) {
				if(!$order->status_id) {
					$this->mergeBasket($order);
					continue;
				}

				$order->customer_id = $userId;
				$order->commit();
			}
			if (!defined('UMICMS_CLI_MODE') || !UMICMS_CLI_MODE) {
				setcookie('customer-id', 0, 1, '/');
			}
			$customer->delete();
		}
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:33,代码来源:customer.php


示例2: autoExport

 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);
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:29,代码来源:quickCsvExporter.php


示例3: validateItem

 public function validateItem(iUmiHierarchyElement $element)
 {
     $relatedItems = array();
     foreach ($this->related_items as $element) {
         if ($element instanceof iUmiHierarchyElement) {
             $relatedItems[] = $element->id;
         }
     }
     $cmsController = cmsController::getInstance();
     $emarket = $cmsController->getModule('emarket');
     if ($emarket instanceof def_module) {
         $order = $emarket->getBasketOrder();
         foreach ($order->getItems() as $orderItem) {
             $element = $orderItem->getItemElement();
             if ($element instanceof iUmiHierarchyElement) {
                 if (in_array($element->id, $relatedItems)) {
                     return true;
                 }
             }
         }
         return false;
     } else {
         throw new privateException('Emarket module must be installed');
     }
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:25,代码来源:relatedItems.php


示例4: parse

 public function parse($v87cd8b8808600624d8c590cfc2e6e94b, $v9a0364b9e99bb480dd25e1f0284c8555 = null)
 {
     if (is_null($this->domXSL)) {
         $this->domXSL = $this->prepareXSL($this->templatesSource);
     }
     $va3c3308ab3cad416697b6e49b5481ce2 = $this->domXML instanceof DOMDocument ? $this->domXML : $this->prepareXML($v87cd8b8808600624d8c590cfc2e6e94b);
     $v801f7201346b43f8ee8390a1ef20ddcd = new xsltProcessor();
     $v801f7201346b43f8ee8390a1ef20ddcd->registerPHPFunctions();
     if (defined("UMI_XSLT_PROFILER_LOG") && version_compare(PHP_VERSION, '5.3.0', '>=')) {
         $v801f7201346b43f8ee8390a1ef20ddcd->setProfiling(UMI_XSLT_PROFILER_LOG);
     }
     $v818f9c45cfa30eeff277ef38bcbe9910 = errorsXsltListen();
     $v801f7201346b43f8ee8390a1ef20ddcd->importStyleSheet($this->domXSL);
     if ($va0f97308110b5ffc40d784efae2257bb = cmsController::getInstance()->detectCurrentDesignTemplate()) {
         $v40def08eb6011aefb2505a262252de92 = array('template-name' => $va0f97308110b5ffc40d784efae2257bb->getName(), 'template-resources' => $va0f97308110b5ffc40d784efae2257bb->getResourcesDirectory(true));
         $this->addRequestParams($v801f7201346b43f8ee8390a1ef20ddcd, $v40def08eb6011aefb2505a262252de92);
     }
     if (is_array($this->additionalVariables)) {
         $this->addRequestParams($v801f7201346b43f8ee8390a1ef20ddcd, $this->additionalVariables);
     }
     $this->addRequestParams($v801f7201346b43f8ee8390a1ef20ddcd, $_COOKIE);
     $this->addRequestParams($v801f7201346b43f8ee8390a1ef20ddcd, $_REQUEST);
     $this->addRequestParams($v801f7201346b43f8ee8390a1ef20ddcd, $_SERVER, "_");
     $v9b207167e5381c47682c6b4f58a623fb = $v801f7201346b43f8ee8390a1ef20ddcd->transformToXML($va3c3308ab3cad416697b6e49b5481ce2);
     errorsXsltCheck($v818f9c45cfa30eeff277ef38bcbe9910);
     return $v9b207167e5381c47682c6b4f58a623fb;
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:27,代码来源:umiTemplaterXSLT.php


示例5: _network_settings

		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();
		}
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:33,代码来源:__admin.php


示例6: run

 public function run()
 {
     $form = $this->getForm('options');
     if (!$form) {
         cmsCore::error404();
     }
     $is_submitted = $this->request->has('submit');
     $options = cmsController::loadOptions($this->name);
     $source_controllers = cmsEventsManager::hookAll('sitemap_sources');
     if (is_array($source_controllers)) {
         foreach ($source_controllers as $controller) {
             foreach ($controller['sources'] as $id => $title) {
                 $form->addField('sources', new fieldCheckbox("sources:{$controller['name']}|{$id}", array('title' => $title)));
             }
         }
     }
     if ($is_submitted) {
         $options = $form->parse($this->request, $is_submitted);
         $errors = $form->validate($this, $options);
         if (!$errors) {
             cmsUser::addSessionMessage(LANG_CP_SAVE_SUCCESS, 'success');
             cmsController::saveOptions($this->name, $options);
             $this->redirectToAction('options');
         }
         if ($errors) {
             cmsUser::addSessionMessage(LANG_FORM_ERRORS, 'error');
         }
     }
     return cmsTemplate::getInstance()->render('backend/options', array('options' => $options, 'form' => $form, 'errors' => isset($errors) ? $errors : false));
 }
开发者ID:pin-git,项目名称:icms2,代码行数:30,代码来源:options.php


示例7: onAddTopicToDispatch

 public function onAddTopicToDispatch(iUmiEventPoint $oEvent)
 {
     $iDispatchId = regedit::getInstance()->getVal("//modules/forum/dispatch_id");
     if (!$iDispatchId) {
         return false;
     }
     $dispatches_module = cmsController::getInstance()->getModule('dispatches');
     if (!$dispatches_module) {
         return false;
     }
     $iTopicId = (int) $oEvent->getParam('topic_id');
     $oTopicElement = umiHierarchy::getInstance()->getElement($iTopicId);
     if ($oTopicElement instanceof umiHierarchyElement) {
         $sTitle = (string) getRequest('title');
         $sMessage = (string) getRequest('body');
         $iHierarchyTypeId = umiHierarchyTypesCollection::getInstance()->getTypeByName("dispatches", "message")->getId();
         $iMsgTypeId = umiObjectTypesCollection::getInstance()->getTypeByHierarchyTypeId($iHierarchyTypeId);
         $oMsgType = umiObjectTypesCollection::getInstance()->getType($iMsgTypeId);
         $iMsgObjId = umiObjectsCollection::getInstance()->addObject($sTitle, $iMsgTypeId);
         $oMsgObj = umiObjectsCollection::getInstance()->getObject($iMsgObjId);
         if ($oMsgObj instanceof umiObject) {
             $iReleaseId = $dispatches_module->getNewReleaseInstanceId($iDispatchId);
             $oMsgObj->setValue('release_reference', $iReleaseId);
             $oMsgObj->setValue('header', $sTitle);
             $oMsgObj->setValue('body', $sMessage);
             $oMsgObj->commit();
             return true;
         } else {
             return false;
         }
     } else {
         return false;
     }
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:34,代码来源:__sysevents.php


示例8: actionOptions

 public function actionOptions()
 {
     if (empty($this->useDefaultOptionsAction)) {
         cmsCore::error404();
     }
     $form = $this->getForm('options');
     if (!$form) {
         cmsCore::error404();
     }
     $form = $this->addControllerSeoOptions($form);
     $options = cmsController::loadOptions($this->name);
     if ($this->request->has('submit')) {
         $options = array_merge($options, $form->parse($this->request, true));
         $errors = $form->validate($this, $options);
         if (!$errors) {
             cmsUser::addSessionMessage(LANG_CP_SAVE_SUCCESS, 'success');
             cmsController::saveOptions($this->name, $options);
             $this->processCallback(__FUNCTION__, array($options));
             $this->redirectToAction('options');
         }
         if ($errors) {
             cmsUser::addSessionMessage(LANG_FORM_ERRORS, 'error');
         }
     }
     $template_params = array('toolbar' => $this->getOptionsToolbar(), 'options' => $options, 'form' => $form, 'errors' => isset($errors) ? $errors : false);
     // если задан шаблон опций в контроллере
     if ($this->cms_template->getTemplateFileName('controllers/' . $this->name . '/backend/options', true)) {
         return $this->cms_template->render('backend/options', $template_params);
     } else {
         $default_admin_tpl = $this->cms_template->getTemplateFileName('controllers/admin/controllers_options');
         return $this->cms_template->processRender($default_admin_tpl, $template_params);
     }
 }
开发者ID:Val-Git,项目名称:icms2,代码行数:33,代码来源:backend.php


示例9: process

 public function process($template = null)
 {
     list($tpl_block, $tpl_item) = def_module::loadTemplates("emarket/payment/invoice/" . $template, 'legal_person_block', 'legal_person_item');
     $collection = umiObjectsCollection::getInstance();
     $types = umiObjectTypesCollection::getInstance();
     $typeId = $types->getBaseType("emarket", "legal_person");
     $customer = customer::get();
     $order = $this->order;
     $mode = getRequest('param2');
     if ($mode == 'do') {
         $personId = getRequest('legal-person');
         $isNew = $personId == null || $personId == 'new';
         if ($isNew) {
             $typeId = $types->getBaseType("emarket", "legal_person");
             $personId = $collection->addObject("", $typeId);
             $controller = cmsController::getInstance();
             $data = getRequest('data');
             if ($data && ($dataModule = $controller->getModule("data"))) {
                 $person = $collection->getObject($personId);
                 $person->setName($data['new']['name']);
                 $dataModule->saveEditedObject($personId, $isNew, true);
             }
             if ($collection->getObject($personId) instanceof umiObject) {
                 $customer = customer::get();
                 $customer->legal_persons = array_merge($customer->legal_persons, array($personId));
             }
         }
         $order->legal_person = $personId;
         $order->order();
         $order->payment_document_num = $order->id;
         $result = $this->printInvoice($order);
         $buffer = outputBuffer::current();
         $buffer->charset('utf-8');
         $buffer->contentType('text/html');
         $buffer->clear();
         $buffer->push($result);
         $buffer->end();
         return true;
     } else {
         if ($mode == 'delete') {
             $personId = (int) getRequest('person-id');
             if ($collection->isExists($personId)) {
                 $customer = customer::get();
                 $customer->legal_persons = array_diff($customer->legal_persons, array($personId));
                 $collection->delObject($personId);
             }
         }
     }
     $items = array();
     $persons = $customer->legal_persons;
     if (is_array($persons)) {
         foreach ($persons as $personId) {
             $person = $collection->getObject($personId);
             $item_arr = array('attribute:id' => $personId, 'attribute:name' => $person->name);
             $items[] = def_module::parseTemplate($tpl_item, $item_arr, false, $personId);
         }
     }
     $block_arr = array('attribute:type-id' => $typeId, 'attribute:type_id' => $typeId, 'xlink:href' => 'udata://data/getCreateForm/' . $typeId, 'subnodes:items' => $items);
     return def_module::parseTemplate($tpl_block, $block_arr);
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:60,代码来源:invoice.php


示例10: __construct

 /**
  * @desc Конструктор
  */
 public function __construct()
 {
     parent::__construct();
     if (cmsController::getInstance()->getCurrentMode() == "admin") {
         $regedit = regedit::getInstance();
         $systemEdition = $regedit->getVal("//modules/autoupdate/system_edition");
         $patches_disabled = false;
         if (strpos($systemEdition, 'trial') !== false || strpos($systemEdition, 'commerce_enc') !== false || strpos($systemEdition, 'start') !== false) {
             $patches_disabled = true;
         }
         if ($patches_disabled) {
             $regedit->setVar("//modules/autoupdate/disable_patches", "1");
         } else {
             $regedit->setVar("//modules/autoupdate/disable_patches", "0");
         }
         $commonTabs = $this->getCommonTabs();
         if ($commonTabs && !$patches_disabled) {
             $commonTabs->add('versions');
             $commonTabs->add('patches');
         }
         $this->__loadLib("__admin.php");
         $this->__implement("__autoupdate");
         $this->__loadLib("__json.php");
         $this->__implement("__json_autoupdate");
     }
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:29,代码来源:class.php


示例11: registerEvent

		/**
		* Зарегистрировать событие в истории событий
		* @param string $eventTypeId идентификатор типа события
		* @param array $params массив параметров события
		* @param int $elementId id связанной страницы
		* @param int $objectId id связанного объекта
		*/
		public function registerEvent($eventTypeId, $params = array(), $elementId = null, $objectId = null) {
			
			$pool = ConnectionPool::getInstance();
			$connection = $pool->getConnection();
			umiEventFeed::setConnection($connection);
			umiEventFeedType::setConnection($connection);
					
			try {
				$eventType = umiEventFeedType::get($eventTypeId);
			} catch (Exception $e) {
				$eventType = umiEventFeedType::create($eventTypeId);
			}
			
			$userId = permissionsCollection::getInstance()->getUserId();
			$user = umiObjectsCollection::getInstance()->getObject($userId)->getName();
			
			$module = cmsController::getInstance()->getModule('users');
			$link = $module->getObjectEditLink($userId);
			
			array_unshift($params, $user);
			array_unshift($params, $link);
			umiEventFeed::create($eventType, $params, $elementId, $objectId);
			
			$maxDays = (int) regedit::getInstance()->getVal("//modules/events/max-days-storing-events");
			if ($maxDays > 0) {
				$lastDate = time() - ($maxDays * 24 * 60 * 60);
				umiEventFeed::deleteList(array(), $lastDate);
			}
			
		}
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:37,代码来源:class.php


示例12: search

		/**
			* Найти наиболее подходящую скидку для заказа $order
			* @param order $order заказ
			* @return orderDiscount самая подходящая скидка для заказа $order
		*/
		public static function search(order $order) {
			$cmsController = cmsController::getInstance();
			$emarket = $cmsController->getModule('emarket');

			if($emarket instanceof def_module == false) {
				throw new coreException('Emarket module must be installed in order to calculate discounts');
			}
			
			$allDiscounts = $emarket->getAllDiscounts('bonus');
			$discounts = array();
			foreach($allDiscounts as $discountObject) {
				$discount = discount::get($discountObject->id);
				if($discount instanceof bonusDiscount == false) continue;
				if($discount->validate($order)) $discounts[] = $discount;
			}
			
			switch(sizeof($discounts)) {
				case 0: return null;
				default:
					$orderPrice = $order->getOriginalPrice();
					$maxDiscount = null; $minPrice = null;
					foreach($discounts as $i => $discount) {
						$price = $discount->recalcPrice($orderPrice);
						if($price <= 0) continue;

						if(is_null($minPrice) || $minPrice > $price) {
							$minPrice = $price;
							$maxDiscount = $discount;
						}
					}
					return $maxDiscount;
			}
		}
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:38,代码来源:bonusDiscount.php


示例13: process

 public function process($template = null)
 {
     $productId = $this->object->product_id;
     $siteId = $this->object->site_id;
     $productName = $this->order->getId();
     $cmsController = cmsController::getInstance();
     $language = strtolower($cmsController->getCurrentLang()->getPrefix());
     switch ($language) {
         case 'ru':
             $language = 'ru';
             break;
         default:
             $language = 'en';
             break;
     }
     $this->order->order();
     $productPrice = $this->order->getActualPrice();
     $secretCode = $this->object->secret;
     $priceString = number_format($productPrice, 2, '.', '');
     $sign = md5($productId . '-' . $priceString . '-' . $secretCode);
     $answerUrl = $cmsController->getCurrentDomain()->getHost() . "/emarket/gateway/" . $this->order->getId() . "/";
     $param = array();
     $param["formAction"] = "https://payments.chronopay.com/index.php";
     $param["product_id"] = $productId;
     $param["product_price"] = $productPrice;
     $param["language"] = $language;
     $param["order_id"] = $this->order->getId();
     $param["cb_type"] = "P";
     $param["cb_url"] = $answerUrl;
     $param["decline_url"] = $cmsController->getCurrentDomain()->getHost();
     $param["sign"] = $sign;
     $this->order->setPaymentStatus('initialized');
     list($templateString) = def_module::loadTemplates("emarket/payment/chronopay/" . $template, "form_block");
     return def_module::parseTemplate($templateString, $param);
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:35,代码来源:chronopay.php


示例14: actionOptions

 public function actionOptions()
 {
     if (empty($this->useDefaultOptionsAction)) {
         cmsCore::error404();
     }
     $form = $this->getForm('options');
     if (!$form) {
         cmsCore::error404();
     }
     $is_submitted = $this->request->has('submit');
     $options = cmsController::loadOptions($this->name);
     if ($is_submitted) {
         $options = $form->parse($this->request, $is_submitted);
         $errors = $form->validate($this, $options);
         if (!$errors) {
             cmsUser::addSessionMessage(LANG_CP_SAVE_SUCCESS, 'success');
             cmsController::saveOptions($this->name, $options);
             $this->redirectToAction('options');
         }
         if ($errors) {
             cmsUser::addSessionMessage(LANG_FORM_ERRORS, 'error');
         }
     }
     return cmsTemplate::getInstance()->render('backend/options', array('options' => $options, 'form' => $form, 'errors' => isset($errors) ? $errors : false));
 }
开发者ID:roman-burachenko,项目名称:icms2,代码行数:25,代码来源:backend.php


示例15: __construct

 public function __construct()
 {
     parent::__construct();
     $this->config = cmsController::loadOptions('photos');
     if (!empty($this->config['types'])) {
         $this->config['types'] = string_explode_list($this->config['types']);
     }
 }
开发者ID:Val-Git,项目名称:icms2,代码行数:8,代码来源:model.php


示例16: item_element

 public function item_element()
 {
     if ($this->breakMe()) {
         return;
     }
     $element_id = (int) cmsController::getInstance()->getCurrentElementId();
     return $this->view($element_id);
 }
开发者ID:tomoonshine,项目名称:postsms,代码行数:8,代码来源:class.php


示例17: getDataModule

 public function getDataModule()
 {
     static $dataModule;
     if (!$dataModule) {
         $dataModule = cmsController::getInstance()->getModule('data');
     }
     return $dataModule;
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:8,代码来源:__search.php


示例18: config

 public function config()
 {
     $regedit = regedit::getInstance();
     $domains = domainsCollection::getInstance()->getList();
     $lang_id = cmsController::getInstance()->getCurrentLang()->getId();
     $params = array();
     if ($regedit->getVal("//modules/seo/yandex-token")) {
         $params['yandex']['string:token'] = $regedit->getVal("//modules/seo/yandex-token");
     } else {
         $params['yandex']['string:code'] = '';
     }
     foreach ($domains as $domain) {
         $domain_id = $domain->getId();
         $domain_name = $domain->getHost();
         $seo_info = array();
         $seo_info['status:domain'] = $domain_name;
         $seo_info['string:title-' . $domain_id] = $regedit->getVal("//settings/title_prefix/{$lang_id}/{$domain_id}");
         $seo_info['string:keywords-' . $domain_id] = $regedit->getVal("//settings/meta_keywords/{$lang_id}/{$domain_id}");
         $seo_info['string:description-' . $domain_id] = $regedit->getVal("//settings/meta_description/{$lang_id}/{$domain_id}");
         $params[$domain_name] = $seo_info;
     }
     $mode = (string) getRequest('param0');
     if ($mode == "do") {
         $params = $this->expectParams($params);
         foreach ($domains as $domain) {
             $domain_id = $domain->getId();
             $domain_name = $domain->getHost();
             $title = $params[$domain_name]['string:title-' . $domain_id];
             $keywords = $params[$domain_name]['string:keywords-' . $domain_id];
             $description = $params[$domain_name]['string:description-' . $domain_id];
             $regedit->setVal("//settings/title_prefix/{$lang_id}/{$domain_id}", $title);
             $regedit->setVal("//settings/meta_keywords/{$lang_id}/{$domain_id}", $keywords);
             $regedit->setVal("//settings/meta_description/{$lang_id}/{$domain_id}", $description);
         }
         if (isset($params['yandex']['string:code'])) {
             $queryParams = array('grant_type' => "authorization_code", 'code' => $params['yandex']['string:code'], 'client_id' => "47fc30ca18e045cdb75f17c9779cfc36", 'client_secret' => "8c744620c2414522867e358b74b4a2ff");
             $response = umiRemoteFileGetter::get("https://oauth.yandex.ru/token", false, array(), $queryParams, true, "POST");
             $response = preg_split("|(\r\n\r\n)|", $response);
             $result = json_decode($response[1]);
             if (!isset($result) || $result->error || !$result->access_token) {
                 $this->errorNewMessage(getLabel('webmaster-wrong-code'));
                 $this->errorPanic();
             }
             $token = $result->access_token;
             $regedit->setVal("//modules/seo/yandex-token", $token);
         } else {
             $regedit->setVal("//modules/seo/yandex-token", $params['yandex']['string:token']);
         }
         $this->chooseRedirect();
     }
     $this->setDataType('settings');
     $this->setActionType('modify');
     $data = $this->prepareData($params, 'settings');
     $this->setData($data);
     return $this->doData();
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:56,代码来源:__admin.php


示例19: executeCallback

 protected function executeCallback($v924a8ceeac17f54d3be3f8cdf1c04eb2, $v70e8822b2e035fa3777d666207aeafa8)
 {
     $v22884db148f0ffb0d830ba431102b0b5 = $v924a8ceeac17f54d3be3f8cdf1c04eb2->getCallbackModule();
     $vea9f6aca279138c58f705c8d4cb4b8ce = $v924a8ceeac17f54d3be3f8cdf1c04eb2->getCallbackMethod();
     if ($v47a12618c9a47b69a3050e6b9313a351 = cmsController::getInstance()->getModule($v22884db148f0ffb0d830ba431102b0b5)) {
         $v47a12618c9a47b69a3050e6b9313a351->{$vea9f6aca279138c58f705c8d4cb4b8ce}($v70e8822b2e035fa3777d666207aeafa8);
     } else {
         throw new coreException("Cannot find module \"{$v22884db148f0ffb0d830ba431102b0b5}\"");
     }
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:10,代码来源:umiEventsController.php


示例20: process

		public function process($template = null) {
			$order = $this->order;
			$order->order();
			$controller = cmsController::getInstance();
			$module = $controller->getModule("emarket");
			if($module) {
				$module->redirect($controller->pre_lang . '/emarket/purchase/result/successful/');
			}
			return null;
		}
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:10,代码来源:courier.php



注:本文中的cmsController类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP cmsCore类代码示例发布时间:2022-05-23
下一篇:
PHP cmsConfig类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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