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

PHP prepareHTMLDisplay函数代码示例

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

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



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

示例1: onAction

 /**
  * Deletes tax rate by zip set.
  */
 function onAction()
 {
     global $application;
     $SessionPost = array();
     $SessionPost = $_POST;
     $Errors = array();
     $Result = array();
     $request = new Request();
     $request->setView("PopupWindow");
     $updateSid = $request->getValueByKey("updateSid", 0);
     if ($updateSid) {
         $request->setKey("updateSid", $updateSid);
     }
     $description = '';
     if (isset($_POST['file_description'])) {
         $description = prepareHTMLDisplay(trim($_POST['file_description']));
     }
     if ($description == '') {
         $SessionPost['Errors'][] = getMsg("TAX_ZIP", "ADD_NEW_SET_EMPTY_FILE_DESCRIPTION_ERROR");
         modApiFunc('Session', 'set', 'SessionPost', $SessionPost);
         $request->setKey("page_view", "TaxRateByZip_AddNewSet");
         $application->redirect($request);
         return;
     }
     modApiFunc('Session', 'set', 'SessionPost', $SessionPost);
     $sid = modApiFunc("TaxRateByZip", "addSetToDB", $description, $_POST["csv_file_name"]);
     $request->setKey("page_view", "TaxRatesImportView");
     $request->setKey("sid", $sid);
     $application->redirect($request);
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:33,代码来源:redirect_to_import_action.php


示例2: outputShippingModulesList

 function outputShippingModulesList()
 {
     global $application;
     $retval = "";
     $sm_list = modApiFunc("Taxes", "getShippingModulesList");
     $n = sizeof($sm_list);
     if ($n == 0) {
         $retval .= modApiFunc('TmplFiller', 'fill', "taxes/prod-tax-sm-list/", "item_na.tpl.html", array());
         for ($i = 0; $i < 9; $i++) {
             $retval .= modApiFunc('TmplFiller', 'fill', "taxes/prod-tax-sm-list/", "item_empty.tpl.html", array());
         }
     } else {
         $i = 0;
         foreach ($sm_list as $sm_id => $sm_info) {
             $this->_Template_Contents = array('Name' => prepareHTMLDisplay($sm_info["Name"]), 'I' => $i, 'Id' => $sm_id, 'Checked' => $sm_info["Checked"] ? "CHECKED" : "");
             $application->registerAttributes($this->_Template_Contents);
             $retval .= modApiFunc('TmplFiller', 'fill', "taxes/prod-tax-sm-list/", "item.tpl.html", array());
             $i++;
         }
         if ($n < 10) {
             for ($i = 0; $i < 10 - $n; $i++) {
                 $retval .= modApiFunc('TmplFiller', 'fill', "taxes/prod-tax-sm-list/", "item_empty.tpl.html", array());
             }
         }
     }
     return $retval;
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:27,代码来源:sm-list-az.php


示例3: outputAdminList

 /**
  *
  *
  * @
  * @param
  * @return
  */
 function outputAdminList()
 {
     global $application;
     $retval = "";
     $admin_members = modApiFunc("Users", "getAdminMembersList");
     $i = 0;
     //$min_list_size = 10;
     foreach ($admin_members as $member) {
         $current_admin = modApiFunc("Users", "getCurrentUserID") == $member["id"] ? true : false;
         $request = new Request();
         $request->setView('AdminMemberInfo');
         $request->setAction('SetSelectedUser');
         $request->setKey('uid', $member["id"]);
         $request->setKey('edit', true);
         $link = $request->getURL();
         $template_contents = array("AdminMemberInfoLink" => $link, "AdminId" => $member["id"], "Style" => "visible", "AdminCheckBox" => $current_admin ? "" : "select_" . $i, "AdminCheckBoxName" => $current_admin ? "" : "selected_admins[" . ($i + 1) . "]", "AdminName" => prepareHTMLDisplay($member["firstname"] . " " . $member["lastname"]), "CurrentAdmin" => $current_admin ? "<span class=\"font-red\">*</span>" : "", "Email" => $member["email"], "LogNum" => $member["lognum"], "LoggedIn" => $member["logdate"] && $member["logdate"] != "0000-00-00" ? modApiFunc("Localization", "SQL_date_format", $member["logdate"]) : $this->MessageResources->getMessage("ADMIN_MEMBERS_LABEL_001"), "Created" => modApiFunc("Localization", "SQL_date_format", $member["created"]), "Modified" => $member["modified"] && $member["modified"] != "0000-00-00" ? modApiFunc("Localization", "SQL_date_format", $member["modified"]) : $this->MessageResources->getMessage("ADMIN_MEMBERS_LABEL_002"), "Enabled" => $current_admin ? " DISABLED" : "");
         $this->_Template_Contents = $template_contents;
         $application->registerAttributes($this->_Template_Contents);
         $retval .= modApiFunc('TmplFiller', 'fill', "users/admin_members/", "item.tpl.html", array());
         if (!$current_admin) {
             $i++;
         }
     }
     for (; $i < $min_list_size; $i++) {
         $retval .= modApiFunc('TmplFiller', 'fill', "users/admin_members/", "item_empty.tpl.html", array());
     }
     return $retval;
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:35,代码来源:admin_members_az.php


示例4: initFormData

 function initFormData()
 {
     $this->ViewState = array("hasCloseScript" => "false", "TaxRateAction" => "");
     $TaxInfo = modApiFunc("Taxes", "getTaxRateInfo", modApiFunc("Taxes", "getEditableTaxId", "TaxRate"));
     $replace = array();
     $TaxNamesList = modApiFunc("Taxes", "getTaxNamesList");
     foreach ($TaxNamesList as $taxNameInfo) {
         $replace['{t_' . $taxNameInfo['Id'] . '}'] = prepareHTMLDisplay($taxNameInfo['Name']);
     }
     $costList = modApiFunc("Taxes", "getTaxCostsList");
     foreach ($costList as $cost) {
         $replace['{p_' . $cost['id'] . '}'] = $this->MessageResources->getMessage($cost['name']);
     }
     preg_match_all("/([0-9]+\\.?[0-9]+)/", $TaxInfo['Formula'], $numbers);
     for ($j = 0; $j < sizeof($numbers[0]); $j++) {
         $replace[$numbers[0][$j]] = modApiFunc("Localization", "num_format", $numbers[0][$j]);
     }
     if (!$TaxInfo['Id']) {
         $TaxInfo['CountryId'] = modApiFunc("Taxes", "getCountryId");
         $TaxInfo['StateId'] = "0";
         $this->ViewState["TaxRateAction"] = "AddTaxRateAction";
     } else {
         $this->ViewState["TaxRateAction"] = "UpdateTaxRateAction";
     }
     $ProductTaxClassId = modApiFunc("Taxes", "getTaxClassId");
     $ProductTaxClassName = modApiFunc("Taxes", "getTaxClassInfo", $ProductTaxClassId);
     $ProductTaxClassName = $ProductTaxClassName["name"];
     $this->POST = array("Id" => $TaxInfo['Id'], "CountryId" => $TaxInfo['CountryId'], "StateId" => $TaxInfo['StateId'], "ProductTaxClassId" => $ProductTaxClassId, "ProductTaxClassName" => $ProductTaxClassName, "TaxNameId" => $TaxInfo['TaxNameId'], "Rate" => $TaxInfo['rates_set'] == 0 ? modApiFunc("Localization", "num_format", $TaxInfo['Rate']) : 0, "FormulaView" => $TaxInfo['Formula'] ? strtr($TaxInfo['Formula'], $replace) : "&nbsp;", "Formula" => $TaxInfo['Formula'], "Applicable" => $TaxInfo['Applicable'], "TaxRateByZipSet" => $TaxInfo['rates_set']);
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:29,代码来源:tax-settings-edit-rate-az.php


示例5: outputMessagesList

 function outputMessagesList()
 {
     global $application;
     $messages = modApiFunc('Newsletter', 'getMessagesList');
     $this->getTopicsNames($messages);
     $templateContents = array('LetterCreationDate' => '', 'LetterSentDate' => '', 'LetterFrom' => '', 'LetterSubject' => '', 'LetterNum' => '', 'LetterId' => '', 'LetterTopics' => '');
     $application->registerAttributes($templateContents);
     $result = '';
     $counter = 0;
     foreach ($messages as $msg) {
         $counter++;
         $creation_date = modApiFunc('Localization', 'date_format', $msg['letter_creation_date']) . " " . modApiFunc('Localization', 'SQL_time_format', $msg['letter_creation_date']);
         $sent_date = $msg['letter_sent_date'] == null ? $this->_messageResources->getMessage('LETTER_NOT_SENT') : modApiFunc('Localization', 'date_format', $msg['letter_sent_date']) . " " . modApiFunc('Localization', 'SQL_time_format', $msg['letter_sent_date']);
         $this->_listTemplateContents = array('LetterCreationDate' => $creation_date, 'LetterSentDate' => $sent_date, 'LetterFrom' => prepareHTMLDisplay($msg['letter_from_name']) . '&nbsp;&lt;' . prepareHTMLDisplay($msg['letter_from_email']) . '&gt;', 'LetterSubject' => prepareHTMLDisplay($msg['letter_subject']), 'LetterNum' => $counter, 'LetterId' => $msg['letter_id'], 'LetterTopics' => $msg['topics_names']);
         $result .= $this->_tmplFiller->fill('newsletter/', 'item.tpl.html', array());
     }
     if ($counter == 0) {
         $result .= $this->_tmplFiller->fill('newsletter/', 'item_no_items.tpl.html', array());
         $counter++;
     }
     for ($i = 0; $i < 10 - $counter; $i++) {
         $result .= $this->_tmplFiller->fill('newsletter/', 'item_empty.tpl.html', array());
     }
     return $result;
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:25,代码来源:newsletter_list_az.php


示例6: onAction

 /**
  * @ describe the function UpdateCustomAttribute->.
  */
 function onAction()
 {
     $EditCustomAttributeForm = array();
     $EditCustomAttributeForm = $_POST;
     $EditCustomAttributeForm["ErrorsArray"] = array();
     // check "Attribute Name"
     if (isEmptyKey('name', $EditCustomAttributeForm)) {
         // a required attribute
         $EditCustomAttributeForm["ErrorsArray"]["name"] = new ActionMessage("ADDCUSTOM_003");
     }
     // check "Attribute Description"
     if (isEmptyKey('descr', $EditCustomAttributeForm)) {
         //  a required attribute
         $EditCustomAttributeForm["ErrorsArray"]["descr"] = new ActionMessage("ADDCUSTOM_004");
     }
     if (empty($EditCustomAttributeForm["ErrorsArray"])) {
         $EditCustomAttributeForm['input_type_values'] = isset($EditCustomAttributeForm['input_type_values']) ? $EditCustomAttributeForm['input_type_values'] : array();
         if (!empty($EditCustomAttributeForm['input_type_values'])) {
             foreach ($EditCustomAttributeForm['input_type_values'] as $key => $item) {
                 if (empty($item)) {
                     unset($EditCustomAttributeForm['input_type_values'][$key]);
                 }
             }
         }
         $custom_attributes = modApiFunc('Catalog', 'getTempCustomAttributes', $EditCustomAttributeForm['form_id']);
         $orig_attr = $custom_attributes[$EditCustomAttributeForm['view_tag']];
         $attr = array('id' => $orig_attr['id'], 'pta_id' => $orig_attr['pta_id'], 'name' => prepareHTMLDisplay($EditCustomAttributeForm['name']), 'descr' => prepareHTMLDisplay($EditCustomAttributeForm['descr']), 'size' => $orig_attr['size'], 'min' => $orig_attr['min'], 'max' => $orig_attr['max'], 'view_tag' => $orig_attr['view_tag'], 'group' => $orig_attr['group'], 'required' => $orig_attr['required'], 'visible' => $orig_attr['visible'], 'default' => $orig_attr['default'], 'sort' => $orig_attr['sort'], 'type' => $orig_attr['type'], 'patt' => $orig_attr['patt'], 'patt_type' => $orig_attr['patt_type'], 'input_type_id' => $orig_attr['input_type_id'], 'input_type_name' => $orig_attr['input_type_name'], 'unit_type_value' => $orig_attr['unit_type_value'], 'vanishing' => $orig_attr['vanishing'], 'input_type_values' => $EditCustomAttributeForm['input_type_values']);
         modApiFunc('Catalog', 'updateTempCustomAttribute', $EditCustomAttributeForm['form_id'], $attr);
         $EditCustomAttributeForm["close"] = true;
     }
     modApiFunc('Session', 'set', 'EditCustomAttributeForm', $EditCustomAttributeForm);
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:35,代码来源:update_custom_attribute_action.php


示例7: getTag

 /**
  * Processes tags in the templates for the given view.
  *
  * @return string tag value, if tag has been processed. NULL, otherwise.
  */
 function getTag($tag)
 {
     global $application;
     $value = null;
     switch ($tag) {
         case 'Local_SearchFormAction':
             $_request = new Request();
             $_request->setView('SearchResult');
             $value = $_request->getURL();
             break;
         case 'Local_SearchFormName':
             $value = 'CatalogSearchForm';
             break;
         case 'Local_ActionName':
             $value = 'asc_action';
             break;
         case 'Local_ActionValue':
             $value = 'SearchProducts';
             break;
         case 'Local_SearchTextFieldName':
             $value = 'search_pattern';
             break;
         case 'Local_SearchText':
             if (modApiFunc('Session', 'is_Set', 'search_result_id')) {
                 $search_id = modApiFunc('Session', 'get', 'search_result_id');
                 $value = modApiFunc('CatalogSearch', 'getSearchPatternInSearchResult', $search_id);
                 $value = prepareHTMLDisplay($value);
             } else {
                 $value = '';
             }
             break;
     }
     return $value;
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:39,代码来源:search_form_az.php


示例8: output

 /**
  * The main function to output the viewer
  */
 function output()
 {
     global $application;
     // getting page id
     // if not specified then a new page is being added
     $page_id = modApiFunc('Request', 'getValueByKey', 'page_id');
     if (!$page_id) {
         $page_id = 0;
     }
     $this->_Page_Data = modApiFunc('CMS', 'searchPages', array('page_id' => $page_id));
     // getting page data
     if (!empty($this->_Page_Data)) {
         // the page_id is specified and valid
         $this->_Page_Data = array_pop($this->_Page_Data);
     } else {
         // the page_id is eihter not specified or not valid
         // assuming adding a new page
         $this->_Page_Data = array('page_id' => 0, 'availability' => 'C', 'status' => 'A', 'parent_id' => 0);
     }
     // restoring data from session if any
     // use case: restoring submitted form with an error
     if (modApiFunc('Session', 'is_set', 'SavedPageData')) {
         $this->_Page_Data = modApiFunc('Session', 'get', 'SavedPageData');
         modApiFunc('Session', 'un_set', 'SavedPageData');
     }
     $template_contents = array('PageJSCode' => $this->outputJSCode(), 'PageID' => $this->_Page_Data['page_id'], 'PageIndex' => prepareHTMLDisplay(@$this->_Page_Data['page_index']), 'PageName' => prepareHTMLDisplay(@$this->_Page_Data['name']), 'ParentSelectBox' => $this->outputParentSelectBox(), 'PageContent' => prepareHTMLDisplay(@$this->_Page_Data['descr']), 'PageStatus' => @$this->_Page_Data['status'], 'PageSEOPrefix' => prepareHTMLDisplay(@$this->_Page_Data['seo_prefix']), 'PageSEOTitle' => prepareHTMLDisplay(@$this->_Page_Data['seo_title']), 'PageMETADescription' => prepareHTMLDisplay(@$this->_Page_Data['seo_descr']), 'PageMETAKeywords' => prepareHTMLDisplay(@$this->_Page_Data['seo_keywords']), 'PageAvailability' => @$this->_Page_Data['availability'], 'ResultMessage' => $this->outputResultMessage(), 'EditPageTitle' => @$this->_Page_Data['page_id'] > 0 ? getMsg('CMS', 'CMS_EDIT_PAGE') : getMsg('CMS', 'CMS_ADD_PAGE'));
     $this->_Template_Contents = $template_contents;
     $application->registerAttributes($this->_Template_Contents);
     return $this->mTmplFiller->fill('cms/cms_page_data/', 'container.tpl.html', array());
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:33,代码来源:cms_page_data_az.php


示例9: output

 function output()
 {
     global $application;
     $template_contents = array('OverFlowText' => $this->outputOverFlowText(), 'PatternValue' => prepareHTMLDisplay($this->getPatternValue()), 'isFormActive' => empty($this->Filter) ? 'N' : 'Y');
     $this->_Template_Contents = $template_contents;
     $application->registerAttributes($this->_Template_Contents);
     return $this->mTmplFiller->fill($this->_template_dir, 'container.tpl.html', array());
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:8,代码来源:product_search_form_short_az.php


示例10: initFromDB

 /**
  *
  */
 function initFromDB($id_letter)
 {
     $letter_info = modApiFunc('Newsletter', 'getMessageInfo', $id_letter);
     if (empty($letter_info)) {
         return;
     }
     foreach ($letter_info as $key => $val) {
         $this->_post[$key] = prepareHTMLDisplay($val);
     }
     $this->_post["letter_id"] = $id_letter;
     $this->_viewState = array('hasCloseScript' => 'false', 'FormSubmitValue' => 'save');
     $this->_post['topic'] = modApiFunc('Subscriptions', 'getLetterTopics', $id_letter);
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:16,代码来源:newsletter_compose_az.php


示例11: copyFormData

 function copyFormData()
 {
     $this->form = modApiFunc("Session", "get", "EditCustomAttributeForm");
     if (isset($this->form["ErrorsArray"]) && count($this->form["ErrorsArray"]) > 0) {
         $this->errors = $this->form["ErrorsArray"];
         unset($this->form["ErrorsArray"]);
     }
     $this->form['view_tag'] = prepareHTMLDisplay($this->form['view_tag']);
     $this->form['name'] = prepareHTMLDisplay($this->form['name']);
     $this->form['descr'] = prepareHTMLDisplay($this->form['descr']);
     if (isset($this->form['default'])) {
         $this->form['default'] = prepareHTMLDisplay($this->form['default']);
     }
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:14,代码来源:edit_custom_attribute_az.php


示例12: outFilesByOne

 function outFilesByOne()
 {
     global $application;
     $html_code = '';
     foreach ($this->PFiles as $k => $pf_info) {
         $r = new Request();
         $r->setAction('direct_download_file');
         $r->setKey('file_id', $pf_info['file_id']);
         $template_contents = array('CycleColor' => $k % 2 == 0 ? '#FFFFFF' : '#EEF2F8', 'FileID' => $pf_info['file_id'], 'FileName' => $pf_info['file_name'], 'FSize' => modApiFunc('Product_Files', 'formatFileSize', $pf_info['file_size']), 'FileDescr' => prepareHTMLDisplay($pf_info['file_descr']), 'DirectFileLink' => $r->getURL());
         $this->_Template_Contents = $template_contents;
         $application->registerAttributes($this->_Template_Contents);
         $this->mTmplFiller =& $application->getInstance('TmplFiller');
         $html_code .= $this->mTmplFiller->fill("product_files/files_list/", "one-file.tpl.html", array());
     }
     return $html_code;
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:16,代码来源:files_list_az.php


示例13: output

 /**
  *
  */
 function output()
 {
     global $application;
     $request =& $application->getInstance('Request');
     $templateFiller = $application->getInstance('TmplFiller');
     $letter_id = $request->getValueByKey('letter_id');
     $letter_info = modApiFunc('Newsletter', 'getMessageInfo', $letter_id);
     if (empty($letter_info)) {
         $vars = array('Title' => getMsg('NLT', 'DELIVERY_TITLE'));
         return $templateFiller->fill('newsletter/', 'error_no_newsletter.tpl.html', $vars);
     }
     $counts = modApiFunc('Subscriptions', 'getLettersEmailsCount', array($letter_id));
     $letter_topics = $this->getLetterTopics($letter_id);
     $templateContents = array('LetterId' => $letter_id, 'LetterFrom' => prepareHTMLDisplay($letter_info['letter_from_name']) . '&nbsp;&lt;' . prepareHTMLDisplay($letter_info['letter_from_email']) . '&nbsp;&gt;', 'LetterSubject' => prepareHTMLDisplay($letter_info['letter_subject']), 'LetterTopics' => $letter_topics, 'EnableSend' => @$counts[$letter_id] > 0 ? 'yes' : '', 'TotalRecipients' => (int) @$counts[$letter_id]);
     $application->registerAttributes($templateContents);
     $this->_templateContents = $templateContents;
     return $templateFiller->fill('newsletter/', 'delivery_progress.tpl.html', array());
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:21,代码来源:newsletter_send_az.php


示例14: outputLocationBreadcrumb

 function outputLocationBreadcrumb($parents_list, $links, $view_name = "NavigationBar")
 {
     global $application;
     $CategoryId1Info = new CCategoryInfo(1);
     $this->CategoryId1Name = $CategoryId1Info->getCategoryTagValue('name');
     $retval = "";
     $isFirst = 1;
     $n = sizeof($parents_list);
     for ($i = 0; $i < $n; $i++) {
         $value = $parents_list[$i];
         $cat = new CCategoryInfo($value["id"]);
         $name = prepareHTMLDisplay($value["name"]);
         if ($cat->getCategoryTagValue('RecursiveStatus') == CATEGORY_STATUS_ONLINE) {
         } else {
             $name = '<span style="color: rgb(175, 175, 175);">' . $name . '</span>';
         }
         $arr = array("Href" => $this->getLinkToView($value["id"], $view_name, $cat), "Name" => $name, "CategoryId1Name" => prepareHTMLDisplay($this->CategoryId1Name));
         if ($n == 1) {
             $retval .= $this->mTmplFiller->fill("catalog/breadcrumb/", "single.tpl.html", $arr);
         } else {
             if ($i == 0) {
                 if ($links) {
                     $retval .= $this->mTmplFiller->fill("catalog/breadcrumb/", "first_link.tpl.html", $arr);
                 } else {
                     $retval .= $this->mTmplFiller->fill("catalog/breadcrumb/", "first.tpl.html", $arr);
                 }
             } else {
                 if ($i == $n - 1) {
                     $retval .= $this->mTmplFiller->fill("catalog/breadcrumb/", "last.tpl.html", $arr);
                 } else {
                     if ($links) {
                         $retval .= $this->mTmplFiller->fill("catalog/breadcrumb/", "default_link.tpl.html", $arr);
                     } else {
                         $retval .= $this->mTmplFiller->fill("catalog/breadcrumb/", "default.tpl.html", $arr);
                     }
                 }
             }
         }
     }
     if ($retval == "") {
         CTrace::wrn(array("CODE" => "CORE_053"), __CLASS__, __FUNCTION__);
     }
     return $retval;
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:44,代码来源:breadcrumb-az.php


示例15: output

 function output()
 {
     global $application;
     $parameters = func_get_args();
     $this->asc_ctor($parameters[1]);
     if (!$this->image_obj->is_empty()) {
         //:                    Images :: getImageData($image_id)
         $image_data = modApiFunc("Images", "selectImageThumbnail", $this->image_obj->get_id(), IMAGE_THUMB_SIZE);
         if ($image_data === NULL) {
             $this->_Template_Contents = array("IOId" => $parameters[0], "IOSrc" => modApiFunc("Images", "getAZImageSRC", EMPTY_IMAGE_BASENAME), "IOAltText" => getMsg('IMG', 'EMPTY_IMAGE_ALT_TEXT'));
         } else {
             $this->_Template_Contents = array("IOId" => $parameters[0], "IOSrc" => modApiFunc("Images", "getImageSRC", $image_data), "IOAltText" => prepareHTMLDisplay($image_data['image_alt_text']));
         }
     }
     $application->registerAttributes($this->_Template_Contents);
     $this->mTmplFiller = new TmplFiller(dirname(dirname(__FILE__)) . '/templates_az/');
     $res = $this->mTmplFiller->fill("image_output/", "container.tpl.html", array());
     return $res;
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:19,代码来源:image_output_az.php


示例16: onAction

 /**
  *
  */
 function onAction()
 {
     global $application;
     $MessageResources =& $application->getInstance('MessageResources');
     $request = $application->getInstance('Request');
     $comment = $request->getValueByKey('comment');
     $comment_hash = $request->getValueByKey('comment_hash');
     if ($comment_hash != md5($comment) && $comment) {
         $filename = modApiFunc("Tools", "getCurrentBackupFile");
         $backup_dir = $application->getAppIni('PATH_BACKUP_DIR');
         $time = time();
         $admin_info = modApiFunc("Users", "getUserInfo", modApiFunc("Users", "getCurrentUserID"));
         $fp = fopen($backup_dir . $filename . "/info/backup.log", "a");
         $msg = 'BCP_INFO_LOG_MSG_002';
         fwrite($fp, $MessageResources->getMessage(new ActionMessage(array($msg, modApiFunc("Localization", "timestamp_date_format", $time), modApiFunc("Localization", "timestamp_time_format", $time), $admin_info['firstname'], $admin_info['lastname'], $admin_info['email']))));
         fwrite($fp, "<i>" . strtr(prepareHTMLDisplay($comment), array("\n" => "<br>")) . "</i><br><hr style='border: 0px; height: 1px; color: #b2c2df; background-color: #b2c2df;'><br>");
         fclose($fp);
         modApiFunc('Session', 'set', 'ResultMessage', 'BCP_INFO_SAVED');
     }
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:23,代码来源:update_backup_info_action.php


示例17: getTag

 function getTag($tag)
 {
     $value = null;
     switch ($tag) {
         case 'Local_FormActionURL':
             $r = new Request();
             $r->setAction('save_personal_info');
             $r->setView('CustomerPersonalInfo');
             $value = $r->getURL();
             break;
         case 'Local_PersonalInfo':
             $value = $this->out_PersonalInfoGroups();
             break;
         case 'Local_FormName':
             $group_info = $this->customer_obj->getPersonInfoGroupInfoByName($this->current_group_name);
             $value = getMsg('CA', $group_info['lang_code']);
             break;
         case 'Local_Form':
             $value = $this->out_GroupAttributes();
             break;
         case 'Local_FieldName':
             $attr_info = $this->customer_obj->getPersonInfoAttrInfoByName($this->current_attr_name, $this->current_group_name);
             $value = prepareHTMLDisplay($attr_info['visible_name']);
             break;
         case 'Local_Field':
             $attr_value = $this->customer_obj->getPersonInfo($this->current_attr_name, $this->current_group_name);
             switch (_ml_strtolower($this->current_attr_name)) {
                 case 'country':
                     $value = $this->out_CountrySelect($attr_value);
                     break;
                 case 'state':
                     $value = $this->out_StatesSelect($attr_value);
                     break;
                     //                    case 'accountname':
                     //                    case 'email':
                     //                        if($this->current_group_name == 'Customer')
                     //                        {
                     //                            if($this->customer_obj->getPersonInfo('account') == $attr_value)
                     //                            {
                     //                                $value = prepareHTMLDisplay($attr_value);
                     //                                break;
                     //                            };
                     //                        };
                 //                    case 'accountname':
                 //                    case 'email':
                 //                        if($this->current_group_name == 'Customer')
                 //                        {
                 //                            if($this->customer_obj->getPersonInfo('account') == $attr_value)
                 //                            {
                 //                                $value = prepareHTMLDisplay($attr_value);
                 //                                break;
                 //                            };
                 //                        };
                 default:
                     $input_type = 'text';
                     if (preg_match("/password\$/i", $this->current_attr_name)) {
                         $input_type = "password";
                     }
                     $value = '<input type="' . $input_type . '" ' . HtmlForm::genInputTextField(255, 'customer_info[' . $this->current_group_name . '][' . $this->current_attr_name . ']', 32, prepareHTMLDisplay($attr_value)) . ' />';
                     break;
             }
             break;
     }
     return $value;
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:65,代码来源:customer_personal_info_cz.php


示例18: getTag

 function getTag($tag)
 {
     global $application;
     $value = null;
     switch ($tag) {
         case 'Local_AddPromoCode_URL':
             $request = new Request();
             $request->setView(CURRENT_REQUEST_URL);
             $request->setAction('AddPromoCode');
             #$request->setKey( 'promo_code', '' );
             $value = $request->getURL();
             break;
         case 'Local_AddPromoCode_Error':
             $AddPromoCodeError = modApiFunc("PromoCodes", "getAddPromoCodeError");
             modApiFunc("PromoCodes", "setAddPromoCodeError", "");
             if (!empty($AddPromoCodeError)) {
                 $value = getMsg('SYS', $AddPromoCodeError);
             } else {
                 $value = "";
             }
             break;
         case 'Local_RemovePromoCode_URL':
             $request = new Request();
             $request->setView(CURRENT_REQUEST_URL);
             $request->setAction('RemovePromoCode');
             $value = $request->getURL();
             break;
         case 'Local_PromoCode':
             $value = '';
             if ($this->pc_info !== false) {
                 $value = prepareHTMLDisplay($this->pc_info["promo_code"]);
             }
             break;
         case 'Local_PromoCodeDiscountedItemsListForCZ':
             $value = '';
             if ($this->pc_info !== false && $this->applicable === true) {
                 $home_present = false;
                 $cat_names = array();
                 $prod_names = array();
                 if ($this->pc_info['cats'] != null) {
                     $cats = explode('|', $this->pc_info['cats']);
                     foreach ($cats as $cid) {
                         $cat_obj = new CCategoryInfo($cid);
                         if ($cat_obj->_fCategoryIDIsIncorrect === true) {
                             continue;
                         }
                         // Home category present, we do not need anything else
                         if ($cid == 1) {
                             $home_present = true;
                             $cat_names = array();
                             $cat_names[] = cz_getMsg('PROMOCODE_HOME_CATEGORY_NAME_SUBST');
                             break;
                         } else {
                             $cat_names[] = $cat_obj->getCategoryTagValue('Name');
                         }
                     }
                 }
                 if ($this->pc_info['prods'] != null && !$home_present) {
                     $prods = explode('|', $this->pc_info['prods']);
                     foreach ($prods as $pid) {
                         $obj = new CProductInfo($pid);
                         if (!$obj->isProductIdCorrect()) {
                             continue;
                         }
                         $prod_names[] = $obj->getProductTagValue('Name');
                     }
                 }
                 if ($cat_names) {
                     $cat_names_str = implode(', ', $cat_names);
                     if ($home_present) {
                         $value .= $cat_names_str;
                     } else {
                         if (count($cat_names) == 1) {
                             $value .= cz_getMsg("PROMOCODE_CATEGORY_LABEL") . $cat_names_str;
                         } else {
                             $value .= cz_getMsg("PROMOCODE_CATEGORIES_LABEL") . $cat_names_str;
                         }
                     }
                     if ($prod_names) {
                         $value .= cz_getMsg("PROMOCODE_AND_LABEL");
                     }
                 }
                 if ($prod_names) {
                     $prod_names_str = implode(', ', $prod_names);
                     if (count($prod_names) == 1) {
                         $value .= cz_getMsg("PROMOCODE_PRODUCT_LABEL") . $prod_names_str;
                     } else {
                         $value .= cz_getMsg("PROMOCODE_PRODUCTS_LABEL") . $prod_names_str;
                     }
                 }
             }
             break;
         case 'Local_PromoCodeMinSubtotal':
             $value = '';
             if ($this->pc_info !== false && $this->applicable === true && $this->pc_info["min_subtotal"] != 0) {
                 $min_subtotal = modApiFunc("Localization", "currency_format", $this->pc_info["min_subtotal"]);
                 $value = str_replace('{MINSUBTOTAL}', $min_subtotal, cz_getMsg('PROMOCODE_MINSUBTOTAL_NEEDED'));
             }
             break;
         case 'Local_PromoCodeDiscount':
//.........这里部分代码省略.........
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:101,代码来源:promo_code_form_cz.php


示例19: outputSortItems

 /**
  * Fills the sort selert box
  */
 function outputSortItems()
 {
     $output = '';
     if (is_array($this->_found_pages)) {
         foreach ($this->_found_pages as $v) {
             $output .= '<option value="' . $v['page_id'] . '">' . prepareHTMLDisplay($v['name']) . '</option>';
         }
     }
     return $output;
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:13,代码来源:cms_pages_az.php


示例20: out_SearchForm

 function out_SearchForm()
 {
     global $application;
     $template_contents = array('SearchLettersList' => $this->out_SearchLettersList(), 'SearchLetterFilterSelect' => $this->out_SearchLetterFilterSelect(), 'SearchString' => $this->search_filter['type'] == 'custom' ? prepareHTMLDisplay($this->search_filter['search_string']) : '', 'SearchFormLabelColor' => $this->search_filter['type'] == 'custom' ? '#0000FF' : '#666666');
     $this->_Template_Contents = $template_contents;
     $application->registerAttributes($this->_Template_Contents);
     $this->mTmplFiller =& $application->getInstance('TmplFiller');
     return $this->mTmplFiller->fill("customer_account/customers_list/", "search-form.tpl.html", array());
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:9,代码来源:customers_list_az.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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