c-innovacion2/resoft/field_manager/process/bcb/team/list.jsp

207 lines
9.2 KiB
Plaintext

<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@include file="/field_manager/include/manager_head.jsp"%>
<%
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 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">
<form name="bcb">
<tr >
<td >
<table width="100%" cellSpacing="0" cellPadding="0" border="0" bgcolor=ffffff>
<tr >
<td height="60" style="font-weight:bold;">
Project team and member management
</td>
</tr>
</table>
<!---------------------------------------------------------------------------------------->
<table width="100%" cellSpacing="0" cellPadding="0" border="0" bgcolor=ffffff>
<tr >
<td align=right style="line-height:120%">
<font color=red>
* You can see the team description by hovering over the team name.
</font>
</td>
</tr>
</table>
<table width="100%" 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 </td>
<td style="padding:5px">
<font color=red><b><%=rs_up.getString("c_name")%></b></font>
</tr>
</table>
<%
}
rs_up.close();
%> <br>
<font color=blue><b>Team & Member</b></font>
<table width="100%" cellSpacing="0" cellPadding="0" border="0" bgcolor=ffffff>
<tr >
<td align=right style="line-height:120%">
<font color=red>
* If there is no Member Name and membership, the member has not yet registered.
</font>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor=dddddd >
<tr height="20" bgcolor=efefef>
<td width="20%" align=center style="font-weight:bold;"> Team name</td>
<td width="20%" align=center style="font-weight:bold;"> Member email</td>
<td width="10%" align=center style="font-weight:bold;"> Send subscription email</td>
<td width="10%" align=center style="font-weight:bold;"> Member name</td>
<td width="10%" align=center style="font-weight:bold;"> Joined</td>
<td width="10%" align=center style="font-weight:bold;"> Date</td>
<td width="10%" align=center style="font-weight:bold;"> Member Insert</td>
<td width="5%" align=center style="font-weight:bold;"> Edit</td>
<td width="5%" align=center style="font-weight:bold;"> Del</td>
</tr>
<% String sql2 = "select * from tbl_team where c_relation = 0 and c_use = 0 and c_project_no = " + c_project_no + " order by c_team_name asc";
ResultSet rs = stmt.executeQuery(sql2);
while (rs.next()) {
%>
<tr height="26" bgcolor=ffffff onMouseover="this.bgColor='#FFF669'" onMouseout="this.bgColor='#FFFFFF'">
<td align=center style="font-weight:bold;"> <a href="edit_team.jsp?c_project_no=<%=c_project_no%>&c_team_no=<%=rs.getString("c_no")%>" title="<%=rs.getString("c_exp")%>"><font color=blue><%=rs.getString("c_team_name")%></font></a></td>
<td align=center style="font-weight:bold;"> </td>
<td align=center style="font-weight:bold;"> </td>
<td align=center style="font-weight:bold;"> </td>
<td align=center style="font-weight:bold;"> <%=rs.getString("c_date").substring(0,10)%></td>
<td align=center style="font-weight:bold;"> <a href="member/insert.jsp?c_project_no=<%=c_project_no%>&c_team_no=<%=rs.getString("c_no")%>"><font color=red>[Member Insert]</font></a></td>
<td align=center style="font-weight:bold;"> <a href="edit_team.jsp?c_project_no=<%=c_project_no%>&c_team_no=<%=rs.getString("c_no")%>"><font color=green>[Edit]</font></a></td>
<td align=center style="font-weight:bold;"> <a href="#none" onclick="if(confirm('When you delete a team, the related member and all information under it are deleted.\nAre you sure you want to delete it??')){location.href='delete_team.jsp?c_project_no=<%=c_project_no%>&c_team_no=<%=rs.getString("c_no")%>'}" >[Del]</a></td>
</tr>
</tr>
<% String sql3 = "select a.*, b.c_date as m_date,b.c_no as m_no from tbl_member a ";
sql3 = sql3 + " inner join tbl_pnm_for_bcb b on b.c_member_no = a.c_no ";
sql3 = sql3 + " where a.c_use = 0 and b.c_use = 0 and b.c_type = 0 and b.c_team_no = " + rs.getInt("c_no") + " and b.c_project_no = " + c_project_no + " ";
sql3 = sql3 + " order by a.c_name asc ";
ResultSet rs3 = stmt.executeQuery(sql3);
while (rs3.next()) {
%>
<tr height="26" bgcolor=efefef onMouseover="this.bgColor='#B9C1FF'" onMouseout="this.bgColor='#efefef'">
<td align=center style="font-weight:bold;" bgcolor="ffffff"></td>
<td align=center style="font-weight:bold;"> <%=rs3.getString("c_id")%></td>
<td align=center style="font-weight:bold;"> <%if(rs3.getString("c_name") == null){%><input name="c_id" value="<%=rs3.getString("c_id")%>" type="checkbox" checked><%}%></td>
<td align=center style="font-weight:bold;"> <%if(rs3.getString("c_name") != null){%><%=rs3.getString("c_name")%><%}%></td>
<td align=center style="font-weight:bold;"> <%if(rs3.getString("c_date") != null){%><%=rs3.getString("c_date").substring(0,10)%><%}%></td>
<td align=center style="font-weight:bold;"> <%=rs3.getString("m_date").substring(0,10)%></td>
<td align=center style="font-weight:bold;"> </td>
<td align=center style="font-weight:bold;"> </td>
<td align=center style="font-weight:bold;"> <a href="#none" onclick="if(confirm('If member is deleted, all subordinate information will be deleted.\nAre you sure you want to delete it?')){location.href='member/delete.jsp?c_project_no=<%=c_project_no%>&c_team_no=<%=rs.getString("c_no")%>&c_pnm_no=<%=rs3.getString("m_no")%>'}" >[Del]</a></td>
</tr>
<%
}
rs3.close();
%>
<%
}
rs.close();
%>
</table>
<!---------------------------------------------------------------------------------------->
<script>
function go(){
if(confirm("Register project-related team and team member information as BCB operations team and team members.\nDo you want to continue?")){
document.bcb.action = "insert_t_m_ok.jsp";
document.bcb.target = "exec";
document.bcb.method = "post";
document.bcb.submit();
}
}
function go_email(){
topr = 0
if(document.bcb.c_id.length == null){
if(document.bcb.c_id.checked == true) {
topr = 1
}
}else{
for(var i=0 ; i<document.bcb.c_id.length ; i++) {
if(document.bcb.c_id[i].checked == true) {
topr = 1
}
}
}
if(topr == 0 ){
alert("Please check the email of the member to be sent.")
}else{
document.bcb.action = "email_ok.jsp";
document.bcb.target = "exec";
document.bcb.method = "post";
document.bcb.submit();
}
}
</script>
<input name="c_project_no" value="<%=c_project_no%>" type="hidden">
<table width="100%">
<tr>
<td height="40" align="left" style="font-weight:bold;padding:20px;">
Project team connection:
<select name="target_project_no" style="height:22px">
<option value="0">Project application</option>
<%
String sql_pt = " select c_no, c_name from tbl_point_project where c_project_no = "+ c_project_no + " and c_use = 0 and c_now = 2 order by c_no asc";
ResultSet rs_pt = stmt.executeQuery(sql_pt);
while (rs_pt.next()) {
%>
<option value="<%=rs_pt.getInt("c_no")%>"><%=rs_pt.getString("c_name")%> Evaluation selected </option>
<%}
rs_pt.close();
%>
</select> Team and team members
<a href="#none" onclick="go()" style="width: 180px; line-height: 24px; text-align: center;display: inline-block; background: #5e7cc4; border: 1px solid #ededed; border-radius: 5px; color: #ffffff;">Registered as a BMC operation team and member</a><br / >
<br /><br />
<a href="#none" onclick="go_email()" style="width: 280px; line-height: 24px; text-align: center;display: inline-block; background: #5e7cc4; border: 1px solid #ededed; border-radius: 5px; color: #ffffff;">Sending an e-mail requesting registration to Check members</a>
</td>
<td height="35" align="right" colspan="5" style="padding-bottom:10px;padding-top:10px;font-weight:bold;">
<a href="insert_team.jsp?c_project_no=<%=c_project_no%>" style="width: 90px; line-height: 26px; text-align: center;display: inline-block; background: #5e7cc4; border: 1px solid #555; border-radius: 5px; color: #ffffff;">Team registration</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
<iframe name="exec" width=0 height=0 src=""></iframe>
<%
}
%>
<%@include file="/field_manager/include/manager_bottom.jsp"%>