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


PHP Sigma::loadTemplateFile方法代码示例

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


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

示例1:

 /**
  * placeholder
  * @global object $objDatabase
  * @global array $_ARRAYLANG
  */
 function _placeholder()
 {
     global $_ARRAYLANG;
     $this->_pageTitle = $_ARRAYLANG['TXT_PLACEHOLDER'];
     $this->objTemplate->loadTemplateFile('placeholder.html');
     $this->objTemplate->setVariable(array('TXT_DOWNLOADS_DOWNLOADS' => $_ARRAYLANG['TXT_DOWNLOADS_DOWNLOADS'], 'TXT_DOWNLOADS_ICONS' => $_ARRAYLANG['TXT_DOWNLOADS_ICONS'], 'TXT_DOWNLOADS_CATEGORIES' => $_ARRAYLANG['TXT_DOWNLOADS_CATEGORIES'], 'TXT_PLACEHOLDER_FILE_ID' => $_ARRAYLANG['TXT_PLACEHOLDER_FILE_ID'], 'TXT_PLACEHOLDER_FILE_NAME' => $_ARRAYLANG['TXT_PLACEHOLDER_FILE_NAME'], 'TXT_PLACEHOLDER_FILE_DESC' => $_ARRAYLANG['TXT_PLACEHOLDER_FILE_DESC'], 'TXT_PLACEHOLDER_FILE_TYPE' => $_ARRAYLANG['TXT_PLACEHOLDER_FILE_TYPE'], 'TXT_PLACEHOLDER_FILE_SIZE' => $_ARRAYLANG['TXT_PLACEHOLDER_FILE_SIZE'], 'TXT_PLACEHOLDER_FILE_IMG' => $_ARRAYLANG['TXT_PLACEHOLDER_FILE_IMG'], 'TXT_PLACEHOLDER_FILE_AUTHOR' => $_ARRAYLANG['TXT_PLACEHOLDER_FILE_AUTHOR'], 'TXT_PLACEHOLDER_FILE_CREATED' => $_ARRAYLANG['TXT_PLACEHOLDER_FILE_CREATED'], 'TXT_PLACEHOLDER_FILE_LICENSE' => $_ARRAYLANG['TXT_PLACEHOLDER_FILE_LICENSE'], 'TXT_PLACEHOLDER_FILE_VERSION' => $_ARRAYLANG['TXT_PLACEHOLDER_FILE_VERSION'], 'TXT_PLACEHOLDER_CATEGORY_ID' => $_ARRAYLANG['TXT_PLACEHOLDER_CATEGORY_ID'], 'TXT_PLACEHOLDER_CATEGORY_NAME' => $_ARRAYLANG['TXT_PLACEHOLDER_CATEGORY_NAME'], 'TXT_PLACEHOLDER_CATEGORY_DESC' => $_ARRAYLANG['TXT_PLACEHOLDER_CATEGORY_DESC'], 'TXT_PLACEHOLDER_ICON_DISPLAY' => $_ARRAYLANG['TXT_PLACEHOLDER_ICON_DISPLAY'], 'TXT_PLACEHOLDER_ICON_FILTERS' => $_ARRAYLANG['TXT_PLACEHOLDER_ICON_FILTERS'], 'TXT_PLACEHOLDER_ICON_CATEGORY' => $_ARRAYLANG['TXT_PLACEHOLDER_ICON_CATEGORY'], 'TXT_PLACEHOLDER_ICON_FILE' => $_ARRAYLANG['TXT_PLACEHOLDER_ICON_FILE'], 'TXT_PLACEHOLDER_ICON_DOWNLOAD' => $_ARRAYLANG['TXT_PLACEHOLDER_ICON_DOWNLOAD'], 'TXT_PLACEHOLDER_ICON_INFO' => $_ARRAYLANG['TXT_PLACEHOLDER_ICON_INFO']));
 }
开发者ID:Niggu,项目名称:cloudrexx,代码行数:12,代码来源:DownloadsManager.class.php

示例2: renderOptionField

 /**
  * Render the option field in the backend.
  *
  * @param Sigma $template
  */
 public function renderOptionField($template)
 {
     global $_ARRAYLANG;
     $subTemplate = new Sigma();
     $subTemplate->loadTemplateFile($this->cx->getCodeBaseCoreModulePath() . '/TemplateEditor/View/Template/Backend/ImagesSeriesOption.html');
     $subTemplate->setGlobalVariable($_ARRAYLANG);
     foreach ($this->urls as $id => $url) {
         $subTemplate->setVariable('TEMPLATEEDITOR_OPTION_VALUE', $url);
         $subTemplate->setVariable('TEMPLATEEDITOR_OPTION_ID', $id);
         $subTemplate->parse('images');
     }
     $mediaBrowser = new MediaBrowser();
     $mediaBrowserId = $this->name . '_mediabrowser';
     $mediaBrowser->setOptions(array('id' => $mediaBrowserId));
     $mediaBrowser->setOptions(array('views' => 'uploader,filebrowser', 'startview' => 'filebrowser'));
     $mediaBrowser->setCallback('callback_' . $this->name);
     $subTemplate->setVariable('MEDIABROWSER_BUTTON', $mediaBrowser->getXHtml($_ARRAYLANG['TXT_CORE_MODULE_TEMPLATEEDITOR_ADD_PICTURE']));
     $subTemplate->setVariable('MEDIABROWSER_ID', $mediaBrowserId);
     $subTemplate->setVariable('TEMPLATEEDITOR_OPTION_NAME', $this->name);
     $subTemplate->setVariable('TEMPLATEEDITOR_OPTION_HUMAN_NAME', $this->humanName);
     //Get last key
     end($this->urls);
     $key = key($this->urls);
     $key = $key != null ? $key : '0';
     $subTemplate->setVariable('TEMPLATEEDITOR_LASTID', $key);
     $template->setVariable('TEMPLATEEDITOR_OPTION', $subTemplate->get());
     $template->setVariable('TEMPLATEEDITOR_OPTION_TYPE', 'img series');
     $template->parse('option');
 }
开发者ID:Niggu,项目名称:cloudrexx,代码行数:34,代码来源:ImageSeriesOption.class.php

示例3: count

 /**
  * Show the customer and article group discounts for editing.
  *
  * Handles storing of the discounts as well.
  * @return    boolean             True on success, false otherwise
  * @author    Reto Kohli <reto.kohli@comvation.com>
  */
 function view_customer_discounts()
 {
     if (!empty($_POST['store'])) {
         $this->store_discount_customer();
     }
     self::$objTemplate->loadTemplateFile("module_shop_discount_customer.html");
     // Discounts overview
     $arrCustomerGroups = Discount::getCustomerGroupArray();
     $arrArticleGroups = Discount::getArticleGroupArray();
     $arrRate = null;
     $arrRate = Discount::getDiscountRateCustomerArray();
     $i = 0;
     // Set up the customer groups header
     self::$objTemplate->setVariable(array('SHOP_CUSTOMER_GROUP_COUNT' => count($arrCustomerGroups), 'SHOP_DISCOUNT_ROW_STYLE' => 'row' . (++$i % 2 + 1)));
     foreach ($arrCustomerGroups as $id => $arrCustomerGroup) {
         self::$objTemplate->setVariable(array('SHOP_CUSTOMER_GROUP_ID' => $id, 'SHOP_CUSTOMER_GROUP_NAME' => $arrCustomerGroup['name']));
         self::$objTemplate->parse('customer_group_header_column');
         self::$objTemplate->touchBlock('article_group_header_column');
         self::$objTemplate->parse('article_group_header_column');
     }
     foreach ($arrArticleGroups as $groupArticleId => $arrArticleGroup) {
         //DBG::log("Article group ID $groupArticleId");
         foreach ($arrCustomerGroups as $groupCustomerId => $arrCustomerGroup) {
             $rate = isset($arrRate[$groupCustomerId][$groupArticleId]) ? $arrRate[$groupCustomerId][$groupArticleId] : 0;
             self::$objTemplate->setVariable(array('SHOP_CUSTOMER_GROUP_ID' => $groupCustomerId, 'SHOP_DISCOUNT_RATE' => sprintf('%2.2f', $rate)));
             self::$objTemplate->parse('discount_column');
         }
         self::$objTemplate->setVariable(array('SHOP_ARTICLE_GROUP_ID' => $groupArticleId, 'SHOP_ARTICLE_GROUP_NAME' => $arrArticleGroup['name'], 'SHOP_DISCOUNT_ROW_STYLE' => 'row' . (++$i % 2 + 1)));
         self::$objTemplate->parse('article_group_row');
     }
     self::$objTemplate->setGlobalVariable('SHOP_DISCOUNT_ROW_STYLE', 'row' . (++$i % 2 + 1));
     //        self::$objTemplate->touchBlock('article_group_header_row');
     //        self::$objTemplate->parse('article_group_header_row');
     return true;
 }
开发者ID:Niggu,项目名称:cloudrexx,代码行数:42,代码来源:ShopManager.class.php

示例4: renderOptionField

 /**
  * Render the option field in the backend.
  *
  * @param Sigma $template
  */
 public function renderOptionField($template)
 {
     $subTemplate = new Sigma();
     $subTemplate->loadTemplateFile($this->cx->getCodeBaseCoreModulePath() . '/TemplateEditor/View/Template/Backend/AreaOption.html');
     $subTemplate->setVariable('TEMPLATEEDITOR_OPTION_VALUE', $this->active ? 'checked' : '');
     $subTemplate->setVariable('TEMPLATEEDITOR_OPTION_NAME', $this->name);
     $subTemplate->setVariable('TEMPLATEEDITOR_OPTION_HUMAN_NAME', $this->humanName);
     $template->setVariable('TEMPLATEEDITOR_OPTION', $subTemplate->get());
     $template->setVariable('TEMPLATEEDITOR_OPTION_TYPE', 'area');
     $template->parse('option');
 }
开发者ID:hbdsklf,项目名称:LimeCMS,代码行数:16,代码来源:AreaOption.class.php

示例5: renderOptionField

 /**
  * Render the option field in the backend.
  *
  * @param Sigma $template
  */
 public function renderOptionField($template)
 {
     global $_ARRAYLANG;
     $subTemplate = new Sigma();
     $subTemplate->loadTemplateFile($this->cx->getCodeBaseCoreModulePath() . '/TemplateEditor/View/Template/Backend/ColorOption.html');
     $subTemplate->setVariable('TEMPLATEEDITOR_OPTION_VALUE', $this->color);
     $subTemplate->setVariable('TEMPLATEEDITOR_OPTION_NAME', $this->name);
     $subTemplate->setVariable('TEMPLATEEDITOR_OPTION_HUMAN_NAME', $this->humanName);
     if ($this->choice) {
         $subTemplate->setVariable('TEMPLATEEDITOR_OPTION_CHOICE', json_encode($this->choice));
     }
     \ContrexxJavascript::getInstance()->setVariable(array('select' => $_ARRAYLANG['TXT_CORE_MODULE_TEMPLATEEDITOR_SELECT'], 'colorError' => $_ARRAYLANG['TXT_CORE_MODULE_TEMPLATEEDITOR_COLOR_WRONG_FORMAT'], 'cancel' => $_ARRAYLANG['TXT_CORE_MODULE_TEMPLATEEDITOR_CANCEL']), 'TemplateEditor');
     $template->setVariable('TEMPLATEEDITOR_OPTION', $subTemplate->get());
     $template->setVariable('TEMPLATEEDITOR_OPTION_TYPE', 'color');
     $template->parse('option');
 }
开发者ID:Cloudrexx,项目名称:cloudrexx,代码行数:21,代码来源:ColorOption.class.php

示例6: renderOptionField

 /**
  * Render the option field in the backend.
  *
  * @param Sigma $template
  */
 public function renderOptionField($template)
 {
     global $_ARRAYLANG;
     $subTemplate = new Sigma();
     $subTemplate->loadTemplateFile($this->cx->getCodeBaseCoreModulePath() . '/TemplateEditor/View/Template/Backend/ImageOption.html');
     $subTemplate->setGlobalVariable($_ARRAYLANG);
     $subTemplate->setVariable('TEMPLATEEDITOR_OPTION_VALUE', $this->url);
     $subTemplate->setVariable('TEMPLATEEDITOR_OPTION_NAME', $this->name);
     $subTemplate->setVariable('TEMPLATEEDITOR_OPTION_HUMAN_NAME', $this->humanName);
     $mediaBrowser = new MediaBrowser();
     $mediaBrowser->setOptions(array('views' => 'uploader,filebrowser', 'startView' => 'filebrowser'));
     $mediaBrowser->setCallback('callback_' . $this->name);
     $subTemplate->setVariable('MEDIABROWSER_BUTTON', $mediaBrowser->getXHtml($_ARRAYLANG['TXT_CORE_MODULE_TEMPLATEEDITOR_CHOOSE_PICTURE']));
     $template->setVariable('TEMPLATEEDITOR_OPTION', $subTemplate->get());
     $template->setVariable('TEMPLATEEDITOR_OPTION_TYPE', 'img');
     $template->parse('option');
 }
开发者ID:Niggu,项目名称:cloudrexx,代码行数:22,代码来源:ImageOption.class.php

示例7: foreach

 /**
  * Show NewsML categories page
  * @access private
  * @global object $objDatabase
  */
 function _newsMLOverview()
 {
     global $_ARRAYLANG;
     $this->_objTpl->loadTemplateFile('module_feed_newsml_overview.html');
     $this->pageTitle = 'NewsML';
     $rowNr = 0;
     $this->_objTpl->setVariable(array('TXT_FEED_MARKED' => $_ARRAYLANG['TXT_FEED_MARKED'], 'TXT_FEED_MARK_ALL' => $_ARRAYLANG['TXT_FEED_MARK_ALL'], 'TXT_FEED_REMOVE_CHOICE' => $_ARRAYLANG['TXT_FEED_REMOVE_CHOICE'], 'TXT_FEED_DELETE_MARKED' => $_ARRAYLANG['TXT_FEED_DELETE_MARKED'], 'TXT_FEED_NEWSML_CATEGORIES' => $_ARRAYLANG['TXT_FEED_NEWSML_CATEGORIES'], 'TXT_FEED_CATEGORY' => $_ARRAYLANG['TXT_FEED_CATEGORY'], 'TXT_FEED_TEMPLATE_PLACEHOLDER' => $_ARRAYLANG['TXT_FEED_TEMPLATE_PLACEHOLDER'], 'TXT_FEED_NEWSML_PROVIDER' => $_ARRAYLANG['TXT_FEED_NEWSML_PROVIDER'], 'TXT_FEED_FUNCTIONS' => $_ARRAYLANG['TXT_FEED_FUNCTIONS'], 'TXT_FEED_SHOW_DETAILS' => $_ARRAYLANG['TXT_FEED_SHOW_DETAILS'], 'TXT_FEED_EDIT_CATEGORY' => $_ARRAYLANG['TXT_FEED_EDIT_CATEGORY'], 'TXT_FEED_INSERT_CATEGORY' => $_ARRAYLANG['TXT_FEED_INSERT_CATEGORY'], 'TXT_FEED_INFO' => $_ARRAYLANG['TXT_FEED_INFO'], 'TXT_FEED_WHAT_IS_NEWSML' => $_ARRAYLANG['TXT_FEED_WHAT_IS_NEWSML'], 'TXT_FEED_NEWSML_DESCRIPTION' => $_ARRAYLANG['TXT_FEED_NEWSML_DESCRIPTION'], 'TXT_FEED_CONFIRM_DELETE_CATEGORY' => $_ARRAYLANG['TXT_FEED_CONFIRM_DELETE_CATEGORY'], 'TXT_FEED_CONFIRM_DELETE_CATEGORIES' => $_ARRAYLANG['TXT_FEED_CONFIRM_DELETE_CATEGORIES'], 'TXT_FEED_ACTION_COULD_NOT_BE_UNDONE' => $_ARRAYLANG['TXT_FEED_ACTION_COULD_NOT_BE_UNDONE']));
     $this->_objTpl->setGlobalVariable(array('TXT_FEED_SHOW_DETAILS' => $_ARRAYLANG['TXT_FEED_SHOW_DETAILS'], 'TXT_FEED_EDIT_CATEGORY' => $_ARRAYLANG['TXT_FEED_EDIT_CATEGORY'], 'TXT_FEED_DELETE_CATEGORY' => $_ARRAYLANG['TXT_FEED_DELETE_CATEGORY']));
     if (empty($this->_objNewsML->arrCategories)) {
         $this->_objTpl->hideBlock('feed_newsml_list');
         return;
     }
     foreach ($this->_objNewsML->arrCategories as $newsMLProviderId => $arrNewsMLProvider) {
         $this->_objTpl->setVariable(array('FEED_NEWSML_CATEGORY_ID' => $newsMLProviderId, 'FEED_NEWSML_ID' => $newsMLProviderId, 'FEED_NEWSML_LIST_ROW_CLASS' => ++$rowNr % 2 ? 'row1' : 'row2', 'FEED_NEWSML_NAME' => $arrNewsMLProvider['name'], 'FEED_NEWSML_PLACEHOLDER' => 'NEWSML_' . strtoupper(preg_replace('/\\s/', '_', $arrNewsMLProvider['name'])), 'FEED_NEWSML_PROVIDER' => $arrNewsMLProvider['providerName']));
         $this->_objTpl->parse('feed_newsml_list');
     }
 }
开发者ID:Niggu,项目名称:cloudrexx,代码行数:22,代码来源:FeedManager.class.php

示例8: manageLocations

 /**
  * Add or edit the jobs Locations
  * @global    object     $objDatabase
  * @global    array      $_ARRAYLANG
  * @param     string     $pageContent
  */
 function manageLocations()
 {
     global $objDatabase, $_ARRAYLANG;
     $this->pageTitle = $_ARRAYLANG['TXT_LOCATION_MANAGER'];
     $this->_objTpl->loadTemplateFile('module_jobs_location.html', true, true);
     $this->_objTpl->setVariable(array('TXT_ADD_NEW_LOCATION' => $_ARRAYLANG['TXT_ADD_NEW_LOCATION'], 'TXT_NAME' => $_ARRAYLANG['TXT_NAME'], 'TXT_ADD' => $_ARRAYLANG['TXT_ADD'], 'TXT_SELECT_ALL' => $_ARRAYLANG['TXT_SELECT_ALL'], 'TXT_REMOVE_SELECTION' => $_ARRAYLANG['TXT_REMOVE_SELECTION'], 'TXT_LOCATION_LIST' => $_ARRAYLANG['TXT_LOCATION_LIST'], 'TXT_ID' => $_ARRAYLANG['TXT_ID'], 'TXT_ACTION' => $_ARRAYLANG['TXT_ACTION'], 'TXT_ACCEPT_CHANGES' => $_ARRAYLANG['TXT_ACCEPT_CHANGES'], 'TXT_CONFIRM_DELETE_DATA' => $_ARRAYLANG['TXT_CONFIRM_DELETE_DATA'], 'TXT_ACTION_IS_IRREVERSIBLE' => $_ARRAYLANG['TXT_ACTION_IS_IRREVERSIBLE'], 'TXT_ATTENTION_SYSTEM_FUNCTIONALITY_AT_RISK' => $_ARRAYLANG['TXT_ATTENTION_SYSTEM_FUNCTIONALITY_AT_RISK'], 'TXT_JOBS_SORTING' => $_ARRAYLANG['TXT_JOBS_SORTING'], 'TXT_JOBS_SORTTYPE' => $_ARRAYLANG['TXT_JOBS_SORTTYPE']));
     $this->_objTpl->setGlobalVariable(array('TXT_DELETE' => $_ARRAYLANG['TXT_DELETE']));
     // Add a new category
     if (isset($_POST['addLoc']) and $_POST['addLoc'] == true) {
         $locName = get_magic_quotes_gpc() ? strip_tags($_POST['newLocName']) : addslashes(strip_tags($_POST['newLocName']));
         if ($objDatabase->Execute("INSERT INTO " . DBPREFIX . "module_jobs_location (name)\n                                 VALUES ('{$locName}')")) {
             $this->strOkMessage = $_ARRAYLANG['TXT_DATA_RECORD_ADDED_SUCCESSFUL'];
         } else {
             $this->strErrMessage = $_ARRAYLANG['TXT_DATABASE_QUERY_ERROR'];
         }
     }
     // Modify a new category
     if (isset($_POST['modLoc']) and $_POST['modLoc'] == true) {
         foreach ($_POST['locName'] as $id => $name) {
             $name = get_magic_quotes_gpc() ? strip_tags($name) : addslashes(strip_tags($name));
             $id = intval($id);
             // Unused
             //                $sorting = !empty($_REQUEST['sortStyle'][$id]) ? contrexx_addslashes($_REQUEST['sortStyle'][$id]) : 'alpha';
             if ($objDatabase->Execute("UPDATE " . DBPREFIX . "module_jobs_location\n                                  SET name='{$name}'\n                                WHERE id={$id}")) {
                 $this->strOkMessage = $_ARRAYLANG['TXT_DATA_RECORD_UPDATED_SUCCESSFUL'];
             } else {
                 $this->strErrMessage = $_ARRAYLANG['TXT_DATABASE_QUERY_ERROR'];
             }
         }
     }
     $query = "SELECT `id`,\n                           `name`\n                      FROM `" . DBPREFIX . "module_jobs_location`\n                  ORDER BY `id` asc";
     $objResult = $objDatabase->Execute($query);
     $this->_objTpl->setCurrentBlock('row');
     $i = 0;
     while ($objResult !== false && !$objResult->EOF) {
         $class = $i % 2 == 0 ? "row1" : "row2";
         // Unused
         //            $sorting = $objResult->fields['sort_style'];
         $this->_objTpl->setVariable(array('JOBS_ROWCLASS' => $class, 'JOBS_LOC_ID' => $objResult->fields['id'], 'JOBS_LOC_NAME' => stripslashes($objResult->fields['name'])));
         $this->_objTpl->parseCurrentBlock('row');
         $i++;
         $objResult->MoveNext();
     }
 }
开发者ID:Cloudrexx,项目名称:cloudrexx,代码行数:50,代码来源:JobsManager.class.php

示例9: renderOptionField

 /**
  * Render the option field in the backend.
  *
  * @param Sigma $template
  */
 public function renderOptionField($template)
 {
     global $_LANGID;
     $subTemplate = new Sigma();
     $subTemplate->loadTemplateFile($this->cx->getCodeBaseCoreModulePath() . '/TemplateEditor/View/Template/Backend/SelectOption.html');
     foreach ($this->choice as $value => $choice) {
         $subTemplate->setVariable('CHOICE_NAME', isset($choice[$_LANGID]) ? $choice[$_LANGID] : (isset($choice[2]) ? $choice[2] : $value));
         $subTemplate->setVariable('CHOICE_VALUE', $value);
         if ($value == $this->activeChoice) {
             $subTemplate->setVariable('CHOICE_ACTIVE', 'selected');
         }
         $subTemplate->parse('choices');
     }
     $subTemplate->setVariable('TEMPLATEEDITOR_OPTION_VALUE', $this->activeChoice);
     $subTemplate->setVariable('TEMPLATEEDITOR_OPTION_NAME', $this->name);
     $subTemplate->setVariable('TEMPLATEEDITOR_OPTION_HUMAN_NAME', $this->humanName);
     $template->setVariable('TEMPLATEEDITOR_OPTION', $subTemplate->get());
     $template->setVariable('TEMPLATEEDITOR_OPTION_TYPE', 'select');
     $template->parse('option');
 }
开发者ID:Cloudrexx,项目名称:cloudrexx,代码行数:25,代码来源:SelectOption.class.php

示例10: chooseReservationProduct

 function chooseReservationProduct()
 {
     global $objDatabase, $_ARRAYLANG;
     $this->objTemplate->loadTemplateFile('module_gov_choose_product.html');
     $this->_pageTitle = $_ARRAYLANG['TXT_EGOV_PRODUCT_FOR_RESERVATION'];
     $this->objTemplate->setVariable(array('TXT_PRODUCT' => $_ARRAYLANG['TXT_PRODUCT'], 'TXT_EGOV_CHOOSE_PRODUCT_FOR_RESERVATION' => $_ARRAYLANG['TXT_EGOV_CHOOSE_PRODUCT_FOR_RESERVATION']));
     $query = "\n            SELECT *\n              FROM " . DBPREFIX . "module_egov_products\n             ORDER BY product_orderby, product_name\n        ";
     $objResult = $objDatabase->Execute($query);
     $i = 0;
     while (!$objResult->EOF) {
         $StatusImg = '<img src="../core/Core/View/Media/icons/status_green.gif" width="10" height="10" border="0" alt="" />';
         if ($objResult->fields["product_status"] != 1) {
             $StatusImg = '<img src="../core/Core/View/Media/icons/status_red.gif" width="10" height="10" border="0" alt="" />';
         }
         $this->objTemplate->setVariable(array('ROWCLASS' => ++$i % 2 ? 'row2' : 'row1', 'PRODUCT_ID' => $objResult->fields['product_id'], 'PRODUCT_NAME' => $objResult->fields['product_name'], 'PRODUCT_STATUS' => $StatusImg));
         $this->objTemplate->parse('products_list');
         $objResult->MoveNext();
     }
     if ($i == 0) {
         $this->objTemplate->hideBlock('products_list');
     }
 }
开发者ID:Niggu,项目名称:cloudrexx,代码行数:22,代码来源:EgovManager.class.php

示例11: preFinalize

 /**
  * @param Sigma $template
  */
 public function preFinalize(Sigma $template)
 {
     if (count($this->mediaBrowserInstances) == 0) {
         return;
     } else {
         global $_ARRAYLANG;
         /**
          * @var $init \InitCMS
          */
         $init = \Env::get('init');
         $init->loadLanguageData('MediaBrowser');
         foreach ($_ARRAYLANG as $key => $value) {
             if (preg_match("/TXT_FILEBROWSER_[A-Za-z0-9]+/", $key)) {
                 \ContrexxJavascript::getInstance()->setVariable($key, $value, 'mediabrowser');
             }
         }
         $thumbnailsTemplate = new Sigma();
         $thumbnailsTemplate->loadTemplateFile($this->cx->getCoreModuleFolderName() . '/MediaBrowser/View/Template/Thumbnails.html');
         $thumbnailsTemplate->setVariable('TXT_FILEBROWSER_THUMBNAIL_ORIGINAL_SIZE', sprintf($_ARRAYLANG['TXT_FILEBROWSER_THUMBNAIL_ORIGINAL_SIZE']));
         foreach (UploaderConfiguration::getInstance()->getThumbnails() as $thumbnail) {
             $thumbnailsTemplate->setVariable(array('THUMBNAIL_NAME' => sprintf($_ARRAYLANG['TXT_FILEBROWSER_THUMBNAIL_' . strtoupper($thumbnail['name']) . '_SIZE'], $thumbnail['size']), 'THUMBNAIL_ID' => $thumbnail['id'], 'THUMBNAIL_SIZE' => $thumbnail['size']));
             $thumbnailsTemplate->parse('thumbnails');
         }
         \ContrexxJavascript::getInstance()->setVariable('thumbnails_template', $thumbnailsTemplate->get(), 'mediabrowser');
         \JS::activate('mediabrowser');
         \JS::registerJS('core_modules/MediaBrowser/View/Script/mediabrowser.js');
     }
 }
开发者ID:nahakiole,项目名称:cloudrexx,代码行数:31,代码来源:ComponentController.class.php

示例12: getXHtml

 /**
  * Get the rendered mediabrowser button
  *
  * @param string $buttonName
  *
  * @return string
  */
 function getXHtml($buttonName = "MediaBrowser")
 {
     $button = new Sigma();
     $button->loadTemplateFile($this->cx->getCodeBaseCoreModulePath() . '/MediaBrowser/View/Template/MediaBrowserButton.html');
     $button->setVariable(array('MEDIABROWSER_BUTTON_NAME' => $buttonName, 'MEDIABROWSER_BUTTON_OPTIONS' => $this->getOptionsString()));
     return $button->get();
 }
开发者ID:nahakiole,项目名称:cloudrexx,代码行数:14,代码来源:MediaBrowser.class.php

示例13: getContainer

 function getContainer()
 {
     $path = $this->cx->getCodeBaseCoreModulePath() . '/Uploader/View/Template/Backend/Uploader' . $this->options['uploader-type'] . '.html';
     $template = new Sigma();
     $template->loadTemplateFile($path);
     $template->setVariable(array('UPLOADER_ID' => $this->id, 'UPLOADER_CODE' => file_get_contents($this->cx->getCodeBaseCoreModulePath() . '/Uploader/View/Template/Backend/Uploader.html')));
     return $template->get();
 }
开发者ID:Cloudrexx,项目名称:cloudrexx,代码行数:8,代码来源:Uploader.class.php

示例14: preFinalize

 /**
  * @param Sigma $template
  */
 public function preFinalize(Sigma $template)
 {
     if (count($this->mediaBrowserInstances) == 0) {
         return;
     }
     global $_ARRAYLANG;
     /**
      * @var $init \InitCMS
      */
     $init = \Env::get('init');
     $init->loadLanguageData('MediaBrowser');
     foreach ($_ARRAYLANG as $key => $value) {
         if (preg_match("/TXT_FILEBROWSER_[A-Za-z0-9]+/", $key)) {
             \ContrexxJavascript::getInstance()->setVariable($key, $value, 'mediabrowser');
         }
     }
     $thumbnailsTemplate = new Sigma();
     $thumbnailsTemplate->loadTemplateFile($this->cx->getCoreModuleFolderName() . '/MediaBrowser/View/Template/Thumbnails.html');
     $thumbnailsTemplate->setVariable('TXT_FILEBROWSER_THUMBNAIL_ORIGINAL_SIZE', sprintf($_ARRAYLANG['TXT_FILEBROWSER_THUMBNAIL_ORIGINAL_SIZE']));
     foreach ($this->cx->getMediaSourceManager()->getThumbnailGenerator()->getThumbnails() as $thumbnail) {
         $thumbnailsTemplate->setVariable(array('THUMBNAIL_NAME' => sprintf($_ARRAYLANG['TXT_FILEBROWSER_THUMBNAIL_' . strtoupper($thumbnail['name']) . '_SIZE'], $thumbnail['size']), 'THUMBNAIL_ID' => $thumbnail['id'], 'THUMBNAIL_SIZE' => $thumbnail['size']));
         $thumbnailsTemplate->parse('thumbnails');
     }
     \ContrexxJavascript::getInstance()->setVariable('thumbnails_template', $thumbnailsTemplate->get(), 'mediabrowser');
     \ContrexxJavascript::getInstance()->setVariable('chunk_size', min(floor((\FWSystem::getMaxUploadFileSize() - 1000000) / 1000000), 20) . 'mb', 'mediabrowser');
     \ContrexxJavascript::getInstance()->setVariable('languages', \FWLanguage::getActiveFrontendLanguages(), 'mediabrowser');
     \ContrexxJavascript::getInstance()->setVariable('language', \FWLanguage::getLanguageCodeById(\FWLanguage::getDefaultLangId()), 'mediabrowser');
     \JS::activate('mediabrowser');
     \JS::registerJS('core_modules/MediaBrowser/View/Script/MediaBrowser.js');
 }
开发者ID:Cloudrexx,项目名称:cloudrexx,代码行数:33,代码来源:ComponentController.class.php

示例15: showOverview

 /**
  * Creates the main overview for this component.
  *
  * @param $template
  *
  * @throws \Cx\Core\Routing\UrlException
  */
 public function showOverview(Sigma $template)
 {
     global $_ARRAYLANG, $_CONFIG;
     \JS::registerJS('core_modules/TemplateEditor/View/Script/spectrum.js');
     \JS::activate('intro.js');
     $template->loadTemplateFile($this->cx->getCodeBaseCoreModulePath() . '/TemplateEditor/View/Template/Backend/Default.html');
     /**
      * @var $themes Theme[]
      */
     $themes = $this->themeRepository->findAll();
     foreach ($themes as $theme) {
         $template->setVariable(array('TEMPLATEEDITOR_LAYOUT_NAME' => $theme->getThemesname(), 'TEMPLATEEDITOR_LAYOUT_ID' => $theme->getId()));
         if ($this->theme->getId() == $theme->getId()) {
             $template->setVariable(array('TEMPLATEEDITOR_LAYOUT_ACTIVE' => 'selected'));
         }
         $template->parse('layouts');
     }
     if ($this->themeOptions) {
         $presets = $this->themeOptions->getPresetRepository()->findAll();
         foreach ($presets as $preset) {
             $template->setVariable(array('TEMPLATEEDITOR_PRESET_NAME' => $this->themeOptions->getActivePreset()->getName() == $preset ? $preset . ' (' . $_ARRAYLANG['TXT_CORE_MODULE_TEMPLATEEDITOR_PRESET_ACTIVE'] . ')' : $preset, 'TEMPLATEEDITOR_PRESET_ID' => $preset));
             if ($_SESSION['TemplateEditor'][$this->theme->getId()]['activePreset'] == $preset) {
                 $template->setVariable(array('TEMPLATEEDITOR_PRESET_ACTIVE' => 'selected'));
             }
             $template->parse('presets');
         }
         if ($_SESSION['TemplateEditor'][$this->theme->getId()]['activePreset'] == $this->themeOptions->getActivePreset()->getName()) {
             $template->setVariable(array('TEMPLATEDITOR_PRESET_IS_ALREADY_ACTIVE' => 'disabled'));
             $template->setVariable(array('TXT_CORE_MODULE_TEMPLATEEDITOR_REMOVE_PRESET_TEXT_IS_ACTIVE' => $_ARRAYLANG['TXT_CORE_MODULE_TEMPLATEEDITOR_REMOVE_PRESET_TEXT_IS_ACTIVE']));
             $template->show('presetTextActive');
         }
         if ($_SESSION['TemplateEditor'][$this->theme->getId()]['activePreset'] == 'Default') {
             $template->setVariable(array('TEMPLATEDITOR_PRESET_IS_DEFAULT' => 'disabled'));
         }
         foreach ($presets as $preset) {
             $template->setVariable(array('TEMPLATEEDITOR_PRESET_FOR_PRESETS_NAME' => $preset, 'TEMPLATEEDITOR_PRESET_FOR_PRESETS_ID' => $preset));
             $template->parse('presetsForPresets');
         }
         $this->themeOptions->renderOptions($template);
         if ($this->themeOptions->getOptionCount() != 0) {
             $template->parse('presetBlock');
             $template->setVariable('TXT_CORE_MODULE_TEMPLATEEDITOR_SAVE', $_ARRAYLANG['TXT_CORE_MODULE_TEMPLATEEDITOR_SAVE']);
             $template->parse('save_button');
         }
     } else {
         $template->setVariable(array('TEMPLATEOPTION_NO_OPTIONS_TEXT' => $_ARRAYLANG['TXT_CORE_MODULE_TEMPLATEEDITOR_NO_OPTIONS_HELP'], 'TEMPLATEOPTION_NO_OPTIONS_LINKNAME' => $_ARRAYLANG['TXT_CORE_MODULE_TEMPLATEEDITOR_NO_OPTIONS_LINKNAME']));
         $template->parse('no_options');
     }
     $template->setVariable(array('TEMPLATEEDITOR_IFRAME_URL' => Url::fromModuleAndCmd('home', '', null, array('preview' => $this->theme->getId(), 'templateEditor' => 1)), 'TEMPLATEEDITOR_BACKURL' => './index.php?cmd=ViewManager'));
     $template->setGlobalVariable($_ARRAYLANG);
     \ContrexxJavascript::getInstance()->setVariable(array('newPresetTemplate' => '', 'TXT_CORE_MODULE_TEMPLATEEDITOR_SAVE' => $_ARRAYLANG['TXT_CORE_MODULE_TEMPLATEEDITOR_SAVE'], 'TXT_CORE_MODULE_TEMPLATEEDITOR_CANCEL' => $_ARRAYLANG['TXT_CORE_MODULE_TEMPLATEEDITOR_CANCEL'], 'TXT_CORE_MODULE_TEMPLATEEDITOR_SAVE_CONTENT' => $_ARRAYLANG['TXT_CORE_MODULE_TEMPLATEEDITOR_SAVE_CONTENT'], 'TXT_CORE_MODULE_TEMPLATEEDITOR_SAVE_TITLE' => $_ARRAYLANG['TXT_CORE_MODULE_TEMPLATEEDITOR_SAVE_TITLE'], 'TXT_CORE_MODULE_TEMPLATEEDITOR_YES' => $_ARRAYLANG['TXT_CORE_MODULE_TEMPLATEEDITOR_YES'], 'TXT_CORE_MODULE_TEMPLATEEDITOR_NO' => $_ARRAYLANG['TXT_CORE_MODULE_TEMPLATEEDITOR_NO'], 'TXT_CORE_MODULE_TEMPLATEEDITOR_ADD_PRESET' => $_ARRAYLANG['TXT_CORE_MODULE_TEMPLATEEDITOR_ADD_PRESET'], 'TXT_CORE_MODULE_TEMPLATEEDITOR_REMOVE_PRESET_TEXT' => $_ARRAYLANG['TXT_CORE_MODULE_TEMPLATEEDITOR_REMOVE_PRESET_TEXT'], 'TXT_CORE_MODULE_TEMPLATEEDITOR_ACTIVATE_PRESET_TITLE' => $_ARRAYLANG['TXT_CORE_MODULE_TEMPLATEEDITOR_ACTIVATE_PRESET_TITLE'], 'TXT_CORE_MODULE_TEMPLATEEDITOR_ADD_PRESET_TITLE' => $_ARRAYLANG['TXT_CORE_MODULE_TEMPLATEEDITOR_ADD_PRESET_TITLE'], 'TXT_CORE_MODULE_TEMPLATEEDITOR_INTRO_LAYOUT_OPTION' => $_ARRAYLANG['TXT_CORE_MODULE_TEMPLATEEDITOR_INTRO_LAYOUT_OPTION'], 'TXT_CORE_MODULE_TEMPLATEEDITOR_INTRO_PRESET_OPTION' => $_ARRAYLANG['TXT_CORE_MODULE_TEMPLATEEDITOR_INTRO_PRESET_OPTION'], 'TXT_CORE_MODULE_TEMPLATEEDITOR_INTRO_PRESET_ACTIVATE' => $_ARRAYLANG['TXT_CORE_MODULE_TEMPLATEEDITOR_INTRO_PRESET_ACTIVATE'], 'TXT_CORE_MODULE_TEMPLATEEDITOR_INTRO_PRESET_ADD' => $_ARRAYLANG['TXT_CORE_MODULE_TEMPLATEEDITOR_INTRO_PRESET_ADD'], 'TXT_CORE_MODULE_TEMPLATEEDITOR_INTRO_PRESET_RESET' => $_ARRAYLANG['TXT_CORE_MODULE_TEMPLATEEDITOR_INTRO_PRESET_RESET'], 'TXT_CORE_MODULE_TEMPLATEEDITOR_INTRO_VIEW_OPTION' => $_ARRAYLANG['TXT_CORE_MODULE_TEMPLATEEDITOR_INTRO_VIEW_OPTION'], 'TXT_CORE_MODULE_TEMPLATEEDITOR_INTRO_VIEW_OPTION_LIST' => $_ARRAYLANG['TXT_CORE_MODULE_TEMPLATEEDITOR_INTRO_VIEW_OPTION_LIST'], 'TXT_CORE_MODULE_TEMPLATEEDITOR_INTRO_PREVIEW' => $_ARRAYLANG['TXT_CORE_MODULE_TEMPLATEEDITOR_INTRO_PREVIEW'], 'TXT_CORE_MODULE_TEMPLATEEDITOR_INTRO_SAVE' => $_ARRAYLANG['TXT_CORE_MODULE_TEMPLATEEDITOR_INTRO_SAVE'], 'TXT_CORE_MODULE_TEMPLATEEDITOR_INTRO_NEXT' => $_ARRAYLANG['TXT_CORE_MODULE_TEMPLATEEDITOR_INTRO_NEXT'], 'TXT_CORE_MODULE_TEMPLATEEDITOR_INTRO_BACK' => $_ARRAYLANG['TXT_CORE_MODULE_TEMPLATEEDITOR_INTRO_BACK'], 'TXT_CORE_MODULE_TEMPLATEEDITOR_INTRO_STOP' => $_ARRAYLANG['TXT_CORE_MODULE_TEMPLATEEDITOR_INTRO_STOP'], 'themeid' => $this->theme->getId(), 'iframeUrl' => Url::fromModuleAndCmd('home', '', null, array('preview' => $this->theme->getId(), 'templateEditor' => 1))->toString(), 'domainUrl' => $_CONFIG['domainUrl']), 'TemplateEditor');
 }
开发者ID:Cloudrexx,项目名称:cloudrexx,代码行数:59,代码来源:BackendController.class.php


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