125 lines
3.6 KiB
Plaintext
125 lines
3.6 KiB
Plaintext
<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
|
|
<%@include file="/field_manager/include/manager_head.jsp"%>
|
|
<%
|
|
String c_home = r_call(request.getParameter("c_home"));
|
|
String c_ji_no = r_call(request.getParameter("c_ji_no"));
|
|
int col_no = 9;
|
|
%>
|
|
<center>
|
|
<table width="1000" cellSpacing="0" cellPadding="0" border="0">
|
|
<tr >
|
|
<td >
|
|
<table width="100%" cellSpacing="0" cellPadding="0" border="0" bgcolor=ffffff>
|
|
<tr >
|
|
<td height="60" style="font-weight:bold;">
|
|
Survey Item
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<!---------------------------------------------------------------------------------------->
|
|
<table width="100%" cellSpacing="0" cellPadding="0" border="0" bgcolor=ffffff>
|
|
<tr >
|
|
<td height=30>
|
|
<%
|
|
int change_ok = 0;
|
|
String sql_ji = "select * from tbl_point_ji where c_home = " +c_home + " and c_no = " + c_ji_no;
|
|
ResultSet rs_ji = stmt.executeQuery(sql_ji);
|
|
if(rs_ji.next()){
|
|
change_ok = rs_ji.getInt("c_change");
|
|
%>
|
|
Survey : <b><%=rs_ji.getString("c_name")%></b>
|
|
<%
|
|
}
|
|
rs_ji.close();
|
|
%>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
|
|
<table width="100%" cellSpacing="1" cellPadding="0" border="0" bgcolor=cdcdcd>
|
|
<tr bgcolor=ededed style="font-weight:bold;">
|
|
<td height=30 align=center colspan=2>Item</td>
|
|
<td align=center>Note</td>
|
|
<td width="80" align=center>points</td>
|
|
</tr>
|
|
<%
|
|
int total_point = 0;
|
|
int o_no = 0;
|
|
int o_order = 0;
|
|
int o_no2 = 0;
|
|
int o_order2 = 0;
|
|
|
|
String sql1=" SELECT a.*,(select count(c_no) from tbl_point_ji_detail where c_up_no = a.c_no and c_use=0 ) as down_no from tbl_point_ji_detail a where a.c_ji_no = " + c_ji_no + " and a.c_up_no = 0 and a.c_use=0 order by a.c_order asc";
|
|
ResultSet rst = stmt.executeQuery(sql1);
|
|
int i_no = 0;
|
|
while (rst.next()) {
|
|
i_no = i_no + 1;
|
|
%>
|
|
<tr bgcolor=ffffff >
|
|
<td width=150 align=center rowspan="<%=rst.getInt("down_no")%>">
|
|
<b><%=rst.getString("c_title")%>
|
|
</td>
|
|
<%
|
|
|
|
o_no2 = 0;
|
|
o_order2 = 0;
|
|
|
|
String sql12=" SELECT * from tbl_point_ji_detail where c_ji_no = " + c_ji_no + " and c_up_no = "+ rst.getInt("c_no") +" and c_use=0 order by c_order asc";
|
|
ResultSet rst2 = stmt.executeQuery(sql12);
|
|
int i_no2 = 0;
|
|
while (rst2.next()) {
|
|
total_point = total_point + rst2.getInt("c_point");
|
|
i_no2 = i_no2 + 1;
|
|
%>
|
|
<%if(i_no2 > 1){%>
|
|
<tr bgcolor=ffffff >
|
|
<%}%>
|
|
|
|
<td height="30px" width=150 align=center style="font-weight:bold;padding-left:10px">
|
|
<%=rst2.getString("c_title")%>
|
|
</td>
|
|
<td align=left style="padding:5px;line-height:130%">
|
|
<%=rst2.getString("c_exp").replaceAll("\r","<br />").replaceAll("\n\r","<br />")%>
|
|
</td>
|
|
<td align=center>
|
|
<select style="height:22px">
|
|
<%for(int pp=0;pp < rst2.getInt("c_point") + 1;pp++){%>
|
|
<option><%=pp%></option>
|
|
<%}%>
|
|
</select>
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<% o_no2 = rst2.getInt("c_no");
|
|
o_order2 = rst2.getInt("c_order");
|
|
}
|
|
rst2.close();
|
|
%>
|
|
|
|
<%
|
|
}
|
|
if(i_no == 0){
|
|
%>
|
|
<tr bgcolor=ffffff>
|
|
<td colspan="<%=col_no%>" height="60" align="center">There is no data.</td>
|
|
</tr>
|
|
<% }
|
|
rst.close();
|
|
%>
|
|
<tr bgcolor=ffffff><td height=30 colspan=3 align=center style="padding-right:10px">
|
|
<b>Total score
|
|
</td>
|
|
<td align=center bgcolor="efefef">
|
|
<b><%=total_point%>
|
|
</td>
|
|
|
|
</table>
|
|
<!---------------------------------------------------------------------------------------->
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<%@include file="/field_manager/include/manager_bottom.jsp"%>
|