28 lines
1.3 KiB
Plaintext
28 lines
1.3 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_no = r_call(request.getParameter("c_no"));
|
|
String c_name = r_call(request.getParameter("c_name"));
|
|
String c_id = r_call(request.getParameter("c_id"));
|
|
String c_pass = r_call(request.getParameter("c_pass"));
|
|
String c_position = r_call(request.getParameter("c_position"));
|
|
String c_part = r_call(request.getParameter("c_part"));
|
|
String c_phone = r_call(request.getParameter("c_phone"));
|
|
String c_email = r_call(request.getParameter("c_email"));
|
|
|
|
String sql_ok = "";
|
|
if(c_pass.equals("")){
|
|
sql_ok = "update tbl_manager set c_name='"+ c_name +"',c_part='"+ c_part +"',c_position='"+ c_position +"',c_phone='"+ c_phone +"',c_email='"+ c_email +"' where c_no = " + c_no;
|
|
}else{
|
|
sql_ok = "update tbl_manager set c_name='"+ c_name +"',c_pass=SHA2('" + c_pass + "',512),c_part='"+ c_part +"',c_position='"+ c_position +"',c_phone='"+ c_phone +"',c_email='"+ c_email +"' where c_no = " + c_no;
|
|
}
|
|
stmt2.execute(sql_ok);
|
|
%>
|
|
<script>
|
|
alert("Edit OK");
|
|
parent.location.href="list.jsp"
|
|
</script>
|
|
<%@include file="/include/db/db_close.jsp"%> |