<!--#include file = edit/Include/DeCode.asp -->
<!--#include file = admin_conn.asp -->
<head>
<!--#include file = language.asp -->
<!--#include file = titleb.asp -->
<style>
<!--
a:link       { font-size: 9pt; font-family: 宋体; color: #000000;text-decoration: none; }
a:visited    { color: #000000; font-family: 宋体; font-size: 9pt;text-decoration: none; }
a:hover      { font-size: 9pt; font-family: 宋体; color: #000000;TEXT-DECORATION: underline; }
body         { font-family: 宋体; color: #000000; font-size: 9pt }
p            { color: #000000; font-family: 宋体; font-size: 9pt }
td           { font-size: 9pt; font-family: 宋体; color: #000000 }
input        { font-size: 9pt; font-family: 宋体; color: #000000 }

-->
</style>
</head>

<%
path="/news/"
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open "select * from [config]",conn,1,1
if rs.recordcount<>0 then
   path=rs("path")
end if
rs.close
set rs=nothing

lmid=trim(request("lm"))
lm2=trim(request("lm2"))
if lmid="" then lmid=lm2
if lm2="" then lm2=lmid
open=trim(request("open"))
bg=trim(request("bg"))
w=trim(request("w"))
h=trim(request("h"))
nr=trim(request("nr"))
nrtop=trim(request("nrtop"))
n=trim(request("n"))
pic=trim(request("pic"))
if bg="" then bg="ffffff"
%>
<Body bgcolor=<%=bg%>>
<%
if lmid="" then 
  response.write "调用代码不正确"
  response.end 
end if
if lmname="" then lmname=0
if w="" then w=150
if nr="" then nr=0
if h="" then h=150
if nrtop="" then nrtop=100
if n="" then n=20
if open="" then open=1
if pic="" then pic=1

pic=clng(pic)

if pic<1 then pic=1


sql = "select top "&pic&" * from news where (lm='"&lm2&"' or lm2='"&lm2&"' or lm3='"&lm2&"') and pic<>' ' and sh=1 order by ontop , id desc"
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,1
if rs.recordcount=0 then response.write "<center><BR><BR>暂无图片"
while not rs.eof
%><center>


<table border="0" width="100%" id="table1">
	<tr>
		<td align=center><a href="<%=path%>news_view.asp?newsid=<%=rs("id")%>"
 <%
 if open=1 then 
     response.write "target=_blank"
 else
   response.write "target=_top" 
 end if
%>>
<img src=<%=rs("pic")%> width=<%=w%> height=<%=h%> border=0><br>
<font color="<%=rs("titlecolor")%>">
<%=left(rs("title"),n)%><%if len(rs("title"))>=n then response.write "…"%></font></a></td>

<%
if nr="1" then
%>

<td valign=top>
<%
bbbb=rs("content")
bbbb=replace(bbbb,chr(32),"")
bbbb=replace(bbbb,chr(13),"")
bbbb=replace(bbbb,chr(10),"")
bbbb=replace(bbbb,chr(9),"")
bbbb=replace(bbbb,"&nbsp;","")
bbbb=glhtml(bbbb)
bbbb=trim(bbbb)
response.write left(bbbb,nrtop)
%>
</td>
<%end if%>
	</tr>
	</table></center>
	<%
rs.movenext
wend
%>


</body> 
