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

PHP input_select函数代码示例

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

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



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

示例1: show_form

function show_form($errors = '')
{
    global $months, $days, $years;
    // If the form is submitted, get defaults from submitted variables
    if ($_POST['_submit_check']) {
        $defaults = $_POST;
    } else {
        // Otherwise, set our own defaults: one month from now
        $default_timestamp = strtotime('+1 month');
        $defaults = array('month' => date('n', $default_timestamp), 'day' => date('j', $default_timestamp), 'year' => date('Y', $default_timestamp));
    }
    // If errors were passed in, put them in $error_text (with HTML markup)
    if ($errors) {
        print 'You need to correct the following errors: <ul><li>';
        print implode('</li><li>', $errors);
        print '</li></ul>';
    }
    print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
    print 'Enter a date and time:';
    input_select('month', $defaults, $months);
    print ' ';
    input_select('day', $defaults, $days);
    print ' ';
    input_select('year', $defaults, $years);
    print '<br/>';
    input_submit('submit', 'Find Tuesdays');
    print '<input type="hidden" name="_submit_check" value="1"/>';
    print '</form>';
}
开发者ID:Higashi0809,项目名称:php,代码行数:29,代码来源:answer-9-4.php


示例2: show_form

function show_form($errors = '')
{
    if ($errors) {
        print 'You need to correct the following errors: <ul><li>';
        print implode('</li><li>', $errors);
        print '</li></ul>';
    }
    // the beginning of the form
    print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
    print '<table>';
    // the first address
    print '<tr><th colspan="2">From</th></tr>';
    print '<td>Name:</td><td>';
    input_text('name_1', $_POST);
    print '</td></tr>';
    print '<tr><td>Street Address:</td><td>';
    input_text('address_1', $_POST);
    print '</td></tr>';
    print '<tr><td>City, State, Zip:</td><td>';
    input_text('city_1', $_POST);
    print ', ';
    input_select('state_1', $_POST, $GLOBALS['us_states']);
    input_text('zip_1', $_POST);
    print '</td></tr>';
    // the second address
    print '<tr><th colspan="2">To</th></tr>';
    print '<td>Name:</td><td>';
    input_text('name_2', $_POST);
    print '</td></tr>';
    print '<tr><td>Street Address:</td><td>';
    input_text('address_2', $_POST);
    print '</td></tr>';
    print '<tr><td>City, State, Zip:</td><td>';
    input_text('city_2', $_POST);
    print ', ';
    input_select('state_2', $_POST, $GLOBALS['us_states']);
    input_text('zip_2', $_POST);
    print '</td></tr>';
    // Package Info
    print '<tr><th colspan="2">Package</th></tr>';
    print '<tr><td>Height:</td><td>';
    input_text('height', $_POST);
    print '</td></tr>';
    print '<tr><td>Width:</td><td>';
    input_text('width', $_POST);
    print '</td></tr>';
    print '<tr><td>Length:</td><td>';
    input_text('length', $_POST);
    print '</td></tr>';
    print '<tr><td>Weight:</td><td>';
    input_text('weight', $_POST);
    print '</td></tr>';
    // form end
    print '<tr><td colspan="2"><input type="submit" value="Ship Package"></td></tr>';
    print '</table>';
    print '<input type="hidden" name="_submit_check" value="1"/>';
    print '</form>';
}
开发者ID:Higashi0809,项目名称:php,代码行数:58,代码来源:answer-6-4.php


示例3: render_valores_padrao_meta_box

 /**
  * Render Meta Box content.
  * @param WP_Post $post The post object.
  */
 public function render_valores_padrao_meta_box($post)
 {
     $postId = $post->ID;
     // Organizador
     $organizadores = Organizadores::getInstance()->getAll();
     $organizadores = Plib::array_to_key_value(Plib::object_to_array($organizadores), 'id', 'titulo');
     $organizadores[''] = "";
     echo input_select($postId, 'valor_id_organizador', 'Organizador:', $organizadores);
     // Confirmação
     echo input_select($postId, 'valor_confirmacao', 'Confirmação da Inscrição:', array('' => '', 'preinscricao' => 'Pré-inscrição', 'imediata' => 'Imediata', 'pagamento' => 'Após Confirmação do Pagamento', 'posterior' => 'Posteriormente pelo Organizador'));
     // Tipo de inscrição
     //echo input_select($postId, 'pago', 'Tipo de Inscrição:', array(''=>'','pago' => 'Paga', 'gratuito' => 'Gratuita'));
     // Add an nonce field so we can check for it later.
     wp_nonce_field('myplugin_inner_custom_box', 'myplugin_inner_custom_box_nonce');
 }
开发者ID:TiagoGouvea,项目名称:event-manager-plugin-wordpress,代码行数:19,代码来源:Tgo_Template.class.php


示例4: show_form

function show_form($errors = '')
{
    print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
    if ($errors) {
        print '<ul><li>';
        print implode('</li><li>', $errors);
        print '</li></ul>';
    }
    // Since we're not supplying any defaults of our own, it's OK
    // to pass $_POST as the defaults array to input_select and
    // input_text so that any user-entered values are preserved
    print 'Color: ';
    input_select('color', $_POST, $GLOBALS['colors']);
    print '<br/>';
    input_submit('submit', 'Select Color');
    print '<input type="hidden" name="_submit_check" value="1"/>';
    print '</form>';
}
开发者ID:Higashi0809,项目名称:php,代码行数:18,代码来源:answer-8-3.php


示例5: show_form

function show_form($errors = '')
{
    if ($errors) {
        print 'You need to correct the following errors: <ul><li>';
        print implode('</li><li>', $errors);
        print '</li></ul>';
    }
    print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
    print 'Expiration Date: ';
    input_select('month', $_POST, $GLOBALS['months']);
    print ' ';
    input_select('year', $_POST, $GLOBALS['years']);
    print '<br/>';
    input_submit('submit', 'Check Expiration');
    // the hidden _submit_check variable and the end of the form
    print '<input type="hidden" name="_submit_check" value="1"/>';
    print '</form>';
}
开发者ID:KimiyukiYamauchi,项目名称:php.2015,代码行数:18,代码来源:example-9-13.php


示例6: show_form

function show_form($errors = '')
{
    global $hours, $minutes, $months, $days, $years;
    // If the form is submitted, get defaults from submitted variables
    if ($_POST['_submit_check']) {
        $defaults = $_POST;
    } else {
        // Otherwise, set our own defaults: the current time and date parts
        $defaults = array('hour' => date('g'), 'ampm' => date('a'), 'month' => date('n'), 'day' => date('j'), 'year' => date('Y'));
        // Because the choices in the minute menu are in five-minute increments,
        // if the current minute isn't a multiple of five, we need to make it
        // into one.
        $this_minute = date('i');
        $minute_mod_five = $this_minute % 5;
        if ($minute_mod_five != 0) {
            $this_minute -= $minute_mod_five;
        }
        $defaults['minute'] = sprintf('%02d', $this_minute);
    }
    // If errors were passed in, put them in $error_text (with HTML markup)
    if ($errors) {
        print 'You need to correct the following errors: <ul><li>';
        print implode('</li><li>', $errors);
        print '</li></ul>';
    }
    print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
    print 'Enter a date and time:';
    input_select('hour', $defaults, $hours);
    print ':';
    input_select('minute', $defaults, $minutes);
    input_select('ampm', $defaults, array('am' => 'am', 'pm' => 'pm'));
    input_select('month', $defaults, $months);
    print ' ';
    input_select('day', $defaults, $days);
    print ' ';
    input_select('year', $defaults, $years);
    print '<br/>';
    input_submit('submit', 'Find Meeting');
    print '<input type="hidden" name="_submit_check" value="1"/>';
    print '</form>';
}
开发者ID:e15007,项目名称:php2,代码行数:41,代码来源:example-9-16.php


示例7: show_form

function show_form($errors = '')
{
    global $db;
    if ($errors) {
        print 'You need to correct the following errors: <ul><li>';
        print implode('</li><li>', $errors);
        print '</li></ul>';
    }
    // the beginning of the form
    print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
    print '<table>';
    // dish select menu
    print '<tr><td>Dish:</td><td>';
    input_select('dish_name', $_POST, $GLOBALS['dish_names']);
    print '</td></tr>';
    // form end
    print '<tr><td colspan="2"><input type="submit" value="Search Dishes"></td></tr>';
    print '</table>';
    print '<input type="hidden" name="_submit_check" value="1"/>';
    print '</form>';
}
开发者ID:Higashi0809,项目名称:php,代码行数:21,代码来源:answer-7-3.php


示例8: show_form

function show_form($errors = '')
{
    global $months, $years, $this_year;
    // If the form is submitted, get defaults from submitted variables
    if ($_POST['_submit_check']) {
        $defaults = $_POST;
    } else {
        // Otherwise, set our own defaults: the current month and year
        $defaults = array('year' => date('Y'), 'month' => date('n'));
    }
    if ($errors) {
        print 'You need to correct the following errors: <ul><li>';
        print implode('</li><li>', $errors);
        print '</li></ul>';
    }
    print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
    input_select('month', $defaults, $months);
    input_select('year', $defaults, $years);
    input_submit('submit', 'Show Calendar');
    print '<input type="hidden" name="_submit_check" value="1"/>';
    print '</form>';
}
开发者ID:Higashi0809,项目名称:php,代码行数:22,代码来源:example-9-17.php


示例9: show_form

function show_form($errors = '')
{
    print '<form method="POST" action="' . $_SERVER['SCRIPT_NAME'] . '">';
    if ($errors) {
        print '<ul><li>';
        print implode('</li><li>', $errors);
        print '</li></ul>';
    }
    // Since we're not supplying any defaults of our own, it's OK
    // to pass $_POST as the defaults array to input_select and
    // input_text so that any user-entered values are preserved
    print 'Dish: ';
    input_select('dish', $_POST, $GLOBALS['main_dishes']);
    print '<br/>';
    print 'Quantity: ';
    if (!array_key_exists('quantity', $_POST)) {
        $_POST['quantity'] = '';
    }
    input_text('quantity', $_POST);
    print '<br/>';
    input_submit('submit', 'Order');
    print '<input type="hidden" name="_submit_check" value="1"/>';
    print '</form>';
}
开发者ID:KimiyukiYamauchi,项目名称:php.2015,代码行数:24,代码来源:example-8-10.php


示例10: array

<?php

require '../chap6/formhelpers.php';
$months = array(1 => 'January', 2 => 'February', 3 => 'March', 4 => 'April', 5 => 'May', 6 => 'June', 7 => 'July', 8 => 'August', 9 => 'September', 10 => 'October', 11 => 'November', 12 => 'December');
$days = array();
for ($i = 1; $i <= 31; $i++) {
    $days[$i] = $i;
}
$years = array();
for ($year = date('Y') - 1, $max_year = date('Y') + 5; $year < $max_year; $year++) {
    $years[$year] = $year;
}
input_select('month', $_POST, $months);
print ' ';
input_select('day', $_POST, $days);
print ' ';
input_select('year', $_POST, $years);
开发者ID:KimiyukiYamauchi,项目名称:php.2015,代码行数:17,代码来源:example-9-12.php


示例11: show_form

function show_form($errors = '')
{
    // If the form is submitted, get defaults from submitted parameters
    if (array_key_exists('_submit_check', $_POST)) {
        $defaults = $_POST;
    } else {
        // Otherwise, set our own defaults
        $defaults = array('dish_name' => '', 'min_price' => '5.00', 'max_price' => '25.00', 'is_spicy' => 'no');
    }
    // If errors were passed in, put them in $error_text (with HTML markup)
    if (is_array($errors)) {
        $error_text = '<tr><td>You need to correct the following errors:';
        $error_text .= '</td><td><ul><li>';
        $error_text .= implode('</li><li>', $errors);
        $error_text .= '</li></ul></td></tr>';
    } else {
        // No errors? Then $error_text is blank
        $error_text = '';
    }
    // Jump out of PHP mode to make displaying all the HTML tags easier
    ?>
<form method="POST" action="<?php 
    print $_SERVER['PHP_SELF'];
    ?>
">
<table>
<?php 
    print $error_text;
    ?>

<tr><td>Dish Name:</td>
<td><?php 
    input_text('dish_name', $defaults);
    ?>
</td></tr>

<tr><td>Minimum Price:</td>
<td><?php 
    input_text('min_price', $defaults);
    ?>
</td></tr>

<tr><td>Maximum Price:</td>
<td><?php 
    input_text('max_price', $defaults);
    ?>
</td></tr>

<tr><td>Spicy:</td>
<td><?php 
    input_select('is_spicy', $defaults, $GLOBALS['spicy_choices']);
    ?>
</td></tr>

<tr><td colspan="2" align="center"><?php 
    input_submit('search', 'Search');
    ?>
</td></tr>

</table>
<input type="hidden" name="_submit_check" value="1"/>
</form>
<?php 
}
开发者ID:Higashi0809,项目名称:php,代码行数:64,代码来源:example-7-56.php


示例12: display_form

function display_form($defaults)
{
    global $subject_options;
    ?>
	<form action="<?php 
    echo $_SERVER['PHP_SELF'];
    ?>
" method="post">
	<table>
	<tr><td>
		Subject
		</td>
		<td> 
		<?php 
    input_select('subject', $defaults, $subject_options);
    ?>
		</td>
	</tr>
	<tr>
		<td>Your email
		</td>
		<td> <input type="text" name="email" size="30" value="<?php 
    echo htmlspecialchars($defaults['email']);
    ?>
"/>
		</td>
	</tr>
	<tr>
		<td>Your name
		</td>
		<td> <input type="text" name="name" size="30" value="<?php 
    echo htmlspecialchars($defaults['name']);
    ?>
"/>
		</td>
	</tr>
		<tr>
		<td valign="top">Comments 
		</td>
		<td><textarea name="comments" cols="40" rows="5"><?php 
    echo htmlspecialchars($defaults['comments']);
    ?>
</textarea>
		</td>
	</tr>
	<tr>
		<td colspan="2" align="center"><input type="submit" value="Submit Comments" /></td>
	</tr>
	</table>
	</form>
<?php 
}
开发者ID:jmyroup,项目名称:uci_projects,代码行数:52,代码来源:guestbook.php


示例13: _

"><label for="name"><?php 
echo _("Name or location of the ballot");
?>
</label><span class="input"><input type="text" name="name" id="name" value="<?php 
echo h($ballot->name);
?>
"></span></div>
<div class="input <?php 
echo stripes();
?>
"><label for="ngroup"><?php 
echo _("Group of location");
?>
</label><span class="input">
<?
input_select("ngroup", Ngroup::options($period->ngroup()->parent), $ballot->ngroup, 'id="ngroup"');
?>
</span></div>
<div class="input <?php 
echo stripes();
?>
"><label for="opening_hour"><?php 
echo _("Opening hours");
?>
</label><span class="input">
<select name="opening_hour" id="opening_hour">
<?
if ($ballot->opening) {
	list($hour, $minute, $second) = explode(":", $ballot->opening);
} else {
	$hour = 0;
开发者ID:ppschweiz,项目名称:basisentscheid,代码行数:31,代码来源:ballot_edit.php


示例14: display_edit_period

	/**
	 * admins select a voting period
	 *
	 * @return boolean true if the period may be changed
	 */
	private function display_edit_period() {

		$options =& $this->available_periods();
		if (!$options) return false;

		if (@$_GET['edit_period']==$this->id) {
			form(URI::strip(['edit_period'])."#issue".$this->id);
			input_select("period", $options, $this->period);
			?><br><?
			input_hidden("issue", $this->id);
			input_hidden("action", "select_period");
?>
<input type="submit" value="<?=_("apply")?>">
<?
			form_end();
		} else {
			if ($this->period) {
				?><a href="periods.php?ngroup=<?=$this->area()->ngroup?>&amp;hl=<?=$this->period?>"><?=$this->period?></a><?
			}
			?><a href="<?=URI::append(['edit_period'=>$this->id])?>#issue<?=$this->id?>" class="iconlink"><img src="img/edit.png" width="16" height="16" alt="<?=_("edit")?>" title="<?=_("select voting period")?>"></a><?
		}

		return true;
	}
开发者ID:ppschweiz,项目名称:basisentscheid,代码行数:29,代码来源:Issue.php


示例15: mktime

<?php

require '../chap6/formhelpers.php';
$midnight_today = mktime(0, 0, 0);
$choices = array();
for ($i = 0; $i < 7; $i++) {
    $timestamp = strtotime("+{$i} day", $midnight_today);
    //キー
    $display_date = strftime('%A, %B %d, %Y', $timestamp);
    //値
    $choices[$timestamp] = $display_date;
    //配列に格納
}
input_select('date', $_POST, $choices);
//selectの表示
开发者ID:e15007,项目名称:php2,代码行数:15,代码来源:example-9-10.php


示例16: foreach

                </div>

                <div class="portlet-body">
                    
                    <?php 
foreach ($inputs as $val) {
    foreach ($val as $key => $value) {
        switch ($key) {
            case 'text':
                echo input_text($value);
                break;
            case 'file':
                echo input_file($value);
                break;
            case 'select':
                echo input_select($value, $array_provincias);
                break;
            case 'ckeditor':
                echo input_ckeditor($value);
                break;
            case 'colorpicker':
                echo input_color_picker($value);
                break;
            case 'selecticon':
                echo input_select_icon($value);
                break;
            case 'dropzone_normal':
                echo input_dropzone($value);
                break;
            case 'select_image':
                echo input_select_image($value, $value['opciones']);
开发者ID:bcgarcia,项目名称:WGNOV14,代码行数:31,代码来源:nuevo.php


示例17: build_input_form

function build_input_form($field_array)
{
    hook_action('build_input_form');
    if ($field_array['name']) {
        if (!isset($field_array['object_id']) or !is_numeric($field_array['object_id'])) {
            $field_array['object_id'] = '0';
        }
        if (!isset($field_array['nice_name'])) {
            $field_array['nice_name'] = '';
        }
        if (!isset($field_array['object_type'])) {
            $field_array['object_type'] = '';
        }
        if (!isset($field_array['description'])) {
            $field_array['description'] = '';
        }
        if (!isset($field_array['placeholder'])) {
            $field_array['placeholder'] = '';
        }
        if (!isset($field_array['default_value'])) {
            $field_array['default_value'] = '';
        }
        if (!isset($field_array['addClass'])) {
            $field_array['addClass'] = NULL;
        }
        if (!isset($field_array['input_type'])) {
            $field_array['input_type'] = 'text';
        }
        if (!isset($field_array['create_slug'])) {
            $field_array['create_slug'] = FALSE;
        }
        if (!isset($field_array['required'])) {
            $field_array['required'] = FALSE;
        }
        if (!isset($field_array['handle'])) {
            $field_array['handle'] = TRUE;
        }
        if ($field_array['required'] == TRUE) {
            $field_array['required'] = 'required';
        }
        if (!isset($field_array['input_option'])) {
            $field_array['input_option'] = array();
        }
        if (!is_array($field_array['input_option'])) {
            $field_array['input_option'] = array();
        }
        switch ($field_array['input_type']) {
            case 'text':
                input_text($field_array);
                break;
            case 'email':
                input_email($field_array);
                break;
            case 'hidden':
                input_hidden($field_array);
                break;
            case 'request_uri':
                input_request_uri($field_array);
                break;
            case 'number':
                input_number($field_array);
                break;
            case 'password':
                input_password($field_array);
                break;
            case 'textarea':
                input_textarea($field_array);
                break;
            case 'wysiwyg':
                echo input_editor($field_array);
                break;
            case 'select':
                input_select($field_array);
                break;
            case 'multiimage':
                input_multiimage($field_array);
                break;
        }
    }
}
开发者ID:hoamaisoft,项目名称:hoamai-cms-beta-1.0,代码行数:80,代码来源:functions.php


示例18: edit_select

	/**
	 * drop down menu
	 *
	 * @param string  $colname
	 * @param mixed   $default
	 * @param integer $id
	 * @param boolean $disabled
	 * @param array   $column
	 */
	protected function edit_select($colname, $default, /** @noinspection PhpUnusedParameterInspection */ $id, $disabled, array $column) {
		input_select($colname, $column['options'], $default, $disabled, @$column['attributes']);
	}
开发者ID:ppschweiz,项目名称:basisentscheid,代码行数:12,代码来源:DbTableAdmin.php


示例19: foreach

                <div class="portlet-body">
                    <div class="form-body">

                        <?php 
foreach ($inputs as $val) {
    foreach ($val as $key => $value) {
        switch ($key) {
            case 'text':
                echo input_text($value);
                break;
            case 'file':
                echo input_file($value);
                break;
            case 'select':
                echo input_select($value, $value['opciones']);
                break;
            case 'ckeditor':
                echo input_ckeditor($value);
                break;
            case 'colorpicker':
                echo input_color_picker($value);
                break;
        }
    }
}
?>
                    </div>
                    
                    <div class="row">
                        <div class="col-sm-6">
开发者ID:bcgarcia,项目名称:WGNOV14,代码行数:30,代码来源:ajustes_apariencia.php


示例20: t

    echo ' SELECTED';
}
echo '>' . t('Current recordings') . '</option>';
echo '<option value="', dupsin_oldrecorded, '"';
if (!$allOn && $schedule->dupin & dupsin_oldrecorded) {
    echo ' SELECTED';
}
echo '>' . t('Previous recordings') . '</option>';
?>
</select></dd>
                <dt><?php 
echo t('Preferred Input');
?>
:</dt>
                <dd><?php 
input_select($schedule->prefinput, 'prefinput');
?>
</dd>
                <dt><?php 
echo t('Internet Reference #');
?>
:</dt>
                <dd class="commands"><input id="inetref" class="inetref" type="text" name="inetref" value="<?php 
echo html_entities($schedule->inetref);
?>
"><a onclick="lookupMetadata(onMetadata, onMetadataFailure); return false;"><?php 
echo t("Look up Metadata");
?>
</a></dd>
                <dt><?php 
echo t('Season');
开发者ID:AndrewMoore10,项目名称:MythWebKGTV,代码行数:31,代码来源:_advanced_options.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP input_submit函数代码示例发布时间:2022-05-15
下一篇:
PHP input_ref函数代码示例发布时间: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