+++ /dev/null
-<?php
-
- $this->add_js_file($this->out_url("js/jquery-1.8.3.min.js"));
- if($this->etat("mod") == "users" && $this->etat("controller") == "identification"){
- $this->add_js_file($this->out_url("js/md5.js"));
- $this->add_js_file($this->out_url("js/login.js"));
- }
-
- if(!function_exists("mw_navig")) :
- function mw_navig($current, $total, $max, $base_url, $start_param, $legende = null){
- $navig = "";
- if($max && $total > $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 : "
- ."<select onchange=\"document.location=this.options[this.selectedIndex].value;\">\n";
- $np = 1;
- $ni = 0;
- while($ni < $total){
- $navig .=
- " <option value=\"".$base_url.$start_param."=".$ni."\"".($current >= $ni && $current <= $ni ? " SELECTED" : "").">"
- .$np
- ."</option>\n";
- $np++;
- $ni += $max;
- }
- $navig .=
- "</select>\n";
- if($current >= $max){
- $navig .=
- "<a href=\"".$base_url.$start_param."=".($current - $max)."\">«</a>\n";
- }
- if($current < $total - $max){
- $navig .=
- "<a href=\"".$base_url.$start_param."=".($current + $max)."\">»</a>\n";
- }
- }
- return $navig;
- }
- endif;
-
- if(!function_exists("esc_attr")) :
- function esc_attr($content){
- return htmlspecialchars($content, ENT_COMPAT, "UTF-8");
- }
- endif;
-
- if(!function_exists("get_menu_ul")) :
- function get_menu_ul($menu, $indent = ""){
- $html = "";
- if($menu["subs"]){
- $html .= $indent."<div class=\"menu\"><ul>\n";
- foreach($menu["subs"] as $sub){
- $html .= $indent." <li>\n";
- $html .= $indent." <a href=\"".$sub["url"]."\">".$sub["intitule"]."</a>\n";
- $html .= get_menu_ul($sub, $indent." ");
- $html .= $indent." </li>\n";
- }
- $html .= $indent."</ul></div>\n";
- }
- return $html;
- }
- endif;
-
-?>
\ No newline at end of file