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


PHP HtmlForm::genDropdownYearsList方法代码示例

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


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

示例1: outputSearchReviews

 /**
  * Outputs the search form
  */
 function outputSearchReviews()
 {
     global $application;
     $start_year = (int) modApiFunc('Settings', 'getParamValue', 'VISUAL_INTERFACE', 'SEARCH_START_YEAR');
     $year_offset = (int) ((int) (date("Y") - $start_year) + modApiFunc('Settings', 'getParamValue', 'VISUAL_INTERFACE', 'SEARCH_YEAR_OFFSET'));
     $template_contents = array('LabelPending' => $this->outputLabel('ShowPendingReviews'), 'LabelBad' => $this->outputLabel('ShowBadReviews'), 'LabelGood' => $this->outputLabel('ShowGoodReviews'), 'LabelAll' => $this->outputLabel('ShowAllReviews'), 'LabelDate' => $this->outputLabel('SearchReviews', 'from'), 'LabelAuthor' => $this->outputLabel('SearchReviews', 'author'), 'LabelIPAddress' => $this->outputLabel('SearchReviews', 'ip_address'), 'LabelProduct' => $this->outputLabel('SearchReviews', 'product'), 'LabelRating' => $this->outputLabel('SearchReviews', 'rating'), 'LabelStatus' => $this->outputLabel('SearchReviews', 'status'), 'CountPending' => $this->outputCount('pending'), 'CountBad' => $this->outputCount('bad'), 'CountGood' => $this->outputCount('good'), 'CountAll' => $this->outputCount('all'), 'ActionField' => '<input type="hidden" ' . HtmlForm::genHiddenField('asc_action', 'SearchReviews') . ' />', 'ProductField' => '<input type="hidden" ' . HtmlForm::genHiddenField('product_id', @$this->_search_filter['product']['id']) . ' />', 'SelectFromDay' => HtmlForm::genDropdownDaysList('from_day', @$this->_search_filter['from']['day']), 'SelectFromMonth' => HtmlForm::genDropdownMonthsList('from_month', @$this->_search_filter['from']['month']), 'SelectFromYear' => HtmlForm::genDropdownYearsList('from_year', @$this->_search_filter['from']['year'], $start_year, $year_offset), 'SelectToDay' => HtmlForm::genDropdownDaysList('to_day', @$this->_search_filter['to']['day']), 'SelectToMonth' => HtmlForm::genDropdownMonthsList('to_month', @$this->_search_filter['to']['month']), 'SelectToYear' => HtmlForm::genDropdownYearsList('to_year', @$this->_search_filter['to']['year'], $start_year, $year_offset), 'AuthorField' => '<input class="form-control input-sm input-large" style="float:left;" type="text"' . HtmlForm::genInputTextField('128', 'author_name', 52, prepareHTMLDisplay(@$this->_search_filter['author']['name'])) . ' />', 'AuthorCheckbox' => HtmlForm::genCheckbox(array('value' => 'Y', 'is_checked' => @$this->_search_filter['author']['exactly'] == 'Y' ? 'checked' : '', 'name' => 'author_exactly', 'id' => 'author_exactly')), 'IPAddressField' => '<input class="form-control input-sm input-large" type="text"' . HtmlForm::genInputTextField('15', 'ip_address', 52, prepareHTMLDisplay(@$this->_search_filter['ip_address'])) . ' />', 'ProductNameField' => '<input class="form-control input-sm input-large" style="float:left;" type="text"' . HtmlForm::genInputTextField('128', 'product_name', 52, prepareHTMLDisplay(@$this->_search_filter['product']['name'])) . ' />', 'ProductCheckbox' => HtmlForm::genCheckbox(array('value' => 'Y', 'is_checked' => @$this->_search_filter['product']['exactly'] == 'Y' ? 'checked' : '', 'name' => 'product_exactly', 'id' => 'product_exactly')), 'RatingSelect' => HtmlForm::genDropdownSingleChoice(array('select_name' => 'rate', 'selected_value' => @$this->_search_filter['rating']['rate'], 'id' => 'rate', 'class' => 'input-small rating-margin-btm', 'values' => modApiFunc('Customer_Reviews', 'getRateValues'))), 'RatingAddSelect' => HtmlForm::genDropdownSingleChoice(array('select_name' => 'rate_range', 'selected_value' => @$this->_search_filter['rating']['range'], 'id' => 'rate_range', 'class' => 'input-small', 'values' => array(array('value' => '+', 'contents' => getMsg('CR', 'CR_ABOVE')), array('value' => '=', 'contents' => getMsg('CR', 'CR_EXACTLY')), array('value' => '-', 'contents' => getMsg('CR', 'CR_BELOW'))))), 'StatusSelect' => HtmlForm::genDropdownSingleChoice(array('select_name' => 'status', 'selected_value' => @$this->_search_filter['status'], 'id' => 'status', 'class' => 'input-small', 'values' => array(array('value' => 'All', 'contents' => getMsg('CR', 'CR_STATUS_ALL')), array('value' => 'A', 'contents' => getMsg('CR', 'CR_STATUS_APPROVED')), array('value' => 'P', 'contents' => getMsg('CR', 'CR_STATUS_PENDING')), array('value' => 'N', 'contents' => getMsg('CR', 'CR_STATUS_NOTAPPROVED'))))));
     $this->_Template_Contents = $template_contents;
     $application->registerAttributes($this->_Template_Contents);
     return $this->mTmplFiller->fill('customer_reviews/manage_customer_reviews/', 'search-reviews.tpl.html', array());
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:13,代码来源:cr_manage_customer_reviews_az.php

示例2: outputReviewDate

 /**
  * Outputs the date/time select boxes
  */
 function outputReviewDate()
 {
     global $application;
     if (isset($this->_Review_Data['datetime'])) {
         $datetime = modApiFunc('Localization', 'SQL_date_format', $this->_Review_Data['datetime'], 'Y-m-d H:i:s');
     } else {
         $datetime = modApiFunc('Localization', 'SQL_date_format', date('Y-m-d H:i:s'), 'Y-m-d H:i:s');
     }
     list($date, $time) = explode(' ', $datetime);
     $date = explode('-', $date);
     $time = explode(':', $time);
     $template_contents = array('SelectDay' => HtmlForm::genDropdownDaysList('review_data[day]', $date[2]), 'SelectMonth' => HtmlForm::genDropdownMonthsList('review_data[month]', $date[1]), 'SelectYear' => HtmlForm::genDropdownYearsList('review_data[year]', $date[0], CUSTOMER_REVIEWS_HIDDEN_START_YEAR, max(1, intval(date('Y')) - CUSTOMER_REVIEWS_HIDDEN_START_YEAR)), 'SelectHour' => $this->outputField('hour', $time[0], 24), 'SelectMinute' => $this->outputField('minute', $time[1], 60), 'SelectSecond' => $this->outputField('second', $time[2], 60));
     $this->_Template_Contents = $template_contents;
     $application->registerAttributes($this->_Template_Contents);
     return $this->mTmplFiller->fill('customer_reviews/review_data/', 'output-review-date.tpl.html', array());
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:19,代码来源:cr_review_data_az.php


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