local $reg_password_c = md5($reg_password); if (($reg_password != $reg_password2) or (strlen($reg_password) < $pass_leng)) { $msg = $vocab["passwd_error"]; $retry = 'yes'; } $source = "source='local',password='".slashes($reg_password_c)."',"; } else { $source = ""; } if ($retry != 'yes') { $sql = "UPDATE grr_utilisateurs SET nom='".slashes($reg_nom)."', prenom='".slashes($reg_prenom)."', statut='".slashes($reg_statut)."', email='".slashes($reg_email)."',".$source." etat='".slashes($reg_etat)."' WHERE login='".slashes($user_login)."'"; if (sql_command($sql) < 0) {fatal_error(0, $vocab["message_records_error"] . sql_error()); } else { $msg = $vocab["message_records"]; } // Cas où on a déclaré un utilisateur inactif, on le supprime dans les tables grr_j_user_area, grr_j_mailuser_room if ($reg_etat != 'actif') { $sql = "DELETE FROM grr_j_user_area WHERE login='$user_login'"; if (sql_command($sql) < 0) fatal_error(0, $vocab['message_records_error'] . sql_error()); $sql = "DELETE FROM grr_j_mailuser_room WHERE login='$user_login'"; if (sql_command($sql) < 0) fatal_error(0, $vocab['message_records_error'] . sql_error()); } // Cas où on a déclaré un utilisateur visiteur, on le supprime dans les tables grr_j_user_area, grr_j_mailuser_room et grr_j_user_room if ($reg_statut=='visiteur') { $sql = "DELETE FROM grr_j_user_room WHERE login='$user_login'"; if (sql_command($sql) < 0) fatal_error(0, $vocab['message_records_error'] . sql_error()); $sql = "DELETE FROM grr_j_mailuser_room WHERE login='$user_login'"; if (sql_command($sql) < 0) fatal_error(0, $vocab['message_records_error'] . sql_error()); $sql = "DELETE FROM grr_j_user_area WHERE login='$user_login'"; if (sql_command($sql) < 0) fatal_error(0, $vocab['message_records_error'] . sql_error()); } if ($reg_statut=='administrateur') { $sql = "DELETE FROM grr_j_user_room WHERE login='$user_login'"; if (sql_command($sql) < 0) fatal_error(0, $vocab['message_records_error'] . sql_error()); $sql = "DELETE FROM grr_j_user_area WHERE login='$user_login'"; if (sql_command($sql) < 0) fatal_error(0, $vocab['message_records_error'] . sql_error()); } } } else { $msg = $vocab["only_letters_and_numbers"]; $retry = 'yes'; } } if ($retry == 'yes') { $user_nom = $reg_nom; $user_prenom = $reg_prenom; $user_statut = $reg_statut; $user_mail = $reg_email; $user_etat = $reg_etat; } } // On appelle les informations de l'utilisateur pour les afficher : if (isset($user_login) and ($user_login!='')) { $sql = "SELECT nom, prenom, statut, etat, email, source FROM grr_utilisateurs WHERE login='$user_login'"; $res = sql_query($sql); if ($res) { for ($i = 0; ($row = sql_row($res, $i)); $i++) { $user_nom = $row[0]; $user_prenom = $row[1]; $user_statut = $row[2]; $user_etat = $row[3]; $user_mail = $row[4]; $user_source = $row[5]; } } } if((authGetUserLevel(getUserName(),-1) < 1) and ($authentification_obli==1)) { showAccessDenied($day, $month, $year, $area,$back); exit(); } # print the page header print_header("","","","",$type="with_session", $page="admin"); echo ""; if ($msg) { echo ""; unset($msg); } if (isset($user_login) and ($user_login!='')) { echo "

".$vocab['admin_user_modify_modify.php']."

"; } else { echo "

".$vocab['admin_user_modify_create.php']."

"; } ?>

| | ".$vocab["display_add_user"]." | "; if (($user_source=='local') or ($user_source=='')) echo "".$vocab["change_pwd"]." |"; } ?>

"; } else { echo ""; } ?>
* : >
* : >
: > ".$vocab["pwd_toot_short"]." * : "; echo "
".$vocab["confirm_pwd"]." * : "; } ?>
:

:

"; echo $vocab["authentification"]." ".$vocab["Externe"]."
"; echo "".$vocab["Changer_source_utilisateur_local"]."
"; echo "
".$vocab["pwd_toot_short"]." * : "; echo "
".$vocab["confirm_pwd"]." * : "; echo "
"; } ?> >
>