Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

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