} $prepared_news_category = $_get->secure_category_id(); $prepared_creted_date = $_get->secure_created_date(); $archive = $_get->get_all_archive(); $category = $_get->get_all_news_category('Yes'); $qpp = 12; if (isset($_REQUEST['record'])) { $req_page = filter_var($_REQUEST['record'], FILTER_SANITIZE_NUMBER_INT); $record = ($req_page - 1) * $qpp; } else { $req_page = 1; $record = 0; } if (isset($_REQUEST['cat_news']) && $_REQUEST['cat_news'] != 'all-category') { $req_category = filter_var($_REQUEST['cat_news'], FILTER_SANITIZE_STRING); $current_category = $req_category; $get_category_id = $_get->get_category_by_alias($req_category); $req_category = $get_category_id->category_id; $search = "`category_id` = '{$req_category}'"; } else { $current_category = 'all-category'; $search = 1; } //$all_news = $_get->get_all_blog($category_parameter, $category_name, 'AND', $parameter, $date, $record, 5); //$counting = $_get->count_all_blogs($category_parameter, $category_name, 'AND', $parameter, $date, $record, 5); $all_news = $_get->get_all_blog($search, $record, $qpp); $counting = $_get->count_all_blogs($search); $count_news = $_get->count_all_blog(); /* --- PAGINATION --- */ $total_record = $counting->rows; $total_page = ceil($total_record / $qpp);