本文整理汇总了PHP中input_date_tag函数的典型用法代码示例。如果您正苦于以下问题:PHP input_date_tag函数的具体用法?PHP input_date_tag怎么用?PHP input_date_tag使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了input_date_tag函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: object_input_date_tag
/**
* Returns a html date control.
*
* @param object $object An object.
* @param string $method An object column.
* @param array $options Date options.
* @param string $default_value Date default value.
*
* @return string An html string which represents a date control.
*
*/
function object_input_date_tag($object, $method, $options = array(), $default_value = null)
{
$options = _parse_attributes($options);
$value = _get_object_value($object, $method, $default_value, $param = 'Y-m-d G:i');
return input_date_tag(_convert_method_to_name($method, $options), $value, $options);
}
示例2: __
?>
</td></tr>
<tr><td >
<label><?php
echo __('Time in');
?>
</label><br/>
<?php
echo object_input_date_tag($attendance, 'getTimeIn', array('readonly' => true, 'maxlength' => 16, 'size' => 16, 'rich' => true, 'calendar_button_img' => '/images/calendar.gif', 'withtime' => true), date('Y/m/d h:i'));
?>
<?php
echo form_error('time_in');
?>
</td></tr>
<tr><td >
<label><?php
echo __('Time out');
?>
</label><br/>
<?php
echo input_date_tag('time_out', date('Y/m/d h:i'), array('readonly' => true, 'maxlength' => 16, 'size' => 16, 'rich' => true, 'calendar_button_img' => '/images/calendar.gif', 'withtime' => true));
?>
<?php
echo form_error('time_out');
?>
</td></tr>
</tbody>
</table>
</td></tr>
</table>
</form>
示例3: submit_image_tag
echo 'style=""';
}
?>
>
<td class='filter'><?php
echo submit_image_tag('/images/magnifier.png', array('class' => 'sort', 'onclick' => "blur();"));
?>
</td>
<td class='filter_first'><?php
echo object_select_tag(isset($filters['ACADEMIC_CALENDAR_ID']) ? $filters['ACADEMIC_CALENDAR_ID'] : null, null, array('include_blank' => true, 'related_class' => 'AcademicCalendar', 'text_method' => '__toString', 'control_name' => 'filters[ACADEMIC_CALENDAR_ID]', 'peer_method' => 'doSelectFiltered', 'style' => 'width: 130px;'));
?>
</td>
<td class="filter"><?php
echo input_date_tag('filters[START]', isset($filters['START']) ? $filters['START'] : null, array('rich' => true, 'withtime' => false, 'calendar_button_img' => '/images/calendar.gif'));
?>
</td>
<td class='filter'>
<?php
echo input_tag('filters[ACTIVITY_LENGTH]', isset($filters['ACTIVITY_LENGTH']) ? $filters['ACTIVITY_LENGTH'] : null, array('size' => 7));
?>
</td>
<td class='filter'><?php
echo object_select_tag(isset($filters['ACTIVITY_TYPE_ID']) ? $filters['ACTIVITY_TYPE_ID'] : null, null, array('include_blank' => true, 'related_class' => 'ActivityType', 'text_method' => '__toString', 'control_name' => 'filters[ACTIVITY_TYPE_ID]'));
?>
</td>
<td class='filter'><?php
示例4: LiveValidation
<script type="text/javascript">
var cnic = new LiveValidation('cnic', { validMessage: "<?php
echo Constant::VALIDATION_SUCCESS;
?>
"});
cnic.add( Validate.Presence,{ failureMessage: "<?php
echo Constant::VALIDATION_REQUIRED_FIELD;
?>
"});
</script>
</tr>
<tr>
<td width="155" align="left" height="30" style="padding-left:10px; padding-top:10px" valign="top">Date of Birth:</td>
<td width="445" align="left" height="30" style="padding-left:10px; padding-top:10px"><?php
echo input_date_tag('dob', '', array('style' => 'width:100px', 'year_start' => '1910', 'year_end' => '2020', 'use_short_month' => 'true'));
?>
</td>
</tr>
<tr>
<td width="155" align="left" height="30" style="padding-left:10px; padding-top:10px" valign="top">Gender:</td>
<td width="445" align="left" height="30" style="padding-left:10px; padding-top:10px">
<?php
echo radiobutton_tag('gender[]', 'Male', true, array('class' => 'checkbox'));
?>
Male
<?php
echo radiobutton_tag('gender[]', 'Female', false, array('class' => 'checkbox'));
?>
Female
示例5: submit_image_tag
}
?>
>
<td class='filter'><?php
echo submit_image_tag('/images/magnifier.png', array('class' => 'sort', 'onclick' => "blur();"));
?>
</td>
<td class='filter_first'>
<?php
echo input_tag('filters[MEETING_POINT]', isset($filters['MEETING_POINT']) ? $filters['MEETING_POINT'] : null, array('size' => 5));
?>
</td>
<td class='filter'>
<?php
echo input_date_tag('filters[DATE]', isset($filters['DATE']) ? $filters['DATE'] : null, array('rich' => true, 'calendar_button_img' => '/images/calendar.gif'));
?>
</td>
<td class='filter'><?php
echo input_tag('filters[DETAIL]', isset($filters['DETAIL']) ? $filters['DETAIL'] : null, array('size' => 20));
?>
</td>
<td class='filter'>
<?php
echo select_tag('filters[STATUS]', options_for_select(array(ClassAgenda::FINISH => __('Tuntas'), ClassAgenda::UNFINISH => __('Tidak Tuntas')), isset($filters['STATUS']) ? $filters['STATUS'] : null, array('include_blank' => true)));
?>
</td>
<td class="filter" colspan="2"> </td>
</tr>
示例6: form_error
echo form_error('last_name');
?>
</div>
<div class="row">
<?php
echo label_for('gender', __('Gender'));
?>
<?php
echo select_tag('gender', options_for_select(array(null, 'M' => __('Male'), 'F' => __('Female')), $sf_params->get('gender')));
?>
<?php
echo form_error('gender');
?>
</div>
<div class="row">
<?php
echo label_for('birthday', __('Birthday'));
?>
<?php
echo input_date_tag('birthday', $sf_params->get('birthday'), 'rich=true class=date calendar_button_img=date.png');
?>
<?php
echo form_error('birthday');
?>
</div>
<div class="row right_col">
<?php
echo submit_tag(__('Save'));
?>
</div>
</form>
示例7: input_fecha_tag
function input_fecha_tag($name, $fecha = null, $options = array())
{
use_helper('DateForm');
$mi_fecha = !$fecha || $fecha == '' ? 'now' : $fecha;
$value = "";
$value .= input_date_tag($name . '[date]', $mi_fecha, array('rich' => true, 'calendar_button_img' => '/images/icons/date.png'));
return $value;
}
示例8: form_error
?>
form-error<?php
}
?>
">
<?php
if ($sf_request->hasError('parametro{fecha}')) {
?>
<?php
echo form_error('parametro{fecha}', array('class' => 'form-error-msg'));
?>
<?php
}
?>
<?php
$value = input_date_tag('parametro[fecha]', $parametro->getFecha(), array('rich' => true));
echo $value ? $value : ' ';
?>
</div>
</div>
<?php
}
?>
<?php
// ###### CADENA #########################################################
if ($parametro_def->getCampoCadena() != "") {
?>
<div class="form-row">
<?php
echo label_for('parametro[cadena]', $parametro_def->getCampoCadena(), 'class="" ');
示例9: input_date_tag
<div class="box_title">
<h2><span class="dark_blue">List of Previous Reports</span></h2>
</div>
<div class="box_text_content">
<div class="box_text">
<table class="form" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr height="30">
<td colspan="4" valign="top"> <h2>Please Select a "Visit Date" to search.</h2>
</tr>
<tr height="30">
<td width="14%">Visit Date:</td>
<td width="86%"> <?php
echo input_date_tag('visit_date', '', 'rich=true, size=20');
?>
</td>
</tr>
<tr height="50">
<td> </td>
<td colspan="2" valign="top">
<table width="100%" align="left" border="0" class="form">
<tr>
<td width="2%"><?php
echo submit_tag(' ', array('class' => 'btn_view', 'style' => 'border:none'));
?>
</td>
<td width="96%"> </td>
示例10: form_error
echo form_error('guardian_name');
?>
</td>
</tr>
<tr>
<td><label class="applicant"><?php
echo __('Tempat, Tanggal Lahir');
?>
</label></td><td>:</td>
<td>
<?php
echo object_input_tag($guardian, 'getPob', array('size' => 10, 'maxlength' => 15, 'id' => 'guardian_pob', 'name' => 'guardian_pob'));
?>
,
<?php
echo input_date_tag('guardian_dob', $guardian->getDob() ? $guardian->getDob("Y-m-d") : NULL, 'rich=true class=normaldate withtime=true culture=fr_FR format=dd-MM-Y', array('calendar_button_img' => '/images/calendar.gif', 'id' => 'guardian_dob', 'name' => 'guardian_dob'));
?>
<br /><?php
echo form_error('guardian_pob');
echo form_error('guardian_dob');
?>
</td>
</tr>
<tr>
<td><label class="applicant"><?php
echo __('Pekerjaan');
?>
</label></td><td>:</td>
<td>
<?php
echo object_input_tag($guardian, 'getJob', array('size' => 40, 'maxlength' => 255, 'id' => 'guardian_job', 'name' => 'guardian_job'));
示例11: panel_date
function panel_date($name, $input = null, $options = array(), $methode = null)
{
$out = get_field_wrapper($options, $name);
if ($err = sfContext::getInstance()->getRequest()->getError($name)) {
$options['class'] .= " error";
}
$code = input_date_tag($name, get_val($input, $methode, $name), clear_options($options));
return str_replace('##code##', $code, $out);
}
示例12: radiobutton_tag
<?php
echo radiobutton_tag('evento[recurrencia_fin_tipo][]', '1', $recurrencia_fin_1, array('disabled' => !$activar_repeticion, 'onClick' => 'javascript:HabilitaDeshabilitaRangoFrecuencia(\'evento_recurrencia_fin_repeticion\')'));
?>
Terminar después de
<?php
echo input_tag('evento[recurrencia_fin_repeticion]', $recurrencia_fin_repeticion, array('disabled' => !$activar_repeticion, 'maxlength' => 4, 'size' => 4));
?>
veces.<br>
<?php
echo radiobutton_tag('evento[recurrencia_fin_tipo][]', '2', $recurrencia_fin_2, array('disabled' => !$activar_repeticion, 'onClick' => 'javascript:HabilitaDeshabilitaRangoFrecuencia(\'evento_recurrencia_fin_fecha\')'));
?>
Terminar el:
<?php
echo input_date_tag('evento[recurrencia_fin_fecha]', $recurrencia_fin_fecha, array('rich' => true, 'calendar_button_img' => sfConfig::get('sf_admin_web_dir') . '/images/date.png', 'control_name' => 'evento[recurrencia_fin_fecha]', 'disabled' => !$activar_repeticion));
?>
<br>
</div>
<?php
echo object_input_hidden_tag($evento, 'getId', array('control_name' => 'id_evento'));
?>
</fieldset>
<!--
<ul class="sf_admin_actions">
<li><?php
echo submit_tag(__('Grabar'), array('name' => 'Grabar', 'class' => 'sf_admin_action_save'));
?>
示例13: input_tag
<?php
$i++;
}
?>
<tr class="sf_admin_row_0">
<td><?php
echo input_tag("periodo[{$i}][descripcion]", '');
?>
</td>
<td><?php
echo input_date_tag("periodo[{$i}][fecha_inicio]", '', "rich=true calendar_button_img=/sf/sf_admin/images/date.png");
?>
</td>
<td><?php
echo input_date_tag("periodo[{$i}][fecha_fin]", '', "rich=true calendar_button_img=/sf/sf_admin/images/date.png");
?>
</td>
<td><?php
echo checkbox_tag("periodo[{$i}][calcular]", '1', false);
?>
</td>
<td><?php
echo input_tag("periodo[{$i}][formula]", '');
?>
</td>
<td></td>
</tr>
</tbody>
<tfoot>
示例14: printParam
public function printParam($mandatory, $lable, $param_name, $input_type, $original_extra_params = NULL, $extra_params_for_select = NULL, $should_echo = NULL)
{
if ($should_echo == NULL) {
$should_echo = $this->m_should_echo;
}
$res = "";
if ($this->m_object_type === self::OBJECT_TYPE_MY_BASE_OBJECT) {
$p = $this->m_current_object->getParamFromObject($param_name);
} else {
if ($this->m_object_type === self::OBJECT_TYPE_ORM_BASE_OBJECT) {
$p = baseObjectUtils::getParamFromObject($this->m_current_object, $param_name);
}
}
// use this so the style=font-size:8pt will always be appended to the original_extra_params
$extra_params = array();
//["style"] = "font-size:8pt";
kArray::associativePush($extra_params, $original_extra_params);
if (kString::isEmpty($this->m_current_prefix)) {
$field_name = $param_name;
} else {
$field_name = $this->m_current_prefix . self::PREFIX_NAME_SEPARATOR . $param_name;
}
$error = form_error($param_name);
if ($this->m_create_tr) {
if ($error) {
$res .= "<tr><td colspan=2>" . $error . "</td></tr>";
}
if ($input_type == "hidden") {
$res .= "<tr><td></td>";
} else {
$res .= " <tr><td valign=top><label for=\"" . $field_name . "\">" . ($mandatory ? "*" : "") . $lable . ":</label></td>";
}
$res .= "<td sytle='font-size:8pt'>";
} else {
// do nothing - the format will be done externally
}
if ($input_type == "text") {
$res .= input_tag($field_name, $p, $extra_params);
} elseif ($input_type == "hidden") {
$res .= input_hidden_tag($field_name, $p, $extra_params);
} elseif ($input_type == "textarea") {
$res .= textarea_tag($field_name, $p, $extra_params);
} elseif ($input_type == "upload") {
$res .= self::createUploadStructure($field_name, $p, NULL, $extra_params, NULL, $should_echo);
/*
echo tag('input', array_merge(array('name' => $field_name, 'value' => $p ,
'id' => $field_name, 'READONLY' => '', 'oncomplete' => 'onComplete_'.str_replace('.', '_', $field_name).'()'), $extra_params));
echo tag('input', array_merge(array('type' => 'button', 'value' => 'MyBrowse...',
'onclick' => 'uploadBrowse(this)', 'uploadElement' => "$field_name"), $extra_params));
echo tag('input', array_merge(array('type' => 'button', 'value' => 'Clear',
'onclick' => 'javascript:{$(\''.$field_name.'\').value = \'\';}'), $extra_params));
if ( ! kString::isEmpty ( $p ) )
{
echo "<img src='/images/file_exists.png' width='16' height='16'>";
}
*/
} elseif ($input_type == "file") {
$res .= input_file_tag($field_name, $p, $extra_params);
} elseif ($input_type == "date") {
$extra_params["rich"] = "true";
$extra_params["style"] = "width:80";
kArray::associativePush($extra_params, $original_extra_params);
// TODO - see how to format the date there and back from the DB format "dd/mm/yyyy" to "
$converted_date = dateUtils::convertFromPhpDate($p);
// always append the default "rich=true" to the extra_params
//$extra_params[] = 'rich=true' ;
$res .= input_date_tag($field_name, $converted_date, $extra_params);
} elseif ($input_type == "select") {
$more_extra_params = array("style" => "font-size:8pt");
kArray::associativePush($more_extra_params, $extra_params_for_select);
$res .= select_tag($field_name, options_for_select($original_extra_params, $p), $more_extra_params);
} elseif ($input_type == "radio") {
// assume the $lable holda the value of the radio
$res .= radiobutton_tag($field_name, $lable, $p == $lable);
} elseif ($input_type == "radiogroup") {
// assume the $extra_params hold a lable-value array
foreach ($extra_params as $lable => $name) {
$value = $extra_params[$lable];
$res .= $lable . " " . radiobutton_tag($field_name, $value, $p == $value);
}
} elseif ($input_type == "checkbox") {
$res .= checkbox_tag($field_name, "true", $p == "true", $extra_params);
} elseif ($input_type == "color") {
die("color is no longer supported !");
// $res .= myColorPicker::getPickerHtml( $p , $field_name ); // TODO - pass on $extra_params ?
} elseif ($input_type == "country") {
$more_extra_params = array("style" => "font-size:8pt");
kArray::associativePush($more_extra_params, $extra_params_for_select);
$res .= select_country_tag($field_name, $p, $more_extra_params);
} elseif ($input_type == "language") {
$more_extra_params = array("style" => "font-size:8pt");
kArray::associativePush($more_extra_params, $extra_params_for_select);
$res .= select_language_tag($field_name, $p, $more_extra_params);
} else {
throw new Exception("Unknown input_type [" . $input_type . "]");
}
if ($this->m_create_tr) {
//.........这里部分代码省略.........
示例15: Date
break;
case 6:
$fecha = new Date();
$fecha->setFirstDayOfYear();
$valor_fecha = $fecha->getTimestamp();
break;
case 7:
$fecha = new Date();
$fecha->setLastDayOfYear();
$valor_fecha = $fecha->getTimestamp();
break;
}
} else {
$valor_fecha = $valor->getFecha();
}
$value .= input_date_tag($control_name, $valor_fecha, array('control_name' => $control_name, 'rich' => true, 'calendar_button_img' => '/images/icons/date.png'));
if ($campo->getMostrarEnPadre()) {
use_helper('Javascript');
if ($valor == null) {
$valor_sino = false;
} else {
$valor_sino = $valor->getSiNo();
}
$value .= " " . __("Configurar alarma") . ": " . checkbox_tag($campo_name . '[tiene_alarma]', '', $valor_sino, array('control_name' => $campo_name . '[tiene_alarma]', 'onclick' => 'if (this.checked) document.getElementById(\'capa_campo_' . $campo->getIdCampo() . '\').style.display = \'block\'; else document.getElementById(\'capa_campo_' . $campo->getIdCampo() . '\').style.display = \'none\';'));
if (!$valor_sino) {
$txt_vis = "style=\"display:none;\"";
} else {
$txt_vis = "";
}
$valores = explode("##", $valor ? $valor->getTextoCorto() : "");
//for ($i = 1; $i <= 5 ; $i++){