asp程序修 改 把此图片程序修改成二行,一行显示六个。

asp程序修改把此图片程序显示二行,一行显示六个。多谢<%dimpath,classID,NclassID,NclassID1,showNclass,kind,dateN... asp程序修 改 把此图片程序显示二行,一行显示六个。多谢
<%

dim path,classID,NclassID,NclassID1,showNclass,kind,dateNum,maxLen,listNum,bullet
dim hitColor,new_color,old_color

topType = Request("topType")

If Request("ClassNo") <> "" then
ClassNo = split(Request("ClassNo"),"|") '栏目编号
on error resume next
NClassID = ClassNo(0)
NClassID1 = ClassNo(1)
End if

num = request.querystring("num") '标题数目
maxlen = Request.querystring("maxlen") '标题字符数
showdate = Request("showdate") '日期
showhits = Request("showhits") '浏览量
showClass = Request("showClass") '标题所在栏目

bullet="" '标题前的图片或符号
hitColor="#FF0000" '点击数的颜色
new_color="#FF0000" '新文章日期的颜色
old_color="#999999" '旧文章日期的颜色

dim rs,sql,str,topic
Path="http://"&request.servervariables("server_name")&replace(request.servervariables("script_name"),"js_pic.asp","")

set rs=server.createObject("Adodb.recordset")
sql = "Select top "& num &" ID,Title,Images,TitleFontColor,Author,ClassID,DateAndTime,Hits,IsTop,IsHot from Yao_Article Where yn = 0"

If NclassID<>"" and NclassID1="" then
If Yao_MyID(NclassID)="0" then
SQL=SQL&" and ClassID="&NclassID&""
else
MyID = Replace(""&Yao_MyID(NclassID)&"","|",",")
SQL=SQL&" and ClassID in ("&MyID&")"
End if
elseif NclassID<>"" and NclassID1<>"" then
MyID = Replace(""&Request("ClassNo")&"","|",",")
SQL=SQL&" and ClassID in ("&MyID&")"
End if

select case topType
case "new" sql=sql&" and Images <>''order by DateAndTime desc,ID desc"
case "hot" sql=sql&" order by hits desc,ID desc"
case "IsHot" sql=sql&" and IsHot = 1 order by ID desc"
end select

set rs = conn.execute(sql)
if rs.bof and rs.eof then
str=str+"没有符合条件的文章"
else

rs.movefirst
do while not rs.eof
topic=Left(LoseHtml(rs("title")),maxlen)
topic=replace(server.HTMLencode(topic)," "," ")
topic=replace(topic,"'"," ")
str=str+bullet
if showClass = 1 then
str=str+"[<a href='"&path&"Class.asp?ID="&rs("ClassID")&"' target='_blank'>"&Classlist(rs("ClassID"))&"</a>] "
end if
str=str+"<a href='"&Path&""
If Html=1 then
str=str+"list.asp?ID="+Cstr(rs("ID"))+""
else
str=str+"Html/?"+Cstr(rs("ID"))+".html"
End if
str=str+"' target='_blank' > <img src='UploadFiles/"&rs("Images")&"' width=50 height=50 border=0/></a>"
if showdate <> 0 then
str=str & " <font color="
if rs("DateAndTime")>=date then
str=str & new_color
else
str=str & old_color
end if
str=str &">" & FormatDate(rs("DateAndTime"),""&showdate&"")&"</font> "
end if
if showhits = 1 then
str=str&"浏览:<font color="& hitcolor &">"& rs("hits") &"</font>"
end if
str=str & "<br />"
rs.moveNext
loop
end if
rs.close : conn.close
set rs=nothing : set conn=nothing

response.write "document.write ("&Chr(34)&str&Chr(34)&");"
%>
展开
 我来答
dcf_81259713
2009-04-11 · TA获得超过417个赞
知道小有建树答主
回答量:1618
采纳率:0%
帮助的人:410万
展开全部
loop
end if
rs.close : conn.close
set rs=nothing : set conn=nothing

response.write "document.write ("&Chr(34)&str&Chr(34)&");"
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式