<!-- #include file="../../include/skin.asp" -->
<!-- #include file="../../include/jk_nsort.asp" -->
<!-- #include file="../../include/jk_page_cute.asp" -->
<!-- #include file="../../include/jk_mail.asp" -->
<%
dim pageurl,nummer,sqladd,page,rssum,thepages,viewpage,id,username,keyword,sea_type,types
nummer=5
rssum=0
n_sort="flea"
index_url="flea"
tit_fir=format_menu(index_url)
id=trim(request.querystring("id"))
cid=trim(request.querystring("c_id"))
sid=trim(request.querystring("s_id"))
if not(isnumeric(id)) then id=0
if not(isnumeric(cid)) then cid=0
if not(isnumeric(sid)) then sid=0
call cid_sid()
dim price_head,now_ymd
  price_head="#"
  now_ymd=joekoe_cms.time_type(joekoe_cms.now_time,4)
  if joekoe_cms.web_vt=1 then price_head="'"
keyword=joekoe_cms.code_form(request.querystring("keyword"))
sea_type=trim(request.querystring("sea_type"))
types=trim(request.querystring("types"))
m_channel=index_url
web_img_m="m_"&m_channel
web_img_h="h_"&m_channel

sub flea_main()
dim tmps
tmps=vbcrlf&"<table width='99%' border=0>" & _
vbcrlf&"<tr><td align=middle>" & _
vbcrlf&"<table width='99%' border=0>" & _
vbcrlf&"<tbody>" & _
vbcrlf&"<tr>" & _
vbcrlf&"<td width='15%'></td>" & _
vbcrlf&"<td width='33%'></td>" & _
vbcrlf&"<td width='1%'></td>" & _
vbcrlf&"<td width='15%'></td>" & _
vbcrlf&"<td width='33%'></td>" & _
vbcrlf&"<td width='1%'></td></tr>" 
  dim i,ii:ii=0
  sql="select * from jk_class where nsort='flea'"
  set rs=joekoe_cms.exec(sql,1)
  do while not rs.eof
tmps=tmps&"<tr>"
  for i=1 to 2
  if rs.eof then exit for
tmps=tmps&vbcrlf& "<td><a href='list.asp?c_id="&rs("c_id")&"'><img src='../images/flea/"&ii&".gif' border=0></a></td>" & _
	    vbcrlf& "<td><table width='100%' border=0><tbody><tr>" & _
	    vbcrlf& "<td>【<a href='list.asp?c_id="&rs("c_id")&"'>"&rs("c_name")&"</a>】</td></tr>" & _
	    vbcrlf& "<tr><td>"&joekoe_cms.code_html(rs("c_remark"),1,0)&"</td></tr>" & _
	    vbcrlf& "<tr><td align=right><a href='list.asp?c_id="&rs("c_id")&"'>→查看更多信息</a></td></tr></tbody></table></td>" & _
	    vbcrlf& "<td></td>"
  ii=ii+1
  rs.movenext
  next
tmps=tmps&vbcrlf& "</tr>" & _
	    vbcrlf& "<tr><td height=10></td></tr>"
  loop
  rs.close
tmps=tmps&vbcrlf& "</tbody></table></td></tr>" & _
vbcrlf&"<tr><td height=10></td></tr>" & _
vbcrlf&"<tr><td align=middle>" & _
vbcrlf&"<table width='98%'>" & _
vbcrlf&"<tbody>" & _
vbcrlf&"<tr>" & _
vbcrlf&"<td align=middle>" & _
vbcrlf&"<fieldset style='width: 100%' align=center><legend>" & _
vbcrlf&"<table style='border-right: #808080 1px solid; border-top: #808080 1px solid; border-left: #808080 1px solid; border-bottom: #808080 1px solid' cellspacing=0 cellpadding=0 width=200 border=0>" & _
vbcrlf&"<tbody>" & _
vbcrlf&"<tr><td valign=bottom align=middle height=18><font color=#ff0000><b>请您仔细阅读下面的郑重声明</b></font></td></tr>" & _
vbcrlf&"</tbody></table></legend>" & _
vbcrlf&"<table cellspacing=0 cellpadding=0 width='98%' align=right border=0>" & _
vbcrlf&"<tbody>" & _
vbcrlf&"<tr><td height=5></td></tr>" & _
vbcrlf&"<tr>" & _
vbcrlf&"<td class=htd>1、禁止发布含有色情和反动言论以及与国家法律法规相抵触的任何信息；禁止发布在网上对他人进行人身攻击评议的言论……等信息。" & _
vbcrlf&"<br>2、信息发布者提供的信息必须是真实可靠的，不得有欺骗行为否则后果自负；每条信息的发布不得超过二百五十个字节；敬请不要进行重复发布。" & _
vbcrlf&"<br>3、这里的信息发布是全免费的，"&web_dim(1)&"对其不负任何的法律责任（由发布者自负责任敬请郑重），"&web_dim(1)&"有选择和删除权。</td></tr>" & _
vbcrlf&"<tr><td align=middle height=30>" & _
vbcrlf&"<input onclick=""location.href='../user/put.asp?action=flea';"" type=button class=btn value=同意以上声明，我要发布市场信息></td></tr>" & _
vbcrlf&"<tr><td height=5></td></tr>" & _
vbcrlf&"</tbody></table></fieldset>" & _ 
vbcrlf&"</td></tr></tbody></table>" & _ 
vbcrlf&"</td></tr></tbody></table>" 
call flea_center_table("栏目分类",tmps,0,"")
end sub

sub flea_put()
  response.write "<table border=0 width='98%' cellspacing=0 cellpadding=4 align=center>" & _
	    vbcrlf& "<tr><td height=10 width='98%'></td></tr>" & _
	    vbcrlf& "<tr><td align=center><a href='../user/put.asp?action=flea'><img src='../images/flea/flea_put.gif' alt='发布我的交易信息' border=0></a></td></tr>" & _
	    vbcrlf& "<tr><td height=7 width='98%'></td></tr>" & _
	    vbcrlf& "</table>"
end sub

sub flea_view()
dim tmps
  call joekoe_cms.exec("update flea set counter=counter+1 where id="&id,0)
  sql="select * from flea where id="&id
  set rs=joekoe_cms.exec(sql,1)
tmps=vbcrlf&"<table border=0  cellspacing=1 cellpadding=4 class=table>" & _
vbcrlf&"<tr class=tr><td  align=center>" & _
vbcrlf&"  <table border=0 width='100%' class=tf>" & _
vbcrlf&"  <tr><td class=bw align=center><font size=3 class=blue><b><font class=red>["&rs("types")&"]</font>"&joekoe_cms.code_html(rs("name"),1,0)&"</b></font></td></tr>" & _
vbcrlf&"  </table>" & _
vbcrlf&"</td></tr>" & _
vbcrlf&"<tr class=tr><td height=1 background='../images/bg_dian.gif'></td></tr>" & _
vbcrlf&"<tr class=tr><td  align=center>" & _
vbcrlf&"  <table border=0 width='100%'>" & _
vbcrlf&"  <tr>" & _
vbcrlf&"  <td width='25%'>"&pic_fk(rs("pic"),2,"")&"</td>" & _
vbcrlf&"  <td width='75%' valign=top>" & _
vbcrlf&"    <table border=0 width='98%' class=tf>" & _
vbcrlf&"    <tr><td class=bw><font class=htd>"&joekoe_cms.code_html(rs("remark"),2,0)&"</font></td></tr>" & _
vbcrlf&"    </table>" & _
vbcrlf&"    <table border=0 width='98%'>" & _
vbcrlf&"    <tr><td height=30 align=right valign=bottom class=gray>（该信息已被浏览："&rs("counter")&"次）</td></tr>" & _
vbcrlf&"    </table>" & _
vbcrlf&"  </td>" & _
vbcrlf&"  </tr>" & _
vbcrlf&"  </table>" & _
vbcrlf&"</td></tr>" & _
vbcrlf&"<tr><td class=trs>&nbsp;&nbsp;&nbsp;联系信息</td></tr>" 
if var_null(login_username)="" then
tmps=tmps&"<tr class=tr><td height=40  align=center>"&web_nologin&"</td></tr>"
else
tmps=tmps&vbcrlf&"<tr class=tr><td  align=right>" & _
vbcrlf&"<table border=0 width='99%' class=tf>" & _
vbcrlf&"  <tr><td width='65%'>相关价格：<font class=red>"&rs("price")&"</font></td>" & _
vbcrlf&"  <td width='35%' class=blue>发布时间："&joekoe_cms.time_type(rs("tim"),4)&"</td>" & _
vbcrlf&"  </tr>" & _
vbcrlf&"  <tr><td>所 在 地："&joekoe_cms.code_html(rs("address"),2,5)&"</td>" & _
vbcrlf&"  <td class=red>过期时间："&joekoe_cms.time_type(rs("otim"),4)&"</td></tr>" & _
vbcrlf&"  <tr><td>联 系 人："&rs("nname")&"&nbsp;&nbsp;&nbsp;&nbsp;<font class=gray>发布人："&rs("username")&"</font></td><td>联系电话："&rs("phone")&"</td></tr>" & _
vbcrlf&"  <tr><td>电子邮件：<a href='mailto:"&rs("email")&"'>"&rs("email")&"</a></td><td>相关网址：<a href='"&rs("url")&"'>"&rs("url")&"</a></td></tr>" & _
vbcrlf&"  </table>" & _
vbcrlf&"</td></tr></table>" 
end if
call flea_center_table("信息浏览",tmps,0,"")

tmps=""
fleausername=rs("username")
if var_null(login_username)="" then
tmps=tmps&vbcrlf&"<tr><td height=40  align=center>"&web_nologin&"</td></tr>"
else
tmps=tmps&vbcrlf& "<tr><td>"

if frm_chk() then
  dim accept_u,topic,word,found_err,types,isread,sendname,user_on
  accept_u=trim(request.form("accept_u"))
  topic=trim(request.form("topic"))
  word=trim(request.form("word"))
  found_err=""
  if true_accept(accept_u)=false then
     found_err=found_err&"+您输入的 <font class=red>收 件 人</font> 为空或不存在！<br>"
  end if
  if topic="" or len(topic)>20 then
     found_err=found_err&"+您输入的 <font class=red>短信主题</font> 为空或长度超过20！<br>"
  end if
  if word="" or len(word)>250 then
     found_err=found_err&"+您输入的 <font class=red>短信内容</font> 为空或长度超过250！<br>"
  end if
  if found_err<>"" then
     tmps=tmps&vbcrlf&"<tr><td  colspan=2 align=center height=200>"
      tmps=tmps&found_error(found_err,250)
      tmps=tmps&vbcrlf&"</td></tr>"
    response.write tmps
    exit sub
  end if
  types=1
  isread=0
  sendname="发送"
  sql="select top 1 l_username from user_login where l_username='"&accept_u&"'"
    set rs=joekoe_cms.exec(sql,1)
    if not rs.eof then
      user_on=rs(0)
    end if
  rs.close
  sql="select id,username from user_data where username='"&accept_u&"'"
    set rs=joekoe_cms.exec(sql,1)
    if  user_on=rs(1) then application(joekoe_cms.web_cookies&"_"&rs(0))=rs(0)
  rs.close
  sql="insert into user_mail(send_u,accept_u,topic,word,tim,types,isread) " & _
		"values ('"&login_username&"','"&accept_u&"','"&topic&"','"&word&"','"&joekoe_cms.now_time&"',"&types&","&isread&")"
  call joekoe_cms.exec(sql,0)
  call web_js_msg(1,"已成功"&sendname&"一条站内短信！","?id="&id&"")
  exit sub
end if
tmps=tmps&"<table border=0  cellspacing=1 cellpadding=4 class=table>" & _
vbcrlf&"<form name=write_frm action='?action="&action&"&id="&id&"' method=post onsubmit=""javascript:frm_submitonce(this);"">" & _
vbcrlf&"<input type=hidden name=chk value='yes'>" & _
vbcrlf&"<input type=hidden name=send value=''>" & _
vbcrlf&"<tr class=tr >" & _
vbcrlf&"<td width='20%'>收 件 人：</td>" & _
vbcrlf&"<td width='80%'>" & _
vbcrlf&"<table border=0 cellspacing=0 cellpadding=0>" & _
vbcrlf&"<tr><td><input type=text name=accept_u value='"&rs("username")&"' size=30 maxlength=20>"&redx&"<=20</td><td>"&friend_select()&"</td>" & _
vbcrlf&"</tr></table>" & _
vbcrlf&"</td>" & _
vbcrlf&"</tr>" & _
vbcrlf&"<tr class=tr>" & _
vbcrlf&"<td>短信主题：</td>" & _
vbcrlf&"<td><input type=text name=topic value='关于市场信息（"&joekoe_cms.code_html(rs("name"),1,8)&"）' size=60 maxlength=20></td>" & _
vbcrlf&"</tr>" & _
vbcrlf&"<tr class=tr>" & _
vbcrlf&"<td class=htd>短信内容：<br>EM贴图支持<br>UBB不支持<br>HTML不支持<br>长度<=250字节</td>" & _
vbcrlf&"<td><textarea name=word rows=7 cols=60>有关您发的信息“"&rs("name")&"”，我很感兴趣。请问怎么联系你最为方便！</textarea></td>" & _
vbcrlf&"</tr>" & _
vbcrlf&"<tr class=tr>" & _
vbcrlf&"<td colspan=2 align=center>"&jk_em("write_frm","word")&"</td>" & _
vbcrlf&"</tr>" & _
vbcrlf&"<tr class=trb><td height=30 colspan=2 align=center><input type=submit class=btn value='发送短信'>　　<input type=reset class=btn value='重新填写'>　　<input type=button class=btn value='返回上页' onclick=""javascript:history.back(1);""></td></tr>" & _
vbcrlf&"</form></table>"
%>
<script language=javascript>
  function do_accept(addaccept)
  {
  	if (addaccept!="")
  	{ document.write_frm.accept_u.value=addaccept; }
  }
</script>
<%
call flea_center_table("给 "&fleausername&" 发短信",tmps,1,"")
end if
tmps=vbcrlf& review_type(n_sort,id,joekoe_cms.web_path&"flea/view.asp?id="&id,1,username)
call flea_center_table("相关评论",tmps,0,"")
end sub

function friend_select()
  	dim rsf,ttt,temp1
  	temp1=vbcrlf&"<select name=friend_select size=1 onchange=""javascript:do_accept(this.options[this.selectedIndex].value);"">" & _
		vbcrlf&"<option value='' >选择我的好友</option>"
  	set rsf=joekoe_cms.exec("select username2 from user_friend where username1='"&login_username&"' order by id",1)
  	do while not rsf.eof
    		ttt=rsf(0)
    		temp1=temp1&vbcrlf&"<option value='"&ttt&"'>"&ttt&"</option>"
    	rsf.movenext
  	loop
  	rsf.close
  	set rsf=nothing
  	temp1=temp1&vbcrlf&"</select>"
  	friend_select=temp1
end function

sub flea_left(f_title,ft,c_num,f_num)
dim tmps,body,tmp_title
 tmps=tmps&vbcrlf&"  <table border=0 cellspacing=0 cellpadding=2 width='100%'>"
  select case ft
  case "hot"
    sql=" order by counter desc,id desc"
  case "good"
    sql=" and isgood=1 order by id desc"
  case else
    sql=" order by id desc"
  end select
  sql="select top "&c_num&" id,c_id,name,counter from flea where otim>"&price_head&now_ymd&price_head&" and hidden=1"&sql
  set rs=joekoe_cms.exec(sql,1)
  do while not rs.eof 
tmps=tmps&vbcrlf&"<tr><td>" & _
vbcrlf&""&img_skin(web_img_h)&"" & _
vbcrlf&"<a href='view.asp?c_id="&rs("c_id")&"&s_id="&sid&"&id="&rs("id")&"' alt='"&joekoe_cms.code_js(joekoe_cms.code_html(rs("name"),1,0),1)&"'>" & _
vbcrlf&""&joekoe_cms.code_js(joekoe_cms.code_html(rs("name"),1,f_num),1)&"</a></td></tr>" & _
  rs.movenext
  loop
  rs.close
tmps=tmps&vbcrlf&"<tr><td align=right valign=bottom><a href='list.asp?action="&ft&"' class=tims>more</a>&nbsp;</td></tr>" & _
vbcrlf&"</table>"
call flea_left_table(f_title,tmps,0,"")
end sub

sub flea_search()
	dim tmps,types_temp,action_temp,selected_temp
	select case types
	case "0","1","" 
		types_temp=" class=red"
		types_temp=" class=red"
		types_temp=" class=blue"
	end select
	select case sea_type
	case "name","price","nname","username""phone","url","email","remark" 
		selected_temp=" selected"
	end select
    select case action
	case "","counter","tim","id","id","id"
		action_temp=" selected"
	end select
	tmps=vbcrlf&"<table width='100%' border=0>" & _
	vbcrlf&"<tbody>" & _
	vbcrlf&"<tr>" & _
	vbcrlf&"<td class=bg_2 valign=bottom align=center>" & _
	vbcrlf&"<table width='100%' align=center border=0 >" & _
	vbcrlf&"<tr height=23>"
	  sql="select * from jk_class where nsort='flea'"
	  set rs=joekoe_cms.exec(sql,1)
	  do while not rs.eof
		  tmps=tmps& "<td align=center valign=middle><a href='list.asp?c_id="&rs("c_id")&"'"
		  if int(request.querystring("c_id"))=rs("c_id") then 
			tmps=tmps& " class=red" 
		  end if
		  tmps=tmps& ">"&rs("c_name")&"</a></td>"
		  rs.movenext
	  loop
	  rs.close
	tmps=tmps&vbcrlf&"</tr></table></td></tr>" & _
vbcrlf&"<tr><td background='../images/bg_dian.gif' height=1></td></tr>" & _
vbcrlf&"<tr><td align=middle  height=30>" & _
vbcrlf&"<table cellspacing=0 cellpadding=1 width='100%' border=0>" & _
vbcrlf&"<tr align=middle>" & _
vbcrlf&"<td>【<a href='list.asp?types=0&c_id="&cid&"'"&types_temp&">供方信息</a>】</td>" & _
vbcrlf&"<td>【<a href='list.asp?types=1&c_id="&cid&"'"&types_temp&">求方信息</a>】</td>" & _
vbcrlf&"<td>【<a href='list.asp'"&types_temp&">所有信息</a>】</td>" & _
vbcrlf&"<td>关键字：</td>" & _
vbcrlf&"<form name=flea_sea_frm action='list.asp?' method=get>" & _
vbcrlf&"<input type=hidden name=c_id value='"&cid&"'>" & _
vbcrlf&"<input type=hidden name=s_id value='"&sid&"'>" & _
vbcrlf&"<input type=hidden name=action value='"&action&"'>" & _
vbcrlf&"<input type=hidden name=types value='"&types&"'>" & _
vbcrlf&"<td>" & _
vbcrlf&"<input class=txt type=text name=keyword value='"&keyword&"' size=8 maxlength=20></td>" & _
vbcrlf&"<td><select  name=sea_type size=1>" & _ 
vbcrlf&"<option value='name'"&selected_temp&" selected>信息标题</option>" & _
vbcrlf&"<option value='price'"&selected_temp&">价格</option>" & _
vbcrlf&"<option value='nname'"&selected_temp&">联系人</option>" & _
vbcrlf&"<option value='username'"&selected_temp&">发布用户</option>" & _
vbcrlf&"<option value='phone'"&selected_temp&">联系电话</option>" & _
vbcrlf&"<option value='url'"&selected_temp&">联系地址</option>" & _
vbcrlf&"<option value='email'"&selected_temp&">电子邮件</option>" & _
vbcrlf&"<option value='remark'"&selected_temp&">信息说明</option>" & _
vbcrlf&"</select></td>" & _
vbcrlf&("<td><input type=submit class=btn value='搜索' onclick=""javascript:return flea_sea();"">&nbsp;</td></form>" & _
vbcrlf&"<td><select onchange=""if(this.options[this.selectedIndex].value!=''){location=this.options[this.selectedIndex].value;}"">" & _
vbcrlf&"<option value='list.asp?c_id="&cid&"&s_id="&sid&"&action=new&types="&types&"&keyword="&keyword&"&sea_type="&sea_type&"'"&action_temp&">默认排序</option>" & _
vbcrlf&"<option value='list.asp?c_id="&cid&"&s_id="&sid&"&action=counter&types="&types&"&keyword="&keyword&"&sea_type="&sea_type&"'"&action_temp&">人气排序</option>" & _
vbcrlf&"<option value='list.asp?c_id="&cid&"&s_id="&sid&"&action=tim&types="&types&"&keyword="&keyword&"&sea_type="&sea_type&"'"&action_temp&">时间排序</option>" & _
vbcrlf&"<option value='list.asp?c_id="&cid&"&s_id="&sid&"&action=id&types="&types&"&keyword="&keyword&"&sea_type="&sea_type&"'"&action_temp&">先后排序</option>" & _
vbcrlf&"<option value='list.asp?c_id="&cid&"&s_id="&sid&"&action=hot&types="&types&"&keyword="&keyword&"&sea_type="&sea_type&"'"&action_temp&">热门信息</option>" & _
vbcrlf&"<option value='list.asp?c_id="&cid&"&s_id="&sid&"&action=good&types="&types&"&keyword="&keyword&"&sea_type="&sea_type&"'"&action_temp&">推荐信息</option>" & _
vbcrlf&"</select></td></tr></table></td></tr><tbody></table>") 
%>	
<script language=javascript>
	<!--
	function flea_sea()
	{
	  if (document.flea_sea_frm.keyword.value=="")
	  {
		alert("搜索前请先输入要查询的 关键字 ！");
		return false;
	  }
	}
	-->
	</script>
	<%
	call flea_center_table("信息搜索",tmps,0,"")
	
end sub

sub flea_list()
dim tmps,t_color:t_color=" class=tims"
pageurl="?c_id="&cid&"&s_id="&sid&"&action="&action&"&"
if types<>"" then
   pageurl=pageurl&"types="&types&"&"
   if types="0" then
      types="供方"
   else
      types="求方"
   end if
sqladd=sqladd&" and types='"&types&"'"
end if

call cid_sid_sql(2,sea_type)

sql="select * from flea where otim>"&price_head&now_ymd&price_head&" and hidden=1"&sqladd
select case action
case "counter"
  sql=sql&" order by counter desc,id desc"
case "tim"
  sql=sql&" order by tim desc"
case "id"
  sql=sql&" order by id"
case "hot"
  sql=sql&" order by counter desc,id desc"
case "good"
  sql=sql&" and isgood=1 order by id desc"
case else
  sql=sql&" order by id desc"
end select

set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if not(rs.eof and rs.bof) then
  rssum=rs.recordcount
end if
call format_pagecute()
tmps=vbcrlf&"<table border=0 width='100%'><tr><td>" & _
vbcrlf&"</td></tr>"
if int(viewpage)>1 then
  rs.move (viewpage-1)*nummer
end if
for i=1 to nummer
  if rs.eof then exit for
  dim nid,name
  nid=rs("id"):name=joekoe_cms.code_html(rs("name"),1,0) 
if DateDiff("d",rs("tim"),joekoe_cms.now_time)<3 then t_color=" class=blue"
if DateDiff("d",rs("tim"),joekoe_cms.now_time)<1 then t_color=" class=red"
tmps=tmps&vbcrlf&"<tr><td colspan=2 height=23  background='../images/flea/bar.gif'>" & _
vbcrlf&"<table border=0 cellspacing=0 cellpadding=0 width='100%'>" & _
vbcrlf&"<tr><td>&nbsp;"&img_skin(web_img_h)&"<b>" & _
vbcrlf&"<b>&nbsp;<a href='view.asp?c_id="&cid&"&s_id="&sid&"&id="&rs("id")&"'>"&joekoe_cms.code_html(rs("name"),1,0)&"</a></b>" 
if rs("pic")<>"" then 
tmps=tmps&vbcrlf&"'&nbsp;<img border=0 src='"&joekoe_cms.web_dir_skin&"small/img.gif' align=absmiddle alt='有图片'>'</td>" 
end if
tmps=tmps&vbcrlf&"<td align=right class=tims><font"&t_color&">"&joekoe_cms.time_type(rs("tim"),4)&"</font>&nbsp;&nbsp;</td></tr>" & _
vbcrlf&"    </table>" & _
vbcrlf&"  </td></tr>" & _
vbcrlf&"  <tr><td colspan=2 align=center >" & _
vbcrlf&"    <table border=0 width='99%' class=bw>" & _
vbcrlf&"    <tr><td class=tf><font class=htd>"&joekoe_cms.code_html(rs("remark"),1,150)&" <font class=gray>[<a href='javascript:;' onclick=""javascript:open_view('view.asp?c_id="&cid&"&s_id="&sid&"&id="&rs("id")&"',1);"" alt='点击浏览更详细的信息'>详细信息</a>]</font></font></td></tr>" & _
vbcrlf&"    </table>" & _
vbcrlf&"  </td></tr>" & _
vbcrlf&"  <tr class=bg><td colspan=2 align=center>" & _
vbcrlf&"    <table border=0 width='99%'>" & _
vbcrlf&"    <tr>" & _
vbcrlf&" <td align=right>联系人：<a href='../user/view.asp?username="&rs("username")&"'alt='查看 "&rs("username")&" 详细信息' target=_blank>"&rs("nname")&"</a>&nbsp;" 
if var_null(login_username)="" then
tmps=tmps&vbcrlf&" <font class=gray>注册登陆后查看更详细的信息</font>" 
 else
tmps=tmps&vbcrlf&"电子邮件：<a href='mailto:"&rs("email")&"'>"&rs("email")&"</a>&nbsp;电话："&rs("phone")&""
 end if
tmps=tmps&vbcrlf&" </td></tr>" & _
vbcrlf&"</table></td></tr>" & _
vbcrlf&"<tr><td background='../images/bg_dian.gif' height=1></td></tr>"
  rs.movenext
next
rs.close:set rs=nothing
tmps=tmps&vbcrlf&"<tr><td  height=30>" & _
vbcrlf&"  <table border=0 width='100%' cellspacing=1 cellpadding=4 class=bg_2>" & _
vbcrlf&"  <tr valign=bottom><td width='50%'>共有<font class=red>"&rssum&"</font>条信息，每页<font class=red>"&nummer&"</font>条，页次：<font class=red>"&viewpage&"</font>/<font class=red>"&thepages&"</font></td>" & _
vbcrlf&"  <td align=right>"&pagecute_fun(viewpage,thepages,pageurl)&"</td></tr>" & _
vbcrlf&"  </table>" & _
vbcrlf&"  <table border=0 width='100%' cellspacing=0 cellpadding=4 >" & _
vbcrlf&"  <tr><td colspan=2 class=td>&nbsp;信息列表说明</td></tr>" & _
vbcrlf&"  <tr>" & _
vbcrlf&"  <td colspan=2>"&joekoe_cms.js_put("document.write(img_skin('h_'));",1)&"标有<img border=0 src='"&joekoe_cms.web_dir_skin&"small/img.gif' align=absmiddle>&nbsp;表示该条信息有图片说明， 联系方式以及部分功能要 <a href='../user/register.asp'>注册</a> 并 <a href='../user/login.asp'>登陆</a> 才可正常浏览和使用！</td></tr>" & _
vbcrlf&"  <tr><td colspan=2>"&joekoe_cms.js_put("document.write(img_skin('h_'));",1)&"时间颜色说明： <font class=red>"&joekoe_cms.time_type(joekoe_cms.now_time,4)&"</font> 表示今天发布的信息， <font class=blue>"&joekoe_cms.time_type(DateAdd("d", -3, joekoe_cms.now_time),4)&"</font> 表示三天内发布的信息。</td>" & _
vbcrlf&"  </tr>" & _
vbcrlf&"</table>" & _
vbcrlf&"</table>"
call flea_center_table("信息列表",tmps,0,"")
end sub

sub flea_center_table(tit,body,tt,ttype)
  dim w_wid,tmp1
  w_wid="70"
  if len(tit)>8 then w_wid="240"
  if len(tit)>20 then w_wid="400"
  if tt=1 then body="<table border=0 cellspacing=0 cellpadding=0 width='100%'>"&body&"</table>"
  tmp1=CMS_Skin.GetDB("flea_center")
  tmp1=Replace(tmp1,"{$web_skin}",joekoe_cms.web_dir_skin)
  tmp1=Replace(tmp1,"{$img}",img_skin(web_img_m))
  tmp1=Replace(tmp1,"{$tit}",tit)
  tmp1=Replace(tmp1,"{$body}",body)
  tmp1=Replace(tmp1,"{$mores}","")
  tmp1=Replace(tmp1,"{$ends}","")
  tmp1=Replace(tmp1,"{$ukong}",CMS_Skin.skukong)
  Response.Write (Vbcrlf&tmp1)
end sub

sub flea_left_table(tit,body,tt,ttype)
  dim w_wid,tmp1
  w_wid="70"
  if len(tit)>8 then w_wid="240"
  if len(tit)>20 then w_wid="400"
  if tt=1 then body="<table border=0 width='100%'>"&body&"</table>"
  tmp1=CMS_Skin.GetDB("flea_left")
  tmp1=Replace(tmp1,"{$web_skin}",joekoe_cms.web_dir_skin)
  tmp1=Replace(tmp1,"{$img}",img_skin(web_img_m))
  tmp1=Replace(tmp1,"{$tit}",tit)
  tmp1=Replace(tmp1,"{$body}",body)
  tmp1=Replace(tmp1,"{$mores}","")
  tmp1=Replace(tmp1,"{$ends}","")
  tmp1=Replace(tmp1,"{$ukong}",CMS_Skin.skukong)
  Response.Write (Vbcrlf&tmp1)
end sub


sub main_j_center_flea(f_num,f_tnum,f_cnum) 
dim tmp1,tmp_topic,tmp_url,s_day,i,temtr 
sql="select top "&f_num&" id,name,c_id,tim,username,otim,remark,phone,email,pic,types,nname from flea where hidden=1 order by id desc" 
set rs=joekoe_cms.exec(sql,1) 
i=0 
do while not rs.eof 
tmp_topic=rs(1) 
tmp_url="flea_view.asp?id="&rs(0) 
if i mod 3=0 then 
tmp1=tmp1&"<tr align=center>" 
else 
tmp1=tmp1&"" 
end if 
if rs("otim")<>"" then 
s_day=(DateDiff("d",""&rs("tim")&"",now())) - (DateDiff("d",""&rs("otim")&"",now())) 
if s_day>0 then 
tmp1=tmp1&vbcrlf&"<td><table border=0 cellspacing=0 cellpadding=0 class=b_class_f><tr><td width=100% class=bar_f> <a href='"&tmp_url&"'><b>"&joekoe_cms.code_html(tmp_topic,1,f_tnum)&"</b></a></td></tr><tr><td colspan=""2"" style='WORD-WRAP: break-word'><br>"&joekoe_cms.code_html(rs("remark"),1,f_cnum)&" <a href='"&tmp_url&"'>[详细信息]<br></a><span class='tims'>"&rs("tim")&"</span><br><br>联系人："&rs("username")&"<br>电话："&rs("phone")&"<br><font color=""#FF0000"">剩<b>"&s_day&"</b>天结束</font></td></tr><tr><td colspan=""2"" height=1 background='images/bg_dian.gif'></td></tr></table></td>" 
else 
tmp1=tmp1&vbcrlf&"<td><table border=0 cellspacing=0 cellpadding=0 class=b_class_f><tr><td width=100% class=bar_f> <a href="&tmp_url&"><b>"&joekoe_cms.code_html(rs("name"),1,f_tnum)&"</b></a></td></tr><tr><td colspan=""2"" style='WORD-WRAP: break-word'><br>"&joekoe_cms.code_html(rs("remark"),1,f_cnum)&" <a href='"&tmp_url&"'>[详细信息]<br></a><span class='tims'>"&rs("tim")&"</span><br><br>联系人："&rs("username")&"<br>电话："&rs("phone")&"<br><font color=""#FF0000"">信息已过期</font></td></tr><tr><td colspan=""2"" height=1 background='images/bg_dian.gif'></td></tr></table></td>" 
end if 
end if 
i=i+1 
rs.movenext 
loop 
rs.close 
tmp1=tmp1&vbcrlf&"</tr>" 
tmp1="<table border=0 cellspacing=0 cellpadding=2 width='100%'>"&tmp1&vbcrlf&"</table>" 
response.write vbcrlf&"<table cellspacing=1 cellpadding=4 class=table>" & _ 
vbcrlf&"<tr class=bg_td><td align=center>"&tmp1&"</td></tr>" & _ 
vbcrlf&"</table>"&ukong 
end sub 
%>