elc_create_process.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:3k
源码类别:
电子政务应用
开发平台:
Java
- <%@ page import="java.util.*" %>
- <%@ page import="java.sql.*" %>
- <%@ page import="com.vnex.intranet.pub.BaseJdbcDAO" %>
- <%@ page import="com.vnex.intranet.util.*" %>
- <%@ page import="com.vnex.intranet.system.loader.ConfigParaLoader"%>
- <jsp:useBean id="myUpload" scope="page" class="com.vnex.intranet.upload.SmartUpload" />
- <jsp:useBean id="ab" scope="request" class="com.vnex.intranet.archives.value.WritValueBean" />
- <jsp:useBean id="elcProcess" scope="application" class="com.vnex.intranet.archives.process.ElcProcess" />
- <%
- //##upload begin
- String root = ConfigParaLoader.getParameter("rootUrl");
- String seperator = SubPathGenerater.getSeperator();
- String attachURL =seperator+ConfigParaLoader.getParameter("archiveAttachmentUrl")+seperator;
- // Initialization
- myUpload.initialize( pageContext );
- myUpload.setTotalMaxFileSize( Integer.parseInt(ConfigParaLoader.getParameter("attachmentSize")) );
- // SubPathGenerater
- attachURL += SubPathGenerater.getSubPath( root + SubPathGenerater.getSeperator() + attachURL);
- // Upload
- myUpload.upload();
- myUpload.save( root + attachURL );
- //##upload end
- com.vnex.intranet.upload.Request multi = myUpload.getRequest();
- if(multi.getParameter("topName")!=null && !multi.getParameter("topName").equals(""))
- {
- ab.setTopName(multi.getParameter("topName"));
- }
- if(multi.getParameter("docName")!=null && !multi.getParameter("docName").equals(""))
- {
- ab.setDocName(multi.getParameter("docName"));
- }
- if(multi.getParameter("title")!=null && !multi.getParameter("title").equals(""))
- {
- ab.setTitle(multi.getParameter("title"));
- }
- if(multi.getParameter("buildDate")!=null && !multi.getParameter("buildDate").equals(""))
- {
- ab.setBuildDate(Integer.parseInt(multi.getParameter("buildDate")));
- }
- ab.setDep(multi.getParameter("dep"));
- ab.setFileBef(multi.getParameter("fileBef"));
- ab.setSaveDate(Integer.parseInt(multi.getParameter("saveDate")));
- ab.setSecret(Integer.parseInt(multi.getParameter("secret")));
- if(multi.getParameter("fileNum")!=null && !multi.getParameter("fileNum").equals(""))
- {
- ab.setFileNum(Integer.parseInt(multi.getParameter("fileNum")));
- }
- ab.setWordKey(multi.getParameter("wordKey"));
- ab.setBuildYear(Integer.parseInt(multi.getParameter("buildYear")));
- ab.setShelf(multi.getParameter("shelf"));
- ab.setRemark(multi.getParameter("remark"));
- com.vnex.intranet.upload.File myFile = myUpload.getFiles().getFile(0);
- if (!myFile.isMissing())
- {
- String url = attachURL +SubPathGenerater.getSeperator()+ myFile.getFileName();
- ab.setAttachment(url);
- }
- int archiveId = elcProcess.insertWritRow(ab);
- %>
- <html>
- <head>
- <script language=javascript>
- function forward()
- {
- document.location="/mainctrl/elcIndex"
- }
- </script>
- </head>
- <body onload="javascript:forward()">
- </body>
- </html>