parameters= array(); $this->parameters['selector'] = $selector_choice; return parent::save_form(); } /* * Récupération des données de la source... */ public function get_datas(){ global $opac_url_base; $selector = $this->get_selected_selector(); if ($selector) { $id_bannette = $selector->get_value(); if(is_array($id_bannette) && count($id_bannette)){ $query = "select id_bannette, nom_bannette, comment_public, nb_notices_diff, entete_mail, piedpage_mail from bannettes where id_bannette = '".($id_bannette[0]*1)."'"; $result = pmb_mysql_query($query); if(pmb_mysql_num_rows($result)){ $row=pmb_mysql_fetch_object($result); $flux_rss = array(); $i=0; $query2 = "select num_rss_flux from rss_flux_content where type_contenant='BAN' and num_contenant='".($row->id_bannette*1)."'"; $result2 = pmb_mysql_query($query2); if (pmb_mysql_num_rows($result2)) { while ($row2 = pmb_mysql_fetch_object($result2)) { $flux_rss[$i]['id'] = $row2->num_rss_flux; $flux_rss[$i]['name'] = $row2->nom_rss_flux; $flux_rss[$i]['opac_link'] = "./rss.php?id=".$row2->num_rss_flux; $flux_rss[$i]['link'] = $row2->link_rss_flux; $flux_rss[$i]['lang'] = $row2->lang_rss_flux; $flux_rss[$i]['copy'] = $row2->copy_rss_flux; $flux_rss[$i]['editor_mail'] = $row2->editor_rss_flux; $flux_rss[$i]['webmaster_mail'] = $row2->webmaster_rss_flux; $flux_rss[$i]['ttl'] = $row2->ttl_rss_flux; $flux_rss[$i]['img_url'] = $row2->img_url_rss_flux; $flux_rss[$i]['img_title'] = $row2->img_title_rss_flux; $flux_rss[$i]['img_link'] = $row2->img_link_rss_flux; $flux_rss[$i]['format'] = $row2->format_flux; $flux_rss[$i]['content'] = $row2->rss_flux_content; $flux_rss[$i]['date_last'] = $row2->rss_flux_last; $flux_rss[$i]['export_court'] = $row2->export_court_flux; $flux_rss[$i]['link'] = $row2->link_rss_flux; $flux_rss[$i]['template '] = $row2->tpl_rss_flux; $i++; } } return array("id" => $row->id_bannette, "name" => $row->nom_bannette, "comment" => $row->comment_public, "record_number" => $row->nb_notices_diff, "info" => array("header" => $row->entete_mail, "footer" => $row->piedpage_mail), "flux_rss" => $flux_rss); } } } return false; } }