| Line 1... |
Line 1... |
| 1 |
<%@LANGUAGE="VBSCRIPT"%>
|
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
| 2 |
<%
|
2 |
<%
|
| 3 |
'=====================================================
|
3 |
'=====================================================
|
| 4 |
'| |
|
4 |
'| |
|
| 5 |
'| NEW |
|
5 |
'| NEW |
|
| 6 |
'| PACKAGE |
|
6 |
'| PACKAGE |
|
| 7 |
'| |
|
7 |
'| |
|
| 8 |
'=====================================================
|
8 |
'=====================================================
|
| 9 |
%>
|
9 |
%>
|
| 10 |
<%
|
10 |
<%
|
| 11 |
Option explicit
|
11 |
Option explicit
|
| 12 |
' Good idea to set when using redirect
|
12 |
' Good idea to set when using redirect
|
| 13 |
Response.Expires = 0 ' always load the page, dont store
|
13 |
Response.Expires = 0 ' always load the page, dont store
|
| 14 |
%>
|
14 |
%>
|
| 15 |
<!--#include file="common/conf.asp"-->
|
15 |
<!--#include file="common/conf.asp"-->
|
| 16 |
<!--#include file="common/globals.asp"-->
|
16 |
<!--#include file="common/globals.asp"-->
|
| 17 |
<!--#include file="common/formating.asp"-->
|
17 |
<!--#include file="common/formating.asp"-->
|
| 18 |
<!--#include file="common/qstr.asp"-->
|
18 |
<!--#include file="common/qstr.asp"-->
|
| Line 41... |
Line 41... |
| 41 |
parPkg_name = Request.Cookies( COOKIE_NAME )( "pkgfind" )
|
41 |
parPkg_name = Request.Cookies( COOKIE_NAME )( "pkgfind" )
|
| 42 |
'----------------------------------------------
|
42 |
'----------------------------------------------
|
| 43 |
%>
|
43 |
%>
|
| 44 |
<%
|
44 |
<%
|
| 45 |
Sub Create_Package_Name ( SSpkg_name, retPKG_ID )
|
45 |
Sub Create_Package_Name ( SSpkg_name, retPKG_ID )
|
| 46 |
OraDatabase.Parameters.Add "PKG_NAME", Trim(SSpkg_name), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
46 |
OraDatabase.Parameters.Add "PKG_NAME", Trim(SSpkg_name), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
| 47 |
OraDatabase.Parameters.Add "retPKG_ID", 0, ORAPARM_OUTPUT, ORATYPE_NUMBER
|
47 |
OraDatabase.Parameters.Add "retPKG_ID", 0, ORAPARM_OUTPUT, ORATYPE_NUMBER
|
| 48 |
|
48 |
|
| - |
|
49 |
objEH.TryORA ( OraSession )
|
| 49 |
OraSession.BeginTrans
|
50 |
On Error Resume Next
|
| 50 |
|
51 |
|
| 51 |
OraDatabase.ExecuteSQL "BEGIN New_Package_Name ( :PKG_NAME, :retPKG_ID ); END;"
|
52 |
OraDatabase.ExecuteSQL "BEGIN New_Package_Name ( :PKG_NAME, :retPKG_ID ); END;"
|
| 52 |
|
53 |
|
| 53 |
retPKG_ID = OraDatabase.Parameters("retPKG_ID").Value
|
54 |
objEH.CatchORA ( OraSession )
|
| 54 |
|
55 |
|
| - |
|
56 |
retPKG_ID = OraDatabase.Parameters("retPKG_ID").Value
|
| - |
|
57 |
|
| 55 |
OraSession.CommitTrans
|
58 |
OraDatabase.Parameters.Remove "PKG_NAME"
|
| - |
|
59 |
OraDatabase.Parameters.Remove "retPKG_ID"
|
| 56 |
End Sub
|
60 |
End Sub
|
| 57 |
'-----------------------------------------------------------------------------------------------------------------------------
|
61 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| 58 |
Function Package_Name_Is_Valid ( SSpkg_name )
|
62 |
Function Package_Name_Is_Valid ( SSpkg_name )
|
| 59 |
Dim objRegExpr
|
63 |
Dim objRegExpr
|
| 60 |
Set objRegExpr = New regexp
|
64 |
Set objRegExpr = New regexp
|
| 61 |
|
65 |
|
| 62 |
objRegExpr.Pattern = "^[a-z][a-z0-9_-]*[a-z0-9]$"
|
66 |
objRegExpr.Pattern = "^[a-z][a-z0-9_-]*[a-z0-9]$"
|
| 63 |
objRegExpr.IgnoreCase = True
|
67 |
objRegExpr.IgnoreCase = True
|
| 64 |
|
68 |
|
| 65 |
Package_Name_Is_Valid = objRegExpr.Test(SSpkg_name)
|
69 |
Package_Name_Is_Valid = objRegExpr.Test(SSpkg_name)
|
| 66 |
End Function
|
70 |
End Function
|
| 67 |
'-----------------------------------------------------------------------------------------------------------------------------
|
71 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| 68 |
Function Package_Name_Exists ( SSpkg_name )
|
72 |
Function Package_Name_Exists ( SSpkg_name )
|
| 69 |
Dim sqlStr, rsQry
|
73 |
Dim sqlStr, rsQry
|
| 70 |
|
74 |
|
| 71 |
sqlStr = "SELECT pkg_name FROM packages WHERE UPPER(pkg_name) = UPPER('" & Trim(SSpkg_name) & "')"
|
75 |
sqlStr = "SELECT pkg_name FROM packages WHERE UPPER(pkg_name) = UPPER('" & Trim(SSpkg_name) & "')"
|
| 72 |
|
76 |
|
| 73 |
Set rsQry = OraDatabase.DbCreateDynaset( sqlStr, cint(0))
|
77 |
Set rsQry = OraDatabase.DbCreateDynaset( sqlStr, cint(0))
|
| 74 |
|
78 |
|
| 75 |
Package_Name_Exists = rsQry.recordCount > 0
|
79 |
Package_Name_Exists = rsQry.recordCount > 0
|
| 76 |
End Function
|
80 |
End Function
|
| 77 |
%>
|
81 |
%>
|
| 78 |
<%
|
82 |
<%
|
| 79 |
If CBool(Request("action")) Then
|
83 |
If CBool(Request("action")) Then
|
| 80 |
' Process Form
|
84 |
' Process Form
|
| 81 |
If Package_Name_Exists(Request("pkg_name")) Then
|
85 |
If Package_Name_Exists(Request("pkg_name")) Then
|
| 82 |
Response.Redirect ( scriptName &"?rtag_id="& parRtag_id &"&add_type="& parAdd_type &"&errmsg=exists" )
|
86 |
Response.Redirect ( scriptName &"?rtag_id="& parRtag_id &"&add_type="& parAdd_type &"&errmsg=exists" )
|
| 83 |
ElseIf Package_Name_Is_Valid(Request("pkg_name")) Then
|
87 |
ElseIf Package_Name_Is_Valid(Request("pkg_name")) Then
|
| 84 |
Call Create_Package_Name ( Request("pkg_name"), retPKG_ID )
|
88 |
Call Create_Package_Name ( Request("pkg_name"), retPKG_ID )
|
| 85 |
Response.Redirect ( "form_add_pkg_versions.asp?pv_id="& parPv_id &"&rtag_id="& parRtag_id &"&add_type="& parAdd_type &"&pkg_list="& retPKG_ID)
|
89 |
Response.Redirect ( "form_add_pkg_versions.asp?pv_id="& parPv_id &"&rtag_id="& parRtag_id &"&add_type="& parAdd_type &"&pkg_list="& retPKG_ID)
|
| 86 |
Else
|
90 |
Else
|
| 87 |
Response.Redirect ( scriptName &"?rtag_id="& parRtag_id &"&add_type="& parAdd_type &"&errmsg=invalid" )
|
91 |
Response.Redirect ( scriptName &"?rtag_id="& parRtag_id &"&add_type="& parAdd_type &"&errmsg=invalid" )
|
| 88 |
End If
|
92 |
End If
|
| 89 |
End If
|
93 |
End If
|
| 90 |
%>
|
94 |
%>
|
| 91 |
<html>
|
95 |
<html>
|
| 92 |
<head>
|
96 |
<head>
|
| 93 |
<title>Release Manager</title>
|
97 |
<title>Release Manager</title>
|
| Line 96... |
Line 100... |
| 96 |
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
|
100 |
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
|
| 97 |
<link rel="stylesheet" href="images/navigation.css" type="text/css">
|
101 |
<link rel="stylesheet" href="images/navigation.css" type="text/css">
|
| 98 |
<script language="JavaScript" src="images/common.js"></script>
|
102 |
<script language="JavaScript" src="images/common.js"></script>
|
| 99 |
<script language="JavaScript">
|
103 |
<script language="JavaScript">
|
| 100 |
<!--
|
104 |
<!--
|
| 101 |
function trimString(elementId)
|
105 |
function trimString(elementId)
|
| 102 |
{
|
106 |
{
|
| 103 |
var element = document.getElementById(elementId);
|
107 |
var element = document.getElementById(elementId);
|
| 104 |
if (element.value == null || element.value == "") return null;
|
108 |
if (element.value == null || element.value == "") return null;
|
| 105 |
element.value = element.value.replace(/^(\s+)?(.*\S)(\s+)?$/, '$2');
|
109 |
element.value = element.value.replace(/^(\s+)?(.*\S)(\s+)?$/, '$2');
|
| 106 |
}
|
110 |
}
|
| 107 |
//-->
|
111 |
//-->
|
| 108 |
</script>
|
112 |
</script>
|
| 109 |
<!-- DROPDOWN MENUS -->
|
113 |
<!-- DROPDOWN MENUS -->
|
| 110 |
<!--#include file="_menu_def.asp"-->
|
114 |
<!--#include file="_menu_def.asp"-->
|
| 111 |
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
|
115 |
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
|
| Line 122... |
Line 126... |
| 122 |
<!--#include file="_header.asp"-->
|
126 |
<!--#include file="_header.asp"-->
|
| 123 |
<!-- BODY ---->
|
127 |
<!-- BODY ---->
|
| 124 |
<table width="100%" height="80%" border="0" cellpadding="0" cellspacing="0">
|
128 |
<table width="100%" height="80%" border="0" cellpadding="0" cellspacing="0">
|
| 125 |
<tr>
|
129 |
<tr>
|
| 126 |
<td align="center" valign="top" background="images/bg_lght_gray.gif">
|
130 |
<td align="center" valign="top" background="images/bg_lght_gray.gif">
|
| 127 |
<!-- MIDDLE ---------------------------------------->
|
131 |
<!-- MIDDLE ---------------------------------------->
|
| 128 |
<table width="650" border="0" cellspacing="0" cellpadding="0">
|
132 |
<table width="650" border="0" cellspacing="0" cellpadding="0">
|
| 129 |
<tr>
|
133 |
<tr>
|
| 130 |
<td>
|
134 |
<td>
|
| 131 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
135 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
| 132 |
<tr>
|
136 |
<tr>
|
| 133 |
<td width="1%"></td>
|
137 |
<td width="1%"></td>
|
| 134 |
<td align="right"><img src="images/h_trsp_dot.gif" width="30" height="30"></td>
|
138 |
<td align="right"><img src="images/h_trsp_dot.gif" width="30" height="30"></td>
|
| 135 |
<td width="1%"></td>
|
139 |
<td width="1%"></td>
|
| 136 |
</tr>
|
140 |
</tr>
|
| 137 |
<tr>
|
141 |
<tr>
|
| 138 |
<td width="1%"></td>
|
142 |
<td width="1%"></td>
|
| 139 |
<td>
|
143 |
<td>
|
| 140 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
144 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
| 141 |
<tr>
|
145 |
<tr>
|
| 142 |
<td nowrap class="form_ttl">NEW package name</td>
|
146 |
<td nowrap class="form_ttl">NEW package name</td>
|
| 143 |
<td align="right" valign="bottom"></td>
|
147 |
<td align="right" valign="bottom"></td>
|
| 144 |
</tr>
|
148 |
</tr>
|
| 145 |
</table>
|
149 |
</table>
|
| 146 |
</td>
|
150 |
</td>
|
| 147 |
<td width="1%"></td>
|
151 |
<td width="1%"></td>
|
| 148 |
</tr>
|
152 |
</tr>
|
| 149 |
<tr>
|
153 |
<tr>
|
| 150 |
<td align="left" valign="top" width="1%" background="images/lbox_bg_blue.gif"><img src="images/lbox_tl_cnr_b.gif" width="13" height="13"></td>
|
154 |
<td align="left" valign="top" width="1%" background="images/lbox_bg_blue.gif"><img src="images/lbox_tl_cnr_b.gif" width="13" height="13"></td>
|
| 151 |
<td background="images/lbox_bg_blue.gif" class="lbox_ttl_w"><!-- Heading --><img src="images/h_trsp_dot.gif" width="1" height="20"><!-- END Heading --></td>
|
155 |
<td background="images/lbox_bg_blue.gif" class="lbox_ttl_w"><!-- Heading --><img src="images/h_trsp_dot.gif" width="1" height="20"><!-- END Heading --></td>
|
| 152 |
<td align="right" valign="top" width="1%" background="images/lbox_bg_blue.gif"><img src="images/lbox_tr_cnr_b.gif" width="13" height="13"></td>
|
156 |
<td align="right" valign="top" width="1%" background="images/lbox_bg_blue.gif"><img src="images/lbox_tr_cnr_b.gif" width="13" height="13"></td>
|
| 153 |
</tr>
|
157 |
</tr>
|
| 154 |
<tr>
|
158 |
<tr>
|
| 155 |
<td width="1%" bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
|
159 |
<td width="1%" bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
|
| 156 |
<td bgcolor="#FFFFFF" valign="top">
|
160 |
<td bgcolor="#FFFFFF" valign="top">
|
| 157 |
<!-- Body -->
|
161 |
<!-- Body -->
|
| 158 |
<table width="100%" border="0" cellspacing="1" cellpadding="2">
|
162 |
<table width="100%" border="0" cellspacing="1" cellpadding="2">
|
| 159 |
<form name="newpkg" method="post" action="<%=scriptName%>" onSubmit="trimString('pkgname');MM_validateForm('pkg_name','Package Name','R<%If parAdd_type = Cstr(enum_ADD_RUNTIME_DEPENDENCIES) Then%>notHTML<%Else%>isPackage<%End If%>');return document.MM_returnValue">
|
163 |
<form name="newpkg" method="post" action="<%=scriptName%>" onSubmit="trimString('pkgname');MM_validateForm('pkg_name','Package Name','R<%If parAdd_type = Cstr(enum_ADD_RUNTIME_DEPENDENCIES) Then%>notHTML<%Else%>isPackage<%End If%>');return document.MM_returnValue">
|
| 160 |
<tr>
|
164 |
<tr>
|
| 161 |
<td width="100%" colspan="3" nowrap align="center" class="form_group">
|
165 |
<td width="100%" colspan="3" nowrap align="center" class="form_group">
|
| 162 |
<%If parErrMsg = "invalid" Then
|
166 |
<%If parErrMsg = "invalid" Then
|
| 163 |
Call DisplayInfo( "PKG_NAME_INVALID", 420 )
|
167 |
Call DisplayInfo( "PKG_NAME_INVALID", 420 )
|
| 164 |
ElseIf parErrMsg = "exists" Then
|
168 |
ElseIf parErrMsg = "exists" Then
|
| 165 |
Call DisplayInfo( "PKG_NAME_EXISTS", 300 )
|
169 |
Call DisplayInfo( "PKG_NAME_EXISTS", 300 )
|
| 166 |
End If%>
|
170 |
End If%>
|
| 167 |
</td>
|
171 |
</td>
|
| 168 |
</tr>
|
172 |
</tr>
|
| 169 |
<tr>
|
173 |
<tr>
|
| 170 |
<td width="1%"> </td>
|
174 |
<td width="1%"> </td>
|
| 171 |
<td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif"><br>Package Name<br><br></td>
|
175 |
<td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif"><br>Package Name<br><br></td>
|
| 172 |
<td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="body_txt"><br><input name="pkg_name" type="text" class="form_item" id="pkgname" size="40" value="<%=parPkg_name%>"><br><br></td>
|
176 |
<td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="body_txt"><br><input name="pkg_name" type="text" class="form_item" id="pkgname" size="40" value="<%=parPkg_name%>"><br><br></td>
|
| 173 |
</tr>
|
177 |
</tr>
|
| 174 |
<tr>
|
178 |
<tr>
|
| 175 |
<td width="1%"> </td>
|
179 |
<td width="1%"> </td>
|
| 176 |
<td width="1%" nowrap class="form_field"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
|
180 |
<td width="1%" nowrap class="form_field"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
|
| 177 |
<td nowrap width="100%">
|
181 |
<td nowrap width="100%">
|
| 178 |
<input type="submit" name="btn" value="Create" class="form_btn">
|
182 |
<input type="submit" name="btn" value="Create" class="form_btn">
|
| 179 |
<input type="reset" name="btn" value="Cancel" class="form_btn" onClick="history.back();">
|
183 |
<input type="reset" name="btn" value="Cancel" class="form_btn" onClick="history.back();">
|
| 180 |
<br><br>
|
184 |
<br><br>
|
| 181 |
</td>
|
185 |
</td>
|
| 182 |
</tr>
|
186 |
</tr>
|
| 183 |
<input type="hidden" name="pv_id" value="<%=parPv_id%>">
|
187 |
<input type="hidden" name="pv_id" value="<%=parPv_id%>">
|
| 184 |
<input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
|
188 |
<input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
|
| 185 |
<input type="hidden" name="add_type" value="<%=parAdd_type%>">
|
189 |
<input type="hidden" name="add_type" value="<%=parAdd_type%>">
|
| 186 |
<input type="hidden" name="action" value="true">
|
190 |
<input type="hidden" name="action" value="true">
|
| 187 |
</form>
|
191 |
</form>
|
| 188 |
</table>
|
192 |
</table>
|
| 189 |
<!-- END Body-->
|
193 |
<!-- END Body-->
|
| 190 |
</td>
|
194 |
</td>
|
| 191 |
<td width="1%" background="images/lbox_bgside_white.gif"> </td>
|
195 |
<td width="1%" background="images/lbox_bgside_white.gif"> </td>
|
| 192 |
</tr>
|
196 |
</tr>
|
| 193 |
<tr>
|
197 |
<tr>
|
| 194 |
<td width="1%" background="images/lbox_bg_blue.gif" valign="bottom"><img src="images/lbox_bl_cnr_b.gif" width="13" height="13"></td>
|
198 |
<td width="1%" background="images/lbox_bg_blue.gif" valign="bottom"><img src="images/lbox_bl_cnr_b.gif" width="13" height="13"></td>
|
| 195 |
<td background="images/lbox_bg_blue.gif"></td>
|
199 |
<td background="images/lbox_bg_blue.gif"></td>
|
| 196 |
<td width="1%" background="images/lbox_bg_blue.gif" valign="bottom" align="right"><img src="images/lbox_br_cnr_b.gif" width="13" height="13"></td>
|
200 |
<td width="1%" background="images/lbox_bg_blue.gif" valign="bottom" align="right"><img src="images/lbox_br_cnr_b.gif" width="13" height="13"></td>
|
| 197 |
</tr>
|
201 |
</tr>
|
| 198 |
</table>
|
202 |
</table>
|
| 199 |
</td>
|
203 |
</td>
|
| 200 |
</tr>
|
204 |
</tr>
|
| 201 |
</table>
|
205 |
</table>
|
| 202 |
<!-------------------------------------------------->
|
206 |
<!-------------------------------------------------->
|
| 203 |
</td>
|
207 |
</td>
|
| 204 |
</tr>
|
208 |
</tr>
|
| 205 |
<tr>
|
209 |
<tr>
|
| 206 |
<td valign="bottom" background="images/bg_lght_gray.gif">
|
210 |
<td valign="bottom" background="images/bg_lght_gray.gif">
|
| 207 |
<!-- FOOTER -->
|
211 |
<!-- FOOTER -->
|
| 208 |
<!--#include file="_footer.asp"-->
|
212 |
<!--#include file="_footer.asp"-->
|
| 209 |
</td>
|
213 |
</td>
|
| 210 |
</tr>
|
214 |
</tr>
|
| 211 |
</table>
|
215 |
</table>
|
| 212 |
</body>
|
216 |
</body>
|
| 213 |
</html>
|
217 |
</html>
|
| 214 |
<%
|
218 |
<%
|