当前位置: 首页>>代码示例>>PHP>>正文


PHP Sigma::hideblock方法代码示例

本文整理汇总了PHP中Cx\Core\Html\Sigma::hideblock方法的典型用法代码示例。如果您正苦于以下问题:PHP Sigma::hideblock方法的具体用法?PHP Sigma::hideblock怎么用?PHP Sigma::hideblock使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Cx\Core\Html\Sigma的用法示例。


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

示例1: intval

 /**
  * show the details of an object
  * @return void
  */
 function _showObject()
 {
     global $objDatabase, $_ARRAYLANG;
     if (!empty($_GET['id'])) {
         $immoID = intval($_GET['id']);
         if (empty($immoID)) {
             \Cx\Core\Csrf\Controller\Csrf::header('Location: ?section=immo&cmd=immolist');
             die;
         }
     }
     $this->_getFieldNames($immoID, $this->frontLang);
     if (($objRS = $objDatabase->SelectLimit('SELECT reference FROM ' . DBPREFIX . 'module_immo WHERE id=' . $immoID, 1)) !== false) {
         $reference = $objRS->fields['reference'];
     }
     $this->_objTpl->setGlobalVariable(array('TXT_IMMO_PRICE_PREFIX' => $this->arrSettings['currency_lang_' . $this->frontLang], 'TXT_IMMO_PRICE_SUFFIX' => $this->_currencySuffix, 'TXT_IMMO_SHOWMAP' => $_ARRAYLANG['TXT_IMMO_SHOWMAP'], 'TXT_IMMO_PRINT_PAGE' => $_ARRAYLANG['TXT_IMMO_PRINT_PAGE'], 'TXT_IMMO_BACK' => $_ARRAYLANG['TXT_IMMO_BACK'], 'TXT_IMMO_CONTACT_FORM' => $_ARRAYLANG['TXT_IMMO_CONTACT_FORM'], 'TXT_IMMO_HOMEPAGE_LINK' => $_ARRAYLANG['TXT_IMMO_HOMEPAGE_LINK'], 'TXT_IMMO_SERVICE_LINKS' => $_ARRAYLANG['TXT_IMMO_SERVICE_LINKS'], 'TXT_IMMO_GOTO_TOP' => $_ARRAYLANG['TXT_IMMO_GOTO_TOP'], 'TXT_IMMO_TO_PICTURES' => $_ARRAYLANG['TXT_IMMO_TO_PICTURES'], 'TXT_IMMO_TO_OBJECTDATA' => $_ARRAYLANG['TXT_IMMO_TO_OBJECTDATA'], 'TXT_IMMO_TO_LINKS' => $_ARRAYLANG['TXT_IMMO_TO_LINKS'], 'TXT_IMMO_PICTURES' => $_ARRAYLANG['TXT_IMMO_PICTURES'], 'TXT_IMMO_OBJECTDATA' => $_ARRAYLANG['TXT_IMMO_OBJECTDATA'], 'TXT_IMMO_LINKS' => $_ARRAYLANG['TXT_IMMO_LINKS'], 'TXT_IMMO_TO_PLANS' => $_ARRAYLANG['TXT_IMMO_TO_PLANS'], 'TXT_IMMO_TO_MAP' => $_ARRAYLANG['TXT_IMMO_TO_MAP'], 'TXT_IMMO_INTERESTED_IN_OBJECT' => $_ARRAYLANG['TXT_IMMO_INTERESTED_IN_OBJECT'], 'IMMO_ID' => $immoID, 'IMMO_DETAILS_JAVASCRIPT' => $this->_getDetailsJS()));
     $img = $this->_getFieldFromText('Übersichtsbild', 'img');
     $imgOverviewKey = $this->_currFieldID;
     $imgdim = $this->_getImageDim($img, 540);
     $homepageLink = trim($this->_getFieldFromText('Link auf Homepage'));
     $homepageLink_active = $this->_getFieldFromText('Link auf Homepage', 'active');
     $this->_getListing();
     $this->_objTpl->setVariable(array('IMMO_HEADER' => $this->_getFieldFromText('Kopfzeile'), 'IMMO_ADDRESS' => $this->_getFieldFromText('Adresse'), 'IMMO_REF_NR' => $reference, 'IMMO_LOCATION' => $this->_getFieldFromText('Ort'), 'IMMO_PRICE' => $this->_getFieldFromText('Preis'), 'IMMO_DESCRIPTION' => $this->_getFieldFromText('Beschreibung'), 'IMMO_HEADLINE' => $this->_getFieldFromText('Headline'), 'IMMO_HOMEPAGE_LINK' => $homepageLink, 'IMMO_IMG_DIM' => $imgdim[0], 'IMMO_IMG_WIDTH' => $imgdim[1], 'IMMO_IMG_HEIGHT' => $imgdim[2], 'IMMO_IMG_SRC' => $img, 'IMMO_ID' => $immoID, 'IMMO_IMAGES_INDEX' => $imgOverviewKey));
     if ($homepageLink != '' && $homepageLink_active) {
         $this->_objTpl->parse("homepageLink");
     } else {
         $this->_objTpl->hideblock("homepageLink");
     }
     $this->_objTpl->parse("basicData");
     $imgRow = 1;
     $lnkRow = 1;
     $textcount = 0;
     $imagecount = 0;
     $linkcount = 0;
     foreach ($this->fieldNames as $fieldKey => $field) {
         if ($field['content']['active'] == 1 && !in_array($field['names'][1], $this->_usedFields)) {
             switch ($field['type']) {
                 case 'text':
                 case 'textarea':
                 case 'digits_only':
                 case 'price':
                     $textcount++;
                     $this->_objTpl->setVariable(array('IMMO_FIELD_NAME' => htmlentities($field['names'][$this->frontLang], ENT_QUOTES, CONTREXX_CHARSET), 'IMMO_FIELD_CONTENT' => htmlentities($field['type'] == 'price' ? number_format($field['content'][$this->frontLang], $this->_arrPriceFormat[$this->frontLang]['dec'], $this->_arrPriceFormat[$this->frontLang]['dec_sep'], $this->_arrPriceFormat[$this->frontLang]['thousand_sep']) : $field['content'][$this->frontLang], ENT_QUOTES, CONTREXX_CHARSET), 'TXT_IMMO_CURRENCY_PREFIX' => $field['type'] == 'price' ? htmlentities($this->arrSettings['currency_lang_' . $this->frontLang], ENT_QUOTES, CONTREXX_CHARSET) : '', 'TXT_IMMO_CURRENCY_SUFFIX' => $field['type'] == 'price' ? $this->_currencySuffix : ''));
                     if (trim($field['content'][$this->frontLang]) != '') {
                         if ($textcount < $this->_fieldCount['text']) {
                             $this->_objTpl->touchBlock('textListHR');
                         }
                         $this->_objTpl->parse('textList');
                     }
                     break;
                 case 'img':
                     $imagecount++;
                     $img = trim($field['img']);
                     if (!empty($img)) {
                         $imgdim = $this->_getImageDim($img, 160);
                         $this->_objTpl->setVariable(array('IMMO_FIELD_NAME' => htmlentities($field['names'][$this->frontLang], ENT_QUOTES, CONTREXX_CHARSET), 'IMMO_FIELD_CONTENT' => htmlentities($field['content'][$this->frontLang], ENT_QUOTES, CONTREXX_CHARSET), 'IMMO_IMG_SRC' => $img, 'IMMO_IMG_WIDTH' => $imgdim[1], 'IMMO_IMG_HEIGHT' => $imgdim[2], 'IMMO_IMG_DIM' => $imgdim[0], 'IMMO_IMAGES_INDEX' => $fieldKey));
                         if ($fieldKey == 125) {
                             $this->_objTpl->touchBlock("anchor_plan_images");
                         }
                         if ($imgRow++ % 3 == 0) {
                             if ($imagecount < $this->_fieldCount['img']) {
                                 $this->_objTpl->touchBlock('imageListHR');
                             }
                             $this->_objTpl->parse('imageList');
                             $this->_objTpl->parse('imageListRow');
                         } else {
                             $this->_objTpl->parse('imageList');
                         }
                     }
                     break;
                 case 'panorama':
                     $img = trim($field['img']);
                     if (!empty($img)) {
                         $imgdim = $this->_getImageDim($img, 530);
                         $this->_objTpl->setVariable(array('IMMO_FIELD_NAME' => htmlentities($field['names'][$this->frontLang], ENT_QUOTES, CONTREXX_CHARSET), 'IMMO_FIELD_CONTENT' => htmlentities($field['content'][$this->frontLang], ENT_QUOTES, CONTREXX_CHARSET), 'IMMO_IMG_SRC' => $img, 'IMMO_IMG_WIDTH' => $imgdim[1], 'IMMO_IMG_HEIGHT' => $imgdim[2], 'IMMO_IMG_DIM' => $imgdim[0], 'IMMO_IMAGES_INDEX' => $fieldKey));
                         $this->_objTpl->parse('panorama');
                     }
                     break;
                 case 'link':
                 case 'protected_link':
                     $linkcount++;
                     $splitName = explode(" - ", $field['names'][$this->frontLang]);
                     $iconType = strtolower(trim($splitName[count($splitName) - 1]));
                     $this->_objTpl->setVariable(array('IMMO_LINK_ICON_SRC' => $this->_getIcon($iconType), 'IMMO_FIELD_NAME' => htmlentities($field['names'][$this->frontLang], ENT_QUOTES, CONTREXX_CHARSET), 'IMMO_FIELD_CONTENT' => htmlspecialchars($field['type'] == 'protected_link' ? '?section=immo&amp;cmd=getPDF&amp;id=' . $immoID . '_' . $fieldKey : $field['content'][$this->frontLang])));
                     if (trim($field['content'][$this->frontLang]) != '') {
                         if ($lnkRow++ % 2 == 0) {
                             $this->_objTpl->parse('linkList');
                             $this->_objTpl->parse('linkListRow');
                         } else {
                             $this->_objTpl->parse('linkList');
                         }
                     }
                     break;
             }
         }
     }
 }
开发者ID:Cloudrexx,项目名称:cloudrexx,代码行数:100,代码来源:index.class.php


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