[ Index ]
 

Code source de e107 0.7.8

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/e107_admin/ -> updateadmin.php (source)

   1  <?php
   2  /*
   3  + ----------------------------------------------------------------------------+
   4  |     e107 website system
   5  |
   6  |     ©Steve Dunstan 2001-2002
   7  |     http://e107.org
   8  |     jalist@e107.org
   9  |
  10  |     Released under the terms and conditions of the
  11  |     GNU General Public License (http://gnu.org).
  12  |
  13  |     $Source: /cvsroot/e107/e107_0.7/e107_admin/updateadmin.php,v $
  14  |     $Revision: 1.9 $
  15  |     $Date: 2006/02/15 03:23:43 $
  16  |     $Author: e107coders $
  17  +----------------------------------------------------------------------------+
  18  */
  19  require_once ('../class2.php');
  20  $e_sub_cat = 'admin_pass';
  21  require_once ('auth.php');
  22  
  23  if (isset($_POST['update_settings'])) {
  24      if ($_POST['ac'] == md5(ADMINPWCHANGE)) {
  25          if ($_POST['a_password'] != "" && $_POST['a_password2'] != "" && ($_POST['a_password'] == $_POST['a_password2'])) {
  26              if (admin_update($sql -> db_Update("user", "user_password='".md5($_POST['a_password'])."', user_pwchange='".time()."' WHERE user_name='".ADMINNAME."'"), 'update', UDALAN_3." ".ADMINNAME)) {
  27                  $e_event -> trigger('adpword');
  28              }
  29          } else {
  30              $ns->tablerender(LAN_UPDATED_FAILED, "<div style='text-align:center'><b>".UDALAN_1."</b></div>");
  31          }
  32      }
  33  } else {
  34      $text = "<div style='text-align:center'>
  35      <form method='post' action='".e_SELF."'>\n
  36      <table style='".ADMIN_WIDTH."' class='fborder'>
  37      <tr>
  38      <td style='width:30%' class='forumheader3'>".UDALAN_4.": </td>
  39      <td style='width:70%' class='forumheader3'>
  40      ".ADMINNAME."
  41      </td>
  42      </tr>
  43      <tr>
  44      <td style='width:30%' class='forumheader3'>".UDALAN_5.": </td>
  45      <td style='width:70%' class='forumheader3'>
  46      <input class='tbox' type='password' name='a_password' size='60' value='' maxlength='20' />
  47      </td>
  48      </tr>
  49  
  50      <tr>
  51      <td style='width:30%' class='forumheader3'>".UDALAN_6.": </td>
  52      <td style='width:70%' class='forumheader3'>
  53      <input class='tbox' type='password' name='a_password2' size='60' value='' maxlength='20' />
  54      </td>
  55      </tr>
  56  
  57      <tr>
  58      <td colspan='2' style ='text-align:center'  class='forumheader'>
  59      <input class='button' type='submit' name='update_settings' value='".UDALAN_7."' />
  60      <input type='hidden' name='ac' value='".md5(ADMINPWCHANGE)."' />
  61      </td>
  62      </tr>
  63      </table>
  64  
  65      </form>
  66      </div>";
  67  
  68      $ns->tablerender(UDALAN_8." ".ADMINNAME, $text);
  69  }
  70  
  71  require_once ('footer.php');
  72  
  73  ?>


Généré le : Sun Apr 1 01:23:32 2007 par Balluche grâce à PHPXref 0.7