Files
KIN/approval/view_del4_ok.asp
2025-09-29 17:55:08 +09:00

92 lines
3.0 KiB
Plaintext

<!-- #include virtual = "lib/config.asp" -->
<%
set rsd = server.CreateObject("ADODB.RECORDSET")
d_no = request("d_no")
x = request("x")
y = request("y")
query = "SELECT * "
query = query & "FROM Document as a "
query = query & " INNER JOIN 문서내용 as b on a.d_no = b.문서번호 "
query = query & "WHERE a.d_no='" & d_no & "' "
rsc.Open query, adoConn, 1
if rsc.RecordCount > 0 then
if rsc("d_order_cnt") <> "77" then
if x = "1" then
query = "UPDATE Document "
query = query & "SET "
query = query & " d_delok = 'Y', "
query = query & " d_view = 'N' "
query = query & "WHERE d_no = '" & d_no & "' "
set dbin = server.CreateObject("ADODB.CONNECTION")
dbin.Open adoConn
dbin.Execute query
dbin.Close
if rsc("d_name") = "내근직수당지출결의서" then
query = "UPDATE t_neakeun_pay "
elseif rsc("d_name") = "면접원수당지출결의서" then
query = "UPDATE t_myun_pay "
end if
query = query & "SET attribute05 = NULL , pay_month = '' "
query = query & "WHERE attribute05 = '"& d_no &"' "
adoconn.execute query
'----------------------------------------------------------------------------------------------
'----------------------------------------------------------------------------------------------
query = "UPDATE 문서내용 "
query = query & "SET "
query = query & " del_yes_no = 'yes', " & _
" del_date = '" & date() & "', " & _
" del_time = '" & time() & "', " & _
" del_reason = '본인취소', " & _
" del_user_name = '" & session("loginuser") & "', " & _
" del_ip = '" & Request.ServerVariables("REMOTE_ADDR") & "' "
query = query & "WHERE 문서번호 = '" & d_no & "' "
end if
set dbin = server.CreateObject("ADODB.CONNECTION")
dbin.Open adoConn
dbin.Execute query
dbin.Close
%>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=euc-kr">
<LINK rel="stylesheet" type="text/css" href="/lib/text.css">
<title>
</title>
<script language=javascript>
function goit(x, y) {
var d_name = document.ess.d_name.value;
alert('처리 완료 및 통보되었습니다');
if (d_name == "내근직수당지출결의서") {
document.ess.action = "doc_myun_pay.asp?title=면접원수당지출결의서&sel_month=" + y;
}else if(d_name == "면접원수당지출결의서") {
document.ess.action = "doc_myun2_pay.asp?title=면접원수당지출결의서&sel_month=" + y;
}
document.ess.submit();
}
</script>
</head>
<body onLoad="goit('<%=x%>', '<%=y%>')">
<form name="ess" method="post">
<input type="hidden" name="d_name" size=50 value='<%=rsc("d_name") %>'>
</body>
</html>
<%
else
alert2 "이미 완료된 문서입니다."
end if
else
alert2 "DB 에러. 관리자에게 문의하세요"
end if
rsc.Close
%>