<%dim sqlSpecialw,rsSpecialw
sqlSpecialw="select * From Article where classid=4 and Deleted=false and passed=true order by ArticleID desc"
Set rsSpecialw= Server.CreateObject("ADODB.Recordset")
rsSpecialw.open sqlSpecialw,conn,1,1%>
<%if rsSpecialw.bof and rsSpecialw.eof then
response.write "· 没有任何文章"
%>
<%else
%>
<%do while not rsSpecialw.eof%>
<%response.Write""&gotTopic(rsSpecialw("Title"),30)&""
if CDate(FormatDateTime(rsSpecialw("UpdateTime"),2))=date() then
'if datediff(d,rsSpecialw("UpdateTime"),date())<2 then
response.Write " "
end if%>
<%rsSpecialw.movenext
loop%>
<%
rsSpecialw.close
end if
set rsSpecialw=nothing%>
<%
sqlSpecialw="select * From Article where classid=6 and Deleted=false and passed=true order by ArticleID desc"
Set rsSpecialw= Server.CreateObject("ADODB.Recordset")
rsSpecialw.open sqlSpecialw,conn,1,1%>
<%if rsSpecialw.bof and rsSpecialw.eof then
response.write "· 没有任何文章"
%>
<%else
%>
<%do while not rsSpecialw.eof%>
<%response.Write""&gotTopic(rsSpecialw("Title"),30)&""
' if CDate(FormatDateTime(rsSpecialw("UpdateTime"),2))=date() then
if datediff("d",rsSpecialw("UpdateTime"),date()) < 2 then
response.Write " "
end if%>
<%rsSpecialw.movenext
loop%>
<%
rsSpecialw.close
end if
set rsSpecialw=nothing%>
<%
sqlSpecialw="select top 5 * From Article where classid=5 and Deleted=false and passed=true order by ArticleID desc"
Set rsSpecialw= Server.CreateObject("ADODB.Recordset")
rsSpecialw.open sqlSpecialw,conn,1,1%>
<%if rsSpecialw.bof and rsSpecialw.eof then
response.write "· 没有任何文章"
%>
<%else
%>
<%do while not rsSpecialw.eof%>
<%response.Write""&gotTopic(rsSpecialw("Title"),30)&""
if CDate(FormatDateTime(rsSpecialw("UpdateTime"),2))=date() then
response.Write " "
end if%>
<%rsSpecialw.movenext
loop%>
<%
rsSpecialw.close
end if
set rsSpecialw=nothing%>
<%
nt2003.bottom()
''call PopAnnouceWindow(400,300)
'response.write ShowAD(0) 'ShowAD(0) 弹出广告
'response.write ShowAD(4) 'ShowAD(4) 浮动广告
'ShowAD(0) 弹出广告
'ShowAD(1) Banner广告 后台:{$ShowAD1}
'ShowAD(2) 栏目广告
'ShowAD(3) 文章内容页广告
'ShowAD(4) 浮动广告
'ShowAD(5) 页面固定广告 后台:{$ShowAD5}
'ShowAD(6) 代码广告 后台:{$ShowAD6}
'=================================================
'过程名:ShowPicSoft
'作 用:显示图片软件
'参 数:intClassID ----栏目ID,0为所有栏目,若大于0,则显示指定栏目及其子栏目的图片软件
' SoftNum ----最多显示多少个软件
' TitleLen ----标题最多字符数,一个汉字=两个英文字符
' ShowType ----显示方式。1为只有图片+标题,2为图片+标题+内容简介
' Cols ----列数。超过此列数就换行。
' ImgWidth ----图片宽度
' ImgHeight ----图片高度
' ContentLen ----内容最多字符数
' Hot ----是否是热门软件
' Elite ----是否是推荐软件
'=================================================
function ShowPicSoft(intClassID,SoftNum,TitleLen,ShowType,Cols,ImgWidth,ImgHeight,ContentLen,Hot,Elite)
dim sqlPic,i,tClass,trs,arrClassID
if SoftNum<0 or SoftNum>=50 then
SoftNum=5
end if
if ShowType<>1 and ShowType<>2 then
ShowType=1
end if
if Cols<=0 or Cols>=10 then
Cols=5
end if
if ImgWidth<0 or ImgWidth>500 then
ImgWidth=150
end if
if ImgHeight<0 or ImgHeight>500 then
ImgHeight=150
end if
if Hot<>True and Hot<>False then
Hot=False
end if
if Elite<>True and Elite<>False then
Elite=False
end if
sqlPic="select top " & SoftNum
sqlPic=sqlPic & " S.SoftID,S.SoftName,S.SoftVersion,S.SoftSize,S.Keyword,S.Author,S.UpdateTime,S.Editor,"
if ShowType=2 then
sqlPic=sqlPic & "S.SoftIntro,"
end if
sqlPic=sqlPic & " S.Hits,S.DayHits,S.WeekHits,S.MonthHits,S.OnTop,S.Elite,S.SoftPicUrl,S.Stars,S.SoftLevel,S.SoftPoint from Soft S where S.Deleted=False and S.Passed=True and SoftPicUrl<>''"
if intClassID>0 then
set tClass=nt2003.execute("select ClassID,Child,ParentPath from SoftClass where ClassID=" & intClassID)
if not(tClass.bof and tClass.eof) then
if tClass(1)>0 then
arrClassID=ClassID
set trs=nt2003.execute("select ClassID from SoftClass where ParentID=" & tClass(0) & " or ParentPath like '%" & tClass(2) & "," & tClass(0) & ",%' and Child=0 and LinkUrl=''")
do while not trs.eof
arrClassID=arrClassID & "," & trs(0)
trs.movenext
loop
set trs=nothing
sqlPic=sqlPic & " and S.ClassID in (" & arrClassID & ")"
else
sqlPic=sqlPic & " and S.ClassID=" & tClass(0)
end if
set trs=nothing
else
sqlPic=sqlPic & " and S.ClassID=" & tClass(0)
end if
set tClass=nothing
end if
if Hot=True then
sqlPic=sqlPic & " and S.Hits>=" & HitsOfHot
end if
if Elite=True then
sqlPic=sqlPic & " and S.Elite=True "
end if
sqlPic=sqlPic & " order by S.OnTop,S.SoftID desc"
set rsPic=nt2003.Execute(sqlPic)
'rsPic.open sqlPic,conn,1,1
strPic= "
"
if rsPic.bof and rsPic.eof then
for i=1 to cols
strPic= strPic & "
没有任何推荐下载
"
next
else
i=0
if ShowType=1 then
do while not rsPic.eof
strPic=strPic & "
"
rsPic.movenext
i=i+1
if ((i mod Cols=0) and (not rsPic.eof)) then strPic=strPic & "
"
loop
end if
end if
strPic=strPic & "
"
rsPic.close
ShowPicSoft=strPic
end function
'=================================================
'过程名:GetPicSoftTitle
'作 用:显示图片软件的标题
'参 数:intTitleLen ----标题最多字符数,一个汉字=两个英文字符
' intImgWidth ----图片宽度
' intImgHeight ----图片高度
'=================================================
function GetPicSoftTitle(intTitleLen,intImgWidth,intImgHeight)
dim FileType,TitleStr
FileType=right(lcase(rsPic("SoftPicUrl")),3)
TitleStr=gotTopic(rsPic("SoftName") & " " & rsPic("SoftVersion"),intTitleLen)
strPic=strPic & ""
if FileType="swf" then
strPic=strPic & ""
elseif fileType="jpg" or fileType="bmp" or fileType="png" or fileType="gif" then
strPic=strPic & ""
else
strPic=strPic & ""
end if
strPic=strPic & " " & TitleStr & ""
GetPicSoftTitle=strPic
end function
'=================================================
'过程名:ShowNewSoft
'作 用:显示最新软件更新
'=================================================
function ShowNewSoft
dim sqlNew,rsNew,strrow,strcol,i,strtemp
nt2003.Name="NewSoft"
If nt2003.ObjIsEmpty() Then
sqlNew="select top 8 S.SoftID,S.SoftName,S.SoftVersion,S.Author,S.UpdateTime,S.Editor,S.Hits,S.DayHits,S.WeekHits,S.MonthHits,S.SoftSize,S.SoftLevel,S.SoftPoint from Soft S where S.Deleted=False and S.Passed=True order by S.SoftID desc"
Set rsNew = nt2003.execute(sqlNew)
if rsNew.bof and rsNew.eof then
nt2003.value=""
else
nt2003.value = rsNew.GetString(,,"|||","@@@","")
end if
rsNew.close
set rsNew=nothing
end if
if nt2003.value="" then
strtemp = "· 没有任何下载"
else
strrow=Split(nt2003.value,"@@@")
for i = 0 to UBound(strrow)-1
strcol=Split(strrow(i),"|||")
strtemp = strtemp & "
["
if CDate(FormatDateTime(strcol(4),2))=date() then
strtemp = strtemp & ""
else
strtemp = strtemp & ""
end if
if month(strcol(4))<10 then
strtemp = strtemp & "0"
end if
strtemp = strtemp & month(strcol(4)) & "-"
if day(strcol(4))<10 then
strtemp = strtemp & "0"
end if
strtemp = strtemp & day(strcol(4)) & "]
"
next
end if
ShowNewSoft=strtemp
end function
'=================================================
'过程名:ShowNewPhoto
'作 用:显示最近更新的图片
'参 数:PhotoNum ----最多显示多少个图片
' ShowTitle ----是否显示图片名称,True为显示,False为不显示
' TitleLen ----标题最多字符数,一个汉字=两个英文字符
'=================================================
function ShowNewPhoto
dim sqlNew,rsNew,i,j,strrow,strcol,strtemp
nt2003.Name="NewPhoto"
If nt2003.ObjIsEmpty() Then
sqlNew=sqlNew & "select top 6 P.PhotoID,P.PhotoName,P.PhotoUrl_Thumb,P.Author,P.UpdateTime,P.Editor,P.Hits,P.DayHits,P.WeekHits,P.MonthHits,P.PhotoSize,P.PhotoLevel,P.PhotoPoint from Photo P where P.Deleted=False and P.Passed=True order by P.PhotoID desc"
Set rsNew = nt2003.execute(sqlNew)
if rsNew.bof and rsNew.eof then
nt2003.value=""
else
nt2003.value = rsNew.GetString(,,"|||","@@@","")
end if
rsNew.close
set rsNew=nothing
end if
strtemp = "
"
if nt2003.value="" then
strtemp = strtemp & "
没有任何图片
"
else
strrow=Split(nt2003.value,"@@@")
i=1
for j = 0 to UBound(strrow)-1
strcol=Split(strrow(j),"|||")
if i mod 11=0 then
strtemp = strtemp & "
"
ShowNewPhoto=strtemp
end function
'=================================================
'过程名:ShowSiteCountAll
'作 用:显示站点统计信息
'参 数:无
'=================================================
function ShowSiteCountAll
dim strcol,strtemp
nt2003.Name="SiteCount"
If nt2003.ObjIsEmpty() Then nt2003.loadSiteCount()
strcol=Split(nt2003.value,"|||")
strtemp = "· 文章总数:" & strcol(0) & "篇 "
strtemp = strtemp & "· 下载总数:" & strcol(5) & "个 "
strtemp = strtemp & "· 图片总数:" & strcol(9) & "个 "
strtemp = strtemp & "· 文章阅读:" & strcol(1) & "人次 "
strtemp = strtemp & "· 软件下载:" & strcol(6) & "人次 "
strtemp = strtemp & "· 图片查看:" & strcol(10) & "人次 "
strtemp = strtemp & "· 注册用户:" & strcol(13) & "名 "
ShowSiteCountAll=strtemp
end function
function ShowShow(classid,num)
dim sqlRoot,rsRoot,trs,arrClassID,TitleStr,ClassCount,iClassID
sqlRoot="select C.ClassID,C.ClassName,C.RootID,L.LayoutFileName,L.LayoutID,C.Child,C.Readme From ArticleClass C inner join Layout L on C.LayoutID=L.LayoutID where Classid=" & ClassID & " order by C.RootID"
Set rsRoot= Server.CreateObject("ADODB.Recordset")
rsRoot.open sqlRoot,conn,1,1
if rsRoot.bof and rsRoot.eof then
response.Write("还没有任何栏目,请首先添加栏目。")
else
ClassCount=rsRoot.recordcount
iClassID=0
do while not rsRoot.eof
arrClassID=rsRoot(0)
if rsRoot(5)>0 then
set trs=conn.execute("select ClassID from ArticleClass where RootID=" & rsRoot(2) & " ")
do while not trs.eof
arrClassID=arrClassID & "," & trs(0)
trs.movenext
loop
end if
sql="select top "& num &" A.ArticleID,A.ClassID,L.LayoutID,L.LayoutFileName,A.Title,A.Key,A.Author,A.CopyFrom,A.UpdateTime,A.Editor,A.TitleFontColor,A.TitleFontType,"
sql=sql & "A.Hits,A.OnTop,A.Hot,A.Elite,A.Passed,A.IncludePic,A.Stars,A.PaginationType,A.ReadLevel,A.ReadPoint,A.DefaultPicUrl from Article A"
sql=sql & " inner join Layout L on A.LayoutID=L.LayoutID where A.Deleted=False and A.Passed=True and A.ClassID in (" & arrClassID & ") order by A.ArticleID desc"
set rsArticle=nt2003.execute(sql)
if rsArticle.bof and rsArticle.eof then
response.write "· 没有任何文章"
else
response.write ArticleContent(30,True,False,False,0,false,false,true)
end if
rsArticle.close
set rsArticle=nothing
rsRoot.movenext
loop
end if
rsRoot.close
end function
Function FlashNews(num,fontnum,PicWidthStr,PicHeightStr,BGcolor,txtheight)
Dim RsFilterObj,FlashStr,ImagesStr,TxtStr,LinkStr,FilterSql,ProductName,SmallPicPath,gotTopic
FilterSql = "select top "&num&" * from Article where ClassID=7 and Passed=true and Deleted=false order by ArticleID desc"
Set RsFilterObj = Conn.Execute(FilterSql)
If not RsFilterObj.Eof then
Dim Temp_Num
Temp_Num = 0
Do While Not RsFilterObj.Eof
Temp_Num = Temp_Num + 1
RsFilterObj.MoveNext
Loop
RsFilterObj.MoveFirst
If Temp_Num <=1 then
Set RsFilterObj = Nothing
FlashNews = "至少需要两条幻灯新闻才能正确显示幻灯效果"
Set RsFilterObj = Nothing
Exit Function
End If
do while Not RsFilterObj.Eof
if ImagesStr = "" then
ImagesStr = RsFilterObj("DefaultPicUrl")
TxtStr = left(RsFilterObj("Title"),fontnum)
LinkStr = "Article_Show.asp?ArticleID="& RsFilterObj("ArticleID")
else
ImagesStr = ImagesStr &"|"& RsFilterObj("DefaultPicUrl")
TxtStr = TxtStr & "|" & left(RsFilterObj("Title"),fontnum)
LinkStr = LinkStr & "|" & "Article_Show.asp?ArticleID="& RsFilterObj("ArticleID")
end if
RsFilterObj.MoveNext
loop
FlashStr=""
else
FlashStr="没有幻灯图片"
end if
RsFilterObj.Close
Set RsFilterObj = Nothing
FlashNews= FlashStr
End Function
dim sqlADX,rsADX,ADX,arrSettingX,popleftX,poptopX,floatleftX,floattopX,fixedleftX,fixedtopX
sqlADX="select * from Advertisement where IsSelected=True and ADType=4 order by ID Desc"
Set rsADX= Server.CreateObject("ADODB.Recordset")
rsADX.open sqlADX,conn,1,1
if not rsAdX.bof and not rsADX.eof then
if rsADX("isflash")=true then
ADX= ""
else
ADX ="0 then ADX = ADX & " width='" & rsADX("ImgWidth") & "'"
if rsADX("ImgHeight")>0 then ADX = ADX & " height='" & rsADX("ImgHeight") & "'"
ADX = ADX & " border='0'>"
end if
%>