orderbedit_jsp.java
来自「jsp_javabean+tomcat的web管理系统!」· Java 代码 · 共 462 行 · 第 1/2 页
JAVA
462 行
package org.apache.jsp.customize;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
import java.util.*;
import msrv.Pagination;;
public final class orderBedit_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.DBConn conn = null;
synchronized (_jspx_page_context) {
conn = (msrv.DBConn) _jspx_page_context.getAttribute("conn", PageContext.PAGE_SCOPE);
if (conn == null){
conn = new msrv.DBConn();
_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("<link href=\"../css/all.css\" rel=\"stylesheet\" type=\"text/css\">\r\n");
out.write("\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("\tmargin-bottom: 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("<script language=\"javascript\">\r\n");
out.write("function subForm(){\r\n");
out.write(" if(document.form1.orderName.value==''){\r\n");
out.write(" alert(\"请输入业务名称!\");\r\n");
out.write("\tdocument.form1.orderName.focus();\r\n");
out.write("\treturn false;\r\n");
out.write(" }\r\n");
out.write(" if(strlen(document.form1.orderName.value)>20){\r\n");
out.write(" alert(\"输入的业务名称过长\");\r\n");
out.write("\t document.form1.orderName.focus();\r\n");
out.write("\t return false;\r\n");
out.write(" }\r\n");
out.write("}\r\n");
out.write("\r\n");
out.write("function strlen(str){\r\n");
out.write("\tvar i;\r\n");
out.write("\tvar len;\r\n");
out.write("\tlen = 0;\r\n");
out.write("\tfor (i=0;i<str.length;i++)\r\n");
out.write("\t{\r\n");
out.write("\tif (str.charCodeAt(i)>255) len+=2; else len++;\r\n");
out.write("\t}\r\n");
out.write("\treturn len;\r\n");
out.write("}\r\n");
out.write("\r\n");
out.write("function addParams(){\r\n");
out.write(" var parameterNum=document.form1.paramNum.value;\r\n");
out.write(" //paramArea.innerHTML\r\n");
out.write(" var htmlStr=\"\";\r\n");
out.write(" //for(var i=1;i<=parameterNum;i++){\r\n");
out.write(" htmlStr+=\"<span id=paramID\"+parameterNum+1+\"><TABLE cellSpacing=1 cellPadding=0 width=100% bgColor=#ffffff border=0>\";\r\n");
out.write("\thtmlStr+=\"<TBODY>\";\r\n");
out.write("\thtmlStr+=\"<TR bgColor=#F2F2F2>\";\r\n");
out.write("\thtmlStr+=\"<TD align=middle width=14%>参 数</TD>\";\r\n");
out.write("\thtmlStr+=\"<TD width=86%>参数名称 <INPUT class=textbox id=paramName2 size=12 name=paramName> 参数变量名<INPUT class=textbox id=paramName2 size=12 name=variableName> 参数类型 <SELECT id=paramType name=paramType> <OPTION value=1 selected>文本框</OPTION> <OPTION value=2>多行文本</OPTION> <OPTION value=3>单选框</OPTION> <OPTION value=4>多选框</OPTION> <OPTION value=5>列表框</OPTION> </SELECT> </TD></TR>\";\r\n");
out.write("\thtmlStr+=\"<TR bgColor=#F2F2F2>\";\r\n");
out.write("\thtmlStr+=\"<TD> </TD>\";\r\n");
out.write("\thtmlStr+=\"<TD>参数为多项时参数内容----格式:中文名字,选项值,各项之间换行隔开<br><TEXTAREA id=paramValues cols=40 rows=5 name=paramValues></TEXTAREA></TD></TR>\";\r\n");
out.write("\thtmlStr+=\"<TR bgColor=#F2F2F2>\";\r\n");
out.write("\thtmlStr+=\"<TD align=middle valign=top>参数描述</TD>\";\r\n");
out.write("\thtmlStr+=\"<TD><TEXTAREA id=paramD cols=40 rows=5 name=paramDescription></TEXTAREA></TD></TR></TBODY></TABLE></span>\";\r\n");
out.write(" //}\r\n");
out.write(" paramArea.innerHTML+=htmlStr;\r\n");
out.write(" document.form1.paramNum.value=parseInt(parameterNum)+1;\r\n");
out.write("}\r\n");
out.write("function deleteParams(){\r\n");
out.write(" var parameterNum=document.form1.paramNum.value;\r\n");
out.write(" //paramArea.innerHTML\r\n");
out.write(" var htmlStr=\"\";\r\n");
out.write(" for(var i=1;i<=parameterNum;i++){\r\n");
out.write(" htmlStr+=\"<TABLE cellSpacing=1 cellPadding=0 width=100% bgColor=#ffffff border=0>\";\r\n");
out.write("\thtmlStr+=\"<TBODY>\";\r\n");
out.write("\thtmlStr+=\"<TR bgColor=#F2F2F2>\";\r\n");
out.write("\thtmlStr+=\"<TD align=middle width=14%>参 数\"+i+\"</TD>\";\r\n");
out.write("\thtmlStr+=\"<TD width=86%>参数名称 <INPUT class=textbox id=paramName2 size=12 name=paramName> 参数变量名<INPUT class=textbox id=paramName2 size=12 name=variableName> 参数类型 <SELECT id=paramType name=paramType> <OPTION value=1 selected>文本框</OPTION> <OPTION value=2>多行文本</OPTION> <OPTION value=3>单选框</OPTION> <OPTION value=4>多选框</OPTION> <OPTION value=5>列表框</OPTION> </SELECT> </TD></TR>\";\r\n");
out.write("\thtmlStr+=\"<TR bgColor=#F2F2F2>\";\r\n");
out.write("\thtmlStr+=\"<TD> </TD>\";\r\n");
out.write("\thtmlStr+=\"<TD>参数为多项时参数内容----格式:中文名字,选项值,各项之间换行隔开<br><TEXTAREA id=paramValues\"+i+\" cols=40 rows=5 name=paramValues></TEXTAREA></TD></TR>\";\r\n");
out.write("\thtmlStr+=\"<TR bgColor=#F2F2F2>\";\r\n");
out.write("\thtmlStr+=\"<TD align=middle valign=top>参数描述</TD>\";\r\n");
out.write("\thtmlStr+=\"<TD><TEXTAREA id=paramD cols=40 rows=5 name=paramDescription></TEXTAREA></TD></TR></TBODY></TABLE>\";\r\n");
out.write(" }\r\n");
out.write(" paramArea.innerHTML=htmlStr;\r\n");
out.write("}\r\n");
out.write("</script>\r\n");
out.write("</head>\r\n");
out.write("<body>\r\n");
String tob_id="",sql="",paramSql="",sendDateSql="",tob_name="",tob_busiType="",tob_description="",tob_type="",tob_status="",tou_className="";
ResultSet rs=null,sendDateRs=null,paramRs=null;
if(request.getParameter("tob_id")!=null) tob_id=request.getParameter("tob_id");
sql="select tob_id,tob_name,tob_type,convert(int,tob_status),tob_className,tob_busitype,isNull(tob_description,'') from tb_order_busi where tob_id='"+tob_id+"'";
try{
rs=conn.executeQuery(sql);
while(rs.next()){
tob_name=rs.getString(2);
tob_type=rs.getString(3);
tob_status=rs.getString(4);
tou_className=rs.getString(5);
tob_busiType=rs.getString(6);
tob_description=rs.getString(7);
}
}catch(SQLException ex){out.print(ex.getMessage());}
finally{
if(rs!=null){
rs.close();
rs=null;
}
}
if(!tob_name.equals("")){
sendDateSql="select tot_time from tb_order_time where tot_serviceid='"+tob_id+"'";
try{
sendDateRs=conn.executeQuery(sendDateSql);
}catch(SQLException ex){
out.print(ex.getMessage());
}
}
paramSql="select paramName,variableName,paramType,paramValues,paramDescription from tb_order_busiparams where tob_id='"+tob_id+"'";
try{
paramRs=conn.executeQuery(paramSql);
}catch(SQLException ex){out.println(ex.getMessage());}
out.write("\r\n");
out.write("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\" bgcolor=\"#666666\">\r\n");
out.write(" <tr>\r\n");
out.write(" <td height=\"23\" background=\"images/leftlan01.jpg\"> <span class=\"style1\">点播类业务--业务</span></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td bgcolor=\"#FFFFFF\"> </td>\r\n");
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?