Subversion Repositories DevTools

Rev

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