Files
KIN/ess/project_reason_delok.asp
2025-09-29 17:55:08 +09:00

78 lines
1.9 KiB
Plaintext

<!-- #include virtual = "lib/config.asp" -->
<%
d_no = request("d_no")
del_reason = CheckWord(request("del_reason"))
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
tmp = split(rsc("target1"), "^^")
for i = 0 to ubound(tmp)
if trim(tmp(i)) = "" then
tmp(i) = Session("loginuser") & "<BR>" & replace(date(), "-", "") & "<BR>반려"
exit for
end if
next
target1 = ""
for i = 0 to ubound(tmp)
if i <> 0 then
target1 = target1 & "^^"
end if
target1 = target1 & tmp(i)
next
query = "UPDATE Document "
query = query & "SET "
query = query & " d_delok = 'Y', "
query = query & " d_order_cnt = '99' "
query = query & "WHERE d_no = '" & d_no & "' "
set dbin = server.CreateObject("ADODB.CONNECTION")
dbin.Open adoConn
dbin.Execute query
dbin.Close
query = "UPDATE 문서내용 "
query = query & "SET "
query = query & " target1 = '" & target1 & "', "
query = query & " del_yes_no = 'yes', "
query = query & " del_date = '" & date() & "', "
query = query & " del_time = '" & time() & "', "
query = query & " del_ip = '" & Request.ServerVariables("REMOTE_ADDR") & "', "
query = query & " del_user_name = '" & Session("loginuser") & "', "
query = query & " del_reason = '" & del_reason & "' "
query = query & "WHERE 문서번호 = '" & d_no & "' "
set dbin = server.CreateObject("ADODB.CONNECTION")
dbin.Open adoConn
dbin.Execute query
dbin.Close
%>
<html>
<script>
function goit() {
alert('반려되었습니다');
self.close();
opener.close();
}
</script>
<body onLoad="goit()">
<form name="pms" method="post">
<input type="hidden" name="d_no" value="<%=d_no%>">
</form>
</body>
</html>
<%
else
alert2 "DB 에러. 관리자에게 문의하세요"
end if 'if rsc.RecordCount > 0 then
rsc.Close
%>