template default en HTML5
[mtweb] / mw / app / out / default / functions.php
index 6d94ffa..af0564e 100644 (file)
@@ -1,5 +1,11 @@
 <?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 = "";
   }
   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."<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>\n";
+    }
+    return $html;
+  }
+  endif;
+
 ?>
\ No newline at end of file