", $admin_user_form);
if(!$id) $title = $msg[85]; // ajout
else $title = $msg[90]; // modification
$admin_user_form = str_replace('!!id!!', $id, $admin_user_form);
$admin_user_form = str_replace('!!title!!', $title, $admin_user_form);
$admin_user_form = str_replace('!!login!!', $login, $admin_user_form);
$admin_user_form = str_replace('!!nom!!', $nom, $admin_user_form);
$admin_user_form = str_replace('!!prenom!!', $prenom, $admin_user_form);
$admin_user_form = str_replace('!!nb_per_page_search!!', $nb_per_page_search, $admin_user_form);
$admin_user_form = str_replace('!!nb_per_page_select!!', $nb_per_page_select, $admin_user_form);
$admin_user_form = str_replace('!!nb_per_page_gestion!!', $nb_per_page_gestion, $admin_user_form);
if(!$id) $admin_user_form = str_replace('!!password_field!!', $password_field, $admin_user_form);
else $admin_user_form = str_replace('!!password_field!!', '', $admin_user_form);
$flag & ADMINISTRATION_AUTH ? $admin_flg_form = "checked " : $admin_flg_form = "";
$flag & CIRCULATION_AUTH ? $circ_flg_form = "checked " : $circ_flg_form = "";
$flag & CATALOGAGE_AUTH ? $catal_flg_form = "checked " : $catal_flg_form = "";
$flag & AUTORITES_AUTH ? $auth_flg_form = "checked " : $auth_flg_form = "";
$flag & EDIT_AUTH ? $edit_flg_form = "checked " : $edit_flg_form = "";
$flag & EDIT_FORCING_AUTH ? $edit_forcing_flg_form = "checked " : $edit_forcing_flg_form = "";
$flag & SAUV_AUTH ? $sauv_flg_form = "checked " : $sauv_flg_form = "";
$flag & DSI_AUTH ? $dsi_flg_form = "checked " : $dsi_flg_form = "";
$flag & PREF_AUTH ? $pref_flg_form = "checked " : $pref_flg_form = "";
$flag & ACQUISITION_AUTH ? $acquisition_flg_form = "checked " : $acquisition_flg_form = "";
$flag & RESTRICTCIRC_AUTH ? $restrictcirc_flg_form = "checked " : $restrictcirc_flg_form = "";
$flag & THESAURUS_AUTH ? $thesaurus_flg_form = "checked " : $thesaurus_flg_form = "";
$flag & TRANSFERTS_AUTH ? $transferts_flg_form = "checked " : $transferts_flg_form = "";
$flag & EXTENSIONS_AUTH ? $extensions_flg_form = "checked " : $extensions_flg_form = "";
$flag & DEMANDES_AUTH ? $demandes_flg_form = "checked " : $extensions_flg_form = "";
$flag & CMS_AUTH ? $cms_flg_form = "checked " : $cms_flg_form = "";
$flag & FICHES_AUTH ? $fiches_flg_form = "checked " : $fiches_flg_form = "";
$admin_user_form = str_replace('!!admin_flg!!', $admin_flg_form, $admin_user_form);
$admin_user_form = str_replace('!!catal_flg!!', $catal_flg_form, $admin_user_form);
$admin_user_form = str_replace('!!circ_flg!!', $circ_flg_form, $admin_user_form);
$admin_user_form = str_replace('!!auth_flg!!', $auth_flg_form, $admin_user_form);
$admin_user_form = str_replace('!!edit_flg!!', $edit_flg_form, $admin_user_form);
$admin_user_form = str_replace('!!edit_forcing_flg!!', $edit_forcing_flg_form, $admin_user_form);
$admin_user_form = str_replace('!!sauv_flg!!', $sauv_flg_form, $admin_user_form);
$admin_user_form = str_replace('!!dsi_flg!!', $dsi_flg_form, $admin_user_form);
$admin_user_form = str_replace('!!pref_flg!!', $pref_flg_form, $admin_user_form);
$admin_user_form = str_replace('!!acquisition_flg!!', $acquisition_flg_form, $admin_user_form);
$admin_user_form = str_replace('!!restrictcirc_flg!!', $restrictcirc_flg_form, $admin_user_form);
$admin_user_form = str_replace('!!thesaurus_flg!!', $thesaurus_flg_form, $admin_user_form);
$admin_user_form = str_replace('!!transferts_flg!!', $transferts_flg_form, $admin_user_form);
$admin_user_form = str_replace('!!extensions_flg!!', $extensions_flg_form, $admin_user_form);
$admin_user_form = str_replace('!!demandes_flg!!', $demandes_flg_form, $admin_user_form);
$admin_user_form = str_replace('!!cms_flg!!', $cms_flg_form, $admin_user_form);
$admin_user_form = str_replace('!!fiches_flg!!', $fiches_flg_form, $admin_user_form);
if ($form_user_alert_resamail==1) $alert_resa_mail=" checked";
else $alert_resa_mail="";
$admin_user_form = str_replace('!!alter_resa_mail!!', $alert_resa_mail, $admin_user_form);
if ($demandes_active) {
if ($form_user_alert_demandesmail==1) $alert_demandes_mail=" checked";
else $alert_demandes_mail="";
$admin_user_form = str_replace('!!alert_demandes_mail!!', $alert_demandes_mail, $admin_user_form);
}
if ($opac_websubscribe_show) {
if ($form_user_alert_subscribemail==1) $alert_subscribe_mail=" checked";
else $alert_subscribe_mail="";
$admin_user_form = str_replace('!!alert_subscribe_mail!!', $alert_subscribe_mail, $admin_user_form);
}
$admin_user_form = str_replace('!!user_email!!', $form_user_email, $admin_user_form);
if(!$id) $form_type = '1';
else $form_type = '0';
// récupération des codes langues
$la = new XMLlist("$include_path/messages/languages.xml", 0);
$la->analyser();
$languages = $la->table;
// constitution du sélecteur
$selector = "';
$admin_user_form = str_replace('!!select_lang!!', $selector, $admin_user_form);
$admin_user_form = str_replace('!!form_type!!', $form_type, $admin_user_form);
$admin_user_form = str_replace('!!form_param_default!!', $form_param_default, $admin_user_form);
//groupes
if ($usr_grp!==FALSE) {
$q = "select * from users_groups order by grp_name ";
$sel_group = gen_liste($q, 'grp_id', 'grp_name', 'sel_group', '', $usr_grp, '0', $msg[128], '0',$msg[128]);
$sel_group = "
'.$sel_group;
$admin_user_form = str_replace('', $sel_group, $admin_user_form);
}
print confirmation_delete("./admin.php?categ=users&sub=users&action=del&id=");
print $admin_user_form;
}
function show_users($dbh) {
global $msg;
global $admin_user_list;
global $admin_user_link1;
// affichage du tableau des utilisateurs
$requete = "SELECT * FROM users ORDER BY username";
$res = mysql_query($requete, $dbh);
$nbr = mysql_num_rows($res);
while(($row=mysql_fetch_object($res))) {
// réinitialisation des chaînes
$dummy = $admin_user_list;
$dummy1 = $admin_user_link1;
$flag = "";
$dummy =str_replace('!!user_link!!', $dummy1, $dummy);
$dummy =str_replace('!!user_name!!', "$row->prenom $row->nom", $dummy);
$dummy =str_replace('!!user_login!!', $row->username, $dummy);
if($row->rights & ADMINISTRATION_AUTH)
$dummy =str_replace('!!nuseradmin!!', '' , $dummy);
else
$dummy =str_replace('!!nuseradmin!!', '', $dummy);
if($row->rights & CATALOGAGE_AUTH)
$dummy =str_replace('!!nusercatal!!', '', $dummy);
else
$dummy =str_replace('!!nusercatal!!', '', $dummy);
if($row->rights & CIRCULATION_AUTH)
$dummy =str_replace('!!nusercirc!!', '', $dummy);
else
$dummy =str_replace('!!nusercirc!!', '', $dummy);
if($row->rights & PREF_AUTH)
$dummy =str_replace('!!nuserpref!!', '', $dummy);
else
$dummy =str_replace('!!nuserpref!!', '', $dummy);
if($row->rights & AUTORITES_AUTH)
$dummy =str_replace('!!nuserauth!!', '', $dummy);
else
$dummy =str_replace('!!nuserauth!!', '', $dummy);
if($row->rights & EDIT_AUTH)
$dummy =str_replace('!!nuseredit!!', '', $dummy);
else
$dummy =str_replace('!!nuseredit!!', '', $dummy);
if($row->rights & EDIT_FORCING_AUTH)
$dummy =str_replace('!!nusereditforcing!!', '', $dummy);
else
$dummy =str_replace('!!nusereditforcing!!', '', $dummy);
if($row->rights & SAUV_AUTH)
$dummy =str_replace('!!nusersauv!!', '', $dummy);
else
$dummy =str_replace('!!nusersauv!!', '', $dummy);
if($row->rights & DSI_AUTH)
$dummy =str_replace('!!nuserdsi!!', '', $dummy);
else
$dummy =str_replace('!!nuserdsi!!', '', $dummy);
if($row->rights & ACQUISITION_AUTH)
$dummy =str_replace('!!nuseracquisition!!', '', $dummy);
else
$dummy =str_replace('!!nuseracquisition!!', '', $dummy);
if($row->rights & RESTRICTCIRC_AUTH)
$dummy =str_replace('!!nuserrestrictcirc!!', '', $dummy);
else
$dummy =str_replace('!!nuserrestrictcirc!!', '', $dummy);
if($row->rights & THESAURUS_AUTH)
$dummy =str_replace('!!nuserthesaurus!!', '', $dummy);
else
$dummy =str_replace('!!nuserthesaurus!!', '', $dummy);
if($row->rights & TRANSFERTS_AUTH)
$dummy =str_replace('!!nusertransferts!!', '', $dummy);
else
$dummy =str_replace('!!nusertransferts!!', '', $dummy);
if($row->rights & EXTENSIONS_AUTH)
$dummy =str_replace('!!nuserextensions!!', '', $dummy);
else
$dummy =str_replace('!!nuserextensions!!', '', $dummy);
if($row->rights & DEMANDES_AUTH)
$dummy =str_replace('!!nuserdemandes!!', '', $dummy);
else
$dummy =str_replace('!!nuserdemandes!!', '', $dummy);
if($row->rights & CMS_AUTH)
$dummy =str_replace('!!nusercms!!', '', $dummy);
else
$dummy =str_replace('!!nusercms!!', '', $dummy);
if($row->rights & FICHES_AUTH)
$dummy =str_replace('!!nuserfiches!!', '', $dummy);
else
$dummy =str_replace('!!nuserfiches!!', '', $dummy);
$dummy = str_replace('!!lang_flag!!', $flag, $dummy);
$dummy = str_replace('!!nuserlogin!!', $row->username, $dummy);
$dummy = str_replace('!!nuserid!!', $row->userid, $dummy);
if($row->user_alert_resamail)
$dummy =str_replace('!!user_alert_resamail!!', $msg['alert_resa_user_mail'].'' , $dummy);
else
$dummy =str_replace('!!user_alert_resamail!!', '', $dummy);
if($row->user_alert_demandesmail)
$dummy =str_replace('!!user_alert_demandesmail!!', $msg['alert_demandes_user_mail'].'' , $dummy);
else
$dummy =str_replace('!!user_alert_demandesmail!!', '', $dummy);
if($row->user_alert_subscribemail)
$dummy =str_replace('!!user_alert_subscribemail!!', $msg['alert_subscribe_user_mail'].'' , $dummy);
else
$dummy =str_replace('!!user_alert_subscribemail!!', '', $dummy);
print $dummy;
}
print "