flow_getfile.jsp
上传用户:jhtang88
上传日期:2014-01-27
资源大小:28528k
文件大小:2k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html;charset=gb2312"%><%@page import="cn.js.fan.util.*"%><%@page import="cn.js.fan.web.Global"%><%@page import="com.redmoon.oa.*"%><%@page import="com.redmoon.oa.flow.*"%><%@page import="java.util.*"%><%@page import="java.io.*"%><%@page import="java.net.*"%><jsp:useBean id="fchar" scope="page" class="cn.js.fan.util.StrUtil"/><jsp:useBean id="fsecurity" scope="page" class="cn.js.fan.security.SecurityUtil"/><jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/><%
  2. String priv = request.getParameter("priv");
  3. if (priv==null)
  4. priv = "read";
  5. if (!privilege.isUserPrivValid(request, priv))
  6. {
  7. //response.setContentType("text/html;charset=gb2312"); 
  8. out.print("<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>");
  9. out.println(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  10. return;
  11. }
  12. int flowId = ParamUtil.getInt(request, "flowId");
  13. int attId = ParamUtil.getInt(request, "attachId");
  14. WorkflowDb wf = new WorkflowDb();
  15. wf = wf.getWorkflowDb(flowId);
  16. Document doc = new Document();
  17. doc = doc.getDocument(wf.getDocId());
  18. Attachment att = doc.getAttachment(1, attId);
  19. // response.setContentType(MIMEMap.get(StrUtil.getFileExt(att.getDiskName())));
  20. // 婵炶揪绲介悘婵嬵敇瑜版帒绠e