一个小问题请大家帮忙看一下,谢谢!

sundayyoung 2007-12-01 02:19:01
我的网站为什么友情连接不能显示?
代码如下:
<TD width="12%">
<DIV align=center>友情链接:</DIV></TD>

<TD width="88%">
<% call ShowFriendLinks(2,10,10,2) '文字链接
'call ShowFriendLinks(1,10,10,2) '图片链接
%>
</TD>



sub ShowFriendLinks(LinkType,SiteNum,Cols,ShowType)
dim sqlLink,rsLink,SiteCount,i,strLink
if LinkType<>1 and LinkType<>2 then
LinkType=1
else
LinkType=Cint(LinkType)
end if
if SiteNum<=0 or SiteNum>100 then
SiteNum=10
end if
if Cols<=0 or Cols>20 then
Cols=10
end if
if ShowType=1 then'
strLink=strLink & "<div id=rolllink style=overflow:hidden;height:100;width:100><div id=rolllink1>" '新增加的代码
elseif ShowType=3 then
strLink=strLink & "<select name='FriendSite' onchange=""if(this.options[this.selectedIndex].value!=''){window.open(this.options[this.selectedIndex].value,'_blank');}""><option value=''>友情文字链接站点</option>"
end if
if ShowType=1 or ShowType=2 then
strLink=strLink & "<table width='100%' cellSpacing='5'><tr align='center' >"
end if

sqlLink="select top " & SiteNum & " * from FriendLinks where IsOK=True and LinkType=" & LinkType & " order by IsGood,id desc"
set rsLink=server.createobject("adodb.recordset")
rsLink.open sqlLink,conn,1,1
if rsLink.bof and rsLink.eof then
if ShowType=1 or ShowType=2 then
for i=1 to SiteNum
strLink=strLink & "<td>"
strLink=strLink & "</td>"
if i mod Cols=0 and i<SiteNum then
strLink=strLink & "</tr><tr align='center' >"
end if
next
end if
else
SiteCount=rsLink.recordcount
for i=1 to SiteCount
if ShowType=1 or ShowType=2 then
if LinkType=1 then
strLink=strLink & "<td width='88'><a href='" & rsLink("SiteUrl") & "' target='_blank' title='网站名称:" & rsLink("SiteName") & vbcrlf & "网站地址:" & rsLink("SiteUrl") & vbcrlf & "网站简介:" & rsLink("SiteIntro") & "'>"
if rsLink("LogoUrl")="" or rsLink("LogoUrl")="http://" then
strLink=strLink & "<img src='images/nologo.gif' width='100' height='49' border='0'>"
else
strLink=strLink & "<img src='" & rsLink("LogoUrl") & "' width='100' height='49' border='0'>"
end if
strLink=strLink & "</a></td>"
else
strLink=strLink & "<td width='88'><a href='" & rsLink("SiteUrl") & "' target='_blank' title='网站名称:" & rsLink("SiteName") & vbcrlf & "网站地址:" & rsLink("SiteUrl") & vbcrlf & "网站简介:" & rsLink("SiteIntro") & "'>" & rsLink("SiteName") & "</a></td>"
end if
if i mod Cols=0 and i<SiteNum then
strLink=strLink & "</tr><tr align='center' >"
end if
else
strLink=strLink & "<option value='" & rsLink("SiteUrl") & "'>" & rsLink("SiteName") & "</option>"
end if
rsLink.moveNext
next
if SiteCount<SiteNum and (ShowType=1 or ShowType=2) then
for i=SiteCount+1 to SiteNum
if LinkType=1 then
strLink=strLink & "<td width='88'></td>"
else
strLink=strLink & "<td width='88'></td>"
end if
if i mod Cols=0 and i<SiteNum then
strLink=strLink & "</tr><tr align='center' >"
end if
next
end if
end if
if ShowType=1 or ShowType=2 then
strLink=strLink & "</tr></table>"
end if
if ShowType=1 then
strLink=strLink & "</div><div id=rolllink2></div></div>" '新增代码
elseif ShowType=3 then
strLink=strLink & "</select>"
end if
response.write strLink
if ShowType=1 then call RollFriendLinks() '新增代码
rsLink.close
set rsLink=nothing
end sub
...全文
113 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
北京不不 2007-12-03
  • 打赏
  • 举报
回复
有这样提问的,服。
代码过长,很少有人去分析的
sundayyoung 2007-12-03
  • 打赏
  • 举报
回复
大家帮忙看看啊!谢谢了
yzxlyd 2007-12-01
  • 打赏
  • 举报
回复
是什么都不显示吗?
yzxlyd 2007-12-01
  • 打赏
  • 举报
回复
可不可以贴张图什么的。
sundayyoung 2007-12-01
  • 打赏
  • 举报
回复
网址:(友情连接在网站最下面)
http://www.jy-jetting.com
sundayyoung 2007-12-01
  • 打赏
  • 举报
回复
显示“友情链接: ” 后面的所有友情连接都不显示!!
toury 2007-12-01
  • 打赏
  • 举报
回复
报什么错误?错误描述是什么?出现的行数?
这些都不说......

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧