$filter = 'all'; if (isset($_GET['category']) && $_GET['category'] != '') { $filter = 'category'; $category = $_GET['category']; } if (isset($_GET['section']) && $_GET['section'] != '') { $filter = 'section'; $section = $_GET['section']; } if (isset($_GET['status']) && $_GET['status'] != '') { $filter = 'status'; $status = $_GET['status']; } switch ($filter) { case 'category': $posts = $Blog->get_by_category_slug_for_admin_listing($category, $Paging); break; case 'section': $posts = $Blog->get_by_section_slug_for_admin_listing($section, $Paging); break; case 'status': $posts = $Blog->get_by_status($status, false, $Paging); break; default: $posts = $Blog->all($Paging); // Install if ($posts == false) { $Blog->attempt_install(); } break; }
$filter = 'all'; if (isset($_GET['category']) && $_GET['category'] != '') { $filter = 'category'; $category = $_GET['category']; } if (isset($_GET['section']) && $_GET['section'] != '') { $filter = 'section'; $section = $_GET['section']; } if (isset($_GET['status']) && $_GET['status'] != '') { $filter = 'status'; $status = $_GET['status']; } switch ($filter) { case 'category': $posts = $Posts->get_by_category_slug_for_admin_listing($category, $Paging); break; case 'section': $posts = $Posts->get_by_section_slug_for_admin_listing($section, $Paging); break; case 'status': $posts = $Posts->get_by_status($status, false, $Blog->blogSlug(), $Paging); break; default: $posts = $Posts->get_by('blogID', (int) $Blog->id(), 'postDateTime DESC', $Paging); // Install if ($posts == false) { $Posts->attempt_install(); } break; }