| 4585 |
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="sec/Crypt.asp"-->
|
|
|
21 |
<!--#include file="common/_form_window_common.asp"-->
|
|
|
22 |
<!--#include file="_action_buttons.asp"-->
|
|
|
23 |
|
|
|
24 |
<!--#include file="class/classActionButtonControl.asp"-->
|
|
|
25 |
|
|
|
26 |
<%
|
|
|
27 |
'------------ ACCESS CONTROL ------------------
|
|
|
28 |
%>
|
|
|
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 |
Const LIMG_ROW_EDIT = "<img src='icons/i_edit.gif' width='16' height='16' border='0' hspace='2' title='Edit'>"
|
|
|
46 |
'------------ Variable Init -------------------
|
|
|
47 |
Set objBtnControl = New ActionButtonControl
|
|
|
48 |
SCRIPT_NAME = Mid(Request.ServerVariables("SCRIPT_NAME"), InStrRev(Request.ServerVariables("SCRIPT_NAME"), "/") + 1 )
|
|
|
49 |
parPkgId = Request("PkgId")
|
|
|
50 |
editMode = "none"
|
|
|
51 |
canEdit = false
|
|
|
52 |
'----------------------------------------------
|
|
|
53 |
%>
|
|
|
54 |
<%
|
|
|
55 |
'------------------------------------------------------------------------------
|
|
|
56 |
' Function: Get_Packages
|
|
|
57 |
' Description: Get a list of packages to be displayed
|
|
|
58 |
' Will be either selected by name or only packages with defined defaults
|
|
|
59 |
Function Get_Packages
|
|
|
60 |
If Request("pkgFilter") <> "" Then
|
|
|
61 |
Get_Packages = _
|
|
|
62 |
" SELECT * FROM PACKAGES " &_
|
|
|
63 |
" WHERE PKG_NAME LIKE '%"&Request("pkgFilter")&"%'" &_
|
|
|
64 |
" ORDER BY pkg_name ASC"
|
|
|
65 |
Else
|
|
|
66 |
Get_Packages = _
|
|
|
67 |
" SELECT * FROM PACKAGES " &_
|
|
|
68 |
" WHERE DEFAULT_PEGGED is not NULL " &_
|
|
|
69 |
" OR DEFAULT_ADVISORY_RIPPLE is not NULL" &_
|
|
|
70 |
" ORDER BY pkg_name ASC"
|
|
|
71 |
End If
|
|
|
72 |
End Function
|
|
|
73 |
'-------------Page Access Condition--------------------------------------------
|
|
|
74 |
If NOT objAccessControl.UserLogedIn Then
|
|
|
75 |
Response.Redirect("message.asp?msg=401-9")
|
|
|
76 |
End If
|
| 5061 |
dpurdie |
77 |
If canActionControlInProject("EditPackageProperties") Then
|
| 4585 |
dpurdie |
78 |
canEdit = true
|
|
|
79 |
Else
|
|
|
80 |
parPkgId = NULL
|
|
|
81 |
End If
|
|
|
82 |
'------------- Before Render --------------------------------------------------
|
|
|
83 |
'-------------------------------------------------
|
|
|
84 |
' Function: check2Yes
|
|
|
85 |
' Description: Convert the value of a checkbox into a 'Y" or a empty value
|
|
|
86 |
Function check2Yes(val)
|
|
|
87 |
If val = "on" Then
|
|
|
88 |
check2Yes = "'Y'"
|
|
|
89 |
Else
|
|
|
90 |
check2Yes = "''"
|
|
|
91 |
End If
|
|
|
92 |
End Function
|
|
|
93 |
'-------------------------------------------------
|
|
|
94 |
' Update edited values
|
|
|
95 |
If canEdit AND Request("action") = "update" AND parPkgId <> "" Then
|
|
|
96 |
sqlStr = "UPDATE PACKAGES SET" &_
|
|
|
97 |
" WIN_ELECTRONIC_NAME = '" & Request("WIN_ELECTRONIC_NAME") & "'"&_
|
|
|
98 |
",SUNOS_ELECTRONIC_NAME = '" & Request("SUNOS_ELECTRONIC_NAME") & "'"&_
|
|
|
99 |
",DEFAULT_PEGGED = " & check2Yes(Request("DEFAULT_PEGGED")) &_
|
|
|
100 |
",DEFAULT_ADVISORY_RIPPLE = " & check2Yes(Request("DEFAULT_ADVISORY_RIPPLE")) &_
|
|
|
101 |
" WHERE PKG_ID = '" & parPkgId & "'"
|
|
|
102 |
objEH.TryORA ( OraSession )
|
|
|
103 |
OraDatabase.ExecuteSQL sqlStr
|
|
|
104 |
objEH.CatchORA ( OraSession )
|
|
|
105 |
|
|
|
106 |
If objEH.Finally Then
|
|
|
107 |
Call OpenInWindow ( SCRIPT_NAME + "?pkgFilter=" + Request("pkgFilter") )
|
|
|
108 |
End If
|
|
|
109 |
End If
|
|
|
110 |
%>
|
|
|
111 |
<html>
|
|
|
112 |
<head>
|
|
|
113 |
<title>Package Administration</title>
|
|
|
114 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
|
|
115 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
116 |
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
|
|
|
117 |
<link rel="stylesheet" href="images/navigation.css" type="text/css">
|
|
|
118 |
<script language="JavaScript" src="images/common.js"></script>
|
|
|
119 |
<!-- DROPDOWN MENUS -->
|
|
|
120 |
<!--#include file="_menu_def.asp"-->
|
|
|
121 |
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
|
|
|
122 |
<!-- LOCAL STYLING -->
|
|
|
123 |
<style>
|
|
|
124 |
.edit {background-color:#FFFFE1}
|
|
|
125 |
.display {background-color:white}
|
|
|
126 |
.border {background-color:#F2F0E4}
|
|
|
127 |
.outerTable {background-color:#DAD7C8}
|
|
|
128 |
</style>
|
|
|
129 |
</head>
|
|
|
130 |
<body text="#000000" leftmargin="0" topmargin="0" >
|
|
|
131 |
<!-- MENU LAYERS -------------------------------------->
|
|
|
132 |
<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)">
|
|
|
133 |
</div>
|
|
|
134 |
<!-- TIPS LAYERS -------------------------------------->
|
|
|
135 |
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10"> </div>
|
|
|
136 |
<!-- HEADER -->
|
|
|
137 |
<!--#include file="_header.asp"-->
|
|
|
138 |
<div class="div_table">
|
|
|
139 |
<%
|
|
|
140 |
'-- FROM START ---------------------------------------------------------------------------------------------------------
|
|
|
141 |
objFormComponent.FormName = "PackageAdmin"
|
|
|
142 |
objFormComponent.Action = ScriptName
|
|
|
143 |
objFormComponent.OnSubmit = "ShowProgress();"
|
|
|
144 |
Call objFormComponent.FormStart()
|
|
|
145 |
%>
|
|
|
146 |
<span class="form_item">
|
|
|
147 |
Package Filter: <input type="text" name="pkgFilter" value="<%=Request("pkgFilter")%>">
|
|
|
148 |
</span>
|
|
|
149 |
<table class="embedded_table">
|
|
|
150 |
<tr>
|
|
|
151 |
<td class="outerTable">
|
|
|
152 |
<table width="100%" border="0" cellspacing="1" cellpadding="2">
|
|
|
153 |
<tr>
|
|
|
154 |
<td width="1%" class="border"></td>
|
|
|
155 |
<td width="1%" class="border body_col" nowrap>Package Name </td>
|
|
|
156 |
<td width="1%" class="border body_col" nowrap>SunOs Name</td>
|
|
|
157 |
<td width="1%" class="border body_col" nowrap>Windows Name</td>
|
|
|
158 |
<td width="1%" class="border body_col" nowrap>Default Peg</td>
|
|
|
159 |
<td width="1%" class="border body_col" nowrap>Default Ripple</td>
|
|
|
160 |
<td width="1%" class="border"> </td>
|
|
|
161 |
</tr>
|
|
|
162 |
<!-- NORMAL ROW +++++++++++++++++++ -->
|
|
|
163 |
<%Set rsPkg = OraDatabase.DbCreateDynaset( Get_Packages, cint(0))
|
|
|
164 |
While ((NOT rsPkg.BOF) AND (NOT rsPkg.EOF))
|
|
|
165 |
peg_checked = ""
|
|
|
166 |
adr_checked = ""
|
|
|
167 |
If rsPkg.Fields("DEFAULT_PEGGED") = "Y" Then peg_checked = "checked"
|
|
|
168 |
If rsPkg.Fields("DEFAULT_ADVISORY_RIPPLE") = "Y" Then adr_checked = "checked"
|
|
|
169 |
If parPkgId = rsPkg.Fields("PKG_ID") THEN
|
|
|
170 |
rowClass = "class='body_row edit'"
|
|
|
171 |
rowBorder = "class='edit'"
|
|
|
172 |
editMode = "update"
|
|
|
173 |
Else
|
|
|
174 |
rowClass = "class='body_row display'"
|
|
|
175 |
rowBorder = "class='border'"
|
|
|
176 |
End If
|
|
|
177 |
|
|
|
178 |
%>
|
|
|
179 |
<tr>
|
|
|
180 |
<td <%=rowBorder%> align="center"></td>
|
|
|
181 |
<td <%=rowClass%> nowrap><%=rsPkg.Fields("PKG_NAME")%></td>
|
|
|
182 |
<%If parPkgId = rsPkg.Fields("PKG_ID") THEN%>
|
|
|
183 |
<td <%=rowClass%> nowrap>
|
|
|
184 |
<input type="text" name="SUNOS_ELECTRONIC_NAME" class='form_iname' value="<%=rsPkg.Fields("SUNOS_ELECTRONIC_NAME")%>">
|
|
|
185 |
</td>
|
|
|
186 |
<td <%=rowClass%> nowrap>
|
|
|
187 |
<input type="text" name="WIN_ELECTRONIC_NAME" class='form_iname' value="<%=rsPkg.Fields("WIN_ELECTRONIC_NAME")%>">
|
|
|
188 |
</td>
|
|
|
189 |
<td <%=rowClass%>" nowrap>
|
|
|
190 |
<input type="checkbox" name="DEFAULT_PEGGED" class='form_iname' <%=peg_checked%>>
|
|
|
191 |
</td>
|
|
|
192 |
<td <%=rowClass%>" nowrap>
|
|
|
193 |
<input type="checkbox" name="DEFAULT_ADVISORY_RIPPLE" class='form_iname'<%=adr_checked%>>
|
|
|
194 |
</td>
|
|
|
195 |
<%ELSE%>
|
|
|
196 |
<td <%=rowClass%> nowrap><%=rsPkg.Fields("SUNOS_ELECTRONIC_NAME")%></td>
|
|
|
197 |
<td <%=rowClass%> nowrap><%=rsPkg.Fields("WIN_ELECTRONIC_NAME")%></td>
|
|
|
198 |
<td <%=rowClass%> nowrap><input type="checkbox" disabled <%=peg_checked%>></td>
|
|
|
199 |
<td <%=rowClass%> nowrap><input type="checkbox" disabled <%=adr_checked%>></td>
|
|
|
200 |
<%END IF%>
|
|
|
201 |
|
|
|
202 |
<td align="center" nowrap <%=rowBorder%>>
|
|
|
203 |
<%If parPkgId = rsPkg.Fields("PKG_ID") THEN%>
|
|
|
204 |
<%=LIMG_ROW_SUBMIT %>
|
|
|
205 |
<a href="<%=SCRIPT_NAME%>?pkgFilter=<%=Request("pkgFilter")%>"><%=LIMG_ROW_CANCEL%></a>
|
|
|
206 |
<%ELSEIF parPkgId <> "" OR NOT canEdit THEN%>
|
|
|
207 |
<%ELSE%>
|
|
|
208 |
<a href="<%=SCRIPT_NAME%>?action=edit&pkgId=<%=rsPkg.Fields("PKG_ID")%>&pkgFilter=<%=Request("pkgFilter")%>"><%=LIMG_ROW_EDIT %></a>
|
|
|
209 |
<%END IF%>
|
|
|
210 |
</td>
|
|
|
211 |
</tr>
|
|
|
212 |
<%
|
|
|
213 |
rsPkg.MoveNext
|
|
|
214 |
WEnd
|
|
|
215 |
<!-- ++ Error Message Display ++++++++ -->
|
|
|
216 |
If rsPkg.RecordCount < 1 Then
|
|
|
217 |
%>
|
|
|
218 |
<tr>
|
|
|
219 |
<td class="border"></td>
|
|
|
220 |
<td colspan="5" nowrap class="display err_alert" style="text-align: center">
|
|
|
221 |
<b>No packages selected by filters</b>
|
|
|
222 |
</td>
|
|
|
223 |
<td class="border"></td>
|
|
|
224 |
</tr>
|
|
|
225 |
<%End If%>
|
|
|
226 |
<!-- +++++++++++++++++++++++++++++++++ -->
|
|
|
227 |
<tr>
|
|
|
228 |
<td class="border"</td>
|
|
|
229 |
<td class="border"</td>
|
|
|
230 |
<td class="border"</td>
|
|
|
231 |
<td class="border"</td>
|
|
|
232 |
<td class="border"</td>
|
|
|
233 |
<td class="border"</td>
|
|
|
234 |
<td class="border"</td>
|
|
|
235 |
</tr>
|
|
|
236 |
</table>
|
|
|
237 |
</td>
|
|
|
238 |
</tr>
|
|
|
239 |
<%=objPMod.ComposeHiddenTags()%>
|
|
|
240 |
<input type="hidden" name="action" value=<%=editMode%>>
|
|
|
241 |
<input type="hidden" name="pkgId" value="<%=parPkgId%>">
|
|
|
242 |
</form>
|
|
|
243 |
<%Call objFormComponent.FormEnd()%>
|
|
|
244 |
</table>
|
|
|
245 |
</div>
|
|
|
246 |
</body>
|
|
|
247 |
</html>
|
|
|
248 |
<!-- FOOTER -->
|
|
|
249 |
<!--#include file="_footer.asp"-->
|
|
|
250 |
<%
|
|
|
251 |
Call Destroy_All_Objects
|
|
|
252 |
%>
|