(来自:http://www.gois.cn/blog/article.asp?id=96
客户有需要就写了个函数,可能写得比较一般,欢迎大家使用!请根据自己要求适当修改sql语句
解释一下函数:因为需要在多个地方显示.所以,我自定义了
showpage:0代表首页,1代表其他位置.
classdeep:有8个级别,1代表大类,2代表二类,以此类推
classid:类所在表的ID
转:flash滚动图片+结合数据库显示函数 程序代码

'=============================
'ShowPage 显示的页面
'ClassDeep 分类深度
'ClassId 分类ID
'AdWidth 广告宽度
'AdHeight 广告高度
'本程序由SOSOS's BLOG原创 http://www.gois.cn/blog
'=============================.
function ShowAd(ShowPage,ClassDeep,ClassId,AdWidth,AdHeight)
set rs=server.createobject("adodb.recordset")
sql="select * from shop_ad where s_page=" & ShowPage & " and classdeep=" & ClassDeep & " and class />');        document.write('</object>');
    
    //-->
    </script>
    <!--焦点图结束-->
<!-- flashpic end --> 
<%
end if
rs.close
rss.close
rsss.close
end function


调用例子:
转:flash滚动图片+结合数据库显示函数 程序代码
ShowAd 0,1,2,768,80
</textarea></div></div><script language="javascript" type="text/javascript">initUBB("Message")</script></td>
             </tr>
                                 <tr>
               <td align="right" valign="top"> </td>
                <td colspan="2" align="left"><label for="label4">
               <label for="label4"><input >
转:flash滚动图片+结合数据库显示函数 程序代码

'=============================
'ShowPage 显示的页面
'ClassDeep 分类深度
'ClassId 分类ID
'AdWidth 广告宽度
'AdHeight 广告高度
'=============================.
function ShowAd(ShowPage,ClassDeep,ClassId,AdWidth,AdHeight)
set rs=server.createobject("adodb.recordset")
sql="select * from shop_ad where s_page=" & ShowPage & " and classdeep=" & ClassDeep & " and class:rsss.movenext:loop%>|'
  &...

相关文章:

  • 2022-01-30
  • 2022-12-23
  • 2021-12-12
  • 2022-12-23
  • 2022-02-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-05-19
  • 2021-12-27
  • 2021-07-03
  • 2021-12-09
  • 2021-10-07
  • 2021-08-09
相关资源
相似解决方案