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 -->
148
<%If objAccessControl.UserLogedIn Then%>
149
<div id="Layer1" style="position:absolute; left:2; top:2; width:1px; height:1px; z-index:1"><a href="#"><img src="images/i_logout.gif" width="14" height="14" border="0" alt="Logout from <%=objAccessControl.UserName%> disabled" title="Logout from <%=objAccessControl.UserName%> disabled"></a></div>
150
<%End If%>
151
<table width="100%" border="0" cellspacing="0" cellpadding="0">
129 ghuddy 152
  <tr>
119 ghuddy 153
    <td><a href="index.asp"><img src="images/b_release_manager.jpg" width="467" height="50" border="0"></a></td>
154
    <td valign="bottom" align="right">&nbsp;</td>
155
  </tr>
129 ghuddy 156
  <tr>
119 ghuddy 157
    <td align=left noWrap valign=center width=150 background="images/h_dot.gif" height="1"></td>
158
    <td background="images/h_dot.gif" height="1"></td>
159
  </tr>
160
</table>
161
<!-- BODY ---->
162
<table width="100%" border="0" cellspacing="0" cellpadding="0">
129 ghuddy 163
  <tr>
164
    <td width="1%" background="images/bg_member_dark.gif" valign="top">
119 ghuddy 165
      <!-- MEMBERS MENU ---------------------------------------------->
166
	  <!--#include file="members_menu_def.asp"-->
167
	  <%Call Member_Menu( "notifications" )%>
168
      <!--  MEMBERS MENU END ------------------------------------------>
169
    </td>
170
    <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 171
    <td rowspan="2" valign="top" width="1%" background="images/bg_member_light.gif" nowrap>
119 ghuddy 172
      <!------------------------------------------->
173
      <br>
174
      <span class="mmb_ttl">Notifications</span><br>
175
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
176
	  <form name="changeowner" method="post" action="members_change_owner.asp">
129 ghuddy 177
        <tr>
119 ghuddy 178
          <td width="1%">&nbsp;</td>
179
          <td align="right"><img src="images/h_trsp_dot.gif" width="500" height="30"></td>
180
          <td width="1%">&nbsp;</td>
181
        </tr>
129 ghuddy 182
        <tr>
119 ghuddy 183
          <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>
184
            <td background="images/bg_member_dark.gif" align="left" class="wform_ttl">&nbsp;</td>
185
          <td align="right" valign="top" width="1%" background="images/bg_member_dark.gif">&nbsp;</td>
186
        </tr>
129 ghuddy 187
        <tr>
119 ghuddy 188
          <td width="1%" bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
189
          <td bgcolor="#FFFFFF" valign="top" class="form_item"> <br>
190
              You are currently the owner of the following packages. <br>
191
              NOTE: You will be notified when your package is ready to be build.<br>
192
              <br>
193
              <table width="100%" border="0" cellspacing="1" cellpadding="2">
129 ghuddy 194
                <tr>
119 ghuddy 195
                  <td width="1%" nowrap background="images/bg_form_lightbluedark.gif" class="form_field">&nbsp;</td>
196
                  <td width="1%" nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Package Name and Version&nbsp;</td>
197
                  <td width="100%" background="images/bg_form_lightbluedark.gif" class="form_field">Location</td>
198
                </tr>
199
				<%
200
				Dim currPv_id
201
				currPv_id = -1
202
				Set rsTemp = OraDatabase.DbCreateDynaset( Get_My_Packages( objAccessControl.UserId ), cint(0))
203
			    While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
204
				%>
205
				<%If CStr( currPv_id ) <> CStr(rsTemp("pv_id")) Then%>
129 ghuddy 206
                <tr>
119 ghuddy 207
                  <td background="images/bg_form_lightgray.gif" class="form_item"><input type="checkbox" name="pv_list" value="<%=rsTemp("pv_id")%>"></td>
208
                  <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>
209
                  <td background="images/bg_form_lightgray.gif" class="form_item"><%=rsTemp("proj_name") &" &gt; "& rsTemp("rtag_name") %></td>
210
                </tr>
211
				<%currPv_id = rsTemp("pv_id")%>
212
				<%Else%>
129 ghuddy 213
				<tr>
119 ghuddy 214
                  <td background="images/bg_form_lightgray.gif" class="form_item"></td>
215
                  <td background="images/bg_form_lightgray.gif" class="form_item"></td>
216
                  <td background="images/bg_form_lightgray.gif" class="form_item"><%=rsTemp("proj_name") &" &gt; "& rsTemp("rtag_name") %></td>
217
                </tr>
218
				<%End If%>
219
				<%rsTemp.MoveNext
220
	    	    WEnd%>
221
				<%If rsTemp.RecordCount = 0 Then%>
129 ghuddy 222
				<tr>
119 ghuddy 223
                  <td background="images/bg_form_lightgray.gif" class="form_item" colspan="3">You do not own any packages.</td>
224
                </tr>
225
				<%End If%>
226
              </table>
227
              <p>                <%If rsTemp.RecordCount <> 0 Then%>
228
                <input name="Submit" type="submit" class="form_btn" value="Change Owner">
229
                <%End If%>
230
			    </p>
231
              <p>&nbsp;</p>
129 ghuddy 232
 
119 ghuddy 233
			  </form>
234
<%
235
'-- FROM START ---------------------------------------------------------------------------------------------------------
236
objFormComponent.FormName = "FormName"
237
objFormComponent.Action = ScriptName
238
Call objFormComponent.FormStart()
239
%>
240
			<a name="PACKAGE_INTEREST"></a>
241
              <p>You are currently interested in the following packages. <br>
242
  NOTE: You will be notified when the package is officially released/autobuild.</p>
243
              <table width="100%" border="0" cellspacing="1" cellpadding="2">
244
		  <tr>
245
			<td nowrap class="form_iname" valign="top">Select Project </td>
246
			<td valign="top" nowrap class="form_iname">
247
			<%
129 ghuddy 248
 
119 ghuddy 249
			  Dim Query_String, rsQry
250
			  	Query_String = _
251
				" SELECT * FROM PROJECTS order by proj_name"
129 ghuddy 252
 
253
 
119 ghuddy 254
			  Set rsQry = OraDatabase.DbCreateDynaset( Query_String , cint(0) )
255
 
256
			Response.write "<select name='FRproj_id' onChange=""Cascaded_Menu('parent','"& scriptName &"?proj_id="&Request("FRproj_id")&"',this,0)"" class='form_item'>"
257
			Response.write "<option value='0' selected>--NONE--</option>"
258
			  %>
129 ghuddy 259
 
119 ghuddy 260
				<%While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
129 ghuddy 261
 
119 ghuddy 262
			If CDbl(Request("proj_id")) = CDbl(rsQry.Fields("proj_id")) Then
263
	        	Response.write "<option value='"& rsQry.Fields("proj_id") &"' selected>"& UCase(rsQry.Fields("proj_name")) &"</option>"
264
	        Else
129 ghuddy 265
 
119 ghuddy 266
				Response.write "<option value='"& rsQry.Fields("proj_id") &"'>"& UCase(rsQry.Fields("proj_name")) &"</option>"
129 ghuddy 267
			End If
119 ghuddy 268
					rsQry.MoveNext
269
				WEnd
129 ghuddy 270
 
119 ghuddy 271
				rsQry.Close()
272
				Set rsQry = nothing
273
				%>
129 ghuddy 274
			  </select>
119 ghuddy 275
			  </tr>
129 ghuddy 276
			  <%If parProjId > 0  Then %>
119 ghuddy 277
			  <tr>
278
				<td nowrap class="form_iname" valign="top">Add Interest</td>
129 ghuddy 279
				<td valign="top" nowrap class="form_iname">
280
 
281
			<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 282
			<%End If%>
129 ghuddy 283
			  </tr>
119 ghuddy 284
                <tr>
285
                  <td nowrap background="images/bg_form_lightbluedark.gif" class="form_field"><INPUT type=checkbox name="checkall" value="Check All" onClick="checkUncheckAll(this);"></td>
286
                  <td nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Project&nbsp;</td>
287
                  <td nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Package</td>
288
                </tr>
289
                <%
290
				Dim currProj_id
291
				currProj_id = -1
129 ghuddy 292
 
293
 
119 ghuddy 294
				Set rsTemp = OraDatabase.DbCreateDynaset(Get_My_Interest_Packages( objAccessControl.UserId ), cint(0))
295
			    While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
296
				%>
297
                <%If CStr( currProj_id ) <> CStr(rsTemp("proj_id")) Then%>
298
                <tr>
299
                  <td nowrap background="images/bg_form_lightgray.gif" class="form_item"></td>
300
                  <td nowrap background="images/bg_form_lightgray.gif" class="form_item"><b><%=rsTemp("proj_name")%></b></td>
301
                  <td nowrap background="images/bg_form_lightgray.gif" class="form_item"></td>
302
                </tr>
303
                <%currProj_id = rsTemp("proj_id")%>
304
 
129 ghuddy 305
 
119 ghuddy 306
                <%End If%>
307
				<tr>
308
                  <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>
309
                  <td nowrap background="images/bg_form_lightgray.gif" class="form_item"></td>
310
                  <td nowrap background="images/bg_form_lightgray.gif" class="form_item"><%=rsTemp("pkg_name")%></td>
311
                </tr>
312
                <%rsTemp.MoveNext
313
	    	    WEnd%>
314
                <%If rsTemp.RecordCount = 0 Then%>
315
                <tr>
316
                  <td background="images/bg_form_lightgray.gif" class="form_item" colspan="3">You are not interested in any packages.</td>
317
                </tr>
318
                <%End If%>
319
              </table>
320
              <br>
321
              <%If rsTemp.RecordCount <> 0 Then%>
322
              <input name="btn" type="submit" class="form_btn" value="Remove">
323
              <%End If
324
			  rsTemp.Close()
129 ghuddy 325
			  set rsTemp = nothing
119 ghuddy 326
			  %>
327
			<input type="hidden" name="pkg_id_list" value="<%=Request("pkg_id_list")%>">
328
			<input type="hidden" name="action" value="true">
329
			</td>
330
          <td width="1%" background="images/lbox_bgside_white.gif">&nbsp;</td>
331
        </tr>
129 ghuddy 332
        <tr>
119 ghuddy 333
          <td width="1%" background="images/bg_member_dark.gif" valign="bottom"><img src="images/h_trsp_dot.gif" width="13" height="13"></td>
334
          <td background="images/bg_member_dark.gif"></td>
335
          <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>
336
        </tr>
337
<%
338
Call objFormComponent.FormEnd()
339
'-- FROM END ----------------------------------------------------------------------------------------------------------------
340
%>
341
      </table>
342
      <!-------------------------------------------------------->
343
    </td>
344
    <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>
345
  </tr>
129 ghuddy 346
  <tr>
119 ghuddy 347
    <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>
348
    <td background="images/bg_member_light.gif" valign="top"><img src="images/h_trsp_dot.gif" width="100" height="400"></td>
349
  </tr>
350
</table>
351
<!-- FOOTER -->
352
<!--#include file="_footer.asp"-->
353
</body>
354
</html>
355
<%
356
Call Destroy_All_Objects
129 ghuddy 357
%>