mirror of
https://github.com/e107inc/e107.git
synced 2025-07-25 00:41:52 +02:00
Update Admin pwd - ready
This commit is contained in:
@@ -1,27 +1,28 @@
|
||||
<?php
|
||||
/*
|
||||
+ ----------------------------------------------------------------------------+
|
||||
| e107 website system
|
||||
|
|
||||
| <20>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.2 $
|
||||
| $Date: 2008-11-02 14:03:04 $
|
||||
| $Author: e107steved $
|
||||
+----------------------------------------------------------------------------+
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2001-2008 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Administration Area - Update Admin
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_admin/updateadmin.php,v $
|
||||
* $Revision: 1.3 $
|
||||
* $Date: 2008-12-15 21:53:17 $
|
||||
* $Author: secretr $
|
||||
*
|
||||
*/
|
||||
|
||||
require_once('../class2.php');
|
||||
$e_sub_cat = 'admin_pass';
|
||||
require_once('auth.php');
|
||||
|
||||
require_once(e_ADMIN.'auth.php');
|
||||
require_once(e_HANDLER."message_handler.php");
|
||||
require_once(e_HANDLER."user_handler.php");
|
||||
$user_info = new UserHandler;
|
||||
|
||||
$emessage = &eMessage::getInstance();
|
||||
|
||||
if (isset($_POST['update_settings']))
|
||||
{
|
||||
@@ -39,51 +40,68 @@ if (isset($_POST['update_settings']))
|
||||
$user_prefs['email_password'] = $user_info->HashPassword($new_pass, $email);
|
||||
$newPrefs = "user_prefs='".serialize($user_prefs)."', ";
|
||||
}
|
||||
if (admin_update($sql -> db_Update("user", "user_password='".$newPassword."', ".$newPrefs."user_pwchange='".time()."' WHERE user_id=".USERID), 'update', UDALAN_3." ".ADMINNAME))
|
||||
|
||||
$check = $sql -> db_Update("user", "user_password='".$newPassword."', ".$newPrefs."user_pwchange='".time()."' WHERE user_id=".USERID);
|
||||
if ($check)
|
||||
{
|
||||
$admin_log->log_event('ADMINPW_01','',E_LOG_INFORMATIVE,'');
|
||||
$admin_log->log_event('ADMINPW_01', '', E_LOG_INFORMATIVE, '');
|
||||
$emessage->add(UDALAN_3." ".ADMINNAME, E_MESSAGE_SUCCESS);
|
||||
$e_event -> trigger('adpword');
|
||||
$ns->tablerender(UDALAN_2, $emessage->render());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$emessage->add(UDALAN_1.' '.LAN_UPDATED_FAILED, E_MESSAGE_ERROR);
|
||||
$ns->tablerender(LAN_UPDATED_FAILED, $emessage->render());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$ns->tablerender(LAN_UPDATED_FAILED, "<div style='text-align:center'><b>".UDALAN_1."</b></div>");
|
||||
$emessage->add(UDALAN_1.' '.LAN_UPDATED_FAILED, E_MESSAGE_ERROR);
|
||||
$ns->tablerender(LAN_UPDATED_FAILED, $emessage->render());
|
||||
}
|
||||
}
|
||||
} 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>
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$text = "
|
||||
<form method='post' action='".e_SELF."'>
|
||||
<fieldset id='core-updateadmin'>
|
||||
<legend class='e-hideme'>".UDALAN_8." ".ADMINNAME."</legend>
|
||||
<table cellpadding='0' cellspacing='0' class='adminform'>
|
||||
<colgroup span='2'>
|
||||
<col class='col-label' />
|
||||
<col class='col-control' />
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class='label'>".UDALAN_4.":</td>
|
||||
<td class='control'>
|
||||
".ADMINNAME."
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='label'>".UDALAN_5.":</td>
|
||||
<td class='control'>
|
||||
<input class='tbox input-text' type='password' name='a_password' size='60' value='' maxlength='20' />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='label'>".UDALAN_6.":</td>
|
||||
<td class='control'>
|
||||
<input class='tbox input-text' type='password' name='a_password2' size='60' value='' maxlength='20' />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class='buttons-bar center'>
|
||||
<input type='hidden' name='ac' value='".md5(ADMINPWCHANGE)."' />
|
||||
<button class='update' type='submit' name='update_settings' value='".UDALAN_7."'><span>".UDALAN_7."</span></button>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>";
|
||||
|
||||
";
|
||||
|
||||
$ns->tablerender(UDALAN_8." ".ADMINNAME, $text);
|
||||
}
|
||||
|
@@ -1,13 +1,10 @@
|
||||
<?php
|
||||
/*
|
||||
+ ----------------------------------------------------------------------------+
|
||||
| e107 website system - Language File.
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/lan_lancheck.php,v $
|
||||
| $Revision: 1.3 $
|
||||
| $Date: 2008-12-15 21:16:32 $
|
||||
| $Author: secretr $
|
||||
+----------------------------------------------------------------------------+
|
||||
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
|
||||
* $Id: lan_lancheck.php,v 1.4 2008-12-15 21:53:17 secretr Exp $
|
||||
*
|
||||
* Admin Language File
|
||||
*
|
||||
*/
|
||||
define("LAN_CHECK_1", "Verify/Edit Language Files"); // modified in 0.7.6
|
||||
define("LAN_CHECK_2", "Begin Verify");
|
||||
|
@@ -1,16 +1,14 @@
|
||||
<?php
|
||||
/*
|
||||
+ ----------------------------------------------------------------------------+
|
||||
| e107 website system - Language File.
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/lan_updateadmin.php,v $
|
||||
| $Revision: 1.1.1.1 $
|
||||
| $Date: 2006-12-02 04:34:42 $
|
||||
| $Author: mcfly_e107 $
|
||||
+----------------------------------------------------------------------------+
|
||||
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
|
||||
* $Id: lan_updateadmin.php,v 1.2 2008-12-15 21:53:17 secretr Exp $
|
||||
*
|
||||
* Admin Language File
|
||||
*
|
||||
*/
|
||||
define("UDALAN_1", "Error - please re-submit");
|
||||
define("UDALAN_2", "Settings updated");
|
||||
|
||||
define("UDALAN_1", "Error - please re-submit.");
|
||||
define("UDALAN_2", "Admin Settings updated");
|
||||
define("UDALAN_3", "Settings updated for");
|
||||
define("UDALAN_4", "Name");
|
||||
define("UDALAN_5", "Password");
|
||||
|
Reference in New Issue
Block a user