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

📄 wz.asp

📁 功能说明: 1
💻 ASP
字号:
<!--#include file="adyou.asp"-->
<%
if session("super")<>"super" then
 response.Write("<script>alert('您没权限访问本页');window.location.href='de.asp'</script>")
 response.End()
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link href="../images/yxwancss.css" rel="stylesheet" type="text/css">
</head>
<body style="margin:0">
<table width="100%" border="0" cellspacing="5" cellpadding="0">
  <tr> 
    <td width="4%">&nbsp;</td>
    <td width="14%"><table width="100" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td class="m2" height="25" align=center onmousedown="this.className='m3'" onmouseup="this.className='m2'" onmouseout="this.className='m2'" onClick="javascript:window.location.href='addwz.asp'">增加网址</td>
        </tr>
      </table></td>
    <td width="82%">&nbsp;</td>
  </tr>
</table>
<%
dim totalart,Currentpage,totalpages,i,perpage
perpage=20  '每页显示地址数
colname=request("colname")
keyword=trim(replace(request.form("keyword"),"'",""))
sql="select * from XS20_WEB order by time DESC"

if request("classid")<>"" then
sql="select * from XS20_WEB where classid="&request("classid")&" order by time DESC"

elseif request("keyword")<>"" then
sql="select * from XS20_WEB where "&request("select")&" like '%"&request("keyword")&"%'order by time DESC"

end if
set rs=server.createobject("adodb.recordset")
rs.open sql,adyou,1,1
%>
<table width="96%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolor="#C0C0C0" style="border-collapse: collapse;font-size:12px">
  <tr bgcolor="#E8E8E8">
    <td width="5%"><div align="center">-</div></td>
    <td colspan="3" align="center" bgcolor="#E8E8E8"><table width=300 border=0>
        <form name="form" method="post" action="wz.asp">
          <tr>
            <td align='center'>
              <select name="select">
                <option value="0" selected>-搜索范围-</option>
                <option value="title">网址名称</option>
                <option value="url">网址url</option>
            </select></td>
            <td align="center">
              <input type="text" name="keyword" class="textarea" size="18" maxlength='30' onBlur='if (value ==""){value="输入关键字"}' 
      onFocus='if (value =="输入关键字"){value =""}' value=输入关键字>
              <input type="submit" name="Submit2" value="搜索" class="button">
            </td>
          </tr>
        </form>
    </table>      
     <div align="center"> </div></td>
       <form name="form2" method="post" action=""><td bgcolor="#E8E8E8" align="center" colspan="3">
<select name="go" onChange='window.location=form.go.options[form.go.selectedIndex].value'>
        <option value="">分类显示网址</option>
        <option value="wz.asp">全部网址</option>
        <%
dim rs2(5)
function listunder(i)
	set rs2(i)=server.createobject("adodb.recordset")
	rs2(i).open "select classid,classname,verity from XS20_CLASS where topclass="&rs2(i-1)("classid"),adyou,1,3
	while not rs2(i).eof
		dim topclassname
		topclassname=""
		for x=1 to i
			topclassname=topclassname&rs2(x-1)("classname")&">"
		next
		fujia=""
		if rs2(i)("verity")<>1 then fujia="(未审核)"
		response.write "<option value='wz.asp?classid="&rs2(i)("classid")&"'"
		if request("classid")=cstr(rs2(i)("classid")) then response.Write(" selected ")
		response.Write ">"&topclassname&rs2(i)("classname")&fujia&"</option>"&vbCrLf
		if i<Ubound(rs2) then
			call listunder(i+1)
		end if
		rs2(i).movenext
	wend
end function
set rs2(0)=server.createobject("adodb.recordset")
rs2(0).open "select classid,classname,verity from XS20_CLASS where topclass=0",adyou,1,3
while not rs2(0).eof
	fujia=""
	if rs2(0)("verity")<>1 then fujia="(未审核)"
	response.write "<option value='wz.asp?classid="&rs2(0)("classid")&"'"
	if request("classid")=cstr(rs2(0)("classid")) then response.Write(" selected ")
	response.Write ">"&rs2(0)("classname")&fujia&"</option>"&vbCrLf
	call listunder(1)
	rs2(0).movenext
wend
%>
</select><div align="center"></div></td></form>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td><div align="center">编号</div></td>
    <td width="19%"><div align="center">网站名称</div></td>
    <td width="35%" bgcolor="#FFFFFF"><div align="center">网站url</div></td>
    <td width="5%" bgcolor="#FFFFFF"><div align="center">点击</div></td>
    <td><div align="center">加入时间</div>
      <div align="center"></div>
    <div align="center"></div></td>
    <td><div align="center"></div>
    <div align="center">操作</div></td>
  </tr>
  <%
if not rs.eof then
rs.movefirst
rs.pagesize=perpage
if trim(request("page"))<>"" then
   currentpage=clng(request("page"))
   if currentpage>rs.pagecount then
      currentpage=rs.pagecount
   end if
else
   currentpage=1
end if
   totalart=rs.recordcount
   if currentpage<>1 then
      if(currentpage-1)*perpage<totalart then
	     rs.move(currentpage-1)*perpage
		 dim bookmark
		 bookmark=rs.bookmark
	  end if
   end if
   if (totalart mod perpage)=0 then
      totalpages=totalart\perpage
   else
      totalpages=totalart\perpage+1
   end if
   i=0
do while not rs.eof and i<perpage
%>
  <tr bgcolor="#FFFFFF">
    <td><div align="center"><%=rs("id")%></div></td>
    <td><div align="center"><a href="<%=rs("url")%>"><%=rs("title")%></a></div></td>
    <td><div align="left">&nbsp;&nbsp;<a href="<%=rs("url")%>"><%=rs("url")%></a></div></td>
    <td><div align="center"><%=rs("click")%></div></td>
    <td><div align="center"><%=rs("time")%></div></td>
    <td><div align="center"><a href="editwz.asp?id=<%=rs("id")%>">修改</a> <a href="javascript:if(confirm('删除后无法恢复,真的要删除吗?'))window.location.href='delwz.asp?id=<%=rs("id")%>'">删除</a></div></td>
  </tr>
  <%
i=i+1
rs.movenext
loop
else
if rs.eof and rs.bof then
%>
  <tr bgcolor="#FFFFFF">
    <td colspan="6"><div align="center">当前没有网址!</div></td>
  </tr>
</table>
<%end if
end if%>
	  <table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
        <form name="form1" method="post" action="">
          <tr> 
            <td class="px12" align="right">
            <%=currentpage%> /<%=totalpages%>页,<%=totalart%>条记录/<%=perpage%>条每页.
<a href="wz.asp?classid=<%=request("classid")%>&page=1" title="首页">首页</a> 
<% if request("page")<>"" and request("page")>10 then
page2=currentpage-10
else page2=1
end if%>
<a href="wz.asp?select=<%=request("select")%>&keyword=<%=request("keyword")%>&classid=<%=request("classid")%>&page=<%=page2%>" title="上十页">&lt;&lt;</a> 
<%i=1
showye=totalpages
if showye<10 then
fpage=1
bpage=showye
else 
fpage=currentpage
bpage=currentpage+9
if bpage>totalpages then
bpage=totalpages
fpage=totalpages-9
end if
end if
for i=fpage to bpage
if i=currentpage then
%>
              <%=i%> 
              <%else%>
              <a href="wz.asp?select=<%=request("select")%>&keyword=<%=request("keyword")%>&classid=<%=request("classid")%>&page=<%=i%>"><%=i%></a> 
              <%end if
next
if totalpages>10 then
if request("page")="" then
page=11
else
page=currentpage+10
end if%>
    <a href="wz.asp?select=<%=request("select")%>&keyword=<%=request("keyword")%>&classid=<%=request("classid")%>&page=<%=page%>" title="下十页">>></a> 
<%end if%><a href="wz.asp?select=<%=request("select")%>&keyword=<%=request("keyword")%>&classid=<%=request("classid")%>&page=<%=totalpages%>" title="尾页">尾页</a> 

&nbsp;&nbsp;&nbsp;&nbsp; 
<select name="select2" onChange='window.location=form.select2.options[form.select2.selectedIndex].value'>
  <option>选择要去的页</option>
 <%for s=1 to totalpages
 response.write "<option value='wz.asp?select="&request("select")&"&keyword="&request("keyword")&"&classid="&request("classid")&"&page="&s&"'>第"&s&"页</option>"&vbCrLf
next%>
</select> 
      </td>
          </tr>
        </form>
      </table>
      <br>
    </td>
  </tr>
</table>
<%'end if
rs.close
set rs=nothing
%>
</body>
</html>

⌨️ 快捷键说明

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