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