Subversion Repositories DevTools

Rev

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