Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
Option explicit
129 ghuddy 4
Response.Expires = 0   ' always load the page, dont store
119 ghuddy 5
%>
6
<%
7
'=====================================================
129 ghuddy 8
'               New Category
119 ghuddy 9
'=====================================================
10
%>
11
<!--#include file="common/conf.asp"-->
12
<!--#include file="common/globals.asp"-->
13
<!--#include file="common/qstr.asp"-->
14
<!--#include file="common/common_subs.asp"-->
15
<!--#include file="common/common_dbedit.asp"-->
16
<!--#include file="common/_popup_window_common.asp"-->
17
<%
18
'------------ ACCESS CONTROL ------------------
19
%>
20
<!--#include file="_access_control_login.asp"-->
21
<!--#include file="_access_control_general.asp"-->
22
<!--#include file="_access_control_project.asp"-->
23
<%
24
'------------ Variable Definition -------------
25
Dim NEWBase_view_id
26
 
27
Dim parPv_id
28
Dim parAdd_type
29
Dim parPkg_list
30
Dim parRFile
31
Dim parMovePkg
32
'------------ Constants Declaration -----------
33
'------------ Variable Init -------------------
34
parPv_id = Request("pv_id")
35
parAdd_type = Request("add_type")
36
parPkg_list = Request("pkg_list")
37
parRFile = Request("rfile")
38
parMovePkg = Request("movepkg")
39
'----------------------------------------------
40
%>
41
<%
42
Function Create_New_Base_View( SSvname )
129 ghuddy 43
   ' Return new Base View
44
   Dim SEQ_view_id
45
   SEQ_view_id = Get_From_DUAL("SEQ_VIEW_ID.nextval")
46
 
47
   objEH.TryORA ( OraSession )
48
   On Error Resume Next
49
 
50
   OraDatabase.ExecuteSQL _
51
      " INSERT INTO views (view_id, view_name, owner_id, base_view, public_read)"&_
52
      " VALUES ("& SEQ_view_id &", '"& UCase(SSvname) &"', 0,'Y','Y')"
53
 
54
   objEH.CatchORA ( OraSession )
55
   Create_New_Base_View = SEQ_view_id
119 ghuddy 56
End Function
57
 
58
 
59
Function BaseViewExists ( SSbname )
129 ghuddy 60
   ' RETURN -1 if baseview not found, else return VIEW_ID
61
   Dim rsTemp, Query_String
62
   Query_String = _
63
   " SELECT view_id FROM views"&_
64
   " WHERE view_name ='"& UCase(SSbname)&"'"&_
65
   " AND owner_id = 0  AND base_view = 'Y'  AND public_read = 'Y'"
66
   Set rsTemp = OraDatabase.CreateDynaset( Query_String, cint(0))
67
 
68
   If rsTemp.RecordCount > 0 Then
69
      BaseViewExists = rsTemp.Fields("view_id")
70
   Else
71
      BaseViewExists = -1
72
   End If
73
 
74
   rsTemp.Close
75
   Set rsTemp = nothing
119 ghuddy 76
End Function
77
%>
78
<%
79
'Process submition
80
If CBool(QStrPar("action")) AND  objAccessControl.UserLogedIn Then
129 ghuddy 81
   NEWBase_view_id = BaseViewExists ( Request("base_view_name") )
82
   If NEWBase_view_id = -1 Then
83
      'Group not found i.e. create it
84
      NEWBase_view_id = Create_New_Base_View( Request("base_view_name") )
85
   End If
86
 
87
   If parMovePkg = "true" Then
88
      ' Call is comming from dependencies page to move package to other base view
89
      Call Update_Pkg_Category ( parRtag_id, parPv_id, NEWBase_view_id )
90
      Call OpenInParentWindow ("dependencies.asp?pv_id="& parPv_id &"&rtag_id="& parRtag_id)
91
      Call CloseWindow
92
   Else
93
      Call OpenInParentWindow ( parRFile &"?base_view_id="& NEWBase_view_id &_
94
                                "&pkg_list="& parPkg_list &_
95
                          "&add_type="& parAdd_type &_
96
                          "&pv_id="& parPv_id &_
97
                          "&rtag_id="& parRtag_id )
98
      Call CloseWindow
99
   End If
119 ghuddy 100
End If
101
%>
102
<html>
103
<head>
104
<title>Release Manager</title>
105
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
106
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
107
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
108
<link rel="stylesheet" href="images/navigation.css" type="text/css">
109
<script language="JavaScript" src="images/common.js"></script>
110
</head>
111
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();window.document.newbaseview.base_view_name.focus();">
112
<form name="newbaseview" method="post" action="<%=scriptName%>" onSubmit="MM_validateForm('base_view_name','Base View','RisCleanStr');return document.MM_returnValue">
113
  <table width="100%" border="0" cellspacing="0" cellpadding="2" height="100%">
129 ghuddy 114
    <tr>
119 ghuddy 115
      <td background="images/lbox_bg_orange.gif" width="1%" height="1%"><img src="images/i_change_group_off.gif" width="22" height="25" hspace="5"></td>
116
      <td background="images/lbox_bg_blue.gif" nowrap width="50%" class="wform_ttl">&nbsp;Create NEW Base View</td>
129 ghuddy 117
      <td background="images/lbox_bg_blue.gif" align="right" width="50%">
119 ghuddy 118
        <input type="submit" name="btn" value="Create" class="form_btn_comp">
119
        <input type="reset" name="btn" value="Cancel" class="form_btn_comp" onclick="self.close()">
120
      </td>
129 ghuddy 121
      <td background="images/lbox_bg_blue.gif" align="right" width="1%%" nowrap>
119 ghuddy 122
        <img src="images/h_trsp_dot.gif" width="5" height="22"> </td>
123
    </tr>
129 ghuddy 124
    <tr>
119 ghuddy 125
      <td height="100%" width="1%">&nbsp;</td>
129 ghuddy 126
      <td valign="top" nowrap colspan="3" class="wform_ttl" background="images/bg_form_lightgray.gif">
119 ghuddy 127
        <table width="100%" border="0" cellspacing="1" cellpadding="2">
129 ghuddy 128
          <tr>
119 ghuddy 129
            <td width="1%"><img src="images/h_trsp_dot.gif" width="10" height="30"></td>
130
            <td width="1%" nowrap class="form_group" valign="bottom"></td>
131
            <td nowrap width="100%">&nbsp; </td>
132
          </tr>
129 ghuddy 133
          <tr>
119 ghuddy 134
            <td width="1%">&nbsp;</td>
135
            <td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Base View</td>
129 ghuddy 136
            <td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="form_txt">
119 ghuddy 137
              <input type="text" name="base_view_name" maxlength="30" class="form_item">
138
            </td>
139
          </tr>
129 ghuddy 140
          <tr>
119 ghuddy 141
            <td width="1%">&nbsp;</td>
142
            <td width="1%" nowrap class="form_field"><img src="images/h_trsp_dot.gif" width="100" height="10"></td>
129 ghuddy 143
            <td nowrap width="100%">
119 ghuddy 144
              <p>&nbsp;</p>
145
            </td>
146
          </tr>
147
        </table>
148
      </td>
149
    </tr>
150
    <tr>
151
      <td height="1%" width="1%"><img src="images/h_trsp_dot.gif" width="5" height="5"></td>
152
      <td valign="top" nowrap colspan="3" class="wform_ttl" background="images/lbox_bg_blue.gif"></td>
153
    </tr>
154
  </table>
129 ghuddy 155
   <input type="hidden" name="rfile" value="<%=parRFile%>">
156
   <input type="hidden" name="movepkg" value="<%=parMovePkg%>">
157
   <input type="hidden" name="add_type" value="<%=parAdd_type%>">
158
   <input type="hidden" name="pv_id" value="<%=parPv_id%>">
159
   <input type="hidden" name="pkg_list" value="<%=parPkg_list%>">
160
   <input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
161
   <input type="hidden" name="action" value="true">
119 ghuddy 162
</form>
163
</body>
164
</html>
165
 
166
 
167
<!-- DESTRUCTOR ------->
129 ghuddy 168
<!--#include file="common/destructor.asp"-->