40 lines
1.9 KiB
Plaintext
40 lines
1.9 KiB
Plaintext
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
|
|
<%@ page import="java.util.*"%>
|
|
<%@ page import="java.io.*"%>
|
|
<%@ page import="com.oreilly.servlet.MultipartRequest" %>
|
|
<%@ page import="com.oreilly.servlet.multipart.DefaultFileRenamePolicy" %>
|
|
<%@include file="/include/db/db_connect.jsp"%>
|
|
<%@include file="/include/function/function.jsp"%>
|
|
<%request.setCharacterEncoding("utf-8");%>
|
|
<%
|
|
String show_no = r_call(request.getParameter("show_no"));
|
|
String check_no = r_call(request.getParameter("check_no"));
|
|
String c_relation = r_call(request.getParameter("c_relation"));
|
|
String c_relation2 = r_call(request.getParameter("c_relation2"));
|
|
String c_home = r_call(request.getParameter("c_home"));
|
|
String c_no = r_call(request.getParameter("c_no"));
|
|
String c_master_no = r_call(request.getParameter("c_master_no"));
|
|
String c_board_no = r_call(request.getParameter("c_board_no"));
|
|
String c_view = r_call(request.getParameter("c_view"));
|
|
|
|
String sql_c = "select a.* , b.c_name as m_name, b.c_id as m_id ";
|
|
sql_c = sql_c + ", (select count(c_no) as m_number from tbl_community_member where c_community_no = a.c_no and c_use = 0 and c_now in (0,1) ) as m_number ";
|
|
sql_c = sql_c + " from tbl_community a ";
|
|
sql_c = sql_c + " inner join tbl_member b on b.c_no = a.c_member_no ";
|
|
sql_c = sql_c + " where a.c_no = "+ c_no +" and a.c_use = 0 and a.c_home = "+ c_home +" and c_member_no = "+ session.getAttribute("member_no") +" ";
|
|
ResultSet rs_c = stmt.executeQuery(sql_c);
|
|
if (rs_c.next()) {
|
|
String sql_in = "update tbl_community_board set ";
|
|
sql_in = sql_in + " c_view = " + c_view + " ";
|
|
sql_in = sql_in + " where c_no = " + c_board_no + " ";
|
|
stmt2.execute(sql_in);
|
|
}
|
|
rs_c.close();
|
|
|
|
%>
|
|
<script>
|
|
parent.location.href="edit.jsp?show_no=<%=show_no%>&check_no=<%=check_no%>&c_relation=<%=c_relation%>&c_relation2=<%=c_relation2%>&c_no=<%=c_no%>";
|
|
</script>
|
|
|
|
<%@include file="/include/db/db_close.jsp"%>
|