Sort | Display program index.asp
Features: Displaying directory trees
<!--#include file= "Lybcon.inc"--><%
Pageno=request ("PageNo")
Searchtype=request ("SearchType")
Searchnr=rtrim (Request ("Searchnr"))
Set Guestconn=server.createobject ("Adodb.connection")
Guestconn. Open Lybstr
Set Guestrs=server.createobject ("Adodb.recordset")
Sqlstr= "SELECT * FROM Guestbook"
If searchnr<> "" Then sqlstr=sqlstr& "where" &searchtype& "like '%" &replace (Searchnr, "'", "" ") & "%%"
sqlstr=sqlstr& "ORDER by rootid+ (1-sign (Rootid)) *lybid desc,orderstr,lybid"
Guestrs.open sqlstr,guestconn,1,1
Rowcount=25
If pageno= "" then pageno=1
If not guestrs.eof then
If IsNumeric (PageNo) Then
Guestrs.pagesize=rowcount
If Pageno+1>guestrs.pagecount+1 then Pageno=guestrs.pagecount
Else
Pageno=1
End If
Guestrs. Absolutepage=pageno
Else
Pageno=1
End If
%><style type= "Text/css" >
<!--
a {Text-decoration:none}
Body {line-height:18px;font-size:9pt;font-family: XXFarEastFont-Arial}
a:hover {color: #FF0000; Text-decoration:none}
. Submit {line-height:9pt;font-size:9pt;font-family: Song body}
. submit1 {line-height:8pt;font-size:8pt;font-family: Song body}
. selectform {font-family: Song body; font-size:9pt;background-color:ffe4e4}
TD {Font-family: Song body; font-size:9pt;background-color:ecf7ff}
. TD1 {font-family: Song body; Font-size:9pt;background-color:a2c8f2}
. td2 {font-family: Song body; font-size:9pt;background-color:e9ede0}
. small1 {font-family: Song body; font-size:9pt;background-color:ffffff;line-height:9pt}
-->
</style>
<script language= "JavaScript1.2" >
function d (SP,T,A,D,TI,L,ID,RID,PN)
{
document.write ("<tr><td>" +sp+ "<a href= ' disprec.asp?keyid=" +id+ "&rootid=" +rid+ "&pageno=" + pn+ "' >" +t+ "</a></td>");
document.write ("<td align=right>" +a+ "</td>");
document.write ("<td nowrap align=center>" +d+ "+ti+" "</td>");
document.write ("<td align=right>" +l+ "</td>");
document.write ("<td align=right>" +id+ "</td>");
document.write ("</tr>");
}
</script>
<body topmargin=16>
<form name= ' index ' method= ' POST ' action= ' index.asp ' >
<table width=100% align=center>
<tr>
<TD align=center style= ' font-size:16px;background-color:ffffff;color:red ' height=35 valign=top> software use message thin </ Td>
<TD align=center colspan=3 style= ' font-size:13px;background-color:ffffff ' valign= ' bottom ' > A total <font ' style= ' Font-size:16px;color:red ' ><% =guestrs.recordcount%></font> message <font style= ' Font-size:16px;color : Red ' ><% =guestrs.pagecount%></font> page currently <font style= ' font-size:16px;color:red ' ><% =pageno %></font> page </td>
<TD style= ' background-color:ffffff ' valign=bottom><a href= '/wen/swuselyb/index.asp ' > Old message book </a> </td></tr>
<tr>
<TD class= ' td2 ' align= ' center ' > Search Posts
<select name= ' searchtype ' class= ' small1 ' >
<option value= ' guestname ' <% if searchtype= "Guestname" Then Response.Write ("selected")%>> posts author </opion >
<option value= ' Guestcomm ' <% if searchtype= "Guestcomm" Then Response.Write ("selected")%>> posts </opion >
</select> <input type= ' text ' name= ' searchnr ' size=14 class= ' small1 ' ' value= ' <% =searchnr '%> ' > <a Href= ' Javascript:document.index.submit (); ' > Start Search </a>
</td>
<TD colspan=3 class= ' td2 ' align= ' center ' ><% if Pageno+1>2 then ' javascript: document.index.pageno.value--;d ocument.index.submit (); ' > Previous </a><% Else%> last page <% End If%> <% if pageno+1<guestrs.pagecount+1 then%><a href= ' JAV ascript:document.index.pageno.value++;d ocument.index.submit (); ' > Next </a><% Else%> next page <% End If%>