Beispiel #1
0
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>';
}
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 
}
Beispiel #3
0
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: '******'username', $_POST);
    print '<br/>';
    print 'Password: '******'password', $_POST);
    print '<br/>';
    input_submit('submit', 'Log In');
    print '<input type="hidden" name="_submit_check" value="1"/>';
    print '</form>';
}
Beispiel #4
0
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>';
}
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>';
}
Beispiel #6
0
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>';
}
Beispiel #7
0
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>';
}
Beispiel #8
0
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>';
}
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>';
}
Beispiel #10
0
<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>
    <?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();
?>
Beispiel #12
0
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>';
}
	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();
Beispiel #14
0
/**
 * @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>&nbsp;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 -->
Beispiel #15
0
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>';
}
Beispiel #16
0
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 
}
Beispiel #17
0
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 
}
    <?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();
Beispiel #19
0
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();
?>
Beispiel #20
0
	/**
	 * 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) { ?>&#10003;<? }
			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>
<?
	}
    <div class="col-lg-offset-5"><span style="text-align: center;" class="font1" id="consecutivo"></span></div>
    <div class="box">
        <div class="box-header bg-gray">
            <h3 style="color:#7d7d80;text-align: center"><span class="fa fa-group"></span> Practicantes
            </h3>
        </div>
        <div class="box-body"></div>
    </div>

    <?php 
echo br(1);
?>
    <!--Enviar-->
    <?php 
echo input_submit(['class' => 'col-lg-offset-5 col-lg-10', 'text' => 'Enviar asesoría']);
?>

    <?php 
echo call_spin_div();
?>

    <?php 
echo form_close();
?>
</div>
<?php 
echo $this->Footer();
?>

<script>
Beispiel #22
0
        <div class="box-header bg-gray">
            <h3 style="color:#7d7d80;text-align: center"><span class="ion ion-person-stalker"></span> Asesores
            </h3>
        </div>

        <div class="box-body">
            <?php 
echo Component::Table(['columns' => ['Foto', 'Nombre'], 'tableName' => 'asesor', 'controller' => 'asesores', 'autoNumeric' => false, 'id' => 'ID_USUARIO', 'fields' => ['FOTO' => ['type' => 'img', 'path' => base_url('asesorfotos')], 'NOMBRE'], 'dataProvider' => $this->usuarios_model->TraeAsesores(), 'actions' => 'c']);
?>
        </div>
    </div>

    <br><br>
    <!--Envíar-->
    <?php 
echo input_submit(['class' => 'col-lg-offset-5 col-lg-10', 'text' => 'Enviar noticia']);
?>
    <?php 
echo br(2);
?>
</div>


<?php 
echo call_spin_div();
?>

<?php 
echo form_close();
?>
Beispiel #23
0
    <div class="form-group">
        <div class="row"><label class="col-sm-7 control-label">Observaciones:</label>
        </div>
        <div class="col-lg-12">
            <textarea name="OBS_SABERSABER" style="height: 120px;margin-top:5px;"
                      placeholder="Ingrese la observación del saber saber (opcional)" class="form-control"
                      maxlength="750"></textarea>
        </div>
    </div>

    <?php 
echo br(3);
?>
    <!--Envíar-->
    <?php 
echo input_submit(['class' => 'col-lg-offset-5 col-lg-10', 'text' => 'Envíar calificación']);
?>

    <?php 
echo call_spin_div();
?>

    <?php 
echo form_close();
?>
</div>
<?php 
echo $this->Footer();
?>

<script>
Beispiel #24
0
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: medium size and yes to delivery
        $defaults = array('name' => '', 'sweet' => 'puff', 'main_dish' => array('cuke'), 'comments' => '', 'delivery' => 'yes', 'size' => 'medium');
    }
    // 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['SCRIPT_NAME'];
    ?>
">
<table>
<?php 
    print $error_text;
    ?>

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

<tr><td>Size:</td>
<td><?php 
    input_radiocheck('radio', 'size', $defaults, 'small');
    ?>
 Small <br/>
<?php 
    input_radiocheck('radio', 'size', $defaults, 'medium');
    ?>
 Medium <br/>
<?php 
    input_radiocheck('radio', 'size', $defaults, 'large');
    ?>
 Large
</td></tr>

<tr><td>Pick one sweet item:</td>
<td><?php 
    input_select('sweet', $defaults, $GLOBALS['sweets']);
    ?>
</td></tr>

<tr><td>Pick two main dishes:</td>
<td>
<?php 
    input_select('main_dish', $defaults, $GLOBALS['main_dishes'], true);
    ?>
</td></tr>

<tr><td>Do you want your order delivered?</td>
<td><?php 
    input_radiocheck('checkbox', 'delivery', $defaults, 'yes');
    ?>
 Yes
</td></tr>

<tr><td>Enter any special instructions.<br/>
If you want your order delivered, put your address here:</td>
<td><?php 
    input_textarea('comments', $defaults);
    ?>
</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 
}
Beispiel #25
0
display_annotation($proposal);

if ($proposal->state != "draft") display_quorum($proposal, $supporters, $is_supporter, $is_valid);

?>

<section id="issue">
<?
if (Login::$admin) {
	if ($proposal->allowed_move_to_issue()) {
?>
<div class="add"><?=_("Move this proposal to issue")?>: <?
		form(URI::same());
		input_select("issue", $proposal->options_move_to_issue());
		input_hidden("action", "move_to_issue");
		input_submit(_("move"));
		form_end();
		?></div>
<?
	}
} else {
	if ($issue->allowed_add_alternative_proposal()) {
		if (Login::$member and Login::$member->entitled($_SESSION['ngroup'])) {
?>
<div class="add"><a href="proposal_edit.php?issue=<?=$proposal->issue?>" class="icontextlink"><img src="img/plus.png" width="16" height="16" alt="<?=_("plus")?>"><?=_("Add alternative proposal")?></a></div>
<?
		} else {
?>
<div class="add icontextlink disabled" title="<?=_("You are not logged in, not in this group, not eligible or not verified.")?>"><img src="img/plus.png" width="16" height="16" alt="<?=_("plus")?>"><?=_("Add alternative proposal")?></div>
<?
		}
Beispiel #26
0
            <textarea name="CONCEPTO" style="height: 160px;margin-top:5px;" class="form-control obligatorio"
                      placeholder="Concepto del asesor frente al cumplimiento y entrega de todos los compromisos del estudiante en la práctica (máximo 600 caracteres)"
                      maxlength="600" title="">Considero que el presente trabajo, cumple a cabalidad con las directrices señaladas por la fundación universitaria María Cano (FUMC), para su realización y presentación; así como la entrega de todos los compromisos por parte del (los) estudiante (s). Por tal motivo, doy por aprobado el trabajo realizado durante el <?php 
echo $sem;
?>
 semestre del <?php 
echo date('Y');
?>
.</textarea>
        </div>
    </div>
    <br>
    <br><br>
    <!--Envíar-->
    <?php 
echo input_submit(['class' => 'col-lg-offset-4 col-lg-10', 'type' => 'submit', 'icon' => 'print', 'text' => 'Imprimir']);
?>
    <?php 
echo br(2);
?>
</div>


<?php 
echo call_spin_div();
?>

<?php 
echo form_close();
?>
?>
    <?php 
echo form_input(['name' => 'FECHA_HORA', 'id' => 'horafecha', 'class' => 'obligatorio fecha', 'required' => 'required', 'input' => ['col' => 5], 'label' => ['col' => 3, 'text' => 'Fecha y hora']], date('d/m/Y h:i a'));
?>
    <div class="form-group">
        <div class="row">
    	<label for="inputID" class="col-sm-9 control-label">Desarrollo de la reunión de asesoría de prácticas:</label>
        </div>
    	<div class="col-lg-12">
    		<textarea placeholder="Digite el desarrollo de la reunión de asesoría de prácticas (1500 máximos permitidos)" name="REUNION_ASESORIA" id="inputID" style="height: 400px;margin-top:5px;" class="form-control obligatorio" maxlength="1500" ></textarea>
    	</div>
    </div>

    <!--Envíar-->
    <?php 
echo input_submit(['class' => 'col-lg-offset-4 col-lg-10', 'text' => 'Envíar Asesoría']);
?>
    <br>
    <?php 
echo call_spin_div();
?>

    <?php 
echo form_close();
?>

</div>
<?php 
echo $this->Footer();
?>