批量找出所有没生成的文件
在 admin/article/index.asp里
在
case"search" king_search
后面 加个
case"nofile" king_nofile
在
' *** Copyright © KingCMS.com All Rights Reserved ***
sub king_search()
前面 加个
' *** Copyright © KingCMS.com All Rights Reserved ***
sub king_nofile()
king.head king.path,art.lang("common/search")
dim rs,data,i,dp,listid'lpath:linkpath
dim but,sql,ispath,lpath,listpath
dim lists,insql
dim query,tquery,space,selected
tquery=quest("query",4)
space=quest("space",2)
if len(space)=0 then space=0
select case cstr(space)
case"1"
query=king.likey("artdescription",tquery)
case"2"
query=king.likey("artauthor",tquery)
case else
query=king.likey("arttitle",tquery)
end select
sql="artid,arttitle,artpath,arthit,artshow,artup,artcommend,arthead,artimg,artgrade,listid"'10
'修改
if query="" then
sql="select "&sql&" from kingart order by artdate desc;"
else
if len(query)=0 then query=" artid=0 "
sql="select "&sql&" from kingart where "&query&" order by artdate desc;"
end if
art.list
Il "<form class=""k_form"" action=""index.asp"" name=""form_search"" method=""get"" >"
Il "<p class=""c""><span>"&art.lang("common/search")&"</span>:<input type=""text"" name=""query"" value="""&formencode(quest("query",0))&""" class=""in3"" maxlength=""100"" /> "
Il "<select name=""space"">"
if cstr(space)="0" then selected=" selected=""selected""" else selected=""
Il "<option value=""0"""&selected&">"&art.lang("label/sel/title")&"</option>"
if cstr(space)="2" then selected=" selected=""selected""" else selected=""
Il "<option value=""2"""&selected&">"&art.lang("label/sel/author")&"</option>"
if cstr(space)="1" then selected=" selected=""selected""" else selected=""
Il "<option value=""1"""&selected&">"&art.lang("label/sel/content")&"</option>"
Il "</select> "
Il "<input type=""submit"" value="""&king.lang("common/search")&""" class=""k_button"" />"
Il "<input type=""hidden"" name=""action"" value=""search"" />"
Il "</p></form>"
set dp=new record
' out sql
dp.create sql
dp.purl="index.asp?action=nofile&pid=$&rn="&dp.rn&"&query="&quest("query",0)&"&space="&space
dp.but=dp.sect("create:"&encode(king.lang("common/create"))&"|-|moveto:"&art.lang("common/moveto"))&dp.prn & dp.plist
dp.js="cklist(K[0])+'<a href=""index.asp?action=edt&listid='+K[10]+'&artid='+K[0]+'"" >'+K[0]+') '+K[1]+'</a> '+showimg(K[8])"
dp.js="'<i>'+isok(K[4])+'</i>'"
dp.js="'<i>'+isok(K[5])+'</i>'"
dp.js="'<i>'+isok(K[6])+'</i>'"
dp.js="'<i>'+isok(K[7])+'</i>'"
dp.js="'<i>'+isexist(K[2],K[3],K[0])+'</i>'"
dp.js="K[9]"
dp.js="edit('index.asp?action=edt&listid='+K[10]+'&artid='+K[0])"
Il dp.open
Il "<tr><th>"&art.lang("list/id")&") "&art.lang("list/title")&"</th><th class=""c"">"&art.lang("label/show")&"</th><th class=""c"">"&art.lang("label/up")&"</th><th class=""c"">"&art.lang("label/commend")&"</th><th class=""c"">"&art.lang("label/head")&"</th><th class=""c"">"&art.lang("list/file")&"</th><th>"&art.lang("list/grade")&"</th><th class=""w2"">"&art.lang("list/manage")&"</th></tr>"
Il "<script>"
for i=0 to dp.length
if cstr(listid)<>cstr(dp.data(10,i)) then
listid=dp.data(10,i)
set rs=conn.execute("select listpath from kingart_list where listid="&listid&";")
if not rs.eof and not rs.bof then
listpath=rs(0)
else
king.error king.lang("error/invalid")
end if
rs.close
set rs=nothing
end if
lists=split(dp.data(2,i),"/")
ispath=king.isexist("../../"&listpath&"/"&dp.data(2,i))
if ispath then
if dp.data(9,i)=0 then'若为静态
if king.isfile(dp.data(2,i)) then'file
lpath=king_system&"system/link.asp?url="&king.inst&listpath&"/"&dp.data(2,i)
else
lpath=king_system&"system/link.asp?url="&king.inst&listpath&"/"&dp.data(2,i)&"/"
end if
else
lpath=king_system&"system/link.asp?url="&king.page&"article/page.asp?artid="&dp.data(0,i)
end if
else
lpath="index.asp?action=create&artid="&dp.data(0,i)
end if
'修改
if not ispath then '如果还没有生成
Il "ll("&dp.data(0,i)&",'"&htm2js(dp.data(1,i))&"','"&ispath&"','"&lpath&"',"&dp.data(4,i)&","&dp.data(5,i)&","&dp.data(6,i)&","&dp.data(7,i)&",'"&dp.data(8,i)&"','"&art.getgrade(dp.data(9,i),dp.data(0,i))&"',"&listid&");"
end if
next
Il "</script>"
Il dp.close
set dp=nothing
end sub
x.asp?action=nofile 然后用 这个 就可以访问了
在
case"search" king_search
后面 加个
case"nofile" king_nofile
在
' *** Copyright © KingCMS.com All Rights Reserved ***
sub king_search()
前面 加个
' *** Copyright © KingCMS.com All Rights Reserved ***
sub king_nofile()
king.head king.path,art.lang("common/search")
dim rs,data,i,dp,listid'lpath:linkpath
dim but,sql,ispath,lpath,listpath
dim lists,insql
dim query,tquery,space,selected
tquery=quest("query",4)
space=quest("space",2)
if len(space)=0 then space=0
select case cstr(space)
case"1"
query=king.likey("artdescription",tquery)
case"2"
query=king.likey("artauthor",tquery)
case else
query=king.likey("arttitle",tquery)
end select
sql="artid,arttitle,artpath,arthit,artshow,artup,artcommend,arthead,artimg,artgrade,listid"'10
'修改
if query="" then
sql="select "&sql&" from kingart order by artdate desc;"
else
if len(query)=0 then query=" artid=0 "
sql="select "&sql&" from kingart where "&query&" order by artdate desc;"
end if
art.list
Il "<form class=""k_form"" action=""index.asp"" name=""form_search"" method=""get"" >"
Il "<p class=""c""><span>"&art.lang("common/search")&"</span>:<input type=""text"" name=""query"" value="""&formencode(quest("query",0))&""" class=""in3"" maxlength=""100"" /> "
Il "<select name=""space"">"
if cstr(space)="0" then selected=" selected=""selected""" else selected=""
Il "<option value=""0"""&selected&">"&art.lang("label/sel/title")&"</option>"
if cstr(space)="2" then selected=" selected=""selected""" else selected=""
Il "<option value=""2"""&selected&">"&art.lang("label/sel/author")&"</option>"
if cstr(space)="1" then selected=" selected=""selected""" else selected=""
Il "<option value=""1"""&selected&">"&art.lang("label/sel/content")&"</option>"
Il "</select> "
Il "<input type=""submit"" value="""&king.lang("common/search")&""" class=""k_button"" />"
Il "<input type=""hidden"" name=""action"" value=""search"" />"
Il "</p></form>"
set dp=new record
' out sql
dp.create sql
dp.purl="index.asp?action=nofile&pid=$&rn="&dp.rn&"&query="&quest("query",0)&"&space="&space
dp.but=dp.sect("create:"&encode(king.lang("common/create"))&"|-|moveto:"&art.lang("common/moveto"))&dp.prn & dp.plist
dp.js="cklist(K[0])+'<a href=""index.asp?action=edt&listid='+K[10]+'&artid='+K[0]+'"" >'+K[0]+') '+K[1]+'</a> '+showimg(K[8])"
dp.js="'<i>'+isok(K[4])+'</i>'"
dp.js="'<i>'+isok(K[5])+'</i>'"
dp.js="'<i>'+isok(K[6])+'</i>'"
dp.js="'<i>'+isok(K[7])+'</i>'"
dp.js="'<i>'+isexist(K[2],K[3],K[0])+'</i>'"
dp.js="K[9]"
dp.js="edit('index.asp?action=edt&listid='+K[10]+'&artid='+K[0])"
Il dp.open
Il "<tr><th>"&art.lang("list/id")&") "&art.lang("list/title")&"</th><th class=""c"">"&art.lang("label/show")&"</th><th class=""c"">"&art.lang("label/up")&"</th><th class=""c"">"&art.lang("label/commend")&"</th><th class=""c"">"&art.lang("label/head")&"</th><th class=""c"">"&art.lang("list/file")&"</th><th>"&art.lang("list/grade")&"</th><th class=""w2"">"&art.lang("list/manage")&"</th></tr>"
Il "<script>"
for i=0 to dp.length
if cstr(listid)<>cstr(dp.data(10,i)) then
listid=dp.data(10,i)
set rs=conn.execute("select listpath from kingart_list where listid="&listid&";")
if not rs.eof and not rs.bof then
listpath=rs(0)
else
king.error king.lang("error/invalid")
end if
rs.close
set rs=nothing
end if
lists=split(dp.data(2,i),"/")
ispath=king.isexist("../../"&listpath&"/"&dp.data(2,i))
if ispath then
if dp.data(9,i)=0 then'若为静态
if king.isfile(dp.data(2,i)) then'file
lpath=king_system&"system/link.asp?url="&king.inst&listpath&"/"&dp.data(2,i)
else
lpath=king_system&"system/link.asp?url="&king.inst&listpath&"/"&dp.data(2,i)&"/"
end if
else
lpath=king_system&"system/link.asp?url="&king.page&"article/page.asp?artid="&dp.data(0,i)
end if
else
lpath="index.asp?action=create&artid="&dp.data(0,i)
end if
'修改
if not ispath then '如果还没有生成
Il "ll("&dp.data(0,i)&",'"&htm2js(dp.data(1,i))&"','"&ispath&"','"&lpath&"',"&dp.data(4,i)&","&dp.data(5,i)&","&dp.data(6,i)&","&dp.data(7,i)&",'"&dp.data(8,i)&"','"&art.getgrade(dp.data(9,i),dp.data(0,i))&"',"&listid&");"
end if
next
Il "</script>"
Il dp.close
set dp=nothing
end sub
x.asp?action=nofile 然后用 这个 就可以访问了