⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 acceptance.asp

📁 商务网站,信息分类,可以搜索加上ACCESS数据库
💻 ASP
字号:
<%Option Explicit%>
<!--#include file="CONFIG.ASP"-->
<!--#include file="functions.asp"-->
<!--#include file="adoconn.asp"-->

<%
dim objRS_sort,sql
dim objRS_path
dim i,pid,thispath
dim pagecount,currpage,Spage,Epage,recordcount

currpage = request.querystring("currpage")
if currpage = "" or IsNull(currpage) then currpage = 1
if not IsNumeric(currpage) then currpage = 1
currpage = Cint(currpage)

sql = "select * from sort where totalnopass > 0 order by totalnopass DESC"
'sql = "select * from sort where parentid <> -1"
Set objRS_sort = Server.CreateObject("ADODB.RecordSet")
objRS_sort.Open sql, objConn, 3, 1

recordcount = objRS_sort.RecordCount
objRS_sort.PageSize = PAGESIZE
pagecount = objRS_sort.PageCount
if currpage < 1 then
    currpage = 1
elseif currpage > pagecount then
    currpage = pagecount
end if

if recordcount > 0 then Response.Write("共有 " & recordcount & " 个类目中有用户新提交的信息待审核<br>" & VbCrlf)
'========================================实现翻页=============================
if pagecount > 1 then
    response.write("<font color=red>" & currpage & "</font>/" & pagecount & "&nbsp;")
    Spage = currpage mod PARTSIZE
    if currpage > PARTSIZE then
        if Spage = 0 then Spage = PARTSIZE
        Spage = currpage - Spage + 1
    else
        Spage = 1
    end if
    Epage = Spage + PARTSIZE - 1
    if Epage > pagecount then Epage = pagecount
    if currpage > PARTSIZE then
        response.write("<a href=""acceptance.asp?currpage=" & Spage - 1 & """>前" & PARTSIZE & "页</a>" & VbCrlf)
    end if
    for i = Spage to Epage
        if i = currpage then
            response.write("[<font style={color:red}><b>" & i & "</b></font>]" & VbCrlf)
        else
            response.write("[<a href=""acceptance.asp?currpage=" & i & """>" & i & "</a>]" & VbCrlf)
        end if
    next
    if Epage < pagecount then
        response.write("<a href=""acceptance.asp?currpage=" & Epage + 1 & """>后" & PARTSIZE & "页</a>" & VbCrlf)
    end if
    if Spage <> 1 then response.write("[<a href=""acceptance.asp?currpage=1"">第一页</a>]")
    if Epage <> pagecount then response.write("[<a href=""acceptance.asp?currpage=" & pagecount & """>最末页</a>]" & VbCrlf)
    response.write("<br><br>")
end if
'======================================完成处理=================================

if objRS_sort.EOF then
    Response.Write("<center><font color=red>暂无待审核的信息</font></center>")
else
    objRS_sort.AbsolutePage = currpage
    for i = 1 to PAGESIZE
        if objRS_sort.EOF then exit for
    
        pid = Clng(objRS_sort("ID"))
        if pid = -1 then
            sql = "select top 1 * from pathform where thispath = '" & pid & "'"
        else
            sql = "select top 1 * from pathform where thispath like '%" & chr(44) & pid & "'"
        end if
'Response.Write("sql: " & sql & "<br>")
        Set objRS_path = objConn.Execute(sql)
        thispath = "首页∷" & Replace(objRS_path("pathname"),chr(255),"∷")
    
        Response.Write("<a href=""acceptance2.asp?sortid=" & objRS_sort("ID") & "&p=" & Server.URLEncode(thispath) & """ target=""_blank"">" & thispath & "</a>&nbsp;&nbsp;(用户新提交的站点: " & objRS_sort("totalnopass") & " )<br>")
        Response.Write("<br>")
        objRS_sort.MoveNext()
    next
end if

if pagecount > 1 then
    Response.Write("<br>")
    response.write("<font color=red>" & currpage & "</font>/" & pagecount & "&nbsp;")
    if currpage > PARTSIZE then
        response.write("<a href=""acceptance.asp?currpage=" & Spage - 1 & """>前" & PARTSIZE & "页</a>" & VbCrlf)
    end if
    for i = Spage to Epage
        if i = currpage then
            response.write("[<font style={color:red}><b>" & i & "</b></font>]" & VbCrlf)
        else
            response.write("[<a href=""acceptance.asp?currpage=" & i & """>" & i & "</a>]" & VbCrlf)
        end if
    next
    if Epage < pagecount then
        response.write("<a href=""acceptance.asp?currpage=" & Epage + 1 & """>后" & PARTSIZE & "页</a>" & VbCrlf)
    end if
    if Spage <> 1 then response.write("[<a href=""acceptance.asp?currpage=1"">第一页</a>]")
    if Epage <> pagecount then response.write("[<a href=""acceptance.asp?currpage=" & pagecount & """>最末页</a>]" & VbCrlf)
    response.write("<br>")    
end if

objConn.Close()
Set objConn = nothing
Set objRS_sort = nothing
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -