".$msg["1500"]."\n"; $deflt_user="
".$msg["1501"]."
\n"; $acquisition_user_param=""; $i = 0; while ($i < mysql_num_fields($res_param)) { $field = mysql_field_name($res_param, $i) ; $field_deb = substr($field,0,6); switch ($field_deb) { case "deflt_" : if ($field=="deflt_styles") { $deflt_user_style="
".$msg[$field]." : 
".make_user_style_combo($field_values[$i])."
\n"; } elseif ($field=="deflt_docs_location") { //visibilité des exemplaires if ($pmb_droits_explr_localises && $usr->explr_visible_mod) $where_clause_explr = "idlocation in (".$usr->explr_visible_mod.") and"; else $where_clause_explr = ""; $selector = gen_liste ("select distinct idlocation, location_libelle from docs_location, docsloc_section where $where_clause_explr num_location=idlocation order by 2 ", "idlocation", "location_libelle", 'form_'.$field, "account_calcule_section(this);", $field_values[$i], "", "","","",0); $deflt_user.="
".$msg[$field]." : 
\n
".$selector."
\n"; //localisation de l'utilisateur pour le calcul de la section $location_user_section = $field_values[$i]; } elseif ($field=="deflt_collstate_location") { $selector = gen_liste ("select distinct idlocation, location_libelle from docs_location order by 2 ", "idlocation", "location_libelle", 'form_'.$field, "", $field_values[$i], "", "","0",$msg["all_location"],0); $deflt_user.="
". $msg[$field]." : 
\n
" .$selector. "
\n"; } elseif ($field=="deflt_resas_location") { $selector = gen_liste ("select distinct idlocation, location_libelle from docs_location order by 2 ", "idlocation", "location_libelle", 'form_'.$field, "", $field_values[$i], "", "","0",$msg["all_location"],0); $deflt_user.="
". $msg[$field]." : 
\n
" .$selector. "
\n"; } elseif ($field=="deflt_docs_section") { // calcul des sections $selector=""; if (!$location_user_section) $location_user_section = $deflt_docs_location; if ($pmb_droits_explr_localises && $usr->explr_visible_mod) $where_clause_explr = "where idlocation in (".$usr->explr_visible_mod.")"; else $where_clause_explr = ""; $rqtloc = "SELECT idlocation FROM docs_location $where_clause_explr order by location_libelle"; $resloc = mysql_query($rqtloc, $dbh); while ($loc=mysql_fetch_object($resloc)) { $requete = "SELECT idsection, section_libelle FROM docs_section, docsloc_section where idsection=num_section and num_location='$loc->idlocation' order by section_libelle"; $result = mysql_query($requete, $dbh); $nbr_lignes = mysql_num_rows($result); if ($nbr_lignes) { if ($loc->idlocation==$location_user_section ) $selector .= "
idlocation."\" style=\"display:block\">\r\n"; else $selector .= "
idlocation."\" style=\"display:none\">\r\n"; $selector .= "
'; } } $deflt_user.="
".$msg[$field]." : 
\n
".$selector."
\n"; } elseif ($field=="deflt_upload_repertoire") { $selector = ""; $requpload = "select repertoire_id, repertoire_nom from upload_repertoire"; $resupload = mysql_query($requpload, $dbh); $selector .= "
"; $selector .= "
"; $deflt_user.="
".$msg[$field]." : 
".$selector."
"; } elseif($field=="deflt_import_thesaurus"){ $requete="select * from thesaurus order by 2"; $resultat_liste=mysql_query($requete,$dbh); $nb_liste=mysql_num_rows($resultat_liste); if ($nb_liste==0) { $deflt_user.="" ; } else { $deflt_user.="
".$msg[$field]." : 
\n
\n" ; } } elseif ($field=="deflt_short_loan_activate") { $deflt_user.="
".$msg[$field]."
\n
\n
\n" ; } }else { $deflt_table = substr($field,6); if($deflt_table == "integration_notice_statut") $deflt_table= "notice_statut"; switch($field) { case "deflt_entites": $requete="select id_entite, raison_sociale from ".$deflt_table." where type_entite='1' order by 2 "; break; case "deflt_exercices": $requete="select id_exercice, libelle from ".$deflt_table." order by 2 "; break; case "deflt_rubriques": $requete="select id_rubrique, concat(budgets.libelle,':', rubriques.libelle) from ".$deflt_table." join budgets on num_budget=id_budget order by 2 "; break; default : $requete="select * from ".$deflt_table." order by 2"; break; } $resultat_liste=mysql_query($requete,$dbh); $nb_liste=mysql_num_rows($resultat_liste); if ($nb_liste==0) { $deflt_user.="" ; } else { $deflt_user.="
".$msg[$field]." : 
\n
\n" ; } } break; case "param_" : if ($field=="param_allloc") { $param_user_allloc="
".$msg[$field]."
\n
')) $param_user .= "
"; $param_user.="table[$field_values[$i]]; $value_user.="
$msg[$field] : 
\n

"; break; case "value_deflt_lang" : $llist=new marc_list('lang'); $l=$llist->table[$field_values[$i]]; $value_user.="
$msg[$field] : 
\n

"; break; case "value_deflt_relation" : case "value_deflt_relation_serial" : case "value_deflt_relation_bulletin" : case "value_deflt_relation_analysis" : $value_user.="
$msg[$field] : 
\n
"; $liste_type_relation_down=new marc_list("relationtypedown"); $liste_type_relation_up=new marc_list("relationtypeup"); $liste_type_relation_both=array(); foreach($liste_type_relation_up->table as $key_up=>$val_up){ foreach($liste_type_relation_down->table as $key_down=>$val_down){ if($val_up==$val_down){ $liste_type_relation_both[$key_down]=$val_down; unset($liste_type_relation_down->table[$key_down]); unset($liste_type_relation_up->table[$key_up]); } } } $value_user.=""; $value_user.="

"; break; default : $value_user.="
$msg[$field] : 
\n

"; break; } break ; case "deflt2" : if ($field=="deflt2docs_location") { // localisation des lecteurs $deflt_table = substr($field,6); $requete="select * from ".$deflt_table." order by 2"; $resultat_liste=mysql_query($requete,$dbh); $nb_liste=mysql_num_rows($resultat_liste); if ($nb_liste==0) { $deflt_user.="" ; } else { $deflt_user.="
". $msg[$field]." : 
\n"; $deflt_user.= "
!!param_allloc!!
\n" ; } } else { $deflt_table = substr($field,6); $requete="select * from ".$deflt_table." order by 2 "; $resultat_liste=mysql_query($requete,$dbh); $nb_liste=mysql_numrows($resultat_liste); if ($nb_liste==0) { $deflt_user.="" ; } else { $deflt_user.="
". $msg[$field]." : 
\n"; $deflt_user.= "
\n" ; } } break; case "xmlta_" : switch($field) { case "xmlta_indexation_lang" : $langues = new XMLlist("$include_path/messages/languages.xml"); $langues->analyser(); $clang = $langues->table; $combo = ""; $deflt_user.="
". $msg[$field]." : 
\n"; $deflt_user.= "
$combo
\n" ; break; case "xmlta_doctype_serial" : $deflt_user.="
". $msg[$field]." : 
\n"; $deflt_user.= "
"; $select_doc = new marc_select("doctype", "form_".$field, $field_values[$i], ""); $deflt_user.= $select_doc->display ; $deflt_user.="
\n" ; break; case "xmlta_doctype_bulletin" : case "xmlta_doctype_analysis" : $deflt_user.="
". $msg[$field]." : 
\n"; $deflt_user.= "
"; $select_doc = new marc_select("doctype", "form_".$field, $field_values[$i], "","0",$msg[$field."_parent"]); $deflt_user.= $select_doc->display ; $deflt_user.="
\n" ; break; default : $deflt_table = substr($field,6); $deflt_user.="
". $msg[$field]." : 
\n"; $deflt_user.= "
"; $select_doc = new marc_select("$deflt_table", "form_".$field, $field_values[$i], ""); $deflt_user.= $select_doc->display ; $deflt_user.="
\n" ; break; } case "deflt3" : $q=''; $t=array(); switch($field) { case "deflt3bibli": $q="select 0,'".addslashes($msg['deflt3none'])."' union "; $q.="select id_entite, raison_sociale from entites where type_entite='1' order by 2 "; break; case "deflt3exercice": $q="select 0,'".addslashes($msg['deflt3none'])."' union "; $q.="select id_exercice, libelle from exercices order by 2 "; break; case "deflt3rubrique": $q="select 0,'".addslashes($msg['deflt3none'])."' union "; $q.="select id_rubrique, concat(budgets.libelle,':', rubriques.libelle) from rubriques join budgets on num_budget=id_budget order by 2 "; break; case "deflt3dev_statut": $t=actes::getStatelist(TYP_ACT_DEV); break; case "deflt3cde_statut": $t=actes::getStatelist(TYP_ACT_CDE); break; case "deflt3liv_statut": $t=actes::getStatelist(TYP_ACT_LIV); break; case "deflt3fac_statut": $t=actes::getStatelist(TYP_ACT_FAC); break; case "deflt3sug_statut": $m=new suggestions_map(); $t=$m->getStateList(); break; case 'deflt3lgstatcde': case 'deflt3lgstatdev': $q=lgstat::getList('QUERY'); break; case 'deflt3receptsugstat': $m=new suggestions_map(); $t=$m->getStateList('ORDERED',TRUE); break; } if($q) { $r=mysql_query($q, $dbh); $nb=mysql_num_rows($r); while($row=mysql_fetch_row($r)) { $t[$row[0]]=$row[1]; } } if (count($t)) { $deflt3user.="
".$msg[$field]." : 
\n"; $deflt3user.= "

\n"; } break; case "speci_" : $speci_func = substr($field, 6); eval('$speci_user.= get_'.$speci_func.'($id, $field_values, $i, \'userform\');'); break; case "explr_" : $$field=$field_values[$i]; break; default : break ; } $i++; } //visibilité des exemplaires if ($pmb_droits_explr_localises) { $explr_tab_invis=explode(",",$explr_invisible); $explr_tab_unmod=explode(",",$explr_visible_unmod); $explr_tab_modif=explode(",",$explr_visible_mod); $visibilite_expl_user="

".$msg["expl_visibilite"]." : 
 
\n"; $requete_droits_expl="select idlocation, location_libelle from docs_location order by location_libelle"; $resultat_droits_expl=mysql_query($requete_droits_expl); $temp=""; while ($j=mysql_fetch_array($resultat_droits_expl)) { $temp.=$j["idlocation"].","; $visibilite_expl_user.= "
".$j["location_libelle"]." :
 
\n" ; } mysql_free_result($resultat_droits_expl); if ((!$explr_invisible)&&(!$explr_visible_unmod)&&(!$explr_visible_mod)) { $rqt="UPDATE users SET explr_invisible=0,explr_visible_mod=0,explr_visible_unmod='".substr($temp,0,strlen($temp)-1)."' WHERE userid=$id"; @mysql_query($rqt); } $deflt_user .=$visibilite_expl_user; } //fin visibilité des exemplaires $param_default="

$param_user

".str_replace("!!param_allloc!!",$param_user_allloc,$deflt_user)."

$value_user

$deflt_user_style
"; if ($speci_user || $deflt3user) { $param_default.= "

"; $param_default.=$deflt3user; $param_default.=$speci_user; $param_default.= "
"; } echo window_title($msg[1003].$msg[18].$msg[1003].$msg[86].$msg[1003].$usr->username.$msg[1001]); user_form( $usr->username, $usr->nom, $usr->prenom, $usr->rights, $usr->userid, $usr->user_lang, $usr->nb_per_page_search, $usr->nb_per_page_select, $usr->nb_per_page_gestion, $param_default, $usr->user_email, $usr->user_alert_resamail, $usr->user_alert_demandesmail, $usr->user_alert_subscribemail, $usr->grp_num ); echo form_focus('userform', 'form_nom');