2 function CONTENIDO_usuario_registrar(){
4 if (isset($_SESSION['regsuccess']) && isset($_SESSION['reguname'])); {
5 if($_SESSION['regsuccess'] == true) {
6 echo '<h2>Registro de Instructores - Procesando la adición al sistema de '.$_SESSION['reguname'].'</h2><hr />';
7 if($_SESSION['regsuccess']){
8 echo "<h3>Registrado.</h3><hr />";
9 echo "<p><b>'".$_SESSION['reguname']."'</b> ha sido agregado a la base de datos.</p>";
11 echo "<h3>Registro fallido</h3><hr />";
12 echo "<p>Lo sentimos pero el registro para el usuario <b>".$_SESSION['reguname']."</b> a fallado.</p>";
17 unset($_SESSION['reguname']);
18 unset($_SESSION['regsuccess']);
20 <h2
>Registros de Instructores
</h2
><hr
/>
22 if($form->num_errors
> 0){
23 echo $form->num_errors
." error(es) encontrados";
24 echo '<pre>' . print_r($form->getErrorArray(), true) . '</pre>';
27 <form action
="include/process.php" method
="POST">
29 <tr
><td
>Carné
:</td
><td
><input type
="text" name
="user" maxlength
="30" value
="<? echo $form->value("user
"); ?>"></td
></tr
>
30 <tr
><td
>Clave
:</td
><td
><input type
="password" name
="pass" maxlength
="30" value
="<? echo $form->value("pass
"); ?>"></tr
>
31 <tr
><td
>Email
:</td
><td
><input type
="text" name
="email" maxlength
="50" value
="<? echo $form->value("email
"); ?>"></td
></tr
>
32 <tr
><td
>Nombre
:</td
><td
><input type
="text" name
="nombre" maxlength
="100" value
="<? echo $form->value("nombre
"); ?>"></td
></tr
>
33 <tr
><td
>Encargado
:</td
><td
><input type
="text" name
="encargado" maxlength
="100" value
="<? echo $form->value("encargado
"); ?>"></td
></tr
>
34 <tr
><td
>Catedrático
:</td
><td
><input type
="text" name
="catedratico" maxlength
="100" value
="<? echo $form->value("catedratico
"); ?>"></td
></tr
>
38 <option value
="0" <?
if ($form->value("tipo") == 0) {echo 'selected="selected"';}; ?
>>Asistente de Catedrático
39 <option value
="1" <?
if ($form->value("tipo") == 1) {echo 'selected="selected"';}; ?
>>Asistente de Taller
40 <option value
="2" <?
if ($form->value("tipo") == 2) {echo 'selected="selected"';}; ?
>>Encargado de Taller
41 <option value
="3" <?
if ($form->value("tipo") == 3) {echo 'selected="selected"';}; ?
>>Instructor de Materia
44 <tr
><td
>Departamento
:</td
>
46 <select name
="departamento">
47 <option value
="0" <?
if ($form->value("departamento") == 0) {echo 'selected="selected"';}; ?
>>Dpto
. Electrónica
48 <option value
="1" <?
if ($form->value("departamento") == 1) {echo 'selected="selected"';}; ?
>>Dpto
. Informática
51 <tr
><td colspan
="2" align
="right">
52 <input type
="hidden" name
="subjoin" value
="1">
53 <input type
="submit" value
="Registrar"></td
></tr
>