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.="
 
"; } //Récupération des collections des groupes $form.="
"; $groups = $zot->get_groups(); if ($zot->error) { $form.="

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

"; $form.="
 
"; } else { $groups_collections = array(); if (count($groups)) { $groups_collections = $zot->get_groups_collections($groups); if ($zot->error) { $form.="

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

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