Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5071 dpurdie 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'   Reference SDK
5
'   _wform_reference_sdk.asp
6
'
7
'   This page is designed to be loaded into an iframe as a form of popup
8
'   The page expects a function closeIFrame() in the parent form to handle closing
9
'=====================================================
10
%>
11
<%
12
Option explicit
13
Response.Expires = 0	' always load the page, dont store
14
%>
15
<!--#include file="common/conf.asp"-->
16
<!--#include file="common/globals.asp"-->
17
<!--#include file="common/qstr.asp"-->
18
<!--#include file="common/common_subs.asp"-->
19
<!--#include file="common/common_dbedit.asp"-->
20
<%
21
'------------ ACCESS CONTROL ------------------
22
isPopupWindow = TRUE
23
%>
24
<!--#include file="_access_control_general.asp"-->
25
<%
26
'------------ Variable Definition -------------
27
Dim parFRsdk_id
28
Dim parFRsdktag_id
29
Dim bLoggedIn, bAuthorised
30
 
31
'------------ Constants Declaration -----------
32
'------------ Variable Init -------------------
33
parFRsdk_id = QStrPar("FRsdk_id")
34
parFRsdktag_id = QStrPar("FRsdktag_id")
35
If parFRsdk_id = "" Then parFRsdk_id = "-1"
36
If parFRsdktag_id = "" Then parFRsdktag_id = "-1"
37
bLoggedIn = objAccessControl.UserLogedIn
38
bAuthorised = canActionControlInProject("AddReleaseReference")
39
'----------------------------------------------
40
%>
41
<%
42
Sub Get_Projects ( NNsdk_id )
43
	Dim rsTemp, Query_String, tempLINK, selStr
44
	Query_String = "SELECT * FROM SDK_NAMES ORDER BY  UPPER( SDK_NAME )"
45
	Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
46
 
47
	Response.write "<select name='FRsdk_id' onChange=""MM_jumpMenu('window',this,0)"" class='form_item'>"
48
    Response.write "<option disabled selected value=''>Select SDK Family</option>"
49
		While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
50
			tempLINK = scriptName &"?FRsdk_id="& rsTemp.Fields("SDK_ID") &"&FRsdktag_id=&rtag_id="& parRtag_id &"&"& objPMod.ComposeURL()
51
 
52
            selStr = ""
53
			If NNsdk_id = Cstr(rsTemp.Fields("SDK_ID")) Then selStr = " selected"
54
	        Response.write "<option value='"& tempLINK &"'" & selStr & ">"& UCase(rsTemp.Fields("SDK_NAME")) &"</option>"
55
			rsTemp.MoveNext
56
		WEnd
57
	Response.write "</select>"
58
 
59
	rsTemp.Close
60
	Set rsTemp = nothing
61
End Sub
62
 
63
Sub Get_Release_Labels ( NNsdk_id, NNsdktag_id )
64
	Dim rsTemp, Query_String, tempLINK, selStr
65
	Query_String = "SELECT SDKTAG_ID,SDKTAG_NAME FROM SDK_TAGS WHERE sdk_id = "& NNsdk_id &"  AND  SDK_STATE='R' ORDER BY UPPER(SDKTAG_NAME)"
66
	Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
67
 
68
	Response.write "<select name='FRsdktag_id' onChange=""MM_jumpMenu('window',this,0)"" class='form_item'>"
69
		If NNsdk_id <> "-1" Then
70
			Response.write "<option disabled selected value=''>Select SDK Version</option>"
71
			While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
72
				tempLINK = scriptName &"?FRsdktag_id="& rsTemp.Fields("sdktag_id") &"&FRsdk_id="& NNsdk_id  &"&rtag_id="& parRtag_id &"&"& objPMod.ComposeURL()
73
 
74
                selStr = ""
75
				If NNsdktag_id = Cstr(rsTemp.Fields("sdktag_id")) Then selStr = " selected"
76
		        Response.write "<option value='"& tempLINK &"'" & selStr & ">"& (rsTemp.Fields("sdktag_name")) &"</option>"
77
				rsTemp.MoveNext
78
			WEnd
79
		End If
80
	Response.write "</select>"
81
 
82
	rsTemp.Close
83
	Set rsTemp = nothing
84
End Sub
85
 
86
%>
87
<html>
88
<head>
89
<title>Release Manager</title>
90
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
91
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
92
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
93
<link rel="stylesheet" href="images/navigation.css" type="text/css">
94
<script language="JavaScript" src="images/common.js"></script>
95
<script language="JavaScript">
96
function actionForm()
97
{
98
    MM_validateForm('FRsdk_id','SDK','R','FRsdktag_id','Version','R');
99
    if( document.MM_returnValue )
100
    {
101
        parent.closeIFrame('sdk_add_release.asp?rtag_id='+ <%=parRtag_id%> + "&sdk_id=" + <%=parFRsdk_id%> + "&sdktag_id=" +  <%=parFRsdktag_id%> );
102
    }
103
}
104
</script>
105
</head>
106
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
107
<form name="refSdk">
108
  <table width="100%" border="0" cellspacing="0" cellpadding="2" height="100%">
109
    <tr class="wform_ttl_bg"> 
110
      <td class="panel_bg" width="1%" height="1%">
111
        <img src="images/i_change_group_off.gif" width="22" height="25" hspace="5">
112
      </td>
113
      <td nowrap width="50%">Reference an SDK</td>
114
      <td align="right" width="50%"> 
115
<%If bLoggedIn AND bAuthorised Then%>
116
        <input type="submit" name="btn" value="Add" class="form_btn_comp" onClick="actionForm();return false">
117
<%End If%>
118
        <input type="reset" name="btn" value="Cancel" class="form_btn_comp" onclick="parent.closeIFrame();">
119
      </td>
120
      <td align="right" width="5px" nowrap></td>
121
    </tr>
122
    <tr> 
123
      <td height="100%" width="1%">&nbsp;</td>
124
      <td valign="top" nowrap colspan="3"> 
125
        <table width="100%" border="0" cellspacing="1" cellpadding="2">
126
          <tr> 
127
<%If NOT bLoggedIn Then%>
128
            <td colspan="2" valign="middle" nowrap class="form_group" style="height:30px"><img src="images/s_critical.gif"></img>You are not logged in</td>
129
<%ElseIf NOT bAuthorised Then %>    
130
            <td colspan="2" valign="middle" nowrap class="form_group" style="height:30px"><img src="images/s_critical.gif"></img>You are not Authorized to perform this action</td>
131
<%Else%>
132
            <td colspan="2" valign="middle" nowrap class="form_group" style="height:30px"><strong>NOTE:</strong> You can only reference a released SDK.</td>
133
<%End If%>
134
          </tr>
135
          <tr class="form_field_bg"> 
136
            <td width="1%" nowrap class="form_field">SDK</td>
137
            <td nowrap width="100%" class="form_text"> 
138
              <%Call Get_Projects (parFRsdk_id)%>
139
            </td>
140
          </tr>
141
          <tr class="form_field_bg"> 
142
            <td width="1%" nowrap class="form_field">Version</td>
143
            <td nowrap width="100%" class="form_text"> 
144
              <%Call Get_Release_Labels ( parFRsdk_id,  parFRsdktag_id )%>
145
              <input type="hidden" name="RefSdk_id" value="<%=parFRsdk_id%>">
146
			  <input type="hidden" name="RefSdkTag_id" value="<%=parFRsdktag_id%>">
147
			  <input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
148
              <input type="hidden" name="action" value="true">
149
            </td>
150
          </tr>
151
        </table>
152
      </td>
153
    </tr>
154
  </table>
155
</form>
156
</body>
157
</html>
158
 
159
 
160
<!-- DESTRUCTOR ------->
161
<!--#include file="common/destructor.asp"-->