📄 templet.asp
字号:
elseif UseFor=2 then
'debug(Word)
WordList = split(Word,"|")
for i = 0 to Ubound(WordList)
SD_Soft_One=SD_Soft_One&"<a href="""& SiteUrl &"Search.asp?q="& WordList(i) &""" target=""_blank"">"& WordList(i) &"</a>"& compart &vbCrlf
next
end if
end function
function SD_Soft_List_Text(S_Class_Name_1,Cyc_page,Cyc_page_max,P_class_id)
set rst=conn.execute("select Count(*) as SD_SoftsNum from [Softs] where S_Class.SD_S_Class_Name='"&S_Class_Name_1&"' or S_Class_1.SD_S_Class_Name='"&S_Class_Name_1&"'")
SoftsNum = rst("SD_SoftsNum")
rst.close
SD_Soft_List_Text=SD_Soft_List_Text&"<div class=""listitem"">"&vbCrlf
SD_Soft_List_Text=SD_Soft_List_Text&"<h2>当前共有 <strong>"&SoftsNum&" </strong> 个软件列于"& S_Class_Name_1 &"中</h2>"&vbCrlf
sql="select * from [Softs] where S_Class_1.SD_S_Class_Name='"&S_Class_Name_1&"' or S_Class.SD_S_Class_Name='"&S_Class_Name_1&"' order by SD_Soft_Id desc"
'debug(sql)
rs.open sql,conn,1,1
if not rs.eof then
page_size=Page_Size_All
rs.pagesize=page_size
page_now=1
if trim(request.QueryString("page"))<>"" then
page_now=cint(trim(request.QueryString("page")))
end if
if page_now>rs.pagecount or page_now<0 then
page_now=1
end if
page_count=rs.pagecount
rs.absolutepage=page_now
i=1
while not rs.eof and i<page_size+1
SD_Soft_List_Text=SD_Soft_List_Text&"<dl><dt><a href="""& SiteUrl &"Soft.asp?id="& rs("SD_Soft_Id") &""" target=_blank>"& rs("SD_Soft_Name") &"</a> ... <span class=""remark""><a href="""& SiteUrl &"Class.asp?id="& rs("S_Class.SD_S_Class_Id")&""">"& rs("S_Class.SD_S_Class_Name") &"</a></span> ... </dt><dd>"& Replacehtml(rs("SD_Soft_Info")) &"</dd></dl><abbr>大小:<span class=""remark"">"& rs("SD_Soft_Size") &"</span> ... 语言:<span class=""remark"">"& rs("SD_Soft_Language") &"</span>... 授权:<span class=""remark"">"& rs("SD_Soft_Right") &"</span>... 添加日期: <span class=""remark"">"& rs("SD_Soft_Update") &"</span>... 推荐: "& SD_Img_Star(rs("SD_Soft_Level")) &"</abbr>"&vbCrlf
rs.movenext
i=i+1
wend
else
SD_Soft_List_Text=SD_Soft_List_Text&"<dl><dt>没有相关软件</dt></dl>"&vbCrlf
end if
rs.close
SD_Soft_List_Text=SD_Soft_List_Text&"</div>"
SD_Soft_List_Text=SD_Soft_List_Text&" <div class=""rblank""></div>"&vbCrlf
SD_Soft_List_Text=SD_Soft_List_Text&" <div class=""pagenav"">"&vbCrlf
SD_Soft_List_Text=SD_Soft_List_Text&" <span style=""position:relative;top:-2px;"">"& jk_pagecute(page_size,page_count,page_now,"Class.asp?id="& id &"",10,"#FF0000") &"</span>共有 <strong>"&SoftsNum&"</strong> 个软件. 页次: <strong>"&page_now&"</strong>/"&page_count&""&vbCrlf
SD_Soft_List_Text=SD_Soft_List_Text&" </div>"&vbCrlf
end function
function SD_Class_List_Page(num)
if num=1 then
sql="select * from [Classs] where SD_S_Class_Parent=0 order by SD_S_Class_Order desc"
rs.open sql,conn,1,1
if not rs.eof then
i=0
while not rs.eof and i<10
SD_Class_List_Page=SD_Class_List_Page&"<li><a href="""& SiteUrl &"Class.asp?id="& rs("S_Class.SD_S_Class_Id") &""">"& rs("S_Class.SD_S_Class_Name") &"</a></li>"&vbCrlf
rs.movenext
i=i+1
wend
end if
rs.close
elseif num=2 then
sql="select * from [Classs] where SD_S_Class_Parent=0 order by SD_S_Class_Order desc"
rs.open sql,conn,1,1
if not rs.eof then
while not rs.eof
SD_Class_List_Page=SD_Class_List_Page&"<h2><a href="""& SiteUrl &"Class.asp?id="& rs("S_Class.SD_S_Class_Id") &""">"& rs("S_Class.SD_S_Class_Name") &"</a></h2>"&vbCrlf
SD_Class_List_Page=SD_Class_List_Page&"<ul>"&vbCrlf
set rst=conn.execute("select * from [Classs] where SD_S_Class_Parent="&rs("S_Class.SD_S_Class_Id")&" order by SD_S_Class_Order desc")
if not rst.eof then
while not rst.eof
SD_Class_List_Page=SD_Class_List_Page&"<li><a href="""& SiteUrl &"Class.asp?id="& rst("S_Class.SD_S_Class_Id") &""">"& rst("S_Class.SD_S_Class_Name") &"</a></li>"&vbCrlf
rst.movenext
wend
end if
rst.close
SD_Class_List_Page=SD_Class_List_Page&"</ul>"&vbCrlf
rs.movenext
wend
end if
rs.close
end if
end function
Function SD_Img_Star(lv)
SD_Img_Star="<img src="""& SiteUrl &"images/"&lv&"star.gif"" />"
End function
Function SD_S_plugin(lv)
SD_S_plugin="<img style=""position:relative;top:2px;"" src="""& SiteUrl &"images/plugin"&lv&".gif""/>"
End Function
Function SD_Down_Url(Url,SoftId,order)
Url = split(Url,"$$$$$")
Url_name = split(Url(0),"; ")
Url_Server = split(Url(1),"; ")
Url_add = split(Url(2),"; ")
if order="" then
for i = 0 to ubound(Url_name)
if Url_Server(i)="-1" then
SD_Down_Url=SD_Down_Url&"<li><a href='"&SiteUrl&"DownLoad.asp?id="&SoftId&"&n="&i&"' target='_blank'>"& Url_name(i) &"</a></li>"&vbCrlf
else
set rs=conn.execute("select SD_Server_Url from [Server] where SD_Server_Id="&Url_Server(i))
SD_Down_Url=SD_Down_Url&"<li><a href='"&SiteUrl&"DownLoad.asp?id="&SoftId&"&n="&i&"' target='_blank'>"& Url_name(i) &"</a></li>"&vbCrlf
rs.close
end if
next
'response.Write(SD_Down_Url)
'Exit Function
elseif order<>"" then
order=cint(order)
SD_Down_Url=""
if order = -1 then
for i = 0 to ubound(Url_name)
if Url_Server(i)="-1" then
SD_Down_Url=SD_Down_Url&Url_add(i)
else
set rs=conn.execute("select SD_Server_Url from [Server] where SD_Server_Id="&Url_Server(i))
SD_Down_Url=rs(0) & Url_add(i)&"|||"&SD_Down_Url
rs.close
end if
next
'response.Write(SD_Down_Url)
'Exit Function
elseif order > -1 then
if cint(order) > ubound(Url_name) then
order=0
end if
if Url_Server(order)="-1" then
SD_Down_Url=Url_add(i)
else
set rs=conn.execute("select SD_Server_Url from [Server] where SD_Server_Id="&Url_Server(order))
SD_Down_Url=rs(0) & Url_add(order)
rs.close
end if
end if
else
SD_Down_Url="参数错误!"
end if
End Function
Function SD_Key_Search(keyWord)
sql="select * from [Softs] where"
keyWordList2 = split(keyWord)
for i = 0 to Ubound(KeyWordList2)
sql=sql&" SD_Soft_Name like '%"&keyWordList2(i)&"%' or SD_Soft_Info like '%"&keyWordList2(i)&"%' or"
next
sql=left(sql,len(sql)-3)
sql=sql&" order by SD_Soft_Times desc"
rs.open sql,conn,1,1
if not rs.eof then
page_size=Page_Size_All
rs.pagesize=page_size
page_now=1
if trim(request.QueryString("page"))<>"" then
page_now=cint(trim(request.QueryString("page")))
end if
if page_now>rs.pagecount or page_now<0 then
page_now=1
end if
page_count=rs.pagecount
rs.absolutepage=page_now
j=1
while not rs.eof and j<page_size+1
Soft_Name=Replacehtml(rs("SD_Soft_Name"))
Soft_Info=CutStr(rs("SD_Soft_Info"),70,"")
for i = 0 to Ubound(KeyWordList2)
Soft_Name=replace(Soft_Name,KeyWordList2(i),"<span style='color:red'>"&KeyWordList2(i)&"</span>")
Soft_Info=replace(Soft_Info,KeyWordList2(i),"<span style='color:red'>"&KeyWordList2(i)&"</span>")
next
SD_Key_Search=SD_Key_Search&"<div><dl>"&vbCrlf
SD_Key_Search=SD_Key_Search&" <dt><a href='"& SiteUrl &"Soft.asp?id="& rs("SD_Soft_Id") &"' target=_blank>"& Soft_Name &"</a></dt>"&vbCrlf
SD_Key_Search=SD_Key_Search&" <dd>"& Soft_Info &"</dd>"&vbCrlf
SD_Key_Search=SD_Key_Search&" <dd><i class='soft_date'>"& rs("SD_Soft_Update") &"</i></dd>"&vbCrlf
SD_Key_Search=SD_Key_Search&" </dl></div>"&vbCrlf
rs.movenext
j=j+1
wend
SD_Key_Search=SD_Key_Search&"<div>"&jk_pagecute(page_size,page_count,page_now,"Search.asp?q="& KeyWord &"&",15,"#FF0000") &"转到:<input type='text' size=3 name='gotopage'> <input type=button value=' Go ' onclick=""if (!isNaN(parseInt(document.all.gotopage.value))){location.href='Search.asp?q="& KeyWord &"&page='+document.all.gotopage.value+'';}""></div>"&vbCrlf
else
SD_Key_Search=SD_Key_Search&"<div>没有相关软件!</div>"&vbCrlf
end if
rs.close
End Function
function SD_link_more(ClassName,ShowName,goUrl)
if ClassName<>"" then
sql="select SD_S_Class_Id from [S_Class] where SD_S_Class_Name='"&ClassName&"'"
rs.open sql,conn,1,1
ClassId = rs(0)
rs.close
SD_link_more="<a href='"& SiteUrl & Directory & Dir_Class & "Class_"& ClassId &"_1.html'>"&ShowName&"</a>"
elseif ClassName="" then
SD_link_more="<a href='"& goUrl &"'>"&ShowName&"</a>"
end if
end function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -