Subversion Repositories DevTools

Rev

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

Rev 3959 Rev 5357
Line 1... Line 1...
1
<%@LANGUAGE="VBSCRIPT"%>
1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
2
<%
3
'=====================================================
3
'=====================================================
4
'|                                                   |
4
'|                                                   |
5
'|                   wAddProjectExtension            |
5
'|                   wAddProjectExtension            |
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/conf.asp"-->
13
<!--#include file="common/conf.asp"-->
14
<!--#include file="common/globals.asp"-->
14
<!--#include file="common/globals.asp"-->
15
<!--#include file="common/formating.asp"-->
15
<!--#include file="common/formating.asp"-->
16
<!--#include file="common/qstr.asp"-->
16
<!--#include file="common/qstr.asp"-->
17
<!--#include file="common/common_subs.asp"-->
17
<!--#include file="common/common_subs.asp"-->
18
<!--#include file="common/_form_window_common.asp"-->
18
<!--#include file="common/_form_window_common.asp"-->
19
<!-- #INCLUDE FILE="common/adovbs.inc" -->
19
<!-- #INCLUDE FILE="common/adovbs.inc" -->
20
 
20
 
21
 
21
 
22
<%
22
<%
23
'------------ ACCESS CONTROL ------------------
23
'------------ ACCESS CONTROL ------------------
24
%>
24
%>
25
<!--#include file="_access_control_general.asp"-->
25
<!--#include file="_access_control_general.asp"-->
26
<!--#include file="_access_control_login.asp"-->
26
<!--#include file="_access_control_login.asp"-->
27
<%
27
<%
28
'------------ VARIABLE DEFINITION -------------
28
'------------ VARIABLE DEFINITION -------------
29
Dim rsQry
29
Dim rsQry
30
Dim sMessage
30
Dim sMessage
31
Dim Query_String
31
Dim Query_String
32
 
32
 
33
'------------ CONSTANTS DECLARATION -----------
33
'------------ CONSTANTS DECLARATION -----------
34
'------------ VARIABLE INIT -------------------
34
'------------ VARIABLE INIT -------------------
35
sMessage = NULL
35
sMessage = NULL
36
 
36
 
37
 
37
 
38
Set objFormCollector = CreateObject("Scripting.Dictionary")
38
Set objFormCollector = CreateObject("Scripting.Dictionary")
39
'------------ CONDITIONS ----------------------
39
'------------ CONDITIONS ----------------------
40
'----------------------------------------------
40
'----------------------------------------------
41
function showCheck (val)
41
function showCheck (val)
42
    if val = "Y" Then
42
    if val = "Y" Then
43
        showCheck = "checked"
43
        showCheck = "checked"
44
    Else
44
    Else
45
        showCheck = ""
45
        showCheck = ""
46
    End If
46
    End If
47
End Function
47
End Function
48
 
48
 
49
function niceBool (val)
49
function niceBool (val)
50
    if val = "Y" Then
50
    if val = "Y" Then
51
        niceBool = "Y"
51
        niceBool = "Y"
52
    Else
52
    Else
53
        niceBool = "N"
53
        niceBool = "N"
54
    End If
54
    End If
55
End Function
55
End Function
56
 
56
 
57
Sub checkExt (val)
57
Sub checkExt (val)
58
   Dim objRegExpr
58
   Dim objRegExpr
59
   Set objRegExpr = New regexp
59
   Set objRegExpr = New regexp
60
 
60
 
61
   objRegExpr.Pattern = "^\.[a-z]{2,4}$"
61
   objRegExpr.Pattern = "^\.[a-z]{2,4}$"
62
   objRegExpr.IgnoreCase = False
62
   objRegExpr.IgnoreCase = False
63
   If NOT objRegExpr.Test(val) Then
63
   If NOT objRegExpr.Test(val) Then
64
        sMessage = "New project extension is not suitable. Must start with a 'dot' and must be between 2 and 4 lowercase characters"
64
        sMessage = "New project extension is not suitable. Must start with a 'dot' and must be between 2 and 4 lowercase characters"
65
   End If
65
   End If
66
End Sub
66
End Sub
67
 
67
 
68
Sub performAction
68
Sub performAction
69
    Dim rowCount
69
    Dim rowCount
70
    rowCount = -1
70
    rowCount = -1
71
 
71
 
72
    '
72
    '
73
    ' Determine if the named project suffix exists
73
    ' Determine if the named project suffix exists
74
    ' Count the rows in the query
74
    ' Count the rows in the query
75
    '
75
    '
76
    If Request("newext") <> "" Then
76
    If Request("newext") <> "" Then
77
 
77
 
78
        checkExt(Request("newext"))
78
        checkExt(Request("newext"))
79
        If not isNull (sMessage) then Exit Sub
79
        If not isNull (sMessage) then Exit Sub
80
 
80
 
81
        Query_String = "SELECT EXT_NAME from PROJECT_EXTENTIONS WHERE EXT_NAME = '" & Request("newext") & "'"
81
        Query_String = "SELECT EXT_NAME from PROJECT_EXTENTIONS WHERE EXT_NAME = '" & Request("newext") & "'"
82
	    Set rsQry = OraDatabase.DbCreateDynaset( Query_String, ORADYN_DEFAULT )
82
	    Set rsQry = OraDatabase.DbCreateDynaset( Query_String, ORADYN_DEFAULT )
83
        rowCount = rsQry.RecordCount
83
        rowCount = rsQry.RecordCount
84
		rsQry.Close()
84
		rsQry.Close()
85
		Set rsQry = nothing
85
		Set rsQry = nothing
86
    Else
86
    Else
87
        sMessage = "No Project Extension specified"
87
        sMessage = "No Project Extension specified"
88
        Exit Sub
88
        Exit Sub
89
    End If
89
    End If
90
 
90
 
91
   If Request("ext") <> "" Then
91
   If Request("ext") <> "" Then
92
    '
92
    '
93
    '   Update an existing entry
93
    '   Update an existing entry
94
    '
94
    '
95
    If (rowCount > 0) AND ( Request("ext") <> Request("newext")) Then
95
    If (rowCount > 0) AND ( Request("ext") <> Request("newext")) Then
96
        sMessage = "Cannot rename the project extension to an existing value"
96
        sMessage = "Cannot rename the project extension to an existing value"
97
    Else
97
    Else
98
        Query_String = "SELECT * from PROJECT_EXTENTIONS WHERE EXT_NAME = '" & Request("ext") & "'"
98
        Query_String = "SELECT * from PROJECT_EXTENTIONS WHERE EXT_NAME = '" & Request("ext") & "'"
99
	    Set rsQry = OraDatabase.DbCreateDynaset( Query_String, ORADYN_DEFAULT )
99
	    Set rsQry = OraDatabase.DbCreateDynaset( Query_String, ORADYN_DEFAULT )
100
        rsQry.Edit
100
        rsQry.Edit
101
        rsQry.Fields("EXT_NAME").Value = Request("newext")
101
        rsQry.Fields("EXT_NAME").Value = Request("newext")
102
        rsQry.Fields("UCOMMENT").Value = Request("comment")
102
        rsQry.Fields("UCOMMENT").Value = Request("comment")
103
        rsQry.Fields("IS_COTS").Value = niceBool(Request("isCots"))
103
        rsQry.Fields("IS_COTS").Value = niceBool(Request("isCots"))
104
        rsQry.Fields("IS_VISIBLE").Value = niceBool(Request("isVis"))
104
        rsQry.Fields("IS_VISIBLE").Value = niceBool(Request("isVis"))
105
        rsQry.Update
105
        rsQry.Update
106
        rsQry.Close
106
        rsQry.Close
107
        Set rsQry = Nothing
107
        Set rsQry = Nothing
108
        Call OpenInParentWindow ("admin_project_suffix.asp?ext="&Request("newext"))
108
        Call OpenInParentWindow ("admin_project_suffix.asp?ext="&Request("newext"))
109
        Call CloseWindow()
109
        Call CloseWindow()
110
    End If
110
    End If
111
   Else
111
   Else
112
    '
112
    '
113
    ' Insert a new entry into the table
113
    ' Insert a new entry into the table
114
    '
114
    '
115
    If rowCount > 0 Then
115
    If rowCount > 0 Then
116
        sMessage = "Project extension already exists"
116
        sMessage = "Project extension already exists"
117
    ElseIf rowCount < 0 Then
117
    ElseIf rowCount < 0 Then
118
        sMessage = "No Project Extension specified"
118
        sMessage = "No Project Extension specified"
119
    Else
119
    Else
120
        Query_String = "SELECT * from PROJECT_EXTENTIONS"
120
        Query_String = "SELECT * from PROJECT_EXTENTIONS"
121
	    Set rsQry = OraDatabase.DbCreateDynaset( Query_String, ORADYN_DEFAULT )
121
	    Set rsQry = OraDatabase.DbCreateDynaset( Query_String, ORADYN_DEFAULT )
122
        rsQry.AddNew
122
        rsQry.AddNew
123
        rsQry.Fields("EXT_NAME").Value = Request("newext")
123
        rsQry.Fields("EXT_NAME").Value = Request("newext")
124
        rsQry.Fields("UCOMMENT").Value = Request("comment")
124
        rsQry.Fields("UCOMMENT").Value = Request("comment")
125
        rsQry.Fields("IS_COTS").Value = niceBool(Request("isCots"))
125
        rsQry.Fields("IS_COTS").Value = niceBool(Request("isCots"))
126
        rsQry.Fields("IS_VISIBLE").Value = niceBool(Request("isVis"))
126
        rsQry.Fields("IS_VISIBLE").Value = niceBool(Request("isVis"))
127
        rsQry.Update
127
        rsQry.Update
128
        rsQry.Close
128
        rsQry.Close
129
        Set rsQry = Nothing
129
        Set rsQry = Nothing
130
        Call OpenInParentWindow ("admin_project_suffix.asp?ext="&Request("newext"))
130
        Call OpenInParentWindow ("admin_project_suffix.asp?ext="&Request("newext"))
131
        Call CloseWindow()
131
        Call CloseWindow()
132
    End If
132
    End If
133
   End If
133
   End If
134
 
134
 
135
End Sub
135
End Sub
136
 
136
 
137
%>
137
%>
138
<%
138
<%
139
'------------ RUN BEFORE PAGE RENDER ----------
139
'------------ RUN BEFORE PAGE RENDER ----------
140
 
140
 
141
If CBool(Request("action")) Then
141
If CBool(Request("action")) Then
142
    performAction()
142
    performAction()
143
End If
143
End If
144
 
144
 
145
 
145
 
146
'----------------------------------------------
146
'----------------------------------------------
147
%>
147
%>
148
<html>
148
<html>
149
<head>
149
<head>
150
<title>Release Manager</title>
150
<title>Release Manager</title>
151
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
151
<link rel="shortcut icon" href="<%=FavIcon%>"/>
152
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
152
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
153
<link href="images/release_manager_style.css" rel="stylesheet" type="text/css">
153
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
154
<script language="JavaScript" src="scripts/common.js"></script>
154
<link href="images/release_manager_style.css" rel="stylesheet" type="text/css">
155
</head>
155
<script language="JavaScript" src="scripts/common.js"></script>
156
 
156
</head>
157
<body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0" onLoad="self.focus();FormName.display_name.focus();">
157
 
158
<table width="100%"  border="0" cellspacing="0" cellpadding="10">
158
<body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0" onLoad="self.focus();FormName.display_name.focus();">
159
   <tr>
159
<table width="100%"  border="0" cellspacing="0" cellpadding="10">
160
      <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/Update Project Extension</span> <br>
160
   <tr>
161
         Add a new Project Extension or edit an existing Project Extension.
161
      <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/Update Project Extension</span> <br>
162
      </td>
162
         Add a new Project Extension or edit an existing Project Extension.
163
   </tr>
163
      </td>
164
 
164
   </tr>
165
   <%
165
 
166
   '-- FORM START --------------------------------------------------------------------------------------------------------------
166
   <%
167
   objFormComponent.FormName = "FormName"
167
   '-- FORM START --------------------------------------------------------------------------------------------------------------
168
   objFormComponent.Action = ScriptName
168
   objFormComponent.FormName = "FormName"
169
   objFormComponent.OnSubmit = "ShowProgress();"
169
   objFormComponent.Action = ScriptName
170
   Call objFormComponent.FormStart()
170
   objFormComponent.OnSubmit = "ShowProgress();"
171
 
171
   Call objFormComponent.FormStart()
172
   %>
172
 
173
   <tr>
173
   %>
174
      <td background="images/bg_login.gif">
174
   <tr>
175
         <table width="50%"  border="0" cellspacing="0" cellpadding="0">
175
      <td background="images/bg_login.gif">
176
            <tr>
176
         <table width="50%"  border="0" cellspacing="0" cellpadding="0">
177
               <td><%=ProgressBar()%></td>
177
            <tr>
178
               <td align="right"><input name="btn" type="submit" class="form_btn" value="Add/Update">
178
               <td><%=ProgressBar()%></td>
179
                  <input name="btn" type="reset" class="form_btn" value="Cancel" onClick="self.close();">
179
               <td align="right"><input name="btn" type="submit" class="form_btn" value="Add/Update">
180
               </td>
180
                  <input name="btn" type="reset" class="form_btn" value="Cancel" onClick="self.close();">
181
            </tr>
181
               </td>
182
         </table>
182
            </tr>
183
      </td>
183
         </table>
184
   </tr>
184
      </td>
185
   <tr>
185
   </tr>
186
      <td>
186
   <tr>
187
         <!-- NEW PRODUCT ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
187
      <td>
188
         <%Call Messenger ( sMessage , 1, "100%" )%>
188
         <!-- NEW PRODUCT ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
189
         <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
189
         <%Call Messenger ( sMessage , 1, "100%" )%>
190
         <!--#include file="messages/_msg_inline.asp"-->
190
         <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
191
         <br>
191
         <!--#include file="messages/_msg_inline.asp"-->
192
         <%
192
         <br>
193
        Dim extName
193
         <%
194
        Dim comment
194
        Dim extName
195
        Dim isaCots
195
        Dim comment
196
        Dim isVis
196
        Dim isaCots
197
         
197
        Dim isVis
198
        If Request("ext") <> "" Then
198
         
199
            %>
199
        If Request("ext") <> "" Then
200
            <input type="hidden" name="ext" value="<%=Request("ext")%>">
200
            %>
201
            <%
201
            <input type="hidden" name="ext" value="<%=Request("ext")%>">
202
            Dim rsTemp
202
            <%
203
 
203
            Dim rsTemp
204
            Query_String = "select * FROM PROJECT_EXTENTIONS " &_
204
 
205
                          " where ext_name = '"& Request("ext") & "'"
205
            Query_String = "select * FROM PROJECT_EXTENTIONS " &_
206
 
206
                          " where ext_name = '"& Request("ext") & "'"
207
            Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
207
 
208
 
208
            Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
209
    		extName = rsTemp("EXT_NAME")
209
 
210
		    comment = rsTemp("UCOMMENT")
210
    		extName = rsTemp("EXT_NAME")
211
            isaCots = niceBool(rsTemp("IS_COTS"))
211
		    comment = rsTemp("UCOMMENT")
212
            isVis   = niceBool(rsTemp("IS_VISIBLE"))
212
            isaCots = niceBool(rsTemp("IS_COTS"))
213
 
213
            isVis   = niceBool(rsTemp("IS_VISIBLE"))
214
            rsTemp.Close()
214
 
215
            Set rsTemp = Nothing      
215
            rsTemp.Close()
216
          Else
216
            Set rsTemp = Nothing      
217
            isaCots = "N"
217
          Else
218
            isVis = "Y"
218
            isaCots = "N"
219
          End If
219
            isVis = "Y"
220
          %>
220
          End If
221
         
221
          %>
222
         <table width="50%" border="0"  class="body_txt">
222
         
223
            <tr>
223
         <table width="50%" border="0"  class="body_txt">
224
               <td>Project Extension</td>
224
            <tr>
225
               <td><input name="newext" type="text" class="body_txt" value="<%=extName%>" size=7 maxlength=5></td>
225
               <td>Project Extension</td>
226
            </tr>
226
               <td><input name="newext" type="text" class="body_txt" value="<%=extName%>" size=7 maxlength=5></td>
227
 
227
            </tr>
228
            <tr>
228
 
229
               <td></td>
229
            <tr>
230
               <td>The project suffix must start with a '.' and contain 2 to 4 lower case characters.</td>
230
               <td></td>
231
            </tr>
231
               <td>The project suffix must start with a '.' and contain 2 to 4 lower case characters.</td>
232
            
232
            </tr>
233
            <tr>
233
            
234
               <td>Comment</td>
234
            <tr>
235
               <td><input name="comment" type="text" class="body_txt" value="<%=comment%>" size=80 maxlength=80></td>
235
               <td>Comment</td>
236
            </tr>
236
               <td><input name="comment" type="text" class="body_txt" value="<%=comment%>" size=80 maxlength=80></td>
237
 
237
            </tr>
238
            <tr>
238
 
239
               <td></td>
239
            <tr>
240
               <td>The comment field will be displayed during the project suffix selection process</td>
240
               <td></td>
241
            </tr>
241
               <td>The comment field will be displayed during the project suffix selection process</td>
242
            
242
            </tr>
243
 
243
            
244
            <tr>
244
 
245
               <td>Enable Selection</td>
245
            <tr>
246
               <td><input name="isVis" type="checkbox" value="Y" <%=showCheck(isVis)%>></td>
246
               <td>Enable Selection</td>
247
            </tr>
247
               <td><input name="isVis" type="checkbox" value="Y" <%=showCheck(isVis)%>></td>
248
 
248
            </tr>
249
            <tr>
249
 
250
               <td></td>
250
            <tr>
251
               <td>If selection is not enabled then the Suffix will not be shown and cannot be selected.
251
               <td></td>
252
               This is useful for legacy projects where multiple extensions have been used. </td>
252
               <td>If selection is not enabled then the Suffix will not be shown and cannot be selected.
253
            </tr>
253
               This is useful for legacy projects where multiple extensions have been used. </td>
254
            
254
            </tr>
255
            <tr>
255
            
256
               <td>Free Form Version</td>
256
            <tr>
257
               <td><input name="isCots" type="checkbox" value="Y" <%=showCheck(isaCots)%>></td>
257
               <td>Free Form Version</td>
258
            </tr>
258
               <td><input name="isCots" type="checkbox" value="Y" <%=showCheck(isaCots)%>></td>
259
 
259
            </tr>
260
            <tr>
260
 
261
               <td></td>
261
            <tr>
262
               <td>Free Form Versioning flags packages are allowed to have non-standard version numbers.
262
               <td></td>
263
               If the version number is in the standard major.minor.patch-build form then the package can be auto-versioned.
263
               <td>Free Form Versioning flags packages are allowed to have non-standard version numbers.
264
               If the version number has only a patch-build field then it can rippled.
264
               If the version number is in the standard major.minor.patch-build form then the package can be auto-versioned.
265
               </td>
265
               If the version number has only a patch-build field then it can rippled.
266
            </tr>
266
               </td>
267
 
267
            </tr>
268
 
268
 
269
         </table>
269
 
270
      </td>
270
         </table>
271
   </tr>
271
      </td>
272
   <%=objPMod.ComposeHiddenTags()%>
272
   </tr>
273
   <input type="hidden" name="action" value="true">
273
   <%=objPMod.ComposeHiddenTags()%>
274
 
274
   <input type="hidden" name="action" value="true">
275
   <%
275
 
276
   Call objFormComponent.FormEnd()
276
   <%
277
   '-- FROM END ----------------------------------------------------------------------------------------------------------------
277
   Call objFormComponent.FormEnd()
278
   %>
278
   '-- FROM END ----------------------------------------------------------------------------------------------------------------
279
</table>
279
   %>
280
</body>
280
</table>
281
</html>
281
</body>
282
<%
282
</html>
283
'------------ RUN AFTER PAGE RENDER -----------
283
<%
284
Set objFormCollector = Nothing
284
'------------ RUN AFTER PAGE RENDER -----------
285
'----------------------------------------------
285
Set objFormCollector = Nothing
286
Call Destroy_All_Objects
286
'----------------------------------------------
287
%>
287
Call Destroy_All_Objects
288
 
288
%>
289
 
289
 
-
 
290