📄 function.asp
字号:
Copyright = Copyright & "'****************************************************************" & vbcrlf
Copyright = Copyright & " -->" & vbcrlf
Copyright = Copyright & "<div id=hint style=""display:none""> </div>"
'****************************************************************************************
'最近更新调用系列函数
'****************************************************************************************
'最近更新
function get_update(CatalogID,topNum,cutNum,showTime,isRoot)
dim strDateTime,strSoftName
if CatalogID=0 then
sql="select top "&topNum&" SoftID,SoftName,SoftVer,SoftTime from SoftDown_SoftInfo order by SoftTime desc"
else
if isRoot=1 then
sql="select top "&topNum&" SoftID,SoftName,SoftVer,SoftTime from SoftDown_SoftInfo where RootID="&CatalogID&" order by SoftTime desc"
else
sql="select top "&topNum&" SoftID,SoftName,SoftVer,SoftTime from SoftDown_SoftInfo where CatalogID="&CatalogID&" order by SoftTime desc"
end if
end if
get_update = "<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"">"& vbcrlf
Rs.open sql,conn,1,1
if Rs.eof and Rs.bof then
get_update = get_update & " <tr>"& vbcrlf
get_update = get_update & " <td>Sorry!没有查询到任何记录。</td>"& vbcrlf
get_update = get_update & " </tr>"& vbcrlf
else
do while not Rs.eof
if showTime=0 then
strDateTime=""
else
strDateTime=DateTimeFormat(Rs("SoftTime"),showTime)
end if
strSoftName=rs("SoftName")&" "&rs("SoftVer")
get_update = get_update & " <tr>"& vbcrlf
get_update = get_update & " <td><img src=""../images/d_2.gif""> <a href=""../SoftView/SoftView_"&Rs("SoftID")&".html"" target=""_blank"" Title="""&strSoftName&""">"&cutStr(trim(strSoftName),cutNum)&"</a> </td><td width=""48"">"&strDateTime&"</td>"& vbcrlf
get_update = get_update & " </tr>"& vbcrlf
Rs.movenext
loop
end if
Rs.close
get_update = get_update & "</table>"& vbcrlf
end function
'最近更新,显示分类
function get_update_showcat(CatalogID,topNum,cutNum,showTime,isRoot)
dim strDateTime,strSoftName
if CatalogID=0 then
sql="select top "&topNum&" SoftID,CatalogID,CatalogName,SoftName,SoftVer,SoftTime from SoftDown_SoftInfo order by SoftTime desc"
else
if isRoot=1 then
sql="select top "&topNum&" SoftID,CatalogID,CatalogName,SoftName,SoftVer,SoftTime from SoftDown_SoftInfo where RootID="&CatalogID&" order by SoftTime desc"
else
sql="select top "&topNum&" SoftID,CatalogID,CatalogName,SoftName,SoftVer,SoftTime from SoftDown_SoftInfo where CatalogID="&CatalogID&" order by SoftTime desc"
end if
end if
get_update_showcat = "<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"">"& vbcrlf
Rs.open sql,conn,1,1
if Rs.eof and Rs.bof then
get_update_showcat = get_update_showcat & " <tr>"& vbcrlf
get_update_showcat = get_update_showcat & " <td>Sorry!没有查询到任何记录。</td>"& vbcrlf
get_update_showcat = get_update_showcat & " </tr>"& vbcrlf
else
do while not Rs.eof
if showTime=0 then
strDateTime=""
else
strDateTime=DateTimeFormat(Rs("SoftTime"),showTime)
end if
strSoftName=rs("SoftName")&" "&rs("SoftVer")
get_update_showcat = get_update_showcat & " <tr>"& vbcrlf
get_update_showcat = get_update_showcat & " <td><img src=""../images/d_2.gif""> [<a href=""../SoftList/Catalog_"&rs("CatalogID")&"_SoftTime_Desc_1.html"" target=""_blank"">"&rs("CatalogName")&"</a>] <a href=""../SoftView/SoftView_"&Rs("SoftID")&".html"" target=""_blank"" Title="""&strSoftName&""">"&cutStr(trim(strSoftName),cutNum)&"</a> </td><td width=""85"">"&strDateTime&"</td>"& vbcrlf
get_update_showcat = get_update_showcat & " </tr>"& vbcrlf
Rs.movenext
loop
end if
Rs.close
get_update_showcat = get_update_showcat & "</table>"& vbcrlf
end function
'最近更新,按软件类型
function get_update_bySoftType(SoftType,topNum,cutNum,showTime)
dim strDateTime,strSoftName
sql="select top "&topNum&" SoftID,SoftName,SoftVer,SoftTime from SoftDown_SoftInfo where SoftType='"&SoftType&"' order by SoftTime desc"
get_update_bySoftType = "<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""1"">"& vbcrlf
Rs.open sql,conn,1,1
if Rs.eof and Rs.bof then
get_update_bySoftType = get_update_bySoftType & " <tr>"& vbcrlf
get_update_bySoftType = get_update_bySoftType & " <td>Sorry!没有查询到任何记录。</td>"& vbcrlf
get_update_bySoftType = get_update_bySoftType & " </tr>"& vbcrlf
else
do while not Rs.eof
if showTime=0 then
strDateTime=""
else
strDateTime=DateTimeFormat(Rs("SoftTime"),showTime)
end if
strSoftName=rs("SoftName")&" "&rs("SoftVer")
get_update_bySoftType = get_update_bySoftType & " <tr>"& vbcrlf
get_update_bySoftType = get_update_bySoftType & " <td><img src=""../images/d_2.gif""> <a href=""../SoftView/SoftView_"&Rs("SoftID")&".html"" target=""_blank"" Title="""&strSoftName&""">"&cutStr(trim(strSoftName),cutNum)&"</a> </td><td width=""48"">"&strDateTime&"</td>"& vbcrlf
get_update_bySoftType = get_update_bySoftType & " </tr>"& vbcrlf
Rs.movenext
loop
end if
Rs.close
get_update_bySoftType = get_update_bySoftType & "</table>"& vbcrlf
end function
'最近更新,按软件类型,显示分类
function get_update_bySoftType_showcat(SoftType,topNum,cutNum,showTime)
dim strDateTime,strSoftName
sql="select top "&topNum&" SoftID,CatalogID,CatalogName,SoftName,SoftVer,SoftTime from SoftDown_SoftInfo where SoftType='"&SoftType&"' order by SoftTime desc"
get_update_bySoftType_showcat = "<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""1"">"& vbcrlf
Rs.open sql,conn,1,1
if Rs.eof and Rs.bof then
get_update_bySoftType_showcat = get_update_bySoftType_showcat & " <tr>"& vbcrlf
get_update_bySoftType_showcat = get_update_bySoftType_showcat & " <td>Sorry!没有查询到任何记录。</td>"& vbcrlf
get_update_bySoftType_showcat = get_update_bySoftType_showcat & " </tr>"& vbcrlf
else
do while not Rs.eof
if showTime=0 then
strDateTime=""
else
strDateTime=DateTimeFormat(Rs("SoftTime"),showTime)
end if
strSoftName=rs("SoftName")&" "&rs("SoftVer")
get_update_bySoftType_showcat = get_update_bySoftType_showcat & " <tr>"& vbcrlf
get_update_bySoftType_showcat = get_update_bySoftType_showcat & " <td><img src=""../images/d_2.gif""> [<a href=""../SoftList/Catalog_"&rs("CatalogID")&"_SoftTime_Desc_1.html"" target=""_blank"">"&rs("CatalogName")&"</a>] <a href=""SoftView/SoftView_"&Rs("SoftID")&".html"" target=""_blank"" Title="""&strSoftName&""">"&cutStr(trim(strSoftName),cutNum)&"</a> </td><td width=""30"">"&strDateTime&"</td>"& vbcrlf
get_update_bySoftType_showcat = get_update_bySoftType_showcat & " </tr>"& vbcrlf
Rs.movenext
loop
end if
Rs.close
get_update_bySoftType_showcat = get_update_bySoftType_showcat & "</table>"& vbcrlf
end function
'最近更新,按授权类型
function get_update_byLicenceType(LicenceType,topNum,cutNum,showTime)
dim strDateTime,strSoftName
sql="select top "&topNum&" SoftID,SoftName,SoftVer,SoftTime from SoftDown_SoftInfo where LicenceType='"&LicenceType&"' order by SoftTime desc"
get_update_byLicenceType = "<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""1"">"& vbcrlf
Rs.open sql,conn,1,1
if Rs.eof and Rs.bof then
get_update_byLicenceType = get_update_byLicenceType & " <tr>"& vbcrlf
get_update_byLicenceType = get_update_byLicenceType & " <td>Sorry!没有查询到任何记录。</td>"& vbcrlf
get_update_byLicenceType = get_update_byLicenceType & " </tr>"& vbcrlf
else
do while not Rs.eof
if showTime=0 then
strDateTime=""
else
strDateTime=DateTimeFormat(Rs("SoftTime"),showTime)
end if
strSoftName=rs("SoftName")&" "&rs("SoftVer")
get_update_byLicenceType = get_update_byLicenceType & " <tr>"& vbcrlf
get_update_byLicenceType = get_update_byLicenceType & " <td><img src=""../images/d_2.gif""> <a href=""../SoftView/SoftView_"&Rs("SoftID")&".html"" target=""_blank"" Title="""&strSoftName&""">"&cutStr(trim(strSoftName),cutNum)&"</a> "&strDateTime&"</td>"& vbcrlf
get_update_byLicenceType = get_update_byLicenceType & " </tr>"& vbcrlf
Rs.movenext
loop
end if
Rs.close
get_update_byLicenceType = get_update_byLicenceType & "</table>"& vbcrlf
end function
'最近更新,按授权类型,显示分类
function get_update_byLicenceType_showcat(LicenceType,topNum,cutNum,showTime)
dim strDateTime,strSoftName
sql="select top "&topNum&" SoftID,CatalogID,CatalogName,SoftName,SoftVer,SoftTime from SoftDown_SoftInfo where LicenceType='"&LicenceType&"' order by SoftTime desc"
get_update_byLicenceType_showcat = "<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""1"">"& vbcrlf
Rs.open sql,conn,1,1
if Rs.eof and Rs.bof then
get_update_byLicenceType_showcat = get_update_byLicenceType_showcat & " <tr>"& vbcrlf
get_update_byLicenceType_showcat = get_update_byLicenceType_showcat & " <td>Sorry!没有查询到任何记录。</td>"& vbcrlf
get_update_byLicenceType_showcat = get_update_byLicenceType_showcat & " </tr>"& vbcrlf
else
do while not Rs.eof
if showTime=0 then
strDateTime=""
else
strDateTime=DateTimeFormat(Rs("SoftTime"),showTime)
end if
strSoftName=rs("SoftName")&" "&rs("SoftVer")
get_update_byLicenceType_showcat = get_update_byLicenceType_showcat & " <tr>"& vbcrlf
get_update_byLicenceType_showcat = get_update_byLicenceType_showcat & " <td>·[<a href=""../SoftList/Catalog_"&rs("CatalogID")&"_SoftTime_Desc_1.html"" target=""_blank"">"&rs("CatalogName")&"</a>] <a href=""../SoftView/SoftView_"&Rs("SoftID")&".html"" target=""_blank"" Title="""&strSoftName&""">"&cutStr(trim(strSoftName),cutNum)&"</a> </td><td width=""30"">"&strDateTime&"</td>"& vbcrlf
get_update_byLicenceType_showcat = get_update_byLicenceType_showcat & " </tr>"& vbcrlf
Rs.movenext
loop
end if
Rs.close
get_update_byLicenceType_showcat = get_update_byLicenceType_showcat & "</table>"& vbcrlf
end function
'****************************************************************************************
'下载排行榜系列函数
'****************************************************************************************
'全部下载排行
function get_AllTop(CatalogID,topNum,cutNum,showHits,isRoot)
dim strHits,strSoftName
if CatalogID=0 then
sql="select top "&topNum&" SoftID,SoftName,SoftVer,AllHits from SoftDown_SoftInfo order by AllHits desc,SoftID desc"
else
if isRoot=1 then
sql="select top "&topNum&" SoftID,SoftName,SoftVer,AllHits from SoftDown_SoftInfo where RootID="&CatalogID&" order by AllHits desc,SoftID desc"
else
sql="select top "&topNum&" SoftID,SoftName,SoftVer,AllHits from SoftDown_SoftInfo where CatalogID="&CatalogID&" order by AllHits desc,SoftID desc"
end if
end if
get_AllTop = "<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""1"">"& vbcrlf
Rs.open sql,conn,1,1
if Rs.eof and Rs.bof then
get_AllTop = get_AllTop & " <tr>"& vbcrlf
get_AllTop = get_AllTop & " <td>Sorry!没有查询到任何记录。</td>"& vbcrlf
get_AllTop = get_AllTop & " </tr>"& vbcrlf
else
do while not Rs.eof
if showHits=0 then
strHits=""
else
strHits=Rs("AllHits")
end if
strSoftName=rs("SoftName")&" "&rs("SoftVer")
get_AllTop = get_AllTop & " <tr>"& vbcrlf
get_AllTop = get_AllTop & " <td>·<a href=""../SoftView/SoftView_"&Rs("SoftID")&".html"" target=""_blank"" Title="""&strSoftName&""">"&cutStr(trim(strSoftName),cutNum)&"</a> "&strHits&"</td>"& vbcrlf
get_AllTop = get_AllTop & " </tr>"& vbcrlf
Rs.movenext
loop
end if
Rs.close
get_AllTop = get_AllTop & "</table>"& vbcrlf
end function
'本日下载排行
function get_DayTop(CatalogID,topNum,cutNum,showHits,isRoot)
dim strHits,strSoftName
if CatalogID=0 then
sql="select top "&topNum&" SoftID,SoftName,SoftVer,DayHits from SoftDown_SoftInfo order by DayHits desc,SoftID desc"
else
if isRoot=1 then
sql="select top "&topNum&" SoftID,SoftName,SoftVer,DayHits from SoftDown_SoftInfo where RootID="&CatalogID&" order by DayHits desc,SoftID desc"
else
sql="select top "&topNum&" SoftID,SoftName,SoftVer,DayHits from SoftDown_SoftInfo where CatalogID="&CatalogID&" order by DayHits desc,SoftID desc"
end if
end if
get_DayTop = "<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""1"">"& vbcrlf
Rs.open sql,conn,1,1
if Rs.eof and Rs.bof then
get_DayTop = get_DayTop & " <tr>"& vbcrlf
get_DayTop = get_DayTop & " <td>Sorry!没有查询到任何记录。</td>"& vbcrlf
get_DayTop = get_DayTop & " </tr>"& vbcrlf
else
do while not Rs.eof
if showHits=0 then
strHits=""
else
strHits=Rs("DayHits")
end if
strSoftName=rs("SoftName")&" "&rs("SoftVer")
get_DayTop = get_DayTop & " <tr>"& vbcrlf
get_DayTop = get_DayTop & " <td>·<a href=""../SoftView/SoftView_"&Rs("SoftID")&".html"" target=""_blank"" Title="""&strSoftName&""">"&cutStr(trim(strSoftName),cutNum)&"</a> "&strHits&"</td>"& vbcrlf
get_DayTop = get_DayTop & " </tr>"& vbcrlf
Rs.movenext
loop
end if
Rs.close
get_DayTop = get_DayTop & "</table>"& vbcrlf
end function
'本周下载排行
function get_WeekTop(CatalogID,topNum,cutNum,showHits,isRoot)
dim strHits,strSoftName
if CatalogID=0 then
sql="select top "&topNum&" SoftID,SoftName,SoftVer,WeekHits from SoftDown_SoftInfo order by WeekHits desc,SoftID desc"
else
if isRoot=1 then
sql="select top "&topNum&" SoftID,SoftName,SoftVer,WeekHits from SoftDown_SoftInfo where RootID="&CatalogID&" order by WeekHits desc,SoftID desc"
else
sql="select top "&topNum&" SoftID,SoftName,SoftVer,WeekHits from SoftDown_SoftInfo where CatalogID="&CatalogID&" order by WeekHits desc,SoftID desc"
end if
end if
get_WeekTop = "<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""1"">"& vbcrlf
Rs.open sql,conn,1,1
if Rs.eof and Rs.bof then
get_WeekTop = get_WeekTop & " <tr>"& vbcrlf
get_WeekTop = get_WeekTop & " <td>Sorry!没有查询到任何记录。</td>"& vbcrlf
get_WeekTop = get_WeekTop & " </tr>"& vbcrlf
else
do while not Rs.eof
if showHits=0 then
strHits=""
else
strHits=Rs("WeekHits")
end if
strSoftName=rs("SoftName")&" "&rs("SoftVer")
get_WeekTop = get_WeekTop & " <tr>"& vbcrlf
get_WeekTop = get_WeekTop & " <td>·<a href=""../SoftView/SoftView_"&Rs("SoftID")&".html"" target=""_blank"" Title="""&strSoftName&""">"&cutStr(trim(strSoftName),cutNum)&"</a> "&strHits&"</td>"& vbcrlf
get_WeekTop = get_WeekTop & " </tr>"& vbcrlf
Rs.movenext
loop
end if
Rs.close
get_WeekTop = get_WeekTop & "</table>"& vbcrlf
end function
'本月下载排行
function get_MonthTop(CatalogID,topNum,cutNum,showHits,isRoot)
dim strHits,strSoftName
if CatalogID=0 then
sql="select top "&topNum&" SoftID,SoftName,SoftVer,MonthHits from SoftDown_SoftInfo order by MonthHits desc,SoftID desc"
else
if isRoot=1 then
sql="select top "&topNum&" SoftID,SoftName,SoftVer,MonthHits from SoftDown_SoftInfo where RootID="&CatalogID&" order by MonthHits desc,SoftID desc"
else
sql="select top "&topNum&" SoftID,SoftName,SoftVer,MonthHits from SoftDown_SoftInfo where CatalogID="&CatalogID&" order by MonthHits desc,SoftID desc"
end if
end if
get_MonthTop = "<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""1"">"& vbcrlf
Rs.open sql,conn,1,1
if Rs.eof and Rs.bof then
get_MonthTop = get_MonthTop & " <tr>"& vbcrlf
get_MonthTop = get_MonthTop & " <td>Sorry!没有查询到任何记录。</td>"& vbcrlf
get_MonthTop = get_MonthTop & " </tr>"& vbcrlf
else
do while not Rs.eof
if showHits=0 then
strHits=""
else
strHits=Rs("MonthHits")
end if
strSoftName=rs("SoftName")&" "&rs("SoftVer")
get_MonthTop = get_MonthTop & " <tr>"& vbcrlf
get_MonthTop = get_MonthTop & " <td>·<a href=""../SoftView/SoftView_"&Rs("SoftID")&".html"" target=""_blank"" Title="""&strSoftName&""">"&cutStr(trim(strSoftName),cutNum)&"</a> "&strHits&"</td>"& vbcrlf
get_MonthTop = get_MonthTop & " </tr>"& vbcrlf
Rs.movenext
loop
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -