Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- slot(
- 'title',
- sprintf('Servicio > Seleccionar Tipo de Servicio'))
- ?>
- <h1>Seleccionar Tipo de Servicio</h1>
- <form method="post" action="<?php echo url_for('servicio/presupuestar') ?>">
- <table border="1" cellpadding="1" cellspacing="1" class="tabla">
- <tr><th class="modo1">Tipo Servicio</th>
- <?php
- if (isset($tiposervici)) {
- $selec = $tiposervici;
- } else {
- $selec = NULL;
- }
- ?>
- <th class="modo2">
- <select name="tiposer" id="tiposer">
- <?php foreach ($tiposervicios as $i => $tiposervicio): ?>
- <option value="<?php echo $tiposervicio->getId() ?>"
- <?php
- if ($selec == $tiposervicio->getId()):
- ?>
- selected
- <?php
- endif;
- ?>
- ><?php echo $tiposervicio->getNombre() ?></option>
- <?php endforeach; ?>
- </select></th></tr><br>
- <tr><th class="modo2" colspan="2" align="center">
- <input type="submit" value="Buscar" /></th>
- </tr>
- </table>
- </form>
- <hr/>
- <?php if ($tiposmenu != NULL): ?>
- <form method="post" action="<?php echo url_for('servicio/composicion') ?>">
- <table border="1" cellpadding="1" cellspacing="1" class="tabla">
- <thead><tr>
- <th class="modo2" colspan="2" align="center">Datos Servicio</th>
- </tr></thead
- <tbody>
- <tr>
- <th class="modo1">Nombre:</th>
- <td class="modo2"><?php $nombre = new sfWidgetFormInput();
- echo $nombre->render('nombre'); ?></td>
- </tr>
- <tr>
- <th class="modo1">Descripcion:</th>
- <td class="modo2"><?php $desc = new sfWidgetFormTextarea();
- echo $desc->render('descripcion'); ?></td>
- </tr>
- <tr>
- <th class="modo1">Hora Inicio:</th>
- <td class="modo2"><?php $horainicio = new sfWidgetFormTime();
- echo $horainicio->render('horainicio'); ?></td>
- </tr>
- <tr>
- <th class="modo1">Hora Fin:</th>
- <td class="modo2"><?php $horafin = new sfWidgetFormTime();
- echo $horafin->render('horafin'); ?></td>
- </tr>
- <tr>
- <th class="modo1">Contribucion Marginal(%):</th>
- <td class="modo2"><?php $cont = new sfWidgetFormInput();
- echo $cont->render('cont'); ?></td>
- </tr>
- </tbody>
- </table>
- <hr/>
- <hr/>
- <?php
- $tm = 0;
- foreach ($tiposmenu as $tipomenu):
- ?>
- <h3>Menu: <?php echo $tipomenu->getNombre() ?></h3>
- <h4><strong>Cantidad:</strong>
- <?php
- $m = new sfWidgetFormInput();
- echo $m->render("cantidadTM[" . $tm . "]");
- ?>
- </h4>
- <?php
- $tiposcomponente = $tipomenu->getTipoMenuTipoComponente();
- $tc = 0;
- foreach ($tiposcomponente as $tipocomponente): ?>
- <table border="1" cellpadding="1" cellspacing="1" class="tabla">
- <thead>
- <tr class="modo1">
- <th>Tipo de Componente</th>
- <th>Cantidad Minima a Elegir</th>
- <th>Cantidad Maxima a Elegir </th>
- </tr>
- </thead>
- <tbody>
- <tr class="modo2">
- <td><?php
- echo $tipocomponente->getTipoComponente()->getNombre();
- ?></td>
- <td><?php
- if ($tipocomponente->getCantidadMinimaAElegir() == 0 || $tipocomponente->getCantidadMinimaAElegir() == NULL) {
- echo "Sin Limite Inferior";
- } else {
- echo $tipocomponente->getCantidadMinimaAElegir();
- }
- ?></td>
- <td><?php
- if ($tipocomponente->getCantidadMaximaAElegir() == 1000 || $tipocomponente->getCantidadMaximaAElegir() == NULL) {
- echo "Sin Limite Superior";
- } else {
- echo $tipocomponente->getCantidadMaximaAElegir();
- } ?></td>
- </tr>
- </tbody>
- </table>
- <?php
- $componentes = Doctrine_Query::create()
- ->select('c.*')
- ->from('Componente c')
- ->where('c.idTipoComponente=?', $tipocomponente->getIdTipoComponente())
- ->fetchArray();
- if ($componentes):
- $c = 0;
- ?>
- <table border="1" cellpadding="1" cellspacing="1" class="tabla" >
- <thead>
- <tr class="modo1">
- <th>Componente</th>
- <th>Elegido</th>
- </tr>
- </thead>
- <tbody>
- <?php
- foreach ($componentes as $componente):
- ?>
- <tr class="modo2">
- <td><?php echo $componente['nombre'] ?></td>
- <td><?php
- $w = new sfWidgetFormInputCheckbox();
- echo $w->render("elegido[" . $tm . "][" . $tc . "][" . $c . "]");
- ?></td>
- </tr>
- <?php
- $c = $c + 1;
- endforeach; ?>
- </tbody>
- </table>
- <?php endif; ?>
- <br/>
- <?php
- $tc = $tc + 1;
- endforeach; ?>
- <hr/>
- <?php
- $tm = $tm + 1;
- endforeach;
- ?>
- <h4><strong>Desea Mozos:</strong>
- <?php
- $mozo = new sfWidgetFormInputCheckbox();
- echo $mozo->render("elegidoMozos");
- ?></h4>
- <h4><strong>Desea Vajilla:</strong>
- <?php
- $vajilla = new sfWidgetFormInputCheckbox();
- echo $vajilla->render("elegidoVajilla");
- ?>
- </h4><hr/>
- <br/>
- <?php
- //var_dump($vajilla);
- ?>
- <input type="submit" value="Siguiente" />
- </form>
- <?php
- endif;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement