Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

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