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


PHP html_select::make_time_selector方法代码示例

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


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

示例1: display_add_field

 function display_add_field($recordid = 0)
 {
     global $DB, $OUTPUT;
     if ($recordid) {
         $content = (int) $DB->get_field('data_content', 'content', array('fieldid' => $this->field->id, 'recordid' => $recordid));
     } else {
         $content = time();
     }
     $str = '<div title="' . s($this->field->description) . '">';
     $dayselector = html_select::make_time_selector('days', 'field_' . $this->field->id . '_day', $content);
     $monthselector = html_select::make_time_selector('months', 'field_' . $this->field->id . '_month', $content);
     $yearselector = html_select::make_time_selector('years', 'field_' . $this->field->id . '_year', $content);
     $str .= $OUTPUT->select($dayselector) . $OUTPUT->select($monthselector) . $OUTPUT->select($yearselector);
     $str .= '</div>';
     return $str;
 }
开发者ID:ajv,项目名称:Offline-Caching,代码行数:16,代码来源:field.class.php

示例2: print_date_selector

/**
 * Prints form items with the names $day, $month and $year
 *
 * @deprecated since Moodle 2.0
 *
 * @param string $day   fieldname
 * @param string $month  fieldname
 * @param string $year  fieldname
 * @param int $currenttime A default timestamp in GMT
 * @param boolean $return If set to true returns rather than echo's
 * @return string|bool Depending on value of $return
 */
function print_date_selector($day, $month, $year, $currenttime = 0, $return = false)
{
    debugging('print_date_selector() has been deprecated. Please change your code to use $OUTPUT->select($dateselector).');
    global $OUTPUT;
    $dayselector = html_select::make_time_selector('days', $day, $currenttime);
    $monthselector = html_select::make_time_selector('months', $month, $currenttime);
    $yearselector = html_select::make_time_selector('years', $year, $currenttime);
    $output = $OUTPUT->select($dayselector) . $OUTPUT->select($monthselector) . $OUTPUT->select($yearselector);
    if ($return) {
        return $output;
    } else {
        echo $output;
    }
}
开发者ID:ajv,项目名称:Offline-Caching,代码行数:26,代码来源:deprecatedlib.php

示例3: make_time_selectors

 /**
  * Given an associative array of type => fieldname and an optional timestamp,
  * returns an array of html_select components representing date/time selectors.
  * @param array $selectors Arrays of type => fieldname. Selectors will be returned in the order of the types given
  * @param int $currenttime A UNIX timestamp
  * @param int $step minute spacing
  * @return array Instantiated date/time selectors
  */
 public function make_time_selectors($selectors, $currenttime = 0, $step = 5)
 {
     $selects = array();
     foreach ($selectors as $type => $name) {
         $selects[] = html_select::make_time_selector($type, $name, $currenttime, $step);
     }
     return $selects;
 }
开发者ID:ajv,项目名称:Offline-Caching,代码行数:16,代码来源:outputcomponents.php

示例4: p

    <td><input type="text" name="an_referer" size="35" value="<?php 
p($frm->an_referer);
?>
" /><br />
        <?php 
print_string("anreferer", "enrol_authorize");
?>
</td>
</tr>

<tr valign="top">
    <td align="right">an_cutoff:</td>
    <td><?php 
$curtime = make_timestamp(2000, 1, 1, $frm->an_cutoff_hour, $frm->an_cutoff_min);
$hourselector = html_select::make_time_selector('hours', 'an_cutoff_hour', $curtime);
$minselector = html_select::make_time_selector('minutes', 'an_cutoff_min', $curtime);
echo $OUTPUT->select($hourselector) . $OUTPUT->select($minselector);
?>
<br />
        <?php 
print_string("cutofftime", "enrol_authorize");
?>
</td>
</tr>

<tr valign="top">
    <td align="right">an_avs:</td>
    <td><?php 
echo $OUTPUT->checkbox(html_select_option::make_checkbox('1', !empty($frm->an_avs)), 'an_avs');
?>
<br />
开发者ID:ajv,项目名称:Offline-Caching,代码行数:31,代码来源:config_form.php


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