VotingPollResultAll.jsp
6.55 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
<%@ page import="weaver.general.Util" %>
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="rs1" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="ResourceComInfo" class="weaver.hrm.resource.ResourceComInfo" scope="page"/>
<jsp:useBean id="DocComInfo" class="weaver.docs.docs.DocComInfo" scope="page"/>
<%@ include file="/systeminfo/init_wev8.jsp" %>
<HTML><HEAD>
<LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
<SCRIPT language="javascript" src="../../js/weaver_wev8.js"></script>
</head>
<%
String imagefilename = "/images/hdDOC_wev8.gif";
String titlename = Util.toScreen(SystemEnv.getHtmlLabelName(17599,user.getLanguage())+":"+SystemEnv.getHtmlLabelName(84096,user.getLanguage()),user.getLanguage(),"0");
String needfav ="1";
String needhelp ="";
boolean islight=true ;
String userid=user.getUID()+"";
String votingid=Util.fromScreen(request.getParameter("votingid"),user.getLanguage());
RecordSet.executeProc("Voting_SelectByID",votingid);
RecordSet.next();
String subject=RecordSet.getString("subject");
String detail=RecordSet.getString("detail");
String createrid=RecordSet.getString("createrid");
String createdate=RecordSet.getString("createdate");
String createtime=RecordSet.getString("createtime");
String begindate=RecordSet.getString("begindate");
String begintime=RecordSet.getString("begintime");
String enddate=RecordSet.getString("enddate");
String endtime=RecordSet.getString("endtime");
String isanony=RecordSet.getString("isanony");
String docid=RecordSet.getString("docid");
String crmid=RecordSet.getString("crmid");
String projectid=RecordSet.getString("projid");
String requestid=RecordSet.getString("requestid");
int votingcount = RecordSet.getInt("votingcount");
String status = RecordSet.getString("status");
%>
<BODY>
<%@ include file="/systeminfo/TopTitle_wev8.jsp" %>
<DIV class=HdrProps></DIV>
<form name=frmmain action="VotingPollOperation.jsp" method=post>
<input type=hidden name=method value="polledit">
<input type=hidden name=votingid value="<%=votingid%>">
<div>
<BUTTON class=BtnReset accessKey=B onclick="location.href='VotingPollResult.jsp?votingid=<%=votingid%>'"><U>B</U>-<%=SystemEnv.getHtmlLabelName(1290,user.getLanguage())%></BUTTON>
</div>
<table class=form>
<col width=15%><col width=35%><col width=15%><col width=35%>
<TR class=Section>
<TH colSpan=4><%=SystemEnv.getHtmlLabelName(1361,user.getLanguage())%></TH></TR>
<TR class=separator>
<TD class=Sep1 colSpan=4></TD></TR>
<tr>
<td><%=SystemEnv.getHtmlLabelName(24096,user.getLanguage())%></td>
<td class=field>
<%=Util.toScreen(subject,user.getLanguage())%>
</td>
<td><%=SystemEnv.getHtmlLabelName(882,user.getLanguage())%></td>
<td class=field><%=Util.toScreen(ResourceComInfo.getResourcename(createrid),user.getLanguage())%>
</td>
</tr>
<tr>
<td><%=SystemEnv.getHtmlLabelName(857,user.getLanguage())%></td>
<td class=field>
<a href="/docs/docs/DocDsp.jsp?id=<%=docid%>" target="_blank"><%=Util.toScreen(DocComInfo.getDocname(docid),user.getLanguage())%></a>
</td>
<td><%=SystemEnv.getHtmlLabelName(32375,user.getLanguage())%></td>
<td>
<input type=checkbox name="useranony" value="1" <%if(isanony.equals("1")){%> checked <%}%>disabled >
</td>
</tr>
<tr>
<td valign=top><%=SystemEnv.getHtmlLabelName(16284,user.getLanguage())%></td>
<td class=field colspan=3>
<%=Util.toScreen(detail,user.getLanguage())%>
</td>
</tr>
</table>
<br>
<table class=ListShort>
<col width=25%><col width=55%><col width=10%><col width=10%>
<TR class=Section>
<TH colSpan=4><%=SystemEnv.getHtmlLabelName(18606,user.getLanguage())%>(<%=SystemEnv.getHtmlLabelName(83698,user.getLanguage())%> <%=votingcount%> <%=SystemEnv.getHtmlLabelNames("18608",user.getLanguage())%>)</TH>
<th><a href="votingpollremark.jsp?votingid=<%=votingid%>" target="_blank"><%=SystemEnv.getHtmlLabelName(18613,user.getLanguage())%></a></th>
</TR>
<TR class=separator>
<TD class=Sep1 colSpan=4></TD></TR>
<%
RecordSet.executeProc("VotingQuestion_SelectByVoting",votingid);
while(RecordSet.next()){
String questionid=RecordSet.getString("id");
String q_subject=RecordSet.getString("subject");
String q_description=RecordSet.getString("description");
String q_ismulti=RecordSet.getString("ismulti");
String q_isother=RecordSet.getString("isother");
int q_count = RecordSet.getInt("questioncount");
%>
<tr class=datalight>
<td colspan=4><b><%=q_subject%></b><%if(!q_description.equals("")){%>(<%=q_description%>)<%}%></td>
</tr>
<%
rs.executeProc("VotingOption_SelectByQuestion",questionid);
int count=1 ;
while(rs.next()){
String optionid=rs.getString("id");
String o_desc=rs.getString("description");
int o_count = rs.getInt("optioncount");
float percent=0;
percent = (float)((o_count*1000)/votingcount)/10 ;
String classgraph = "";
if((count%4)==1) classgraph = "redgraph";
if((count%4)==2) classgraph = "bluegraph";
if((count%4)==3) classgraph = "greengraph";
if((count%4)==0) classgraph = "yellowgraph";
%>
<tr class=datadark>
<td>
<%=count%>.<%=o_desc%>
</td>
<td>
<%if(percent>0){%>
<TABLE height="100%" cellSpacing=0 width="100%"><TBODY>
<TR>
<TD class=<%=classgraph%> <%if(percent<=1){%>width="1%"<%}else{%>width="<%=percent%>%" <%}%>> </TD>
<TD> </TD>
</TR>
</TBODY></TABLE>
<%} else {%>
<%}%>
</td>
<td><%=percent%>%</td>
<td><%=o_count%><%=SystemEnv.getHtmlLabelName(18607,user.getLanguage())%></td>
</tr>
<tr class=datalight>
<td colspan=4> <img border=0 src="/images/ArrowRightBlue_wev8.gif"></img><%=SystemEnv.getHtmlLabelName(18610,user.getLanguage())%>:
<%
String sql="select distinct t1.resourceid,t2.useranony "+
"from votingresource t1,votingremark t2 where "+
"t1.optionid="+optionid+" and t1.votingid=t2.votingid and t1.resourceid=t2.resourceid";
rs1.executeSql(sql);
while(rs1.next()){
String tmpuserid = rs1.getString("resourceid");
String tmpanony = rs1.getString("useranony");
%>
<%if(tmpanony.equals("1")){%><%=SystemEnv.getHtmlLabelName(84096,user.getLanguage())%>,<%}%>
<%if(tmpanony.equals("0")){%><%=ResourceComInfo.getResourcename(tmpuserid)%>,<%}%>
<%
}
%>
</td>
</tr>
<%
count++;
}
}
%>
</table>
</form>
</body>
</html>