echo "<input type=\"hidden\" name=\"total_page\" id=\"total_page\" class=\"hidden\" value=\"" . ceil($full_order['total_query'] / $query_per_page) . "\" /> \n"; echo "<input type=\"hidden\" name=\"sort_by\" id=\"sort_by\" class=\"hidden\" value=\"" . $sort_by . "\" /> \n"; echo "<input type=\"hidden\" name=\"search\" id=\"search\" class=\"hidden\" value=\"" . $search_parameter . "-" . $search_value . "\" /> \n"; /* -- BUTTON RESET -- */ if (empty($search_parameter)) { $reset = "hidden"; } else { $reset = ""; } /* --- BUTTON HANDLER --- */ if (isset($_POST['btn_child_category'])) { $category_id = $_POST['category_id']; if ($_POST['category-action'] == "delete") { foreach ($category_id as $category_id) { $category_id = filter_var($category_id, FILTER_SANITIZE_STRING); $_update->delete_category($category_id); } } else { if ($_POST['category-action'] == 'visibility') { $category_id = $_POST['category_id']; $option = filter_var($_POST['category-option'], FILTER_SANITIZE_STRING); if ($option == 'yes') { $category_visibility_status = '1'; } else { if ($option == 'no') { $category_visibility_status = '0'; } } foreach ($category_id as $category_id) { $category_id = filter_var($category_id, FILTER_SANITIZE_STRING); $_update->update_visibility($category_visibility_status, $category_id);