📄 dms_0002fsystem_0002fdoccode_0002ejsp_jsp.java
字号:
package DMS.system;
import java.sql.*;
import com.jasson.presentation.common.*;
import com.jasson.business.system.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;
public class DMS_0002fsystem_0002fDocCode_0002ejsp_jsp extends HttpJspBase {
static {
}
public DMS_0002fsystem_0002fDocCode_0002ejsp_jsp( ) {
}
private static boolean _jspx_inited = false;
public final void _jspx_init() throws org.apache.jasper.runtime.JspException {
}
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;
String _value = null;
try {
if (_jspx_inited == false) {
synchronized (this) {
if (_jspx_inited == false) {
_jspx_init();
_jspx_inited = true;
}
}
}
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html;charset=big5");
pageContext = _jspxFactory.getPageContext(this, request, response,
"", true, 8192, true);
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
// HTML // begin [file="/DMS/system/DocCode.jsp";from=(0,26);to=(1,0)]
out.write("\r\n");
// end
// HTML // begin [file="/DMS/system/DocCode.jsp";from=(1,48);to=(2,0)]
out.write("\r\n");
// end
// HTML // begin [file="/DMS/system/DocCode.jsp";from=(2,32);to=(3,0)]
out.write("\r\n");
// end
// HTML // begin [file="/DMS/system/DocCode.jsp";from=(3,52);to=(4,0)]
out.write("\r\n");
// end
// HTML // begin [file="/DMS/system/DocCode.jsp";from=(4,48);to=(12,0)]
out.write("\r\n<!--#include file=\"../inc/CheckLogin.inc\"-->\r\n<html>\r\n<script src=\"../inc/toUpper.js\" content=\"text/javascript\"></script>\r\n<head>\r\n<meta http-equiv=\"Content-Type\"\tcontent=\"text/html; charset=big5\">\r\n<link rel=\"stylesheet\" href=\"../inc/cn.css\" type=\"text/css\">\r\n<title>公文管理系統</title>\r\n");
// end
// begin [file="/DMS/system/DocCode.jsp";from=(12,2);to=(34,1)]
DocCopyDAO[] DocCopyDAOs = (DocCopyDAO[])request.getAttribute("DocCopyDAO");
DocKindDAO[] DocKindDAOs = (DocKindDAO[])request.getAttribute("DocKindDAO");
DocTypeDAO[] DocTypeDAOs = (DocTypeDAO[])request.getAttribute("DocTypeDAO");
DocAttributeDAO[] DocAttributeDAOs = (DocAttributeDAO[])request.getAttribute("DocAttributeDAO");
DocSecretDAO[] DocSecretDAOs = (DocSecretDAO[])request.getAttribute("DocSecretDAO");
DocSpeedDAO[] DocSpeedDAOs = (DocSpeedDAO[])request.getAttribute("DocSpeedDAO");
String codeTypeStr = (String)request.getAttribute("codeType");
System.out.println("Str "+codeTypeStr);
int codeType=1;
if (codeTypeStr!=null) {
codeType=Integer.parseInt(codeTypeStr);
}
String[] codeName=new String[6];
codeName[0] = "本別資料";
codeName[1] = "類別資料";
codeName[2] = "文別資料";
codeName[3] = "性質資料";
codeName[4] = "密等資料";
codeName[5] = "速別資料";
//定義定種代碼表的表名和字段名稱
// end
// HTML // begin [file="/DMS/system/DocCode.jsp";from=(34,3);to=(142,0)]
out.write("\r\n<Script\tlanguage=\"JavaScript\">\r\n<!--\r\n\r\nfunction CheckCode()\r\n{\r\n if(document.all.item(\"codeID\")==null)\r\n len=-1;\r\n else\r\n {\r\n if\t(document.all.item(\"codeID\").length==null)\r\n\tlen=0;\r\n else\r\n {\r\n len=document.all.item(\"codeID\").length;\r\n }\r\n }\r\n if (len==-1)\r\n {\r\n alert(\"當前沒有可刪除的資料!\");\r\n return false\r\n }\r\n\r\n if (len==0)\r\n {\r\n if (form1.codeID.checked)\r\n\t sign=1;\r\n else\r\n\t sign=0;\r\n }\r\n else\r\n {\r\n for(i=0;i<len;i++)\r\n\t if (form1.codeID[i].checked)\r\n\t {\r\n\t sign=1;\r\n\t break;\r\n\t }\r\n\t else\r\n\t sign=0;\r\n }\r\n\r\n if (sign==0)\r\n {\r\n alert(\"請選擇其中一條記錄!\");\r\n return false;\r\n }\r\n\tform1.act.value=\"del\";\r\n return window.confirm(\"真的要刪除嗎?\");\r\n}\r\n\r\n// -->\r\n</Script>\r\n<SCRIPT\tID=clientEventHandlersJS LANGUAGE=javascript>\r\n<!--\r\n\r\nfunction window_onload() {\r\n\t//如果有傳入提示信息,在頁面顯示時顯示出來\r\n}\r\n\r\nfunction h1_onclick(codeID,codeNo,codeName,speedDays) {\r\n//這是單擊代碼名稱時發生的事件,傳入代碼的代號\r\n//可以以這個代號找出相應的名稱和限辦日期\r\n codeType=form1.txtcodeType.value;\r\n var strFeatures = \"dialogWidth=300px;dialogHeight=260px;center=yes;help=no;resizeable=yes\";\r\n url1=\"../DMS/system/CodeInfoEdit.jsp?codeID=\"+codeID+\"&codeNo=\"+codeNo+\"&codeName=\"+codeName;\r\n url1=url1+\"&codeType=\"+codeType+\"&speedDays=\"+speedDays+\"&status=mod\";\r\n retVal=window.showModalDialog(url1,\"\",strFeatures);\r\n if (retVal==\"\")\r\n return false\r\n \t\tReturnValueNum=retVal.split(\"&\");\r\n\t\tfor(i=0;i<ReturnValueNum.length;i++)\r\n\t\t{\r\n\t\t\tReturnValueNumObj=ReturnValueNum[i].split(\"=\");\r\n\t\t\tobj=eval(\"form1.\"+ReturnValueNumObj[0]);\r\n\t\t\tobj.value=ReturnValueNumObj[1];\r\n\t\t}\r\n\t\tform1.act.value=\"mod\";\r\n\t\tform1.action=\"../DMS/system/CodeInfoAction.jsp?act=mod&codeType=\"+codeType+\"&codeID=\"+codeID;\r\n\t form1.submit();\r\n return false;\r\n}\r\n\r\nfunction Add_onclick() {\r\n\t//這是單擊新增按鈕時發生的事件\r\n codeType=form1.txtcodeType.value;\r\n var strFeatures = \"dialogWidth=300px;dialogHeight=260px;center=yes;help=no\";\r\n url=\"../DMS/system/CodeInfoEdit.jsp?codeType=\"+codeType+\"&status=add\";\r\n retVal=window.showModalDialog(url,\"\",strFeatures);\r\n if (retVal==\"\")\r\n return false\r\n window.location.href=\"../DMS/system/CodeInfoAction.jsp?act=add&codeType=\"+codeType+\"&\"+retVal\r\n \t\tReturnValueNum=retVal.split(\"&\");\r\n\t\tfor(i=0;i<ReturnValueNum.length;i++)\r\n\t\t{\r\n\t\t\tReturnValueNumObj=ReturnValueNum[i].split(\"=\");\r\n\t\t\tobj=eval(\"form1.\"+ReturnValueNumObj[0]);\r\n\t\t\tobj.value=ReturnValueNumObj[1];\r\n\t\t}\r\n\t\tform1.act.value=\"add\";\r\n\t\tform1.action=\"../DMS/system/CodeInfoAction.jsp\";\r\n\t form1.submit();\r\n return false;\r\n}\r\n\r\n//-->\r\n</SCRIPT>\r\n</head>\r\n");
// end
// begin [file="/DMS/system/DocCode.jsp";from=(142,2);to=(143,0)]
// end
// HTML // begin [file="/DMS/system/DocCode.jsp";from=(143,2);to=(154,4)]
out.write("\r\n<body LANGUAGE=javascript onload=\"return window_onload()\">\r\n<form name=\"form1\" method=\"POST\" action=\"../DMS/system/CodeInfoAction.jsp\">\r\n <table width=\"100%\" >\r\n <tr> \r\n <td class=\"title\" width=\"2%\"><img src=\"../images/who.gif\"></td>\r\n <td class=\"title\" width=\"88%\"> 代碼維護 </td>\r\n <td class=\"title\" width=\"10%\"> </td>\r\n </tr>\r\n </table>\r\n <p align=\"center\">\r\n ");
// end
// begin [file="/DMS/system/DocCode.jsp";from=(154,6);to=(174,0)]
int totalNum=0;
if (codeType==1)
totalNum=DocCopyDAOs.length;
if (codeType==2)
totalNum=DocKindDAOs.length;
if (codeType==3)
totalNum=DocTypeDAOs.length;
if (codeType==4)
totalNum=DocAttributeDAOs.length;
if (codeType==5)
totalNum=DocSecretDAOs.length;
if (codeType==6)
totalNum=DocSpeedDAOs.length;
String isDisable="";
boolean isHave=false;
if (totalNum==0){
isDisable="disabled";
isHave=true;
}
// end
// HTML // begin [file="/DMS/system/DocCode.jsp";from=(174,2);to=(177,65)]
out.write("\r\n \r\n <input class=\"button\" type=\"button\" name=\"cmdadd\" value=\"新增\" onClick=\"return Add_onclick();\">\r\n <input class=\"button\" type=\"submit\" name=\"cmddel\" value=\"刪除\" ");
// end
// begin [file="/DMS/system/DocCode.jsp";from=(177,68);to=(177,77)]
out.print(isDisable);
// end
// HTML // begin [file="/DMS/system/DocCode.jsp";from=(177,79);to=(187,51)]
out.write(" onClick=\"return CheckCode();\">\r\n <span id=spINI style=\"Display:none\"> \r\n <input type=\"submit\" name=\"button1\" value=\"首頁\" disabled>\r\n <input type=\"submit\" name=\"button2\" value=\"上頁\" disabled>\r\n <input type=\"submit\" name=\"button3\" value=\"下頁\" disabled>\r\n <input type=\"submit\" name=\"button4\" value=\"尾頁\" disabled>\r\n </span> </p>\r\n<input type=hidden ID=errMsg value=\"\">\r\n <table width=\"94%\">\r\n <tr>\r\n <td class=\"td_bg\"> 共有<span class=\"font_page\">");
// end
// begin [file="/DMS/system/DocCode.jsp";from=(187,54);to=(187,62)]
out.print(totalNum);
// end
// HTML // begin [file="/DMS/system/DocCode.jsp";from=(187,64);to=(190,0)]
out.write("</span>筆資料 </td>\r\n <td class=\"td_bg\" > 作業狀態:\r\n\t<select\tsize=\"1\" name=\"codeType\" onChange=\"location.href='../servlet/DocCodeServlet?codeType='+this.options[this.selectedIndex].value;\">\r\n");
// end
// begin [file="/DMS/system/DocCode.jsp";from=(190,2);to=(197,0)]
String mSelected="";
for (int i=0;i<codeName.length;i++){
if (i == codeType-1)
mSelected = "selected";
else
mSelected = "";
// end
// HTML // begin [file="/DMS/system/DocCode.jsp";from=(197,2);to=(198,18)]
out.write("\r\n\t <option value=\"");
// end
// begin [file="/DMS/system/DocCode.jsp";from=(198,21);to=(198,24)]
out.print(i+1);
// end
// HTML // begin [file="/DMS/system/DocCode.jsp";from=(198,26);to=(198,28)]
out.write("\" ");
// end
// begin [file="/DMS/system/DocCode.jsp";from=(198,31);to=(198,40)]
out.print(mSelected);
// end
// HTML // begin [file="/DMS/system/DocCode.jsp";from=(198,42);to=(198,43)]
out.write(">");
// end
// begin [file="/DMS/system/DocCode.jsp";from=(198,46);to=(198,57)]
out.print(codeName[i]);
// end
// HTML // begin [file="/DMS/system/DocCode.jsp";from=(198,59);to=(199,0)]
out.write("</option>\r\n");
// end
// begin [file="/DMS/system/DocCode.jsp";from=(199,2);to=(201,0)]
}
// end
// HTML // begin [file="/DMS/system/DocCode.jsp";from=(201,2);to=(211,6)]
out.write("\r\n\t</select>\r\n </td>\r\n </tr>\r\n </table>\r\n <table width=\"94%\" align=\"center\" cellspacing=\"0\" cellpadding=\"0\" border=\"1\"\t>\r\n <tr>\r\n <th>選項</th>\r\n <th>代號</th>\r\n <th>名稱</th>\r\n ");
// end
// begin [file="/DMS/system/DocCode.jsp";from=(211,8);to=(211,26)]
if (codeType==6){
// end
// HTML // begin [file="/DMS/system/DocCode.jsp";from=(211,28);to=(213,6)]
out.write("\r\n <th>限辦天數</th>\r\n ");
// end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -