</tr> <tr> <td></td> <td > <input name="jeton" type="hidden" value="<?php echo md5($_SESSION['token'].htmlentities($_SERVER['PHP_SELF'])); ?>" /> <input type="hidden" name="mod_entry" value="true"> <input type="submit" value="Lancer la requête"> </td> <td></td> </tr> </tbody> </table> </form> <?php if ( (!verifPseudo($pseudo))&&($mod_entry) ) { echo "<div class=\"error_msg\">Un pseudo ne peut contenir ni espace, ni virgule, ni anti-slash (\), ni symbole pipe (|).</div><BR>\n"; } } else { // Modification pseudo $ds = @ldap_connect ( $ldap_server, $ldap_port ); if ( $ds ) { $r = @ldap_bind ( $ds, $adminDn, $adminPw ); // Bind en admin if ($r) { $pseudo = ucfirst(mb_strtolower(unac_string_with_underscore($pseudo))); $entry["initials"]=$pseudo; if ( $telephone && verifTel($telephone) ) $entry["telephonenumber"]=$telephone ; if (@ldap_modify ($ds, "uid=".$people_attr[0]["uid"].",".$dn["people"],$entry)) { // log de la modification dans /var/log/lcs/lcs_pseudo.log $fp=fopen($logpath."pseudo.log","a");
$entry["sn"] = stripslashes ($nom); $entry["cn"] = stripslashes ($prenom." ".$nom); $entry["givenname"] = stripslashes ($prenom); if($user[0]["gecos"]!="") { $tab_gecos=explode(",",$user[0]["gecos"]); $entry["gecos"]=ucfirst(mb_strtolower(unac_string_with_underscore($prenom)))." ".ucfirst(mb_strtolower(unac_string_with_underscore($nom))).",".$tab_gecos[1].",".$tab_gecos[2].",".$tab_gecos[3]; } if ( $shell ) { $entry["loginshell"] = $shell; $dnToModify = "uid=".$uid.",".$dn['people']; exec ("$scriptsbinpath/toggleShell.pl ". escapeshellarg($dnToModify) ." ". escapeshellarg($shell)); } if ( $pseudo && verifPseudo($pseudo) ) $entry["initials"]=$pseudo; if ( $telephone && verifTel($telephone) ) $entry["telephonenumber"]=$telephone ; if ( $description && verifDescription($description) ) $entry["description"]=stripslashes($description); // Modification des entrees $ds = @ldap_connect ( $ldap_server, $ldap_port ); if ( $ds ) { $r = @ldap_bind ( $ds, $adminDn, $adminPw ); // Bind en admin if ($r) { if (ldap_modify ($ds, "uid=".$uid.",".$dn["people"],$entry)) { if ( $pseudo != $user[0]["pseudo"] ) { // log de la modification dans /var/log/lcs/lcs_pseudo.log if (getenv("HTTP_CLIENT_IP")) $ip = getenv("HTTP_CLIENT_IP"); else if (getenv("HTTP_X_FORWARDED_FOR")) $ip = getenv("HTTP_X_FORWARDED_FOR");