con_eat.asp

来自「是个不错的文件代码,希望大家好好用,」· ASP 代码 · 共 181 行

ASP
181
字号
<!-- #include file="skin.asp" -->
<!-- #include file="jk_nsort.asp" -->
<!-- #include file="../style/data_sort_eat.asp" -->

<%
dim tmp_img_h
cid=0
sid=0
n_sort="eat"
index_url="eat"
tit_fir=format_menu(index_url)
m_channel=index_url
web_img_m="m_"&m_channel
web_img_h="h_"&m_channel
tmp_img_h=web_img_h

sub eat_load(t1,t2,t3)

end sub

sub eat_end()
  if isarray(sort_dim) then erase sort_dim
end sub

sub eat_search(t_title)
  response.write eat_bar_top(t_title,0,1,"") & _
		 vbcrlf&eat_search_list("美食") & _
		 vbcrlf&eat_bar_end("",0)
end sub

sub eat_label(t_title)
  response.write vbcrlf&eat_bar_top(t_title,0,2,"") & _
		 vbcrlf&eat_label_list() & _
		 vbcrlf&eat_bar_end("",0)
end sub

sub eat_sort(t_url,t1,t2,t_title)
  response.write vbcrlf&eat_bar_top(t_title,0,1,"") & _
		 vbcrlf&sort_type(t_url,t1,t2) & _
		 vbcrlf&eat_bar_end("",0)
end sub

sub eat_left(nt,n_num,c_num,n_title)
  dim n_username,n_topic,n_tim
  response.write vbcrlf&eat_bar_top(n_title,1,2,"")
  sql="select top "&n_num&" id,username,topic,tim,counter,ispic from eat where hidden=1"
  select case nt
  case "hot"
    sql=sql&" order by counter desc,id desc"
  case "good"
    sql=sql&" and istop=1 order by id desc"
  case else
    sql=sql&" order by id desc"
  end select
  set rs=joekoe_cms.exec(sql,1)
  do while not rs.eof
    n_username=rs("username")
    n_topic=rs("topic")
    n_tim=rs("tim")
    n_tim=joekoe_cms.time_type(n_tim,1)
    response.write vbcrlf&eat_topic_type(c_num,rs("id"),n_username,n_topic,n_tim,rs("counter"),rs("ispic"),0)
    rs.movenext
  loop
  rs.close
  response.write vbcrlf&eat_bar_end("",1)
end sub

function eat_bar_top(tvar,tt,ttype,tmore)
  dim w_wid,more_var,temp1
  w_wid="23%"
  if len(tvar)>10 then w_wid="45%"
  if len(tvar)>25 then w_wid="70%"
  if int(ttype)=2 then w_wid="45%"
  more_var="<img src='"&joekoe_cms.web_dir_skin&"main/"&m_channel&"_more_0"&ttype&".gif' border=0>"
  if tmore<>"" or var_null(tmore)<>"" then
    more_var="<a href='"&tmore&"'><img src='"&joekoe_cms.web_dir_skin&"main/"&m_channel&"_more_1"&ttype&".gif' border=0 alt='点击浏览更多……'></a>"
  end if
  web_img_h=tmp_img_h&ttype
  temp1=vbcrlf&"<table border=0 cellspacing=0 cellpadding=0 class=tablew>" & _
        vbcrlf&"<tr><td align=center>"
  if tt=1 then temp1=temp1&vbcrlf&"  <table border=0 width='100%'>"
  eat_bar_top=temp1
end function

function eat_bar_end(mvar,tt)
  dim temp1
  if tt=1 then temp1=temp1&vbcrlf&"  </table>"
  temp1=temp1&vbcrlf&"</td></tr>" & _
              vbcrlf&"</table>"
  eat_bar_end=temp1&ukong
end function

function eat_topic_type(b_c_num,b_id,b_username,b_topic,b_tim,b_counter,b_ispic,b_tim_type)
  dim n_url,n_jt
  n_url="eat_view.asp?id="&b_id
  n_jt=img_skin(web_img_h)
  eat_topic_type=format_topic_type(n_jt,b_username,b_topic,b_c_num,n_url,b_tim,b_counter,b_ispic,"美食标题","浏览人次",b_tim_type)
end function

function eat_label_list()
  dim temp1
  temp1=temp1&"<table border=0 cellspacing=0 cellpadding=4>" & _
       vbcrlf&"<tr><td>&nbsp;"&img_skin("label_"&m_channel)&"&nbsp;<a href='eat_list.asp?action=pic'"
  if action="pic" then temp1=temp1&" class=red"
  temp1=temp1&">美食街图片</a></td></tr>" & _
       vbcrlf&"<tr><td>&nbsp;"&img_skin("label_"&m_channel)&"&nbsp;<a href='eat_list.asp?action=good'"
  if action="good" then temp1=temp1&" class=red"
  temp1=temp1&">推荐美食街</a></td></tr>" & _
       vbcrlf&"<tr><td>&nbsp;"&img_skin("label_"&m_channel)&"&nbsp;<a href='eat_list.asp?action=hot'"
  if action="hot" then temp1=temp1&" class=red"
  temp1=temp1&">美食街排行</a></td></tr>" & _
       vbcrlf&"</table>"
  eat_label_list=temp1
end function

function eat_list_pagecute(p_nummer,p_rssum,p_viewpage,p_thepages,p_pageurl)
  dim temp1
  temp1=temp1&vbcrlf&"<table border=0 width='98%' cellspacing=0 cellpadding=2>" & _
             vbcrlf&"<tr>" & _
             vbcrlf&"<td height=25>" & _
             vbcrlf&"&nbsp;本栏共有 <font class=red>"&p_rssum&"</font> 条美食" & _
             vbcrlf&"页次:<font class=red>"&p_viewpage&"</font>/<font class=red>"&p_thepages&"</font>&nbsp;" & _
             vbcrlf&"&nbsp;分页:"&jk_pagecute(p_nummer,p_thepages,p_viewpage,p_pageurl,5,"#ff0000") & _
             vbcrlf&"</td>" & _
             vbcrlf&"</table>"&ukong
  eat_list_pagecute=temp1
end function

function eat_search_list(stit)
  dim keyvar,temp1
  keyvar="请输入关键字"
  temp1=temp1&vbcrlf&"<table border=0>" & _
              vbcrlf&"<form name=eat_sea_frm action='eat_list.asp' method=get onsubmit=""javascript:frm_submitonce(this);"">" & _
              vbcrlf&"<input type=hidden name=action value='search'>" & _
              vbcrlf&"<tr height=10>" & _
              vbcrlf&"<td>"&select_type(stit,0,0)&"</td></tr><tr>" & _
              vbcrlf&"<td><select name=sea_type sizs=1><option value='topic'>"&stit&"标题</option><option value='username'>发布人</option></seelct></td></tr><tr>" & _

              vbcrlf&"<td><select name=sea_term sizs=1><option value='all'>满足所有条件</option><option value='only'>满足一个条件</option></seelct></td></tr><tr>" & _

              vbcrlf&"<td><input type=text name=keyword value='"&keyvar&"' onfocus=""if (value =='请输入关键字'){value =''}"" onblur=""if (value ==''){value='请输入关键字'}"" size=15 maxlength=20 title='多个关键字请用 空格 格开'></td></tr><tr>" & _

              vbcrlf&"  <td> &nbsp;&nbsp;&nbsp;&nbsp;<input type=submit value='开始搜索' onclick=""javascript:return eat_sea('"&stit&"');""></td>" & _
              vbcrlf&"</tr></form></table>" & _
              vbcrlf&"<script language=javascript>" & _
              vbcrlf&"function eat_sea(stit)" & _
              vbcrlf&"{" & _
              vbcrlf&"  if (document.eat_sea_frm.keyword.value==""请输入关键字"")" & _
              vbcrlf&"  {" & _
              vbcrlf&"    alert('请在搜索"&stit&"前先输入要查询的 关键字 !');" & _
              vbcrlf&"    document.eat_sea_frm.keyword.focus();" & _
              vbcrlf&"    return false;" & _
              vbcrlf&"  }" & _
              vbcrlf&"}" & _
              vbcrlf&"</script>"
  eat_search_list=temp1
end function

function eat_view1(v_id,v_topic,v_tim,v_comto,v_lxfs,v_lxr,v_pic,v_ispic)
  dim n_pic,temp1
  if v_ispic=true and v_pic<>"" and var_null(v_pic)<>"" then n_pic="<tr><td align=center><a href='"&pic_url(v_pic,0)&"'  target=_blank><img src='"&pic_url(v_pic,0)&"' width=180 height=135 border=0 onload=""javascript:if(this.width>"&max_w&")this.width="&max_w&";""></a></td></tr>"
  temp1=temp1&vbcrlf&"<table border=0 width='520' cellspacing=0 cellpadding=0 align=center>" & _
              vbcrlf&"<tr><td align=center height=50><font class=red_3 size=3><b>"&v_topic&"</b></font></td></tr>" & _
              vbcrlf&"<tr><td valign=top>" & _
              vbcrlf&"<table border=1 width='100%' class=tf style=BORDER: 1px;><tr><td class=bw>"
if n_pic="" then
temp1=temp1&vbcrlf&"<table align=left float=left border=1 style=BORDER: 1px;><tr><td><img src=/upload/no_pic.gif border=0 width=180 height=135></td></tr></table>"
else
end if
temp1=temp1&vbcrlf&"<table align=left float=left border=1 style=BORDER: 1px;><tr><td>"&n_pic&"</td></tr></table><table cellspacing=0 cellpadding=0><tr><td><table width=100% border=1 bordercolordark=#FFFFFF height=145 style=BORDER: 1px; cellspacing=0 cellpadding=0><tr><td width=80 align=center>名 &nbsp;&nbsp;&nbsp;&nbsp; 称:</td><td width=250>&nbsp;&nbsp;"&v_topic&"</td></tr><tr><td align=center>地 &nbsp;&nbsp;&nbsp;&nbsp; 址:</td><td>&nbsp;&nbsp;"&v_comto&"</td></tr><tr><td align=center>联系方式:</td><td>&nbsp;&nbsp;"&v_lxfs&"</td></tr><tr><td align=center>联 系 人:</td><td>&nbsp;&nbsp;"&v_lxr&"</td></tr><tr><td align=center>发布时间:</td><td>&nbsp;&nbsp;"&v_tim&"</td></tr></table></td></tr></table></td></tr></table><b>简 介:</b>"
  eat_view1=temp1
end function

function eat_view2(v_id,v_topic,v_counter,v_username,v_id1,v_topic1,v_id2,v_topic2)
  dim temp1
  temp1=temp1&vbcrlf&"" & _
              vbcrlf&"  <table border=0 width='100%'><tr><td><font class=gray>(本文已被浏览&nbsp;"&v_counter&"&nbsp;次)</font></td><td width='25%' class=htd>&nbsp;发布人:"&format_user_name(v_username,0,"")&"</td><td>"&commend_friend(tit,v_topic,"eat_view.asp?id="&v_id)&"</td></tr></table>" & _
              vbcrlf&"</td></tr></table>"
  eat_view2=temp1&ukong
end function
%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?