<%@ Language=VBScript%>
<!--#include file="conn.asp"-->
<!--#include file="ConnUser.asp"-->
<!--#include file="config.asp"-->
<!--#include file="function.asp"-->
<!--#include file="char.inc"-->

<%
if reviewable="1" then
	set rs=server.CreateObject("ADODB.RecordSet")
	rs.Source="select * from "& db_wygkcn_Type_Table &" order by E_typeorder"
	rs.Open rs.Source,conn,1,1

	dim ArrayE_typeid(10000),ArrayE_typename(10000),Arraytypecontent(10000)
	typeCount=rs.RecordCount
	for i=1 to typeCount
		ArrayE_typeid(i)=rs("E_typeid")
		ArrayE_typename(i)=rs("E_typename")
		Arraytypecontent(i)=rs("typecontent")
		rs.MoveNext
	next
	rs.Close

	EC_ArticleID=Request.QueryString("EC_ArticleID")

	if EC_ArticleID="" then
		Response.Write "<script>alert('未指定参数');history.back()</script>"
		response.end
	else
		if not IsNumeric(EC_ArticleID) then
			response.write "<script>alert('非法参数');history.back()</script>"
			response.end
		else
			reviewid=Request.QueryString("reviewid")
		end if
	end if
	%>
<!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" lang="gb2312">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>文章评论_<%=eChSys_Com%></title>
<LINK href=CSS/Wygkcn_Home.css rel=stylesheet>
<LINK href="CSS/Wygkcn_News.css" rel="stylesheet">
<script language="javascript">
<!--
function CheckFormAddReview()	//检测评论发表栏填写项目是否为空
{
	if(document.AddReview.Author.value=="")
	{
		alert("请输入用户名！");
		document.AddReview.Author.focus();
		return false;
	}
	if(document.AddReview.email.value == "")
	{
		alert("请输入您的EMAIL！");
		document.AddReview.email.focus();
		return false;
	}
	if(document.AddReview.verifycode.value == "")
	{
		alert("请输入验证码！");
		return false;
	}
	if(document.AddReview.content.value == "")
	{
		alert("请输入评论内容！");
		return false;
	}
}

function changedata() {
	if ( document.AddReview.none.checked ) {
		document.AddReview.Author.value = "游客";
	} 
}
function changedata1() {
	if ( document.AddReview.none1.checked ) {
		document.AddReview.email.value = "58728@tqgk.net";
	} 
}

	function MM_goToURL() { //v3.0
	var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
	for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
	}

	function MM_openBrWindow(theURL,winName,features) { //v2.0
	window.open(theURL,winName,features);
	}
	//-->
</script>

</head>
<body>
<!--内容部分开始-->
<div id="EC_Content">
<!--#include file="Top.asp"-->

<!--中间内容部分开始-->
<div id="EC_Cnt_center">
<!--左边部分开始-->

<div class="EC_Cnt_Left float_left">
<!--位置导航部分开始-->
<div class="position">
<img src="Images/lm_dot.gif" width="11" height="11">&nbsp;&nbsp;您的位置&nbsp;&nbsp;<a href="./" >首页</a> >> 评论：
        <%set rs1=server.CreateObject("ADODB.RecordSet")
		rs1.Source="select * from "& db_wygkcn_Article_Table &" where EC_ArticleID="&EC_ArticleID
		rs1.Open rs1.Source,conn,1,1
		if not rs1.EOF then
			title=htmlencode4(rs1("title"))
			titlecolor=rs1("titlecolor")
			Response.Write title
		else
			Response.Write "未知文章"
		end if
		rs1.close
		set rs1=nothing
%>
</div>
<!--位置导航部分结束-->
<!--正文部分开始-->
<div class=EC_Content_Left>

<div class="comment_tit">	  
<font color="<%=titlecolor%>" size="+2" face="楷体_GB2312"><a href="wygkcn_ShowArticle.asp?EC_ArticleID=<%=EC_ArticleID%>"><%=title%></a>点击查看原文</font></div>
<ul>
       <%
	    set rs=server.CreateObject("ADODB.RecordSet")
		rs.Source="select * from "& db_wygkcn_Review_Table &" where EC_ArticleID=" & EC_ArticleID & " and passed=1 order by reviewid desc"
		rs.Open rs.Source,conn,3,1

		PageShowSize = 10            '每页显示多少个页
		MyPageSize   = 10           '每页显示多少条
	
		If Not IsNumeric(Request("page")) Or IsEmpty(Request("page")) Or Request("page") <=0 Then
			MyPage=1
		Else
			MyPage=Int(Abs(Request("page")))
		End if
		if rs.EOF then  NoReview=1
			if NoReview then
				Response.Write "<li>该信息当前没有评论！</li>"
			else
				'if not NoReview then
				Rs.PageSize     = MyPageSize
				MaxPages         = Rs.PageCount
				Rs.absolutepage = MyPage
				total            = Rs.RecordCount
				i = 0
	 %>

（以下留言仅代表网友的个人观点，不代表本站观点。）
<%
do until Rs.Eof or i = Rs.PageSize
author=server.HTMLEncode(trim(rs("author")))
email=server.HTMLEncode(trim(rs("email")))
reviewip=rs("reviewip")
content=trim(rs("content"))
%>			
<li class=comment_list>
发表人：<%=author%>&nbsp;&nbsp;
发表人邮件：<a href='mailto:<%=email%>'><%=email%></a>&nbsp;&nbsp;
发表时间：<%=rs1("updatetime")%>&nbsp;&nbsp;
<%if Request.cookies(echsys)("key")="super" or showip="1" then%>IP：<%=reviewip%><%end if%>
</li>
<li>
<%	
DisplayContent=CheckStr(Content)
Response.Write "&nbsp;&nbsp;&nbsp;&nbsp;" & displaycontent
%>
</li>	
<%
Rs.MoveNext
i = i + 1
loop
%>		
<div class=comm_pages>
共 <%=total%> 条，第 <%=Mypage%>/<%=Maxpages%> 页，每页 <%=MyPageSize%> 条
<%
			url="review.asp?EC_ArticleID=" & EC_ArticleID									
			PageNextSize=int((MyPage-1)/PageShowSize)+1
			Pagetpage=int((total-1)/Rs.PageSize)+1
			if PageNextSize >1 then
				PagePrev=PageShowSize*(PageNextSize-1)
				Response.write "<a href='" & Url & "&page=" & PagePrev & "' title='上" & PageShowSize & "页'>上一翻页</a> "
				Response.write "<a href='" & Url & "&page=1' title='第1页'>页首</a> "
			end if
			if MyPage-1 > 0 then
				Prev_Page = MyPage - 1
				Response.write "<a href='" & Url & "&page=" & Prev_Page & "' title='第" & Prev_Page & "页'>上一页</a> "
			end if

			if Maxpages>=PageNextSize*PageShowSize then
				PageSizeShow = PageShowSize
			Else
				PageSizeShow = Maxpages-PageShowSize*(PageNextSize-1)
			End if
			If PageSizeShow < 1 Then PageSizeShow = 1
				for PageCounterSize=1 to PageSizeShow
					PageLink = (PageCounterSize+PageNextSize*PageShowSize)-PageShowSize
					if PageLink <> MyPage Then
						Response.write "<a href='" & Url & "&page=" & PageLink & "'>[" & PageLink & "]</a> "
					else
						Response.Write "<B>["& PageLink &"]</B> "
					end if
					If PageLink = MaxPages Then Exit for
				Next
				if Mypage+1 <=Pagetpage  then
					Next_Page = MyPage + 1
					Response.write "<a href='" & Url & "&page=" & Next_Page & "' title='第" & Next_Page & "页'>下一页</A>"
				end if
				if MaxPages > PageShowSize*PageNextSize then
					PageNext = PageShowSize * PageNextSize + 1
					Response.write " <A href='" & Url & "&page=" & Pagetpage & "' title='第"& Pagetpage &"页'>页尾</A>"
					Response.write " <a href='" & Url & "&page=" & PageNext & "' title='下" & PageShowSize & "页'>下一翻页</a>"
				End if
			End If
			%>
</div>					
</ul>
<div class=comment_tab>

<form method="POST" action="AddReview.asp" name=AddReview  onSubmit="return CheckFormAddReview();">
<%if Request.cookies(echsys)("username")<>"" then%>
<input type=hidden name=EC_ArticleID value=<%=EC_ArticleID%>>
用户名：<input type="text" name="Author" style="width:100px;height:16px;border:1px solid #9FAABF" value="<%=Request.cookies(echsys)("UserName")%>" readonly>
电子邮件：<input type="text" name="email" style="width:100px;height:16px;border:1px solid #9FAABF" value="<%=Request.cookies(echsys)("UserEmail")%>" >
验证码：<input name="verifycode" type="text"  style="width:50px;height:16px;border:1px solid #9FAABF" ><%=getcode1()%>
<br/>
评论内容：（100字以内）
<% if M_MAIN=1 then %>
<font color=red >签收文件</font>： <img class=None  src="images/watermark.gif" align="absmiddle" border="0" style="cursor:hand;" alt="签收文件" lANGUAGE="javascript" onClick="sign()"><br/>
<% end if%>
<script language="javascript">
var bTextMode=false;
document.write ('<iframe src="guestbox.asp?action=new" id="message" width="98%" height="100" frameborder=yes scrolling=no align=center></iframe>')
frames.message.document.designMode = "On";
</script>
<br/>
<input type="hidden" name="editor" value="<%=editor%>">
<input name="passed" type="hidden" value="<%if reviewcheck="1" then%>1<%else%>0<%end if%>">
<input type="submit" value="发表评论" name="Submit3" OnClick="document.AddReview.content.value = frames.message.document.body.innerHTML;">
<input name="reset" type=reset value="重新填写">
<input type="hidden" name="content" value="">
<input type="hidden" name="title" value="评论：<%=title%>">
<%else%>
<input type=hidden name=EC_ArticleID value=<%=EC_ArticleID%>>
用户名：<input type="text" name="Author" style="width:100px;height:16px;border:1px solid #9FAABF">
游客：<INPUT onclick=changedata() type=checkbox value=true  name=none>
电子邮件：<input name="email" type="text" value="" style="width:100px;height:16px;border:1px solid #9FAABF">
游客：<INPUT onclick=changedata1() type=checkbox value=true  name=none1>
验证码：<input name="verifycode" type="text"  style="width:50px;height:16px;border:1px solid #9FAABF" ><%=getcode1()%>
<br/>
评论内容：（100字以内）<br/>
<script language="javascript">
document.write ('<iframe src="guestbox.asp?action=new" id="message" width="98%" height="100" frameborder=yes scrolling=no align=center></iframe>')
frames.message.document.designMode = "On";
</script><br/>
<input type="hidden" name="editor" value="<%=editor%>">
<input name="passed" type="hidden" value="<%if reviewcheck="1" then%>1<%else%>0<%end if%>">
<input type="submit" value="发表评论" name="Submit3" OnClick="document.AddReview.content.value = frames.message.document.body.innerHTML;">
<input name="reset2" type=reset value="重新填写">
<input type="hidden" name="content" value="">
<input type="hidden" name="title" value="评论：<%=title%>">
<%end if%>
</form>

</div>
</div>

<!--正文部分结束-->
</div>
<!--左边部分结束-->

<div class="EC_Cnt_Right float_right">
<div class="EC_n_right lianmu_bg">
<H3>热门文章</H3>
<DIV>
<ul class="list">
<%
set Rs_hot=server.CreateObject("ADODB.RecordSet")
if uselevel=1 then
if Request.cookies(echsys)("key")="super" or Request.cookies(echsys)("key")="typemaster" or Request.cookies(echsys)("key")="bigmaster" or Request.cookies(echsys)("key")="smallmaster" or Request.cookies(echsys)("key")="check" then
Rs_hot.Source="select top "&top_txt&" * from "& db_wygkcn_Article_Table &" where  Checked=1  order by click DESC,EC_ArticleID desc"
end if
if Request.cookies(echsys)("key")="" then
Rs_hot.Source="select top "&top_txt&" * from "& db_wygkcn_Article_Table &" where (Checked=1 and newslevel=0  ) order by click DESC,EC_ArticleID desc"
end if
if Request.cookies(echsys)("key")="selfreg" then
	if Request.cookies(echsys)("reglevel")=3 then
Rs_hot.Source="select top "&top_txt&" * from "& db_wygkcn_Article_Table &" where Checked=1 order by click DESC,EC_ArticleID desc"
	end if
	if Request.cookies(echsys)("reglevel")=2 then
Rs_hot.Source="select top "&top_txt&" * from "& db_wygkcn_Article_Table &" where Checked=1 order by click DESC,EC_ArticleID desc"
	end if
	if Request.cookies(echsys)("reglevel")=1 then
Rs_hot.Source="select top "&top_txt&" * from "& db_wygkcn_Article_Table &" where Checked=1 order by click DESC,EC_ArticleID desc"
	end if
end if
else
Rs_hot.Source="select top "&top_txt&" * from "& db_wygkcn_Article_Table &" where Checked=1 order by click DESC,EC_ArticleID desc"
end if
Rs_hot.Open Rs_hot.Source,conn,1,1
Do While Not Rs_hot.Eof
		newsurl="wygkcn_ShowArticle.asp?EC_ArticleID=" & rs_hot("EC_ArticleID")
		newswwwurl=rs_hot("titleface")
		fileExt=lcase(getFileExtName(rs_hot("picname")))
%>
<li><span class="float_right">[<%=rs_hot("click")%>]</span>·<a href="<%if rs_hot("titleface")="无" then %><%=newsurl%><% else %> <%=newswwwurl%><%end if%>" title="<%=htmlencode4(rs_hot("title"))%>" target="_blank"> <font color="<%=rs_hot("titlecolor")%>"> <%=CutStr(htmlencode4(rs_hot("title")),28)%> </font> </a></li>
<%
Rs_hot.Movenext
Loop
Rs_hot.Close
Set Rs_hot=Nothing	
%>	
</ul>
</div>
</div>


</div>
<!--右边部分结束-->
<div class=clear_float></div>
</div>
<!--中间内容部分结束-->
<!--#include file="bottom.asp"-->
</div>
<!--内容部分结束-->
</body>
</html>
<%else%>
<script language=javascript>
alert("对不起，评论功能已被管理员关闭！")
</script>
<body  onload="javascript:window.close()">
</body>
<%end if%>