<!--#include file="inc/conn.asp"-->
<!--#include file="inc/jle_sub.asp"-->
<!--#include file="inc/function.asp"-->
<%
'    @@@@@@ www.jl-e.com @@@@@@@@@@@@@@@@@
'   @                                        @
'  @                                          @
'  @      吉林信息网，服务百姓生活      @
'  @                                          @
'   @                                        @
'    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

jle=HtmlEncode(request("jle"))
id=request("id")
if id<>"" then
set rs=server.createobject("adodb.recordset")
sql="select * from [jle_news] where  id="&cstr(id)
rs.open sql,conn,1,1
if rs.eof and rs.bof then
'response.write "没有商家新闻,3秒后将自动转到首页"
'response.write "<meta http-equiv=refresh content=""3;URL=/index.asp"">"
response.redirect "plus/err/err.html"
response.end
end if
end if
dim newrs,a2,headrs,a0
function thenext 
newrs=server.CreateObject("adodb.recordset") 
sql="select top 1 * from jle_news where id>"&id&" order by id" 
set newrs=conn.execute(sql) 
if newrs.eof then 
response.Write("下一篇：没有了") 
else 
a2=newrs("id") 
response.Write("下一篇：<a href='shownews.asp?id="&a2&"'>"& newrs("biaoti") &"</a>") 
end if 
newrs.close
end function 

function thehead 
headrs=server.CreateObject("adodb.recordset") 
sql="select top 1 * from jle_news where id<"&id&" order by id desc" 
set headrs=conn.execute(sql) 
if headrs.eof then 
response.Write("上一篇：没有了") 
else 
a0=headrs("id") 
response.Write("上一篇：<a href='shownews.asp?id="&a0&"'>"& headrs("biaoti") &"</a>") 
end if 
headrs.close
end function 
%> 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><%=title%>-<%=rs("biaoti")%>-商家新闻资讯</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="keywords" content="<%=rs("biaoti")%>,商家新闻,<%=rs("gcla")%>">
<meta name="description" content="商家新闻,<%=left(stripHTML(rs("neirong")),40)%>">
<link rel="icon" href="<%=web%>/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="<%=web%>/favicon.ico" type="image/x-icon" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
* {
	font-size:12px;
	margin:0;
	padding:0; 
} 
fieldset {
	padding:10px;
	margin:10px;
	width:200px;
	color:#333; 
	border:#06c dashed 1px;
} 
legend {
	color:#06c;
	font-weight:800; 
	background:#fff;
} 
ul {
	list-style-type: none;
	margin:8px 0 4px 0;
} 
li {
	margin-top:4px;
}
body,td,th {
	font-family: 微软雅黑;
	font-size: 14px;
}
</style>

</head>
<body>
<%call top()%><div id="Fmain">



<%
'id=request("id")
if id<>"" then
'set rs=server.createobject("adodb.recordset")
'sql="select * from [jle_news] where id="&cstr(id)
'rs.open sql,conn,1,1
'if rs.eof and rs.bof then
'response.write "没有商家新闻"
'response.end
'end if
   	
%>
<div id="Fleft">
 <div id=FFTit ><a href="/">网站首页</a>→<%=rs("gcla")%></div><div id=FFContent><div Class='FFdiv'>

<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td align="center" height="50" style="color:#FF0000; font-size:25px; line-height:30px; border-bottom:1px #EEEEEE solid; font-weight:bold;"><%=rs("biaoti")%></td>
</tr>
<tr>
<td  height="40" style=" border-bottom:1px #EEEEEE solid;" align="center" ><div  >发布时间:<%=rs("data")%>&nbsp;&nbsp;   来源:
<% if rs("laiy") <>"" then
response.write""&rs("laiy")&""
else
%>
<a href="<%=web%>"><%=title%></a>-<%=rs("gcla")%>
<%end if%>
</div>
</td>
</tr>

<tr>
<td class="tdxbody" style="WORD-BREAK: break-all;overflow:hidden; padding-top:20px;  ">
<div class="callout1">
<h3>
<%=adclass6%>
</h3>
<div style="line-height:30px;"><%=rs("neirong")%></div>
<div>
</td>
</tr>
<tr>
<td>
<table border="0" width="100%" cellspacing="0" cellpadding="0" class="userbg">
	<tr>
		<td width="370" height="42"  align=center>
		　<% thehead %> </td>
		<td width="370" height="42"  align=center>
		　<% thenext %></td>
	</tr>
		</table>
                                              
</td>
</tr>
<tr>
<td>
<div align=center>本条新闻来源商家会员发布，新闻所有内容解释权归该商家所有。</div>
</td>
</tr>
</table>
</div>
</div>
</div>
<%
else

set rs=server.createobject("adodb.recordset")
if jle<>"" then
sql= "select * from jle_news where gcla='"&jle&"' order by data desc"
else
sql= "select * from jle_news order by data desc"
end if
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "没有新闻"
response.end
end if

%>
<div id="Fleft">
 <div id=FFTit class=F12bold><a href="/">网站首页</a>→
<%
if jle<>"" then
response.write ""&rs("gcla")&""
else
response.write "全部商家新闻"
end if
%></div><div id=FFContent><div Class='FFdiv'>
<table border="0" width="100%" cellspacing="0" cellpadding="0"><tr><td>
<%
pageno=cint(request("pageno"))
rs.Pagesize=12
pagenum=rs.pagecount
if pageno="" or pageno>pagenum or pageno=0 then
pageno=1
else
pageno=pageno
end if
if pageno<>1 then
rs.move (pageno-1)*rs.pagesize
end if
for i=1 to rs.pagesize
%>

	  <div class='div1_content_f_b'>
	  <div class='div1_content_f_b_tu'>
<%
response.write "<A target=_blank href=""shownews.asp?id="&rs("id")&""">"
response.write "<img border=""0"" src=""img/newspic.png"" width=""57"" height=""64""> </a>"
%>
		  </div>
	  <div class='div1_content_f_b_b'>
	  <div class='div1_content_f_b_bl'>
<%
 response.write "<a title="&rs("biaoti")&" href=""shownews.asp?id="&rs("id")&""" target=""_blank"" class=""bar2"">"

if len(rs("biaoti"))>25 then
%>
<%=left(rs("biaoti"),25)&"..."%>
<%else%>
<%=rs("biaoti")%>
<%end if
response.write "</a>"
response.write "<font color=#ff8800>["&rs("gcla")&"]</font></div>"
response.write "<div class='div1_content_f_b_br'>发布时间:"&formatdatetime(rs("data"),1)&"</div></div>"
%>	  
	  <div class='div1_content_f_b_b'>
	  <%=left(stripHTML(rs("neirong")),115)%>
<%if  len(rs("neirong"))>115   then
response.write"…"
end if
%>

	  </div>
	  </div> 
	
<%
rs.movenext
if rs.eof then exit for
next
response.write "<div>"
response.write ""&adclass5&""
response.write "</div>"
%>
 </div>
</td></tr>
<tr><td>
<div class="jle" align=center>
<%
response.write "<a href='?jle="&escape(jle)&"&pageno=1'>首页</a>"
'显示数量设定
showpagenum=10
'上一页显示判断
if pageno>1 then      
response.write "<a href='?jle="&escape(jle)&"&pageno="&pageno-1&"'>上一页</a> "
end if
if pagenum>showpagenum then
num_left=pageno-1
num_right=pagenum-pageno
if num_left>(showpagenum/2) then
 if num_right<(showpagenum/2) then
    page_left=pageno-(showpagenum-num_right)+1
    page_right=pagenum
 else
    page_left=pageno-(showpagenum/2)
    page_right=pageno+(showpagenum/2)
 end if
else
    page_left=1
    page_right=pageno+(showpagenum-num_left)-1
end if
'前项输出
for P=page_left to pageno-1
    response.write " <a href='?jle="&escape(jle)&"&pageno="&p&"'>"&p&"</a> "
next
'当前项输出
'response.write " <span class=""current""><a href='?jle="&escape(jle)&"&pageno="&pageno&"'>"&pageno&"</a></span> "
response.write " <span class=""current"">"&pageno&"</span> "

'后项输出
for f=pageno+1 to page_right
    response.write " <a href='?jle="&escape(jle)&"&pageno="&f&"'>"&f&"</a> "
next
else
for i=1 to pagenum
 if i=pageno then
	'response.write " <span class=""current""><a href='?jle="&escape(jle)&"&pageno="&i&"'>"&i&"</a></span> "
	response.write " <span class=""current"">"&i&"</span> "
	'response.end()
 else
	response.write " <a href='?jle="&escape(jle)&"&pageno="&i&"'>"&i&"</a> "
	'response.end()
 end if
next
end if
'最后一页判断
if pageno<pagenum then
response.write "<a href='?jle="&escape(jle)&"&pageno="&pageno+1&"'>下一页</a>"
end if
%>
<a href=?jle=<%=escape(jle)%>&pageno=<%=pagenum%>>尾页</a>
 <%
rs.close
set rs=nothing
%>
</div>

</td></tr></table>
</div>
</div>
</div>
<%
end if
%>
<div id="Fright">
<div id=FFTit class=F12bold>商家新闻</div><div id=FFContent><div Class='Rdiv'><ul>
<%
set rsns=server.createobject("adodb.recordset")
sqlns= "select top 7 * from jle_news  where com<>'0'  order by data desc"
rsns.open sqlns,conn,1,1
do while not rsns.eof
response.write "<li><A target=_blank href=""shownews.asp?id="&rsns("id")&""" >"
%>
<%=left(rsns("biaoti"),14)%></a></li>
<%
rsns.movenext
loop
rsns.close
set rsns=nothing
%>
</ul></div></div>
</div>
<div class="kon"></div><div class="kon"></div>
</div>
 <%
call bottom()
Call closedb()
%> 


</body>
</html>