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