<%
data_path="../" 'ACC连接数据库路径，对SQL无效
dir="no"
numid="no"
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<!--#include file="../conn/conn.asp"-->
<!--#include file="../inc/safe.asp"-->
<!--#include file="../manage/makehtml/index/temp_inc.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>行业咨迅--评论</title>
<link href="../skins/skin8/style/css.css" type="text/css" rel="stylesheet" />
<link href="../skins/skin8/style/second-list.css" type="text/css" rel="stylesheet" />
<style type="text/css">
<!--
.banner-1 .banner-1-10{float:left;margin:5px 0 0 14px;width:82px; height:22px; padding-top:8px}
.banner-1 .banner-1-10{ background-image:url(../skins/skin8/images/index_banner3bg.jpg); background-position:bottom}
.banner-1 .banner-1-10 a{color:#FFFFFF; text-decoration:none}
.banner-1 .banner-1-10 a:hover{color:#000000; text-decoration:underline}
-->
</style>
<script>

function show(text)
{
	document.getElementById("main_M").innerHTML=text;
}

function GetSearchUrl()
{
	var SearchUrl,keywords;
	SearchUrl=document.getElementById('SearchUrl').value;
	keywords=document.getElementById('keywords').value;
	if(keywords==''||keywords=='请输入公司名称,产品名称,公司地址')
	{
		alert('关键字不能为空');
		return false;
	}
	if(SearchUrl=='')
	{
		alert('请选择搜索类别');
		return false;
	}
	else{
		document.topsearch.action=SearchUrl;
		document.topsearch.submit();
	}
}
-->

</script>
</head>
<body>
<%
id=request.QueryString("id")
if isNumeric(id)=false then
	response.redirect "../info/index.html"
end if
%>
<!--#include file="../inc/head.asp"-->

<div id="way-list">
  <div style="width:920px;height:auto;"> <%
				Set Rs=server.createobject("adodb.recordset")
				SQL="select * from yixiang_tradeinfo where id="&id&" order by typeid desc"
				Rs.Open SQL,Conn,1,1
				If Not Rs.Eof Then
				Rs.pagesize=4'每页记录条数
				
				iCount=Rs.RecordCount '记录总数
				iPageSize=Rs.PageSize
				maxpage=Rs.PageCount
				page=request("page")
	
				If Not IsNumeric(page) or page="" then
					page=1
				Else
					page=cint(page)
				End If
				If page<1 then
					page=1
				ElseIf  page>maxpage then
					page=maxpage
				End If
				Rs.AbsolutePage=Page
				If page=maxpage then
					x=iCount-(maxpage-1)*iPageSize
				Else
					x=iPageSize
				End If
				
				
					Set newRs=server.createobject("adodb.recordset")
					newSQL="select * from yixiang_news where newsid="&rs("id")&" order by typeid desc"
					newRs.Open newSQL,Conn,1,1
					If Not newRs.Eof Then
					response.write "<div style=""background:#FEF8EF; width:920px; height:24px; font-size:16px; padding:4px 0 0 0; border:1px solid #FEDCB9"">对&nbsp;<span style=""font-weight:700"">"&newRs("title")&"</span>&nbsp;的评论</div>"
					End If
					newRs.close
					set newRs=nothing
					for i=1 to Rs.pagesize
					if rs.eof then
					exit for
					end if
					response.write "<table width=""620"" height=""auto"" bgcolor=""#FFFFFF"" style=""text-align:left "" >"
					response.write "<tr><td colspan=2 bgcolor=""#F9F9F9"" style=""font-weight:700; height:24px"" >评论人:"&Rs("username")&"</td></tr>"
					response.write "<tr><td valign=""top"" width=""100""; font-weight:700>评论内容: </td><td>"&Rs("centont")&"</td></tr>"
					response.write "<tr><td colspan=2 style=text-align:right>评论时间:"&Rs("add_date")&" <a target=blank href=http://wpa.qq.com/msgrd?V=1&Uin="&Rs("qq")&"&Menu=yes><img border=0 SRC=http://wpa.qq.com/pa?p=1:"&Rs("qq")&":8 ></a></td></tr>"
					response.write "<tr><td valign=""top"" width=""100"">回复:</td><td height=""auto"">"&Rs("restor")&"</td></tr>"					
					response.write"</table>"						
					Rs.movenext
					next
					call PageControl(iCount,maxpage,page)
				Else
					response.write "<table width=""600"" height=""auto"" bgcolor=""#f8f8f8"" style=""text-align:left"" >"
					response.write"<tr><td colspan=2 bgcolor=""#F9F9F9"" style=""height:26px; padding:4px 0 0 0"">sorry,暂时还没有评论&nbsp;<a onclick=""javascript:history.go(-1)"">返回上一页</a></td></tr>"
					response.write"</table>"
					
				End If
				
				Sub PageControl(iCount,pagecount,page)
				'生成上一页下一页链接
				Dim query, a, x, temp
				action = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME")
				query = Split(Request.ServerVariables("QUERY_STRING"), "&")
				For Each x In query
					a = Split(x, "=")
					If StrComp(a(0), "page", vbTextCompare) <> 0 Then
						temp = temp & a(0) & "=" & a(1) & "&"
					End If
				Next
					Response.Write("<table border='0' cellpadding='3' style='border-collapse: collapse' width='100%' align='center'>")
					Response.Write("<form method=get onsubmit=""document.location = '" & action & "?" & temp & "Page='+ this.page.value;return false;""><tr>")
					Response.Write("<td align='center' bgcolor='#FFFFFF'>")
					If page<=1 then
						Response.Write ("首页 " )
						Response.Write ("上一页 ")
					Else
						Response.Write("<a href=" & action & "?" & temp & "Page=1>首页</a> ")
						Response.Write("<a href=" & action & "?" & temp & "Page=" & (Page-1) & ">上一页</a> ")
					End If
					If page>=pagecount then
						Response.Write ("下一页 ")
						Response.Write ("尾页 ")
					Else
						Response.Write("<a href=" & action & "?" & temp & "Page=" & (Page+1) & ">下一页</a> ")
						Response.Write("<a href=" & action & "?" & temp & "Page=" & pagecount & ">尾页</a> ")
					End If
					Response.Write(" 页次：" & page & "/" & pageCount & "&nbsp;页")
					Response.Write(" 共有&nbsp;" & iCount & "&nbsp;条评论")
					if page<=1 then page=1
					Response.Write(" 转到&nbsp;" & "<input tyep=text name=page maxlength=5 value=" & page & " style='font-size: 12px;border: 1px solid #CCCCCC;width:23px;'>" & "&nbsp;页 <input type=submit style=""font-size: 9pt"" value=GO style='font-size: 12px;border: 1px solid #CCCCCC;width:23px;'>")
					Response.Write("</td></tr></form>")
					Response.Write("</table>")
				End Sub
				%></div>
</div>
<div id="bottom"><!--#include file="../inc/end.asp"-->
</div>
</body>
</html>