filter_order_pagination_add_query_args($base_link, $prefix_request, 'search'); $conc = (strpos($link, "?") !== false) ? "&" : "?"; $complete_link = $link.$conc.$prefix_request."_search"; ?>
Search
post_id = $id; } /** * Genera una form di ricerca di un solo campo. * @param String $field_name prefix+'_field_name' * @param String $btn_text Il testo * @param String $label * @return Void */ public function field_one_input_form($field_name_request, $label) { if ($label != "") : ?> open_form($link, $method); $field_name = isset($_REQUEST[$field_name]) ? sanitize_text_field($_REQUEST[$field_name]) : ''; ?>
>
0) { foreach ($link_a as $a) { $val = explode("=", $a); if (count($val) == 2) { ?>
>
'; self::$pagination_hidden_field = false; self::$form_open = false; ADFO_fn::set_close_form(); } /** * Aggiunge gli input hidden di eventuali altri campi da passare * @param Array $array_exclude l'elenco dei parametri da escludere senza prefissi */ public function add_params_list_per_post($post_id, $array_exclude) { // è stato appena aperto il form quindi ci passo i request $exclude = []; foreach ($array_exclude as $ax) { $exclude[] = 'dbp'.$post_id."_".$ax; } if (self::$form_open && is_array($_REQUEST)) { $request = ADFO_fn::sanitize_text_recursive($_REQUEST); foreach ($request as $key=>$value) { if ($key == 'dbp'.$post_id."_sort") continue; if (substr($key,0, strlen('dbp'.$post_id."_")) == 'dbp'.$post_id."_" && !in_array($key, $exclude)) { if (is_array($value)) { foreach ($value as $v2) { ?>$value) { if (is_string($value)) { if (substr($key,0, $length) == $path && substr($key, $length) != "_".$exclude) { $link = add_query_arg($key, urlencode(wp_unslash($value)), $link); } } else { foreach ($value as $val) { if (is_string($val)) { if (substr($key,0, $length) == $path && substr($key, $length) != "_".$exclude) { $link = add_query_arg($key."[]", urlencode(wp_unslash($val)), $link); } } } } } } return $link; } /** * Disegna la paginazione * @deprecated sostituita da dbp-render-list * @return Void */ function pagination($link, $total_items, $limit, $post_id, $method, $pagination_style, $color ) { if ($method != "link") { $this->pagination_form($link, $total_items, $limit, $post_id, $pagination_style, $color, $method); } else { $this->pagination_link($link, $total_items, $limit, $post_id, $pagination_style, $color); } } /** * Disegna la paginazione come link */ public function pagination_link($link, $total_items, $limit, $post_id, $pagination_style, $color) { $pages = ceil($total_items / $limit); $prefix = 'dbp'.$post_id; $link = $this->filter_order_pagination_add_query_args($link, $prefix, 'page'); $conc = (strpos($link, "?") !== false) ? "&" : "?"; if (isset($_REQUEST[$prefix."_page"])) { $curr_page = absint($_REQUEST[$prefix."_page"]); } if (!isset($curr_page) || !is_numeric($curr_page) || $curr_page < 1) { $curr_page = 1; } $prev_page = $curr_page - 1; $next_page = $curr_page + 1; $name_anchor = '#'. $prefix; $total_items_name = apply_filters('adfo_frontend_total_items', __(sprintf('%s items', $total_items), 'admin_form'), $post_id, $total_items, $limit, $curr_page, $pages ); ?>
1) : ?>
0) : ?> ">« « 0) : ?> ‹ « $pages) { $draw_page = $pages - $num_btn +1; } if ($draw_page < 1 ) $draw_page = 1; while ($draw < $num_btn && $draw_page <= $pages) { $draw++; ?>> › › » »
0) : ?> « «
» »
open_form(get_permalink(), $method); $uniqid = 'dbp_' . ADFO_fn::get_uniqid(); $pages = ceil($total_items / $limit); //$prefix = 'dbp'.$post_id; if (isset($_REQUEST[$prefix."_page"])) { $curr_page = absint($_REQUEST[$prefix."_page"]); } if (!isset($curr_page) || !is_numeric($curr_page) || $curr_page < 1) { $curr_page = 1; } $prev_page = $curr_page - 1; $next_page = $curr_page + 1; $total_items_name = apply_filters('adfo_frontend_total_items', __(sprintf('%s items', $total_items), 'admin_form'), $post_id, $total_items, $limit, $curr_page, $pages ); ?>
1) : ?>
0) : ?> « « 0) : ?> ‹ « $pages) { $draw_page = $pages - $num_btn +1; } if ($draw_page < 1 ) $draw_page = 1; while ($draw < $num_btn && $draw_page <= $pages) { $draw++; ?> › › » »
0) : ?> « «
» »