本文整理汇总了PHP中input_submit函数的典型用法代码示例。如果您正苦于以下问题:PHP input_submit函数的具体用法?PHP input_submit怎么用?PHP input_submit使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了input_submit函数的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 the form is submitted, get defaults from submitted parameters
if (array_key_exists('_submit_check', $_POST)) {
$defaults = $_POST;
var_dump($defaults);
} else {
// Otherwise, set our own defaults: price is $5
$defaults = array('price' => '5.00', 'dish_name' => '', '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>Price:</td>
<td><?php
input_text('price', $defaults);
?>
</td></tr>
<tr><td>Spicy:</td>
<td><?php
input_radiocheck('checkbox', 'is_spicy', $defaults, 'yes');
?>
Yes</td></tr>
<tr><td colspan="2" align="center"><?php
input_submit('save', 'Order');
?>
</td></tr>
</table>
<input type="hidden" name="_submit_check" value="1"/>
</form>
<?php
}
开发者ID:KimiyukiYamauchi,项目名称:php.2015,代码行数:59,代码来源:example-7-30.php
示例3: 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>';
}
print 'Username: ';
input_text('username', $_POST);
print '<br/>';
print 'Password: ';
input_password('password', $_POST);
print '<br/>';
input_submit('submit', 'Log In');
print '<input type="hidden" name="_submit_check" value="1"/>';
print '</form>';
}
开发者ID:jmyroup,项目名称:uci_projects,代码行数:18,代码来源:login.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 = '')
{
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'] . '">';
// the file name
print ' File name: ';
input_text('filename', $_POST);
print '<br/>';
// the submit button
input_submit('submit', 'Show File');
// the hidden _submit_check variable
print '<input type="hidden" name="_submit_check" value="1"/>';
// the end of the form
print '</form>';
}
开发者ID:Higashi0809,项目名称:php,代码行数:20,代码来源:answer-10-4.php
示例7: 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
示例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: form_open
<div class="container">
<?php
echo form_open(site_url('seguimiento/seguimientos'), ['target' => '_blank', 'class' => 'form-horizontal col-md-8', 'style' => 'margin-left: 15%']);
?>
<hr style="border: 1px solid #099a5b;"/>
<?php
echo select_input(['text' => 'Proyecto', 'collabel' => 3, 'colinput' => 8, 'select' => Dropdown(['name' => 'ID_PROYECTO', 'dataProvider' => $this->proyectos_model->TraeAsesorProyectosDD(), 'placeholder' => '-- Seleccione un proyecto --', 'fields' => ['NOMBRE_PROYECTO']])]);
?>
<div class="practicantes"></div>
<div class="momento"></div>
<?php
echo br(1);
?>
<!--Envíar-->
<?php
echo input_submit(['class' => 'col-lg-offset-4 col-lg-10', 'icon' => 'trash', 'text' => 'Eliminar', 'btn' => 'danger']);
?>
<?php
echo call_spin_div();
?>
<?php
echo form_close();
?>
</div>
<?php
echo $this->Footer();
?>
<script>
开发者ID:alexeimun,项目名称:SDCE,代码行数:31,代码来源:EliminarSeguimiento.php
示例11: form_dropdown
<?php
echo form_dropdown('ID_MODALIDAD_PRACTICA', ['1' => 'Validación experiencia profesional', 2 => 'Práctica empresarial'], ['label' => ['text' => 'Modalidad']], ['selected' => $Info->ID_MODALIDAD_PRACTICA]);
?>
<?php
echo select_input(['select' => $Proyectos, 'text' => 'Proyecto']);
?>
<?php
echo select_input(['select' => $Agencias, 'text' => 'Agencia']);
?>
<div id="flag"><?php
echo select_input(['select' => $Cooperadores, 'text' => 'Cooperador']);
?>
</div>
<!--Envíar-->
<?php
echo input_submit(['class' => 'col-lg-offset-5 col-lg-10', 'text' => 'Actualizar']);
?>
<?php
echo call_spin_div();
?>
<?php
echo br(3);
?>
<?php
echo form_close();
?>
</div>
<?php
echo $this->Footer();
?>
开发者ID:alexeimun,项目名称:SDCE,代码行数:31,代码来源:ActualizarPracticante.php
示例12: show_form
function show_form($errors = '')
{
global $products;
if ($_SESSION['saved_order']) {
print 'Your order: <ul>';
foreach ($products as $product => $description) {
if (array_key_exists("dish_{$product}", $_SESSION)) {
print '<li> ' . $_SESSION["dish_{$product}"] . " {$description} </li>";
}
}
print '</ul>';
} else {
print 'There is no saved order.';
}
print '<br/>';
// This assumes that the order form page is saved as "orderform.php"
print '<a href="orderform.php">Return to Order Page</a>';
print '<br/>';
print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
input_submit('submit', 'Check Out');
print '<input type="hidden" name="_submit_check" value="1"/>';
print '</form>';
}
开发者ID:Higashi0809,项目名称:php,代码行数:23,代码来源:answer-8-4.php
示例13: html_head
default:
warning(_("Unknown action"));
redirect();
}
}
html_head(_("Create new member"));
?>
<section class="help"><p><?php
echo _("In this demo or test installation you can just create a member account by yourself. Next you will be forwarded to the registration, where you can register yourself with this account.");
?>
</p></section>
<?
form(BN);
echo _("Groups of the new member")?>:<br><?
input_hidden("action", "create");
$sql = "SELECT * FROM ngroup WHERE active=TRUE";
$result = DB::query($sql);
while ( $ngroup = DB::fetch_object($result, "Ngroup") ) {
input_checkbox("ngroups[]", $ngroup->id, true);
echo $ngroup->name;
?><br><?
}
input_submit(_("Create new member"));
form_end();
html_foot();
开发者ID:ppschweiz,项目名称:basisentscheid,代码行数:30,代码来源:create_member.php
示例14: input_submit
/**
* @var $this CI_Loader
*/
$this->Header(['assets' => ['datatables', 'icheck', 'excelexport']]);
?>
<section class="content">
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header">
<h3 style="text-align: center;color: #099a5b;"><span style="font-size: 25pt;"
class="fa fa-table"></span> Cierre Decanatura</h3>
</div>
<?php
echo input_submit(['class' => 'col-lg-offset-5 col-sm-offset-5 col-lg-2', 'icon' => 'export', 'text' => 'Exportar']);
?>
<div class="box-body">
<?php
echo TablaCierre(['columns' => ['Nombre del estudiante', 'Agencia', 'Tema', 'Registro de asesoría'], 'tableName' => 'practicante', 'id' => 'ID_PRACTICANTE', 'fields' => ['NOMBRE_PRACTICANTE', 'NOMBRE_AGENCIA', 'NOMBRE_PROYECTO', 'CHECKBOX'], 'dataProvider' => $this->practicantes_model->TraePracticantes()]);
?>
</div>
<div id="table" style="display: none;">
<table id="temp">
</table>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
开发者ID:alexeimun,项目名称:SDCE,代码行数:30,代码来源:Decanatura.php
示例15: post_a_note
function post_a_note($id)
{
$url = INDEX . get_session('contr') . '/addnote?id=' . $id;
return '' . NL . '<div id="form_note">' . NL . '<h2>Post a note to user</h2>' . NL . '<form action="' . $url . '" method="post">' . NL . input_hidden('id', $id) . NL . textarea('note', null, 88, 2) . NL . input_submit('Add Note', 120) . NL . '</form>' . NL . '</div>';
}
开发者ID:shadobladez,项目名称:erp2,代码行数:5,代码来源:Utility.php
示例16: 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('min_price' => '5.00', 'max_price' => '25.00', 'dish_name' => '');
}
// 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['SCRIPT_NAME'];
?>
">
<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:e15007,项目名称:php2,代码行数:64,代码来源:example-7-56.php
示例17: show_form
function show_form($errors = '')
{
global $dish_names;
// If the form is submitted, get defaults from submitted variables
if ($_POST['_submit_check']) {
$defaults = $_POST;
} else {
// Otherwise, no defaults
$defaults = array();
}
// If errors were passed in, put them in $error_text (with HTML markup)
if ($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>Customer Name:</td>
<td><?php
input_text('customer_name', $defaults);
?>
</td></tr>
<tr><td>Phone Number:</td>
<td><?php
input_text('phone', $defaults);
?>
</td></tr>
<tr><td>Favorite Dish:</td>
<td><?php
input_select('favorite_dish_id', $defaults, $dish_names);
?>
</td></tr>
<tr><td colspan="2" align="center"><?php
input_submit('save', 'Add Customer');
?>
</td></tr>
</table>
<input type="hidden" name="_submit_check" value="1"/>
</form>
<?php
}
开发者ID:Higashi0809,项目名称:php,代码行数:59,代码来源:answer-7-4.php
示例18: form_input
<?php
echo form_input(['placeholder' => 'Ingrese las debilidades y/o fortalezas, luego presione la tecla enter', 'name' => 'DEBFOR', 'class' => 'debfor obligatorio', 'input' => ['col' => '12'], 'label' => ['col' => 0]], 'Responsabilidad');
?>
<?php
echo br(2);
?>
<p class="font1">METAS Y ESTRATEGIAS</p>
<?php
echo form_input(['placeholder' => 'Ingrese las metas y estrategias, luego presione la tecla enter', 'name' => 'METEST', 'class' => 'metest obligatorio', 'input' => ['col' => '12'], 'label' => ['col' => 0]], 'Trabajar en equipo');
?>
<br>
<!--Envíar-->
<?php
echo input_submit(['class' => 'col-lg-offset-5 col-lg-10', 'text' => 'Envíar formulario']);
?>
<?php
echo call_spin_div();
?>
<?php
echo br(5);
?>
<?php
echo form_close();
?>
</div>
<?php
echo $this->Footer();
开发者ID:alexeimun,项目名称:SDCE,代码行数:31,代码来源:SeguimientoAEstudianteEnPractica.php
示例19: page_title
echo page_title(['ob' => $this, 'class' => 'ios ion-plus-round', 'text' => Uncamelize(__FILE__)]);
?>
</section>
<!-- Main content -->
<div class="container">
<?php
echo form_open('', ['class' => 'form-horizontal col-md-6', 'style' => 'margin-left: 20%']);
?>
<hr style="border: 1px solid #3D8EBC;"/>
<?php
echo form_input(['placeholder' => 'Ingrese el tipo de proyecto', 'name' => 'NOMBRE_TIPO_PROYECTO', 'class' => 'obligatorio', 'label' => ['text' => 'Nombre']]);
?>
<!--Envíar-->
<br>
<?php
echo input_submit(['class' => 'col-lg-offset-5 col-lg-10']);
?>
<?php
echo call_spin_div();
?>
<?php
echo form_close();
?>
</div>
<?php
echo $this->Footer();
?>
开发者ID:alexeimun,项目名称:SDCE,代码行数:30,代码来源:CrearTipoProyecto.php
示例20: display_votingmode
/**
* column "voting mode"
*
* @param integer $num_rows
* @param boolean $submitted
* @param integer $selected_proposal enable form only on detail page
* @param string $link
*/
private function display_votingmode($num_rows, $submitted, $selected_proposal, $link) {
?>
<td rowspan="<?=$num_rows?>"<?
$admin_form = (Login::$admin and $selected_proposal and $this->votingmode_determination_admin());
if ($this->votingmode_determination($submitted)) {
if ($selected_proposal) {
?> class="votingmode"<?
} else {
?> class="votingmode link" onClick="location.href='<?=$link?>#issue'"<?
}
?> title="<?
if (Login::$member) {
$entitled = Login::$member->entitled($this->area()->ngroup);
$votingmode_demanded = $this->votingmode_demanded_by_member();
if ($votingmode_demanded) {
echo _("You demand offline voting.");
} elseif ($entitled) {
echo _("You can demand offline voting.");
} else {
echo _("You are not entitled in this group.");
}
} else {
$entitled = false;
$votingmode_demanded = false;
echo _("determination if online or offline voting");
}
?>"><?
if (!$selected_proposal) { ?><a href="<?=$link?>#issue"><? }
?><img src="img/votingmode_20.png" width="75" height="20" alt="<?=_("determination if online or offline voting")?>" class="vmiddle"><?
if (!$selected_proposal) { ?></a><? }
if ($votingmode_demanded) { ?>✓<? }
if ($selected_proposal) {
$disabled = $entitled ? "" : " disabled";
form(URI::same());
if ($votingmode_demanded) {
echo _("You demand offline voting.")?>
<input type="hidden" name="action" value="revoke_votingmode">
<input type="submit" value="<?=_("Revoke")?>"<?=$disabled?>>
<?
} else {
?>
<input type="hidden" name="action" value="demand_votingmode">
<input type="submit" value="<?=_("Demand offline voting")?>"<?=$disabled?>>
<?
}
form_end();
}
} elseif ($this->votingmode_offline()) {
if ($admin_form) {
?> class="votingmode"<?
} else {
?> class="votingmode link" onClick="location.href='votingmode_result.php?issue=<?=$this->id?>'"<?
}
?> title="<?=_("offline voting")?>"><a href="votingmode_result.php?issue=<?=$this->id?>"><img src="img/offline_voting_30.png" width="37" height="30" alt="<?=_("offline voting")?>" class="vmiddle"></a><?
} elseif ($this->state!="entry") {
?> class="votingmode link" onClick="location.href='votingmode_result.php?issue=<?=$this->id?>'" title="<?=_("online voting")?>"><a href="votingmode_result.php?issue=<?=$this->id?>"><img src="img/online_voting_30.png" width="24" height="30" alt="<?=_("online voting")?>" class="vmiddle"></a><?
} else {
?>><?
}
// offline voting by admin
if (Login::$admin) {
if ($admin_form) {
form(URI::same()."#votingmode", 'id="votingmode"');
input_hidden("action", "save_votingmode_admin");
?>
<label><input type="checkbox" name="votingmode_admin" value="1"<?
if ($this->votingmode_admin) { ?> checked<? }
?>><?=_("offline voting by admin")?></label><br>
<?
input_submit(_("apply"));
form_end();
} elseif ($this->votingmode_admin) {
?><br><?=_("offline voting by admin");
}
}
?></td>
<?
}
开发者ID:ppschweiz,项目名称:basisentscheid,代码行数:90,代码来源:Issue.php
注:本文中的input_submit函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论