Subversion Repositories DevTools

Rev

Rev 13 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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