282 lines
12 KiB
Plaintext
282 lines
12 KiB
Plaintext
<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
|
|
<%@include file="/field_manager/include/manager_head.jsp"%>
|
|
<%
|
|
String c_field = "" + session.getAttribute("manager_field_no");
|
|
String c_now = r_call(request.getParameter("c_now"));
|
|
String where_text = " ";
|
|
if(!c_field.equals("")){
|
|
where_text = where_text + " and c_field = " + c_field + " ";
|
|
}
|
|
if(!c_now.equals("")){
|
|
where_text = where_text + " and c_now = " + c_now + " ";
|
|
}
|
|
int col_no = 11;
|
|
%>
|
|
<center>
|
|
<table width="1200" 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;">
|
|
Category & Project Management
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<!---------------------------------------------------------------------------------------->
|
|
<script>
|
|
function s_search(){
|
|
document.s_bcb.action="list.jsp";
|
|
document.s_bcb.method="post";
|
|
document.s_bcb.submit();
|
|
}
|
|
</script>
|
|
<table width="100%" cellSpacing="0" cellPadding="0" border="0" bgcolor=ffffff>
|
|
<form name="s_bcb" action="list.jsp" method="post" target="_self">
|
|
<tr >
|
|
<td align=left valign=bottom style="line-height:120%;padding-bottom:5px">
|
|
<b>Main Field</b>
|
|
<select name="c_field" style="height:24px" onchange="s_search()" disabled>
|
|
<option value="" <%if(c_field.equals("")){%>selected<%}%>>View all</option>
|
|
<%
|
|
String sql12=" SELECT c_no, c_name from tbl_field where c_relation = 0 and c_use = 0 order by c_name asc";
|
|
ResultSet rst2 = stmt.executeQuery(sql12);
|
|
while (rst2.next()) {
|
|
%>
|
|
<option value="<%=rst2.getString("c_no")%>" <%if(c_field.equals(rst2.getString("c_no"))){%>selected<%}%>><%=rst2.getString("c_name")%></option>
|
|
<% }
|
|
rst2.close();
|
|
%>
|
|
</select>
|
|
<b>Category status</b>
|
|
<select name="c_now" style="height:24px" onchange="s_search()">
|
|
<option value="" <%if(c_now.equals("")){%>selected<%}%>>View all</option>
|
|
<option value="0" <%if(c_now.equals("0")){%>selected<%}%>>View pending categories only</option>
|
|
<option value="1" <%if(c_now.equals("1")){%>selected<%}%>>View only categories in progress</option>
|
|
<option value="2" <%if(c_now.equals("2")){%>selected<%}%>>View only categories that have been closed</option>
|
|
</select>
|
|
</td>
|
|
<td align=right valign=bottom style="line-height:120%;padding-bottom:3px">
|
|
<font color=red>
|
|
* <b>Click on the current status to change it sequentially.<br>
|
|
* <b>Click the arrows to change the order.<br>
|
|
* <b>If the Category status is <font color=000000>End</font>, subproject registration is not possible</b>.<br>
|
|
* <b>If the Category status is Progress or <font color=000000>End</font>, modification or deletion is not possible</b><br>
|
|
* When category is deleted, sub-project is deleted together Please note the deletion.
|
|
</font>
|
|
</td>
|
|
</tr>
|
|
</form>
|
|
</table>
|
|
<table width="100%" cellSpacing="1" cellPadding="0" border="0" bgcolor=cdcdcd>
|
|
<tr bgcolor=ededed style="font-weight:bold;">
|
|
<td width="140" align=center>Field Name</td>
|
|
<td align=center>Category & Project Name</td>
|
|
<td width="40" align=center>Apply</td>
|
|
<td width="40" align=center>Survey</td>
|
|
<td width="40" align=center>Evaluation</td>
|
|
<td width="40" align=center>BMC</td>
|
|
<td width="40" align=center>Education</td>
|
|
<td width="40" align=center>Order</td>
|
|
<td width="60" align=center>Operation</td>
|
|
<td width="60" align=center>Program</td>
|
|
<td width="40" align=center>Status</td>
|
|
<td width="80" align=center>Date</td>
|
|
<td width="40" align=center>Edit</td>
|
|
<td width="40" align=center>Del</td>
|
|
</tr>
|
|
<%
|
|
int old_field = 0;
|
|
int o_no = 0;
|
|
int o_order = 0;
|
|
int o_s_no = 0;
|
|
int o_s_order = 0;
|
|
|
|
String sql1=" SELECT a.*, b.c_name as f_name from tbl_project a inner join tbl_field b on b.c_no = a.c_field and b.c_relation = 0 and b.c_use = 0 where a.c_relation = 0 and a.c_use = 0 and c_type = 0 " + where_text + " order by b.c_name asc, a.c_order asc, 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="24px" align=center bgcolor=ffffff>
|
|
<% if(old_field != rst.getInt("c_field")){%>
|
|
<b><%=rst.getString("f_name")%>
|
|
<%}%>
|
|
</td>
|
|
<td align=left style="font-weight:bold;padding-left:10px">
|
|
[ <%=rst.getString("c_name")%> ]
|
|
</td>
|
|
<td align=center>
|
|
</td>
|
|
<td align=center>
|
|
</td>
|
|
<td align=center>
|
|
</td>
|
|
<td align=center>
|
|
</td>
|
|
<td align=center>
|
|
</td>
|
|
<td align=center>
|
|
<% if(old_field == rst.getInt("c_field")){%>
|
|
<a href="change_order.jsp?c_no=<%=rst.getInt("c_no")%>&c_order=<%=rst.getInt("c_order")%>&o_no=<%=o_no%>&o_order=<%=o_order%>&c_field=<%=c_field%>"><font color="orange">▲</font></a>
|
|
<%}else{
|
|
old_field = rst.getInt("c_field");
|
|
%>
|
|
|
|
<%}%>
|
|
</td>
|
|
<td align=center>
|
|
</td>
|
|
<td align=center style="font-weight:bold;">
|
|
<%if(rst.getInt("c_now") < 2){%>
|
|
<a href="project/insert.jsp?c_up_no=<%=rst.getInt("c_no")%>&c_field=<%=c_field%>">[Insert]</a>
|
|
<%}%>
|
|
</td>
|
|
|
|
<td align=center style="font-weight:bold;">
|
|
<%if(rst.getInt("c_now") == 0){%>
|
|
<a href="change_now.jsp?c_no=<%=rst.getInt("c_no")%>&c_field=<%=c_field%>&c_now=1"><font color=blue>Waiting</font></a>
|
|
<%}%>
|
|
<%if(rst.getInt("c_now") == 1){%>
|
|
<a href="change_now.jsp?c_no=<%=rst.getInt("c_no")%>&c_field=<%=c_field%>&c_now=2"><font color=red>Progress</font></a>
|
|
<%}%>
|
|
<%if(rst.getInt("c_now") == 2){%>
|
|
<a href="change_now.jsp?c_no=<%=rst.getInt("c_no")%>&c_field=<%=c_field%>&c_now=0">End</a>
|
|
<%}%>
|
|
</td>
|
|
<td align=center><%=rst.getString("c_date").substring(0,10)%></td>
|
|
<td align=center style="font-weight:bold;">
|
|
<%if(rst.getInt("c_now") == 0){%>
|
|
<a href="edit.jsp?c_no=<%=rst.getInt("c_no")%>&c_field=<%=c_field%>">[Edit]</a>
|
|
<%}%>
|
|
</td>
|
|
<td align=center style="font-weight:bold;">
|
|
<%if(rst.getInt("c_now") == 0){%>
|
|
<a href="#none" onclick="if(confirm('If deleted, the subproject is also deleted and cannot be reversed.\nAre you sure you want to delete it?')){location.href='delete.jsp?c_no=<%=rst.getInt("c_no")%>&c_field=<%=c_field%>'}">[Del]</a>
|
|
<%}%>
|
|
</td>
|
|
</tr>
|
|
<!------------------project----------------------------------->
|
|
<%
|
|
o_s_no = 0;
|
|
o_s_order = 0;
|
|
String sql_sub = " SELECT a.*, b.c_name as f_name ";
|
|
sql_sub = sql_sub + " ,(select c_no from tbl_project_operation where c_project_no = a.c_no and c_manager_no = "+ session.getAttribute("manager_no") +" and c_use = 0 ) as c_op ";
|
|
sql_sub = sql_sub + " from tbl_project a ";
|
|
sql_sub = sql_sub + " inner join tbl_field b on b.c_no = a.c_field and b.c_relation = 0 and b.c_use = 0 ";
|
|
sql_sub = sql_sub + " where a.c_relation = 0 and a.c_use = 0 and c_type = 1 and c_up_no = "+ rst.getInt("c_no") +" ";
|
|
sql_sub = sql_sub + " order by a.c_order asc, a.c_no desc";
|
|
ResultSet rs_sub = stmt.executeQuery(sql_sub);
|
|
while (rs_sub.next()) {
|
|
%>
|
|
<tr bgcolor=efefef onMouseover="this.bgColor='#B9C1FF'" onMouseout="this.bgColor='#efefef'">
|
|
<td height="24px" align=center bgcolor=ffffff><!--<%=rst.getString("f_name")%>--></td>
|
|
<td align=left style="font-weight:bold;padding-left:50px">
|
|
└ <%=rs_sub.getString("c_name")%>
|
|
</td>
|
|
<td align=center>
|
|
<%if(rs_sub.getInt("c_propose") == 0){%>
|
|
<a href="project/change_management.jsp?c_management=c_propose&c_value=1&c_no=<%=rs_sub.getInt("c_no")%>&c_field=<%=c_field%>"><font color=blue><b>O</b></font></a>
|
|
<%}else{%>
|
|
<a href="project/change_management.jsp?c_management=c_propose&c_value=0&c_no=<%=rs_sub.getInt("c_no")%>&c_field=<%=c_field%>"><b>X</b></a>
|
|
<%}%>
|
|
</td>
|
|
<td align=center>
|
|
<%if(rs_sub.getInt("c_survey") == 0){%>
|
|
<a href="project/change_management.jsp?c_management=c_survey&c_value=1&c_no=<%=rs_sub.getInt("c_no")%>&c_field=<%=c_field%>"><font color=blue><b>O</b></font></a>
|
|
<%}else{%>
|
|
<a href="project/change_management.jsp?c_management=c_survey&c_value=0&c_no=<%=rs_sub.getInt("c_no")%>&c_field=<%=c_field%>"><b>X</b></a>
|
|
<%}%>
|
|
</td>
|
|
<td align=center>
|
|
<%if(rs_sub.getInt("c_point") == 0){%>
|
|
<a href="project/change_management.jsp?c_management=c_point&c_value=1&c_no=<%=rs_sub.getInt("c_no")%>&c_field=<%=c_field%>"><font color=blue><b>O</b></font></a>
|
|
<%}else{%>
|
|
<a href="project/change_management.jsp?c_management=c_point&c_value=0&c_no=<%=rs_sub.getInt("c_no")%>&c_field=<%=c_field%>"><b>X</b></a>
|
|
<%}%>
|
|
</td>
|
|
<td align=center>
|
|
<%if(rs_sub.getInt("c_bcb") == 0){%>
|
|
<a href="project/change_management.jsp?c_management=c_bcb&c_value=1&c_no=<%=rs_sub.getInt("c_no")%>&c_field=<%=c_field%>"><font color=blue><b>O</b></font></a>
|
|
<%}else{%>
|
|
<a href="project/change_management.jsp?c_management=c_bcb&c_value=0&c_no=<%=rs_sub.getInt("c_no")%>&c_field=<%=c_field%>"><b>X</b></a>
|
|
<%}%>
|
|
</td>
|
|
<td align=center>
|
|
<%if(rs_sub.getInt("c_edu") == 0){%>
|
|
<a href="project/change_management.jsp?c_management=c_edu&c_value=1&c_no=<%=rs_sub.getInt("c_no")%>&c_field=<%=c_field%>"><font color=blue><b>O</b></font></a>
|
|
<%}else{%>
|
|
<a href="project/change_management.jsp?c_management=c_edu&c_value=0&c_no=<%=rs_sub.getInt("c_no")%>&c_field=<%=c_field%>"><b>X</b></a>
|
|
<%}%>
|
|
</td>
|
|
<td align=center>
|
|
<% if(o_s_no > 0){%>
|
|
<a href="change_order.jsp?c_no=<%=rs_sub.getInt("c_no")%>&c_order=<%=rs_sub.getInt("c_order")%>&o_no=<%=o_s_no%>&o_order=<%=o_s_order%>&c_field=<%=c_field%>"><font color="blue">▲</font></a>
|
|
<%}%>
|
|
<%
|
|
o_s_no = rs_sub.getInt("c_no");
|
|
o_s_order = rs_sub.getInt("c_order");
|
|
%>
|
|
</td>
|
|
<%if(rst.getInt("c_now") < 2){%>
|
|
<%if(rs_sub.getInt("c_op") == 0 ){%>
|
|
<td align=center style="font-weight:bold;" >
|
|
<a href="operation/insert.jsp?c_project_no=<%=rs_sub.getInt("c_no")%>&c_field=<%=c_field%>">off</a>
|
|
</td>
|
|
<%}else{%>
|
|
<td align=center bgcolor="#FFE6CB" style="font-weight:bold;">
|
|
<a href="operation/delete.jsp?c_no=<%=rs_sub.getInt("c_op")%>&c_field=<%=c_field%>"><font color=red>on</font></a>
|
|
</td>
|
|
<%}%>
|
|
<%}%>
|
|
<td align=center style="font-weight:bold;">
|
|
|
|
</td>
|
|
|
|
<td align=center style="font-weight:bold;">
|
|
|
|
</td>
|
|
<td align=center><%=rst.getString("c_date").substring(0,10)%></td>
|
|
<td align=center style="font-weight:bold;">
|
|
<%if(rst.getInt("c_now") == 0){%>
|
|
<a href="project/edit.jsp?c_no=<%=rs_sub.getInt("c_no")%>&c_field=<%=c_field%>">[Edit]</a>
|
|
<%}%>
|
|
</td>
|
|
<td align=center style="font-weight:bold;">
|
|
<%if(rst.getInt("c_now") == 0){%>
|
|
<a href="#none" onclick="if(confirm('All data such as sub-teams to be deleted will be deleted and cannot be reversed.\nAre you sure you want to delete?')){location.href='delete.jsp?c_no=<%=rs_sub.getInt("c_no")%>&c_field=<%=c_field%>'}">[Del]</a>
|
|
<%}%>
|
|
</td>
|
|
</tr>
|
|
<%
|
|
}
|
|
rs_sub.close();
|
|
%>
|
|
<!------------------project----------------------------------->
|
|
|
|
<% o_no = rst.getInt("c_no");
|
|
o_order = rst.getInt("c_order");
|
|
}
|
|
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_field=<%=c_field%>" style="width: 90px; line-height: 24px; text-align: center;display: inline-block; background: #5e7cc4; border: 1px solid #ededed; border-radius: 5px; color: #ffffff;">Insert Category</a>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<%@include file="/field_manager/include/manager_bottom.jsp"%>
|