[ PHPXref.com ] [ Generated: Sun Jul 20 19:19:23 2008 ] [ PBS Helpdesk 0.93 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/ -> fi.php3 (source)

   1  <?php ;
   2  include  "init.php3"; 
   3  
   4  
   5  
   6  Function change_password($db_name){
   7  include  "environment.php3";
   8  include "$language.php3";
   9  
  10  $users_id=7;
  11  $res1 = mysql_query_wrap("select name from $db_name.users where users_id=$users_id");    
  12  $row = mysql_fetch_row($res1);
  13  $username=$row[0];
  14  
  15  echo "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">
  16  <html><BODY onLoad=\"parent.frames['PBStop'].location.href='top.php3?function=init'\"
  17  background=\"$pbs_background1\">
  18  <head>
  19  <meta http-equiv=\"Content-Type\" content=\"text/html; iso-8859-1\">
  20  <title>Paßwort ändern</title>
  21  <!base target=\"PBS\">
  22  </head>
  23  <body>
  24  <CENTER>";
  25  /**************************************************************/
  26  echo "
  27  <h1 align=\"center\">Paßwort ändern für $username</h1>
  28  
  29  <FORM ACTION=password.php3?function=store METHOD=POST>        
  30              <table width=\"50%\" align=\"center\" border=0>
  31              <tr>
  32              <td>Paßwort:</td>
  33              <td><input name=\"pass1\" type=\"password\" width=32></td></tr>
  34              <tr>
  35              <td>Paßwort:</td>
  36              <td><input name=\"pass2\" type=\"password\" width=32></td></tr>
  37              <tr>
  38              <td></td>
  39              <td><input type=\"submit\" value=\"Übernehmen\"></td>
  40              </tr>
  41              </table>
  42  </form>";
  43  
  44  /**************************************************************/
  45  echo "</FORM>";
  46  echo "</body></html>";
  47  }
  48  
  49  Function store_password($db_name,$pass1,$pass2){
  50  include  "environment.php3";
  51  include "$language.php3";
  52  
  53  $users_id=get_login_id();
  54  
  55  echo "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">
  56  <html><BODY background=\"$pbs_background1\">
  57  <head>
  58  <meta http-equiv=\"Content-Type\" content=\"text/html; iso-8859-1\">
  59  <title>Paßwort geändert</title>
  60  <!base target=\"PBS\">
  61  </head>
  62  <body>
  63  <CENTER>";
  64  
  65  if($pass1==$pass2){
  66     mysql_query_wrap("lock tables  $db_name.users  write");
  67    $command="update $db_name.users set pass=encrypt('$pass1', 'mo') where users_id=$users_id"; 
  68     mysql_query_wrap($command);  
  69     mysql_query_wrap("unlock tables"); 
  70     echo "Paßwort erfolgreich geändert ! <p>";
  71     echo "Bitte jetzt am System neu anmelden!!!";}
  72   else echo "Paßwörter stimmen nicht überein !!!!!";
  73  echo "</body></html>";
  74  }
  75  
  76  if($function=="change") change_password($db_name);
  77  if($function=="store") store_password($db_name,$pass1,$pass2);
  78  ?>


[ Powered by PHPXref - Served by Debian GNU/Linux ]