175 lines
6.4 KiB
Plaintext
175 lines
6.4 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_project_no = r_call(request.getParameter("c_project_no"));
|
|
int col_no = 12;
|
|
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()) {
|
|
|
|
|
|
%>
|
|
<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 project management
|
|
</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;"> 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=left style="line-height:120%;height:40px">
|
|
<b>* Survey project management</b>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<table width="100%" cellSpacing="1" cellPadding="0" border="0" bgcolor=cdcdcd>
|
|
<tr bgcolor=ededed style="font-weight:bold;">
|
|
<td height=30 width="40" align=center>No</td>
|
|
<td align=center>Survey name</td>
|
|
<td width="160" align=center>Use Survey</td>
|
|
<td width="80" align=center>Item View</td>
|
|
<td width="60" align=center>Survey Target</td>
|
|
<td width="60" align=center>View Information</td>
|
|
<td width="60" align=center>Apply/End</td>
|
|
<td width="80" align=center>Results management</td>
|
|
<td width="40" align=center>Edit</td>
|
|
<td width="40" align=center>Del</td>
|
|
</tr>
|
|
<%
|
|
|
|
|
|
String sql1=" SELECT a.* ";
|
|
sql1 = sql1 + " ,(select c_name from tbl_survey where c_no = a.c_survey_no) as survey_name ";
|
|
sql1 = sql1 + " from tbl_survey_project a where a.c_home = " + c_home + " and a.c_maker = 0 and a.c_project_no = "+ c_project_no +" and a.c_use=0 order by a.c_no desc";
|
|
ResultSet rst = stmt.executeQuery(sql1);
|
|
int i_no = 0;
|
|
while (rst.next()) {
|
|
i_no = i_no + 1;
|
|
%>
|
|
<tr bgcolor=ffffff onMouseover="this.bgColor='#FFF669'" onMouseout="this.bgColor='#FFFFFF'">
|
|
<td height="30px" align=center bgcolor=ffffff>
|
|
<%=i_no%>
|
|
</td>
|
|
<td align=left style="font-weight:bold;padding-left:10px">
|
|
<%=rst.getString("c_name")%>
|
|
</td>
|
|
<td align=center>
|
|
<%=rst.getString("survey_name")%>
|
|
</td>
|
|
<td align=center>
|
|
<a href="../view.jsp?c_home=<%=c_home%>&c_survey_no=<%=rst.getString("c_survey_no")%>" target="_blank">[View Poll]</a>
|
|
</td>
|
|
<td align=center>
|
|
<a href="target/list.jsp?c_home=<%=c_home%>&c_project_no=<%=c_project_no%>&c_no=<%=rst.getInt("c_no")%>">[Target management]</a>
|
|
</td>
|
|
<td align=center>
|
|
<a href="content.jsp?c_no=<%=rst.getString("c_no")%>" target="_blank">[View]</a>
|
|
</td>
|
|
<td align=center>
|
|
<%if(rst.getInt("c_now") ==0){%>
|
|
<a href="#none" onclick="if(confirm('If you change to Proceed, all settings cannot be changed.\nAre you sure you want to change?')){location.href='change.jsp?c_home=<%=c_home%>&c_project_no=<%=c_project_no%>&c_no=<%=rst.getInt("c_no")%>&c_now=1'}"><b>Waiting</a>
|
|
<%}%>
|
|
<%if(rst.getInt("c_now") ==1){%>
|
|
<a href="#none" onclick="if(confirm('If you change it to quit, it is irreversible.\nAre you sure you want to change it?')){location.href='change.jsp?c_home=<%=c_home%>&c_project_no=<%=c_project_no%>&c_no=<%=rst.getInt("c_no")%>&c_now=2'}"><font color=red><b>Proceeding
|
|
<%}%>
|
|
<%if(rst.getInt("c_now") ==2){%>
|
|
<font color=blue><b>End
|
|
<%}%>
|
|
|
|
</td>
|
|
<td align=center>
|
|
<%if(rst.getInt("c_now") >0){%>
|
|
<a href="result/list.jsp?c_home=<%=c_home%>&c_project_no=<%=c_project_no%>&c_no=<%=rst.getInt("c_no")%>">[Results management]</a>
|
|
<%}%>
|
|
</td>
|
|
<td align=center>
|
|
<%if(rst.getInt("c_now") ==0){%>
|
|
<a href="edit.jsp?c_home=<%=c_home%>&c_no=<%=rst.getInt("c_no")%>&c_project_no=<%=c_project_no%>">[Edit]</a>
|
|
<%}%>
|
|
</td>
|
|
<td align=center>
|
|
<%if(rst.getInt("c_now") ==0){%>
|
|
<a href="#none" onclick="if(confirm('If you delete it, all related information will be deleted.\nAre you sure you want to delete it?')){location.href='delete.jsp?c_home=<%=c_home%>&c_project_no=<%=c_project_no%>&c_no=<%=rst.getInt("c_no")%>'}">[Del]</a>
|
|
<%}%>
|
|
</td>
|
|
<td align=center>
|
|
|
|
</tr>
|
|
|
|
<!------------------project----------------------------------->
|
|
|
|
<%
|
|
}
|
|
if(i_no == 0){
|
|
%>
|
|
<tr bgcolor=ffffff>
|
|
<td colspan="<%=col_no%>" height="60" align="center">There is no data.</td>
|
|
</tr>
|
|
<% }
|
|
rst.close();
|
|
%>
|
|
</table>
|
|
<!---------------------------------------------------------------------------------------->
|
|
<table width="100%" cellSpacing="0" cellPadding="0" border="0">
|
|
<tr>
|
|
<td height="40" align="right" style="font-weight:bold;"">
|
|
<a href="insert.jsp?c_home=<%=c_home%>&c_project_no=<%=c_project_no%>" style="width: 150px; line-height: 24px; text-align: center;display: inline-block; background: #5e7cc4; border: 1px solid #ededed; border-radius: 5px; color: #ffffff;">New survey project registration</a>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<%@include file="/field_manager/include/manager_bottom.jsp"%>
|