<?php
include ("./form_and_table.php");
$s_first = $HTTP_POST_VARS["first"];
$s_last = $HTTP_POST_VARS["last"];
$s_country = $HTTP_POST_VARS["country"];
$b_adult = $HTTP_POST_VARS["adult"];
$c_sex = $HTTP_POST_VARS["sex"];
$s_msg = $HTTP_POST_VARS["msg"];
$o_form = new form;
$s_form_0 = $o_form->ini;
$s_form_1 = $o_form->text("first", 20, 20, $s_first);
$s_form_2 = $o_form->text("last", 20, 20, $s_last);
$a_form_3_options = array("ar" => "Argentina", "br" => "Brasil", "py" => "Paraguay", "uy" => "Uruguay");
$s_form_3 = $o_form->select("country", $a_form_3_options, "br", $s_country);
$s_form_4 = $o_form->checkbox("adult", "yes", "no", $b_adult);
$a_form_5_options = array("M" => "Masc.", "F" => "Fem.");
$a_form_5 = $o_form->radio("sex", $a_form_5_options, "M", $c_sex);
$s_form_6 = $o_form->textarea("msg", 40, 5, $s_msg);
$s_form_7 = $o_form->button("submit", "send", "Enviar");
$s_form_8 = $o_form->button("reset", "", "Reiniciar");
$s_form_9 = $o_form->button("button", "", "Smiley",""," onMouseOver=alert(':-)')");
$o_table = new table(0,2);
$s_table = $o_table->ini;
$s_table .= $s_form_0.$o_table->tr();
$s_table .= $o_table->td()."Nombre".$o_table->end("td").$o_table->td().$s_form_1.$o_table->end("td");
$s_table .= $o_table->td()."Apellido".$o_table->end("td").$o_table->td().$s_form_2.$o_table->end("td, tr");
$s_table .= $o_table->tr();
$s_table .= $o_table->td()."Pais".$o_table->end("td");
$s_table .= $o_table->td(2).$s_form_3." Mayor de edad ".$s_form_4.$o_table->end("td");
$s_table .= $o_table->td(2)."Sexo ";
$s_table .= sprintf("%s %s %s %s", $a_form_5[0][0], $a_form_5[0][1], $a_form_5[1][0], $a_form_5[1][1]);
$s_table .= $o_table->end("td, tr");
$s_table .= $o_table->tr();
$s_table .= $o_table->td("","","","top")."Mensaje".$o_table->end("td").$o_table->td(3).$s_form_6.$o_table->end("td, tr");
$s_table .= $o_table->tr();
$s_table .= $o_table->td(4,"","right").$s_form_7.$s_form_8.$s_form_9.$o_table->end("td, tr, form, table");
echo "<style>\ntd { font : 9pt Arial, Helvetica, Helv, sans-serif; }</style>\n";
echo "<center><br><br><br>\n\n$s_table";
?>
|