최초커밋
This commit is contained in:
73
knowledge/b_reply_work.asp
Normal file
73
knowledge/b_reply_work.asp
Normal file
@@ -0,0 +1,73 @@
|
||||
<!-- #include virtual = "lib/config.asp" -->
|
||||
<%
|
||||
b_type = request("b_type")
|
||||
b_sn = request("b_sn")
|
||||
r_sn = request("r_sn")
|
||||
r_content = CheckWord(request("r_content"))
|
||||
x = request("x") '1=<3D><><EFBFBD><EFBFBD>, 2=<3D><><EFBFBD><EFBFBD>
|
||||
|
||||
if x = "1" then
|
||||
query = "INSERT INTO intranet_board_reply "
|
||||
query = query & "(r_bsn, r_name, r_name_no, r_content, r_date, r_delok) "
|
||||
query = query & "VALUES "
|
||||
query = query & "('" & b_sn & "', "
|
||||
query = query & "'" & Session("loginuser") & "', "
|
||||
query = query & "'" & Session("User_Number") & "', "
|
||||
query = query & "'" & r_content & "', "
|
||||
query = query & "'" & date() & "', "
|
||||
query = query & "'N') "
|
||||
|
||||
set dbin = server.CreateObject("ADODB.CONNECTION")
|
||||
dbin.Open adoConn
|
||||
dbin.Execute query
|
||||
dbin.Close
|
||||
|
||||
query = "UPDATE intranet_board "
|
||||
query = query & "SET "
|
||||
query = query & " b_reply_cnt = ISNULL(b_reply_cnt, 0) + 1 "
|
||||
query = query & "WHERE b_delok = 'N' "
|
||||
query = query & " AND b_sn = '" & b_sn & "' "
|
||||
|
||||
set dbin = server.CreateObject("ADODB.CONNECTION")
|
||||
dbin.Open adoConn
|
||||
dbin.Execute query
|
||||
dbin.Close
|
||||
|
||||
elseif x = "2" then
|
||||
query = "DELETE FROM intranet_board_reply "
|
||||
query = query & "WHERE r_delok='N' "
|
||||
query = query & " AND r_sn = '" & r_sn & "' "
|
||||
|
||||
set dbin = server.CreateObject("ADODB.CONNECTION")
|
||||
dbin.Open adoConn
|
||||
dbin.Execute query
|
||||
dbin.Close
|
||||
|
||||
query = "UPDATE intranet_board "
|
||||
query = query & "SET "
|
||||
query = query & " b_reply_cnt = ISNULL(b_reply_cnt, 1) - 1 "
|
||||
query = query & "WHERE b_delok = 'N' "
|
||||
query = query & " AND b_sn = '" & b_sn & "' "
|
||||
|
||||
set dbin = server.CreateObject("ADODB.CONNECTION")
|
||||
dbin.Open adoConn
|
||||
dbin.Execute query
|
||||
dbin.Close
|
||||
end if
|
||||
%>
|
||||
<meta http-equiv="content-type" content="text/html; charset=EUC-KR">
|
||||
<form name="b_board" method="post">
|
||||
<input type="hidden" name="b_type" value="<%=b_type%>">
|
||||
<input type="hidden" name="b_sn" value="<%=b_sn%>">
|
||||
</form>
|
||||
<script>
|
||||
<% If x = "1" Then %>
|
||||
alert("<22><><EFBFBD>ϵǾ<CFB5><C7BE><EFBFBD><EFBFBD>ϴ<EFBFBD>.");
|
||||
document.b_board.action = 'b_view.asp';
|
||||
document.b_board.submit();
|
||||
<% ElseIf x = "2" Then %>
|
||||
alert("<22><><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD>ϴ<EFBFBD>.");
|
||||
document.b_board.action = 'b_view.asp';
|
||||
document.b_board.submit();
|
||||
<% End If %>
|
||||
</script>
|
||||
Reference in New Issue
Block a user