object_type = AVIS_ARTICLES; parent::__construct($object_id); } protected function _get_select_query() { return ", id_article "; } protected function _get_join_query() { return "left join cms_articles on cms_articles.id_article = 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 articles $display .= ""; $display .= ""; $display .= $begin_result_liste; $id_article=0; while ($row = pmb_mysql_fetch_object($result)) { if ($id_article!=$row->id_article) { if ($id_article!=0) $display .= "
" ; $id_article=$row->id_article; $cms_article = new cms_article($row->id_article); $content = $cms_article->title."

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

".$msg['cms_editorial_form_resume']."

".$cms_article->resume."

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

".$msg['cms_editorial_form_contenu']."

".$cms_article->contenu."

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