Subversion Repositories DevTools

Rev

Rev 5984 | Rev 6579 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5357 dpurdie 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|                                                   |
5
'|                   MEMBERS                         |
6
'|                 PUBLIC VIEW                       |
7
'=====================================================
8
%>
9
<%
10
Option explicit
11
' Good idea to set when using redirect
12
Response.Expires = 0   ' always load the page, dont store
13
%>
14
<!--#include file="common/conf.asp"-->
15
<!--#include file="common/globals.asp"-->
16
<!--#include file="common/formating.asp"-->
17
<!--#include file="common/qstr.asp"-->
18
<!--#include file="common/common_subs.asp"-->
19
<%
20
'------------ ACCESS CONTROL ------------------
21
%>
22
<!--#include file="_access_control_login.asp"-->
23
<!--#include file="_access_control_general.asp"-->
24
<%
25
'------------ Variable Definition -------------
26
Dim rsTemp
27
'------------ Constants Declaration -----------
28
'------------ Variable Init -------------------
29
'----------------------------------------------
30
%>
31
<%
32
Function Get_Public_Views ( NNuser_id )
33
   Get_Public_Views = ReadFile( rootPath & "queries\public_views_list.qry" )
34
   Get_Public_Views = Replace( Get_Public_Views, "$USER_ID$", NNuser_id)
35
End Function
36
 
37
Sub Remove_View_Settings ( NNuser_id )
38
   objEH.TryORA ( OraSession )
39
   On Error Resume Next
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')"
41
   objEH.CatchORA ( OraSession )
42
End Sub
43
 
44
Sub Insert_View_Settings ( NNuser_id, SSpublicshow )
45
   If SSpublicshow <> "" Then
46
      objEH.TryORA ( OraSession )
47
      On Error Resume Next
48
      OraDatabase.ExecuteSQL " INSERT INTO view_settings"&_
49
                             " SELECT TO_NUMBER('"& NNuser_id &"') AS user_id, vi.view_id FROM views vi WHERE vi.view_id IN ("& SSpublicshow &")"
50
      objEH.CatchORA ( OraSession )
51
   End If
52
End Sub
53
 
54
Function Owner_Format( NNuser_id, SSemail, SSname )
55
   If CInt(NNuser_id) = 0 Then
56
      Response.write "public"
57
   Else
58
      Response.write "<a href='mailto:"& SSemail &"' class='txt_linked'>"& SSname &"</a>"
59
   End If
60
End Function
61
%>
62
<%
63
'--- Process submition ---
64
If (QStrPar("action") <> "") Then
65
   ' All mandatory parameters FOUND
66
   Call Remove_View_Settings ( objAccessControl.UserId )
67
   Call Insert_View_Settings ( objAccessControl.UserId, Request("FRpublicshow") )
68
End If
69
%>
70
<html>
71
<head>
72
<title>Release Manager</title>
73
<link rel="shortcut icon" href="<%=FavIcon%>"/>
74
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
75
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
76
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
77
<link rel="stylesheet" href="images/navigation.css" type="text/css">
78
<script language="JavaScript" src="images/common.js"></script>
5984 dpurdie 79
<!--#include file="_menu_def.asp"-->
80
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
5590 dpurdie 81
<!--#include file="_jquery_includes.asp"-->
5357 dpurdie 82
</head>
83
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
84
<!-- HEADER -->
85
<!--#include file="_header.asp"-->
86
<!-- BODY ---->
87
<table width="100%" border="0" cellspacing="0" cellpadding="0">
88
  <tr>
89
    <td width="1%" background="images/bg_member_dark.gif" valign="top">
90
      <!-- MEMBERS MENU ---------------------------------------------->
91
     <!--#include file="members_menu_def.asp"-->
92
     <%Call Member_Menu( "views" )%>
93
      <!--  MEMBERS MENU END ------------------------------------------>
94
    </td>
5984 dpurdie 95
    <td width="1%" valign="top" background="images/bg_member_light.gif"></td>
5357 dpurdie 96
    <td rowspan="2" valign="top" width="1%" background="images/bg_member_light.gif" nowrap>
97
      <!------------------------------------------->
98
      <br>
99
      <span class="mmb_ttl">Public View</span><br>
100
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
101
     <form name="publicview" method="post" action="members_public_view.asp?done=done<%=QSTR%>">
102
        <tr>
103
          <td width="1%">&nbsp;</td>
104
          <td align="right"><img src="images/h_trsp_dot.gif" width="500" height="30"></td>
105
          <td width="1%">&nbsp;</td>
106
        </tr>
107
        <tr>
108
          <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>
5590 dpurdie 109
          <td background="images/bg_member_dark.gif" align="left" class="wform_ttl"><a href="#" onClick="MM_openVixIFrame('members_new_public_view.asp','Create New Public View')" 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>
5357 dpurdie 110
          <td align="right" valign="top" width="1%" background="images/bg_member_dark.gif">&nbsp;</td>
111
        </tr>
112
        <tr>
113
          <td width="1%" bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
114
          <td bgcolor="#FFFFFF" valign="top" class="form_item"> <br>
115
            <table width="100%" border="0" cellspacing="1" cellpadding="2">
116
              <tr>
117
                <td background="images/bg_form_lightbluedark.gif" nowrap class="form_field" width="1%">Show</td>
118
                <td background="images/bg_form_lightbluedark.gif" nowrap class="form_field" width="100%">View Name</td>
119
            <td background="images/bg_form_lightbluedark.gif" nowrap class="form_field" width="1%">Package Count</td>
120
            <td background="images/bg_form_lightbluedark.gif" nowrap class="form_field" width="1%">Owner</td>
121
                <td background="images/bg_form_lightbluedark.gif" class="form_field" width="1%">&nbsp;</td>
122
                <td background="images/bg_form_lightbluedark.gif" class="form_field" width="1%">&nbsp;</td>
123
              </tr>
124
         <%Set rsTemp = OraDatabase.DbCreateDynaset( Get_Public_Views( objAccessControl.UserId ), cint(0))
125
           While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))%>
126
              <tr>
127
                <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>
128
            <%If rsTemp.Fields("base_view") = "Y" Then%>
129
               <td background="images/bg_form_lightgray.gif" nowrap class="form_item"><%=rsTemp.Fields("view_name")%></td>
130
               <td background="images/bg_form_lightgray.gif" nowrap class="form_item" align="center">Base View</td>
131
               <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>
132
                   <td background="images/bg_form_lightgray.gif"><img src="images/i_edit_disable.gif" width="12" height="12" hspace="5" ></td>
133
                   <td background="images/bg_form_lightgray.gif"><img src="images/i_delete_disable.gif" width="13" height="12" hspace="5" ></td>
134
            <%ElseIf rsTemp.Fields("base_view") = "S" Then%>
135
               <td background="images/bg_form_lightgray.gif" nowrap class="form_item"><%=rsTemp.Fields("view_name")%></td>
136
               <td background="images/bg_form_lightgray.gif" nowrap class="form_item" align="center">SDK View</td>
137
               <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>
138
                   <td background="images/bg_form_lightgray.gif"><img src="images/i_edit_disable.gif" width="12" height="12" hspace="5" ></td>
139
                   <td background="images/bg_form_lightgray.gif"><img src="images/i_delete_disable.gif" width="13" height="12" hspace="5" ></td>
140
            <%Else%>
141
               <%If (Cint(rsTemp.Fields("owner_id")) = Cint(objAccessControl.UserId)) OR (Cint(rsTemp.Fields("owner_id")) = 0) Then%>
5590 dpurdie 142
               <td background="images/bg_form_lightgray.gif" nowrap><a href="#" onClick="MM_openVixIFrame('members_edit_public_view.asp?FRview_id=<%=rsTemp.Fields("view_id")%>','Edit Public View')" class="form_item"><%=rsTemp.Fields("view_name")%></a></td>
5357 dpurdie 143
               <td background="images/bg_form_lightgray.gif" nowrap class="form_item" align="center"><%=rsTemp.Fields("pkg_count")%></td>
144
               <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>
5590 dpurdie 145
                   <td background="images/bg_form_lightgray.gif"><a href="#" onClick="MM_openVixIFrame('members_edit_public_view.asp?FRview_id=<%=rsTemp.Fields("view_id")%>','Edit Public View')"><img src="images/i_edit.gif" width="12" height="12" hspace="5" border="0" alt="Edit view" title="Edit view"></a></td>
5357 dpurdie 146
                   <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>
147
               <%Else%>
148
               <td background="images/bg_form_lightgray.gif" nowrap class="form_item"><%=rsTemp.Fields("view_name")%></td>
149
               <td background="images/bg_form_lightgray.gif" nowrap class="form_item" align="center"><%=rsTemp.Fields("pkg_count")%></td>
150
               <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>
151
               <td background="images/bg_form_lightgray.gif"><img src="images/i_edit_disable.gif" width="12" height="12" hspace="5" ></td>
152
                   <td background="images/bg_form_lightgray.gif"><img src="images/i_delete_disable.gif" width="13" height="12" hspace="5" ></td>
153
               <%End If%>
154
            <%End If%>
155
              </tr>
156
         <%rsTemp.MoveNext
157
          WEnd%>
158
            </table>
159
            <br>
160
         <input type="hidden" name="action" value="true">
161
            <input type="submit" name="btn" value=" Apply " class="form_btn">
162
            <input type="reset" name="btn" value="Reset" class="form_btn"><%If (QStrPar("action") <> "") Then Response.write "&nbsp;&nbsp;Changes applied!"%>
163
         <br><br>
164
          </td>
165
          <td width="1%" background="images/lbox_bgside_white.gif">&nbsp;</td>
166
        </tr>
167
        <tr>
168
          <td width="1%" background="images/bg_member_dark.gif" valign="bottom"><img src="images/h_trsp_dot.gif" width="13" height="13"></td>
169
          <td background="images/bg_member_dark.gif"></td>
170
          <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>
171
        </tr>
172
      </form>
173
      </table>
174
      <!-------------------------------------------------------->
175
    </td>
176
    <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>
177
  </tr>
178
  <tr>
179
    <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>
180
    <td background="images/bg_member_light.gif" valign="top"><img src="images/h_trsp_dot.gif" width="100" height="400"></td>
181
  </tr>
182
</table>
183
<!-- FOOTER -->
184
<!--#include file="_footer.asp"-->
185
</body>
186
</html>