get_source_params($source_id); if ($params["PARAMETERS"]) { $vars=unserialize($params["PARAMETERS"]); $params["PARAMETERS"]=$vars; } return $params; } function get_libelle($message) { if (substr($message,0,4)=="msg:") return $this->msg[substr($message,4)]; else return $message; } function source_get_property_form($source_id) { global $charset; $params=$this->get_source_params($source_id); if ($params["PARAMETERS"]) { //Affichage du formulaire avec $params["PARAMETERS"] $vars=unserialize($params["PARAMETERS"]); foreach ($vars as $key=>$val) { global $$key; $$key=$val; } } if (!isset($es_selected)) $es_selected = array(); if (!isset($use_in_a2z)) $use_in_a2z = 0; if (!isset($libelle)) $libelle = "External"; if (!isset($infobulle)) $infobulle = ""; if (!isset($source_as_origine)) $source_as_origine=""; $form ="
 
".$this->msg['es_list_source_as_origine_this']." ".$this->msg['es_list_source_as_origine_record']."
".$this->msg['no']." ".$this->msg['yes']."
"; return $form; } function make_serialized_source_properties($source_id) { global $es_selected; global $use_in_a2z; global $libelle; global $infobulle; global $source_as_origine; $t['es_selected'] = $es_selected; $t['use_in_a2z'] = $use_in_a2z; $t['libelle'] = $libelle; $t['infobulle'] = $infobulle; $t['source_as_origine'] = $source_as_origine; $this->sources[$source_id]["PARAMETERS"]=serialize($t); } //Récupération des proriétés globales par défaut du connecteur (timeout, retry, repository, parameters) function fetch_default_global_values() { $this->timeout=5; $this->repository=2; $this->retry=3; $this->ttl=1800; $this->parameters=""; } //Formulaire des propriétés générales function get_property_form() { return ""; } function make_serialized_properties() { global $accesskey, $secretkey; //Mise en forme des paramètres à partir de variables globales (mettre le résultat dans $this->parameters) $keys = array(); $this->parameters = serialize($keys); } function enrichment_is_allow(){ return true; } function getEnrichmentHeader(){ $header= array(); return $header; } function getTypeOfEnrichment($source_id){ $params=$this->get_source_params($source_id); if ($params["PARAMETERS"]) { //Affichage du formulaire avec $params["PARAMETERS"] $vars=unserialize($params["PARAMETERS"]); foreach ($vars as $key=>$val) { global $$key; $$key=$val; } } $type['type'] = array( array( 'code' => str_replace(array(" ","%","-","?","!",";",",",":"),"",strip_empty_chars(strtolower($libelle))), 'label' => $libelle, 'infobulle' => $infobulle ) ); $type['source_id'] = $source_id; return $type; } function getEnrichment($notice_id,$source_id,$type="",$enrich_params=array(),$page=1){ $params=$this->get_source_params($source_id); if ($params["PARAMETERS"]) { //Affichage du formulaire avec $params["PARAMETERS"] $vars=unserialize($params["PARAMETERS"]); foreach ($vars as $key=>$val) { global $$key; $$key=$val; } } $enrichment= array(); //on renvoi ce qui est demandé... si on demande rien, on renvoi tout.. switch ($type){ case "external" : default : $rqt="select code from notices where notice_id = '$notice_id'"; $res=mysql_query($rqt); if(mysql_num_rows($res)){ $code = mysql_result($res,0,0); if(!$code){ $queries = array(); for($i=0 ; $irecid); } }else{ $enrichment['external']['content'] = $query."".$this->msg["es_list_no_preview"].""; } }else{ $enrichment['external']['content'] = $query."".$this->msg["es_list_no_preview"].""; } } break; } $enrichment['source_label']=$this->msg['es_list_enrichment_source']; return $enrichment; } } ?>