首页调用,分列改成不分列。
本人才学ASP,从网上下了一个源代码学习,这个代码里是分列有图片的,我想把它改成不分列,即只有一列下来,还有,把其中的图片改大一些,请教各位大侠怎么改啊
sub jsbigclass3
javastr="document.write('"
if RSCount>0 then
dim model,picid
tr=0
javastr=javastr+"<table cellspacing=0 cellpadding=0 width=100% border=0 align=center>"
for i=1 to RSCount
BigClassName=ArrayBigClassName(i)
if ArrayBigClassType(i)=1 and ArrayBigClassView(i)=1 then
tr=tr+1
sql="select newsid from News where BigClassName='" & BigClassName &"' and checked=1"
rs.open sql,conn,1,1
totalNews=rs.recordcount
rs.close
sql="select top 1 newsid,model from News where BigClassName='" & BigClassName &"' and checked=1 and image>0 order by updatetime desc"
rs.open sql,conn,1,1
if not rs.eof then
model=rs("model")
picid=rs("newsid")
else
picid=""
end if
rs.close
sql="select newsid from News where BigClassName='" & BigClassName &"' and OnTop=1 and checked=1"
rs.open sql,conn,1,1
totalontop=rs.recordcount
rs.close
classurl="BigClass.asp?BName="&BigClassName&"&Template="&ArrayBigTemplate(i)
if tr mod 2=1 then javastr=javastr+"<tr>"
javastr=javastr+"<td width=50% align=right valign=top>"
javastr=javastr+"<table cellspacing=0 cellpadding=0 border=0 align=center width=95% style=""BORDER-LEFT: "¢erTColor&" 1px double; BORDER-RIGHT: "¢erTColor&" 1px double;BORDER-BOTTOM: "¢erTColor&" 1px double;"" bgcolor="¢erccolor&" background="""¢erCImg&""">"
javastr=javastr+TTitle("center_2",BigClassName)
javastr=javastr+"');"&vbcrlf
javastr=javastr+"document.write('"
javastr=javastr+"<tr><td align=middle valign=top height=100><table width=100% border=0 align=right cellpadding=0 cellspacing=4><tr>"
if showClassImg=1 and picid<>"" then
javastr=javastr+"<td align=middle valign=top height=100 width=18% >"
javastr=javastr+imagefile(picID,1,40,50)
javastr=javastr+"</td>"
end if
javastr=javastr+"<td valign=top style=""WORD-WRAP: break-word"" class=MainContentS>"
msql=NoContent&" from News where BigClassName='" & BigClassName &"' and checked=1 "
if totalontop=0 then
Thissql="select top " & MaxNewsList & msql & " order by updatetime DESC"
showontop=""
javastr=javastr+ClassTitle3(Thissql,picID)
end if
if totalontop>=MaxNewsList then
Thissql="select top " & MaxNewsList & msql & " and OnTop=1 order by updatetime DESC"
showontop="¡ü"
javastr=javastr+ClassTitle3(Thissql,picID)
end if
if totalontop>0 and totalontop<MaxNewsList then
Thissql="select top " & totalontop & msql & " and OnTop=1 order by updatetime DESC"
showontop="¡ü"
javastr=javastr+ClassTitle3(Thissql,picID)
Thissql="select top " & MaxNewsList-totalontop & msql & " and OnTop=0 order by updatetime DESC"
showontop=""
javastr=javastr+ClassTitle3(Thissql,picID)
end if
javastr=javastr+"</td></tr></table></td></tr></table>"
javastr=javastr+"<br></td>"
if tr mod 2=0 then
javastr=javastr+"</tr>"
else
if i=RSCount then javastr=javastr+"</tr>"
end if
javastr=javastr+"');"&vbcrlf
'////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if tr=2 then javastr=javastr+"document.write('<tr><td colspan=2 valign=middle align=center>"&jsad("Ê×Ò³´óÀàÒ»ÅÅÏÂ")&"</td></tr>');"&vbcrlf
if tr=4 then javastr=javastr+"document.write('<tr><td colspan=2 valign=middle align=center>"&jsad("Ê×Ò³´óÀà¶þÅÅÏÂ")&"</td></tr>');"&vbcrlf
if tr=6 then javastr=javastr+"document.write('<tr><td colspan=2 valign=middle align=center>"&jsad("Ê×Ò³´óÀàÈýÅÅÏÂ")&"</td></tr>');"&vbcrlf
if tr=8 then javastr=javastr+"document.write('<tr><td colspan=2 valign=middle align=center>"&jsad("Ê×Ò³´óÀàËÄÅÅÏÂ")&"</td></tr>');"&vbcrlf
'////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
javastr=javastr+"document.write('"
end if
next
javastr=javastr+"</table>"
else
javastr=javastr+"<center><b>ÉС¡ÎÞ¡¡´ó¡¡Àà</b></center>"
end if
javastr=javastr+"');"&vbcrlf
dim fs
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.CreateTextFile(Server.MapPath("../js")&"/"&"bigclass3.js", True)
f.write(javastr)
f.close
Set f = nothing
Set fs = nothing
Response.Write "<li>Ê×Ò³´óÀà(·ÖÁÐÓÐͼƬ)ÒÑÉú³É!µ÷Ó÷½·¨£º<br> <script language=""javascript"" src=""JS/bigclass3.js""></script><br>"
End sub
'===========================================================================================================
Function ClassTitle0(strsql)
rs.open strsql,conn,1,1
ClassTitle0=""
while not rs.EOF
n=n+1
ClassTitle0=ClassTitle0+"<tr><td style=""WORD-WRAP: break-word"">"
ClassTitle0=ClassTitle0+shownewf
ClassTitle0=ClassTitle0+showTitle("MainContentB",40)&showImg&showTime(rs("updatetime"),"md")
ClassTitle0=ClassTitle0+showclick & showOntop
'ClassTitle0=ClassTitle0+shownew
ClassTitle0=ClassTitle0+"</td></tr>"
ClassTitle0=ClassTitle0+"';"&vbcrlf
ClassTitle0=ClassTitle0+"html+='"
rs.MoveNext
wend
rs.close
end Function
Function ClassTitle1(strsql)
rs.open strsql,conn,1,1
ClassTitle1=""
while not rs.EOF
n=n+1
if n mod 2=1 then javastr=javastr+"<tr>"
ClassTitle1=ClassTitle1+"<td style=""WORD-WRAP: break-word"">"
ClassTitle1=ClassTitle1+shownewf
ClassTitle1=ClassTitle1+showTitle("MainContentS",20)&showImg
ClassTitle1=ClassTitle1+showclick & showOntop
'ClassTitle1=ClassTitle1+shownew
ClassTitle1=ClassTitle1+"</td>"
if n mod 2=0 then ClassTitle1=ClassTitle1+"</tr>"
ClassTitle1=ClassTitle1+"';"&vbcrlf
ClassTitle1=ClassTitle1+"html+='"
rs.MoveNext
wend
rs.close
end Function
Function ClassTitle2(strsql)
rs.open strsql,conn,1,1
ClassTitle2=""
while not rs.EOF
ClassTitle2=ClassTitle2+Shownewf
ClassTitle2=ClassTitle2+ShowTitle("MainContentS",28)
'ClassTitle2=ClassTitle2+ShowImg
'ClassTitle2=ClassTitle2+showTime(rs("updatetime"),"md")
'ClassTitle2=ClassTitle2+showclick & showOntop
ClassTitle2=ClassTitle2+"<br>"
ClassTitle2=ClassTitle2+"';"&vbcrlf
ClassTitle2=ClassTitle2+"html+='"
rs.MoveNext
wend
rs.close
end Function
Function ClassTitle3(strsql,strpicid)
dim maxlen
rs.open strsql,conn,1,1
ClassTitle3=""
while not rs.EOF
maxlen=34
if showClassImg=1 and strpicid<>"" then maxlen=28
if showOntop<>"" then maxlen=maxlen-2
if rs("image")>0 then maxlen=maxlen-4
if showClassImg=0 or strpicid="" then ClassTitle3=ClassTitle3+" "
ClassTitle3=ClassTitle3+Shownewf
ClassTitle3=ClassTitle3+ShowTitle("MainContentS",maxlen)
ClassTitle3=ClassTitle3+ShowImg
'ClassTitle3=ClassTitle3+showTime(rs("updatetime"),"md")
ClassTitle3=ClassTitle3+Showclick
ClassTitle3=ClassTitle3+showOntop
ClassTitle3=ClassTitle3+"<br>"
ClassTitle3=ClassTitle3+"');"&vbcrlf
ClassTitle3=ClassTitle3+"document.write('"
rs.MoveNext
wend
rs.close
end Function