Subversion Repositories DevTools

Rev

Rev 6579 | Details | Compare with Previous | Last modification | View Log | RSS feed

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