37 lines
1.4 KiB
Plaintext
37 lines
1.4 KiB
Plaintext
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
|
|
<%@include file="/include/db/db_connect.jsp"%>
|
|
<%@include file="/include/function/function.jsp"%>
|
|
<%request.setCharacterEncoding("utf-8");%>
|
|
<%
|
|
|
|
String c_name = r_call(request.getParameter("c_name"));
|
|
String c_home = r_call(request.getParameter("c_home"));
|
|
String c_ji_no = r_call(request.getParameter("c_ji_no"));
|
|
String c_up_no = r_call(request.getParameter("c_up_no"));
|
|
String c_exp = r_call(request.getParameter("c_exp"));
|
|
String c_point = r_call(request.getParameter("c_point"));
|
|
if(c_up_no.equals("0")){
|
|
c_point = "0";
|
|
}
|
|
int c_order = 1;
|
|
String sql_ji = "select c_order from tbl_point_ji_detail where c_ji_no = " + c_ji_no + " and c_up_no = " + c_up_no + " and c_use = 0 order by c_order desc";
|
|
ResultSet rs_ji = stmt.executeQuery(sql_ji);
|
|
if(rs_ji.next()){
|
|
c_order = rs_ji.getInt("c_order") + 1;
|
|
}
|
|
rs_ji.close();
|
|
|
|
String sql_ok = "";
|
|
sql_ok = "insert into tbl_point_ji_detail (c_ji_no,c_up_no,c_title,c_exp,c_point,c_order,c_use,c_date) values(";
|
|
sql_ok = sql_ok + c_ji_no + ","+ c_up_no +",'" + c_name + "','"+ c_exp+"',"+ c_point +","+ c_order +",0,now())";
|
|
|
|
stmt2.execute(sql_ok);
|
|
%>
|
|
<script>
|
|
alert("Insert OK");
|
|
parent.location.href="list.jsp?c_home=<%=c_home%>&c_ji_no=<%=c_ji_no%>"
|
|
</script>
|
|
<%
|
|
|
|
%>
|
|
<%@include file="/include/db/db_close.jsp"%> |