X-Git-Url: http://git.dj3c1t.com/?a=blobdiff_plain;f=mw%2Fout%2Fdefault%2Ffunctions.php;fp=mw%2Fout%2Fdefault%2Ffunctions.php;h=6d94ffac6e81a0568e4f02f5a375377c41a2423c;hb=36ed114046cbe3d72a3589230e9f306a54fcc79d;hp=0000000000000000000000000000000000000000;hpb=281c96e95451269f2614684b8de5be25862c8374;p=mtweb diff --git a/mw/out/default/functions.php b/mw/out/default/functions.php new file mode 100644 index 0000000..6d94ffa --- /dev/null +++ b/mw/out/default/functions.php @@ -0,0 +1,56 @@ + $max){ + if(isset($legende)){ + $navig .= + $legende." ".($current + 1)." à " + .(($current + $max) > $total ? $total : $current + $max) + ." sur ".$total." - aller à la "; + } + $get_params = array(); + if(($q = strpos($base_url, "?")) !== false){ + $v_query = explode("&", substr($base_url, $q + 1)); + $base_url = substr($base_url, 0, $q); + foreach($v_query as $query){ + if($query){ + $v = explode("=", $query); + $get_params[$v[0]] = $v[1]; + } + } + } + if(isset($get_params[$start_param])) unset($get_params[$start_param]); + $base_url .= "?"; + foreach($get_params as $key => $value) $base_url .= $key."=".$value."&"; + $nb_pages = ceil($total / $max); + $navig .= + "page : " + ."\n"; + if($current >= $max){ + $navig .= + "«\n"; + } + if($current < $total - $max){ + $navig .= + "»\n"; + } + } + return $navig; + } + endif; + +?> \ No newline at end of file