275 lines
8.3 KiB
Plaintext
275 lines
8.3 KiB
Plaintext
<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
|
|
<%@include file="/include/include.jsp"%>
|
|
<%
|
|
login_tag = 1;
|
|
%>
|
|
<%@include file="/include/head.jsp"%>
|
|
<%@include file="/cms_for_bcb/show_top.jsp"%>
|
|
<style type="text/css">
|
|
|
|
@media (max-width: 800px) {
|
|
|
|
.td11 { display: none; }
|
|
|
|
}
|
|
|
|
</style>
|
|
<%
|
|
String c_survey_no = r_call(request.getParameter("c_survey_no"));
|
|
String c_survey_project_no = r_call(request.getParameter("c_survey_project_no"));
|
|
%>
|
|
<script>
|
|
function go(){
|
|
|
|
document.bcb.method = "post"
|
|
document.bcb.target = "exec"
|
|
document.bcb.action = "insert_ok.jsp?show_no=<%=show_no%>&check_no=<%=check_no%>&c_relation=<%=c_relation%>&c_relation2=<%=c_relation2%>"
|
|
document.bcb.submit()
|
|
|
|
}
|
|
</script>
|
|
<select id="language_select" onchange="setLanguage(this.value)">
|
|
<option value="en" <%= (request.getLocale().toString().equals("en") ? "selected" : "") %>>English</option>
|
|
<option value="es_PE" <%= (request.getLocale().toString().equals("es_PE") ? "selected" : "") %>>Spanish (Peru)</option>
|
|
</select>
|
|
</p>
|
|
|
|
|
|
<form name="bcb" >
|
|
<input name="c_home" value="<%=c_home%>" type="hidden">
|
|
<input name="c_maker" value="0" type="hidden">
|
|
<input name="c_survey_no" value="<%=c_survey_no%>" type="hidden">
|
|
<input name="c_survey_project_no" value="<%=c_survey_project_no%>" type="hidden">
|
|
|
|
<table width="100%" cellSpacing="0" cellPadding="0" border="0" bgcolor=ffffff>
|
|
<tr >
|
|
<td style="font-size:15px;line-height:150%">
|
|
<%
|
|
String c_content = "";
|
|
String sql_sr4 = "select * ";
|
|
sql_sr4 = sql_sr4 + " ,(select c_name from tbl_survey where c_no = " + c_survey_no + " ) as c_survey_name ";
|
|
sql_sr4 = sql_sr4 + " , (select c_now from tbl_survey_target where c_survey_project_no = " + c_survey_project_no + " and c_member_no = "+ session.getAttribute("member_no") +" and c_use = 0) as c_member_now ";
|
|
sql_sr4 = sql_sr4 + " , (select c_no from tbl_survey_target where c_survey_project_no = " + c_survey_project_no + " and c_member_no = "+ session.getAttribute("member_no") +" and c_use = 0) as c_target_no ";
|
|
sql_sr4 = sql_sr4 + " from tbl_survey_project ";
|
|
sql_sr4 = sql_sr4 + " where c_home = " +c_home + " and c_no = " + c_survey_project_no + " and c_survey_no = " + c_survey_no + " and c_use = 0 ";;
|
|
ResultSet rs_sr4 = stmt.executeQuery(sql_sr4);
|
|
if(rs_sr4.next()){
|
|
if(rs_sr4.getString("c_member_now") == null){
|
|
%>
|
|
<script>
|
|
alert("Not eligible to participate.")
|
|
history.back()
|
|
</script>
|
|
<%
|
|
}else{
|
|
if(rs_sr4.getInt("c_member_now") == 1){
|
|
%>
|
|
<script>
|
|
alert("Ya has participado.")
|
|
history.back()
|
|
</script>
|
|
<%
|
|
}else{
|
|
|
|
c_content = rs_sr4.getString("c_content");
|
|
%>
|
|
<span id="a3">Survey project :</span> <%=rs_sr4.getString("c_name") %><br/>
|
|
|
|
<span id="a4">Kind of Survey :</span> <%=rs_sr4.getString("c_survey_name") %>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td height=30px>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td height=1px bgcolor=#cdcdcd>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="padding:20px">
|
|
<%=c_content%>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td height=1px bgcolor=#cdcdcd>
|
|
</td>
|
|
</tr>
|
|
|
|
</table>
|
|
<input name="c_target_no" value="<%=rs_sr4.getInt("c_target_no")%>" type="hidden">
|
|
<input name="c_project_no" value="<%=rs_sr4.getInt("c_project_no")%>" type="hidden">
|
|
<table width="100%" cellSpacing="0" cellPadding="0" border="0" >
|
|
<%
|
|
String 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";
|
|
ResultSet 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="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="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="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";
|
|
%>
|
|
<div style="float:left;">
|
|
<nobr>
|
|
<input name="p_<%=rs_sr2.getInt("c_no")%>_<%=rs_sr3.getInt("c_no")%>" type="<%=input_type%>" value="1">
|
|
<%=rs_sr3.getString("c_title")%>
|
|
<%if(rs_sr3.getInt("c_type") == 1){%>
|
|
<input name="t_<%=rs_sr2.getInt("c_no")%>_<%=rs_sr3.getInt("c_no")%>" >
|
|
<%}%>
|
|
|
|
</nobr>
|
|
</div>
|
|
<%
|
|
}else{
|
|
input_type = "radio";
|
|
%>
|
|
<div style="float:left;">
|
|
<nobr>
|
|
<input name="p_<%=rs_sr2.getInt("c_no")%>" type="<%=input_type%>" value="<%=rs_sr3.getInt("c_no")%>">
|
|
<%=rs_sr3.getString("c_title")%>
|
|
<%if(rs_sr3.getInt("c_type") == 1){%>
|
|
<input name="t_<%=rs_sr2.getInt("c_no")%>_<%=rs_sr3.getInt("c_no")%>" >
|
|
<%}%>
|
|
|
|
</nobr>
|
|
</div>
|
|
<%
|
|
}
|
|
}
|
|
rs_sr3.close();
|
|
%>
|
|
</td>
|
|
</tr>
|
|
|
|
<%
|
|
}
|
|
%>
|
|
<%
|
|
if(rs_sr2.getInt("c_type") == 2){
|
|
%>
|
|
<tr >
|
|
<td align=left style="padding-left:40px;height:30px;padding-top:10px;">
|
|
<input name="p_<%=rs_sr2.getInt("c_no")%>" style="width:100%;height:24px">
|
|
</td>
|
|
</tr>
|
|
<%
|
|
}
|
|
%>
|
|
<%
|
|
if(rs_sr2.getInt("c_type") == 3){
|
|
%>
|
|
<tr >
|
|
<td align=left style="padding-left:40px;height:30px;padding-top:10px;">
|
|
<textarea name="p_<%=rs_sr2.getInt("c_no")%>" style="width:100%;height:100px"></textarea>
|
|
</td>
|
|
</tr>
|
|
<%
|
|
}
|
|
%>
|
|
<%
|
|
}
|
|
rs_sr2.close();
|
|
%>
|
|
|
|
<%
|
|
}
|
|
rs_sr.close();
|
|
%>
|
|
|
|
</table>
|
|
<table width="100%">
|
|
<tr>
|
|
<td height="75" align="center" colspan="5" style="padding-bottom:10px;padding-top:10px;font-weight:bold;">
|
|
<a href="#none" onclick="go()" style="width: 100px; line-height: 26px; text-align: center;display: inline-block; background: #5e7cc4; border: 1px solid #555; border-radius: 5px; color: #ffffff;"><span id="a1">Participate</span></a>
|
|
<a href="list.jsp?show_no=<%=show_no%>&check_no=<%=check_no%>&c_relation=<%=c_relation%>&c_relation2=<%=c_relation2%>" style="width: 100px; line-height: 26px; text-align: center;display: inline-block; background: #ededed; border: 1px solid #555; border-radius: 5px; color: #000000;"><span id="a2">List</span></a>
|
|
</td>
|
|
|
|
</tr>
|
|
</table>
|
|
|
|
</form>
|
|
<iframe name="exec" id="exec" src="" width=0 height=0></iframe>
|
|
|
|
<%
|
|
}
|
|
}
|
|
}else{
|
|
%>
|
|
<script>
|
|
alert("Conexión incorrecta.")
|
|
location.href="/"
|
|
</script>
|
|
<%
|
|
}
|
|
rs_sr4.close();
|
|
%>
|
|
<script>
|
|
// 다국어 처리를 위한 i18n 객체
|
|
var i18n = {
|
|
en: {
|
|
a1: "Participate",
|
|
a2: "list",
|
|
a3: "Survey project :",
|
|
a4: "Kind of Survey :"
|
|
},
|
|
es_PE: {
|
|
a1: "Participar",
|
|
a2: "lista",
|
|
a3: "Proyecto de encuesta :",
|
|
a4: "Tipo de encuesta:"
|
|
|
|
}
|
|
};
|
|
|
|
// 선택된 언어에 따라 다국어 텍스트 설정
|
|
function setLanguage(lang) {
|
|
var langData = i18n[lang];
|
|
document.getElementById("a1").innerText = langData.a1;
|
|
document.getElementById("a2").innerText = langData.a2;
|
|
document.getElementById("a3").innerText = langData.a3;
|
|
document.getElementById("a4").innerText = langData.a4;
|
|
|
|
|
|
|
|
}
|
|
</script>
|
|
|
|
<script>
|
|
setLanguage('<%= request.getLocale().toString() %>');
|
|
</script>
|
|
|
|
|
|
<%@include file="/cms_for_bcb/show_bottom.jsp"%>
|
|
<%@include file="/include/bottom.jsp"%>
|
|
<%@include file="/include/include_b.jsp"%>
|