| 5357 |
dpurdie |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
'=====================================================
|
|
|
4 |
'| |
|
|
|
5 |
'| MEMBERS |
|
|
|
6 |
'| NOTIFICATIONS - Packages Followed |
|
|
|
7 |
'=====================================================
|
|
|
8 |
%>
|
|
|
9 |
<%
|
|
|
10 |
Option explicit
|
|
|
11 |
' Good idea to set when using redirect
|
|
|
12 |
Response.Expires = 0 ' always load the page, dont store
|
|
|
13 |
%>
|
|
|
14 |
<!--#include file="common/conf.asp"-->
|
|
|
15 |
<!--#include file="common/globals.asp"-->
|
|
|
16 |
<!--#include file="common/formating.asp"-->
|
|
|
17 |
<!--#include file="common/qstr.asp"-->
|
|
|
18 |
<!--#include file="common/common_subs.asp"-->
|
|
|
19 |
<!--#include file="common/_form_window_common.asp"-->
|
|
|
20 |
<%
|
|
|
21 |
'------------ ACCESS CONTROL ------------------
|
|
|
22 |
%>
|
|
|
23 |
<!--#include file="_access_control_login.asp"-->
|
|
|
24 |
<!--#include file="_access_control_general.asp"-->
|
|
|
25 |
<%
|
|
|
26 |
'------------ Variable Definition -------------
|
|
|
27 |
Dim rsTemp
|
|
|
28 |
Dim parProjId
|
|
|
29 |
'------------ Constants Declaration -----------
|
|
|
30 |
'------------ Variable Init -------------------
|
|
|
31 |
parProjId = Request("proj_id")
|
|
|
32 |
objPMod.PersistInQryString("proj_id")
|
|
|
33 |
If parProjId = "" then parProjId = 0
|
|
|
34 |
'----------------------------------------------
|
|
|
35 |
|
|
|
36 |
Function Get_My_Interest_Packages ( NNuser_id )
|
|
|
37 |
Get_My_Interest_Packages = _
|
|
|
38 |
" SELECT * FROM PACKAGE_INTEREST PI, PACKAGES PKG, PROJECTS PRJ WHERE USER_ID = "& NNuser_id &""&_
|
|
|
39 |
" AND PI.PKG_ID = PKG.PKG_ID AND PI.PROJ_ID = PRJ.PROJ_ID order by PRJ.PROJ_ID, pkg.pkg_name"
|
|
|
40 |
End Function
|
|
|
41 |
|
|
|
42 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
43 |
Sub DeletePackageInterestOwner (projId, pkgId)
|
|
|
44 |
|
|
|
45 |
On Error Resume Next
|
|
|
46 |
|
|
|
47 |
OraDatabase.Parameters.Add "PROJ_ID", projId, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
48 |
OraDatabase.Parameters.Add "PKG_ID", pkgId, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
49 |
OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
50 |
|
|
|
51 |
objEH.TryORA ( OraSession )
|
|
|
52 |
|
|
|
53 |
OraDatabase.ExecuteSQL _
|
|
|
54 |
"BEGIN REMOVE_PACKAGE_INTEREST ( :PROJ_ID, :PKG_ID, :USER_ID ); END;"
|
|
|
55 |
|
|
|
56 |
objEH.CatchORA ( OraSession )
|
|
|
57 |
|
|
|
58 |
OraDatabase.Parameters.Remove "PROJ_ID"
|
|
|
59 |
OraDatabase.Parameters.Remove "PKG_ID"
|
|
|
60 |
OraDatabase.Parameters.Remove "USER_ID"
|
|
|
61 |
|
|
|
62 |
End Sub
|
|
|
63 |
'--------------------------------------------------------------------------------------------------------------
|
|
|
64 |
If Request("btn") = "Remove" Then
|
|
|
65 |
If objForm.IsValidOnPostBack Then
|
|
|
66 |
Dim txt,posComma, posUnderscore, projId, pkgId, value
|
|
|
67 |
|
|
|
68 |
txt = Mid(Request("pkg_id_list"), 1, len(Request("pkg_id_list"))-2)
|
|
|
69 |
posComma = InStr(txt, ",")
|
|
|
70 |
|
|
|
71 |
While posComma <> 0
|
|
|
72 |
'Response.Write(txt)
|
|
|
73 |
value = Mid(txt, 1, posComma-1)
|
|
|
74 |
posUnderscore = Instr(value, "_")
|
|
|
75 |
projId = Mid(value, 1, posUnderscore - 1)
|
|
|
76 |
pkgId = Mid(value, posUnderscore + 1, posComma-1)
|
|
|
77 |
|
|
|
78 |
Call DeletePackageInterestOwner(projId, pkgId)
|
|
|
79 |
|
|
|
80 |
txt = Mid(txt, posComma + 1, Len(txt))
|
|
|
81 |
posComma = InStr(txt, ",")
|
|
|
82 |
Wend
|
|
|
83 |
|
|
|
84 |
If posComma = 0 Then
|
|
|
85 |
posUnderscore = Instr(txt, "_")
|
|
|
86 |
projId = Mid(txt, 1, posUnderscore - 1)
|
|
|
87 |
pkgId = Mid(txt, posUnderscore + 1)
|
|
|
88 |
|
|
|
89 |
Call DeletePackageInterestOwner(projId, pkgId)
|
|
|
90 |
|
|
|
91 |
Else
|
|
|
92 |
End if
|
|
|
93 |
' --- Form is Valid ---
|
|
|
94 |
'Call DeleteViewOwner()
|
|
|
95 |
If objEH.Finally Then
|
|
|
96 |
Call OpenInWindow ( "members_pkgs_followed.asp" )
|
|
|
97 |
End If
|
|
|
98 |
End If
|
|
|
99 |
End If
|
|
|
100 |
%>
|
|
|
101 |
<html>
|
|
|
102 |
<head>
|
|
|
103 |
<title>Release Manager</title>
|
|
|
104 |
<link rel="shortcut icon" href="<%=FavIcon%>"/>
|
|
|
105 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
|
|
106 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
107 |
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
|
|
|
108 |
<link rel="stylesheet" href="images/navigation.css" type="text/css">
|
|
|
109 |
<script language="JavaScript" src="images/common.js"></script>
|
| 5590 |
dpurdie |
110 |
<!--#include file="_jquery_includes.asp"-->
|
| 5984 |
dpurdie |
111 |
<!--#include file="_menu_def.asp"-->
|
|
|
112 |
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
|
| 5357 |
dpurdie |
113 |
<script language="javascript">
|
|
|
114 |
<!--
|
|
|
115 |
function checkUncheckAll(theElement) {
|
|
|
116 |
var theForm = theElement.form, z = 0;
|
|
|
117 |
for(z=0; z<theForm.length;z++){
|
|
|
118 |
if(theForm[z].type == 'checkbox' && theForm[z].name != 'checkall' && theForm[z].disabled != true){
|
|
|
119 |
theForm[z].checked = theElement.checked;
|
|
|
120 |
}
|
|
|
121 |
}
|
|
|
122 |
}
|
|
|
123 |
//-->
|
|
|
124 |
</script>
|
|
|
125 |
</head>
|
|
|
126 |
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
|
|
|
127 |
<!-- HEADER -->
|
|
|
128 |
<!--#include file="_header.asp"-->
|
|
|
129 |
<!-- BODY ---->
|
|
|
130 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
131 |
<tr>
|
|
|
132 |
<td width="1%" background="images/bg_member_dark.gif" valign="top">
|
|
|
133 |
<!-- MEMBERS MENU ---------------------------------------------->
|
|
|
134 |
<!--#include file="members_menu_def.asp"-->
|
|
|
135 |
<%Call Member_Menu( "notifications" )%>
|
|
|
136 |
<!-- MEMBERS MENU END ------------------------------------------>
|
|
|
137 |
</td>
|
| 5984 |
dpurdie |
138 |
<td width="1%" valign="top" background="images/bg_member_light.gif"></td>
|
| 5357 |
dpurdie |
139 |
<td rowspan="2" valign="top" width="1%" background="images/bg_member_light.gif" nowrap>
|
|
|
140 |
<!------------------------------------------->
|
|
|
141 |
<br>
|
|
|
142 |
<span class="mmb_ttl">Notifications</span><br>
|
|
|
143 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
144 |
<%
|
|
|
145 |
'-- FROM START ---------------------------------------------------------
|
|
|
146 |
objFormComponent.FormName = "FormName"
|
|
|
147 |
objFormComponent.Action = ScriptName
|
|
|
148 |
Call objFormComponent.FormStart()
|
|
|
149 |
%>
|
|
|
150 |
<tr>
|
|
|
151 |
<td width="1%"> </td>
|
|
|
152 |
<td align="right"><img src="images/h_trsp_dot.gif" width="500" height="30"></td>
|
|
|
153 |
<td width="1%"> </td>
|
|
|
154 |
</tr>
|
|
|
155 |
<tr>
|
|
|
156 |
<td align="left" valign="top" width="1%" background="images/bg_member_dark.gif"><img src="images/h_trsp_dot.gif" width="13" height="13"></td>
|
|
|
157 |
<td background="images/bg_member_dark.gif" align="left" class="wform_ttl"> </td>
|
|
|
158 |
<td align="right" valign="top" width="1%" background="images/bg_member_dark.gif"> </td>
|
|
|
159 |
</tr>
|
|
|
160 |
|
|
|
161 |
<tr>
|
|
|
162 |
<td width="1%" bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
|
|
|
163 |
<td bgcolor="#FFFFFF" valign="top" class="form_item"> <br>
|
|
|
164 |
|
|
|
165 |
<a name="PACKAGE_INTEREST"></a>
|
|
|
166 |
<p>You are currently interested in the following packages. <br>
|
|
|
167 |
NOTE: You will be notified when the package is officially released/autobuild.</p>
|
|
|
168 |
<table width="100%" border="0" cellspacing="1" cellpadding="2">
|
|
|
169 |
<tr>
|
|
|
170 |
<td nowrap class="form_iname" valign="top">Select Project </td>
|
|
|
171 |
<td valign="top" nowrap class="form_iname">
|
|
|
172 |
<%
|
|
|
173 |
|
|
|
174 |
Dim Query_String, rsQry
|
|
|
175 |
Query_String = _
|
|
|
176 |
" SELECT * FROM PROJECTS order by proj_name"
|
|
|
177 |
|
|
|
178 |
|
|
|
179 |
Set rsQry = OraDatabase.DbCreateDynaset( Query_String , cint(0) )
|
|
|
180 |
|
|
|
181 |
Response.write "<select name='FRproj_id' onChange=""Cascaded_Menu('parent','"& scriptName &"?proj_id="&Request("FRproj_id")&"',this,0)"" class='form_item'>"
|
|
|
182 |
Response.write "<option value='0' selected>--NONE--</option>"
|
|
|
183 |
%>
|
|
|
184 |
|
|
|
185 |
<%While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
|
|
|
186 |
|
|
|
187 |
If CDbl(Request("proj_id")) = CDbl(rsQry.Fields("proj_id")) Then
|
|
|
188 |
Response.write "<option value='"& rsQry.Fields("proj_id") &"' selected>"& UCase(rsQry.Fields("proj_name")) &"</option>"
|
|
|
189 |
Else
|
|
|
190 |
|
|
|
191 |
Response.write "<option value='"& rsQry.Fields("proj_id") &"'>"& UCase(rsQry.Fields("proj_name")) &"</option>"
|
|
|
192 |
End If
|
|
|
193 |
rsQry.MoveNext
|
|
|
194 |
WEnd
|
|
|
195 |
|
|
|
196 |
rsQry.Close()
|
|
|
197 |
Set rsQry = nothing
|
|
|
198 |
%>
|
|
|
199 |
</select>
|
|
|
200 |
</tr>
|
|
|
201 |
<%If parProjId > 0 Then %>
|
|
|
202 |
<tr>
|
|
|
203 |
<td nowrap class="form_iname" valign="top">Add Interest</td>
|
|
|
204 |
<td valign="top" nowrap class="form_iname">
|
|
|
205 |
|
| 5590 |
dpurdie |
206 |
<a href="javascript:;" class ="form_iname" onClick="MM_openVixIFrame('wAddPackageInterest.asp?proj_id=<%=parProjId%>','Add Packages of Interest')"><img src="images/email-contact-orange.gif"></a>
|
| 5357 |
dpurdie |
207 |
<%End If%>
|
|
|
208 |
</tr>
|
|
|
209 |
<tr>
|
|
|
210 |
<td nowrap background="images/bg_form_lightbluedark.gif" class="form_field"><INPUT type=checkbox name="checkall" value="Check All" onClick="checkUncheckAll(this);"></td>
|
|
|
211 |
<td nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Project </td>
|
|
|
212 |
<td nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Package</td>
|
|
|
213 |
</tr>
|
|
|
214 |
<%
|
|
|
215 |
Dim currProj_id
|
|
|
216 |
currProj_id = -1
|
|
|
217 |
|
|
|
218 |
|
|
|
219 |
Set rsTemp = OraDatabase.DbCreateDynaset(Get_My_Interest_Packages( objAccessControl.UserId ), cint(0))
|
|
|
220 |
While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
|
|
|
221 |
%>
|
|
|
222 |
<%If CStr( currProj_id ) <> CStr(rsTemp("proj_id")) Then%>
|
|
|
223 |
<tr>
|
|
|
224 |
<td nowrap background="images/bg_form_lightgray.gif" class="form_item"></td>
|
|
|
225 |
<td nowrap background="images/bg_form_lightgray.gif" class="form_item"><b><%=rsTemp("proj_name")%></b></td>
|
|
|
226 |
<td nowrap background="images/bg_form_lightgray.gif" class="form_item"></td>
|
|
|
227 |
</tr>
|
|
|
228 |
<%currProj_id = rsTemp("proj_id")%>
|
|
|
229 |
|
|
|
230 |
|
|
|
231 |
<%End If%>
|
|
|
232 |
<tr>
|
|
|
233 |
<td nowrap background="images/bg_form_lightgray.gif" class="form_item"><input type="checkbox" name="pkg_id_list" value="<%=rsTemp("proj_id")%>_<%=rsTemp("pkg_id")%>"></td>
|
|
|
234 |
<td nowrap background="images/bg_form_lightgray.gif" class="form_item"></td>
|
|
|
235 |
<td nowrap background="images/bg_form_lightgray.gif" class="form_item"><%=rsTemp("pkg_name")%></td>
|
|
|
236 |
</tr>
|
|
|
237 |
<%rsTemp.MoveNext
|
|
|
238 |
WEnd%>
|
|
|
239 |
<%If rsTemp.RecordCount = 0 Then%>
|
|
|
240 |
<tr>
|
|
|
241 |
<td background="images/bg_form_lightgray.gif" class="form_item" colspan="3">You are not interested in any packages.</td>
|
|
|
242 |
</tr>
|
|
|
243 |
<%End If%>
|
|
|
244 |
</table>
|
|
|
245 |
<br>
|
|
|
246 |
<%If rsTemp.RecordCount <> 0 Then%>
|
|
|
247 |
<input name="btn" type="submit" class="form_btn" value="Remove">
|
|
|
248 |
<%End If
|
|
|
249 |
rsTemp.Close()
|
|
|
250 |
set rsTemp = nothing
|
|
|
251 |
%>
|
|
|
252 |
<input type="hidden" name="pkg_id_list" value="<%=Request("pkg_id_list")%>">
|
|
|
253 |
<input type="hidden" name="action" value="true">
|
|
|
254 |
</td>
|
|
|
255 |
<td width="1%" background="images/lbox_bgside_white.gif"> </td>
|
|
|
256 |
</tr>
|
|
|
257 |
<tr>
|
|
|
258 |
<td width="1%" background="images/bg_member_dark.gif" valign="bottom"><img src="images/h_trsp_dot.gif" width="13" height="13"></td>
|
|
|
259 |
<td background="images/bg_member_dark.gif"></td>
|
|
|
260 |
<td width="1%" background="images/bg_member_dark.gif" valign="bottom" align="right"><img src="images/h_trsp_dot.gif" width="13" height="13"></td>
|
|
|
261 |
</tr>
|
|
|
262 |
<%
|
|
|
263 |
Call objFormComponent.FormEnd()
|
|
|
264 |
'-- FROM END -----------------------------------------------------------
|
|
|
265 |
%>
|
|
|
266 |
</table>
|
|
|
267 |
<!-------------------------------------------------------->
|
|
|
268 |
</td>
|
|
|
269 |
<td rowspan="2" valign="bottom" width="100%" background="images/bg_member_light.gif" align="right"><img src="images/bg_img_view.gif" width="249" height="144" vspace="10" hspace="10"></td>
|
|
|
270 |
</tr>
|
|
|
271 |
<tr>
|
|
|
272 |
<td valign="bottom" align="center" background="images/bg_member_dark.gif"><img src="images/img_members.gif" width="81" height="57" vspace="20" hspace="30"></td>
|
|
|
273 |
<td background="images/bg_member_light.gif" valign="top"><img src="images/h_trsp_dot.gif" width="100" height="400"></td>
|
|
|
274 |
</tr>
|
|
|
275 |
</table>
|
|
|
276 |
<!-- FOOTER -->
|
|
|
277 |
<!--#include file="_footer.asp"-->
|
|
|
278 |
</body>
|
|
|
279 |
</html>
|