max()->as('img'), m('id')->count()->as('num'), m('category_id')->group()->where($id), m('active')->where(1) ))->one_row(); return $row; } function cell_of($row) { if (empty($row)) { return ""; } $count = get_count($row['id']); $img = $count['img']; // $url = $row['slug'] ? "recipes/{$row['slug']}" : "recipes.html?category_id={$row['id']}"; $recipes = select('recipe', array( 'title', 'slug', m('category_id')->where($row['id']), m('active')->where(1) ))->results(); $list = ''; foreach ($recipes as $x) { $url = $x['slug'] ? "recipes/{$x['slug']}" : "recipes.html?recipe_id={$x['id']}"; $list .= "
  • {$x['title']}
  • "; } return "" // . "" // . ($img ? "
    " : '') . "
    " . "{$row['name']} (" . ($count['num'] ? $count['num'] : 0) . ")" . "
    " // . "
    " . "" . ""; } function display_cats($side = 'Main Dish') { $cats = select('recipe_category', array( m('id')->group(), m('slug')->group(), m('name')->desc()->group(), m('active')->group()->where(1), m('side_main')->group()->where($side) ))->results(); // print_var($cats); echo "
    {$side}es
    "; echo ""; while (! empty($cats)) { echo ""; echo cell_of(array_pop($cats)); echo cell_of(array_pop($cats)); // echo cell_of(array_pop($cats)); echo ""; } echo "
    "; } ?> Welcome To Team Fitzgerald Outdoors, Guy & Dan Fitzgerald, Deer Scents, Bowhunting Videos, Wild Game Sauces, Seminars, Deer Scents, Buck Calls, etc.
         
     
    Team Fitzgerald Recipes
    "; echo "All Categories  >  "; echo select('recipe', array( m('name')->left('recipe_category', array('id'=>'category_id')), m('id')->where($recipe_id) ))->value('name'); echo ""; ?>
    where($recipe_id), 'title', 'ingredients', 'directions', 'image_path', // m('category_id')->where($category_id), m('sort_order')->asc() ))->results(); $i = 0; $titles = array(); $recipes = array(); foreach ($res as $row) { $ing = str_replace("\n", "
    ", $row['ingredients']); $dir = str_replace("\n", "
    ", $row['directions']); ?>
    Ingredients
    Directions