随缘版的图文调用


sub main_center_list_pic(cl_type,cl_tnum,cl_cnum,cl_classid)
  dim tmp1,tmp2,tmp_title,tmp_tit,tmp_count,tmp_img,tmp_record,tmp_tab,tmp_table,tmp_whe,tmp_where,tmp_url,tmp_topic,tmp_name
  dim i:i=0
  tmp_img=cl_type
  tmp_where="hidden=1 "
  if cl_classid>0 then tmp_where=tmp_where&" and s_id="&cl_classid
  select case cl_type
  case "shop"
    tmp_title="shop"
    tmp_tit="商品名称"
    tmp_name="发 布 人"
    tmp_count="定购次数"
    tmp_table="shop_product"    
    tmp_record="id,name,brand,tim,counter,smallimg"
    tmp_whe=" and isgood=1"

  case "down"
    tmp_title="down"
    tmp_tit="软件名称"
    tmp_name="发 布 人"
    tmp_count="下载次数"
    tmp_table="down"
    tmp_record="id,name,username,tim,counter,pic"
    tmp_whe=" and types=5"
  case "news"
    tmp_title="news"
    tmp_tit="新闻标题"
    tmp_name="发 布 人"
    tmp_count="浏览次数"
    tmp_table="news"
    tmp_record="id,topic,username,tim,counter,pic"
    tmp_img="article"
    tmp_whe=" and ispic=1"
  case "flea"
    tmp_title="flea"
    tmp_tit="市场信息"
    tmp_name="发 布 人"
    tmp_count="浏览次数"
    tmp_table="flea"    
    tmp_record="id,name,username,tim,counter,pic"
    tmp_whe=" and isgood=1"
  case "video"
    tmp_title="video"
    tmp_tit="影视名称"
    tmp_name="影片主演"
    tmp_count="浏览次数"
    tmp_table="video"
    tmp_record="id,name,role,tim,counter,pic"
    tmp_img="video"
    tmp_whe=" and star=5"
  case else
    cl_type="music_disk"
    tmp_title="music_disk"
    tmp_tit="专辑名称"
    tmp_name="专辑歌手"
    tmp_count="浏览次数"
    tmp_table="music_disk"
    tmp_record="id,name,singer,tim,hits,pic"
    tmp_img="music_disk"
    tmp_whe=" and istop=1"
  end select
    sql="select top 1 "&tmp_record&" from "&tmp_table&" where "&tmp_where&tmp_whe&" order by id desc"
    set rs=joekoe_cms.exec(sql,1)
    if not rs.eof then
    tmp1=tmp1&vbcrlf&"<tr align=center>" & _
           vbcrlf&"<td width='35%'>"&pic_fk(rs(5),4,""&cl_type&"_view.asp?id="&rs(0))&"</td>" & _
           vbcrlf&"<td width='65%'>" & _
           vbcrlf&"<table border=0 width='100%' class=tf>" & _
           vbcrlf&"<tr><td><b><a href='"&cl_type&"_view.asp?id="&rs(0)&"' alt='"&rs(1)&"'>"&joekoe_cms.code_html(rs(1),1,cl_cnum)&"</a></b></td></tr>" & _
           vbcrlf&"<tr><td>发布时间:"&joekoe_cms.time_type(rs(3),4)&"</td></tr>" & _
           vbcrlf&"<tr><td>"&tmp_name&":<font class=red2 alt='"&joekoe_cms.code_html(rs(2),1,0)&"'>"&joekoe_cms.code_html(rs(2),1,cl_cnum)&"</font></td></tr>" & _
           vbcrlf&"</table>" & _
           vbcrlf&"</td>" & _
           vbcrlf&"</tr>"
   end if
  rs.close
  tmp1="<table border=0 cellspacing=0 cellpadding=2 width='100%'>"&tmp1&"</table>"
  sql="select top "&cl_tnum&" "&tmp_record&" from "&tmp_table&" where "&tmp_where&" order by id desc"
  set rs=joekoe_cms.exec(sql,1)
  do while not rs.eof
    tmp_url=cl_type&"_view.asp?id="&rs(0)
    if i mod 2=0 then tmp2=tmp2&vbcrlf&"<tr>"
    tmp2=tmp2&vbcrlf&"<td height="&dim_num(6)&">"&img_skin("h_"&tmp_img)&"<a href='"&tmp_url&"' alt='"&tmp_tit&":"&joekoe_cms.code_html(rs(1),1,0)&"<br>"&tmp_name&":"&rs(2)&"<br>"&tmp_count&":"&rs(4)&" 人次<br>整理时间:"&rs(3)&"' target=_blank>"&joekoe_cms.code_html(rs(1),1,cl_cnum)&"</a></td>"
    if i+1 mod 2=0 then tmp2=tmp2&vbcrlf&"</tr>"
    if i=1 then tmp2=tmp2&vbcrlf&"<tr><td height=1></td></tr>"
    rs.movenext
    i=i+1
  loop
  rs.close
  tmp2="<table border=0 cellspacing=0 cellpadding=2 width='100%'><tr height=3><td width='50%'></td><td width='50%'></td></tr>"&tmp2&"</table>"
  response.write vbcrlf&"<table border=0 cellspacing=0 cellpadding=0 width='100%'><tr>" & _
                 vbcrlf&"<td height=45 background='images/index/"&tmp_title&".gif'></td>" & _
                 vbcrlf&"</tr></table>" & _
                 vbcrlf&"<table border=0 cellspacing=0 cellpadding=0 width='100%'><tr><td height=5></td></tr><tr align=center><td>"&tmp1&"</td></tr>" & _
                 vbcrlf&"<tr align=center><td>"&tmp2&"</td></tr>" & _
                 vbcrlf&"</table>"&ukong
end sub

文章来自: Original
引用通告: 查看所有引用 | 我要引用此文章
Tags:
相关日志:
评论: 8 | 引用: 0 | 查看次数: 767
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.
字数限制 20 字 | UBB代码 关闭 | [img]标签 关闭