 <cfif action is "nothing">
 	<script src="/includes/sorttable.js"></script>
 	<p>
-		This form shows only activity in the last 180 days.
+		This form shows only activity in the last 180 days; all IP-based access restrictions expire after 180 days.
 	</p>
 	<cfoutput>
 	<cfquery name="rip" datasource="user_login" username="#session.dbuser#" password="#decrypt(session.epw,session.sessionKey)#">

		where
			sysdate-INSERT_DATE<180
	</cfquery>

	<cfset utilities = CreateObject("component","component.utilities")>
	<cfset utilities.setAppBL()>



	<cfquery name="subnetfromip" dbtype="query">
		select
			subnet

					</cfif>
				</td>
				<td valign="top">
					<cfquery name="dip" dbtype="query">
						select ip from rip where subnet='#subnet#' group by ip order by ip
					</cfquery>
					<cfloop query="dip">
						<table border>
							<tr>
								<th>IP</th>
								<th>Details</th>
							</tr>
							<tr>
								<td valign="top">#ip#</td>
								<td>
									<cfquery name="tl" dbtype="query">
										select * from rip where ip='#ip#' order by listdate
									</cfquery>
									<table border>
										<tr>
											<th>listdate</th>
											<th>lastdate</th>
											<th>status</th>
											<th>tools</th>
										</tr>
										<cfloop query="#tl#">
											<tr>
												<td>#LISTDATE#</td>
												<td>#LASTDATE#</td>
												<td>#STATUS#</td>
												<td>
													<ul>
														<li><a href="blacklist.cfm?action=del&ip=#ip#">release IP</a></li>
														<li><a class="external" target="_blank" href="http://whatismyipaddress.com/ip/#ip#">[ lookup @whatismyipaddress ]</a></li>
														<li><a class="external" target="_blank" href="https://www.ipalyzer.com/#ip#">[ lookup @ipalyzer ]</a></li>
														<li><a class="external" target="_blank" href="https://gwhois.org/#ip#">[ lookup @gwhois ]</a></li>
													</ul>
												</td>
											</tr>
										</cfloop>
									</table>
								</td>
							</tr>
						</table>
					</cfloop>
				</td>
			</tr>
		</cfloop>
