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

📄 create_html_ok.asp

📁 K风搜索 2.1商业版 完整功能版 后台http://XXXXXX/admin/ 管理帐号:admin 管理密码:admin 安全密码: ks21 网站设置http://XXXXXX/
💻 ASP
字号:
<!--#include file="../setup.asp"-->
<!--#include file="login_admin.asp"-->
<%
'================================================================================
'Product:K-Search Version 2.1
'本“软件产品”受《中华人民共和国著作权法》和《中华人民共和国计算机软件保护条例》 
'和国际条约的保护。如未经授权而擅自复制或传播本程序(或其中任何部分),将受到严厉
'的刑事及民事制裁,并将在法律许可的范围内受到最大可能的起诉!
'Homepage:http://www.lucoo.com/
'--------------------------------------------------------------------------------
'Copyright(c) 2005 lucoo.com All Rights Reserved 绿色互联 版权所有
'================================================================================
if session("rank")<>1 then
response.write "您的管理员级别不能操作!"
response.end
end if
%>
<!--#include file="conn.asp"-->
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<%
Server.ScriptTimeOut=9000
function web_count(id)
dim rs,c_id
c_id="/"&id&"/"
set rs_count=conn.execute("select count(id) from web where sort_path like '%" & c_id & "%'")
if rs_count.eof or rs_count.bof Then 
web_count=0 
else 
web_count=rs_count(0) 
end If 
rs_count.close
set rs_count=Nothing
end function


function sort_list(id)
dim rs,count
set rs=conn.execute("select * from sort where sort_id="&id)
count=1
if rs.eof then
sort_list=sort_list & ""
end if
while not rs.eof
if count=1 or count mod 3 = 1 then
if rs("move_id")>0 then
sort_list=sort_list & "<tr><td width='33%' height='25'>·<a href='"&Search_Path&"dir"&rs("move_url")&"' style='font-size: 14px'>"&rs("sort")&"@("&web_count(rs("move_id"))&")</a></td>"
else
sort_list=sort_list & "<tr><td width='33%' height='25'>·<a href='"&rs("id")&"/' style='font-size: 14px'>"&rs("sort")&"("&web_count(rs("id"))&")</a></td>"
end if
else

if rs("move_id")>0 then
sort_list=sort_list & "<td width='33%' height='25'>·<a href='"&Search_Path&"dir"&rs("move_url")&"' style='font-size: 14px'>"&rs("sort")&"@("&web_count(rs("move_id"))&")</a></td>"
else
sort_list=sort_list & "<td width='33%' height='25'>·<a href='"&rs("id")&"/' style='font-size: 14px'>"&rs("sort")&"("&web_count(rs("id"))&")</a></td>"
end if
end if
if count mod 3 =0  then sort_list=sort_list & "</tr>"
count=count+1
rs.movenext
wend
count=count-1
if count mod 3 <> 0 then
for i= 1 to 3-(count mod 3)
sort_list=sort_list & "<td width='33%'>&nbsp;</td>"
if  i = 4-(count mod 3) then sort_list=sort_list & "</tr>"
next
end if
rs.close
set rs = nothing
end function


dim id
id=Request.QueryString("id")


dim rs
set rs=server.createobject("adodb.recordset")
rs.open "select id,sort_id,show_path,verify from web where (sort_id="&id&" or show_path like '%|"&id&"|%') and verify=0",conn,1,1
if rs.eof and rs.bof then
rs.close
set rs=Nothing
rcount=0
mpage=1
else
dim rcount
rcount=rs.recordcount
pmcount=page_showdb '设置每页数
rs.pagesize=pmcount
dim mpage   	
mpage=rs.pagecount   	'得到总页数
end if
rs.close
set rs=Nothing
dim p
For p=1 to mpage step 1

dim sort,sort_id
set rs=conn.execute("select id,sort,sort_id from sort where id="&id)
if rs.eof and rs.bof then
'
else
id=rs("id")
sort=rs("sort")
sort_id=rs("sort_id")
end if
rs.close
set rs = nothing

URLBasePath=server.mappath(".")

dim address
dim path

address="\"&id
path=" >> "&sort
if sort_id<>0 then
set rs=conn.execute("select * from sort where id="&sort_id)
sort_id=rs("sort_id")
id1=rs("id")
if not rs.eof then
address="\"&rs("id")&""& address
path=" >> <a href='../'>"&rs("sort")&"</a>" & path
end if
rs.close
set rs = nothing
set rs=conn.execute("select * from sort where id="&sort_id)
if rs.eof and rs.bof then
'
else
sort_id=rs("sort_id")
id2=rs("id")
address="\"&rs("id")&""& address
path=" >> <a href='../../'>"&rs("sort")&"</a>" & path
end if
rs.close
set rs = nothing
set rs=conn.execute("select * from sort where id="&sort_id)
if rs.eof and rs.bof then
'
else
sort_id=rs("sort_id")
id3=rs("id")
address="\"&rs("id")&""& address
path=" >> <a href='../../../'>"&rs("sort")&"</a>" & path
end if
rs.close
set rs = nothing
set rs=conn.execute("select * from sort where id="&sort_id)
if rs.eof and rs.bof then
'
else
sort_id=rs("sort_id")
id4=rs("id")
address="\"&rs("id")&""& address
path=" >> <a href='../../../../'>"&rs("sort")&"</a>" & path
end if
rs.close
set rs = nothing
set rs=conn.execute("select * from sort where id="&sort_id)
if rs.eof and rs.bof then
'
else
sort_id=rs("sort_id")
id5=rs("id")
address="\"&rs("id")&""& address
path=" >> <a href='../../../../../'>"&rs("sort")&"</a>" & path
end if
rs.close
set rs = nothing
set rs=conn.execute("select * from sort where id="&sort_id)
if rs.eof and rs.bof then
'
else
sort_id=rs("sort_id")
id6=rs("id")
address="\"&rs("id")&""& address
path=" >> <a href='../../../../../../'>"&rs("sort")&"</a>" & path
end if
rs.close
set rs = nothing
end if

dim fso,ktemplate,ksearch
set fso=createobject("scripting.filesystemobject")
set ktemplate=fso.opentextfile(server.mappath("..\template\create_dir.asp"))
ksearch=ktemplate.readall
ktemplate.close
set ktemplate=nothing
fso.CreateFolder(URLBasePath&"\..\dir\"&address)
set fso=nothing

set rs=server.createobject("adodb.recordset")
rs.open "select id,sort_id,title,content,url,show_path,sequence,verify from web where (sort_id="&id&" or show_path like '%|"&id&"|%') and verify=0 order by sequence desc",conn,1,1
if rs.eof and rs.bof then
rstr=""
else

rs.pagesize=pmcount   	'设置每页数
mpage=rs.pagecount    	'得到总页数
page=p

rs.absolutepage=page

rstr=""
for ii=1 to pmcount step 1
rstr=rstr & "<li><span style='font-size: 14px'><a href='"&Web_Path&"goto.asp?id="&rs("id")&"' target='_blank'>"&rs("title")&"</a></span><br><span style='line-height: 150%'>"&rs("content")&"</span><br><span style='line-height: 150%'><font color='#006600'>"&rs("url")&"</font></span></li><br><br>"
rs.movenext
if rs.eof then exit for
next

If p<2 Then
rstr=rstr & "第一页 上一页 "
Else
if p=2 then
index_p=""
else
index_p="_"&p-1
end if
rstr=rstr & "<a href='"&Web_path&"dir"&address&"/index.html'>第一页</a> <a href='"&Web_path&"dir"&address&"/index"&index_p&".html'>上一页</a> "
end if
If mpage-p<1 Then
rstr=rstr & "下一页 最后一页"
else
rstr=rstr & "<a href='"&Web_path&"dir"&address&"/index_"&p+1&".html'>下一页</a> <a href='"&Web_path&"dir"&address&"/index_"&mpage&".html'>最后一页</a>"
end if
rstr=rstr & " 共"&rcount&"个网站 页次:"&p&"/"&mpage&"页"
end if
ksearch=replace(ksearch,"[ksearch]address[/ksearch]",address)
ksearch=replace(ksearch,"[ksearch]path[/ksearch]",path)
ksearch=replace(ksearch,"[ksearch]sort_list[/ksearch]",sort_list(id))
ksearch=replace(ksearch,"[ksearch]web_list[/ksearch]",rstr)
ksearch=replace(ksearch,"[ksearch]path_id[/ksearch]",id)
ksearch=replace(ksearch,"[ksearch]list_count[/ksearch]",rcount)
ksearch=replace(ksearch,"[ksearch]sort[/ksearch]",sort)
ksearch=replace(ksearch,"[ksearch]renew_time[/ksearch]",date())
ksearch=replace(ksearch,"[ksearch]WebSite_Title[/ksearch]",WebSite_Title)
ksearch=replace(ksearch,"[ksearch]Web_path[/ksearch]",Web_path)
If p>1 Then
page="_"&p
else
page=""
end if
rs.close
set rs=Nothing

dim khtml
set fso=createobject("scripting.filesystemobject")
set khtml=fso.createtextfile(server.mappath("..\dir"&address&"\index"&page&".html"),true)
khtml.writeline ksearch
khtml.close
set khtml=nothing
set fso=nothing
next
conn.close
set conn=Nothing
response.write ""&sort&" >> 生成HTML成功!"
%>

⌨️ 快捷键说明

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