WorkflowLayoutEdit0.jsp
4.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<%--
~ Copyright (c) 2006, Weaver software. All Rights Reserved.
--%>
<%@ page import="weaver.general.Util"%>
<%@ page import="weaver.workflow.layout.*" %>
<%@ page import="weaver.workflow.workflow.WorkflowComInfo" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" %> <%@ include file="/systeminfo/init_wev8.jsp" %>
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page" />
<%
if(!HrmUserVarify.checkUserRight("WorkflowManage:All", user)) {
response.sendRedirect("/notice/noright.jsp");
return;
}
if("false".equals(isIE)){
response.sendRedirect("/wui/common/page/sysRemind.jsp?labelid=16459");
return;
}
String currWf = Util.null2String(request.getParameter("wfid"));
%>
<html>
<head>
<title><%=SystemEnv.getHtmlLabelName(16352,user.getLanguage())%></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<form name="form1" method="post" >
<%if("true".equals(isIE)){ %>
<iframe id ="wfdesign" src="/workflow/design/wfdesign.jsp?wfId=<%=currWf%>&type=view" style="width:100%;height:100%;"></iframe>
<%}else{
Workflow wf;
if (currWf != null && !currWf.equals("")) {
wf = DownloadWFLayoutServlet.readWFLayout(Util.getIntValue(currWf,0), user.getLanguage(), false);
wf.checkAndAutosetLayout(10, 10, 20, 50);
} else {
wf = new Workflow();
}
String wfnameq = Util.null2String(request.getParameter("wfnameq"));
String serverstr=request.getScheme()+"://"+request.getHeader("Host");
String sql = "select * from workflow_base where isvalid='1' and workflowname like '%"+wfnameq+"%' order by workflowname"; //xwj td1800 on 2005-04-27
//System.out.println("sql = " + sql);
rs.executeSql(sql);
//WorkflowComInfo wfci = new WorkflowComInfo();
//wfci.setTofirstRow();
//int wfnum = wfci.getWorkflowNum();
int top = 0;
int left = 0;
int listwidth = 150;
int appletwidth = wf.getMaxPos().x+10>800?wf.getMaxPos().x+10:800;
int appletheight = wf.getMaxPos().y+10>592?wf.getMaxPos().y+10:592;
String viewName = "";
while (rs.next()) {
viewName = DownloadWFLayoutServlet.ch2China(rs.getString("workflowname"), user.getLanguage(), true);
if(viewName != null){
//System.out.println("viewName = "+viewName+" \tviewNameLength = " + viewName.getBytes().length);
if(viewName.getBytes().length*420/60>listwidth){
listwidth = viewName.getBytes().length*420/60;
}
}
}
//System.out.println("listwidth = " + listwidth);
rs.beforFirst();
listwidth +=30;
%>
<div style="position:absolute;width:<%=appletwidth%>;height:<%=appletheight%>">
<!--
<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width=<%=appletwidth%> height=<%=appletheight%> codebase="<%=serverstr%>/resource/j2re-1_3_1_04-windows-i586.exe">
<param name = code value = weaver.workflow.layout.WorkflowEditor.class >
<param name = codebase value = /classbean >
<param name="type" value="application/x-java-applet;jpi-version=1.3.1">
<param name="scriptable" value="false">
<param name="MAYSCRIPT" value="true">
<param name = "downloadUrl" value="<%=serverstr%>/weaver/weaver.workflow.layout.DownloadWFLayoutServlet"/>
<param name = "uploadUrl" value ="<%=serverstr%>/weaver/weaver.workflow.layout.DownloadWFLayoutServlet"/>
<param name = "id" value="<%=(currWf==null?"":currWf)%>">
<param name = actionRedirectToLogin value = "redirect"/>
</object>
-->
<object type="application/x-java-applet;version=1.5"
width=<%=appletwidth%> height=<%=appletheight%> name="myApplet"
codebase="<%=serverstr%>/resource/j2re-1_3_1_04-windows-i586.exe">
<param name="type" value="application/x-java-applet;jpi-version=1.3.1">
<param name="code" value="weaver.workflow.layout.WorkflowEditor.class">
<param name="codebase" value="/classbean/">
<param name="archive" value="myapplet.jar">
<param name="scriptable" value="false">
<param name="MAYSCRIPT" value="true">
<param name = "downloadUrl" value="<%=serverstr%>/weaver/weaver.workflow.layout.DownloadWFLayoutServlet"/>
<param name = "uploadUrl" value ="<%=serverstr%>/weaver/weaver.workflow.layout.DownloadWFLayoutServlet"/>
<param name = "id" value="<%=(currWf==null?"":currWf)%>">
<param name = actionRedirectToLogin value = "redirect"/>
</object>
</div>
<%} %>
</form>
<%
String loginfile = Util.getCookie(request , "loginfileweaver");
%>
<form name="redirect" method="post" action="/Refresh.jsp?loginfile=<%=loginfile%>&message=19">
</form>
</body>
</html>