<!--#include file="inc/conn.asp"-->
<!--#include file="inc/inc.asp"-->
<%

cnmai= request("cnmai")
set rs=server.createobject("ADODB.recordset")
if request("page")="" then
  ThisPage=1		
else
  ThisPage=Cint(request("page"))
end if

%>
<title><%=title%>-全部最新信息</title>
<body>
<%call t()%>



<table width="980" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#D2D2D2">
  <tr>
    <td height="40" colspan="2"  background="img/sorttitlebg.jpg" style="border-style:none"><!--#include file="s1.asp" --></td>
  </tr>
  <tr>
    <td width="980" valign="top" bgcolor="#F2F2F2" style="border-style:none"><table width="970" height="193" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#D8D8D8">
      <tr>
        <td width="511" height="35" background="img/sortcontentbarbg.jpg" style="border-style:none">&nbsp;<img src="img/dot1.gif" width="12" height="12">&nbsp;&nbsp; 位置导航：</font>
<a href="/">首页</a>→&nbsp;
<a href="new.asp">
<%
if isnull(cnmai)=true then
%> 
最新信息
<%
else
if cnmai=cstr(1) then%> 最新回复
<%else%>3日浏览排行
<%end if
end if
%>
</a></td>
        <td width="239" background="img/sortcontentbarbg.jpg" style="border-style:none"><span class=font1>&nbsp;</span></td>
      </tr>
      <tr>
        <td height="156" colspan="2" bgcolor="#FFFFFF" style="border-style:none"  valign="top"><TABLE width=960 border="0" align="center" cellPadding=0 cellspacing="0" bgcolor="#FFFFFF" style="padding:0; border-collapse: collapse; ">
          <TBODY>
            <TR>
              <TD class=td1>&nbsp;&nbsp;<a href="new.asp">最新信息</a> <a href="new.asp?cnmai=1">最新回复</a> <a href="new.asp?cnmai=2">3日浏览排行</a></TD>
              </tr>
            <TR>
              <TD class="tda"><div align="center">
                  <table border="0" width="100%" cellspacing="0" cellpadding="0" id="table1">
                   
                    <tr>
                      <td align="center">&nbsp; 类型&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                        信息标题&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
                        价格&nbsp;&nbsp; 浏/回&nbsp;&nbsp; 发布日期&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                        状态&nbsp;&nbsp;&nbsp; </td>
                    </tr>
                    <tr>
                      <td><table width="100%" id="table1" height="58">
                        <tr>
                            <td valign="top"><div align="center">
                                <table border="1" width="99%" id="table1" cellspacing="1" bordercolor="#F2F2F2" style="border-collapse: collapse">
                                  <%
dim ThisPage,Pagesize,Allrecord,Allpage
tj=0

select case Cint(cnmai)
	case 1
		sql = "select * from jle_xinxi where yz=1 and hfcs>1 order by fbsj desc"
	case 2
		sql = "select * from jle_xinxi where yz=1 and DATEDIFF('d',fbsj,Now())<=3 order by llcs desc"
	case -1
		sql = "select top 60 * from jle_xinxi where yz=1 order by fbsj desc"
	Case Else
		sql = "select * from jle_xinxi where yz=1 and leixing='"& Unescape(Request.QueryString("fl")) &"' order by fbsj desc"
End Select


rs.open sql,conn,1,1
rs.Pagesize=30
Pagesize=rs.Pagesize
Allrecord=rs.Recordcount
Allpage=rs.Pagecount
if ThisPage<1 then                           
	ThisPage=1                           
end if

On Error Resume Next
rs.move (ThisPage-1)*Pagesize
if rs.eof then
	response.write "还没有添加信息！"
else
	do while not rs.eof
		b=trim(rs("b"))
		bb=len(b)
		response.write "<tr>"
		response.write "<td style=""BACKGROUND-COLOR: #fbfbfb"" align=""middle"" width=""58"" height=""22"">"
		Select Case rs("leixing") 
			Case "0"
				response.write ""
			Case "1"
				response.write "<font color=""#800000""><u>转让</u></font>"
			Case "2"
				response.write "<font color=""#FF00FF""><u>求购</u></font>"
			Case "3"
				response.write "<font color=""#008000""><u>出租</u></font>"
			Case "4"
				response.write "<font color=""#FF6600""><u>求租</u></font>"
			Case "5"
				response.write "<font color=""#ff0000""><u>求职</u></font>"
			Case "6"
				response.write "<font color=""#000080""><u>招聘</u></font>"
			Case "7"
				response.write "<font color=""#0000FF""><u>分享</u></font>"
			Case "8"
				response.write "<font color=""#008080""><u>交换</u></font>"
			Case Else
				response.write "<font color=""#000000""><u>"&rs("leixing")&"</u></font>"
		End Select
		response.write "</td>"
		response.write "<td style=""BACKGROUND-COLOR: #fbfbfb"" align=""left"" width=""340"" height=""22"">"
		if rs("tupian")<>"0" then
			response.write "<img src=""image/pic.gif"" alt=""有图片"">"
		end if
			response.write "<a target=""_blank"" title="""&rs("diqu")&"-"&rs("name")&"-发布于"&datevalue(rs("fbsj"))&"""  href=x.asp?cnmai="&rs("id")&">"
		if rs("a")="0" then
			response.write ""&mid(rs("biaoti"),1,20)&""
		else
			response.write "<font color=#"&rs("a")&">"&mid(rs("biaoti"),1,20)&"</font>"    
		end if
		response.write "</a>"
		if b<>0 then
			response.write "<img src=""image/tj.gif"" alt=""置顶"">"
			for i=1 to bb
				response.write "<img src=""image/num/"&Mid(b,i,1)&".gif"" alt=""置顶"">"
			next
		end if
		if rs("tuijian")="1" then
			response.write "<img src=""image/num/jian.gif"" alt=""本站推荐"">"
		end if
		response.write "</td>"
		response.write "<td style=""BACKGROUND-COLOR: #fbfbfb"" align=""middle"" width=""40"" height=""22"">"
		if rs("jiage")=0 then
			response.write "面 议"
		else
			response.write rs("jiage")
		end if
		response.write "</td>"
		response.write "<td style=""BACKGROUND-COLOR: #fbfbfb"" align=""middle"" width=""50"" height=""22"">"&rs("llcs")&"/"&rs("hfcs")&"</td>"
		response.write "<td style=""BACKGROUND-COLOR: #fbfbfb"" align=""middle"" width=""86"" height=""22"">"
		response.write ""&cnmaisj(rs("fbsj"))&"</td>"
		response.write "<td style=""BACKGROUND-COLOR: #fbfbfb"" align=""right"" width=""82"" height=""22"">"
		dim sj
		sj=DateDiff("d",now(),""&rs("dqsj")&"")
		if sj>0 then
			response.write "<font color=""#414141"">剩余"&sj&"</b>天</font>"
		else
			response.write "已经过期"
		end if
		response.write "</td></tr>"
		tj=tj+1
		rs.movenext
		if tj>=Pagesize then exit do
	loop
	end if
rs.close
set rs=nothing
%>
                                </table>
                            </div>
                                <div align="center">
                                  <center>
                                    <table border="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" bgcolor="#F0E9C8">
                                      <tr>
                                        <td height="25" width="181"><p align="center">共有&nbsp;<font color="#CC5200"><%=Allrecord%></font>&nbsp;条记录</td>
                                        <td height="25" width="96"><p align="center">共 <font color="#CC5200"><%=Allpage%></font> 页</td>
                                        <td height="25" width="118"><p align="center">现在是第 <font color="#CC5200"><%=ThisPage%></font> 页</td>
                                        <td height="25" width="157"><p align="center">
                                          <%
if ThisPage<2 then     
	response.write "<font color=""#808080"">首页</font>&nbsp;"
	response.write "<font color=""#808080"">上一页</font>&nbsp;"     
else     
	response.write "<a href=?page=1&cnmai="&cnmai&">首页</a>&nbsp;"
	response.write "<a href=?page="&ThisPage-1&"&cnmai="&cnmai&">上一页</a>&nbsp;"     
end if
if Allpage-ThisPage<1 then     
	response.write "<font color=""#808080"">下一页</font>&nbsp;"
	response.write "<font color=""#808080"">尾页</font>&nbsp;"  
else     
	response.write "<a href=?page="&(ThisPage+1)&"&cnmai="&cnmai&">下一页</a>&nbsp;"   
	response.write "<a href=?page="&Allpage&"&cnmai="&cnmai&">尾页</a>&nbsp;"     
end if
%>
                                                  </td>
                                      </tr>
                                    </table>
                                  </center>
                                </div></td>
                        </tr>
                      </table></td>
                    </tr>
                  </table>
              </div></TD>
            </tr>
          </TBODY>
        </TABLE></td>
      </tr>
    </table></td>
    
  </tr>
</table>
<!--#include file="foot.asp"--><%
Conn.Execute("Update jle_xinxi Set b=0 where DateDiff('D',fbsj,now())>="&b_y&" and yz=1")
Conn.Execute("Update jle_xinxi Set tuijian=0 where DateDiff('D',fbsj,now())>="&tui_y&" and yz=1")
closedb

function cnmaisj(sj_1)
	dim sj
	sj=DateDiff("D",sj_1,now())
	if sj<=1 then
		response.write "<font color=""#FF0000"">今天</font><img src=""image/news.gif"">"
	elseif sj<=2 and sj>1 then
		response.write "<font color=""#0000FF"">昨天"&timevalue(sj_1)&"</font>"
	elseif sj>2 and sj<=3 then
		response.write "<font color=""#008080"">前天"&timevalue(sj_1)&"</font>"
	elseif sj>3  then
		response.write "<font color=#353535>"&datevalue(sj_1)&"</font>"
	end if
end function
%>