📄 templet.asp
字号:
<!--#include file="Config.asp"-->
<!--#include file="../Admin/SiteConfig.asp"-->
<%
'使用html时链接转向
if PageType="html" then
response.Redirect(Directory&Dir_Index&"index.html")
end if
function SD_Templet_change(Templet_id)
'on error resume next
sql="select * from [Templet] where SD_templet_id="&Templet_id
'debug(sql)
rs.open sql,conn,1,1
if not rs.eof then
SD_Templet_change=rs("SD_templet_content")
else
SD_Templet_change="<div style=""text-align:center;"">Templet调用参数id错误!</div>"
end if
rs.close
' if err then
' err.clear
' SD_Templet_change="<div style=""text-align:center;"">Templet参数调用错误!</div>"
' exit function
' end if
end function
'num 列表显示数目
'condition 1 推荐软件 2固顶软件 3软件版本 4根据一级分类
'Cond_Name当condition为3,4时有效, 一级栏目分类名称
'orderby 排序 1 更新时间 2 下载次数 3 软件编号
'exp:SD_Soft_List_Img(15,2,,2)
function SD_Soft_List_Img(num,condition,Cond_Name,orderby) '有图片软件列表
sql="select top "& num &" * from [Softs] where SD_Soft_Del=1 "
Select Case condition
Case 1:sql=sql&"and SD_Soft_Commend=1 "
Case 2:sql=sql&"and SD_Soft_Commend=2 "
Case 3:sql=sql&"and SD_Soft_Right='"& Cond_Name &"' "
Case 4:sql=sql&"and SD_S_Class_Parent_Name='"& Cond_Name &"' "
End Select
Select Case orderby
Case 1:sql=sql&"order by SD_Soft_Update desc"
Case 2:sql=sql&"order by SD_Soft_Times desc"
Case 3:sql=sql&"order by SD_Soft_Id desc"
End Select
'debug(sql)
rs.open sql,conn,1,1
if not rs.eof then
i=0
while not rs.eof and i<cint(num)
Soft_Img2=rs("SD_Soft_Img")
if Soft_Img2="" then
Soft_Img2="Noimg.jpg"
end if
SD_Soft_List_Img=SD_Soft_List_Img&"<dl><dt><a href="""& SiteUrl &"soft.asp?id="& rs("SD_Soft_Id") &""" target=_blank><img width=""30"" height=""30"" src="""& SiteUrl &"images/Upload/"& Soft_Img2 &""" alt="""& rs("SD_Soft_Name") &""" /></a></dt>"&vbCrlf
SD_Soft_List_Img=SD_Soft_List_Img&"<dd><a href="""& SiteUrl &"soft.asp?id="& rs("SD_Soft_Id") &""" target=_blank>" &left(rs("SD_Soft_Name"),instr(rs("SD_Soft_Name"),"【")-1)& "</a>:"&Replacehtml(rs("SD_Soft_Info"))&"</dd>"&vbCrlf
SD_Soft_List_Img=SD_Soft_List_Img&"</dl>"&vbCrlf
rs.movenext
i=i+1
wend
else
SD_Soft_List_Img="<li>没有相关软件</li>"
end if
rs.close
end function
'num 列表显示数目
'condition 1 推荐软件 2固顶软件 3软件版本 4根据二级分类 5一级 6无效
'Cond_Name当condition为3,4,5时有效, 一级栏目分类名称
'orderby 排序 1 更新时间 2 下载次数 3 软件编号 4 月下载排行
'Show_type 1显示时间 2显示分类 3时间分类均显示 4都不显示
'exp:SD_Soft_List(15,5,,1,3)
function SD_Soft_List(num,condition,Cond_Name,orderby,Show_type) '无图片软件列表
sql="select top "& num &" * from [Softs] where SD_Soft_Del=1 "
Select Case condition
Case 1:sql=sql&"and SD_Soft_Commend=1 "
Case 2:sql=sql&"and SD_Soft_Commend=2 "
Case 3:sql=sql&"and SD_Soft_Right='"& Cond_Name &"' "
Case 4:sql=sql&"and S_Class.SD_S_Class_Name='"& Cond_Name &"' "
Case 5:sql=sql&"and S_Class_1.SD_S_Class_Name='"& Cond_Name &"' "
End Select
if condition<2 and Cond_Name<>"" then
sql=sql&"and S_Class.SD_S_Class_Name='"& Cond_Name &"' "
end if
Select Case orderby
Case 1:sql=sql&"order by SD_Soft_Update desc"
Case 2:sql=sql&"order by SD_Soft_Times desc"
Case 3:sql=sql&"order by SD_Soft_Id desc"
Case 4:sql=sql&"order by SD_Soft_Times_m desc"
End Select
'SD_Soft_List=SD_Soft_List&sql
'debug(sql)
rs.open sql,conn,1,1
if not rs.eof then
i=0
while not rs.eof and i<cint(num)
Soft_Img2=rs("SD_Soft_Img")
if Soft_Img2="" then
Soft_Img2="Noimg.jpg"
end if
Select Case Show_type
Case 1:SD_Soft_List=SD_Soft_List&"<li><span class=""today"">"& month(rs("SD_Soft_Update")) &"-"& day(rs("SD_Soft_Update")) &"</span>"&vbCrlf
Case 2:SD_Soft_List=SD_Soft_List&"<li><a href="""& SiteUrl &"Class.asp?id="& rs("S_Class.SD_S_Class_Id") &""" class=""type"">["& rs("S_Class.SD_S_Class_Name") &"]</a>"&vbCrlf
Case 3:SD_Soft_List=SD_Soft_List&"<li><span class=""today"">"& month(rs("SD_Soft_Update")) &"-"& day(rs("SD_Soft_Update")) &"</span><a href="""& SiteUrl &"Class.asp?id="& rs("S_Class.SD_S_Class_Id") &""" class=""type"">["& rs("S_Class.SD_S_Class_Name") &"]</a>"&vbCrlf
Case 4:SD_Soft_List=SD_Soft_List&"<li>"&vbCrlf
End Select
SD_Soft_List=SD_Soft_List&"<a href="""& SiteUrl &"Soft.asp?id="& rs("SD_Soft_Id") &""" target=_blank>"& rs("SD_Soft_Name") &"</a></li>"&vbCrlf
rs.movenext
i=i+1
wend
else
SD_Soft_List=SD_Soft_List&"<li>没有相关软件</li>"
end if
rs.close
end function
function SD_Topic_Soft_List(num,Cond_Name,orderby,Show_type) '无图片推荐软件列表
set rst=conn.execute("select SD_Topic_Soft,SD_Topic_Name,SD_Topic_Id from [SD_Topic] where SD_Topic_Name='"&Cond_Name&"'")
SD_Topic_Soft=rst(0)
SD_Topic_Name=rst(1)
SD_Topic_Id=rst(2)
rst.close
sql="select top "& num &" * from [Softs] where SD_Soft_Del=1 and SD_Soft_Id in ("&SD_Topic_Soft&") "
Select Case orderby
Case 1:sql=sql&"order by SD_Soft_Update desc"
Case 2:sql=sql&"order by SD_Soft_Times desc"
Case 3:sql=sql&"order by SD_Soft_Id desc"
Case 4:sql=sql&"order by SD_Soft_Times_m desc"
End Select
rs.open sql,conn,1,1
if not rs.eof then
i=0
while not rs.eof and i<cint(num)
Soft_Img2=rs("SD_Soft_Img")
if Soft_Img2="" then
Soft_Img2="Noimg.jpg"
end if
Select Case Show_type
Case 1:SD_Topic_Soft_List=SD_Topic_Soft_List&"<li><span class=""today"">"& month(rs("SD_Soft_Update")) &"-"& day(rs("SD_Soft_Update")) &"</span>"&vbCrlf
Case 2:SD_Topic_Soft_List=SD_Topic_Soft_List&"<li><a href="""& SiteUrl &"Class.asp?id="& rs("SD_S_Class_Id") &""" class=""type"">["& rs("SD_S_Class_Name") &"]</a>"&vbCrlf
Case 3:SD_Topic_Soft_List=SD_Topic_Soft_List&"<li><span class=""today"">"& month(rs("SD_Soft_Update")) &"-"& day(rs("SD_Soft_Update")) &"</span><a href="""& SiteUrl &"Class.asp?id="& rs("S_Class.SD_S_Class_Id") &""" class=""type"">["& rs("S_Class.SD_S_Class_Name") &"]</a>"&vbCrlf
Case 4:SD_Topic_Soft_List=SD_Topic_Soft_List&"<li>"&vbCrlf
End Select
SD_Topic_Soft_List=SD_Topic_Soft_List&"<a href="""& SiteUrl &"Soft.asp?id="& rs("SD_Soft_Id") &""" target=_blank>"& rs("SD_Soft_Name") &"</a></li>"&vbCrlf
rs.movenext
i=i+1
wend
else
SD_Topic_Soft_List=SD_Topic_Soft_List&"<li>没有相关软件</li>"
end if
rs.close
end function
'Cond_Name 专题名称
function SD_Topic_Info(Cond_Name) '专题介绍
set rst=conn.execute("select SD_Topic_Info from [SD_Topic] where SD_Topic_Name='"&Cond_Name&"'")
SD_Topic_Soft=rst(0)
rst.close
SD_Topic_Info=SD_Topic_Soft
end function
'num 列表显示数目
'orderby 排序 1编号 2 更新时间
'exp:SD_Topic_List(15,2)
function SD_Topic_List(num,orderby,S_open) '专题列表
sql="select top "& num &" * from [SD_Topic] where SD_Topic_Parent=0 "
Select Case orderby
Case 1:sql=sql&"order by SD_Topic_Id desc"
Case 2:sql=sql&"order by SD_Topic_Date desc"
End Select
' SD_Topic_List=sql
' exit function
rs.open sql,conn,1,1
if not rs.eof then
i=0
Select Case S_open
Case 2: S_open="target='_blank'"
End Select
while not rs.eof and i<cint(num)
SD_Topic_List=SD_Topic_List&"<li><a href='Topic.asp?id="&rs("SD_Topic_Id")&"' "&S_open&">"&rs("SD_Topic_Name")&"</a></li>"
rs.movenext
i=i+1
wend
end if
rs.close
end function
'UseFor 1单一软件 2相关软件搜索
'Word UseFor是1则为软件ID 是2 则为软件关键字,多个用","分隔
'compart UseFor是1有效 用于显示时分隔关键字
function SD_Soft_One(UseFor,Word,compart)
if UseFor=1 then
sql="select * from [Softs] where SD_Soft_Id="&Cint(Word)
'debug(sql)
rs.open sql,conn,1,1
if not rs.eof then
SD_Soft_One="<a href="""& SiteUrl &"Soft.asp?id="& Word &""" target=""_blank"">"& left(rs("SD_Soft_Name"),instr(rs("SD_Soft_Name"),"【")-1) &"</a>"
else
SD_Soft_One="没有该软件"
end if
rs.close
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -