get_source_params($source_id); if ($params['PARAMETERS']) { $vars=unserialize($params['PARAMETERS']); $params['PARAMETERS']=$vars; } return $params; } public 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; } } $form="
 

".$this->msg['zotero_auth']."

 
 
"; if (!($zotero_userid && $zotero_client_key) ) { $form.="

".$this->msg['zotero_record_to_see_more']."

"; $form.="
 
"; } else { //Récupération des collections $zot = new zotero_protocol($vars,$charset); $collections = $zot->get_collections(); if ($zot->error) { $form.="

".$this->msg['zotero_error']."

"; $form.="
 
"; } else { $form.="
"; if (count($collections)) { $selected = array(); if (is_array($vars['zotero_collections'])) $selected = $vars['zotero_collections']; $form.= $this->get_html_select($selected, $collections,array('id'=>'zotero_collections', 'name'=>'zotero_collections[]','class'=>'saisie-20em','size'=>'4','multiple'=>'multiple')); } else { $form.= $this->msg['zotero_no_collection']; } $form.= "
"; $form.="
 
"; } } return $form; } public function get_html_select($selected=array(), $collections=array(), $sel_attr=array()) { global $charset; $sel=''; $size=count($collections); if ($size) { $sel="