<!--#include file="inc/conn.asp"-->
<!--#include file="inc/set.asp"-->
<!--#include file="inc/dll.asp"-->
<!--#include file="inc/inc.asp"-->
<%
title="新闻动态"
call pass()
call top()
YCMS("<table border='0' cellspacing='0' cellpadding='0' align='center' class='bgcolor'>")
YCMS("<tr><td class='left'></td><td class='width' valign='top'>")
YCMS("<table width='100%' border='0'  cellspacing='0' cellpadding='0'>")
YCMS("<td valign=top>")
call br()
YCMS("<table border='0' cellspacing='0' cellpadding='0'><td  class='lefttopcenter'>&emsp;※&nbsp;会员登陆</td><td  class='lefttopright'></td></tr></table>")
YCMS("<table border='0' cellspacing='0' cellpadding='0'><tr><td valign=top class='leftcentercenter'  height='150'>")
call login()
YCMS("</td><td class='leftcenterright'></td></tr></table>")
YCMS("<table border='0'  cellspacing='0' cellpadding='0'><tr><td class='leftfootcenter'></td><td class='leftfootright'></td></tr></table>")
call br()
YCMS("<table border='0' cellspacing='0' cellpadding='0'><td class='lefttopcenter'>&emsp;※&nbsp;站内搜索</td><td class='lefttopright'></td></tr></table>")
YCMS("<table border='0' cellspacing='0' cellpadding='0'><tr><td valign=top class='leftcentercenter'  align='center'>")
call search()
YCMS("</td><td class='leftcenterright'></td></tr></table>")
YCMS("<table border='0' cellspacing='0' cellpadding='0'><tr><td class='leftfootcenter'></td><td class='leftfootright'></td></tr></table>")
call br()
YCMS("<table border='0'   cellspacing='0' cellpadding='0'><td class='lefttopcenter'>&emsp;※&nbsp;新闻分类</td><td class='lefttopright'></td></tr></table>")
YCMS("<table border='0' cellspacing='0' cellpadding='0'><tr><td height=100 class='leftcentercenter'>")
call br()
call yecaoclass("YC_newsclass","news")
call br()
YCMS("</td><td class='leftcenterright'></td></tr></table>")
YCMS("<table border='0'  cellspacing='0' cellpadding='0'><tr><td class='leftfootcenter'></td><td class='leftfootright'></td></tr></table>")
call br()
YCMS("<table border='0' cellspacing='0' cellpadding='0'><td class='lefttopcenter'>&emsp;※&nbsp;点击排行</td><td  class='lefttopright'></td></tr></table>")
YCMS("<table border='0' cellspacing='0' cellpadding='0'><tr><td  class='leftcentercenter' height=60 style='line-height:120%;'>")
call br()
set rstop=server.createobject("adodb.recordset")
if request.querystring("class")<>"" then
sql="select * from [YC_news] where pass=true and class="&request.querystring("class")&" order by click DESC"
else
sql="select * from [YC_news] where pass=true order by click DESC"
end if
rstop.open sql,conn,1,1
n=0
do while not rstop.eof
YCMS("·<a href='shownews.asp?id="&rstop("id")&"' target='news' TITLE='新闻名称："&rstop("title")&"<br>发布会员："&rstop("user")&"<br>发布日期："&rstop("date")&"<br>点击次数："&rstop("click")&"'>"&YC_Kill_Word(rstop("title"),20)&"</a><br>")
n=n+1
if n=clng(toplist) then exit do end if
rstop.movenext
loop
if rstop.eof and rstop.bof then
YCMS("<center><font color=red><b>没有相关新闻！<b></font></center>")
end if
rstop.close
set rstop=nothing
call br()
YCMS("</td><td class='leftcenterright'></td></tr></table>")
YCMS("<table border='0' cellspacing='0' cellpadding='0'><tr><td class='leftfootcenter'></td><td class='leftfootright'></td></tr></table>")
call br()
YCMS("<table border='0' cellspacing='0' cellpadding='0'><td class='lefttopcenter'>&emsp;※&nbsp;本站推荐</td><td  class='lefttopright'></td></tr></table>")
YCMS("<table border='0' cellspacing='0' cellpadding='0'><tr><td class='leftcentercenter' height=60 style='line-height:120%;'>")
call br()	
set rsbest=server.createobject("adodb.recordset")
sql="select * from [YC_news] where pass=true and best=true order by id DESC"
rsbest.open sql,conn,1,1
n=0
do while not rsbest.eof
YCMS("·<a href='shownews.asp?id="&rsbest("id")&"' target='news' TITLE='新闻名称："&rsbest("title")&"<br>发布会员："&rsbest("user")&"<br>发布日期："&rsbest("date")&"<br>点击次数："&rsbest("click")&"'>"&YC_Kill_Word(rsbest("title"),20)&"</a><br>")
n=n+1
if n=clng(bestlist) then exit do end if
rsbest.movenext
loop
if rsbest.eof and rsbest.bof then
YCMS("<center><font color=red><b>没有推荐新闻！<b></font></center>")
end if
rsbest.close
set rsbest=nothing
call br()
YCMS("</td><td class='leftcenterright'></td></tr></table>")
YCMS("<table border='0'  cellspacing='0' cellpadding='0'><tr><td class='leftfootcenter'></td><td class='leftfootright'></td></tr></table>")
call br()
YCMS("</td><td  width='5'></td><td valign='top' align='right'>")
call br()  
if request.querystring("action")<>"list" then
YCMS("<table border='0' cellspacing='0' cellpadding='0'><tr><td class='righttopleft'></td><td class=righttopcenter>&emsp;图文新闻</td></tr></table>")
YCMS("<table border='0' cellspacing='0' cellpadding='0'><tr><td class='rightcenterleft'></td><td  class='rightcentercenter' valign='top'>")
YCMS("<table id='yecaotable' cellspacing='0' cellpadding='0' border='1' bordercolor='#bcbcbc' bgcolor='#ffffff' width='100%' rules='rows' frame='void'>")
sql="select top 4 * from YC_news where pic<>'' and pass=true order by id DESC"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
YCMS("<table cellspacing='0' cellpadding='0' border='0' bgcolor='#ffffff' width='100%'><tr>")
do while not rs.eof
YCMS("<td height=140><TABLE cellSpacing=0 cellPadding=0 width=120 border=0 align='center'>")
YCMS("<TR><TD vAlign=bottom align=middle>")
YCMS("<TABLE cellSpacing=1 cellPadding=0 bgColor=#e1e1e1 border=0>")
YCMS("<TR><TD bgColor=#ffffff>")
YCMS("<TABLE cellSpacing=1 cellPadding=0 bgColor=#d7d7d7 border=0>")
YCMS("<TR><TD bgColor=#ffffff>")
YCMS("<TABLE cellSpacing=1 cellPadding=0 bgColor=#808080 border=0>")
YCMS("<TR><TD bgColor=#ffffff>")
YCMS("<TABLE cellSpacing=0 cellPadding=1 width='100%' border=0>")
YCMS("<TR><TD align=middle style='padding:4px;'>")
YCMS("<a href='shownews.asp?id="&rs("id")&"' target='art'>")
YCMS("<img src='"&rs("pic")&"' border=0 TITLE='新闻名称："&rs("title")&"<br>发布会员："&rs("user")&"<br>发布日期："&rs("date")&"<br>点击次数："&rs("click")&"' style='width:115px;height:90px;border:1px solid #444;' align='absmiddle'></a>")
YCMS("</TD></TR></TABLE></TD></TR></TABLE></TD></TR></TABLE></TD></TR></TABLE></TD></TR></TABLE>")
call br()
YCMS("<center><a href='shownews.asp?id="&rs("id")&"' target='news'>"&YC_Kill_Word(rs("title"),16)&"</a></center>")
call br()
rs.movenext
loop
if rs.eof and rs.bof then
YCMS("<td align=center height=60>暂时没有新闻图片！</td>")
end if
rs.close
set rs=nothing
YCMS("</TR></table></TD></TR></table><table border='0' cellspacing='0' cellpadding='0'><tr><td class='rightfootleft'></td><td class='rightfootcenter'></td></tr></table>")
call br()
end if
if request.querystring("action")="" then
call bigclass("YC_newsclass","news")
elseif request.querystring("action")="small" then
call smallclass("YC_newsclass","news",request.querystring("id"))
elseif request.querystring("action")="list" then
sql="select * from [YC_news] where pass=true and class="&request.querystring("class")&" order by id DESC"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
YCMS("<table border='0' cellspacing='0' cellpadding='0'><tr><td class=righttopleft></td><td class=righttopcenter>&emsp;新闻列表</td></tr></table>")
YCMS("<table border='0'   cellspacing='0' cellpadding='0'><tr><td class=rightcenterleft></td><td  class=rightcentercenter valign=top>")
YCMS("<table id='yecaotable' cellspacing='0' cellpadding='0' border=1 bordercolor=#bcbcbc bgcolor=ffffff width=100% rules=rows frame=void>")
if not rs.bof and not rs.eof then
rs.pagesize=cint(yecaopage(0))
i=1
mypage=request("page")
if mypage="" then
mypage=1
else
mypage=cint(mypage)
end if
pages=rs.pagecount
rs.absolutepage=mypage
do while not rs.eof
YCMS("<tr><td height=25 width='80%'>·<a  href='shownews.asp?id="&rs("id")&"' target='news' TITLE='新闻名称："&rs("title")&"<br>发布会员："&rs("user")&"<br>发布日期："&rs("date")&"<br>点击次数："&rs("click")&"'>"&YC_Kill_Word(rs("title"),30)&"</a>&nbsp;")
if rs("best")=true then
YCMS("『<font color=red>推荐</font>』")
end if
YCMS("</td><td aalign='center' width='5%'>"&rs("click")&"</td><td width='15%'>"&rs("date")&"</td></tr>")
if i=rs.pagesize then exit do end if
i=i+1
rs.movenext
loop
end if
if rs.eof and rs.bof then
YCMS("<tr><td colspan=6 height=100 align='center'><font color=red><b>暂时没有新闻！</b></font></td></tr>")
else
YCMS("<tr class=bg><td colspan=3 height=25 align='center'>")
call page("新闻","篇")
YCMS("</td></tr>")
end if
YCMS("</table></form></TD></TR></table>")
YCMS("<table border='0' cellspacing='0' cellpadding='0'><tr><td  class=rightfootleft></td><td class=rightfootcenter></td></tr></table>")
call br()
rs.close
set rs=nothing
end if
YCMS("</td></tr></table></td><td class=right></td></tr></table>")
call foot()
%>