示例#1
0
                <tr>
                    <td> <input type="text" name="nomAtrac" > </td>
                    <td> <input type="text" name="descr"> </td>
                    <td> <input type="text" name="duracion" size="4">dias </td>
                    <td> <input type="text" name="precio" size="4">€ </td>
                    <td> <select name="estado">
                            <?php 
for ($j = 0; $j < $estat->getNumEstats(); $j++) {
    echo "<option>" . $estat->getTipusEstat($j) . "</option>";
}
?>
                        </select> 
                    </td>
                    <td> <select name="destino">
                            <?php 
for ($j = 0; $j < $desti->getNumDestins(); $j++) {
    echo "<option>" . $desti->getNomDesti($j) . "</option>";
}
?>
                        </select> 
                    </td>
                    <td> <select name="promocion">
                            <option> null </option>
                            <?php 
for ($j = 0; $j < $prom->getNumPromocions(); $j++) {
    echo "<option>" . $prom->getDescripcio($j) . "</option>";
}
?>
                        </select>
                    </td>
                    <td> 
示例#2
0
    } else {
        echo "<h2>Error! Destino no eliminado!</h2>";
    }
}
?>
        <form id="form" method="POST">
            <table class="hovertable">
                <tr>
                    <td><b>Nombre</b></td>
                    <td><b>Ubicación</b></td>
                    <td><b>Estado</b></td>
                    <td><b>Editar</b></td>
                    <td><b>Eliminar</b></td>
                </tr>
                <?php 
for ($i = 0; $i < $desti->getNumDestins(); $i++) {
    echo "<tr onmouseover=\"this.style.backgroundColor='#ffff66';\" onmouseout=\"this.style.backgroundColor='#d4e3e5';\">";
    echo "<td>" . $desti->getNomDesti($i) . "</td>";
    echo "<td>" . $desti->getUbicacio($i) . "</td>";
    echo "<td>" . $estat->getTipusEstatByID($desti->getEstat($i)) . "</td>";
    echo "<td> <a href='modificarDestino.php?id={$i}' class='iframes fancybox.iframe'> <img src='../img/edit.png' height=15px /> </a> </td>";
    echo "<td> <a class='idEliminar' href='#' rel='" . $desti->getIdDesti($i) . "' OnClick=\"return confirm('Seguro que quieres eliminar?');\"> <img src='../img/drop.png' /> </a> </td>";
    echo "</tr>";
}
?>
            </table>
        </form>
        <a href='anadirDestino.php' class="iframes fancybox.iframe"> <img src='../img/add.png' height=25px /> </a>
        </div>
    </body>
</html>