📄 list.asp
字号:
<!--#include file="../setup.asp"-->
<!--#include file="login_admin.asp"-->
<!--#include file="conn.asp"-->
<%
'================================================================================
'Product:K-Search Version 2.1
'本“软件产品”受《中华人民共和国著作权法》和《中华人民共和国计算机软件保护条例》
'和国际条约的保护。如未经授权而擅自复制或传播本程序(或其中任何部分),将受到严厉
'的刑事及民事制裁,并将在法律许可的范围内受到最大可能的起诉!
'Homepage:http://www.lucoo.com/
'--------------------------------------------------------------------------------
'Copyright(c) 2005 lucoo.com All Rights Reserved 绿色互联 版权所有
'================================================================================
Time1=Timer()
dim rs
dim id
dim sort
dim s_sort
dim sort_id
dim s_sort_id
dim s_show
dim s_move_id
dim s_move_url
sort_id=Request.QueryString("sort_id")
if isnumeric(sort_id)=0 or sort_id="" then
response.write "非法ID参数"
response.end
end if
s_id=Request.QueryString("sort_id")
set rs=conn.execute("select id,sort,sort_id,show,move_id,move_url from sort where id="&sort_id)
if rs.eof and rs.bof then
'
else
id=rs("id")
sort=rs("sort")
s_sort=rs("sort")
sort_id=rs("sort_id")
s_sort_id=rs("sort_id")
s_show=rs("show")
s_move_id=rs("move_id")
s_move_url=rs("move_url")
end if
rs.close
set rs = nothing
dim locality
locality=" >> "&sort
if sort_id<>0 then
for i=1 to 8 step 1
set rs=conn.execute("select id,sort,sort_id from sort where id="&sort_id)
if rs.eof and rs.bof then
'
else
sort=rs("sort")
locality=" >> <a href=list.asp?sort_id="&sort_id&">"&sort&"</a>"&locality
sort_id=rs("sort_id")
end if
rs.close
set rs = nothing
next
end if
%>
<head>
<title>管理中心</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<script language=Javascript>
function checkall(all)
{
var a = document.getElementsByName("id");
for (var i=0; i<a.length; i++) a[i].checked = all.checked;
}
</script>
<script language="JavaScript">
function web_delete(id){
var id;
if (confirm("您确定删除吗?")){
document.location.href="web_ok.asp?action=del&id="+id+"";
}
}
</script>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!--#include file="top.asp"--><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td width="60" height="24" valign="bottom" bgcolor="#e1e1e1"> <table border="0" align="center" cellpadding="0" cellspacing="0">
<tr align="center">
<td width="55" height="23">网站查询</td>
</tr>
</table></td>
<td bgcolor="#e1e1e1"><table border="0" cellpadding="0" cellspacing="0">
<form name="search" method="get" action="search.asp">
<tr>
<td width="150" align="center"><input name="keyword" type="text" id="keyword"></td>
<td width="250"><input name="sort" type="radio" value="title" checked>
网站标题
<input type="radio" name="sort" value="url">
网站网址
<input type="radio" name="sort" value="content">
网站描述</td>
<td width="45"><input type="submit" value="查询"></td>
</tr>
</form>
</table></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="5">
<tr>
<td height="20">当前目录:<a href="main.asp">首页</a> <%=locality%></td>
</tr>
<tr>
<td height="25" bgcolor="#f5f5f5">· <a href="list.asp?sort_id=<%=s_id%>">
<strong><%=s_sort%></strong></a> [<a href="create_html_ok.asp?id=<%=s_id%>" target="_blank">生成本页</a>][<a href="create_html.asp?sort_id=<%=s_id%>" target="_blank">生成本类</a>]</td>
</tr>
<tr>
<td><%
set rs=conn.execute("select id,sort,sort_id,move_id from sort where sort_id="&s_id)
if rs.eof or rs.bof then
'
else
do while not rs.eof
%>
<table border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="250" height="35" bgcolor="#FFFFFF"> <%if not rs.eof then
response.write "· "
if rs("move_id")>0 then
response.write "<a href='list.asp?sort_id="&rs("move_id")&"' target='_blank'><b>"&rs("sort")&"@</b></a>"
response.write "<br>[<a href='create_html_ok.asp?id="&rs("move_id")&"' target='_blank'>生成本页</a>][<a href='create_html.asp?sort_id="&rs("move_id")&"' target='_blank'>生成本类</a>]"
else
response.write "<a href='list.asp?sort_id="&rs("id")&"'><b>"&rs("sort")&"</b></a>"
response.write "<br>[<a href='create_html_ok.asp?id="&rs("id")&"' target='_blank'>生成本页</a>][<a href='create_html.asp?sort_id="&rs("id")&"' target='_blank'>生成本类</a>]"
end if
rs.movenext
end if
%>
</td>
<td width="250" bgcolor="#FFFFFF"> <%if not rs.eof then
response.write "· "
if rs("move_id")>0 then
response.write "<a href='list.asp?sort_id="&rs("move_id")&"' target='_blank'><b>"&rs("sort")&"@</b></a>"
response.write "<br>[<a href='create_html_ok.asp?id="&rs("move_id")&"' target='_blank'>生成本页</a>][<a href='create_html.asp?sort_id="&rs("move_id")&"' target='_blank'>生成本类</a>]"
else
response.write "<a href='list.asp?sort_id="&rs("id")&"'><b>"&rs("sort")&"</b></a>"
response.write "<br>[<a href='create_html_ok.asp?id="&rs("id")&"' target='_blank'>生成本页</a>][<a href='create_html.asp?sort_id="&rs("id")&"' target='_blank'>生成本类</a>]"
end if
rs.movenext
end if
%></td>
<td width="250" bgcolor="#FFFFFF"> <%if not rs.eof then
response.write "· "
if rs("move_id")>0 then
response.write "<a href='list.asp?sort_id="&rs("move_id")&"' target='_blank'><b>"&rs("sort")&"@</b></a>"
response.write "<br>[<a href='create_html_ok.asp?id="&rs("move_id")&"' target='_blank'>生成本页</a>][<a href='create_html.asp?sort_id="&rs("move_id")&"' target='_blank'>生成本类</a>]"
else
response.write "<a href='list.asp?sort_id="&rs("id")&"'><b>"&rs("sort")&"</b></a>"
response.write "<br>[<a href='create_html_ok.asp?id="&rs("id")&"' target='_blank'>生成本页</a>][<a href='create_html.asp?sort_id="&rs("id")&"' target='_blank'>生成本类</a>]"
end if
rs.movenext
end if
%></td>
</tr>
</table>
<%
loop
end if
rs.close
set rs = nothing
%>
</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="5">
<form name="form" method="get" action="web_ok.asp">
<tr>
<td> <%
dim web_count
dim web_countrs
set web_countrs=conn.execute("select count(id) from web where sort_id="&s_id&" and verify=0")
if web_countrs.eof or web_countrs.bof Then
web_count=0
else
web_count=web_countrs(0)
end If
web_countrs.close
set web_countrs = nothing
set rs=server.createobject("adodb.recordset")
rs.open "select id,sort_id,title,url,show_path,sequence,commend,one_click,verify,time from web where sort_id="&s_id&" and verify=0",conn,1,1
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="10" colspan="2"></td>
</tr>
<tr>
<td height="25" bgcolor="#f5f5f5">当前目录共有 <%=web_count%>
个网站</td>
<td width="200" bgcolor="#f5f5f5">[<a href="add.asp?sort_id=<%=s_id%>" target="_blank">网站添加</a>] [<a href="auto_add.asp?sort_id=<%=s_id%>" target="_blank">自动添加</a>] [<a href="batch_add.asp?sort_id=<%=s_id%>" target="_blank">批量添加</a>]</td>
</tr>
<tr>
<td height="10" colspan="2"></td>
</tr>
</table>
<%
if rs.eof and rs.bof then
'
else
dim totalPut
dim CurrentPage
dim TotalPages
Const MaxPerPage=20
dim page
page=Request.QueryString("page")
if Not isempty(page) then
currentPage=Cint(page)
else
currentPage=1
end if
totalPut=web_count
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showContent
showpage totalput,MaxPerPage,"list.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
showContent
showpage totalput,MaxPerPage,"list.asp"
else
currentPage=1
showContent
showpage totalput,MaxPerPage,"list.asp"
end if
end if
end if
sub showContent
dim id,title,url,sequence,commend,one_click,time
set id=rs("id")
set title=rs("title")
set url=rs("url")
set sequence=rs("sequence")
set commend=rs("commend")
set one_click=rs("one_click")
set time=rs("time")
for i=1 to 20 step 1
response.write "<br><input name='id' type='checkbox' id='id' value='"&id&"'> "
response.write "<a href='web_manage.asp?id="&id&"' target='_blank'>"&title&"</a> [<a href='web_manage.asp?id="&id&"' target='_blank'>管理</a>][<a href='javascript:web_delete("&id&")'>删除</a>]<br>"
response.write "<a href='"&url&"' target='_blank'>"&url&"</a><br>排名: "
if sequence<>0 then
response.write "Yes "
else
response.write "No "
end if
response.write "推荐: "
if commend<>0 then
response.write "Yes "
else
response.write "No "
end if
response.write "一点通: "
if one_click<>"" then
response.write "Yes "
else
response.write "No "
end if
response.write "加入日期:"&time&"<br>"
rs.movenext
if rs.eof then exit for
next
response.write "<br>"
End Sub
Function showpage(totalnumber,maxperpage,filename)
Dim n
If totalnumber Mod maxperpage=0 Then
n= totalnumber \ maxperpage
Else
n= totalnumber \ maxperpage+1
End If
If CurrentPage<2 Then
response.write "第一页 上一页 "
Else
response.write "<a href='"&filename&"?sort_id="&s_id&"&page=1'>第一页</a> <a href='"&filename&"?sort_id="&s_id&"&page="&CurrentPage-1&"'>上一页</a> "
End If
If n-currentpage<1 Then
response.write "下一页 最后一页 "
Else
response.write "<a href='"&filename&"?sort_id="&s_id&"&page="&CurrentPage+1&"'>下一页</a> "
response.write "<a href='"&filename&"?sort_id="&s_id&"&page="&n&"'>最后一页</a> "
End If
response.write "共"&totalnumber&"个网站 页次:"&CurrentPage&"/"&n&"页"
End Function
rs.close
set rs = nothing
conn.close
set conn=nothing
session("url")=""
session("url")="list.asp?sort_id="&s_id&"&page="&CurrentPage&""
Time2=Timer()
Response.Write(" 运行速度:"&(Time2-Time1)*1000&" 毫秒")
%>
</td>
</tr>
<tr>
<td height="20"><input type="checkbox" onclick="checkall(this)">
全选
<input type="submit" value="删除">
<input name="action" type="hidden" id="action" value="alldel">
</td>
</tr>
</form>
</table>
<!--#include file="bottom.asp"-->
</body>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -