4a137887aeb2223f21f75990534bb446e374699d.svn-base
1013 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminBase.php" ;?>
<?
/*
* Admin process
* add by dev.lee
* */
if(!class_exists("AdminEtc")){
class AdminEtc extends AdminBase {
function __construct($req)
{
parent::__construct($req);
}
// 관리자 비밀번호 변경
function chageAdminPWD()
{
$no = $this->admUser["adminNo"];
$nowPWD = $this->req["nowPWD"];
$newPWD = $this->req["newPWD"];
$sql = "
SELECT *
FROM tblAdmin
WHERE `adminNo` = '{$no}'
LIMIT 1
";
$result = $this->getRow($sql);
if($result == null)
{
$_REQUEST["msg"] = "재 로그인 후 다시 시도해주세요.";
return false;
}
if($result["adminPwd"] != MD5($nowPWD))
{
$_REQUEST["msg"] = "현재 비밀번호가 일치하지 않습니다.";
return false;
}
$sql = "
UPDATE tblAdmin
SET adminPwd = MD5('{$newPWD}')
WHERE `adminNo` = '{$no}'
";
$this->update($sql);
}
} // class end
}
?>