Esempio n. 1
0
        <!-- TODO: add drop downs for each resaurant list of category and each category list of groups-->

        <br />
        <br />

        <?php 
foreach ($restaurantInfo as $restaurant) {
    $restaurantName = strtolower(str_replace(" ", "-", $restaurant["rname"]));
    $restGroups = databaseController::getGroupListByRestaurantId($restaurant["rid"]);
    //NEED TO SEPARATE OUT BY CATEGORY WITHIN RESTAURANT
    echo '<article data-id="' . $restaurant["rid"] . '" class="restaurantItems ' . $restaurantName . '">';
    echo '<h3>' . $restaurant["rname"] . ' Items</h3>';
    //SPIT OUT EACH GROUP
    foreach ($restGroups as $restGroup) {
        $groupID = $restGroup["gid"];
        $groupCategories = databaseController::getCategoryListByGroupId($groupID);
        echo "<article data-restaurant='" . $restGroup['restaurantassociation'] . "' data-groupID='" . $groupID . "' class='restaurantGroup'>";
        echo "<strong>" . $restGroup['gname'] . "</strong><br />";
        //SPIT OUT EACH CATEGORY
        foreach ($groupCategories as $groupCategory) {
            $catID = $groupCategory["cid"];
            $menuItems = databaseController::getItemListByCategoryId($catID);
            echo "<article data-catID='" . $catID . "'>";
            echo "<strong>" . $groupCategory['cname'] . "</strong><br />";
            //SPIT OUT EACH MENU ITEM
            foreach ($menuItems as $menuItem) {
                $menuItem["activeStatus"] == 1 ? $activeStatus = "active" : ($activeStatus = "inactive");
                ?>

                                <article class="restaurants mainParent <?php 
                echo $activeStatus;