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
4
Response.Expires = 0	' always load the page, dont store
5
%>
6
<%
7
'=====================================================
8
'					Edit Personal View
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
<%
23
'------------ Variable Definition -------------
24
Dim rsTemp
25
Dim parView_id
26
Dim viewdefHash			' Hash of view settings
27
Dim viewinfoHash		' Hash of view details
28
'------------ Constants Declaration -----------
29
'------------ Variable Init -------------------
30
Set viewdefHash = CreateObject("Scripting.Dictionary")
31
Set viewinfoHash = CreateObject("Scripting.Dictionary")
32
parView_id = QStrPar("FRview_id")
33
'----------------------------------------------
34
%>
35
<%
36
Function Get_All_Pkg_Names 
37
	Get_All_Pkg_Names = " SELECT pkg_id, pkg_name, UPPER(pkg_name) AS name_order FROM packages WHERE pkg_id > 0 ORDER BY name_order ASC"
38
End Function
39
 
40
Sub Populate_viewdefHash ( NNview_id,  HHviewdefHash )
41
	Dim rsTemp, Query_String
42
	Query_String = _
43
	" SELECT pkg_id FROM view_def WHERE view_id = "& NNview_id
44
	Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
45
	While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
46
		HHviewdefHash.Add CStr(rsTemp.Fields("pkg_id")), ""
47
		rsTemp.MoveNext
48
	WEnd
49
	rsTemp.Close
50
	Set rsTemp = nothing
51
End Sub
52
 
53
Sub Populate_viewinfoHash ( NNview_id,  HHviewinfoHash )
54
	Dim rsTemp, Query_String
55
	Query_String = _
56
	" SELECT * FROM views WHERE view_id = "& NNview_id
57
	Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
58
	If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
59
		HHviewinfoHash.Add "view_name", CStr(rsTemp.Fields("view_name"))
60
		HHviewinfoHash.Add "public_read", CStr(rsTemp.Fields("public_read"))
61
	End If
62
	rsTemp.Close
63
	Set rsTemp = nothing
64
End Sub
65
%>
66
<%
67
'------------------------- MAIN LINE ------------------------
68
'Process submition
69
If CBool(QStrPar("action"))  Then
70
	Call OpenInParentWindow ("_edit_personal_view.asp?FRview_id="& parView_id &"&FRviewname="& QStrPar("FRviewname") &"&FRpkginc="& Request("FRpkginc") &"&FRpubread="& QStrPar("FRpubread") )
71
	Call CloseWindow
72
End If
73
 
74
Call Populate_viewdefHash ( parView_id, viewdefHash )
75
Call Populate_viewinfoHash ( parView_id, viewinfoHash )
76
%>
77
<html>
78
<head>
79
<title>Release Manager</title>
80
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
81
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
82
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
83
<link rel="stylesheet" href="images/navigation.css" type="text/css">
84
<script language="JavaScript" src="images/common.js"></script>
85
<!-- TIPS -->
86
<script language="JavaScript" src="images/tipster.js"></script>
87
<script language="JavaScript" src="images/_help_tips.js"></script>
88
 
89
</head>
90
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="document.newview.FRviewname.focus()">
91
<!-- TIPS LAYERS -------------------------------------->
92
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
93
<!----------------------------------------------------->
94
<form name="newview" method="post" action="<%=scriptName%>?done=done<%=QSTR_All%>" onSubmit="return check();">
95
  <table width="100%" border="0" cellspacing="0" cellpadding="2" height="100%">
96
    <tr> 
97
      <td background="images/bg_member_dark.gif" width="1%" height="1%"><img src="images/bt_view.gif" width="31" height="18" hspace="5"></td>
98
      <td background="images/bg_member_dark.gif" nowrap width="50%" class="wform_ttl">&nbsp;Edit Personal View</td>
99
      <td background="images/bg_member_dark.gif" align="right" width="50%">
100
	  	<input type="hidden" name="action" value="true"> 
101
		<input type="hidden" name="FRview_id" value="<%=parView_id%>"> 
102
        <input type="submit" name="btn" value="Update" class="form_btn_comp" onClick="clickedButton=true;MM_validateForm('FRviewname','View Name','R');return document.MM_returnValue">
103
        <input type="reset" name="btn" value="Cancel" class="form_btn_comp" onclick="self.close()">
104
      </td>
105
      <td background="images/bg_member_dark.gif" align="right" width="1%%" nowrap> 
106
        <img src="images/h_trsp_dot.gif" width="5" height="22"> </td>
107
    </tr>
108
    <tr> 
109
      <td height="100%" width="1%">&nbsp;</td>
110
      <td valign="top" nowrap colspan="3" class="wform_ttl"> 
111
        <table width="100%" border="0" cellspacing="1" cellpadding="2">
112
          <tr> 
113
            <td width="1%"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
114
            <td width="1%" nowrap class="form_group" valign="bottom"></td>
115
            <td nowrap width="100%" align="right" class="form_step">&nbsp;</td>
116
          </tr>
117
          <tr> 
118
            <td width="1%">&nbsp;</td>
119
            <td colspan="2" width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif"> 
120
              View Name</td>
121
          </tr>
122
          <tr> 
123
            <td width="1%">&nbsp;</td>
124
            <td colspan="2" width="1%" nowrap background="images/bg_form_lightgray.gif"> 
125
              <input type="text" name="FRviewname" maxlength="30" class="form_item" value="<%=viewinfoHash.Item("view_name")%>">&nbsp;
126
              <input type="checkbox" name="FRpubread" value="Y" <%If CStr(viewinfoHash.Item("public_read")) = "Y" Then Response.write "checked"%>><span class="form_item">public read</span><%=Quick_Help("pubread")%></td>
127
          </tr>
128
          <tr> 
129
            <td width="1%"><img src="images/h_trsp_dot.gif" width="1" height="10"></td>
130
            <td width="1%" nowrap class="form_group" valign="bottom"></td>
131
            <td nowrap width="100%" align="right" class="form_step"></td>
132
          </tr>
133
          <tr> 
134
            <td width="1%">&nbsp;</td>
135
            <td colspan="2" width="1%" nowrap class="form_field"> 
136
              <table width="100%" border="0" cellspacing="1" cellpadding="2">
137
                <tr> 
138
                  <td background="images/bg_form_lightbluedark.gif" nowrap width="1%" class="form_field">&nbsp;</td>
139
                  <td background="images/bg_form_lightbluedark.gif" nowrap width="100%" class="form_field">Package Name</td>
140
                </tr>
141
                <%Set rsTemp = OraDatabase.DbCreateDynaset( Get_All_Pkg_Names, cint(0))
142
				While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))%>
143
                <tr> 
144
                  <td background="images/bg_form_lightgray.gif" nowrap class="form_item"> 
145
                    <input type="checkbox" name="FRpkginc" value="<%=rsTemp.Fields("pkg_id")%>" <%If viewdefHash.Exists (Cstr(rsTemp.Fields("pkg_id"))) Then Response.write "checked"%>>
146
                  </td>
147
                  <td background="images/bg_form_lightgray.gif" class="form_item"><%=rsTemp.Fields("pkg_name")%></td>
148
                </tr>
149
                <%rsTemp.MoveNext
150
			  	WEnd%>
151
				<%If rsTemp.RecordCount < 1 Then%>
152
				<tr> 
153
                  <td background="images/bg_form_lightgray.gif" nowrap class="form_item"></td>
154
                  <td background="images/bg_form_lightgray.gif" class="err_alert">NO PACKAGES FOUND!</td>
155
                </tr>
156
				<%End If%>
157
              </table>
158
            </td>
159
          </tr>
160
        </table>
161
      </td>
162
    </tr>
163
    <tr> 
164
      <td height="1%" width="1%"><img src="images/h_trsp_dot.gif" width="5" height="5"></td>
165
      <td valign="top" nowrap colspan="3" class="wform_ttl" background="images/bg_member_dark.gif"></td>
166
    </tr>
167
  </table>
168
</form>
169
</body>
170
</html>