예제 #1
0
        <table id ="bottomTable">
            <tr>
        <td><a href = "/order.php?type=1&rest=1">按餐厅点餐</a></td>
        <td><a href = "/order.php?type=2&style=1">按类型点餐</a></td>
            </tr>
        </table>
            </div>
    <?php 
echo "<div class=\"submit\" onclick=\"location.href='/modify.php';\">\n        请注册后订餐\n    </div>";
?>
<div id="menu"> 

<?php 
if (!isset($_GET['style']) && !isset($_GET['rest'])) {
    $con = DbConnect::connection();
    $result = DbConnect::queryFood($con);
    echo "<table>";
    while ($row = mysql_fetch_array($result)) {
        DbConnect::orderList($row);
    }
    echo "</table>";
    mysql_close($con);
} else {
    if (isset($_GET['style']) && !isset($_GET['rest'])) {
        $con = DbConnect::connection();
        $result = DbConnect::queryFoodByStyle($con, $_GET['style']);
        while ($row = mysql_fetch_array($result)) {
            DbConnect::orderList($row);
        }
        mysql_close($con);
    } else {