]> git.llucax.com Git - z.facultad/75.43/tp1.git/blob - src/lib/info.forms.php
Se vuelve a poner la imágen como título.
[z.facultad/75.43/tp1.git] / src / lib / info.forms.php
1 <?php\r
2 // Grupo 10\r
3 //\r
4 // Lucarella, Schein, Arena\r
5 //\r
6 // Creado: Sebastian Arena 01/05/2005\r
7 //\r
8 require_once 'lib/info.functions.php';\r
9 require_once 'Tema.php';\r
10 \r
11 function info_form_ingresar_tema( $nombre, $icono, $descripcion ) {\r
12 ?>\r
13         <form name="info_ingresar_tema" action="<?php echo $_SERVER['PHP_SELF'] ?>" method="post" onSubmit="return info_validar_ingresar_tema(this);" enctype="multipart/form-data">\r
14             <script type="text/javascript" language="JavaScript">\r
15                 <!--\r
16                 function info_validar_ingresar_tema(f)\r
17                 {\r
18                     if (!check_vacio(f.txtNombre, 'Nombre')) return false;\r
19                                         if (!check_vacio(f.txtIcono, 'Icono')) return false;\r
20                                         if (!check_vacio(f.txtDescripcion, 'Descripcion')) return false;\r
21                     return true;\r
22                 }\r
23                 -->\r
24             </script>\r
25                         <table>\r
26                                 <tr>\r
27                                         <td>Tema:</td>\r
28                                         <td><input type="text" name="txtNombre" value="<?php echo $nombre ?>"/></td>\r
29                                 </tr>\r
30                                 <tr>\r
31                                         <td>Icono:</td>\r
32                                         <td><input type="file" name="txtIcono" value="<?php echo $icono ?>" accept="image/png;image/jpeg;image/gif"/></td>\r
33                                 </tr>\r
34                                 <tr>\r
35                                         <td>Descripción:</td>\r
36                                         <td><textarea name="txtDescripcion" rows="3" cols="50"><?php echo $descripcion ?></textarea></td>\r
37                                 </tr>\r
38                                 <tr>\r
39                     <td colspan="2"><input type="submit" name="btnSubmit" value="Guardar"/></td>\r
40                                 </tr>\r
41                         </table>\r
42         </form>\r
43 <?php\r
44 }\r
45 \r
46 \r
47 \r
48 function info_form_ingresar_info( $tema, $url, $comentario ) {\r
49 ?>\r
50         <form name="info_ingresar_info" action="<?php echo $_SERVER['PHP_SELF'] ?>" method="post" onSubmit="return info_validar_ingresar_info(this);">\r
51             <script type="text/javascript" language="JavaScript">\r
52                 <!--\r
53                 function info_validar_ingresar_info(f)\r
54                 {\r
55                                         if (!check_vacio(f.txtTema, 'Tema')) return false;\r
56                     if (!check_vacio(f.txtURL, 'URL')) return false;\r
57                     if (!check_vacio(f.txtComentario, 'Comentario')) return false;\r
58                     return true;\r
59                 }\r
60                 -->\r
61             </script>\r
62                         <table>\r
63                                 <tr>\r
64                                         <td>Tema:</td>\r
65                                         <td>\r
66                                                 <select name="txtTema">\r
67                                                         <option value="">Seleccione un Tema...</option>\r
68                                                 <?php\r
69                                                         $arrTemas = info_obtener_temas();\r
70                                                         foreach( $arrTemas as $objTema ) {\r
71                                                         ?><option value="<?php echo $objTema->id; ?>"<?php if ($tema == $objTema->id) { echo " selected"; } ?>><? echo $objTema->nombre; ?></option><?php\r
72                                                         }\r
73                                                 ?>\r
74                                                 </select>\r
75                                         </td>\r
76                                 </tr>\r
77                                 <tr>\r
78                                         <td>URL:</td>\r
79                                         <td><input type="text" name="txtURL" value="<?php echo $url ?>"/></td>\r
80                                 </tr>\r
81                                 <tr>\r
82                                         <td>Comentario:</td>\r
83                                         <td><textarea name="txtComentario" rows="3" cols="50"><?php echo $comentario ?></textarea></td>\r
84                                 </tr>\r
85                                 <tr>\r
86                     <td colspan="2"><input type="submit" name="btnSubmit" value="Guardar"/></td>\r
87                                 </tr>\r
88                         </table>\r
89         </form>\r
90 <?php\r
91 }\r
92 ?>\r