Subversion Repositories DevTools

Rev

Rev 119 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 119 Rev 129
Line 1... Line 1...
1
<%@LANGUAGE="VBSCRIPT"%>
1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
2
<%
3
'=====================================================
3
'=====================================================
4
'|                                                   |
4
'|                                                   |
5
'|				    	MEMBERS					     |
5
'|                   MEMBERS                         |
6
'|                    PUBLIC VIEW               	 |
6
'|                 PUBLIC VIEW                       |
7
'=====================================================
7
'=====================================================
8
%>
8
%>
9
<%
9
<%
10
Option explicit
10
Option explicit
11
' Good idea to set when using redirect
11
' Good idea to set when using redirect
12
Response.Expires = 0	' always load the page, dont store
12
Response.Expires = 0   ' always load the page, dont store
13
%>
13
%>
14
<!--#include file="common/conf.asp"-->
14
<!--#include file="common/conf.asp"-->
15
<!--#include file="common/globals.asp"-->
15
<!--#include file="common/globals.asp"-->
16
<!--#include file="common/formating.asp"-->
16
<!--#include file="common/formating.asp"-->
17
<!--#include file="common/qstr.asp"-->
17
<!--#include file="common/qstr.asp"-->
Line 28... Line 28...
28
'------------ Variable Init -------------------
28
'------------ Variable Init -------------------
29
'----------------------------------------------
29
'----------------------------------------------
30
%>
30
%>
31
<%
31
<%
32
Function Get_Public_Views ( NNuser_id )
32
Function Get_Public_Views ( NNuser_id )
33
	Get_Public_Views = ReadFile( rootPath & "queries\public_views_list.qry" )
33
   Get_Public_Views = ReadFile( rootPath & "queries\public_views_list.qry" )
34
	Get_Public_Views = Replace( Get_Public_Views, "$USER_ID$", NNuser_id)
34
   Get_Public_Views = Replace( Get_Public_Views, "$USER_ID$", NNuser_id)
35
End Function
35
End Function
36
 
36
 
37
Sub Remove_View_Settings ( NNuser_id )
37
Sub Remove_View_Settings ( NNuser_id )
-
 
38
   objEH.TryORA ( OraSession )
38
	OraSession.BeginTrans
39
   On Error Resume Next
39
	OraDatabase.ExecuteSQL " DELETE FROM view_settings vis WHERE vis.user_id = "& NNuser_id &" AND vis.view_id IN (SELECT vi.view_id FROM views vi WHERE vi.owner_id = 0 OR vi.public_read = 'Y')"
40
   OraDatabase.ExecuteSQL " DELETE FROM view_settings vis WHERE vis.user_id = "& NNuser_id &" AND vis.view_id IN (SELECT vi.view_id FROM views vi WHERE vi.owner_id = 0 OR vi.public_read = 'Y')"
40
  	OraSession.CommitTrans
41
   objEH.CatchORA ( OraSession )
41
End Sub
42
End Sub
42
 
43
 
43
Sub Insert_View_Settings ( NNuser_id, SSpublicshow )
44
Sub Insert_View_Settings ( NNuser_id, SSpublicshow )
44
	If SSpublicshow <> "" Then
45
   If SSpublicshow <> "" Then
-
 
46
      objEH.TryORA ( OraSession )
45
	OraSession.BeginTrans
47
      On Error Resume Next
46
	OraDatabase.ExecuteSQL " INSERT INTO view_settings"&_
48
      OraDatabase.ExecuteSQL " INSERT INTO view_settings"&_
47
						   " SELECT TO_NUMBER('"& NNuser_id &"') AS user_id, vi.view_id FROM views vi WHERE vi.view_id IN ("& SSpublicshow &")"
49
                             " SELECT TO_NUMBER('"& NNuser_id &"') AS user_id, vi.view_id FROM views vi WHERE vi.view_id IN ("& SSpublicshow &")"
48
  	OraSession.CommitTrans
50
      objEH.CatchORA ( OraSession )
49
	End If
51
   End If
50
End Sub
52
End Sub
51
 
53
 
52
Function Owner_Format( NNuser_id, SSemail, SSname )
54
Function Owner_Format( NNuser_id, SSemail, SSname )
53
	If CInt(NNuser_id) = 0 Then
55
   If CInt(NNuser_id) = 0 Then
54
		Response.write "public"
56
      Response.write "public"
55
	Else
57
   Else
56
		Response.write "<a href='mailto:"& SSemail &"' class='txt_linked'>"& SSname &"</a>"
58
      Response.write "<a href='mailto:"& SSemail &"' class='txt_linked'>"& SSname &"</a>"
57
	End If
59
   End If
58
End Function
60
End Function
59
%>
61
%>
60
<%
62
<%
61
'--- Process submition ---
63
'--- Process submition ---
62
If (QStrPar("action") <> "") Then
64
If (QStrPar("action") <> "") Then
63
	' All mendatory parameters FOUND
65
   ' All mendatory parameters FOUND
64
	Call Remove_View_Settings ( objAccessControl.UserId )
66
   Call Remove_View_Settings ( objAccessControl.UserId )
65
	Call Insert_View_Settings ( objAccessControl.UserId, Request("FRpublicshow") )
67
   Call Insert_View_Settings ( objAccessControl.UserId, Request("FRpublicshow") )
66
End If
68
End If
67
%>
69
%>
68
<html>
70
<html>
69
<head>
71
<head>
70
<title>Release Manager</title>
72
<title>Release Manager</title>
Line 81... Line 83...
81
<!-- HEADER -->
83
<!-- HEADER -->
82
<%If objAccessControl.UserLogedIn Then%>
84
<%If objAccessControl.UserLogedIn Then%>
83
<div id="Layer1" style="position:absolute; left:2; top:2; width:1px; height:1px; z-index:1"><a href="#"><img src="images/i_logout.gif" width="14" height="14" border="0" alt="Logout from <%=objAccessControl.UserName%> disabled" title="Logout from <%=objAccessControl.UserName%> disabled"></a></div>
85
<div id="Layer1" style="position:absolute; left:2; top:2; width:1px; height:1px; z-index:1"><a href="#"><img src="images/i_logout.gif" width="14" height="14" border="0" alt="Logout from <%=objAccessControl.UserName%> disabled" title="Logout from <%=objAccessControl.UserName%> disabled"></a></div>
84
<%End If%>
86
<%End If%>
85
<table width="100%" border="0" cellspacing="0" cellpadding="0">
87
<table width="100%" border="0" cellspacing="0" cellpadding="0">
86
  <tr> 
88
  <tr>
87
    <td><a href="index.asp"><img src="images/b_release_manager.jpg" width="467" height="50" border="0"></a></td>
89
    <td><a href="index.asp"><img src="images/b_release_manager.jpg" width="467" height="50" border="0"></a></td>
88
    <td valign="bottom" align="right">&nbsp;</td>
90
    <td valign="bottom" align="right">&nbsp;</td>
89
  </tr>
91
  </tr>
90
  <tr> 
92
  <tr>
91
    <td align=left noWrap valign=center width=150 background="images/h_dot.gif" height="1"></td>
93
    <td align=left noWrap valign=center width=150 background="images/h_dot.gif" height="1"></td>
92
    <td background="images/h_dot.gif" height="1"></td>
94
    <td background="images/h_dot.gif" height="1"></td>
93
  </tr>
95
  </tr>
94
</table>
96
</table>
95
<!-- BODY ---->
97
<!-- BODY ---->
96
<table width="100%" border="0" cellspacing="0" cellpadding="0">
98
<table width="100%" border="0" cellspacing="0" cellpadding="0">
97
  <tr> 
99
  <tr>
98
    <td width="1%" background="images/bg_member_dark.gif" valign="top"> 
100
    <td width="1%" background="images/bg_member_dark.gif" valign="top">
99
      <!-- MEMBERS MENU ---------------------------------------------->
101
      <!-- MEMBERS MENU ---------------------------------------------->
100
	  <!--#include file="members_menu_def.asp"-->
102
     <!--#include file="members_menu_def.asp"-->
101
	  <%Call Member_Menu( "views" )%>
103
     <%Call Member_Menu( "views" )%>
102
      <!--  MEMBERS MENU END ------------------------------------------>
104
      <!--  MEMBERS MENU END ------------------------------------------>
103
    </td>
105
    </td>
104
    <td width="1%" valign="top" background="images/bg_member_light.gif"><a href="index.asp" class="form_txt_link"><img src="images/i_home.gif" width="13" height="12" border="0" align="absmiddle">Exit</a></td>
106
    <td width="1%" valign="top" background="images/bg_member_light.gif"><a href="index.asp" class="form_txt_link"><img src="images/i_home.gif" width="13" height="12" border="0" align="absmiddle">Exit</a></td>
105
    <td rowspan="2" valign="top" width="1%" background="images/bg_member_light.gif" nowrap> 
107
    <td rowspan="2" valign="top" width="1%" background="images/bg_member_light.gif" nowrap>
106
      <!------------------------------------------->
108
      <!------------------------------------------->
107
      <br>
109
      <br>
108
      <span class="mmb_ttl">Public View</span><br>
110
      <span class="mmb_ttl">Public View</span><br>
109
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
111
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
110
	  <form name="publicview" method="post" action="members_public_view.asp?done=done<%=QSTR%>">
112
     <form name="publicview" method="post" action="members_public_view.asp?done=done<%=QSTR%>">
111
        <tr> 
113
        <tr>
112
          <td width="1%">&nbsp;</td>
114
          <td width="1%">&nbsp;</td>
113
          <td align="right"><img src="images/h_trsp_dot.gif" width="500" height="30"></td>
115
          <td align="right"><img src="images/h_trsp_dot.gif" width="500" height="30"></td>
114
          <td width="1%">&nbsp;</td>
116
          <td width="1%">&nbsp;</td>
115
        </tr>
117
        </tr>
116
        <tr> 
118
        <tr>
117
          <td align="left" valign="top" width="1%" background="images/bg_member_dark.gif"><img src="images/h_trsp_dot.gif" width="13" height="13"></td>
119
          <td align="left" valign="top" width="1%" background="images/bg_member_dark.gif"><img src="images/h_trsp_dot.gif" width="13" height="13"></td>
118
          <td background="images/bg_member_dark.gif" align="left" class="wform_ttl"><a href="#" onClick="MM_openBrWindow('members_new_public_view.asp','ReleaseManager','scrollbars=yes,resizable=yes,width=400,height=500')" class="wform_ttl"><img src="images/i_add_view.gif" width="32" height="18" border="0" align="absmiddle" hspace="2" vspace="10" alt="Create new public view">New View</a></td>
120
          <td background="images/bg_member_dark.gif" align="left" class="wform_ttl"><a href="#" onClick="MM_openBrWindow('members_new_public_view.asp','ReleaseManager','scrollbars=yes,resizable=yes,width=400,height=500')" class="wform_ttl"><img src="images/i_add_view.gif" width="32" height="18" border="0" align="absmiddle" hspace="2" vspace="10" alt="Create new public view">New View</a></td>
119
          <td align="right" valign="top" width="1%" background="images/bg_member_dark.gif">&nbsp;</td>
121
          <td align="right" valign="top" width="1%" background="images/bg_member_dark.gif">&nbsp;</td>
120
        </tr>
122
        </tr>
121
        <tr> 
123
        <tr>
122
          <td width="1%" bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
124
          <td width="1%" bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
123
          <td bgcolor="#FFFFFF" valign="top" class="form_item"> <br>
125
          <td bgcolor="#FFFFFF" valign="top" class="form_item"> <br>
124
            <table width="100%" border="0" cellspacing="1" cellpadding="2">
126
            <table width="100%" border="0" cellspacing="1" cellpadding="2">
125
              <tr> 
127
              <tr>
126
                <td background="images/bg_form_lightbluedark.gif" nowrap class="form_field" width="1%">Show</td>
128
                <td background="images/bg_form_lightbluedark.gif" nowrap class="form_field" width="1%">Show</td>
127
                <td background="images/bg_form_lightbluedark.gif" nowrap class="form_field" width="100%">View Name</td>
129
                <td background="images/bg_form_lightbluedark.gif" nowrap class="form_field" width="100%">View Name</td>
128
				<td background="images/bg_form_lightbluedark.gif" nowrap class="form_field" width="1%">Package Count</td>
130
            <td background="images/bg_form_lightbluedark.gif" nowrap class="form_field" width="1%">Package Count</td>
129
				<td background="images/bg_form_lightbluedark.gif" nowrap class="form_field" width="1%">Owner</td>
131
            <td background="images/bg_form_lightbluedark.gif" nowrap class="form_field" width="1%">Owner</td>
130
                <td background="images/bg_form_lightbluedark.gif" class="form_field" width="1%">&nbsp;</td>
132
                <td background="images/bg_form_lightbluedark.gif" class="form_field" width="1%">&nbsp;</td>
131
                <td background="images/bg_form_lightbluedark.gif" class="form_field" width="1%">&nbsp;</td>
133
                <td background="images/bg_form_lightbluedark.gif" class="form_field" width="1%">&nbsp;</td>
132
              </tr>
134
              </tr>
133
			<%Set rsTemp = OraDatabase.DbCreateDynaset( Get_Public_Views( objAccessControl.UserId ), cint(0))
135
         <%Set rsTemp = OraDatabase.DbCreateDynaset( Get_Public_Views( objAccessControl.UserId ), cint(0))
134
			  While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))%>
136
           While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))%>
135
              <tr> 
137
              <tr>
136
                <td background="images/bg_form_lightgray.gif" align="center"><input type="checkbox" name="FRpublicshow" value="<%=rsTemp.Fields("view_id")%>" <%If CBool(rsTemp.Fields("show")) Then Response.write "checked"%>></td>
138
                <td background="images/bg_form_lightgray.gif" align="center"><input type="checkbox" name="FRpublicshow" value="<%=rsTemp.Fields("view_id")%>" <%If CBool(rsTemp.Fields("show")) Then Response.write "checked"%>></td>
137
				<%If rsTemp.Fields("base_view") = "Y" Then%>
139
            <%If rsTemp.Fields("base_view") = "Y" Then%>
138
					<td background="images/bg_form_lightgray.gif" nowrap class="form_item"><%=rsTemp.Fields("view_name")%></td>
140
               <td background="images/bg_form_lightgray.gif" nowrap class="form_item"><%=rsTemp.Fields("view_name")%></td>
139
					<td background="images/bg_form_lightgray.gif" nowrap class="form_item" align="center">base view</td>
141
               <td background="images/bg_form_lightgray.gif" nowrap class="form_item" align="center">base view</td>
140
					<td background="images/bg_form_lightgray.gif" nowrap class="form_item"><%=Owner_Format( rsTemp.Fields("owner_id"), rsTemp.Fields("owner_email"), rsTemp.Fields("owner_name") )%></td>
142
               <td background="images/bg_form_lightgray.gif" nowrap class="form_item"><%=Owner_Format( rsTemp.Fields("owner_id"), rsTemp.Fields("owner_email"), rsTemp.Fields("owner_name") )%></td>
141
	                <td background="images/bg_form_lightgray.gif"><img src="images/i_edit_disable.gif" width="12" height="12" hspace="5" ></td>
143
                   <td background="images/bg_form_lightgray.gif"><img src="images/i_edit_disable.gif" width="12" height="12" hspace="5" ></td>
142
	                <td background="images/bg_form_lightgray.gif"><img src="images/i_delete_disable.gif" width="13" height="12" hspace="5" ></td>
144
                   <td background="images/bg_form_lightgray.gif"><img src="images/i_delete_disable.gif" width="13" height="12" hspace="5" ></td>
143
				<%Else%>
145
            <%Else%>
144
					<%If (Cint(rsTemp.Fields("owner_id")) = Cint(objAccessControl.UserId)) OR (Cint(rsTemp.Fields("owner_id")) = 0) Then%>
146
               <%If (Cint(rsTemp.Fields("owner_id")) = Cint(objAccessControl.UserId)) OR (Cint(rsTemp.Fields("owner_id")) = 0) Then%>
145
					<td background="images/bg_form_lightgray.gif" nowrap><a href="#" onClick="MM_openBrWindow('members_edit_public_view.asp?FRview_id=<%=rsTemp.Fields("view_id")%>','ReleaseManager','scrollbars=yes,resizable=yes,width=400,height=500')" class="form_item"><%=rsTemp.Fields("view_name")%></a></td>
147
               <td background="images/bg_form_lightgray.gif" nowrap><a href="#" onClick="MM_openBrWindow('members_edit_public_view.asp?FRview_id=<%=rsTemp.Fields("view_id")%>','ReleaseManager','scrollbars=yes,resizable=yes,width=400,height=500')" class="form_item"><%=rsTemp.Fields("view_name")%></a></td>
146
					<td background="images/bg_form_lightgray.gif" nowrap class="form_item" align="center"><%=rsTemp.Fields("pkg_count")%></td>
148
               <td background="images/bg_form_lightgray.gif" nowrap class="form_item" align="center"><%=rsTemp.Fields("pkg_count")%></td>
147
					<td background="images/bg_form_lightgray.gif" nowrap class="form_item"><%=Owner_Format( rsTemp.Fields("owner_id"), rsTemp.Fields("owner_email"), rsTemp.Fields("owner_name") )%></td>
149
               <td background="images/bg_form_lightgray.gif" nowrap class="form_item"><%=Owner_Format( rsTemp.Fields("owner_id"), rsTemp.Fields("owner_email"), rsTemp.Fields("owner_name") )%></td>
148
	                <td background="images/bg_form_lightgray.gif"><a href="#" onClick="MM_openBrWindow('members_edit_public_view.asp?FRview_id=<%=rsTemp.Fields("view_id")%>','ReleaseManager','scrollbars=yes,resizable=yes,width=400,height=500')"><img src="images/i_edit.gif" width="12" height="12" hspace="5" border="0" alt="Edit view" title="Edit view"></a></td>
150
                   <td background="images/bg_form_lightgray.gif"><a href="#" onClick="MM_openBrWindow('members_edit_public_view.asp?FRview_id=<%=rsTemp.Fields("view_id")%>','ReleaseManager','scrollbars=yes,resizable=yes,width=400,height=500')"><img src="images/i_edit.gif" width="12" height="12" hspace="5" border="0" alt="Edit view" title="Edit view"></a></td>
149
	                <td background="images/bg_form_lightgray.gif"><a href="_remove_public_view.asp?FRview_id=<%=rsTemp.Fields("view_id")%>"><img src="images/i_delete.gif" width="13" height="12" hspace="5" border="0" alt="Delete view permanently" title="Delete view permanently"></a></td>
151
                   <td background="images/bg_form_lightgray.gif"><a href="_remove_public_view.asp?FRview_id=<%=rsTemp.Fields("view_id")%>"><img src="images/i_delete.gif" width="13" height="12" hspace="5" border="0" alt="Delete view permanently" title="Delete view permanently"></a></td>
150
					<%Else%>
152
               <%Else%>
151
					<td background="images/bg_form_lightgray.gif" nowrap class="form_item"><%=rsTemp.Fields("view_name")%></td>
153
               <td background="images/bg_form_lightgray.gif" nowrap class="form_item"><%=rsTemp.Fields("view_name")%></td>
152
					<td background="images/bg_form_lightgray.gif" nowrap class="form_item" align="center"><%=rsTemp.Fields("pkg_count")%></td>
154
               <td background="images/bg_form_lightgray.gif" nowrap class="form_item" align="center"><%=rsTemp.Fields("pkg_count")%></td>
153
					<td background="images/bg_form_lightgray.gif" nowrap class="form_item"><%=Owner_Format( rsTemp.Fields("owner_id"), rsTemp.Fields("owner_email"), rsTemp.Fields("owner_name") )%></td>
155
               <td background="images/bg_form_lightgray.gif" nowrap class="form_item"><%=Owner_Format( rsTemp.Fields("owner_id"), rsTemp.Fields("owner_email"), rsTemp.Fields("owner_name") )%></td>
154
					<td background="images/bg_form_lightgray.gif"><img src="images/i_edit_disable.gif" width="12" height="12" hspace="5" ></td>
156
               <td background="images/bg_form_lightgray.gif"><img src="images/i_edit_disable.gif" width="12" height="12" hspace="5" ></td>
155
	                <td background="images/bg_form_lightgray.gif"><img src="images/i_delete_disable.gif" width="13" height="12" hspace="5" ></td>
157
                   <td background="images/bg_form_lightgray.gif"><img src="images/i_delete_disable.gif" width="13" height="12" hspace="5" ></td>
156
					<%End If%>
158
               <%End If%>
157
				<%End If%>
159
            <%End If%>
158
              </tr>
160
              </tr>
159
			<%rsTemp.MoveNext
161
         <%rsTemp.MoveNext
160
	    	WEnd%>
162
          WEnd%>
161
            </table>
163
            </table>
162
            <br>
164
            <br>
163
			<input type="hidden" name="action" value="true">
165
         <input type="hidden" name="action" value="true">
164
            <input type="submit" name="btn" value=" Apply " class="form_btn">
166
            <input type="submit" name="btn" value=" Apply " class="form_btn">
165
            <input type="reset" name="btn" value="Reset" class="form_btn"><%If (QStrPar("action") <> "") Then Response.write "&nbsp;&nbsp;Changes applied!"%>
167
            <input type="reset" name="btn" value="Reset" class="form_btn"><%If (QStrPar("action") <> "") Then Response.write "&nbsp;&nbsp;Changes applied!"%>
166
			<br><br>
168
         <br><br>
167
          </td>
169
          </td>
168
          <td width="1%" background="images/lbox_bgside_white.gif">&nbsp;</td>
170
          <td width="1%" background="images/lbox_bgside_white.gif">&nbsp;</td>
169
        </tr>
171
        </tr>
170
        <tr> 
172
        <tr>
171
          <td width="1%" background="images/bg_member_dark.gif" valign="bottom"><img src="images/h_trsp_dot.gif" width="13" height="13"></td>
173
          <td width="1%" background="images/bg_member_dark.gif" valign="bottom"><img src="images/h_trsp_dot.gif" width="13" height="13"></td>
172
          <td background="images/bg_member_dark.gif"></td>
174
          <td background="images/bg_member_dark.gif"></td>
173
          <td width="1%" background="images/bg_member_dark.gif" valign="bottom" align="right"><img src="images/h_trsp_dot.gif" width="13" height="13"></td>
175
          <td width="1%" background="images/bg_member_dark.gif" valign="bottom" align="right"><img src="images/h_trsp_dot.gif" width="13" height="13"></td>
174
        </tr>
176
        </tr>
175
		</form>
177
      </form>
176
      </table>
178
      </table>
177
      <!-------------------------------------------------------->
179
      <!-------------------------------------------------------->
178
    </td>
180
    </td>
179
    <td rowspan="2" valign="bottom" width="100%" background="images/bg_member_light.gif" align="right"><img src="images/bg_img_view.gif" width="249" height="144" vspace="10" hspace="10"></td>
181
    <td rowspan="2" valign="bottom" width="100%" background="images/bg_member_light.gif" align="right"><img src="images/bg_img_view.gif" width="249" height="144" vspace="10" hspace="10"></td>
180
  </tr>
182
  </tr>
181
  <tr> 
183
  <tr>
182
    <td valign="bottom" align="center" background="images/bg_member_dark.gif"><img src="images/img_members.gif" width="81" height="57" vspace="20" hspace="30"></td>
184
    <td valign="bottom" align="center" background="images/bg_member_dark.gif"><img src="images/img_members.gif" width="81" height="57" vspace="20" hspace="30"></td>
183
    <td background="images/bg_member_light.gif" valign="top"><img src="images/h_trsp_dot.gif" width="100" height="400"></td>
185
    <td background="images/bg_member_light.gif" valign="top"><img src="images/h_trsp_dot.gif" width="100" height="400"></td>
184
  </tr>
186
  </tr>
185
</table>
187
</table>
186
<!-- FOOTER -->
188
<!-- FOOTER -->
187
<!--#include file="_footer.asp"-->
189
<!--#include file="_footer.asp"-->
188
</body>
190
</body>
189
</html>
191
</html>
190
<%
192
<%
191
Call Destroy_All_Objects
193
Call Destroy_All_Objects
192
%>
-
 
193
194
%>
-
 
195