<!--#include virtual="/common/lib/dbcon.asp"-->
<!--#include virtual="/common/lib/func.asp"-->
<!--#include file="config.asp"-->
<%

b_num		= InputValue(request("b_num"))
b_pwd_chk	= InputValue(request("b_pwd_chk"))
prepage		= InputValue(request("prepage"))
rtn_url		= InputValue(request("rtn_url"))

If b_pwd_chk = "" then		'//수정
	
	Call goMessage_board("비밀번호를 입력해주세요.", "/content/board/pwd.asp?prepage="&prepage&"&a_num="&a_num&"&b_num="&b_num, "", "", a_num)

End if


SQL = "SELECT b_pwd, b_ref FROM " & a_tablename & " WHERE  b_num=" & b_num
Set rs_pwd = dbcon.execute( sql )
b_pwd = rs_pwd("b_pwd")
b_ref = rs_pwd("b_ref")



If a_reply  = "Y" and prepage = "vie" then		'//답변(내용보기)일때..사용

	SQL = "SELECT b_pwd FROM " & a_tablename & " WHERE  b_num=" & b_ref
	Set rs_pwd2 = dbcon.execute( sql )
	
	b_pwd2 = rs_pwd2("b_pwd")

	Set rs_pwd2 = nothing

End if


If b_pwd_chk = b_pwd or b_pwd_chk = b_pwd2 then		'//비밀번호가 일치하면

	'//세션발생
	
	SESSION("pwd_chk_" & a_num & "_" & b_num) = "ok"

	If a_reply = "Y" and prepage = "vie" then	'//답변(내용보기)일때..사용
		SESSION("pwd_chk_" & a_num & "_" & b_ref) = "ok"
	End if

	Call loding ("0", rtn_url)


Else	'//수정

	'//Back_back("비밀번호가 일치하지 않습니다.다시 확인해주세요.");

	Call goMessage_board("비밀번호가 일치하지 않습니다.다시 확인해주세요.", Request.ServerVariables("HTTP_REFERER"), "", "", a_num)

End if

%>
