| 5357 |
dpurdie |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
'=====================================================
|
|
|
4 |
'| |
|
|
|
5 |
'| ADMIN Page |
|
|
|
6 |
'| Package Properties |
|
|
|
7 |
'| |
|
|
|
8 |
'=====================================================
|
|
|
9 |
%>
|
|
|
10 |
<%
|
|
|
11 |
Option explicit
|
|
|
12 |
' Good idea to set when using redirect
|
|
|
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/formating.asp"-->
|
|
|
18 |
<!--#include file="common/qstr.asp"-->
|
|
|
19 |
<!--#include file="common/common_subs.asp"-->
|
|
|
20 |
<!--#include file="common/_form_window_common.asp"-->
|
|
|
21 |
<!--#include file="_action_buttons.asp"-->
|
|
|
22 |
|
|
|
23 |
<!--#include file="class/classActionButtonControl.asp"-->
|
|
|
24 |
|
|
|
25 |
<%
|
|
|
26 |
'------------ ACCESS CONTROL ------------------
|
|
|
27 |
%>
|
| 6181 |
dpurdie |
28 |
<!--#include file="_access_control_login_optional.asp"-->
|
| 5357 |
dpurdie |
29 |
<!--#include file="_access_control_general.asp"-->
|
|
|
30 |
<%
|
|
|
31 |
'------------ Variable Definition -------------
|
|
|
32 |
Dim objBtnControl
|
|
|
33 |
Dim rsPkg
|
|
|
34 |
Dim SCRIPT_NAME
|
|
|
35 |
Dim peg_checked
|
|
|
36 |
Dim adr_checked
|
|
|
37 |
Dim parPkgId
|
|
|
38 |
Dim editMode
|
|
|
39 |
Dim SqlStr
|
|
|
40 |
Dim canEdit
|
|
|
41 |
Dim rowClass, rowBorder
|
|
|
42 |
'------------ Constants Declaration -----------
|
|
|
43 |
Const LIMG_ROW_SUBMIT = "<input name='btn' type='image' src='icons/btn_row_submit.gif' width='53' height='16' hspace='2' border='0' title='Submit this entry'>"
|
|
|
44 |
Const LIMG_ROW_CANCEL = "<img src='icons/bi_cancel.gif' width='16' height='16' border='0' hspace='2' title='Cancel'>"
|
|
|
45 |
'------------ Variable Init -------------------
|
|
|
46 |
Set objBtnControl = New ActionButtonControl
|
|
|
47 |
SCRIPT_NAME = Mid(Request.ServerVariables("SCRIPT_NAME"), InStrRev(Request.ServerVariables("SCRIPT_NAME"), "/") + 1 )
|
|
|
48 |
parPkgId = Request("PkgId")
|
|
|
49 |
editMode = "none"
|
|
|
50 |
canEdit = false
|
|
|
51 |
'----------------------------------------------
|
|
|
52 |
%>
|
|
|
53 |
<%
|
|
|
54 |
'------------------------------------------------------------------------------
|
|
|
55 |
' Function: Get_Packages
|
|
|
56 |
' Description: Get a list of packages to be displayed
|
|
|
57 |
' Will be either selected by name or only packages with defined defaults
|
|
|
58 |
Function Get_Packages
|
|
|
59 |
If Request("pkgFilter") <> "" Then
|
|
|
60 |
Get_Packages = _
|
|
|
61 |
" SELECT * FROM PACKAGES " &_
|
|
|
62 |
" WHERE PKG_NAME LIKE '%"&Request("pkgFilter")&"%'" &_
|
|
|
63 |
" ORDER BY pkg_name ASC"
|
|
|
64 |
Else
|
|
|
65 |
Get_Packages = _
|
|
|
66 |
" SELECT * FROM PACKAGES " &_
|
|
|
67 |
" WHERE DEFAULT_PEGGED is not NULL " &_
|
|
|
68 |
" OR DEFAULT_ADVISORY_RIPPLE is not NULL" &_
|
|
|
69 |
" ORDER BY pkg_name ASC"
|
|
|
70 |
End If
|
|
|
71 |
End Function
|
|
|
72 |
'-------------Page Access Condition--------------------------------------------
|
|
|
73 |
If canActionControlInProject("EditPackageProperties") Then
|
|
|
74 |
canEdit = true
|
|
|
75 |
Else
|
|
|
76 |
parPkgId = NULL
|
|
|
77 |
End If
|
|
|
78 |
'------------- Before Render --------------------------------------------------
|
|
|
79 |
'-------------------------------------------------
|
|
|
80 |
' Function: check2Yes
|
|
|
81 |
' Description: Convert the value of a checkbox into a 'Y" or a empty value
|
|
|
82 |
Function check2Yes(val)
|
|
|
83 |
If val = "on" Then
|
|
|
84 |
check2Yes = "'Y'"
|
|
|
85 |
Else
|
|
|
86 |
check2Yes = "''"
|
|
|
87 |
End If
|
|
|
88 |
End Function
|
|
|
89 |
'-------------------------------------------------
|
|
|
90 |
' Update edited values
|
|
|
91 |
If canEdit AND Request("action") = "update" AND parPkgId <> "" Then
|
|
|
92 |
sqlStr = "UPDATE PACKAGES SET" &_
|
|
|
93 |
" WIN_ELECTRONIC_NAME = '" & Request("WIN_ELECTRONIC_NAME") & "'"&_
|
|
|
94 |
",SUNOS_ELECTRONIC_NAME = '" & Request("SUNOS_ELECTRONIC_NAME") & "'"&_
|
|
|
95 |
",DEFAULT_PEGGED = " & check2Yes(Request("DEFAULT_PEGGED")) &_
|
|
|
96 |
",DEFAULT_ADVISORY_RIPPLE = " & check2Yes(Request("DEFAULT_ADVISORY_RIPPLE")) &_
|
|
|
97 |
" WHERE PKG_ID = '" & parPkgId & "'"
|
|
|
98 |
objEH.TryORA ( OraSession )
|
| 5963 |
dpurdie |
99 |
On Error Resume Next
|
| 5357 |
dpurdie |
100 |
OraDatabase.ExecuteSQL sqlStr
|
|
|
101 |
objEH.CatchORA ( OraSession )
|
|
|
102 |
|
|
|
103 |
If objEH.Finally Then
|
|
|
104 |
Call OpenInWindow ( SCRIPT_NAME + "?pkgFilter=" + Request("pkgFilter") )
|
|
|
105 |
End If
|
| 5963 |
dpurdie |
106 |
On Error GoTo 0
|
| 5357 |
dpurdie |
107 |
End If
|
|
|
108 |
%>
|
|
|
109 |
<html>
|
|
|
110 |
<head>
|
|
|
111 |
<title>Package Administration</title>
|
|
|
112 |
<link rel="shortcut icon" href="<%=FavIcon%>"/>
|
|
|
113 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
|
|
114 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
| 6579 |
dpurdie |
115 |
<link rel="stylesheet" href="images/release_manager_style.css?ver=<%=VixVerNum%>" type="text/css">
|
|
|
116 |
<link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css">
|
|
|
117 |
<script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script>
|
| 5983 |
dpurdie |
118 |
<!--#include file="_jquery_includes.asp"-->
|
| 5357 |
dpurdie |
119 |
<!-- DROPDOWN MENUS -->
|
|
|
120 |
<!--#include file="_menu_def.asp"-->
|
| 6579 |
dpurdie |
121 |
<script language="JavaScript1.2" src="images/popup_menu.js?ver=<%=VixVerNum%>"></script>
|
| 5357 |
dpurdie |
122 |
<!-- LOCAL STYLING -->
|
|
|
123 |
<style>
|
|
|
124 |
.edit {background-color:#FFFFE1}
|
|
|
125 |
.display {background-color:white}
|
|
|
126 |
.border {background-color:#F2F0E4}
|
|
|
127 |
</style>
|
|
|
128 |
</head>
|
|
|
129 |
<body text="#000000" leftmargin="0" topmargin="0" >
|
|
|
130 |
<!-- HEADER -->
|
|
|
131 |
<!--#include file="_header.asp"-->
|
|
|
132 |
<div class="div_table">
|
|
|
133 |
<%
|
|
|
134 |
'-- FROM START ---------------------------------------------------------------------------------------------------------
|
|
|
135 |
objFormComponent.FormName = "PackageAdmin"
|
|
|
136 |
objFormComponent.Action = ScriptName
|
|
|
137 |
objFormComponent.OnSubmit = "ShowProgress();"
|
|
|
138 |
Call objFormComponent.FormStart()
|
|
|
139 |
%>
|
| 6793 |
dpurdie |
140 |
<table class="embedded_table center_table">
|
| 5357 |
dpurdie |
141 |
<tr>
|
| 6793 |
dpurdie |
142 |
<td>
|
|
|
143 |
<span class="form_item">
|
|
|
144 |
Package Filter: <input type="text" name="pkgFilter" value="<%=Request("pkgFilter")%>">
|
|
|
145 |
</span>
|
|
|
146 |
<table border="0" cellspacing="1" cellpadding="2" class='stdBrown center_table'>
|
|
|
147 |
<thead>
|
|
|
148 |
<tr>
|
|
|
149 |
<th nowrap>Package Name </th>
|
|
|
150 |
<th nowrap>SunOs Name</th>
|
|
|
151 |
<th nowrap>Windows Name</th>
|
|
|
152 |
<th nowrap>Default Peg</th>
|
|
|
153 |
<th nowrap>Default Ripple</th>
|
| 7245 |
dpurdie |
154 |
<th class=tight>Edit</th>
|
| 6793 |
dpurdie |
155 |
</tr>
|
|
|
156 |
</thead>
|
| 5357 |
dpurdie |
157 |
<!-- NORMAL ROW +++++++++++++++++++ -->
|
|
|
158 |
<%Set rsPkg = OraDatabase.DbCreateDynaset( Get_Packages, cint(0))
|
|
|
159 |
While ((NOT rsPkg.BOF) AND (NOT rsPkg.EOF))
|
|
|
160 |
peg_checked = ""
|
|
|
161 |
adr_checked = ""
|
|
|
162 |
If rsPkg.Fields("DEFAULT_PEGGED") = "Y" Then peg_checked = "checked"
|
|
|
163 |
If rsPkg.Fields("DEFAULT_ADVISORY_RIPPLE") = "Y" Then adr_checked = "checked"
|
|
|
164 |
If parPkgId = rsPkg.Fields("PKG_ID") THEN
|
| 6793 |
dpurdie |
165 |
rowClass = "class='edit'"
|
| 7245 |
dpurdie |
166 |
rowBorder = "class='edit tight'"
|
| 5357 |
dpurdie |
167 |
editMode = "update"
|
|
|
168 |
Else
|
| 6793 |
dpurdie |
169 |
rowClass = "class='display'"
|
| 7245 |
dpurdie |
170 |
rowBorder = "class='border tight'"
|
| 5357 |
dpurdie |
171 |
End If
|
|
|
172 |
|
|
|
173 |
%>
|
|
|
174 |
<tr>
|
|
|
175 |
<td <%=rowClass%> nowrap><%=rsPkg.Fields("PKG_NAME")%></td>
|
|
|
176 |
<%If parPkgId = rsPkg.Fields("PKG_ID") THEN%>
|
|
|
177 |
<td <%=rowClass%> nowrap>
|
|
|
178 |
<input type="text" name="SUNOS_ELECTRONIC_NAME" class='form_iname' value="<%=rsPkg.Fields("SUNOS_ELECTRONIC_NAME")%>">
|
|
|
179 |
</td>
|
|
|
180 |
<td <%=rowClass%> nowrap>
|
|
|
181 |
<input type="text" name="WIN_ELECTRONIC_NAME" class='form_iname' value="<%=rsPkg.Fields("WIN_ELECTRONIC_NAME")%>">
|
|
|
182 |
</td>
|
|
|
183 |
<td <%=rowClass%>" nowrap>
|
|
|
184 |
<input type="checkbox" name="DEFAULT_PEGGED" class='form_iname' <%=peg_checked%>>
|
|
|
185 |
</td>
|
|
|
186 |
<td <%=rowClass%>" nowrap>
|
|
|
187 |
<input type="checkbox" name="DEFAULT_ADVISORY_RIPPLE" class='form_iname'<%=adr_checked%>>
|
|
|
188 |
</td>
|
|
|
189 |
<%ELSE%>
|
|
|
190 |
<td <%=rowClass%> nowrap><%=rsPkg.Fields("SUNOS_ELECTRONIC_NAME")%></td>
|
|
|
191 |
<td <%=rowClass%> nowrap><%=rsPkg.Fields("WIN_ELECTRONIC_NAME")%></td>
|
|
|
192 |
<td <%=rowClass%> nowrap><input type="checkbox" disabled <%=peg_checked%>></td>
|
|
|
193 |
<td <%=rowClass%> nowrap><input type="checkbox" disabled <%=adr_checked%>></td>
|
|
|
194 |
<%END IF%>
|
|
|
195 |
|
|
|
196 |
<td align="center" nowrap <%=rowBorder%>>
|
|
|
197 |
<%If parPkgId = rsPkg.Fields("PKG_ID") THEN%>
|
|
|
198 |
<%=LIMG_ROW_SUBMIT %>
|
|
|
199 |
<a href="<%=SCRIPT_NAME%>?pkgFilter=<%=Request("pkgFilter")%>"><%=LIMG_ROW_CANCEL%></a>
|
|
|
200 |
<%ELSEIF parPkgId <> "" OR NOT canEdit THEN%>
|
|
|
201 |
<%ELSE%>
|
| 6783 |
dpurdie |
202 |
<a href="<%=SCRIPT_NAME%>?action=edit&pkgId=<%=rsPkg.Fields("PKG_ID")%>&pkgFilter=<%=Request("pkgFilter")%>"><span title='Edit'><%=LIMG_EDIT %></span></a>
|
| 5357 |
dpurdie |
203 |
<%END IF%>
|
|
|
204 |
</td>
|
|
|
205 |
</tr>
|
|
|
206 |
<%
|
|
|
207 |
rsPkg.MoveNext
|
|
|
208 |
WEnd
|
|
|
209 |
<!-- ++ Error Message Display ++++++++ -->
|
|
|
210 |
If rsPkg.RecordCount < 1 Then
|
|
|
211 |
%>
|
|
|
212 |
<tr>
|
| 6793 |
dpurdie |
213 |
<td align=center colspan="5" nowrap class="display err_alert">
|
| 5357 |
dpurdie |
214 |
<b>No packages selected by filters</b>
|
|
|
215 |
</td>
|
|
|
216 |
<td class="border"></td>
|
|
|
217 |
</tr>
|
|
|
218 |
<%End If%>
|
|
|
219 |
</table>
|
|
|
220 |
</td>
|
|
|
221 |
</tr>
|
|
|
222 |
<%=objPMod.ComposeHiddenTags()%>
|
|
|
223 |
<input type="hidden" name="action" value=<%=editMode%>>
|
|
|
224 |
<input type="hidden" name="pkgId" value="<%=parPkgId%>">
|
|
|
225 |
</form>
|
|
|
226 |
<%Call objFormComponent.FormEnd()%>
|
|
|
227 |
</table>
|
|
|
228 |
</div>
|
| 5957 |
dpurdie |
229 |
<!-- FOOTER -->
|
|
|
230 |
<!--#include file="_footer.asp"-->
|
| 5357 |
dpurdie |
231 |
</body>
|
|
|
232 |
</html>
|