?? tf_info_java.jsp
字號:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.util.*" errorPage="../../pub_include/ErrPage.jsp" %>
<%request.setCharacterEncoding("gb2312");%>
<jsp:include page="../../pub_include/pub_function_javascript.html" flush="true"/>
<%@ page import="jinLing.pub.*,jinLing.info.*"%>
<%
String Src_para = "";
//PubOp pubOp = new PubOp("INFO");
Info info=new Info();
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../../pub_include/hosc.css" rel="stylesheet" type="text/css">
</head>
<body>
<%
Hashtable lists = new Hashtable();
int iRes = 0;
String INFO_ID = Util.getNulltoStr(request.getParameter("INFO_ID")); //ID
String INFO_TYPE = Util.getNulltoStr(request.getParameter("INFO_TYPE")); // INFO_TYPE
if(!INFO_TYPE.equals(""))
lists.put("INFO_TYPE",INFO_TYPE);
String INFO_CONTENT = Util.getNulltoStr(request.getParameter("INFO_CONTENT")); // INFO_CONTENT
lists.put("INFO_CONTENT",INFO_CONTENT);
String INFO_REMARK = Util.getNulltoStr(request.getParameter("INFO_REMARK")); //
lists.put("INFO_REMARK",INFO_REMARK);
//操作類型
String op=request.getParameter("optype");
int type=Integer.parseInt(op);
//增加
if(type==1)
{
iRes = info.addRec(lists);
Util.debug("-----------"+lists);
}
//修改
if(type==2)
{
iRes = info.setRec(INFO_ID,lists);
}
String iRecSult = "數據提交失敗";
switch (iRes)
{
case 1: //成功
iRecSult = "成功!謝謝使用!";
break;
case 0: //
iRecSult = "對不起,失敗!";
break;
case 2: //信息已存在
iRecSult = "對不起,信息已存在!請重新輸入。";
break;
}
%>
<script language=javascript>
iRes=<%=iRes%>;
iRecSult="<%=iRecSult%>";
if (iRes==1)
{
window.location.href='tf_info_update.jsp?INFO_TYPE=<%=INFO_TYPE%>';
}
else
{
alert(iRecSult);
history.back();
}
</script>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -