categories($path); } function all_menus($path = array()) { $_path = array("root", "menus"); foreach($path as $__path) $_path[] = $__path; if(($id = $this->id_categorie($_path)) !== false) { return $this->sub_categories($id, null); } return false; } function menus_categorie($id) { return $this->categorie($id); } function add_menus_categorie($titre, $url = null, $parent = null) { return $this->add_categorie ( null, $titre, null, null, $url, isset($parent) ? $parent : $this->id_categorie(array("root", "menus")) ); } function set_menus_categorie($id, $titre, $url, $ordre = null) { if(($categorie = $this->categorie($id)) !== false) { return $this->set_categorie($id, $categorie["nom"], $titre, null, null, $url, $ordre); } else return false; } function del_menus_categorie($id) { return $this->del_categorie($id, true); } # ---------------------------------------------------------------------------------------- # liens # function menus($path, $start = 0, $depth = 0, $public = false) { return $this->contenus($path, $start, null, $public ? " AND public=1 AND date_publication <= NOW()" : "", $depth); } function add_menu($categorie, $nom, $titre, $description, $url, $auteur, $date_publication, $public) { return $this->add_contenu($nom, $categorie, $titre, $description, $url, $auteur, $date_publication, $public); } function set_menu($id, $categorie, $nom, $titre, $description, $url, $auteur, $date_publication, $public) { return $this->set_contenu($id, $nom, $categorie, $titre, $description, $url, $auteur, $date_publication, $public); } function del_menu($id) { return $this->del_contenu($id); } } ?>