Subversion Repositories DevTools

Rev

Rev 5384 | Rev 5590 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5357 dpurdie 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|                                                   |
5
'|                       wAddVCS                     |
6
'|                                                   |
7
'=====================================================
8
%>
9
<%
10
Option explicit
11
Response.Expires = 0
12
%>
13
<!--#include file="common/conf.asp"-->
14
<!--#include file="common/globals.asp"-->
15
<!--#include file="common/formating.asp"-->
16
<!--#include file="common/qstr.asp"-->
17
<!--#include file="common/common_subs.asp"-->
18
<!--#include file="common/_form_window_common.asp"-->
19
<%
20
'------------ ACCESS CONTROL ------------------
21
%>
22
<!--#include file="_access_control_general.asp"-->
23
<!--#include file="_access_control_login.asp"-->
24
<%
25
'------------ VARIABLE DEFINITION -------------
26
Dim rsQry
27
Dim sMessage
28
Dim VCS_NAME
29
Dim VCS_TAG
30
Dim Query_String
31
Dim dual
32
Dim Query_Stringx
33
Dim vcs_type_id
34
'------------ CONSTANTS DECLARATION -----------
35
'------------ VARIABLE INIT -------------------
36
sMessage = NULL
37
Set objFormCollector = CreateObject("Scripting.Dictionary")
38
'------------ CONDITIONS ----------------------
39
'----------------------------------------------
40
%>
41
<%
42
 
43
%>
44
<%
45
'------------ RUN BEFORE PAGE RENDER ----------
46
 
47
If CBool(Request("action")) Then
48
 
49
   If Request("VCS_TAG") = "" Then
50
      Call RaiseMsg ( enum_MSG_ERROR, "Cannot add an empty string as a VCS Tag" )
51
   Else
52
      If Request("VCS_NAME") = "" Then
53
         Call RaiseMsg ( enum_MSG_ERROR, "Cannot add an empty string as a VCS Name" )
54
      Else
55
         Query_String = " SELECT * FROM vcs_type WHERE tag = '"& Request("VCS_TAG") &"'"
56
 
57
         Set rsQry = OraDatabase.DbCreateDynaset( Query_String, cint(0))
58
 
59
         If rsQry.RecordCount = 0 Then
60
 
61
            Query_Stringx = _
62
            "   SELECT seq_vcs_type.NEXTVAL FROM DUAL"
63
 
64
            Set dual = OraDatabase.DbCreateDynaset(Query_Stringx,cint(0))
65
            vcs_type_id = dual("NEXTVAL")
66
            dual.Close()
67
            Set dual = Nothing
68
 
69
            OraDatabase.Parameters.Add "VCS_TYPE_ID", vcs_type_id,         ORAPARM_INPUT, ORATYPE_NUMBER
70
            OraDatabase.Parameters.Add "NAME",        Request("VCS_NAME"), ORAPARM_INPUT, ORATYPE_VARCHAR2
71
            OraDatabase.Parameters.Add "TAG",         Request("VCS_TAG"),  ORAPARM_INPUT, ORATYPE_VARCHAR2
72
 
73
            On Error Resume Next
74
            objEH.TryORA ( OraSession )
75
            OraDatabase.ExecuteSQL ("begin INSERT INTO vcs_type (vcs_type_id, name, tag) VALUES (:VCS_TYPE_ID, :NAME, :TAG); end;")
76
            objEH.CatchORA ( OraSession )
77
 
78
            OraDatabase.Parameters.Remove "VCS_TYPE_ID"
79
            OraDatabase.Parameters.Remove "NAME"
80
            OraDatabase.Parameters.Remove "TAG"
81
 
82
            If objEH.Finally Then
83
               Call OpenInParentWindow ("admin_vcs_types.asp")
84
               Call CloseWindow()
85
            End If
86
 
87
         Else
88
            Call RaiseMsg ( enum_MSG_VCS_EXISTS, Request("VCS_TAG") )
89
         End If
90
 
91
         rsQry.Close
92
         Set rsQry = nothing
93
      End If
94
 
95
   End If
96
 
97
End If
98
 
99
 
100
'----------------------------------------------
101
%>
102
<html>
103
<head>
104
<title>Release Manager</title>
105
<link rel="shortcut icon" href="<%=FavIcon%>"/>
106
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
107
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
108
<link href="images/release_manager_style.css" rel="stylesheet" type="text/css">
109
<script language="JavaScript" src="scripts/common.js"></script>
110
</head>
111
 
112
<body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0" onLoad="self.focus();FormName.VCS_NAME.focus();">
113
<table width="100%"  border="0" cellspacing="0" cellpadding="10">
114
   <tr>
115
      <td bgcolor="#FFFFFF" class="body_txt">
116
         <span class="body_h1">
117
            <img src="icons/i_linkarrow_black.gif" width="11" height="11" align="absmiddle">&nbsp;Add Version Control System (VCS)
118
         </span>
119
         <br>
120
         Add a new VCS.
121
      </td>
122
   </tr>
123
 
124
   <%
125
   '-- FROM START --------------------------------------------------------------------------------------------------------------
126
   objFormComponent.FormName = "FormName"
127
   objFormComponent.Action = ScriptName
128
   objFormComponent.OnSubmit = "ShowProgress();"
129
   Call objFormComponent.FormStart()
130
 
131
   %>
132
   <tr>
133
      <td background="images/bg_login.gif">
134
         <table width="50%"  border="0" cellspacing="0" cellpadding="0">
135
            <tr>
136
               <td><%=ProgressBar()%></td>
137
               <td align="right"><input name="btn" type="submit" class="form_btn" value="Add">
138
                  <input name="btn" type="reset" class="form_btn" value="Cancel" onClick="self.close();">
139
               </td>
140
            </tr>
141
         </table>
142
      </td>
143
   </tr>
144
   <tr>
145
      <td>
146
         <!-- NEW PRODUCT ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
147
         <%Call Messenger ( sMessage , 3, "100%" )%>
148
         <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
149
         <!--#include file="messages/_msg_inline.asp"-->
150
         <table width="100%" border="0">
151
            <tr>
152
               <td><span class="body_txt">VCS Name</span></td>
153
               <td><input name="VCS_NAME" type="text" class="body_txt" value="<%=VCS_NAME%>" size=120 maxlength=128></td>
154
            </tr>
155
            <tr>
156
               <td><span class="body_txt">VCS Tag (1..4 chars)</span></td>
157
               <td><input name="VCS_TAG" type="text" class="body_txt" value="<%=VCS_TAG%>" size=4 maxlength=4></td>
158
            </tr>
159
            <tr>
160
               <td>&nbsp;</td>
161
               <td>&nbsp;</td>
162
            </tr>
163
         </table>
164
      </td>
165
   </tr>
166
   <%=objPMod.ComposeHiddenTags()%>
167
   <input type="hidden" name="action" value="true">
168
 
169
   <%
170
   Call objFormComponent.FormEnd()
171
   '-- FROM END ----------------------------------------------------------------------------------------------------------------
172
   %>
173
</table>
174
</body>
175
</html>
176
<%
177
'------------ RUN AFTER PAGE RENDER -----------
178
Set objFormCollector = Nothing
179
'----------------------------------------------
180
Call Destroy_All_Objects
181
%>
182
 
183