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

📄 acceptance2.asp

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

<%
dim objRS,sql
dim sortid
dim IsErr,i
dim p
'dim page
dim pagecount,currpage,Spage,Epage,recordcount,Query_String

sortid = Request.QueryString("sortid")
p      = Request.QueryString("p")
'page   = Request.QueryString("page")

'if Trim(page) = "" or IsNull(page) then page = 1
IsErr = 0
if Trim(sortid) = "" or (not IsNumeric(sortid)) then
    IsErr = 1
else
    Set objRS = Server.CreateObject("ADODB.RecordSet")
    sql = "select * from stationinfo where parentid = " & sortid & " and ispass = FALSE"
    'sql = "select * from stationinfo where parentid <> -1"
    objRS.Open sql, objConn, 3, 3
    if objRS.EOF then
        IsErr = 2
        objRS.Close()
        Set objRS = nothing
    else
        currpage = request.querystring("page")
        if currpage = "" or IsNull(currpage) then currpage = 1
        if not IsNumeric(currpage) then currpage = 1
        currpage = Cint(currpage)

        recordcount = objRS.RecordCount
        objRS.PageSize = PAGESIZE
        pagecount = objRS.PageCount
        if currpage < 1 then
            currpage = 1
        elseif currpage > pagecount then
            currpage = pagecount
        end if
        Query_String = request.ServerVariables("QUERY_STRING")
    end if
end if
%>

<html>
<head>
<title>验证用户提交的站点</title>
<link href=style2.css rel=stylesheet>
<script language="JavaScript">
<!--
function CheckAll(form)
  {
  for (var i=0;i<form.elements.length;i++)
    {
    var e = form.elements[i];
    if (e.name != 'chkall')
       e.checked = form.chkall.checked;
    }
  }
function CheckAll2(form)
  {
  for (var i=0;i<form.elements.length;i++)
    {
    var e = form.elements[i];
    if (e.name != 'chkall2')
       e.checked = form.chkall2.checked;
    }
  }
function todel() {
    if(confirm("\n真的要删除所有选中的站点吗?     \n\n")) {
        delstaform.action = "delsta.asp"
        delstaform.method = "POST"
        delstaform.submit();
    }
}
function topass() {
    delstaform.action = "topass.asp"
    delstaform.method = "POST"
    delstaform.submit();
}
//-->
</script>
</head>

<body bgcolor="#FFFFFF">
<%
if IsErr = 1 then
    Response.Write("<font color=red>参数错误</font>")
elseif IsErr = 2 then
    sql = "update sort set totalnopass = 0 where id = " & sortid
'Response.Write("sql: " & sql & "<br>")
    objConn.Execute(sql)
    
    Response.Write("<br><center><font color=red>此类下已无待验证站点。请重新点击 [验证站点] 以刷新父类窗口!</font></center><br>")
else
    Response.Write("<hr>")
    Response.Write("当前位置: <font color=blue>" & p & "</font><br>")
    Response.Write("<hr>")

'============================================处理翻页==========================================
if pagecount > 1 then
    response.write("<font color=red>" & currpage & "</font>/" & pagecount & " ")
    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=""acceptance2.asp?" & GoToPage(Query_String,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=""acceptance2.asp?" & GoToPage(Query_String,i) & """>" & i & "</a>]" & VbCrlf)
        end if
    next
    if Epage < pagecount then
        response.write("<a href=""acceptance2.asp?" & GoToPage(Query_String,Epage + 1) & """>后" & PARTSIZE & "页</a>" & VbCrlf)
    end if
    if Spage <> 1 then response.write("[<a href=""acceptance2.asp?" & GoToPage(Query_String,1) & """>第一页</a>]")
    if Epage <> pagecount then response.write("[<a href=""acceptance2.asp?" & GoToPage(Query_String,pagecount) & """>最末页</a>]" & VbCrlf)
    response.write("<br>")    
end if
'======================================完成处理=================================
    
    
    
    Response.Write("<form name=""delstaform"" action=""delsta.asp"" method=""POST"">" & VbCrlf)
    Response.Write("<input type=""hidden"" name=""sortid"" value=""" & sortid & """>" & VbCrlf)
    Response.Write("<input type=""hidden"" name=""ispass"" value=""FALSE"">" & VbCrlf)
    
    Response.Write("    <span class=""top""><input type=""checkbox"" name=""chkall2"" onclick=""CheckAll2(this.form)"">选中所有站点</span>  <input type=""button"" value=""删除选中的站点"" onclick=""todel()"" name=button2>  <input type=""button"" value=""加入选中的站点"" onclick=""topass()"" name=button2>")
    Response.Write("<br><br>")
    
    Response.Write("<ul>")
    if recordcount > 0 then objRS.AbsolutePage = currpage
    for i = 1 to PAGESIZE
        if objRS.EOF then exit for
        Response.Write("<LI><input type=""checkbox"" name=""staid"" value=""" & objRS("ID") & """>[<a href=""modify1.asp?staid=" & objRS("ID") & "&p=" & Server.URLEncode(p) & """ class=""top"">编辑</a>] <a href=""" & objRS("stationurl") & """ target=""_blank"">" & objRS("stationname") & "</a> [" & objRS("stationlang") & "]" & VbCrlf)
        Response.Write("    <dl>" & VbCrlf)
        Response.Write("        <dd>" & objRS("description") & "<br><font style={font-size:10.5pt;color:#c0c0c0}>——<i> <a href=""mailto:" & objRS("email") & """ class=""e1"">(" & objRS("whopost") & ")</a>" &  objRS("thisdate") & " 点击:" & objRS("visitcount") & "</i></font>" & VbCrlf)
        Response.Write("    </dl>" & VbCrlf)
        Response.Write("</li>" & VbCrlf)
        objRS.MoveNext()
    next
    Response.Write("</ul>")
    Response.Write("<span class=""top""><input type=""checkbox"" name=""chkall"" onclick=""CheckAll(this.form)"">选中所有站点</span>  <input type=""button"" value=""删除选中的站点"" onclick=""todel()"" id=button1 name=button1>  <input type=""button"" value=""加入选中的站点"" onclick=""topass()"" name=button2><br><br>")
    Response.Write("</form>")
end if

if pagecount > 1 then
    Response.Write("<font color=red>" & currpage & "</font>/" & pagecount & VbCrlf)
    if currpage > PARTSIZE then
        response.write("<a href=""acceptance2.asp?" & GoToPage(Query_String,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=""acceptance2.asp?" & GoToPage(Query_String,i) & """>" & i & "</a>]" & VbCrlf)
        end if
    next
    if Epage < pagecount then
        response.write("<a href=""acceptance2.asp?" & GoToPage(Query_String,Epage + 1) & """>后" & PARTSIZE & "页</a>" & VbCrlf)
    end if
    if Spage <> 1 then response.write("[<a href=""acceptance2.asp?" & GoToPage(Query_String,1) & """>第一页</a>]")
    if Epage <> pagecount then response.write("[<a href=""acceptance2.asp?" & GoToPage(Query_String,pagecount) & """>最末页</a>]" & VbCrlf)
    response.write("<br>")
end if


objConn.Close()
Set objRS = nothing
Set objConn = nothing
%> <center> 
<hr size=1 width="75%">
<!--#include file="copyright.asp"-->
</body>
</html>

<%
'***********************************************************
'GoToPage(Query_String,page)
'返回在参数Query_String中替换或加入“page=”page字符串
'***********************************************************
function GoToPage(Query_String,page)
    dim lens,s1,s2,pos,i
    
    lens = len(Query_String)
    pos = instr(Query_String,"page=")
    if pos = 0 or IsNull(pos) then pos = instr(Query_String,"PAGE=")
    if pos = 0 or IsNull(pos) then
        GoToPage = Query_String & "&page=" & page
        exit function
    end if
    s1 = left(Query_String,pos - 1 + len("page="))
    i = pos + len("page=")
    do while (i <= lens) and (mid(Query_String,i,1) <> "&")
        i = i + 1
    loop
    if i > lens then
        GoToPage = s1 & page
    else
        s2 = right(Query_String,lens - i)
        GoToPage = s1 & page & "&" & s2
    end if
end function
%>

⌨️ 快捷键说明

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