45 lines
1.6 KiB
Plaintext
45 lines
1.6 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 to_master = r_call(request.getParameter("to_master"));
|
|
|
|
String sql_c = " select * from tbl_member where c_id = '"+ to_master +"' and c_rand = 0 and c_use = 0 ";
|
|
|
|
ResultSet rs_c = stmt.executeQuery(sql_c);
|
|
if (rs_c.next()) {
|
|
String sql_in = "update tbl_community set ";
|
|
sql_in = sql_in + " c_member_no = "+ rs_c.getInt("c_no") +" ";
|
|
sql_in = sql_in + " where c_no = " + c_no + " ";
|
|
stmt2.execute(sql_in);
|
|
|
|
%>
|
|
<script>
|
|
alert("Master privileges has been transferred to <%=rs_c.getString("c_name")%>(<%=to_master%>).")
|
|
parent.location.href="list.jsp?show_no=<%=show_no%>&check_no=<%=check_no%>&c_relation=<%=c_relation%>&c_relation2=<%=c_relation2%>";
|
|
</script>
|
|
<%
|
|
}else{
|
|
%>
|
|
<script>
|
|
alert("The ID you entered does not exist.")
|
|
</script>
|
|
<%
|
|
}
|
|
rs_c.close();
|
|
|
|
%>
|
|
|
|
<%@include file="/include/db/db_close.jsp"%>
|