<%
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 SoftClass C inner join Layout L on C.LayoutID=L.LayoutID where C.ParentID=0 and C.IsElite=True and C.LinkUrl='' and C.BrowsePurview>=" & UserLevel & " order by C.RootID"
Set rsRoot= Server.CreateObject("ADODB.Recordset")
rsRoot.open sqlRoot,conn,1,1
dim sqlClassAD,rsClassAD,ClassAD
sqlClassAD="select * from Advertisement where IsSelected=True"
sqlClassAD=sqlClassAD & " and (ChannelID=0 or ChannelID=" & ChannelID & ")"
sqlClassAD=sqlClassAD & " and ADType=2 order by ID Desc"
set rsClassAD=server.createobject("adodb.recordset")
rsClassAD.open sqlClassAD,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)
response.write "最新" & rsRoot(1) & ""
if rsRoot(5)>0 then
set trs=conn.execute("select ClassID from SoftClass where RootID=" & rsRoot(2) & " and Child=0 and LinkUrl='' and BrowsePurview>=" & UserLevel)
do while not trs.eof
arrClassID=arrClassID & "," & trs(0)
trs.movenext
loop
end if
%>
↓
<%
sqlSoft="select top 8 S.SoftID,S.ClassID,C.ClassName,L.LayoutFileName,S.SoftName,S.SoftVersion,S.Author,S.AuthorEmail,S.Keyword,S.UpdateTime,S.Editor,S.Hits,S.DayHits,S.WeekHits,S.MonthHits,S.SoftSize,S.OnTop,S.Elite,S.Passed,S.Stars,S.SoftLevel,S.SoftPoint from Soft S"
sqlSoft=sqlSoft & " inner join (SoftClass C inner join Layout L on C.LayoutID=L.LayoutID) on S.ClassID=C.ClassID where S.Deleted=False and S.Passed=True "
if instr(arrClassID,",")>0 then
sqlSoft=sqlSoft & " and S.ClassID in (" & arrClassID & ")"
else
sqlSoft=sqlSoft & " and S.ClassID=" & Clng(arrClassID)
end if
sqlSoft=sqlSoft & " order by S.OnTop,S.SoftID desc"
Set rsSoft= Server.CreateObject("ADODB.Recordset")
rsSoft.open sqlSoft,conn,1,1
if rsSoft.bof and rsSoft.eof then
response.Write("
没有任何软件
")
else
call SoftContent(36,False,True,False,0,False,True)
end if
rsSoft.close
%>
<%
iClassID=iClassID+1
if iClassID mod 2=0 then
response.write "