HomePage.jsp
8.95 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
<%@ page import="weaver.general.Util" %>
<%@ page import="weaver.conn.*" %>
<%@ page import="java.util.*,java.sql.Timestamp" %>
<%@ include file="/systeminfo/init_wev8.jsp" %>
<%@ include file="/docs/common.jsp" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page"/>
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page"/>
<jsp:useBean id="ResourceComInfo" class="weaver.hrm.resource.ResourceComInfo" scope="page"/>
<jsp:useBean id="WorkTypeComInfo" class="weaver.workflow.workflow.WorkTypeComInfo" scope="page"/>
<jsp:useBean id="WorkflowComInfo" class="weaver.workflow.workflow.WorkflowComInfo" scope="page"/>
<jsp:useBean id="DocNewsManager" class="weaver.docs.news.DocNewsManager" scope="page" />
<jsp:useBean id="DocNewsComInfo" class="weaver.docs.news.DocNewsComInfo" scope="page" />
<jsp:useBean id="DocManager" class="weaver.docs.docs.DocManager" scope="page" />
<HTML><HEAD>
<LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
<script language="JavaScript">
<!--
function change(obj) {
if(obj.selectedIndex == 0) { return false; }
urlhtml=obj.options[obj.selectedIndex].value;
window.location=urlhtml;
obj.selectedIndex=0;
return true;
}
//-->
</script>
</head>
<%
String resourceid = ""+user.getUID();
int userid=user.getUID();
boolean islight=true;
String userseclevel=user.getSeclevel();
String username=Util.toScreen(ResourceComInfo.getResourcename(userid+""),user.getLanguage());
String logintype = ""+user.getLogintype();
String seclevel = user.getSeclevel() ;
String usertype = ""+user.getType() ;
String imagefilename = "/images/hdDOC_wev8.gif";
String titlename = SystemEnv.getHtmlLabelName(1500,user.getLanguage())+"- <a href='/hrm/resource/HrmResource.jsp?id="+userid+"'>"+username+"</a>";
String needfav ="1";
String needhelp ="";
char flag = Util.getSeparator();
int count=0;
String sql="";
String sql1="";
if(!logintype.equals("2")) usertype="1" ;
%>
<body>
<%@ include file="/systeminfo/TopTitle_wev8.jsp" %>
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
<%
RCMenu += "{"+SystemEnv.getHtmlLabelName(6062,user.getLanguage())+",/system/homepage/DesignHomePage.jsp,_self} " ;
RCMenuHeight += RCMenuHeightStep ;
%>
<%@ include file="/systeminfo/RightClickMenu_wev8.jsp" %>
<form name=frmmain method=post action="HomePage.jsp">
<table width=100% height=100% border="0" cellspacing="0" cellpadding="0">
<colgroup>
<col width="10">
<col width="">
<col width="10">
<tr>
<td height="10" colspan="3"></td>
</tr>
<tr>
<td ></td>
<td valign="top">
<TABLE class=Shadow>
<tr>
<td valign="top">
<!--table>
<tr>
<%if (!software.equals("ALL")){%>
<td width="30" align=center nowrap>
<a href = "/docs/news/NewsDsp.jsp?id=1"><%=SystemEnv.getHtmlLabelName(316,user.getLanguage())%></a>
</td>
<%}%>
<td width="90" align=center nowrap>
<a href = "/workplan/data/WorkPlan.jsp?resourceid=<%=resourceid%>"><%=SystemEnv.getHtmlLabelName(15010,user.getLanguage())%></a>
</td>
<td nowrap>
<%
Calendar newsnow = Calendar.getInstance();
String today=Util.add0(newsnow.get(Calendar.YEAR), 4) +"-"+
Util.add0(newsnow.get(Calendar.MONTH) + 1, 2) +"-"+
Util.add0(newsnow.get(Calendar.DAY_OF_MONTH), 2) ;
int year=newsnow.get(Calendar.YEAR);
int month=newsnow.get(Calendar.MONTH);
int day=newsnow.get(Calendar.DAY_OF_MONTH);
//newsnow.clear();
newsnow.add(Calendar.DATE, -1);
String yesterday=Util.add0(newsnow.get(Calendar.YEAR), 4) +"-"+
Util.add0(newsnow.get(Calendar.MONTH) + 1, 2) +"-"+
Util.add0(newsnow.get(Calendar.DAY_OF_MONTH), 2) ;
int doccount = 0;
int doccountMy = 0;
int doccountNoRead = 0;
String whereclause = "";
if(!logintype.equals("2")) {
whereclause=" where t1.id=t2.sourceid t1.docstatus in('1','2','5') ";
}
else {
whereclause=" where t1.id=t2.sourceid and t1.docstatus in('1','2','5') ";
}
sql = "select count( t1.id) from DocDetail t1, "+tables+" t2 " ;
sql += whereclause ;
RecordSet.executeSql(sql);
if(RecordSet.next())
doccount=RecordSet.getInt(1);
if(!logintype.equals("2")) {
whereclause=" where doccreaterid="+userid+" and usertype=1 and docstatus in('1','2','5') ";
}
else {
whereclause=" where doccreaterid="+userid+" and usertype=9 and docstatus in('1','2','5') ";
}
sql1 = "select count(distinct id) from DocDetail " ;
sql1 += whereclause ;
//out.print(sql);
RecordSet.executeSql(sql1);
if(RecordSet.next())
doccountMy=RecordSet.getInt(1);
if(!logintype.equals("2")) {
whereclause=" where t1.id=t2.sourceid and t1.docstatus in('1','2','5') and ( t1.doccreaterid != "+userid+" or t1.usertype !='1') and NOT EXISTS (select 1 from docReadTag where userid="+userid+" and usertype=1 AND docid=T1.ID)";
}
else {
whereclause=" where t1.id=t2.sourceid and t1.docstatus in('1','2','5') and ( t1.doccreaterid != "+userid+" or t1.usertype !='2') and NOT EXISTS (select 1 from docReadTag where userid="+userid+" and usertype=2 AND docid=T1.ID)";
}
sql = "select count(distinct t1.id) from DocDetail t1, "+tables+" t2 " + whereclause ;
//out.print(sql);
RecordSet.executeSql(sql);
if(RecordSet.next())
doccountNoRead=RecordSet.getInt(1);
%>
<%=SystemEnv.getHtmlLabelName(15011,user.getLanguage())%> <IMG src="/images_face/ecologyFace_1/new_wev8.gif" align="middle">: <%=SystemEnv.getHtmlLabelName(15012,user.getLanguage())%><a href="/docs/search/DocSearchTemp.jsp?list=all">(<%=doccount%>)</a><%=SystemEnv.getHtmlLabelName(15013,user.getLanguage())%>,
<%=SystemEnv.getHtmlLabelName(15014,user.getLanguage())%><a href="/docs/search/DocSearchTemp.jsp?list=all&doccreaterid=<%=userid%>&usertype=<%=usertype%>">(<%=doccountMy%>)</a><%=SystemEnv.getHtmlLabelName(15015,user.getLanguage())%>, <%=SystemEnv.getHtmlLabelName(15016,user.getLanguage())%><a href="/docs/search/DocSearchTemp.jsp?list=all&isNew=yes&loginType=<%=logintype%>">(<%=doccountNoRead%>)</a><%=SystemEnv.getHtmlLabelName(15015,user.getLanguage())%>
</td>
</tr>
</table-->
<table class=ViewForm>
<col width=32%><col width=2><col width=32%><col width=2><col width=32%>
<tr><td colspan = 5 height = 10></td></tr>
<tr>
<td valign=top>
<%
sql = "select * from PersonalHomePageDesign where hrmid = " + userid;
RecordSet.executeSql(sql);
if (!RecordSet.next()) RecordSet.executeProc("PersonalHPDesign_Duplicate",""+userid);
sql = "select * from HomePageDesign t1,PersonalHomePageDesign t2 where t2.homepageid = t1.id and t2.hrmid = " + userid + " and t2.ischecked = 0 order by t2.orderid";
RecordSet.executeSql(sql);
int iframeheight = 0 ;
ArrayList iframe =new ArrayList();
ArrayList height =new ArrayList();
ArrayList url =new ArrayList();
while (RecordSet.next())
{
if( !( ((software.equals("HRM") || software.equals("KM")) && (RecordSet.getInt("name")==6059 || RecordSet.getInt("name")==1211 || RecordSet.getInt("name")==6060 || RecordSet.getInt("name")==6061)) ) ){
iframe.add(RecordSet.getString("iframe"));
height.add(RecordSet.getString("height"));
url.add(RecordSet.getString("url"));
}
}
for(int i=0;i<iframe.size();i+=3){
%>
<table width="100%" border = 1 class=ViewForm>
<tr>
<td width="100%">
<IFRAME
name="<%=iframe.get(i)%>" src="<%=url.get(i)%>" width="100%"
height="<%=height.get(i)%>" scrolling="<%if (Util.getIntValue((String)height.get(i),0)>30) {%>YES<%} else {%>NO<%}%>" FRAMEBORDER=no>
<%=SystemEnv.getHtmlLabelName(15017,user.getLanguage())%></IFRAME>
</td>
</tr>
</table><BR>
<%
}
%>
</td>
<td> </td>
<td valign=top>
<%
for(int i=1;i<iframe.size();i+=3){
%>
<table width="100%" border = 1 class=ViewForm>
<tr>
<td width="100%">
<IFRAME
name="<%=iframe.get(i)%>" src="<%=url.get(i)%>" width="100%"
height="<%=height.get(i)%>" scrolling="<%if (Util.getIntValue((String)height.get(i),0)>30) {%>YES<%} else {%>NO<%}%>" FRAMEBORDER=no>
<%=SystemEnv.getHtmlLabelName(15017,user.getLanguage())%></IFRAME>
</td>
</tr>
</table><BR>
<%
}
%>
</td>
<td> </td>
<td valign=top>
<%
for(int i=2;i<iframe.size();i+=3){
%>
<table width="100%" border = 1 class=ViewForm>
<tr>
<td width="100%">
<IFRAME
name="<%=iframe.get(i)%>" src="<%=url.get(i)%>" width="100%"
height="<%=height.get(i)%>" scrolling="<%if (Util.getIntValue((String)height.get(i),0)>30) {%>YES<%} else {%>NO<%}%>" FRAMEBORDER=no>
<%=SystemEnv.getHtmlLabelName(15017,user.getLanguage())%></IFRAME>
</td>
</tr>
</table><BR>
<%
}
%>
</td>
</tr>
</table>
</td>
</tr>
</TABLE>
</td>
<td></td>
</tr>
<tr>
<td height="10" colspan="3"></td>
</tr>
</table>
</form>
</body>
</html>