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

R_Fields = "b_num, b_temp5, b_temp6_y, b_temp6_m, b_temp6_d,b_temp7"


Call RequestAll(R_Fields, "")

b_temp8		= InputValue2(request.Form("b_temp8"))


b_temp6		= b_temp6_y & "-"& Right("0"& b_temp6_m, 2) & "-" & right("0"& b_temp6_d, 2)

R_Fields = "b_temp5, b_temp6, b_temp7, b_temp8" & R_Fields2


Call UpdateQuery (R_Fields, a_tablename, " where b_num=" & b_num )


ok_url = "../list.asp?a_num=" & a_num & "&" & page_info
ok_url2 = "list.asp?a_num=" & a_num & "&" & page_info




	' SMS 발송 
	If a_sendsms = "Y" Then

		rtn_url = "http://"&Request.ServerVariables("HTTP_HOST")&"/content/board/"&ok_url2

		arr_bbsname = split(a_bbsname, "&gt;")
		sms_bbsname = "[남부교육지원청]"&arr_bbsname(ubound(arr_bbsname)-1)&" "

		sql = "SELECT b_phone1,b_phone2,b_phone3 FROM "&a_tablename&" WHERE b_num="&b_num
		Set rs_sms=dbcon.execute(sql)
		
		If Not rs_sms.eof And Not rs_sms.bof Then
			
			if rs_sms(0) = "010" Or rs_sms(0) = "011" Or rs_sms(0) = "016" Or rs_sms(0) = "017" Or rs_sms(0) = "018" Or rs_sms(0) = "019" Then
			
				msg = sms_bbsname&"게시판에 "&now()&"에 답변이 등록 되었습니다."
				b_phone = rs_sms(0)&rs_sms(1)&rs_sms(2)
					
				If b_phone <> "" then	'작성자(민원인)에게 sms발송
					sendSms b_phone, msg, rtn_url,""
				End If

			End If
			
		End If
		rs_sms.close : Set rs_sms = nothing
	End if



	' email 발송
	If a_sendmail = "Y" Then

		arr_bbsname = split(a_bbsname, "&gt;")
		sms_bbsname = "[남부교육지원청]"&arr_bbsname(ubound(arr_bbsname)-1)&" "

	
		sql = "SELECT b_email FROM "&a_tablename&" WHERE b_num="&b_num
		Set rs_mail=dbcon.execute(sql)

		If Not rs_mail.eof And Not rs_mail.bof then

			msg = sms_bbsname&"게시판에 "&now()&"에 답변이 등록 되었습니다."
			b_email = rs_mail(0)

			If b_email <> "" Then '작성자(민원인)에게 메일발송
				sendMail "web@dgnbe.go.kr", b_email, cc, bcc, msg, msg
			End if
		End If
		rs_mail.close : Set rs_mail = nothing

	End if




Call loding ("0", ok_url)
%>
