edittypedetail_jsp.java
来自「jsp_javabean+tomcat的web管理系统!」· Java 代码 · 共 297 行
JAVA
297 行
package org.apache.jsp.customize;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
public final class editTypeDetail_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static java.util.Vector _jspx_dependants;
static {
_jspx_dependants = new java.util.Vector(2);
_jspx_dependants.add("/customize/../verifys.inc");
_jspx_dependants.add("/customize/../verifyEdit.inc");
}
public java.util.List getDependants() {
return _jspx_dependants;
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;
try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html; charset=gb2312");
pageContext = _jspxFactory.getPageContext(this, request, response,
"", true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write('\r');
out.write('\n');
out.write('\r');
out.write('\n');
msrv.PurviewVerify pv = null;
synchronized (_jspx_page_context) {
pv = (msrv.PurviewVerify) _jspx_page_context.getAttribute("pv", PageContext.PAGE_SCOPE);
if (pv == null){
pv = new msrv.PurviewVerify();
_jspx_page_context.setAttribute("pv", pv, PageContext.PAGE_SCOPE);
}
}
out.write('\r');
out.write('\n');
String msrvUserID="",projectID="",contextPath="",relativelyURI="",relativelyFile="";
if(session.getAttribute("msrvUserID")==null||session.getAttribute("msrvUserID").equals(""))
{
out.print("<script>alert('非法进入');window.location='main.jsp';window.parent.carnoc.location='left.jsp'</script>");
return;
}else{
msrvUserID=(String)session.getAttribute("msrvUserID");
contextPath=request.getContextPath();
relativelyURI=request.getRequestURI();
relativelyFile=relativelyURI.substring(contextPath.length()+1,relativelyURI.length());
}
pv.init(Integer.parseInt(msrvUserID),relativelyFile);
if(!pv.getViewPurview()){
out.print("<script>alert('你不具有此项权限,请与管理员联系!');</script>");
return;
}
out.write('\r');
out.write('\n');
//**********ÊÇ·ñ¾ßÓбà¼È¨ÏÞ****************************************************
if(!pv.getEditPurview()){
out.print("<script>alert('Äã²»¾ßÓдËÏîȨÏÞ£¬ÇëÓë¹ÜÀíÔ±ÁªÏµ£¡');</script>");
return;
}
//***************************************************************************
out.write('\r');
out.write('\n');
out.write('\r');
out.write('\n');
msrv.NDBConn conn = null;
synchronized (_jspx_page_context) {
conn = (msrv.NDBConn) _jspx_page_context.getAttribute("conn", PageContext.PAGE_SCOPE);
if (conn == null){
conn = new msrv.NDBConn();
_jspx_page_context.setAttribute("conn", conn, PageContext.PAGE_SCOPE);
}
}
out.write("\r\n");
out.write("<html>\r\n");
out.write("<head>\r\n");
out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n");
out.write("<title>无标题文档</title>\r\n");
out.write("<style type=\"text/css\">\r\n");
out.write("<!--\r\n");
out.write("body {\r\n");
out.write("\tmargin-left: 0px;\r\n");
out.write("\tmargin-top: 0px;\r\n");
out.write("\tmargin-right: 0px;\r\n");
out.write("}\r\n");
out.write(".style1 {color: #FFFFFF}\r\n");
out.write("-->\r\n");
out.write("</style>\r\n");
out.write("<link href=\"../css/all.css\" rel=\"stylesheet\" type=\"text/css\">\r\n");
out.write("<script language=\"javascript\">\r\n");
out.write(" function formSub(){\r\n");
out.write("\t if(document.form1.tot_typeid.value==''){\r\n");
out.write("\t alert(\"请输入业务编号!\");\r\n");
out.write("\t\t document.form1.tot_typeid.focus();\r\n");
out.write("\t\t return false;\r\n");
out.write("\t }\r\n");
out.write("\t if(document.form1.tot_longcode.value==''){\r\n");
out.write("\t alert(\"请输入长号码!\");\r\n");
out.write("\t\t document.form1.tot_longcode.focus();\r\n");
out.write("\t\t return false;\r\n");
out.write("\t }\r\n");
out.write("\t /*\r\n");
out.write("\t if(!isNumber(document.form1.longNumber.value)){\r\n");
out.write("\t alert(\"输入长号码的格式不正确,只能输入数字!\");\r\n");
out.write("\t\t document.form1.longNumber.focus();\r\n");
out.write("\t\t return false;\r\n");
out.write("\t }*/\r\n");
out.write("\t /*\r\n");
out.write("\t if(document.form1.operateName.value==''){\r\n");
out.write("\t alert(\"请输入处理子程序名称!\");\r\n");
out.write("\t\t document.form1.operateName.focus();\r\n");
out.write("\t\t return false;\r\n");
out.write("\t }\r\n");
out.write("\t */\r\n");
out.write("\t}\r\n");
out.write("function isNumber(num)\r\n");
out.write("{\r\n");
out.write("\t var ok;\r\n");
out.write("\t\ta=num;\r\n");
out.write("\t\tre=/^\\d+$/;\r\n");
out.write("\t\tok=re.exec(a);\r\n");
out.write("\t\tif(ok==null) return false;\r\n");
out.write("\t\telse return true;\r\n");
out.write("}\r\n");
out.write("</script>\r\n");
out.write("</head>\r\n");
out.write("\r\n");
out.write("<body>\r\n");
String tot_id="",tot_typeid="",tot_longcode="",
tot_order="",tot_order_type="",tot_level="",
tot_sql="";
ResultSet tot_rs=null;
if(request.getParameter("tot_id")==null){
out.print("<script>alert('非法操作!');</script>");
return;
}else tot_id=request.getParameter("tot_id");
tot_sql="select tot_typeid,tot_longcode,tot_order,tot_order_type,tot_level from megajoysms.dbo.tb_order_type_detail where tot_id="+tot_id;
try{
tot_rs=conn.executeQuery(tot_sql);
}catch(SQLException ex){out.println(ex.getMessage());}
if(tot_rs==null) return;
try{
while(tot_rs.next()){
tot_typeid=tot_rs.getString(1);
tot_longcode=tot_rs.getString(2);
tot_order=tot_rs.getString(3);
tot_order_type=tot_rs.getString(4);
tot_level=tot_rs.getString(5);
}
}catch(SQLException ex){out.println(ex.getMessage());}
finally{
if(tot_rs!=null){
tot_rs.close();
tot_rs=null;
}
conn.closeStatement();
}
out.write("\r\n");
out.write("<table width=\"100%\" height=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\" bgcolor=\"#808080\">\r\n");
out.write(" <tr>\r\n");
out.write(" <td height=\"23\"> <span class=\"style1\">后台管理--业务处理平台--添加业务</span></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td align=\"center\" valign=\"top\" bgcolor=\"#FFFFFF\"><br> <table width=\"85%\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\" bgcolor=\"#CCCCCC\">\r\n");
out.write(" <tr bgcolor=\"#F2F2F2\">\r\n");
out.write(" <td height=\"20\" colspan=\"4\">\r\n");
out.write(" <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n");
out.write(" <tr>\r\n");
out.write(" <td> 网关内容</td>\r\n");
out.write(" <td align=\"right\"> </td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <form action=\"dealTypeDetail.jsp\" method=\"post\" name=\"form1\" onSubmit=\"return formSub()\">\r\n");
out.write(" <tr align=\"center\" bgcolor=\"F2F2F2\">\r\n");
out.write(" <td height=\"2\" colspan=\"4\" bgcolor=\"#FFFFFF\"></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr align=\"center\" bgcolor=\"F2F2F2\">\r\n");
out.write(" <td width=\"22\" bgcolor=\"#FFFFFF\"> </td>\r\n");
out.write(" <td width=\"67\" bgcolor=\"#FFFFFF\">业务编号</td>\r\n");
out.write(" <td width=\"351\" align=\"left\" bgcolor=\"#FFFFFF\"><input name=\"tot_typeid\" type=\"text\" class=\"textbox\" id=\"tot_typeid\" value=\"");
out.print(tot_typeid);
out.write("\"></td>\r\n");
out.write(" <td width=\"125\" align=\"left\" bgcolor=\"#FFFFFF\"><input type=\"hidden\" name=\"cntrl\" value=\"edit\">\r\n");
out.write(" <input name=\"tot_id\" type=\"hidden\" id=\"tot_id\" value=\"");
out.print(tot_id);
out.write("\"></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr align=\"center\" bgcolor=\"F2F2F2\">\r\n");
out.write(" <td bgcolor=\"#FFFFFF\"> </td>\r\n");
out.write(" <td bgcolor=\"#FFFFFF\">长 号 码</td>\r\n");
out.write(" <td align=\"left\" bgcolor=\"#FFFFFF\"><input name=\"tot_longcode\" type=\"text\" class=\"textbox\" id=\"tot_longcode\" value=\"");
out.print(tot_longcode);
out.write("\"></td>\r\n");
out.write(" <td align=\"left\" bgcolor=\"#FFFFFF\"> </td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr align=\"center\" bgcolor=\"F2F2F2\">\r\n");
out.write(" <td bgcolor=\"#FFFFFF\"> </td>\r\n");
out.write(" <td bgcolor=\"#FFFFFF\">订购命令字</td>\r\n");
out.write(" <td align=\"left\" bgcolor=\"#FFFFFF\"><input name=\"tot_order\" type=\"text\" class=\"textbox\" id=\"tot_order\" value=\"");
out.print(tot_order);
out.write("\" size=\"50\"></td>\r\n");
out.write(" <td align=\"left\" bgcolor=\"#FFFFFF\"> </td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr align=\"center\" bgcolor=\"F2F2F2\">\r\n");
out.write(" <td bgcolor=\"#FFFFFF\"> </td>\r\n");
out.write(" <td bgcolor=\"#FFFFFF\">命令字类型</td>\r\n");
out.write(" <td align=\"left\" bgcolor=\"#FFFFFF\"><select name=\"tot_order_type\" id=\"tot_order_type\">\r\n");
out.write(" <option ");
if(tot_order_type.equals("1")) out.println("selected");
out.write(" value=\"1\">订制命令</option>\r\n");
out.write(" <option ");
if(tot_order_type.equals("2")) out.println("selected");
out.write(" value=\"2\">退订命令</option>\r\n");
out.write(" <option ");
if(tot_order_type.equals("6")) out.println("selected");
out.write(" value=\"6\">二次确认命令</option>\r\n");
out.write(" </select></td>\r\n");
out.write(" <td align=\"left\" bgcolor=\"#FFFFFF\"> </td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr align=\"center\" bgcolor=\"F2F2F2\">\r\n");
out.write(" <td bgcolor=\"#FFFFFF\"> </td>\r\n");
out.write(" <td bgcolor=\"#FFFFFF\"> 匹配等级</td>\r\n");
out.write(" <td align=\"left\" bgcolor=\"#FFFFFF\"><select name=\"tot_level\" id=\"tot_level\">\r\n");
out.write(" <option ");
if(tot_level.equals("2")) out.println("selected");
out.write(" value=\"2\">优先匹配等级</option>\r\n");
out.write(" <option ");
if(tot_level.equals("3")) out.println("selected");
out.write(" value=\"3\">一般匹配等级</option>\r\n");
out.write(" <option ");
if(tot_level.equals("5")) out.println("selected");
out.write(" value=\"5\">最低匹配等级</option>\r\n");
out.write(" </select></td>\r\n");
out.write(" <td align=\"left\" bgcolor=\"#FFFFFF\"> </td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr align=\"center\" bgcolor=\"F2F2F2\">\r\n");
out.write(" <td height=\"2\" colspan=\"4\" bgcolor=\"#FFFFFF\"></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr align=\"center\" bgcolor=\"F2F2F2\">\r\n");
out.write(" <td height=\"22\" colspan=\"4\"><input name=\"Submit\" type=\"submit\" class=\"buttons\" value=\"提 交\">\r\n");
out.write(" <input name=\"Submit2\" type=\"reset\" class=\"buttons\" value=\"重 置\"></td>\r\n");
out.write(" </tr>\r\n");
out.write(" </form>\r\n");
out.write(" </table>\r\n");
out.write(" <p><br>\r\n");
out.write(" </p> </td>\r\n");
out.write(" </tr>\r\n");
out.write("</table>\r\n");
conn.close();
out.write("\r\n");
out.write("</body>\r\n");
out.write("</html>\r\n");
} catch (Throwable t) {
if (!(t instanceof SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
}
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?