object_type = AVIS_SECTIONS; parent::__construct($object_id); } protected function _get_select_query() { return ", id_section "; } protected function _get_join_query() { return "left join cms_sections on cms_sections.id_section = avis.num_notice "; } protected function _get_sort_query() { return "order by dateAjout desc "; } public function get_display_list() { global $msg; global $pmb_javascript_office_editor; global $begin_result_liste; $query = $this->get_query(); $result = pmb_mysql_query($query); $display = ''; if (pmb_mysql_num_rows($result)) { //affichage des rubriques $display .= ""; $display .= ""; $display .= $begin_result_liste; $id_section=0; while ($row = pmb_mysql_fetch_object($result)) { if ($id_section!=$row->id_section) { if ($id_section!=0) $display .= "
" ; $id_section=$row->id_section; $cms_section = new cms_section($row->id_section); $content = $cms_section->title."

"; if($cms_section->resume) { $content .= "

".$msg['cms_editorial_form_resume']."

".$cms_section->resume."

"; } if($cms_section->contenu) { $content .= "

".$msg['cms_editorial_form_contenu']."

".$cms_section->contenu."

"; } $display .= gen_plus($row->id_section, $cms_section->title, $content); $display .= "
" ; } return $display; } public static function delete_from_object($id) { $query = "delete from avis where num_notice=".$id." and type_object = ".AVIS_SECTIONS; pmb_mysql_query($query); } }