Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="card-body">
- <div class="table-responsive">
- <table class="table">
- <thead class=" text-primary">
- <th>
- Fita
- </th>
- <th>
- Punts
- </th>
- <th>
- Codi
- </th>
- </thead>
- <tbody>
- <?php if (!$_POST) { ?>
- <!-- modal -->
- <?php
- $sentencia_fites = $pdo->query("SELECT id_fita, numero_fita, valor_fita, codi_fita FROM `fites` WHERE id_fita != 0;");
- $fitas = $sentencia_fites->fetchAll(PDO::FETCH_OBJ);
- foreach($fitas as $fita){ ?>
- <tr style="<?php $color ?>">
- <td><?php echo $fita->id_fita ?></td>
- <td><?php echo $fita->numero_fita ?></td>
- <td>
- <input class="form-control" type="text" name="codi_fita">
- </td>
- <td>
- <div class="col-md-6">
- <form method="post">
- <input name="codi_fita" value="codi" hidden/>
- <button class="btn btn-primary btn-block" onclick="md.showNotification('top','center')" type="submit">
- Validar
- </button>
- </form>
- </div>
- </td>
- </tr>
- <?php } ?>
- <?php }else { ?>
- <?php
- //color para las fitas correctas
- $color = "background-color:#CEFF92";
- $sentencia_fites = $pdo->query("SELECT id_fita, numero_fita, valor_fita, codi_fita FROM `fites` WHERE id_fita != 0;");
- $fitas = $sentencia_fites->fetchAll(PDO::FETCH_OBJ);
- foreach($fitas as $fita){ ?>
- <tr style="<?= $color ?>">
- <td><?php echo $fita->id_fita ?></td>
- <td><?php echo $fita->numero_fita ?></td>
- <td>
- <input class="form-control" type="text" name="codi_fita">
- </td>
- <td>
- <div class="col-md-6">
- <form method="post">
- <input name="codi_fita" value="2" type="hidden"/>
- <button class="btn btn-primary btn-block" onclick="md.showNotification('top','center')" type="submit">
- Validar
- </button>
- </form>
- </div>
- </td>
- </tr>
- <?php } ?>
- <?php } ?>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement