c-innovacion2/resoft/field_manager/process/survey/view.jsp

128 lines
3.5 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_survey_no = r_call(request.getParameter("c_survey_no"));
int col_no = 9;
%>
<center>
<table width="800" cellSpacing="0" cellPadding="0" border="0">
<tr >
<td style="padding-top:30px">
<table width="100%" cellSpacing="0" cellPadding="0" border="0" bgcolor=ffffff>
<tr >
<td style="font-size:15px">
<%
int change_ok = 0;
String sql_sr = "select * from tbl_survey where c_home = " +c_home + " and c_no = " + c_survey_no;
ResultSet rs_sr = stmt.executeQuery(sql_sr);
if(rs_sr.next()){
%>
<b><%=rs_sr.getString("c_name")%></b>
<%
}
rs_sr.close();
%>
</td>
</tr>
</table>
<table width="100%" cellSpacing="0" cellPadding="0" border="0" >
<%
sql_sr=" SELECT * from tbl_survey_problem where c_survey_no = " + c_survey_no + " and c_up_no = 0 and c_use=0 order by c_order asc";
rs_sr = stmt.executeQuery(sql_sr);
while (rs_sr.next()) {
%>
<tr >
<td height="40px" >
</td>
</tr>
<tr >
<td bgcolor="#efefef" height="40px" align=left style="font-weight:bold;padding-left:10px;font-size:15px;">
<%=rs_sr.getString("c_title")%>
</td>
</tr>
<%
String sql_sr2=" SELECT * from tbl_survey_problem where c_survey_no = " + c_survey_no + " and c_up_no = "+ rs_sr.getInt("c_no") +" and c_use=0 order by c_order asc";
ResultSet rs_sr2 = stmt.executeQuery(sql_sr2);
while (rs_sr2.next()) {
%>
<tr >
<td align=left style="font-weight:bold;padding-left:20px;height:30px;padding-top:20px;font-size:13px;" >
<%=rs_sr2.getString("c_title")%>
</td>
</tr>
<%
if(rs_sr2.getInt("c_type") < 2){
%>
<tr >
<td align=left style="font-weight:bold;padding-left:40px;padding-top:10px;">
<%
String sql_sr3=" SELECT * from tbl_survey_answer where c_survey_no = " + c_survey_no + " and c_problem_no = "+ rs_sr2.getInt("c_no") +" and c_use=0 order by c_order asc";
ResultSet rs_sr3 = stmt.executeQuery(sql_sr3);
while (rs_sr3.next()) {
String input_type = "chekcbox";
if(rs_sr2.getInt("c_type") == 1){
input_type = "checkbox";
}else{
input_type = "radio";
}%>
<nobr>
<input name="ip_<%=rs_sr2.getInt("c_no")%>" type="<%=input_type%>">
<%=rs_sr3.getString("c_title")%>
<%if(rs_sr3.getInt("c_type") == 1){%>
<input name="" >
<%}%>
&nbsp;&nbsp;&nbsp;&nbsp;
</nobr>
<%
}
rs_sr3.close();
%>
</td>
</tr>
<%
}
%>
<%
if(rs_sr2.getInt("c_type") == 2){
%>
<tr >
<td align=left style="font-weight:bold;padding-left:40px;height:30px;padding-top:10px;">
<input name="" style="width:100%;height:24px">
</td>
</tr>
<%
}
%>
<%
if(rs_sr2.getInt("c_type") == 3){
%>
<tr >
<td align=left style="font-weight:bold;padding-left:40px;height:30px;padding-top:10px;">
<textarea name="" style="width:100%;height:100px"></textarea>
</td>
</tr>
<%
}
%>
<%
}
rs_sr2.close();
%>
<%
}
rs_sr.close();
%>
</table>
<!---------------------------------------------------------------------------------------->
<br><br><br>
</td>
</tr>
</table>
<%@include file="/field_manager/include/manager_bottom.jsp"%>