本文整理汇总了PHP中def_module::parseTPLMacroses方法的典型用法代码示例。如果您正苦于以下问题:PHP def_module::parseTPLMacroses方法的具体用法?PHP def_module::parseTPLMacroses怎么用?PHP def_module::parseTPLMacroses使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类def_module
的用法示例。
在下文中一共展示了def_module::parseTPLMacroses方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($v78e731027d8fd50ed642340b7c9a63b3, $vc13367945d5d4c91047b3b50234aa7ab = 0, $vd6ccd2379d1965a49b998d0f4207337d = "")
{
baseException::$catchedExceptions[$this->getId()] = $this;
$this->strcode = $vd6ccd2379d1965a49b998d0f4207337d;
$v78e731027d8fd50ed642340b7c9a63b3 = def_module::parseTPLMacroses($v78e731027d8fd50ed642340b7c9a63b3);
parent::__construct($v78e731027d8fd50ed642340b7c9a63b3, $vc13367945d5d4c91047b3b50234aa7ab);
}
示例2: versions
public function versions()
{
$regedit = regedit::getInstance();
$systemEdition = $regedit->getVal("//modules/autoupdate/system_edition");
$systemEditionStatus = "%autoupdate_edition_" . $systemEdition . "%";
if ($systemEdition == "commerce_trial" && $_SERVER['HTTP_HOST'] != 'localhost' && $_SERVER['HTTP_HOST'] != 'subdomain.localhost' && $_SERVER['SERVER_ADDR'] != '127.0.0.1') {
$daysLeft = $regedit->getDaysLeft();
$systemEditionStatus .= " ({$daysLeft} " . getLabel('label-days-left') . ")";
}
$systemEditionStatus = def_module::parseTPLMacroses($systemEditionStatus);
$params = array("autoupdate" => array("status:system-edition" => NULL, "status:last-updated" => NULL, "status:system-version" => NULL, "status:system-build" => NULL, "status:db-driver" => NULL, "boolean:disabled" => NULL, "boolean:patches-disabled" => NULL));
$params['autoupdate']['status:system-version'] = $regedit->getVal("//modules/autoupdate/system_version");
$params['autoupdate']['status:system-build'] = $regedit->getVal("//modules/autoupdate/system_build");
$params['autoupdate']['boolean:patches-disabled'] = (int) ($patches_disabled = $regedit->getVal("//modules/autoupdate/disable_patches"));
$params['autoupdate']['status:system-edition'] = $systemEditionStatus;
$params['autoupdate']['status:last-updated'] = date("Y-m-d H:i:s", $regedit->getVal("//modules/autoupdate/last_updated"));
$db_driver = "mysql";
if (defined("DB_DRIVER")) {
$db_driver = DB_DRIVER;
}
$params['autoupdate']['status:db-driver'] = $db_driver;
$autoupdates_disabled = false;
if (defined("CURRENT_VERSION_LINE")) {
if (in_array(CURRENT_VERSION_LINE, array("start", "demo"))) {
$autoupdates_disabled = true;
}
}
$params['autoupdate']['boolean:disabled'] = (int) $autoupdates_disabled;
$this->setDataType("settings");
$this->setActionType("view");
$data = $this->prepareData($params, "settings");
$this->setData($data);
return $this->doData();
}
示例3: createGrid
protected function createGrid($v9a09b4dfda82e3e665e31092d1c3ec8d)
{
$v63a9f0ea7bb98050796b649e85481845 = $v9a09b4dfda82e3e665e31092d1c3ec8d->createElement("umidump");
$v63a9f0ea7bb98050796b649e85481845->setAttribute('xmlns:xlink', 'http://www.w3.org/TR/xlink');
$v0cc175b9c0f1b6a831c399e269772661 = $v9a09b4dfda82e3e665e31092d1c3ec8d->createAttribute("version");
$v0cc175b9c0f1b6a831c399e269772661->appendChild($v9a09b4dfda82e3e665e31092d1c3ec8d->createTextNode(self::VERSION));
$v63a9f0ea7bb98050796b649e85481845->appendChild($v0cc175b9c0f1b6a831c399e269772661);
$v9a09b4dfda82e3e665e31092d1c3ec8d->appendChild($v63a9f0ea7bb98050796b649e85481845);
$v6f8f57715090da2632453988d9a1501b = $v9a09b4dfda82e3e665e31092d1c3ec8d->createElement("meta");
$v8b1dc169bf460ee884fceef66c6607d6 = cmsController::getInstance();
$vb1444fb0c07653567ad325aa25d4e37a = regedit::getInstance();
$vad5f82e879a9c5d6b5b442eb37e50551 = $v8b1dc169bf460ee884fceef66c6607d6->getCurrentDomain();
$v7572559ca86e781ba8fe8073a0b725c6 = $v8b1dc169bf460ee884fceef66c6607d6->getCurrentLang();
$v7b8b965ad4bca0e41ab51de7b31363a1 = $v9a09b4dfda82e3e665e31092d1c3ec8d->createElement('site-name');
$v7b8b965ad4bca0e41ab51de7b31363a1->appendChild($v9a09b4dfda82e3e665e31092d1c3ec8d->createCDATASection(def_module::parseTPLMacroses(macros_sitename())));
$v6f8f57715090da2632453988d9a1501b->appendChild($v7b8b965ad4bca0e41ab51de7b31363a1);
$v7b8b965ad4bca0e41ab51de7b31363a1 = $v9a09b4dfda82e3e665e31092d1c3ec8d->createElement('domain');
$v7b8b965ad4bca0e41ab51de7b31363a1->appendChild($v9a09b4dfda82e3e665e31092d1c3ec8d->createCDATASection($vad5f82e879a9c5d6b5b442eb37e50551->getHost()));
$v6f8f57715090da2632453988d9a1501b->appendChild($v7b8b965ad4bca0e41ab51de7b31363a1);
$v7b8b965ad4bca0e41ab51de7b31363a1 = $v9a09b4dfda82e3e665e31092d1c3ec8d->createElement('lang');
$v7b8b965ad4bca0e41ab51de7b31363a1->appendChild($v9a09b4dfda82e3e665e31092d1c3ec8d->createCDATASection($v7572559ca86e781ba8fe8073a0b725c6->getPrefix()));
$v6f8f57715090da2632453988d9a1501b->appendChild($v7b8b965ad4bca0e41ab51de7b31363a1);
$v7b8b965ad4bca0e41ab51de7b31363a1 = $v9a09b4dfda82e3e665e31092d1c3ec8d->createElement('source-name');
$v3a6d0284e743dc4a9b86f97d6dd1a3bf = strlen($this->sourceName) ? $this->sourceName : md5($vad5f82e879a9c5d6b5b442eb37e50551->getId() . $v7572559ca86e781ba8fe8073a0b725c6->getId());
$v7b8b965ad4bca0e41ab51de7b31363a1->appendChild($v9a09b4dfda82e3e665e31092d1c3ec8d->createCDATASection($v3a6d0284e743dc4a9b86f97d6dd1a3bf));
$v6f8f57715090da2632453988d9a1501b->appendChild($v7b8b965ad4bca0e41ab51de7b31363a1);
$v7b8b965ad4bca0e41ab51de7b31363a1 = $v9a09b4dfda82e3e665e31092d1c3ec8d->createElement('generate-time');
$v5fc732311905cb27e82d67f4f6511f7f = new umiDate(time());
$ve358efa489f58062f10dd7316b65649e = $v9a09b4dfda82e3e665e31092d1c3ec8d->createElement('timestamp');
$ve358efa489f58062f10dd7316b65649e->appendChild($v9a09b4dfda82e3e665e31092d1c3ec8d->createTextNode($v5fc732311905cb27e82d67f4f6511f7f->getFormattedDate("U")));
$v7b8b965ad4bca0e41ab51de7b31363a1->appendChild($ve358efa489f58062f10dd7316b65649e);
$ve358efa489f58062f10dd7316b65649e = $v9a09b4dfda82e3e665e31092d1c3ec8d->createElement('rfc');
$ve358efa489f58062f10dd7316b65649e->appendChild($v9a09b4dfda82e3e665e31092d1c3ec8d->createTextNode($v5fc732311905cb27e82d67f4f6511f7f->getFormattedDate("r")));
$v7b8b965ad4bca0e41ab51de7b31363a1->appendChild($ve358efa489f58062f10dd7316b65649e);
$ve358efa489f58062f10dd7316b65649e = $v9a09b4dfda82e3e665e31092d1c3ec8d->createElement('utc');
$ve358efa489f58062f10dd7316b65649e->appendChild($v9a09b4dfda82e3e665e31092d1c3ec8d->createTextNode($v5fc732311905cb27e82d67f4f6511f7f->getFormattedDate(DATE_ATOM)));
$v7b8b965ad4bca0e41ab51de7b31363a1->appendChild($ve358efa489f58062f10dd7316b65649e);
$v6f8f57715090da2632453988d9a1501b->appendChild($v7b8b965ad4bca0e41ab51de7b31363a1);
$v63a9f0ea7bb98050796b649e85481845->appendChild($v6f8f57715090da2632453988d9a1501b);
return $v63a9f0ea7bb98050796b649e85481845;
}
示例4: old_eip_save_editable_region
/**
* @deprecated
* only for 2.7.4 -> 2.8.0 migration
*/
public function old_eip_save_editable_region()
{
$iEntityId = getRequest('param0');
$sPropName = getRequest('param1');
$sContent = getRequest('data');
$bIsObject = (bool) getRequest('is_object');
$buffer = outputBuffer::current('HTTPOutputBuffer');
$buffer->charset('utf-8');
$buffer->contentType('text/xml');
$oEntity = $bIsObject ? umiObjectsCollection::getInstance()->getObject($iEntityId) : umiHierarchy::getInstance()->getElement($iEntityId);
// Checking rights
$bDisallowed = false;
$svId = umiObjectsCollection::getInstance()->getObjectIdByGUID('system-supervisor');
$oUsers = cmsController::getInstance()->getModule('users');
if ($oUsers->user_id != $svId) {
if ($bIsObject) {
$bDisallowed = !($oEntity->getOwnerId() == $oUsers->user_id);
} else {
list($r, $w) = permissionsCollection::getInstance()->isAllowedObject($oUsers->user_id, $iEntityId);
if (!$w) {
$bDisallowed = true;
}
}
}
if ($bDisallowed) {
$sResult = "<" . "?xml version=\"1.0\" encoding=\"utf-8\"?" . "><error>" . getLabel('error-no-permissions') . "</error>";
header("Content-type: text/xml; charset=utf-8");
$buffer->push($sResult);
$buffer->end();
}
if ($oEntity instanceof umiHierarchyElement) {
$backupModel = backupModel::getInstance();
$backupModel->addLogMessage($oEntity->getId());
if ($sPropName == "name" && strlen($sContent)) {
if ($oEntity->getValue("h1") == $oEntity->getName()) {
$oEntity->setValue("h1", $sContent);
}
}
if ($sPropName == "h1" && strlen($sContent)) {
if ($oEntity->getValue("h1") == $oEntity->getName()) {
$oEntity->setName($sContent);
}
}
}
$sPropValue = "";
if ($oEntity) {
$bOldVal = umiObjectProperty::$IGNORE_FILTER_INPUT_STRING;
umiObjectProperty::$IGNORE_FILTER_INPUT_STRING = true;
switch ($sPropName) {
case "name":
if (strlen($sContent)) {
$oEntity->setName($sContent);
}
break;
default:
$oEntity->setValue($sPropName, $sContent);
break;
}
$oEntity->commit();
umiObjectProperty::$IGNORE_FILTER_INPUT_STRING = $bOldVal;
$oObject = !$bIsObject ? $oEntity->getObject() : $oEntity;
$oObject->update();
$oEntity->update();
switch ($sPropName) {
case "name":
$sPropValue = $oEntity->getName();
break;
default:
$oProperty = $oObject->getPropByName($sPropName);
if ($oProperty instanceof umiObjectProperty) {
$oField = $oProperty->getField();
$sPropType = $oField->getFieldType()->getDataType();
switch ($sPropType) {
case "text":
case "int":
case "price":
case "float":
case "string":
$sVal = $oEntity->getValue($sPropName);
$sPropValue = $sVal;
break;
case "wysiwyg":
$sVal = $oEntity->getValue($sPropName);
$sPropValue = def_module::parseTPLMacroses($sVal);
break;
case "boolean":
$val = $oEntity->getValue($sPropName);
$sPropValue = $val ? "Да" : "Нет";
break;
case "relation":
$oGuide = umiObjectsCollection::getInstance()->getObject((int) $sContent);
if ($oGuide instanceof umiObject) {
$sPropValue = $oGuide->getName();
}
break;
case "tags":
//.........这里部分代码省略.........
示例5: createGrid
protected function createGrid()
{
$v8277e0910d750195b448797616e091ad = $this->doc;
$v6f8f57715090da2632453988d9a1501b = $v8277e0910d750195b448797616e091ad->createElement("meta");
$v8b1dc169bf460ee884fceef66c6607d6 = cmsController::getInstance();
$vb1444fb0c07653567ad325aa25d4e37a = regedit::getInstance();
$vad5f82e879a9c5d6b5b442eb37e50551 = $v8b1dc169bf460ee884fceef66c6607d6->getCurrentDomain();
$v7572559ca86e781ba8fe8073a0b725c6 = $v8b1dc169bf460ee884fceef66c6607d6->getCurrentLang();
$v7b8b965ad4bca0e41ab51de7b31363a1 = $v8277e0910d750195b448797616e091ad->createElement('site-name');
$v7b8b965ad4bca0e41ab51de7b31363a1->appendChild($v8277e0910d750195b448797616e091ad->createCDATASection(def_module::parseTPLMacroses(macros_sitename())));
$v6f8f57715090da2632453988d9a1501b->appendChild($v7b8b965ad4bca0e41ab51de7b31363a1);
$v7b8b965ad4bca0e41ab51de7b31363a1 = $v8277e0910d750195b448797616e091ad->createElement('domain');
$v7b8b965ad4bca0e41ab51de7b31363a1->appendChild($v8277e0910d750195b448797616e091ad->createCDATASection($vad5f82e879a9c5d6b5b442eb37e50551->getHost()));
$v6f8f57715090da2632453988d9a1501b->appendChild($v7b8b965ad4bca0e41ab51de7b31363a1);
$v7b8b965ad4bca0e41ab51de7b31363a1 = $v8277e0910d750195b448797616e091ad->createElement('lang');
$v7b8b965ad4bca0e41ab51de7b31363a1->appendChild($v8277e0910d750195b448797616e091ad->createCDATASection($v7572559ca86e781ba8fe8073a0b725c6->getPrefix()));
$v6f8f57715090da2632453988d9a1501b->appendChild($v7b8b965ad4bca0e41ab51de7b31363a1);
$v7b8b965ad4bca0e41ab51de7b31363a1 = $v8277e0910d750195b448797616e091ad->createElement('source-name');
$v3a6d0284e743dc4a9b86f97d6dd1a3bf = strlen($this->source_name) ? $this->source_name : md5($vad5f82e879a9c5d6b5b442eb37e50551->getId() . $v7572559ca86e781ba8fe8073a0b725c6->getId());
$v7b8b965ad4bca0e41ab51de7b31363a1->appendChild($v8277e0910d750195b448797616e091ad->createCDATASection($v3a6d0284e743dc4a9b86f97d6dd1a3bf));
$v6f8f57715090da2632453988d9a1501b->appendChild($v7b8b965ad4bca0e41ab51de7b31363a1);
$v7b8b965ad4bca0e41ab51de7b31363a1 = $v8277e0910d750195b448797616e091ad->createElement('generate-time');
$this->createDateSection(time(), $v7b8b965ad4bca0e41ab51de7b31363a1);
$v6f8f57715090da2632453988d9a1501b->appendChild($v7b8b965ad4bca0e41ab51de7b31363a1);
$this->root->appendChild($v6f8f57715090da2632453988d9a1501b);
$this->meta_container = $v6f8f57715090da2632453988d9a1501b;
$this->registry_container = $v8277e0910d750195b448797616e091ad->createElement('registry');
$this->root->appendChild($this->registry_container);
$this->dirs_container = $v8277e0910d750195b448797616e091ad->createElement('directories');
$this->root->appendChild($this->dirs_container);
$this->files_container = $v8277e0910d750195b448797616e091ad->createElement('files');
$this->root->appendChild($this->files_container);
$this->langs_container = $v8277e0910d750195b448797616e091ad->createElement('langs');
$this->root->appendChild($this->langs_container);
$this->domains_container = $v8277e0910d750195b448797616e091ad->createElement('domains');
$this->root->appendChild($this->domains_container);
$this->templates_container = $v8277e0910d750195b448797616e091ad->createElement('templates');
$this->root->appendChild($this->templates_container);
$this->data_types_container = $v8277e0910d750195b448797616e091ad->createElement('datatypes');
$this->root->appendChild($this->data_types_container);
$this->types_container = $v8277e0910d750195b448797616e091ad->createElement('types');
$this->root->appendChild($this->types_container);
$this->objects_container = $v8277e0910d750195b448797616e091ad->createElement('objects');
$this->root->appendChild($this->objects_container);
$this->pages_container = $v8277e0910d750195b448797616e091ad->createElement('pages');
$this->root->appendChild($this->pages_container);
$this->relations_container = $v8277e0910d750195b448797616e091ad->createElement('relations');
$this->root->appendChild($this->relations_container);
$this->options_container = $v8277e0910d750195b448797616e091ad->createElement('options');
$this->root->appendChild($this->options_container);
$this->restrictions_container = $v8277e0910d750195b448797616e091ad->createElement('restrictions');
$this->root->appendChild($this->restrictions_container);
$this->permissions_container = $v8277e0910d750195b448797616e091ad->createElement('permissions');
$this->root->appendChild($this->permissions_container);
$this->hierarchy_container = $v8277e0910d750195b448797616e091ad->createElement('hierarchy');
$this->root->appendChild($this->hierarchy_container);
}
示例6: setContent
public function setContent($va5374bce6e736150046560d951958df7)
{
$this->content = (string) $va5374bce6e736150046560d951958df7;
$this->content = str_replace("%", "%", $this->content);
$this->content = def_module::parseTPLMacroses($this->content);
}
示例7: publishChanges
public function publishChanges()
{
$sTitle = "Monthly dispatch";
$iDispatchId = regedit::getInstance()->getVal("//modules/forum/dispatch_id");
if (!$iDispatchId) {
return false;
}
$dispatches_module = cmsController::getInstance()->getModule('dispatches');
if (!$dispatches_module) {
return false;
}
$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);
$body = $dispatches_module->getAllChanges();
$body = def_module::parseTPLMacroses($body);
$oMsgObj->setValue('release_reference', $iReleaseId);
$oMsgObj->setValue('header', $sTitle);
$oMsgObj->setValue('body', $body);
$oMsgObj->commit();
return true;
} else {
return false;
}
}
示例8: prepareClientSideGlobalVariablesForXSLT
private function prepareClientSideGlobalVariablesForXSLT()
{
$v6d9fecd2868e8a635b6d088c3e8068c2 = array();
$v41275a535677f79ff347e01bc530c176 = permissionsCollection::getInstance();
$vb1444fb0c07653567ad325aa25d4e37a = regedit::getInstance();
$v69ae498121c2d8e63f20c7144a0246d7 = umiObjectsCollection::getInstance();
$vb81ca7c0ccaa77e7aa91936ab0070695 = umiHierarchy::getInstance();
$v8e44f0089b076e18a718eb9ca3d94674 = $v41275a535677f79ff347e01bc530c176->getUserId();
$v7552cd149af7495ee7d8225974e50f80 = $this->getCurrentElementId();
$v7b975dff6c0134c6f231fd13895c2349 = $this->getCurrentModule();
$vb6ad8768e9a35023e3d824c5057699d1 = $this->getCurrentMethod();
$va5f3e7671419d689ba41872016aded04 = true;
if ($v41275a535677f79ff347e01bc530c176->isAllowedMethod($v8e44f0089b076e18a718eb9ca3d94674, $v7b975dff6c0134c6f231fd13895c2349, $vb6ad8768e9a35023e3d824c5057699d1)) {
$va5f3e7671419d689ba41872016aded04 = false;
if ($v7552cd149af7495ee7d8225974e50f80) {
list($v4b43b0aee35624cd95b910189b3dc231) = $v41275a535677f79ff347e01bc530c176->isAllowedObject($v8e44f0089b076e18a718eb9ca3d94674, $v7552cd149af7495ee7d8225974e50f80);
if (!$v4b43b0aee35624cd95b910189b3dc231) {
$va5f3e7671419d689ba41872016aded04 = true;
$v6d9fecd2868e8a635b6d088c3e8068c2['attribute:not-permitted'] = 1;
}
}
}
if ($va5f3e7671419d689ba41872016aded04) {
$v7b975dff6c0134c6f231fd13895c2349 = "users";
$vb6ad8768e9a35023e3d824c5057699d1 = "login";
$this->setCurrentModule($v7b975dff6c0134c6f231fd13895c2349);
$this->setCurrentMethod($vb6ad8768e9a35023e3d824c5057699d1);
}
$this->currentHeader = def_module::parseTPLMacroses(macros_header());
$v6d9fecd2868e8a635b6d088c3e8068c2 += array('@module' => $v7b975dff6c0134c6f231fd13895c2349, '@method' => $vb6ad8768e9a35023e3d824c5057699d1, '@domain' => $this->getCurrentDomain()->getHost(), '@system-build' => $vb1444fb0c07653567ad325aa25d4e37a->getVal("//modules/autoupdate/system_build"), '@lang' => $this->getCurrentLang()->getPrefix(), '@pre-lang' => $this->pre_lang, '@header' => $this->currentHeader, '@title' => def_module::parseTPLMacroses(macros_title()), '@site-name' => def_module::parseTPLMacroses(macros_sitename()), 'meta' => array('keywords' => macros_keywords(), 'description' => macros_describtion()));
if (defined('CURRENT_VERSION_LINE') and CURRENT_VERSION_LINE == 'demo') {
$v6d9fecd2868e8a635b6d088c3e8068c2['@demo'] = 1;
}
if (!is_null(getRequest('p'))) {
$v6d9fecd2868e8a635b6d088c3e8068c2['@paging'] = "yes";
}
$v14e478589cc0c27c6e14f2eca7bc7ccd = cmsController::getInstance()->getModule("social_networks");
if ($v14e478589cc0c27c6e14f2eca7bc7ccd && ($v32a2f74bd1a12b30d1879b4b0ab59d64 = $v14e478589cc0c27c6e14f2eca7bc7ccd->getCurrentSocial())) {
$v6d9fecd2868e8a635b6d088c3e8068c2['@socialId'] = $v32a2f74bd1a12b30d1879b4b0ab59d64->getId();
}
if ($vb6ee27ee7fe19b0c0dd907d5f947aa12 = getServer('REQUEST_URI')) {
$vafbad9dc43d3b9eb8533cd54a4df6a87 = @parse_url($vb6ee27ee7fe19b0c0dd907d5f947aa12);
$vb6ee27ee7fe19b0c0dd907d5f947aa12 = getArrayKey($vafbad9dc43d3b9eb8533cd54a4df6a87, 'path');
$vf7cc8e4882789cf3335d9ed97f208c6f = getArrayKey($vafbad9dc43d3b9eb8533cd54a4df6a87, 'query');
if ($v14e478589cc0c27c6e14f2eca7bc7ccd && ($v32a2f74bd1a12b30d1879b4b0ab59d64 = $v14e478589cc0c27c6e14f2eca7bc7ccd->getCurrentSocial())) {
$vf7cc8e4882789cf3335d9ed97f208c6f = "";
}
if ($vf7cc8e4882789cf3335d9ed97f208c6f) {
parse_str($vf7cc8e4882789cf3335d9ed97f208c6f, $v5ebb3c9d5620968cde8459888eff1702);
if (isset($v5ebb3c9d5620968cde8459888eff1702['p'])) {
unset($v5ebb3c9d5620968cde8459888eff1702['p']);
}
if (isset($v5ebb3c9d5620968cde8459888eff1702['xmlMode'])) {
unset($v5ebb3c9d5620968cde8459888eff1702['xmlMode']);
}
$vf7cc8e4882789cf3335d9ed97f208c6f = http_build_query($v5ebb3c9d5620968cde8459888eff1702, '', '&');
if ($vf7cc8e4882789cf3335d9ed97f208c6f) {
$vb6ee27ee7fe19b0c0dd907d5f947aa12 .= '?' . $vf7cc8e4882789cf3335d9ed97f208c6f;
}
}
$v6d9fecd2868e8a635b6d088c3e8068c2['@request-uri'] = $vb6ee27ee7fe19b0c0dd907d5f947aa12;
}
$v49f290d6e8459c53f31f97de37921086 = array();
$v8e44f0089b076e18a718eb9ca3d94674 = $this->getModule('users')->user_id;
$v49f290d6e8459c53f31f97de37921086['@id'] = $v8e44f0089b076e18a718eb9ca3d94674;
$v3d88fcbaa3581c4957147ef9ad47ec5e = 'guest';
if ($v41275a535677f79ff347e01bc530c176->isAuth() && ($vee11cbb19052e40b07aac0ca060c23ee = $v69ae498121c2d8e63f20c7144a0246d7->getObject($v8e44f0089b076e18a718eb9ca3d94674))) {
$v3d88fcbaa3581c4957147ef9ad47ec5e = 'user';
$v49f290d6e8459c53f31f97de37921086['@status'] = 'auth';
$v49f290d6e8459c53f31f97de37921086['@login'] = $vee11cbb19052e40b07aac0ca060c23ee->login;
$v49f290d6e8459c53f31f97de37921086['xlink:href'] = $vee11cbb19052e40b07aac0ca060c23ee->xlink;
if ($v41275a535677f79ff347e01bc530c176->isAdmin()) {
$v3d88fcbaa3581c4957147ef9ad47ec5e = 'admin';
if ($v41275a535677f79ff347e01bc530c176->isSv()) {
$v3d88fcbaa3581c4957147ef9ad47ec5e = 'sv';
}
}
}
$v49f290d6e8459c53f31f97de37921086['@type'] = $v3d88fcbaa3581c4957147ef9ad47ec5e;
if ($vabb341de59578cc2eefc8b95d451142b = $this->getModule("geoip")) {
$vdfc4832c05a0296e4f53eff66626baec = $vabb341de59578cc2eefc8b95d451142b->lookupIp();
if (!isset($vdfc4832c05a0296e4f53eff66626baec['special'])) {
$v49f290d6e8459c53f31f97de37921086['geo'] = array('country' => $vdfc4832c05a0296e4f53eff66626baec['country'], 'region' => $vdfc4832c05a0296e4f53eff66626baec['region'], 'city' => $vdfc4832c05a0296e4f53eff66626baec['city'], 'latitude' => $vdfc4832c05a0296e4f53eff66626baec['lat'], 'longitude' => $vdfc4832c05a0296e4f53eff66626baec['lon']);
} else {
$v49f290d6e8459c53f31f97de37921086['geo'] = array('special' => $vdfc4832c05a0296e4f53eff66626baec['special']);
}
}
$v6d9fecd2868e8a635b6d088c3e8068c2['user'] = $v49f290d6e8459c53f31f97de37921086;
if ($v7552cd149af7495ee7d8225974e50f80 && ($v8e2dcfd7e7e24b1ca76c1193f645902b = $vb81ca7c0ccaa77e7aa91936ab0070695->getElement($v7552cd149af7495ee7d8225974e50f80))) {
$v587a02d1eb09e2b2fd6514d36a7c3438 = $vb81ca7c0ccaa77e7aa91936ab0070695->getAllParents($v7552cd149af7495ee7d8225974e50f80);
$v8e13d18cd44dd15da3533bd4db912ab8 = array();
foreach ($v587a02d1eb09e2b2fd6514d36a7c3438 as $v72352a4d26581ef082a6d2243c5a6b88) {
if ($v72352a4d26581ef082a6d2243c5a6b88 == 0) {
continue;
}
if ($va4f09cfeea7392a1f6df6a3de5c3bc9e = $vb81ca7c0ccaa77e7aa91936ab0070695->getElement($v72352a4d26581ef082a6d2243c5a6b88)) {
$v8e13d18cd44dd15da3533bd4db912ab8[] = $va4f09cfeea7392a1f6df6a3de5c3bc9e;
}
}
$v6d9fecd2868e8a635b6d088c3e8068c2 += array('@pageId' => $v7552cd149af7495ee7d8225974e50f80, 'parents' => array('+page' => $v8e13d18cd44dd15da3533bd4db912ab8), 'full:page' => $v8e2dcfd7e7e24b1ca76c1193f645902b);
//.........这里部分代码省略.........
示例9: parseInput
public function parseInput($va43c1b0aa53a0c908810c06ab1ff3967, $vc9e9a848920877e76685b2e4e76de38d = 1)
{
return def_module::parseTPLMacroses($va43c1b0aa53a0c908810c06ab1ff3967);
}
示例10: getSiteName
protected function getSiteName()
{
$va072dbbe3bd3b2f40eaf73aa4066ede7 = cmsController::getInstance();
$v78e6dd7a49f5b0cb2106a3a434dd5c86 = $va072dbbe3bd3b2f40eaf73aa4066ede7->getCurrentLang()->getId();
$v662cbf1253ac7d8750ed9190c52163e5 = $va072dbbe3bd3b2f40eaf73aa4066ede7->getCurrentDomain()->getId();
$vb1444fb0c07653567ad325aa25d4e37a = regedit::getInstance();
$v851f5ac9941d720844d143ed9cfcf60a = $vb1444fb0c07653567ad325aa25d4e37a->getVal("//settings/title_prefix/{$v78e6dd7a49f5b0cb2106a3a434dd5c86}/{$v662cbf1253ac7d8750ed9190c52163e5}");
$vf418892c852ccf5c86998e89045e8063 = def_module::parseTPLMacroses(macros_sitename());
if (strlen($v851f5ac9941d720844d143ed9cfcf60a)) {
return $v851f5ac9941d720844d143ed9cfcf60a . " " . $vf418892c852ccf5c86998e89045e8063;
} else {
return $vf418892c852ccf5c86998e89045e8063;
}
}
示例11: post
public function post($template = "default")
{
if (!$template) {
$template = getRequest('template');
}
if (!$template) {
$template = "default";
}
if (!def_module::isXSLTResultMode()) {
list($template_block, $template_block_voted, $template_block_closed, $template_block_ok) = def_module::loadTemplates("vote/" . $template, "js_block", "js_block_voted", "js_block_closed", "js_block_ok");
} else {
list($template_block, $template_block_voted, $template_block_closed, $template_block_ok) = array(false, false, false, false);
}
$item_id = (int) getRequest('param0');
$item = umiObjectsCollection::getInstance()->getObject($item_id);
$referer_url = getServer("HTTP_REFERER") ? getServer("HTTP_REFERER") : "/";
$this->errorRegisterFailPage($referer_url);
if (!$item instanceof umiObject) {
$this->errorNewMessage(getLabel('error-page-does-not-exist', null, ''));
$this->errorPanic();
}
$poll_rel = $item->getValue("poll_rel");
$object_id = $poll_rel;
$object = umiObjectsCollection::getInstance()->getObject($object_id);
if (!$object instanceof umiObject) {
$this->errorNewMessage(getLabel('error-page-does-not-exist', null, ''));
$this->errorPanic();
}
if ($this->checkIsVoted($object_id)) {
$res = $template_block_voted ? $template_block_voted : "Вы уже проголосовали";
} else {
if ($object->getValue("is_closed")) {
$res = $template_block_closed ? $template_block_closed : "Ошибка. Голосование не активно, либо закрыто.";
} else {
$count = $item->getValue("count");
$item->setValue("count", ++$count);
$item->setValue("poll_rel", $poll_rel);
$item->commit();
if ($this->is_private) {
$oUsersMdl = cmsController::getInstance()->getModule("users");
if ($oUsersMdl) {
$oUser = umiObjectsCollection::getInstance()->getObject($oUsersMdl->user_id);
if ($oUser instanceof umiObject) {
$arrRatedPages = $oUser->getValue("rated_pages");
$arrRatedPagesIds = array();
foreach ($arrRatedPages as $vVal) {
if ($vVal instanceof umiHierarchyElement) {
$arrRatedPagesIds[] = intval($vVal->getId());
} else {
$arrRatedPagesIds[] = intval($vVal);
}
}
$arrVotePages = umiHierarchy::getInstance()->getObjectInstances($object_id);
$arrVotePages = array_map("intval", $arrVotePages);
$arrRated = array_merge($arrRatedPagesIds, $arrVotePages);
$oUser->setValue("rated_pages", array_unique($arrRated));
$oUser->commit();
}
}
}
$oEventPoint = new umiEventPoint("pollPost");
$oEventPoint->setMode("after");
$oEventPoint->setParam("poll", $object);
$oEventPoint->setParam("answer", $item);
$this->setEventPoint($oEventPoint);
$res = $template_block_ok ? $template_block_ok : "Ваше мнение учтено";
}
if (!isset($_SESSION['vote_polled']) || !is_array($_SESSION['vote_polled'])) {
$_SESSION['vote_polled'] = array();
}
}
$_SESSION['vote_polled'][] = $object_id;
$res = def_module::parseTPLMacroses($res);
if ($template_block) {
$block_arr = array();
$block_arr['res'] = $res;
$r = $this->parseTemplate($template_block, $block_arr);
$this->flush($r, "text/javascript");
} else {
$this->flush("alert('{$res}');", "text/javascript");
}
}
示例12: getEditForm
/**
* TODO PHPDoc
* Enter description here ...
* @param unknown_type $object_id
* @param unknown_type $template
* @param unknown_type $groups_names
* @param unknown_type $all
* @param unknown_type $ignorePermissions
*/
public function getEditForm($object_id, $template = "default", $groups_names = "", $all = false, $ignorePermissions = false)
{
if (!$template) {
$template = "default";
}
$b_allow = false;
$inst_users = cmsController::getInstance()->getModule("users");
$permissions = permissionsCollection::getInstance();
if ($permissions->isSv()) {
$ignorePermissions = true;
}
if ($permissions->isSv()) {
$ignorePermissions = true;
}
if (!$ignorePermissions) {
$b_allow = $permissions->isOwnerOfObject($object_id);
$arr_helements = umiHierarchy::getInstance()->getObjectInstances($object_id);
foreach ($arr_helements as $i_element_id) {
$arr_allow = $inst_users->isAllowedObject($inst_users->user_id, $i_element_id);
if (is_array($arr_allow) && count($arr_allow) > 1) {
$b_allow = intval($arr_allow[1]);
if ($b_allow) {
break;
}
}
}
if (!$b_allow) {
return def_module::parseTPLMacroses("%data_edit_foregin_object%");
}
}
$groups_names = trim($groups_names);
$groups_names = strlen($groups_names) ? explode(" ", $groups_names) : array();
list($template_block, $template_block_empty, $template_line) = def_module::loadTemplates("data/reflection/{$template}", "reflection_block", "reflection_block_empty", "reflection_group");
if (!($object = umiObjectsCollection::getInstance()->getObject($object_id))) {
return $template_block_empty;
}
$object_type_id = $object->getTypeId();
$groups_arr = $this->getTypeFieldGroups($object_type_id);
$groups = array();
foreach ($groups_arr as $group) {
if (!$group->getIsActive()) {
continue;
}
if (sizeof($groups_names)) {
if (!in_array($group->getName(), $groups_names)) {
continue;
}
} else {
if (!$group->getIsActive() || !$group->getIsVisible() && !$all) {
continue;
}
}
$line_arr = array();
$fields_arr = $group->getFields();
$fields = array();
foreach ($fields_arr as $field) {
if (!$field->getIsVisible() && !$all) {
continue;
}
if ($field->getIsSystem()) {
continue;
}
$fields[] = $this->renderEditField($template, $field, $object);
}
if (empty($fields)) {
continue;
}
$line_arr['attribute:name'] = $group->getName();
$line_arr['attribute:title'] = $group->getTitle();
$line_arr['nodes:field'] = $line_arr['void:fields'] = $fields;
$groups[] = def_module::parseTemplate($template_line, $line_arr);
}
$block_arr['nodes:group'] = $block_arr['void:groups'] = $groups;
return def_module::parseTemplate($template_block, $block_arr, false, $object_id);
}
示例13: getOuterContent
public function getOuterContent($v61dd86c2dc75c3f569ec619bd283a33f, $v8c58e4e21f2c1d8038c61963ba47d476 = "UTF-8")
{
if (!$v8c58e4e21f2c1d8038c61963ba47d476) {
$v8c58e4e21f2c1d8038c61963ba47d476 = "UTF-8";
}
if (str_replace("http://", "", $v61dd86c2dc75c3f569ec619bd283a33f) != $v61dd86c2dc75c3f569ec619bd283a33f || str_replace("umap://", "", $v61dd86c2dc75c3f569ec619bd283a33f) != $v61dd86c2dc75c3f569ec619bd283a33f) {
if ($v9b207167e5381c47682c6b4f58a623fb = cacheFrontend::getInstance()->loadSql($v61dd86c2dc75c3f569ec619bd283a33f)) {
return $v9b207167e5381c47682c6b4f58a623fb;
}
$v9b207167e5381c47682c6b4f58a623fb = umiRemoteFileGetter::get($v61dd86c2dc75c3f569ec619bd283a33f);
if ($v8c58e4e21f2c1d8038c61963ba47d476 != "UTF-8") {
$v9b207167e5381c47682c6b4f58a623fb = iconv($v8c58e4e21f2c1d8038c61963ba47d476, "UTF-8//IGNORE", $v9b207167e5381c47682c6b4f58a623fb);
}
cacheFrontend::getInstance()->saveSql($v61dd86c2dc75c3f569ec619bd283a33f, $v9b207167e5381c47682c6b4f58a623fb);
return $v9b207167e5381c47682c6b4f58a623fb;
} else {
if (substr($v61dd86c2dc75c3f569ec619bd283a33f, -4, 4) == ".tpl") {
$v61dd86c2dc75c3f569ec619bd283a33f = preg_replace('|[\\/]{2,}|', '/', $v61dd86c2dc75c3f569ec619bd283a33f);
$v9b207167e5381c47682c6b4f58a623fb = umiRemoteFileGetter::get($v61dd86c2dc75c3f569ec619bd283a33f);
if ($v8c58e4e21f2c1d8038c61963ba47d476 != "UTF-8") {
$v9b207167e5381c47682c6b4f58a623fb = iconv($v8c58e4e21f2c1d8038c61963ba47d476, "UTF-8//IGNORE", $v9b207167e5381c47682c6b4f58a623fb);
}
$v38f6b9a82e70bf7b0c240ce3e48f3d47 = cmsController::getInstance()->getGlobalVariables();
return def_module::parseTPLMacroses($v9b207167e5381c47682c6b4f58a623fb, cmsController::getInstance()->getCurrentElementId(), false, $v38f6b9a82e70bf7b0c240ce3e48f3d47);
} else {
throw new publicException(getLabel('error-resource-not-found', null, $v61dd86c2dc75c3f569ec619bd283a33f));
}
}
}
示例14: translateData
protected function translateData(publicException $v42552b1f133f9f8eb406d4f306ea9fd1)
{
return array('error' => array('node:msg' => def_module::parseTPLMacroses($v42552b1f133f9f8eb406d4f306ea9fd1->getMessage())));
}
示例15: parseMacros
public function parseMacros($vdc3ef687d19cc2fb071d846f9360ecbe)
{
return def_module::parseTPLMacroses($vdc3ef687d19cc2fb071d846f9360ecbe);
}