147 lines
5.4 KiB
Plaintext
147 lines
5.4 KiB
Plaintext
<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
|
|
<%@include file="/field_manager/include/manager_head.jsp"%>
|
|
<script src="/ckeditor/ckeditor.js"></script>
|
|
|
|
<%
|
|
String c_no = r_call(request.getParameter("c_no"));
|
|
String c_home = r_call(request.getParameter("c_home"));
|
|
String c_project_no = r_call(request.getParameter("c_project_no"));
|
|
if(c_project_no.equals("")){
|
|
%>
|
|
<script>
|
|
alert("Wrong Connection.")
|
|
location.href="/"
|
|
</script>
|
|
<%
|
|
}else{
|
|
|
|
|
|
String sql_up = " SELECT c.*, a.c_name as u_name, b.c_name as f_name ";
|
|
sql_up = sql_up + " , (select c_now_propose from tbl_project_plan where c_relation = 0 and c_project_no = c.c_no) as c_now_propose " ;
|
|
sql_up = sql_up + " from tbl_project c ";
|
|
sql_up = sql_up + " inner join tbl_project a on a.c_no = c.c_up_no ";
|
|
sql_up = sql_up + " inner join tbl_field b on b.c_no = a.c_field ";
|
|
sql_up = sql_up + " where c.c_no = " + c_project_no;
|
|
|
|
ResultSet rs_up = stmt.executeQuery(sql_up);
|
|
if (rs_up.next()) {
|
|
|
|
|
|
%>
|
|
<script>
|
|
function go(){
|
|
if(document.bcb.c_name.value == ""){
|
|
alert("Survey Name.");
|
|
document.bcb.c_name.focus();
|
|
}else{
|
|
|
|
document.bcb.action = "edit_ok.jsp";
|
|
document.bcb.target = "exec";
|
|
document.bcb.method = "post";
|
|
document.bcb.submit();
|
|
}
|
|
}
|
|
</script>
|
|
<center>
|
|
<table width="800" 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;">
|
|
Modify survey project
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table width="50%" border="0" cellspacing="1" cellpadding="0" bgcolor=dddddd >
|
|
<tr height="40" bgcolor=ffffff>
|
|
<td colspan=2 width="25%" align=center style="font-weight:bold;"> Main Field</td>
|
|
<td width="75%" style="padding:5px">
|
|
<b><%=rs_up.getString("f_name")%>
|
|
</td>
|
|
</tr>
|
|
<tr height="40" bgcolor=ffffff>
|
|
<td colspan=2 align=center style="font-weight:bold;"> Category</td>
|
|
<td style="padding:5px">
|
|
<b><%=rs_up.getString("u_name")%>
|
|
</td>
|
|
</tr>
|
|
<tr height="40" height=30 bgcolor=ffffff>
|
|
<td colspan=2 align=center style="font-weight:bold;"> Project Name </td>
|
|
<td style="padding:5px">
|
|
<font color=red><b><%=rs_up.getString("c_name")%></b></font>
|
|
</tr>
|
|
|
|
</table>
|
|
<%
|
|
|
|
}
|
|
rs_up.close();
|
|
}
|
|
%>
|
|
<!---------------------------------------------------------------------------------------->
|
|
<table width="100%" cellSpacing="0" cellPadding="0" border="0" bgcolor=ffffff>
|
|
<tr >
|
|
<td align=right style="line-height:120%">
|
|
<font color=red>
|
|
* Please be sure to enter the items marked with the mark *.
|
|
</font>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<%
|
|
String sql12=" SELECT * from tbl_survey_project where c_home = " + c_home + " and c_maker = 0 and c_use=0 and c_now=0 and c_no = "+ c_no +" ";
|
|
ResultSet rst2 = stmt.executeQuery(sql12);
|
|
while (rst2.next()){%>
|
|
<table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor=eeeeee >
|
|
<form name="bcb" method="post" >
|
|
<input name="c_home" value="<%=c_home%>" type="hidden">
|
|
<input name="c_project_no" value="<%=c_project_no%>" type="hidden">
|
|
<input name="c_no" value="<%=c_no%>" type="hidden">
|
|
<tr height=30 bgcolor=ffffff>
|
|
<td width="15%" align=center style="font-weight:bold;"> <font color=red>*</font>Survey project name</td>
|
|
<td width="85%" style="padding:5px"> <input type="text" name="c_name" value="<%=rst2.getString("c_name")%>" id="" style="width:300px" maxlength="50"/> </td>
|
|
</tr>
|
|
<tr height=30 bgcolor=ffffff>
|
|
<td width="15%" align=center style="font-weight:bold;"> <font color=red>*</font>Use Survey</td>
|
|
<td width="85%" style="padding:5px">
|
|
<select name="c_survey_no" style="height:22px">
|
|
<%
|
|
String sql1=" SELECT * from tbl_survey where c_home = " + c_home + " and c_maker = 0 and c_use=0 order by c_no desc";
|
|
ResultSet rst = stmt.executeQuery(sql1);
|
|
while (rst.next()){%>
|
|
<option value="<%=rst.getInt("c_no")%>" <%if(rst2.getInt("c_survey_no") == rst.getInt("c_no")){%>selected<%}%>><%=rst.getString("c_name")%></option>
|
|
<%}
|
|
rst.close();
|
|
%>
|
|
|
|
</select> * If there is no use questionnaire, please manage the indicators first.
|
|
</td>
|
|
</tr>
|
|
<tr height=30 bgcolor=ffffff>
|
|
<td width="15%" align=center style="font-weight:bold;"> <font color=red>*</font>Contents of Survey Guide</td>
|
|
<td width="85%" style="padding:5px">
|
|
<textarea name="c_content" class="ckeditor" style="width:100%;height:600px"><%=rst2.getString("c_content")%></textarea>
|
|
</td>
|
|
</tr>
|
|
</form>
|
|
</table>
|
|
<%}
|
|
rst2.close();
|
|
%>
|
|
<!---------------------------------------------------------------------------------------->
|
|
<table width="100%">
|
|
<tr>
|
|
<td height="35" align="center" colspan="5" style="padding-bottom:10px;padding-top:10px;font-weight:bold;">
|
|
<a href="#none" onclick="go()" style="width: 50px; line-height: 26px; text-align: center;display: inline-block; background: #5e7cc4; border: 1px solid #555; border-radius: 5px; color: #ffffff;">Edit</a>
|
|
<a href="list.jsp?c_home=<%=c_home%>&c_project_no=<%=c_project_no%>" style="width: 50px; line-height: 26px; text-align: center;display: inline-block; background: #ededed; border: 1px solid #555; border-radius: 5px; color: #000000;">Cancel</a>
|
|
</td>
|
|
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<iframe name="exec" width=0 height=0 src=""></iframe>
|
|
<%@include file="/field_manager/include/manager_bottom.jsp"%>
|