📄 showlink.asp
字号:
<!-- #INCLUDE FILE="adovbs.inc" -->
<%
cat = Request.QueryString("CatID")
status = Request.QueryString("status")
if status = "delete" then
Response.Write "<center>点击网站名删除!</center><br>"
Conn_String ="Provider=sqloledb;" & "Data Source=127.0.0.1;Initial Catalog=qiye_8;User Id=sa;Password=password;"
Dim iPageSize
Dim iPageCount
Dim iPageCurrent
Dim strOrderBy
Dim strSQL
Dim objPagingConn
Dim objPagingRS
Dim iRecordsShown
Dim I
iPageSize = 10
If Request.QueryString("page") = "" Then
iPageCurrent = 1
Else
iPageCurrent = CInt(Request.QueryString("page"))
End If
If Request.QueryString("order") = "" Then
strOrderBy = "id"
Else
strOrderBy = Request.QueryString("order")
End If
strSQL ="SELECT * From link2 where Category='" & cat & "' order by ID"
Set objPagingConn = Server.CreateObject("ADODB.Connection")
objPagingConn.Open CONN_STRING
Set objPagingRS = Server.CreateObject("ADODB.Recordset")
objPagingRS.PageSize = iPageSize
objPagingRS.CacheSize = iPageSize
objPagingRS.Open strSQL, objPagingConn, adOpenStatic, adLockReadOnly,adCmdText
reccount = objPagingRS.recordcount
iPageCount = objPagingRS.PageCount
If iPageCurrent > iPageCount Then iPageCurrent = iPageCount
If iPageCurrent < 1 Then iPageCurrent = 1
If iPageCount = 0 Then
Response.Write "<center><font color=red size=3>未找到记录!</font></center>"
Else
objPagingRS.AbsolutePage = iPageCurrent
%>
<center>
<font face="宋体" size="2" color="#FF0000">找到 <%=reccount%> 个网站</font>
<BR><BR>
<%
iRecordsShown = 0
Do While iRecordsShown < iPageSize And Not objPagingRS.EOF
%>
<center>
<table border=0 width=400 cellspacing=0>
<tr><td width="300">
<a href="deleteurl.asp?id=<%=objPagingRS("ID")%>"><b><%=objPagingRS("Name")%></b></a>
<font color='red'>[新]</font>
</td><td width="100"><font face="宋体" size=2 color='red'>点击 : <%=objPagingRS("Hit")%> </font></td>
</tr>
<tr>
<td colspan='2' ><%=objPagingRS("Description")%> </td>
</tr>
</table>
</center><br>
<%
iRecordsShown = iRecordsShown + 1
objPagingRS.MoveNext
Loop
End If
objPagingRS.Close
Set objPagingRS = Nothing
objPagingConn.Close
Set objPagingConn = Nothing
If iPageCurrent <> 1 Then
%>
<A HREF="./showlink.asp?page=<%= iPageCurrent - 1 %>&order=<%=Server.URLEncode(strOrderBy) %>&CatID=<%=cat%>&status=delete"><font face="宋体" size="2">上一页</font></A>
<%
End If
If iPageCurrent < iPageCount Then
%>
<A HREF="./showlink.asp?page=<%= iPageCurrent + 1 %>&order=<%=Server.URLEncode(strOrderBy) %>&CatID=<%=cat%>&status=delete"><font size="2" face="宋体"><b>下一页</b></font></A>
</center>
<%End If%>
<center>
<font face="宋体" size="2">第 <B><%= iPageCurrent %></B> 页</font>
<FONT SIZE="+1">
</FONT>
<font face="宋体" size="2">共 <B><%= iPageCount %></B> 页
</font>
<%else%>
<%Conn_String ="Provider=sqloledb;" & "Data Source=127.0.0.1;Initial Catalog=qiye_8;User Id=sa;Password=password;"
iPageSize = 10
If Request.QueryString("page") = "" Then
iPageCurrent = 1
Else
iPageCurrent = CInt(Request.QueryString("page"))
End If
If Request.QueryString("order") = "" Then
strOrderBy = "id"
Else
strOrderBy = Request.QueryString("order")
End If
strSQL ="SELECT * From link2 where Category='" & cat & "' order by ID "
Set objPagingConn = Server.CreateObject("ADODB.Connection")
objPagingConn.Open CONN_STRING
Set objPagingRS = Server.CreateObject("ADODB.Recordset")
objPagingRS.PageSize = iPageSize
objPagingRS.CacheSize = iPageSize
objPagingRS.Open strSQL, objPagingConn, adOpenStatic, adLockReadOnly,adCmdText
reccount = objPagingRS.recordcount
iPageCount = objPagingRS.PageCount
If iPageCurrent > iPageCount Then iPageCurrent = iPageCount
If iPageCurrent < 1 Then iPageCurrent = 1
If iPageCount = 0 Then
Response.Write "<center><font color=red size=3>未找到记录!</font></center>"
Else
objPagingRS.AbsolutePage = iPageCurrent
%>
<center>
<font face="宋体" size="2" color="#FF0000">找到 <%=reccount%> 网站</font>
<BR><BR>
<%
iRecordsShown = 0
Do While iRecordsShown < iPageSize And Not objPagingRS.EOF
%>
<center>
<table border=0 width=400 cellspacing=0>
<tr><td width="300">
<a href="editurl.asp?id=<%=objPagingRS("ID")%>"><b><%=objPagingRS("Name")%></b></a>
<font color='red'>[新]</font>
</td><td width="100"><font face="宋体" size=2 color='red'>点击 :
<%=objPagingRS("Hit")%> </font></td>
</tr>
<tr>
<td colspan='2' ><%=objPagingRS("Description")%> </td>
</tr>
</table>
</center><br>
<%
iRecordsShown = iRecordsShown + 1
objPagingRS.MoveNext
Loop
End If
objPagingRS.Close
Set objPagingRS = Nothing
objPagingConn.Close
Set objPagingConn = Nothing
If iPageCurrent <> 1 Then
%>
<A HREF="./showlink.asp?page=<%= iPageCurrent - 1 %>&order=<%=Server.URLEncode(strOrderBy) %>&CatID=<%=cat%>&status=delete"><font face="宋体" size="2">上一页</font></A>
<%
End If
If iPageCurrent < iPageCount Then
%>
<A HREF="./showlink.asp?page=<%= iPageCurrent + 1 %>&order=<%=Server.URLEncode(strOrderBy) %>&CatID=<%=cat%>&status=delete"><font size="2" face="宋体"><b>下一页</b></font></A>
</center>
<%End If%>
<center>
<font face="宋体" size="2">第 <B><%= iPageCurrent %></B> 页</font>
<FONT SIZE="+1">
</FONT>
<font face="宋体" size="2">共 <B><%= iPageCount %></B> 页
</font>
<%end if%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -