| 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">
|
| 6658 |
dpurdie |
41 |
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
|
| 5354 |
dpurdie |
42 |
</head>
|
|
|
43 |
|
|
|
44 |
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0">
|
|
|
45 |
<!-- HEADER ++++++++++++++++++++++ -->
|
|
|
46 |
<!--#include file="_header.asp"-->
|
|
|
47 |
<!-- +++++++++++++++++++++++++++++ -->
|
|
|
48 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
49 |
<tr>
|
|
|
50 |
<td width="1%" valign="top" background="images/bg_bage_pane.gif">
|
|
|
51 |
<!-- TREE NAVIGATOR ++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
52 |
<!--#include file="_treeNavigator.asp"-->
|
|
|
53 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
54 |
</td>
|
|
|
55 |
<td width="1" background="images/bg_drk_gray_border.gif"><img src="images/spacer.gif" width="1" height="600"></td>
|
|
|
56 |
<td width="100%" valign="top">
|
|
|
57 |
<table width="100%" border="0" cellspacing="0" cellpadding="9">
|
|
|
58 |
<form name="FormName" method="post" action="<%=SCRIPT_NAME%>">
|
|
|
59 |
<tr>
|
|
|
60 |
<td background="images/bg_drk_bage_pane.gif">
|
|
|
61 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
62 |
<tr>
|
|
|
63 |
<td nowrap class="body_txt">
|
|
|
64 |
<!-- BUTTONS CONTROL +++++++++++++++++++ -->
|
|
|
65 |
<!-- +++++++++++++++++++++++++++++++++++ -->
|
|
|
66 |
</td>
|
|
|
67 |
<td align="right" nowrap class="section_ttl"><%=PARENT_TITLE%></td>
|
|
|
68 |
</tr>
|
|
|
69 |
</table>
|
|
|
70 |
</td>
|
|
|
71 |
</tr>
|
|
|
72 |
<tr>
|
|
|
73 |
<td>
|
|
|
74 |
<%
|
|
|
75 |
Dim startPosition, pageNumber, navigator, totalRecords, lastRecord
|
|
|
76 |
Const MAX_ROWS = 50 ' Maximum number of rows displayed
|
|
|
77 |
|
|
|
78 |
'--- Set filters ---
|
|
|
79 |
If Request("filter") <> "" Then
|
|
|
80 |
OraDatabase.Parameters.Add "CLIENT_IP", Request("filter") &"%", ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
81 |
Else
|
|
|
82 |
OraDatabase.Parameters.Add "CLIENT_IP", NULL, ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
83 |
End If
|
|
|
84 |
|
|
|
85 |
|
|
|
86 |
Set rsUser = OraDatabase.DbCreateDynaset( GetQuery ("ComputerList.sql") , ORADYN_DEFAULT )
|
|
|
87 |
|
|
|
88 |
'--- Get page number ---
|
|
|
89 |
pageNumber = 0
|
|
|
90 |
If Request("pg") <> "" Then
|
|
|
91 |
pageNumber = CInt(Request("pg"))
|
|
|
92 |
End If
|
|
|
93 |
|
|
|
94 |
|
|
|
95 |
'--- Set Cursor start position ---
|
|
|
96 |
startPosition = pageNumber * MAX_ROWS + 1
|
|
|
97 |
If (NOT rsUser.BOF) AND (NOT rsUser.EOF) Then
|
|
|
98 |
rsUser.MoveTo ( startPosition ) ' Set starting cursor point
|
|
|
99 |
|
|
|
100 |
End If
|
|
|
101 |
|
|
|
102 |
|
|
|
103 |
'--- Construct Navigator
|
|
|
104 |
navigator = ""
|
|
|
105 |
If (NOT rsUser.BOF) AND (NOT rsUser.EOF) Then
|
|
|
106 |
totalRecords = rsUser.RecordCount ' Get total number of records
|
|
|
107 |
|
|
|
108 |
'--- Create "Previous" link
|
|
|
109 |
If pageNumber > 0 Then
|
|
|
110 |
navigator = navigator &"<a href='"& SCRIPT_NAME &"?pg="& pageNumber - 1 &"&"& objPMod.ComposeURL &"' class='body_link' title='Show Previous Page'>« Previous</a>"
|
|
|
111 |
End If
|
|
|
112 |
|
|
|
113 |
'--- Create "Next" link
|
|
|
114 |
If ( startPosition + MAX_ROWS ) < totalRecords Then
|
|
|
115 |
navigator = navigator &" <a href='"& SCRIPT_NAME &"?pg="& pageNumber + 1 &"&"& objPMod.ComposeURL &"' class='body_link' title='Show Next Page'>Next »</a>"
|
|
|
116 |
End If
|
|
|
117 |
|
|
|
118 |
End If
|
|
|
119 |
|
|
|
120 |
|
|
|
121 |
'--- Calculate Last Record ---
|
|
|
122 |
If totalRecords > 0 Then
|
|
|
123 |
lastRecord = ( startPosition - 1 + MAX_ROWS ) _
|
|
|
124 |
+ ( CInt( ( startPosition - 1 + MAX_ROWS )/totalRecords > 1) ) * ( ( startPosition - 1 + MAX_ROWS ) - totalRecords )
|
|
|
125 |
End If
|
|
|
126 |
%>
|
|
|
127 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
128 |
<tr align="left">
|
|
|
129 |
<td colspan="2" class="body_row"> </td>
|
|
|
130 |
</tr>
|
|
|
131 |
<tr>
|
|
|
132 |
<td align="left" class="body_row">
|
|
|
133 |
<%
|
|
|
134 |
If totalRecords > 0 Then
|
|
|
135 |
Response.write "Showing "& startPosition &" - "& lastRecord &" of "& totalRecords
|
|
|
136 |
Else
|
|
|
137 |
Response.write "No Results."
|
|
|
138 |
End If
|
|
|
139 |
%></td>
|
|
|
140 |
<td align="right" class="body_scol"><%=navigator%></td>
|
|
|
141 |
</tr>
|
|
|
142 |
</table>
|
|
|
143 |
<!-- DETAILS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
144 |
<table width="100%" border="0" cellspacing="3" cellpadding="0">
|
|
|
145 |
<tr>
|
|
|
146 |
<td width="1%" background="images/bg_table_col.gif"><img src="images/spacer.gif" width="16" height="16" hspace="2"></td>
|
|
|
147 |
<td width="30%" background="images/bg_table_border.gif">
|
|
|
148 |
<table width="100%" border="0" cellspacing="1" cellpadding="2">
|
|
|
149 |
<tr>
|
|
|
150 |
<td align="right" nowrap background="images/bg_table_col.gif" class="body_col">Remote Address (IP)</td>
|
|
|
151 |
</tr>
|
|
|
152 |
</table></td>
|
|
|
153 |
<td width="70%" align="right" nowrap background="images/bg_table_col.gif" class="body_col"></td>
|
|
|
154 |
</tr>
|
|
|
155 |
<%
|
|
|
156 |
'--- Render rows ---
|
|
|
157 |
Do While (NOT rsUser.BOF) AND (NOT rsUser.EOF)
|
|
|
158 |
If rsUser.RowPosition => (startPosition + MAX_ROWS) Then Exit Do ' Limit the number of rows displayed
|
|
|
159 |
%>
|
|
|
160 |
<tr>
|
|
|
161 |
<td align="center"><input type="checkbox" name="client_ip" value="" disabled></td>
|
|
|
162 |
<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>
|
|
|
163 |
<td ></td>
|
|
|
164 |
</tr>
|
|
|
165 |
<%rsUser.MoveNext%>
|
|
|
166 |
|
|
|
167 |
<%If (NOT rsUser.BOF) AND (NOT rsUser.EOF) Then%>
|
|
|
168 |
<tr>
|
|
|
169 |
<td colspan="3" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
|
|
|
170 |
</tr>
|
|
|
171 |
<%End If%>
|
|
|
172 |
|
|
|
173 |
<%
|
|
|
174 |
Loop
|
|
|
175 |
|
|
|
176 |
|
|
|
177 |
OraDatabase.Parameters.Remove "CLIENT_IP"
|
|
|
178 |
|
|
|
179 |
rsUser.Close()
|
|
|
180 |
Set rsUser = Nothing
|
|
|
181 |
%>
|
|
|
182 |
<tr>
|
|
|
183 |
<td colspan="3" background="images/bg_table_border.gif">
|
|
|
184 |
<table width="100%" border="0" cellspacing="1" cellpadding="2">
|
|
|
185 |
<tr>
|
|
|
186 |
<td nowrap background="images/bg_table_col.gif"><img src="images/spacer.gif" width="1" height="1"></td>
|
|
|
187 |
</tr>
|
|
|
188 |
</table>
|
|
|
189 |
</td>
|
|
|
190 |
</tr>
|
|
|
191 |
</table>
|
|
|
192 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
193 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
194 |
<tr>
|
|
|
195 |
<td align="right" class="body_scol"><%=navigator%></td>
|
|
|
196 |
</tr>
|
|
|
197 |
</table>
|
|
|
198 |
<br></td>
|
|
|
199 |
</tr>
|
|
|
200 |
<%=objPMod.ComposeHiddenTags()%>
|
|
|
201 |
<input type="hidden" name="action" value="true">
|
|
|
202 |
</form>
|
|
|
203 |
</table></td>
|
|
|
204 |
</tr>
|
|
|
205 |
</table>
|
|
|
206 |
<!-- FOOTER ++++++++++++++++++++++ -->
|
|
|
207 |
<!--#include file="_footer.asp"-->
|
|
|
208 |
<!-- +++++++++++++++++++++++++++++ -->
|
|
|
209 |
</body>
|
|
|
210 |
</html>
|
|
|
211 |
<%
|
|
|
212 |
'------------ RUN AFTER PAGE RENDER -----------
|
|
|
213 |
'----------------------------------------------
|
|
|
214 |
%>
|
| 2 |
rsolanki |
215 |
<!--#include file="common/globals_destructor.asp"-->
|