con_eat_main.asp
来自「是个不错的文件代码,希望大家好好用,」· ASP 代码 · 共 92 行
ASP
92 行
<%
sub eat_fpic(nt,t_num,n_num,c_num,n_title)
dim temp1,pid,nid,n_topic,n_username,n_tim
sql="select top 1 id,topic,pic from eat where hidden=1 and ispic=1 order by id desc"
set rs=joekoe_cms.exec(sql,1)
if not rs.eof then
n_topic=rs("topic")
temp1=format_pic_type(rs("pic"),n_topic,t_num,"eat_view.asp?id="&rs("id"))
end if
rs.close
response.write vbcrlf&eat_bar_top(n_title,1,1,"") & _
vbcrlf&"<tr>" & _
vbcrlf&"<td align=center width='30%'>"&temp1&"</td>" & _
vbcrlf&"<td width='70%'>" & _
vbcrlf&" <table border=0>"
sql="select top "&n_num&" id,username,topic,tim,counter,ispic from eat where hidden=1 and ispic=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"),1)
rs.movenext
loop
rs.close
response.write vbcrlf&" </table>" & _
vbcrlf&"</td></tr>" & _
vbcrlf&eat_bar_end("",1)
end sub
sub eat_pic(nt,n_num,c_num,n_title)
dim temp1,nid,per_num,n_topic
per_num=100\n_num
response.write vbcrlf&eat_bar_top(n_title,1,1,"") & _
vbcrlf&"<tr align=center>"
sql="select top 2 id,topic,pic from eat where hidden=1 and ispic=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_topic=rs("topic")
response.write vbcrlf&"<td width='"&per_num&"%' align=center>"&format_pic_type(rs("pic"),n_topic,c_num,"eat_view.asp?id="&rs("id"))&"</td></tr>"
rs.movenext
loop
rs.close
response.write vbcrlf&"" & _
vbcrlf&eat_bar_end("",1)
end sub
sub eat_main_list(n_num,c_num)
dim ncid,ncname,crs,csql,sqla,n_username,n_topic,n_tim
csql="select c_id,c_name from jk_class where nsort='"&n_sort&"' order by c_order"
set crs=joekoe_cms.exec(csql,1)
do while not crs.eof
ncid=crs("c_id")
ncname=crs("c_name")
sqla=" and c_id="&ncid
response.write vbcrlf&eat_bar_top(ncname,1,1,"eat_list.asp?action=more&c_id="&ncid)
sql="select top "&n_num&" id,topic,tim,username,counter,ispic from eat where hidden=1 and c_id="&ncid&" order by id desc"
set rs=conn.execute(sql)
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"),2)
rs.movenext
loop
rs.close
response.write vbcrlf&eat_bar_end("",1)
crs.movenext
loop
crs.close
set crs=nothing
end sub
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?