Пример #1
0
        <table>
            <tr>
                <td><b>Nombre</b></td>
                <td><b>Ubicación</b></td>
                <td><b>Estado</b></td>
                <td></td>
            </tr>
            <tr>
                <input type="hidden" name="idDest" value="<? echo $desti->getIdDesti($_GET[id]); ?>">
                <td> <input type="text" name="nomDest" value="<? echo $desti->getNomDesti($_GET[id]); ?>"> </td>
                <td> <input type="text" name="ubicacio" value="<? echo $desti->getUbicacio($_GET[id]); ?>"> </td>
                <td> 
                    <select name="estat"> 
                        <?php 
for ($j = 0; $j < $estat->getNumEstats(); $j++) {
    if ($estat->getTipusEstat($j) == $estat->getTipusEstatByID($desti->getEstat($_GET[id]))) {
        echo "<option selected>" . $estat->getTipusEstat($j) . "</option>";
    } else {
        echo "<option>" . $estat->getTipusEstat($j) . "</option>";
    }
}
?>
                    </select>
                </td>
                <td> <input type="submit" name="modifDesti" value="Modificar"> </td>
            </tr>
        </table>
        </form>
    </body>
</html>
Пример #2
0
    }
}
?>
        <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>