<!--#include file="../inc/conn.asp"-->
<!--#include file="inc/Function.asp"-->
<!--#include file="../inc/ubb.asp"-->
<% 
NewsArticleID = SafeRequest("id",1)
set News = conn.execute("select  * from NewsArticle where Audit=1 and NewsArticleID="&NewsArticleID&"")
Title=News("Title")
NewsClassID=News("NewsClassID")
Checkintime=News("Checkintime")
AllNums=News("AllNums")
Content=News("Content")
CopyFrom=News("CopyFrom")
UserID=News("UserID")
FilePath=News("FilePath")
Author=News("Author")
News.close
'最新资讯
Function GetCommendList()
	tempStr="<table width=""99%"" border=""0"" cellspacing=""0"" cellpadding=""0"">"
    tempStr=tempStr&"<tr>"
    tempStr=tempStr&"<td height=""6""></td>"
    tempStr=tempStr&"</tr>"
	Set rs=Conn.Execute("SELECT Top 30 NewsArticleID,Title,FilePath FROM NEWSARTICLE WHERE  Commend=1 ORDER BY AllNums DESC")
	Do While not rs.EOF

    tempStr=tempStr&"<tr>"
    tempStr=tempStr&"<td height=""23"" class=""left"">·<a href=""/news/news.asp?id="&rs("NewsArticleID")&""">"&Left(rs("Title"),14)&"</a> </td>"
    tempStr=tempStr&" </tr>"
	
	rs.Movenext
	Loop
	rs.Close
	set rs = nothing
	
    tempStr=tempStr&"<tr>"
    tempStr=tempStr&"<td height=""10""></td>"
    tempStr=tempStr&"</tr>"
    tempStr=tempStr&"</table>"
	GetCommendList=tempStr
End Function

Function GetMood(NewsArticleID)
tempStr="<script language=""JavaScript"" type=""text/JavaScript"">"
tempStr=tempStr&"var webindex_url = '"&web_url&"';"
tempStr=tempStr&"var infoid = '"&NewsArticleID&"';"
tempStr=tempStr&"var classid = 'news';"
tempStr=tempStr&"</script>"
tempStr=tempStr&"<script language = 'JavaScript' src ='/js/mood.js'></script>"
tempStr=tempStr&"<hr / class='piaoqing'>"
tempStr=tempStr&"<table width='528' border='0' cellpadding='0' cellspacing='2' style='font-size:12px;margin-top: 20px;margin-bottom: 20px;'>"
tempStr=tempStr&"<tr>"
tempStr=tempStr&"<td colspan='8' id='moodtitle'  class='left'></td>"
tempStr=tempStr&"</tr>"
tempStr=tempStr&"<tr align='center' valign='bottom'>"
tempStr=tempStr&"<td height='60' id='moodinfo0'>"
tempStr=tempStr&"</td><td height='30' id='moodinfo1'>"
tempStr=tempStr&"</td><td height='30' id='moodinfo2'>"
tempStr=tempStr&"</td><td height='30' id='moodinfo3'>"
tempStr=tempStr&"</td><td height='30' id='moodinfo4'>"
tempStr=tempStr&"</td><td height='30' id='moodinfo5'>"
tempStr=tempStr&"</td><td height='30' id='moodinfo6'>"
tempStr=tempStr&"</td><td height='30' id='moodinfo7'>"
tempStr=tempStr&"</td></tr>"
tempStr=tempStr&"<tr align='center' valign='middle'>"
tempStr=tempStr&"<td><img src='/images/piaoqing/0.gif' width='40' height='40'></td>"
tempStr=tempStr&"<td><img src='/images/piaoqing/1.gif' width='40' height='40'></td>"
tempStr=tempStr&"<td><img src='/images/piaoqing/2.gif' width='40' height='40'></td>"
tempStr=tempStr&"<td><img src='/images/piaoqing/3.gif' width='40' height='40'></td>"
tempStr=tempStr&"<td><img src='/images/piaoqing/4.gif' width='40' height='40'></td>"
tempStr=tempStr&"<td><img src='/images/piaoqing/5.gif' width='40' height='40'></td>"
tempStr=tempStr&"<td><img src='/images/piaoqing/6.gif' width='40' height='40'></td>"
tempStr=tempStr&"<td><img src='/images/piaoqing/7.gif' width='40' height='40'></td>"
tempStr=tempStr&"</tr>"
tempStr=tempStr&"<tr>"
tempStr=tempStr&"<td align='center' >惊呀</td>"
tempStr=tempStr&"<td align='center' >欠揍</td>"
tempStr=tempStr&"<td align='center' >支持</td>"
tempStr=tempStr&"<td align='center' >很棒</td>"
tempStr=tempStr&"<td align='center' >愤怒</td>"
tempStr=tempStr&"<td align='center' >搞笑</td>"
tempStr=tempStr&"<td align='center' >恶心</td>"
tempStr=tempStr&"<td align='center' >不解</td>"
tempStr=tempStr&"</tr>"
tempStr=tempStr&"<tr align='center'>"
tempStr=tempStr&"<td><input onClick=""get_mood('mood1')"" type='radio' name='radiobutton' value='radiobutton'></td>"
tempStr=tempStr&"<td><input onClick=""get_mood('mood2')"" type='radio' name='radiobutton' value='radiobutton'></td>"
tempStr=tempStr&"<td><input onClick=""get_mood('mood3')"" type='radio' name='radiobutton' value='radiobutton'></td>"
tempStr=tempStr&"<td><input onClick=""get_mood('mood4')"" type='radio' name='radiobutton' value='radiobutton'></td>"
tempStr=tempStr&"<td><input onClick=""get_mood('mood5')"" type='radio' name='radiobutton' value='radiobutton'></td>"
tempStr=tempStr&"<td><input onClick=""get_mood('mood6')"" type='radio' name='radiobutton' value='radiobutton'></td>"
tempStr=tempStr&"<td><input onClick=""get_mood('mood7')"" type='radio' name='radiobutton' value='radiobutton'></td>"
tempStr=tempStr&"<td><input onClick=""get_mood('mood8')"" type='radio' name='radiobutton' value='radiobutton'></td>"
tempStr=tempStr&"</tr>"
tempStr=tempStr&"</table>"
tempStr=tempStr&"<script type='text/javascript'>remood();</script>"
GetMood=tempStr
End Function

	Function GetNextArticle()
		Set rs=Conn.Execute("Execute dbo.p_wh_CommonSelect 'NewsArticle','Top 1 NewsArticleID,Title,FilePath','',2,'Recy=0 And Audit=1 And NewsArticleID>"&NewsArticleID&" And NewsClassID="&NewsClassID&"'")
		If rs.Eof Then
			GetNextArticle = "没有下一篇了"
			NextArticlePath = "/"			
		else
			GetNextArticle = "下一篇：<a href='"& temphtmlpath & Rs("FilePath") &"/"& Rs("NewsArticleID") &"_1.htm'>"& Rs("Title") &"</a>"
			NextArticlePath = temphtmlpath & Rs("FilePath") &"/"& Rs("NewsArticleID") &"_1.htm"
		end if
		rs.Close
		set rs = nothing
	End Function

	Function GetPreviewArticle()
		Set rs=Conn.Execute("Execute dbo.p_wh_CommonSelect 'NewsArticle','Top 1 NewsArticleID,Title,FilePath','NewsArticleID',1,'Recy=0 And Audit=1 And NewsArticleID<"&NewsArticleID&" And NewsClassID="&NewsClassID&"'")
		if rs.EOF Then
			GetPreviewArticle = "没有上一篇了"
		else
			GetPreviewArticle = "上一篇：<a href='"& temphtmlpath & Rs("FilePath") &"/"& Rs("NewsArticleID") &"_1.htm'>"& Rs("Title") &"</a>"
		end if
		rs.Close
		set rs = nothing
	End Function
	
	Function GetArticleReviews(NewsArticleID)
	Set Rs=Conn.execute("select NewsArticleID,Content,IsNull(UserID,'') as UserID,Checkintime from newsreview where NewsArticleID="&NewsArticleID&" and Locked=0 Order by Checkintime desc")
	Do while not Rs.eof
		If Rs("UserID")="" Or Rs("UserID")="匿名" Or Rs("UserID")="游客" Then
			UserStr="<span class=""style7"">匿名</span>"
			UserPic="<img src=""/UserFile/Photo/NoZonePhoto.gif"" width=""55"" height=""55"">"
			UserInfo=""
		Else
			UserStr="<a href=""http://"&web_url&"/my/?u="&Rs("UserID")&""" target=""_blank"">"&Rs("UserID")&"</a>"
			Set RsInfo=Conn.execute("select IsNull(ZonePhoto,'') as ZonePhoto,Hits from tuserzone where userid='"&Rs("UserID")&"'")
			If RsInfo("ZonePhoto")="" Then
				UserPic="<img src=""/UserFile/Photo/NoZonePhoto.gif"" width=""55"" height=""55"">"
			Else
				FileNameArr=Split(RsInfo("ZonePhoto"),".")
				PhotoPathSmall=FileNameArr(0)&"."&FileNameArr(1)
				UserPic="<a href=""http://"&web_url&"/my/?u="&Rs("UserID")&""" target=""_blank""><img src=""http://"&web_url&"/"&PhotoPathSmall&""" width=""55"" height=""55"" border=""0""></a>"
			End If 
			UserInfo="地盘人气："&RsInfo("Hits")&" <a href=""/my/AddFriend.asp?U="&Rs("UserID")&"""><span class=""style7"">加为好友</span></a>"
			
			RsInfo.Close
			Set RsInfo=Nothing			
		End If
		tempStr=tempStr&"<table width=""600"" border=""0"" cellspacing=""0"" cellpadding=""0"">"
		tempStr=tempStr&"<tr>"
		tempStr=tempStr&"<td width=""80"" align=""center""><table width=""55"" height=""55"" border=""0"" cellpadding=""0"" cellspacing=""1"" bgcolor=""#000000"">"
		tempStr=tempStr&"<tr>"
		tempStr=tempStr&"<td bgcolor=""#FFFFFF"" class=""left"">"&UserPic&"</td>"
		tempStr=tempStr&" </tr>"
		tempStr=tempStr&"</table></td>"
		tempStr=tempStr&"<td width=""600""><table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"">"
		tempStr=tempStr&"<tr>"
		tempStr=tempStr&"<td height=""22""  class=""left"">"&UserStr&" 于"&FormatDateTime(Rs("Checkintime"),vbLongDate)&" 发表评论：</td>"
		tempStr=tempStr&"</tr>"
		tempStr=tempStr&"<tr>"
		tempStr=tempStr&"<td height=""22""  class=""left"">"&UserInfo&"</td>"
		tempStr=tempStr&"</tr>"
		tempStr=tempStr&"</table></td>"
		tempStr=tempStr&"</tr>"
		tempStr=tempStr&"</table>"
		
		tempStr=tempStr&"<table width=""600"" border=""0"" cellspacing=""0"" cellpadding=""3"">"
		tempStr=tempStr&"<tr><td height=""10""></td></tr>"
		tempStr=tempStr&"<tr>"
		tempStr=tempStr&"<td height=""22"" style=""word-wrap:break-word;word-break:break-all;""  class=""left"">&nbsp;&nbsp;&nbsp;&nbsp;"&Rs("Content")&"</td>"
		tempStr=tempStr&"</tr>"
		tempStr=tempStr&"</table>"
		
		tempStr=tempStr&"<table width=""600"" height=""20"" border=""0"" cellpadding=""0"" cellspacing=""0"">"
		tempStr=tempStr&"<tr>"
		tempStr=tempStr&"<td><hr size=1 color=""#cccccc""></td>"
		tempStr=tempStr&"</tr>"
		tempStr=tempStr&"</table>"
	Rs.movenext
	Loop
	Rs.Close
	Set Rs=nothing
	If tempStr="" Then
		GetArticleReviews="<center>暂时没有网友评论</center>"
	Else
		GetArticleReviews=tempStr
	End If
End Function
	Function GetArticleReviewSend()
		GetArticleReviewSend="<iframe MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no  src=""/NewsReview/NewsArticleReview.asp?HostUser="&UserID&"&FilePath="&FilePath&"&ArticleID="&NewsArticleID&"&Title="&Title&""" height=250 width=566></iframe>"
	End Function
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="/images/style.css" rel=stylesheet type=text/css>
<title><% =Title%>-新闻资讯-<%=web_name%></title>
<style type="text/css">
<!--
.style1 {
	color: #FFFFFF;
	font-weight: bold;
}
.top1096 {
	margin-top: 10px;
	margin-bottom: 10px;
}
.style2 {color: #1F3A87}
.style3 {color: #666666}
.style4 {
	color: #FF0000;
	font-weight: bold;
}
.style5 {color: #0000FF}
.STYLE6 {
	color: #CA0300;
	font-weight: bold;
}
a.bb:link {font-family: "宋体";font-size: 13px;color: #1F3A87;} 
a.bb:visited {font-family: "宋体";font-size: 13px;color: #1F3A87;} 
a.bb:hover{font-family: "宋体";font-size: 13px;color: #BC2931;} 
a.bb:active {font-family: "宋体";font-size: 13px;color: #BC2931;}
a.aa:link {font-family: "宋体";font-size: 12px;color: #1F3A87;} 
a.aa:visited {font-family: "宋体";font-size: 12px;color: #1F3A87;} 
a.aa:hover{font-family: "宋体";font-size: 12px;color: #BC2931;} 
a.aa:active {font-family: "宋体";font-size: 12px;color: #BC2931;}
a.cc:link {font-family: "宋体";font-size: 13px;color: #000000;} 
a.cc:visited {font-family: "宋体";font-size: 13px;color: #000000;} 
a.cc:hover{font-family: "宋体";font-size: 13px;color: #BC2931;} 
a.cc:active {font-family: "宋体";font-size: 13px;color: #BC2931;}
.style21 {color: #FF7300}
.div13 {
	float: left;
	height: 25px;
	width: 69px;
	line-height: 25px;
	text-align: center;
}
.menu1 {
	height: 30px;
	width: 910px;
	line-height: 30px;
	text-align: left;
	left: 20px;
}
.txt13 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 14px;
	text-align: left;
	text-indent: 20px;
	table-layout: fixed;
	word-wrap: break-word;
	width: 673px;
	overflow: hidden;
	line-height: 25px;
}
.piaoqing {
	width: 99%;
	border: 1px dashed #CCCCCC;
	height: 1px;margin-top: 20px;
}
-->
</style>
</head>
<body topmargin="0" leftmargin="0">
<div align="center">
  <!--#include file="../top.asp"-->
<table width="910" border="0" cellpadding="1" cellspacing="1" bgcolor="#CBCBCB" class="top10">
    <tr>
      <td height="22" bgcolor="#F2F6FB"><%set NewsClass = conn.execute("select  NewsClassName,NewsClassID from NewsClass where ParentID='0' order by NewsClassID desc")
do while not NewsClass.eof
Response.Write("<div class='div13'>&nbsp;<a href='menu.asp?classid="&NewsClass("NewsClassID")&"' class='bb'>"&NewsClass("NewsClassName")&"</a>|</div>")
NewsClass.movenext
loop
NewsClass.close%></td>
    </tr>
  </table>
  <div class="menu1">当前位置：<a href="/">首页</a> >> <a href="/news">资讯频道</a> >> <%
  Set rs=Conn.Execute("Execute dbo.p_wh_CommonSelect 'NewsClass','NewsClassID,NewsClassName','Checkintime',0,'NewsClassID IN("&NewsClassID&")'") 
  Response.Write "&nbsp;<a href='/news/menu.asp?classid=" & rs(0) & "'>" & rs(1) & "</a>&nbsp;"
  Rs.close%><%=conn.execute("select panpao from ad_panpao where ID=25")(0)%><%= GetCommendList() %></td>
      </tr>
      
    </table></td>
    <td>&nbsp;</td>
    <td width="680" valign="top" style="border: 1px solid #CCCCCC;"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="15"> </td>
          </tr>
          <tr>
            <td height="50" align="center" style="font-size:18px;font-weight: bold;"><%= Title %></td>
<%=conn.execute("select panpao from ad_panpao where ID=23")(0)%><%
txt = Content
txtk = eWebEditor_DeCode(txt, "SCRIPT")
Response.Write txtk
%></div></td>
          </tr>
		  <tr>
            <td height="50" class="left"> (来自：<%= CopyFrom %> 作者：<%= Author %>)</td>
          </tr>
		  		   <tr>
            <td><%= GetMood(NewsArticleID) %></td>
          </tr>
		   <tr>
            <td height="50" align="center"><%= GetPreviewArticle() %>&nbsp;&nbsp;<%= GetNextArticle() %></td>
          </tr>

<%=conn.execute("select panpao from ad_panpao where ID=26")(0)%>
            <td height="22" bgcolor="#F2F6FB"><strong> 文章评论</strong></td>
          </tr>
          <tr>
            <td height="10"><%= GetArticleReviews(NewsArticleID) %>
            <p><%= GetArticleReviewSend() %></p></td>
          </tr>
        </table></td>
  </tr>
</table>

  <!--#include file="../bottom.asp"-->
</div>
</body>
</html>
