1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-18 05:09:05 +01:00
php-e107/e107_admin/updateadmin.php
2006-12-02 04:36:16 +00:00

73 lines
2.2 KiB
PHP

<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| ©Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/updateadmin.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:33:29 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
require_once('../class2.php');
$e_sub_cat = 'admin_pass';
require_once('auth.php');
if (isset($_POST['update_settings'])) {
if ($_POST['ac'] == md5(ADMINPWCHANGE)) {
if ($_POST['a_password'] != "" && $_POST['a_password2'] != "" && ($_POST['a_password'] == $_POST['a_password2'])) {
if (admin_update($sql -> db_Update("user", "user_password='".md5($_POST['a_password'])."', user_pwchange='".time()."' WHERE user_name='".ADMINNAME."'"), 'update', UDALAN_3." ".ADMINNAME)) {
$e_event -> trigger('adpword');
}
} else {
$ns->tablerender(LAN_UPDATED_FAILED, "<div style='text-align:center'><b>".UDALAN_1."</b></div>");
}
}
} else {
$text = "<div style='text-align:center'>
<form method='post' action='".e_SELF."'>\n
<table style='".ADMIN_WIDTH."' class='fborder'>
<tr>
<td style='width:30%' class='forumheader3'>".UDALAN_4.": </td>
<td style='width:70%' class='forumheader3'>
".ADMINNAME."
</td>
</tr>
<tr>
<td style='width:30%' class='forumheader3'>".UDALAN_5.": </td>
<td style='width:70%' class='forumheader3'>
<input class='tbox' type='password' name='a_password' size='60' value='' maxlength='20' />
</td>
</tr>
<tr>
<td style='width:30%' class='forumheader3'>".UDALAN_6.": </td>
<td style='width:70%' class='forumheader3'>
<input class='tbox' type='password' name='a_password2' size='60' value='' maxlength='20' />
</td>
</tr>
<tr>
<td colspan='2' style ='text-align:center' class='forumheader'>
<input class='button' type='submit' name='update_settings' value='".UDALAN_7."' />
<input type='hidden' name='ac' value='".md5(ADMINPWCHANGE)."' />
</td>
</tr>
</table>
</form>
</div>";
$ns->tablerender(UDALAN_8." ".ADMINNAME, $text);
}
require_once('footer.php');
?>