Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5354 dpurdie 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|                                                   |
5
'|				    Computer List					 |
6
'|                                                   |
7
'=====================================================
8
%>
9
<%
10
Option explicit
11
Response.Expires = 0
12
%>
13
<!--#include file="common/globals.asp"-->
14
<!--#include file="common/config.asp"-->
15
<!--#include file="common/common_subs.asp"-->
16
<!--#include file="common/_computer_common.asp"-->
17
<%
18
'------------ ACCESS CONTROL ------------------
19
%>
20
<!--#include file="_access_control_general.asp"-->
21
<%
22
'------------ VARIABLE DEFINITION -------------
23
Dim rsUser
24
'------------ CONSTANTS DECLARATION -----------
25
'------------ VARIABLE INIT -------------------
26
'------------ CONDITIONS ----------------------
27
'----------------------------------------------
28
%>
29
<%
30
'------------ RUN BEFORE PAGE RENDER ----------
31
 
32
'----------------------------------------------
33
%>
34
<html>
35
<head>
36
<title>Access Manager</title>
37
<link rel="shortcut icon" href="<%=FavIcon%>"/>
38
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
39
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
40
<link href="scripts/access_manager.css" rel="stylesheet" type="text/css">
41
</head>
42
 
43
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0">
44
<!-- HEADER ++++++++++++++++++++++ -->
45
<!--#include file="_header.asp"-->
46
<!-- +++++++++++++++++++++++++++++ -->
47
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
48
  <tr>
49
    <td width="1%" valign="top" background="images/bg_bage_pane.gif">
50
	<!-- TREE NAVIGATOR ++++++++++++++++++++++++++++++++++++++++++++ -->
51
	<!--#include file="_treeNavigator.asp"-->  
52
	<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
53
	</td>
54
    <td width="1" background="images/bg_drk_gray_border.gif"><img src="images/spacer.gif" width="1" height="600"></td>
55
    <td width="100%" valign="top">
56
	<table width="100%"  border="0" cellspacing="0" cellpadding="9">
57
	<form name="FormName" method="post" action="<%=SCRIPT_NAME%>">
58
      <tr>
59
        <td background="images/bg_drk_bage_pane.gif">
60
		  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
61
            <tr>
62
              <td nowrap class="body_txt">
63
			    <!-- BUTTONS CONTROL +++++++++++++++++++ -->
64
				<!-- +++++++++++++++++++++++++++++++++++ -->
65
			  </td>
66
              <td align="right" nowrap class="section_ttl"><%=PARENT_TITLE%></td>
67
            </tr>
68
          </table>
69
		</td>
70
      </tr>
71
      <tr>
72
        <td>
73
		<%
74
		Dim startPosition, pageNumber, navigator, totalRecords, lastRecord
75
		Const MAX_ROWS = 50	' Maximum number of rows displayed
76
 
77
		'--- Set filters ---
78
		If Request("filter") <> "" Then
79
			OraDatabase.Parameters.Add "CLIENT_IP", 	Request("filter") &"%",	ORAPARM_INPUT, ORATYPE_VARCHAR2
80
		Else
81
			OraDatabase.Parameters.Add "CLIENT_IP", 	NULL,	ORAPARM_INPUT, ORATYPE_VARCHAR2
82
		End If
83
 
84
 
85
		Set rsUser = OraDatabase.DbCreateDynaset( GetQuery ("ComputerList.sql") , ORADYN_DEFAULT )
86
 
87
		'--- Get page number ---
88
		pageNumber = 0
89
		If Request("pg") <> "" Then 
90
		pageNumber = CInt(Request("pg"))
91
		End If
92
 
93
 
94
		'--- Set Cursor start position ---
95
		startPosition = pageNumber * MAX_ROWS + 1
96
		If (NOT rsUser.BOF) AND (NOT rsUser.EOF) Then
97
			rsUser.MoveTo ( startPosition )		' Set starting cursor point
98
 
99
		End If
100
 
101
 
102
		'--- Construct Navigator
103
		navigator = ""
104
		If (NOT rsUser.BOF) AND (NOT rsUser.EOF) Then
105
			totalRecords = rsUser.RecordCount	' Get total number of records
106
 
107
			'--- Create "Previous" link
108
			If pageNumber > 0 Then
109
				navigator = navigator &"<a href='"& SCRIPT_NAME &"?pg="& pageNumber - 1 &"&"& objPMod.ComposeURL &"' class='body_link' title='Show Previous Page'>&laquo; Previous</a>"
110
			End If
111
 
112
			'--- Create "Next" link
113
			If ( startPosition + MAX_ROWS ) < totalRecords Then
114
				navigator = navigator &"&nbsp;&nbsp;<a href='"& SCRIPT_NAME &"?pg="& pageNumber + 1 &"&"& objPMod.ComposeURL &"' class='body_link' title='Show Next Page'>Next &raquo;</a>"
115
			End If
116
 
117
		End If
118
 
119
 
120
		'--- Calculate Last Record ---
121
		If totalRecords > 0 Then
122
			lastRecord = ( startPosition - 1 + MAX_ROWS ) _
123
						+ ( CInt( ( startPosition - 1 + MAX_ROWS )/totalRecords > 1) ) * ( ( startPosition - 1 + MAX_ROWS ) - totalRecords )
124
		End If
125
		%>
126
		<table width="100%"  border="0" cellspacing="0" cellpadding="0">
127
          <tr align="left">
128
            <td colspan="2" class="body_row">&nbsp;</td>
129
          </tr>
130
          <tr>
131
            <td align="left" class="body_row">
132
			<%
133
			If totalRecords > 0 Then 
134
				Response.write "Showing "& startPosition &" - "& lastRecord &" of "& totalRecords
135
			Else
136
				Response.write "No Results."
137
			End If
138
			%></td>
139
            <td align="right" class="body_scol"><%=navigator%></td>
140
          </tr>
141
        </table>          
142
		 <!-- DETAILS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
143
		 <table width="100%"  border="0" cellspacing="3" cellpadding="0">
144
          <tr>
145
		  	<td width="1%" background="images/bg_table_col.gif"><img src="images/spacer.gif" width="16" height="16" hspace="2"></td>
146
            <td width="30%" background="images/bg_table_border.gif">
147
			<table width="100%"  border="0" cellspacing="1" cellpadding="2">
148
              <tr>
149
                <td align="right" nowrap background="images/bg_table_col.gif" class="body_col">Remote Address (IP)</td>
150
              </tr>
151
            </table></td>
152
            <td width="70%" align="right" nowrap background="images/bg_table_col.gif" class="body_col"></td>
153
          </tr>
154
		  <%
155
		  '--- Render rows ---
156
		  Do While (NOT rsUser.BOF) AND (NOT rsUser.EOF)
157
		  		If rsUser.RowPosition => (startPosition + MAX_ROWS) Then Exit Do	' Limit the number of rows displayed
158
		  %>
159
          <tr>
160
		  	<td align="center"><input type="checkbox" name="client_ip" value="" disabled></td>
161
            <td nowrap class="body_row"><a href="Computer_Users.asp?client_ip=<%=Server.URLEncode ( rsUser("client_ip") )%>&<%=objPMod.ComposeURL%>" class="body_link"><%=LIMG_COMPUTERS & rsUser("client_ip")%></a></td>
162
            <td ></td>
163
          </tr>
164
		  <%rsUser.MoveNext%>
165
 
166
		  <%If (NOT rsUser.BOF) AND (NOT rsUser.EOF) Then%>
167
          <tr>
168
            <td colspan="3" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
169
          </tr>
170
		  <%End If%>
171
 
172
		  <%
173
		  Loop
174
 
175
 
176
		  OraDatabase.Parameters.Remove "CLIENT_IP"
177
 
178
		  rsUser.Close()
179
		  Set rsUser = Nothing
180
		  %>
181
          <tr>
182
            <td colspan="3" background="images/bg_table_border.gif">
183
			 <table width="100%"  border="0" cellspacing="1" cellpadding="2">
184
              <tr>
185
                <td nowrap background="images/bg_table_col.gif"><img src="images/spacer.gif" width="1" height="1"></td>
186
              </tr>
187
             </table>
188
			</td>
189
          </tr>
190
         </table>	 
191
		 <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
192
		 <table width="100%"  border="0" cellspacing="0" cellpadding="0">
193
          <tr>
194
            <td align="right" class="body_scol"><%=navigator%></td>
195
          </tr>
196
        </table>
197
         <br></td>
198
      </tr>
199
	  <%=objPMod.ComposeHiddenTags()%>
200
	  <input type="hidden" name="action" value="true">
201
	</form>
202
    </table></td>
203
  </tr>
204
</table>
205
<!-- FOOTER ++++++++++++++++++++++ -->
206
<!--#include file="_footer.asp"-->
207
<!-- +++++++++++++++++++++++++++++ -->
208
</body>
209
</html>
210
<%
211
'------------ RUN AFTER PAGE RENDER -----------
212
'----------------------------------------------
213
%>
2 rsolanki 214
<!--#include file="common/globals_destructor.asp"-->