Subversion Repositories DevTools

Rev

Rev 5958 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5355 dpurdie 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|                                                   |
5
'|			          wAddProdGetVersion		 	 |
6
'|                                                   |
7
'=====================================================
8
%>
9
<%
10
Option explicit
11
Response.Expires = 0
12
%>
13
<!--#include file="common/globals.asp"-->
14
<!--#include file="common/config.asp"-->
15
<!--#include file="common/common_subs.asp"-->
16
<!--#include file="common/_popup_window_common.asp"-->
17
<%
18
'------------ ACCESS CONTROL ------------------
19
%>
20
<!--#include file="_access_control_general.asp"-->
21
<%
22
'------------ VARIABLE DEFINITION -------------
23
Dim rsQry
24
Dim parPkg_id_list
25
Dim objPopupMenuVersions
26
Dim aProductNames
27
Dim numOfRows
28
Dim rowNum
29
'------------ CONSTANTS DECLARATION -----------
30
'------------ VARIABLE INIT -------------------
31
parBom_id = Request("bom_id")
32
parPkg_id_list = Request("pkg_id_list")
33
parOs_id = Request("os_id")
34
'------------ CONDITIONS ----------------------
35
'Set objPopupMenuVersions = New PopupMenuControl
36
'----------------------------------------------
37
%>
38
<%
39
'--------------------------------------------------------------------------------------------------------------------------
40
Sub GetProductNames ( sPkg_id_list, outProductNames )
41
	Dim rsQry, query
42
 
43
	query = _
44
	" SELECT pkg.pkg_id, pkg.pkg_name "&_
45
	"   FROM PACKAGES pkg"&_
46
	"  WHERE pkg.pkg_id IN ("& sPkg_id_list &")"&_
47
	"  ORDER BY UPPER(pkg.pkg_name)"
48
 
49
	Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
50
 
51
	If rsQry.RecordCount > 0 Then
52
		outProductNames = rsQry.GetRows()
53
	End If
54
 
55
End Sub
56
'--------------------------------------------------------------------------------------------------------------------------
57
Function GetVersions ( nPkg_id )
58
	Dim rsQry, query
59
 
60
	query = _
61
	" SELECT pv.pv_id, pv.pkg_version "&_
62
	"   FROM PACKAGE_VERSIONS pv"&_
63
	"  WHERE pv.pkg_id = :PKG_ID"&_
64
	"  ORDER BY UPPER(pv.pkg_version)"
65
 
66
	OraDatabase.Parameters.Add "PKG_ID", nPkg_id,	ORAPARM_INPUT, ORATYPE_NUMBER
67
 
68
	Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
69
 
70
	If rsQry.RecordCount > 0 Then
71
		GetVersions = rsQry.GetRows()
72
	Else
73
		GetVersions = NULL
74
	End If
75
 
76
	OraDatabase.Parameters.Remove "PKG_ID"
77
 
78
End Function
79
'--------------------------------------------------------------------------------------------------------------------------
80
Sub RunRequirement ()
81
	On Error Resume Next
82
	objEH.ErrorRedirect = TRUE
83
 
84
	objEH.Try
85
		If Request("pkg_id_list") = "" Then
86
			Err.Raise 8, "Please select at least one Product.", ""
87
 
88
		End If
89
	objEH.Catch
90
 
91
End Sub
92
'--------------------------------------------------------------------------------------------------------------------------
93
%>
94
<%
95
'------------ RUN BEFORE PAGE RENDER ----------
96
objPMod.PersistInQryString ( Array("base_env_id") )
97
 
98
Call RunRequirement()
99
'----------------------------------------------
100
%>
101
<html>
102
<head>
103
<title>Deployment 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">
6663 dpurdie 107
<link href="scripts/deployment_manager.css?ver=<%=VixVerNum%>" rel="stylesheet" type="text/css">
108
<script language="JavaScript" src="scripts/common.js?ver=<%=VixVerNum%>"></script>
5355 dpurdie 109
</head>
110
 
111
<body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0" onLoad="self.focus();">
112
<table width="100%"  border="0" cellspacing="0" cellpadding="10">
113
  <tr>
114
    <td bgcolor="#FFFFFF" class="body_txt"><span class="body_h1"><img src="icons/i_linkarrow_black.gif" width="11" height="11" align="absmiddle">&nbsp;Add Product </span> <br><br>
115
 
116
      </td>
117
  </tr>
118
  <%
119
  '-- FROM START ---------------------------------------------------------------------------------------------------------
120
  objFormComponent.FormName = "FormVersion"
121
  objFormComponent.Action = "_AddProd.asp"
122
  objFormComponent.OnSubmit = "ShowProgress();"
123
  Call objFormComponent.FormStart()
124
  %>
125
  <tr>
126
    <td background="images/bg_login.gif"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
127
      <tr>
128
        <td><%=ProgressBar()%></td>
129
        <td align="right"><input name="btn" type="reset" class="form_btn" value="&laquo; Back" onClick="history.back();">
130
        <input name="btn" type="reset" class="form_btn" value="Next &raquo;" disabled>
131
        &nbsp;&nbsp;
132
        <input name="btn" type="submit" class="form_btn" value="Add">
133
          <input name="btn" type="reset" class="form_btn" value="Cancel" onClick="self.close();"></td>
134
      </tr>
135
    </table></td>
136
  </tr>
137
  <tr>
138
    <td>
139
<!-- PRODUCT NAME RESULTS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->		
140
	<table width="100%"  border="0" cellspacing="10" cellpadding="0">
141
      <tr>
142
        <td width="100%" valign="top" nowrap class="body_txt">Enter Product Version, optional Installation Comments and click Add.
143
 
144
          <table width="100%"  border="0" cellspacing="3" cellpadding="0">
145
            <tr>
146
              <td width="1" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
147
              <td width="100%" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
148
            </tr>
149
			<%
150
			Call GetProductNames ( parPkg_id_list, aProductNames )
151
			numOfRows = UBound( aProductNames, 2 )
152
 
153
			For rowNum = 0 To numOfRows
154
			%>
155
            <tr>
156
              <td align="right" valign="top" nowrap class="body_col">Product Name </td>
157
              <td class="body_txt"><img src="icons/i_product.gif" width="19" height="19" hspace="2" align="absmiddle"><%=aProductNames( 1, rowNum )%></td>
158
            </tr>
159
            <tr>
160
              <td align="right" valign="top" nowrap class="body_col">Version</td>
161
              <td class="body_rowg"><%=objFormComponent.ComboWithText ( "pkgid"& aProductNames( 0, rowNum ), NULL, GetVersions( aProductNames( 0, rowNum ) ), "class='form_ivalue'" )%></td>
162
            </tr>
163
            <tr>
164
              <td align="right" valign="top" nowrap class="body_col">Installation Comments</td>
165
              <td class="body_rowg"><%=objFormComponent.TextArea ( "comments"& aProductNames( 0, rowNum ), NULL, 5, 60, "class='form_ivalue'" )%><br><br><br></td>
166
            </tr>
167
            <tr>
168
              <td colspan="2" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
169
            </tr>
170
			<%
171
			Next
172
			%>
173
          </table></td>
174
        </tr>
175
 
176
    </table>
177
	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
178
    </td>
179
  </tr>
180
  <%=objPMod.ComposeHiddenTags()%>
181
  <input type="hidden" name="pkg_id_list" value="<%=parPkg_id_list%>">
182
  <input type="hidden" name="action" value="true">
183
  <%
184
  Call objFormComponent.FormEnd()
185
  '-- FROM END ----------------------------------------------------------------------------------------------------------------
186
  %>
187
</table>
188
</body>
189
</html>
5958 dpurdie 190
<!--#include file="common/globals_destructor.asp"-->