4a137887aeb2223f21f75990534bb446e374699d.svn-base 1013 Bytes
<? 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
}
?>