'; } return $output; } function create_navigation_bar( $url, $nb_element, $start, $nb_element_page, $link_class ) { global $lang; $navigation_bar = ""; // 0. détection de la page en cours if( !isset( $start ) || !is_numeric( $start ) || ( is_numeric( $start ) && $start < 0 ) ) { $start = 0; } // on n'affiche la bare de navigation que si on plus de 1 page if ( $nb_element > $nb_element_page ) { // 1.une page précédente ? if ( $start != 0 ) { $previous = $start - $nb_element_page; $navigation_bar.= ''.$lang['previous_page']; $navigation_bar.= ''; $navigation_bar.= ' | '; } // 2.liste des numéros de page $maximum = ceil ( $nb_element / $nb_element_page ); for ( $i = 1; $i <= $maximum; $i++ ) { $temp_start = ( $i - 1 ) * $nb_element_page; if ( $temp_start == $start ) { $navigation_bar.= ' '.$i.' '; } else { $navigation_bar.= ' '.$i.' '; } } // 3.une page suivante ? if ( $nb_element > $nb_element_page && $start + $nb_element_page < $nb_element ) { $next = $start + $nb_element_page; $navigation_bar.= ' | '.$lang['next_page'].''; } } return $navigation_bar; } function get_frame_start() { return '
'; } function get_frame_end() { return ' |