Blame | Last modification | View Log | RSS feed
<?php/*resetpassword.phpCopyright 2003 Patrick PAULCopyright 2003 David DELONCopyright 2004 David VANTYGHEMThis program is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2 of the License, or(at your option) any later version.This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program; if not, write to the Free SoftwareFoundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA*/if (($user = $this->GetUser()) && ($user["name"]==$this->GetConfigValue("admin")) && $this->GetConfigValue("admin")){if (($_REQUEST["action"] == "resetpass")){$this->Query("update ".$this->config["table_prefix"]."users set "."password = md5('".mysql_escape_string($_POST["password"])."') "."where name = '".mysql_escape_string($_POST["name"])."' limit 1");$this->SetMessage("Mot de passe réinitialisé !");$this->Redirect($this->href());}else{$error="";//$error = "Il est interdit de réinitialiser le mot de passe de cet utilisateur ! Non mais !";}echo $this->FormOpen() ;$name=$_GET["name"];?><input type="hidden" name="action" value="resetpass"><table><tr><td align="right"></td><td><?php echo $this->Format("Réinitialisation du mot de passe"); ?></td></tr><?phpif ($error){echo "<tr><td></td><td><div class=\"error\">".$this->Format($error)."</div></td></tr>\n" ;}?><tr><td align="right">Login:</td><td><input name="name" size="40" value="<?php echo $name ?>"></td></tr><tr><td align="right">Nouveau mot de passe:</td><td><input type="password" name="password" size="40"></td></tr><tr><td></td><td><input type="submit" value="Reset password" size="40"></td></tr></table><?phpecho $this->FormClose() ;}else{echo "<i>Vous n'avez pas les permissions nécessaires pour exécuter cette action.</i>" ;}?>