]> git.llucax.com Git - z.facultad/75.43/tp1.git/blob - src/lib/faq.forms.php
Bugfixes.
[z.facultad/75.43/tp1.git] / src / lib / faq.forms.php
1 <?php\r
2 // vim: set binary noeol et sw=4 sts=4 :\r
3 // Grupo 10\r
4 //\r
5 // Lucarella, Schein, Arena\r
6 //\r
7 // Creado: Jonathan Schein 01/05/2005\r
8 //\r
9 // $Id: faq.forms.php \r
10 \r
11 require_once('Pregunta.php');\r
12 require_once('faq.functions.php');\r
13 \r
14 function faq_form_ingresar_pregunta()\r
15 {\r
16 ?>\r
17                         <form name="faq_ingresar_pregunta" action="<?php echo $_SERVER['PHP_SELF'] ?>" method="post"\r
18                         onSubmit="return faq_validar_ingresar_pregunta(this);">\r
19             <script type="text/javascript" language="JavaScript">\r
20                 <!--\r
21                 function faq_validar_ingresar_pregunta(f)\r
22                 {\r
23                     if (!check_vacio(f.Pregunta, 'Pregunta')) return false;\r
24                     return true;\r
25                 }\r
26                 -->\r
27             </script>\r
28             <input type="text" name="UserId"/><br>\r
29                                                 <textarea name="Pregunta" rows=5 cols=50></textarea><br>\r
30                                                 <input type=submit value="Preguntar">\r
31       </form>\r
32 <?php\r
33 }\r
34 function faq_form_responder_pregunta($PreguntaId)\r
35 {\r
36 ?>\r
37                         <form name="faq_responder_pregunta" action="<?php echo $_SERVER['PHP_SELF'] ?>" method="post"\r
38                         onSubmit="return faq_validar_responder_pregunta(this);">\r
39             <script type="text/javascript" language="JavaScript">\r
40                 <!--\r
41                 function faq_validar_responder_pregunta(f)\r
42                 {\r
43                     if (!check_vacio(f.Respuesta, 'Respuesta')) return false;\r
44                     return true;\r
45                 }\r
46                 -->\r
47             </script>\r
48                                                 <input type=hidden name="PreguntaId" value="<?php echo $PreguntaId ?>">\r
49                                                 <textarea name="Respuesta" rows=5 cols=50></textarea><br>\r
50                                                 <input type=submit value="Responder">\r
51       </form>\r
52 <?php\r
53 }\r
54 function faq_form_desactivar_pregunta()\r
55 {\r
56 ?>\r
57                         <form name="faq_desactivar_preguntas" action="<?php echo $_SERVER['PHP_SELF'] ?>" method="post">\r
58             <SELECT NAME="PreguntaElegida">\r
59                                                 <?php\r
60                                                 $Preguntas = Faq_ObtenerPreguntas();\r
61                                                 foreach ($Preguntas as $Pregunta)\r
62                                                 {\r
63                                                  if ( $Pregunta->activa )\r
64                                                  {\r
65                                                  ?>\r
66                                                          <OPTION VALUE="<?php echo $Pregunta->id ?>"> <?php echo $Pregunta->texto ?>\r
67                                                  <?php \r
68                                                  }\r
69                                                 }\r
70                                                 ?>\r
71                                                 </SELECT>\r
72                                                 <input type=submit value="Desactivar">\r
73       </form>\r
74 <?php\r
75 }\r
76 ?>\r