Advertisement
Guest User

Untitled

a guest
May 4th, 2011
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.22 KB | None | 0 0
  1. <?php
  2. slot(
  3. 'title',
  4. sprintf('Servicio > Seleccionar Tipo de Servicio'))
  5. ?>
  6.  
  7. <h1>Seleccionar Tipo de Servicio</h1>
  8. <form method="post" action="<?php echo url_for('servicio/presupuestar') ?>">
  9. <table border="1" cellpadding="1" cellspacing="1" class="tabla">
  10. <tr><th class="modo1">Tipo Servicio</th>
  11. <?php
  12. if (isset($tiposervici)) {
  13. $selec = $tiposervici;
  14. } else {
  15. $selec = NULL;
  16. }
  17. ?>
  18. <th class="modo2">
  19. <select name="tiposer" id="tiposer">
  20. <?php foreach ($tiposervicios as $i => $tiposervicio): ?>
  21. <option value="<?php echo $tiposervicio->getId() ?>"
  22. <?php
  23. if ($selec == $tiposervicio->getId()):
  24. ?>
  25. selected
  26. <?php
  27. endif;
  28. ?>
  29. ><?php echo $tiposervicio->getNombre() ?></option>
  30.  
  31. <?php endforeach; ?>
  32. </select></th></tr><br>
  33. <tr><th class="modo2" colspan="2" align="center">
  34. <input type="submit" value="Buscar" /></th>
  35. </tr>
  36. </table>
  37. </form>
  38. <hr/>
  39.  
  40. <?php if ($tiposmenu != NULL): ?>
  41. <form method="post" action="<?php echo url_for('servicio/composicion') ?>">
  42. <table border="1" cellpadding="1" cellspacing="1" class="tabla">
  43. <thead><tr>
  44. <th class="modo2" colspan="2" align="center">Datos Servicio</th>
  45. </tr></thead
  46. <tbody>
  47. <tr>
  48. <th class="modo1">Nombre:</th>
  49. <td class="modo2"><?php $nombre = new sfWidgetFormInput();
  50. echo $nombre->render('nombre'); ?></td>
  51. </tr>
  52. <tr>
  53. <th class="modo1">Descripcion:</th>
  54. <td class="modo2"><?php $desc = new sfWidgetFormTextarea();
  55. echo $desc->render('descripcion'); ?></td>
  56. </tr>
  57. <tr>
  58. <th class="modo1">Hora Inicio:</th>
  59. <td class="modo2"><?php $horainicio = new sfWidgetFormTime();
  60. echo $horainicio->render('horainicio'); ?></td>
  61. </tr>
  62. <tr>
  63. <th class="modo1">Hora Fin:</th>
  64. <td class="modo2"><?php $horafin = new sfWidgetFormTime();
  65. echo $horafin->render('horafin'); ?></td>
  66. </tr>
  67. <tr>
  68. <th class="modo1">Contribucion Marginal(%):</th>
  69. <td class="modo2"><?php $cont = new sfWidgetFormInput();
  70. echo $cont->render('cont'); ?></td>
  71. </tr>
  72. </tbody>
  73. </table>
  74. <hr/>
  75.  
  76. <hr/>
  77. <?php
  78. $tm = 0;
  79. foreach ($tiposmenu as $tipomenu):
  80. ?>
  81. <h3>Menu: <?php echo $tipomenu->getNombre() ?></h3>
  82. <h4><strong>Cantidad:</strong>
  83. <?php
  84. $m = new sfWidgetFormInput();
  85. echo $m->render("cantidadTM[" . $tm . "]");
  86. ?>
  87. </h4>
  88. <?php
  89. $tiposcomponente = $tipomenu->getTipoMenuTipoComponente();
  90. $tc = 0;
  91. foreach ($tiposcomponente as $tipocomponente): ?>
  92. <table border="1" cellpadding="1" cellspacing="1" class="tabla">
  93. <thead>
  94. <tr class="modo1">
  95. <th>Tipo de Componente</th>
  96. <th>Cantidad Minima a Elegir</th>
  97. <th>Cantidad Maxima a Elegir </th>
  98. </tr>
  99. </thead>
  100. <tbody>
  101. <tr class="modo2">
  102. <td><?php
  103. echo $tipocomponente->getTipoComponente()->getNombre();
  104. ?></td>
  105. <td><?php
  106. if ($tipocomponente->getCantidadMinimaAElegir() == 0 || $tipocomponente->getCantidadMinimaAElegir() == NULL) {
  107. echo "Sin Limite Inferior";
  108. } else {
  109. echo $tipocomponente->getCantidadMinimaAElegir();
  110. }
  111. ?></td>
  112. <td><?php
  113. if ($tipocomponente->getCantidadMaximaAElegir() == 1000 || $tipocomponente->getCantidadMaximaAElegir() == NULL) {
  114. echo "Sin Limite Superior";
  115. } else {
  116. echo $tipocomponente->getCantidadMaximaAElegir();
  117. } ?></td>
  118. </tr>
  119.  
  120. </tbody>
  121. </table>
  122.  
  123.  
  124. <?php
  125. $componentes = Doctrine_Query::create()
  126. ->select('c.*')
  127. ->from('Componente c')
  128. ->where('c.idTipoComponente=?', $tipocomponente->getIdTipoComponente())
  129. ->fetchArray();
  130. if ($componentes):
  131. $c = 0;
  132. ?>
  133.  
  134. <table border="1" cellpadding="1" cellspacing="1" class="tabla" >
  135. <thead>
  136. <tr class="modo1">
  137. <th>Componente</th>
  138. <th>Elegido</th>
  139. </tr>
  140. </thead>
  141. <tbody>
  142. <?php
  143. foreach ($componentes as $componente):
  144. ?>
  145. <tr class="modo2">
  146. <td><?php echo $componente['nombre'] ?></td>
  147. <td><?php
  148. $w = new sfWidgetFormInputCheckbox();
  149. echo $w->render("elegido[" . $tm . "][" . $tc . "][" . $c . "]");
  150. ?></td>
  151. </tr>
  152. <?php
  153. $c = $c + 1;
  154. endforeach; ?>
  155. </tbody>
  156. </table>
  157.  
  158. <?php endif; ?>
  159. <br/>
  160. <?php
  161. $tc = $tc + 1;
  162. endforeach; ?>
  163. <hr/>
  164.  
  165. <?php
  166. $tm = $tm + 1;
  167. endforeach;
  168. ?>
  169. <h4><strong>Desea Mozos:</strong>
  170. <?php
  171. $mozo = new sfWidgetFormInputCheckbox();
  172. echo $mozo->render("elegidoMozos");
  173. ?></h4>
  174. <h4><strong>Desea Vajilla:</strong>
  175. <?php
  176. $vajilla = new sfWidgetFormInputCheckbox();
  177. echo $vajilla->render("elegidoVajilla");
  178. ?>
  179. </h4><hr/>
  180. <br/>
  181. <?php
  182. //var_dump($vajilla);
  183. ?>
  184. <input type="submit" value="Siguiente" />
  185. </form>
  186. <?php
  187. endif;
  188. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement