Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|                                                   |
5
'|				    	MEMBERS					     |
6
'|                    NOTIFICATIONS               	 |
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
Set pkgInfoHash = CreateObject("Scripting.Dictionary")
32
parProjId = Request("proj_id")
33
objPMod.PersistInQryString("proj_id")
34
If parProjId = "" then parProjId = 0
35
'----------------------------------------------
36
%>
37
<%
38
Function Get_My_Interest_Packages ( NNuser_id )
39
	Get_My_Interest_Packages = _
40
	" SELECT * FROM PACKAGE_INTEREST PI, PACKAGES PKG, PROJECTS PRJ WHERE USER_ID = "& NNuser_id &""&_
41
	" AND PI.PKG_ID = PKG.PKG_ID AND PI.PROJ_ID = PRJ.PROJ_ID order by PRJ.PROJ_ID, pkg.pkg_name"
42
End Function
43
%>
44
 
45
<%
46
Function Get_My_Packages ( NNuser_id )
47
	Get_My_Packages = _
48
	" SELECT rc.rtag_id, pv.pv_id, pkg.pkg_name, pv.pkg_version, proj.proj_name, rt.rtag_name, rt.rtag_name "&_
49
	"  FROM packages pkg,"&_
50
	"       package_versions pv, "&_
51
	"       release_content rc,"&_
52
	"       release_tags rt,"&_
53
	"       projects proj"&_
54
	" WHERE pv.pkg_id = pkg.pkg_id"&_
55
	"   AND rc.pv_id = pv.pv_id"&_
56
	"   AND rc.rtag_id = rt.rtag_id"&_
57
	"   AND rt.proj_id = proj.proj_id "&_
58
	"   AND rt.official = 'N'"&_
59
	"   AND pv.owner_id = "& NNuser_id &_
60
	" ORDER BY pv.pv_id, UPPER(pkg.pkg_name), UPPER(proj.proj_name) "
61
End Function
62
 
63
'--------------------------------------------------------------------------------------------------------------------------
64
Sub DeletePackageInterestOwner (projId, pkgId)
65
 
66
	On Error Resume Next
129 ghuddy 67
 
119 ghuddy 68
	OraDatabase.Parameters.Add "PROJ_ID",	projId, ORAPARM_INPUT, ORATYPE_NUMBER
69
	OraDatabase.Parameters.Add "PKG_ID",	pkgId, 	ORAPARM_INPUT, ORATYPE_NUMBER
129 ghuddy 70
	OraDatabase.Parameters.Add "USER_ID", 	objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
119 ghuddy 71
 
72
	objEH.TryORA ( OraSession )
129 ghuddy 73
 
119 ghuddy 74
	OraDatabase.ExecuteSQL _
75
	"BEGIN   REMOVE_PACKAGE_INTEREST ( :PROJ_ID, :PKG_ID, :USER_ID );   END;"
129 ghuddy 76
 
119 ghuddy 77
	objEH.CatchORA ( OraSession )
78
 
129 ghuddy 79
	OraDatabase.Parameters.Remove "PROJ_ID"
80
	OraDatabase.Parameters.Remove "PKG_ID"
119 ghuddy 81
	OraDatabase.Parameters.Remove "USER_ID"
82
 
83
End Sub
84
'--------------------------------------------------------------------------------------------------------------
85
If Request("btn") = "Remove" Then
86
	If objForm.IsValidOnPostBack Then
87
		Dim txt,posComma, posUnderscore, projId, pkgId, value
129 ghuddy 88
 
119 ghuddy 89
		txt = Mid(Request("pkg_id_list"), 1, len(Request("pkg_id_list"))-2)
90
		posComma = InStr(txt, ",")
91
 
92
		While posComma <> 0
93
			'Response.Write(txt)
94
			value = Mid(txt, 1, posComma-1)
95
			posUnderscore = Instr(value, "_")
96
			projId = Mid(value, 1, posUnderscore - 1)
97
			pkgId = Mid(value, posUnderscore + 1, posComma-1)
129 ghuddy 98
 
119 ghuddy 99
			Call DeletePackageInterestOwner(projId, pkgId)
129 ghuddy 100
 
119 ghuddy 101
			txt = Mid(txt, posComma + 1, Len(txt))
102
			posComma = InStr(txt, ",")
129 ghuddy 103
		Wend
104
 
119 ghuddy 105
		If posComma = 0 Then
106
			posUnderscore = Instr(txt, "_")
107
			projId = Mid(txt, 1, posUnderscore - 1)
108
			pkgId = Mid(txt, posUnderscore + 1)
109
 
110
			Call DeletePackageInterestOwner(projId, pkgId)
129 ghuddy 111
 
119 ghuddy 112
		Else
129 ghuddy 113
		End if
119 ghuddy 114
		' --- Form is Valid ---
129 ghuddy 115
		'Call DeleteViewOwner()
119 ghuddy 116
		If objEH.Finally Then
117
			Call OpenInWindow ( "members_notifications.asp" )
129 ghuddy 118
		End If
119 ghuddy 119
	End If
120
End If
121
%>
122
<html>
123
<head>
124
<title>Release Manager</title>
125
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
126
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
127
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
128
<link rel="stylesheet" href="images/navigation.css" type="text/css">
129
<script language="JavaScript" src="images/common.js"></script>
130
<script language="javascript">
131
<!--
132
function checkUncheckAll(theElement) {
133
     var theForm = theElement.form, z = 0;
134
	 for(z=0; z<theForm.length;z++){
135
      if(theForm[z].type == 'checkbox' && theForm[z].name != 'checkall' && theForm[z].disabled != true){
136
	  theForm[z].checked = theElement.checked;
137
	  }
138
     }
139
    }
140
//-->
141
</script>
142
</head>
143
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
144
<!-- TIPS LAYERS -------------------------------------->
145
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
146
<!----------------------------------------------------->
147
<!-- HEADER -->
2365 dpurdie 148
<!--#include file="_header.asp"-->
119 ghuddy 149
<!-- BODY ---->
150
<table width="100%" border="0" cellspacing="0" cellpadding="0">
129 ghuddy 151
  <tr>
152
    <td width="1%" background="images/bg_member_dark.gif" valign="top">
119 ghuddy 153
      <!-- MEMBERS MENU ---------------------------------------------->
154
	  <!--#include file="members_menu_def.asp"-->
155
	  <%Call Member_Menu( "notifications" )%>
156
      <!--  MEMBERS MENU END ------------------------------------------>
157
    </td>
158
    <td width="1%" valign="top" background="images/bg_member_light.gif"><a href="index.asp" class="form_txt_link"><img src="images/i_home.gif" width="13" height="12" border="0" align="absmiddle">Exit</a></td>
129 ghuddy 159
    <td rowspan="2" valign="top" width="1%" background="images/bg_member_light.gif" nowrap>
119 ghuddy 160
      <!------------------------------------------->
161
      <br>
162
      <span class="mmb_ttl">Notifications</span><br>
163
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
164
	  <form name="changeowner" method="post" action="members_change_owner.asp">
129 ghuddy 165
        <tr>
119 ghuddy 166
          <td width="1%">&nbsp;</td>
167
          <td align="right"><img src="images/h_trsp_dot.gif" width="500" height="30"></td>
168
          <td width="1%">&nbsp;</td>
169
        </tr>
129 ghuddy 170
        <tr>
119 ghuddy 171
          <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>
172
            <td background="images/bg_member_dark.gif" align="left" class="wform_ttl">&nbsp;</td>
173
          <td align="right" valign="top" width="1%" background="images/bg_member_dark.gif">&nbsp;</td>
174
        </tr>
129 ghuddy 175
        <tr>
119 ghuddy 176
          <td width="1%" bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
177
          <td bgcolor="#FFFFFF" valign="top" class="form_item"> <br>
178
              You are currently the owner of the following packages. <br>
179
              NOTE: You will be notified when your package is ready to be build.<br>
180
              <br>
181
              <table width="100%" border="0" cellspacing="1" cellpadding="2">
129 ghuddy 182
                <tr>
119 ghuddy 183
                  <td width="1%" nowrap background="images/bg_form_lightbluedark.gif" class="form_field">&nbsp;</td>
184
                  <td width="1%" nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Package Name and Version&nbsp;</td>
185
                  <td width="100%" background="images/bg_form_lightbluedark.gif" class="form_field">Location</td>
186
                </tr>
187
				<%
188
				Dim currPv_id
189
				currPv_id = -1
190
				Set rsTemp = OraDatabase.DbCreateDynaset( Get_My_Packages( objAccessControl.UserId ), cint(0))
191
			    While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
192
				%>
193
				<%If CStr( currPv_id ) <> CStr(rsTemp("pv_id")) Then%>
129 ghuddy 194
                <tr>
119 ghuddy 195
                  <td background="images/bg_form_lightgray.gif" class="form_item"><input type="checkbox" name="pv_list" value="<%=rsTemp("pv_id")%>"></td>
196
                  <td background="images/bg_form_lightgray.gif" class="form_item"><a href="dependencies.asp?pv_id=<%=rsTemp("pv_id")%>&rtag_id=<%=rsTemp("rtag_id")%>" class="txt_linked"><%=rsTemp("pkg_name") &" "& rsTemp("pkg_version")%></a></td>
197
                  <td background="images/bg_form_lightgray.gif" class="form_item"><%=rsTemp("proj_name") &" &gt; "& rsTemp("rtag_name") %></td>
198
                </tr>
199
				<%currPv_id = rsTemp("pv_id")%>
200
				<%Else%>
129 ghuddy 201
				<tr>
119 ghuddy 202
                  <td background="images/bg_form_lightgray.gif" class="form_item"></td>
203
                  <td background="images/bg_form_lightgray.gif" class="form_item"></td>
204
                  <td background="images/bg_form_lightgray.gif" class="form_item"><%=rsTemp("proj_name") &" &gt; "& rsTemp("rtag_name") %></td>
205
                </tr>
206
				<%End If%>
207
				<%rsTemp.MoveNext
208
	    	    WEnd%>
209
				<%If rsTemp.RecordCount = 0 Then%>
129 ghuddy 210
				<tr>
119 ghuddy 211
                  <td background="images/bg_form_lightgray.gif" class="form_item" colspan="3">You do not own any packages.</td>
212
                </tr>
213
				<%End If%>
214
              </table>
215
              <p>                <%If rsTemp.RecordCount <> 0 Then%>
216
                <input name="Submit" type="submit" class="form_btn" value="Change Owner">
217
                <%End If%>
218
			    </p>
219
              <p>&nbsp;</p>
129 ghuddy 220
 
119 ghuddy 221
			  </form>
222
<%
223
'-- FROM START ---------------------------------------------------------------------------------------------------------
224
objFormComponent.FormName = "FormName"
225
objFormComponent.Action = ScriptName
226
Call objFormComponent.FormStart()
227
%>
228
			<a name="PACKAGE_INTEREST"></a>
229
              <p>You are currently interested in the following packages. <br>
230
  NOTE: You will be notified when the package is officially released/autobuild.</p>
231
              <table width="100%" border="0" cellspacing="1" cellpadding="2">
232
		  <tr>
233
			<td nowrap class="form_iname" valign="top">Select Project </td>
234
			<td valign="top" nowrap class="form_iname">
235
			<%
129 ghuddy 236
 
119 ghuddy 237
			  Dim Query_String, rsQry
238
			  	Query_String = _
239
				" SELECT * FROM PROJECTS order by proj_name"
129 ghuddy 240
 
241
 
119 ghuddy 242
			  Set rsQry = OraDatabase.DbCreateDynaset( Query_String , cint(0) )
243
 
244
			Response.write "<select name='FRproj_id' onChange=""Cascaded_Menu('parent','"& scriptName &"?proj_id="&Request("FRproj_id")&"',this,0)"" class='form_item'>"
245
			Response.write "<option value='0' selected>--NONE--</option>"
246
			  %>
129 ghuddy 247
 
119 ghuddy 248
				<%While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
129 ghuddy 249
 
119 ghuddy 250
			If CDbl(Request("proj_id")) = CDbl(rsQry.Fields("proj_id")) Then
251
	        	Response.write "<option value='"& rsQry.Fields("proj_id") &"' selected>"& UCase(rsQry.Fields("proj_name")) &"</option>"
252
	        Else
129 ghuddy 253
 
119 ghuddy 254
				Response.write "<option value='"& rsQry.Fields("proj_id") &"'>"& UCase(rsQry.Fields("proj_name")) &"</option>"
129 ghuddy 255
			End If
119 ghuddy 256
					rsQry.MoveNext
257
				WEnd
129 ghuddy 258
 
119 ghuddy 259
				rsQry.Close()
260
				Set rsQry = nothing
261
				%>
129 ghuddy 262
			  </select>
119 ghuddy 263
			  </tr>
129 ghuddy 264
			  <%If parProjId > 0  Then %>
119 ghuddy 265
			  <tr>
266
				<td nowrap class="form_iname" valign="top">Add Interest</td>
129 ghuddy 267
				<td valign="top" nowrap class="form_iname">
268
 
269
			<a href="javascript:;" class ="form_iname" onClick="MM_openBrWindow('wAddPackageInterest.asp?proj_id=<%=parProjId%>','AddPackageInterest','scrollbars=yes,resizable=yes,width=350,height=800')"><img src="images/email-contact-orange.gif"></a>
119 ghuddy 270
			<%End If%>
129 ghuddy 271
			  </tr>
119 ghuddy 272
                <tr>
273
                  <td nowrap background="images/bg_form_lightbluedark.gif" class="form_field"><INPUT type=checkbox name="checkall" value="Check All" onClick="checkUncheckAll(this);"></td>
274
                  <td nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Project&nbsp;</td>
275
                  <td nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Package</td>
276
                </tr>
277
                <%
278
				Dim currProj_id
279
				currProj_id = -1
129 ghuddy 280
 
281
 
119 ghuddy 282
				Set rsTemp = OraDatabase.DbCreateDynaset(Get_My_Interest_Packages( objAccessControl.UserId ), cint(0))
283
			    While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
284
				%>
285
                <%If CStr( currProj_id ) <> CStr(rsTemp("proj_id")) Then%>
286
                <tr>
287
                  <td nowrap background="images/bg_form_lightgray.gif" class="form_item"></td>
288
                  <td nowrap background="images/bg_form_lightgray.gif" class="form_item"><b><%=rsTemp("proj_name")%></b></td>
289
                  <td nowrap background="images/bg_form_lightgray.gif" class="form_item"></td>
290
                </tr>
291
                <%currProj_id = rsTemp("proj_id")%>
292
 
129 ghuddy 293
 
119 ghuddy 294
                <%End If%>
295
				<tr>
296
                  <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>
297
                  <td nowrap background="images/bg_form_lightgray.gif" class="form_item"></td>
298
                  <td nowrap background="images/bg_form_lightgray.gif" class="form_item"><%=rsTemp("pkg_name")%></td>
299
                </tr>
300
                <%rsTemp.MoveNext
301
	    	    WEnd%>
302
                <%If rsTemp.RecordCount = 0 Then%>
303
                <tr>
304
                  <td background="images/bg_form_lightgray.gif" class="form_item" colspan="3">You are not interested in any packages.</td>
305
                </tr>
306
                <%End If%>
307
              </table>
308
              <br>
309
              <%If rsTemp.RecordCount <> 0 Then%>
310
              <input name="btn" type="submit" class="form_btn" value="Remove">
311
              <%End If
312
			  rsTemp.Close()
129 ghuddy 313
			  set rsTemp = nothing
119 ghuddy 314
			  %>
315
			<input type="hidden" name="pkg_id_list" value="<%=Request("pkg_id_list")%>">
316
			<input type="hidden" name="action" value="true">
317
			</td>
318
          <td width="1%" background="images/lbox_bgside_white.gif">&nbsp;</td>
319
        </tr>
129 ghuddy 320
        <tr>
119 ghuddy 321
          <td width="1%" background="images/bg_member_dark.gif" valign="bottom"><img src="images/h_trsp_dot.gif" width="13" height="13"></td>
322
          <td background="images/bg_member_dark.gif"></td>
323
          <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>
324
        </tr>
325
<%
326
Call objFormComponent.FormEnd()
327
'-- FROM END ----------------------------------------------------------------------------------------------------------------
328
%>
329
      </table>
330
      <!-------------------------------------------------------->
331
    </td>
332
    <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>
333
  </tr>
129 ghuddy 334
  <tr>
119 ghuddy 335
    <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>
336
    <td background="images/bg_member_light.gif" valign="top"><img src="images/h_trsp_dot.gif" width="100" height="400"></td>
337
  </tr>
338
</table>
339
<!-- FOOTER -->
340
<!--#include file="_footer.asp"-->
341
</body>
342
</html>
343
<%
344
Call Destroy_All_Objects
129 ghuddy 345
%>