<!--#include file="conn.asp"-->
<html><head><title><%=webname%>--留言版</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="image/css.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!--#include file="webtop.asp"-->
<%if IsNumeric(request.QueryString("id"))=False then
response.write("<script>alert(""非法访问!"");location.href=""index.asp"";</script>")
response.end
end if
dim id
id=request.QueryString("id")%>
<table width="760" align="center" border="0" cellspacing="0" cellpadding="0" style="border:1px solid #cccccc">
<tr> 
<td width="100%" valign="top"> 
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr> 
<td colspan="3" align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> 
<td height="50">
<%set rs=server.createobject("adodb.recordset")
rs.open "select * from price where bookid="&request("id"),conn,1,3
if rs.recordcount>0 then
spmx=rs("bookname")
end if%>
<div align="center"><u><font color="#004080" size="4"><%=spmx%></font></u></div>
</td>
</tr>
<tr> 
<td><div align="center">以下网友留言只代表网友个人观点，不代表本网站的观点。 立即发表评论</div></td>
</tr>
</table>
</td>
</tr>
<tr> 
<td colspan="3"> 
<%set rs=server.createobject("adodb.recordset")
rs.open "select * from shop_pinglun where bookid="&request("id")&" order by pinglunid desc",conn,1,1
if rs.recordcount=0 then %>
<table width="370" border="0" cellspacing="0" cellpadding="5" align="center">
<tr> 
<td align=center>暂无评论</td>
</tr>
</table>
<%else
rs.PageSize =10'每页记录条数
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%>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#5A7DBD">
<tr> 
<td style="padding-left:5px"><a href=index.asp><font color="#FFFFFF"><strong><%=webname%></strong></font></a><strong><font color="#FFFFFF"> 
商品评论</font></strong></td>
<td width="55%"> 
<%call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>")
Sub PageControl(iCount,pagecount,page,table_style,font_style)
'生成上一页下一页链接
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 " & Table_style & ">" & vbCrLf )
Response.Write("<form method=get onsubmit=""document.location = '" & action & "?" & temp & "Page='+ this.page.value;return false;""><TR>" & vbCrLf )
Response.Write("<TD align=right>" & vbCrLf )
Response.Write(font_style & vbCrLf )
if page<=1 then
Response.Write ("首页" & vbCrLf)
Response.Write ("上页 " & vbCrLf)
else
Response.Write("<A HREF=" & action & "?" & temp & "Page=1>首页</A> " & vbCrLf)
Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page-1) & ">上页</A> " & vbCrLf)
end if
if page>=pagecount then
Response.Write ("下页 " & vbCrLf)
Response.Write ("尾页 " & vbCrLf)
else
Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page+1) & ">下页</A> " & vbCrLf)
Response.Write("<A HREF=" & action & "?" & temp & "Page=" & pagecount & ">尾页</A> " & vbCrLf)
end if
Response.Write(" 页次：" & page & "/" & pageCount & "页" &vbCrLf)
Response.Write(" 共有" & iCount & "条评论" &vbCrLf)
Response.Write(" 转到" & "<INPUT TYEP=TEXT NAME=page SIZE=1 Maxlength=5 VALUE=" & page & ">" & "页"& vbCrLf & "<INPUT type=submit style=""font-size: 9pt"" value=GO class=b2>")
Response.Write("</TD>" & vbCrLf )
Response.Write("</TR></form>" & vbCrLf )
Response.Write("</table>" & vbCrLf )
End Sub%>
</td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<%For i=1 To x%>
<tr> 
<td bgcolor="#ffffff"> <table width="100%" border="0" align="center" cellspacing="0" cellpadding="0">
<tr> 
<td colspan="2" bgcolor="#EFEFEF" style="border-top:1px solid #9C969C;border-bottom:1px solid #9C969C"> 
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> 
<td width="20"><img src="image/pinglun01.gif" width="20" height="20"></td>
<td width="120"><%=trim(rs("pinglundate"))%></td>
<td width="200"><div align="right">IT大青岛网友：<%=trim(rs("pinglunname"))%>　就</div></td>
<td width="230"><font color="#C61008"><strong><%=trim(rs("pingluntitle"))%></strong></font><a name="<%=trim(rs("pingluntitle"))%>"></a></td>
<td width="50">发表评论</td>
<td><div align="right">IP:<%=trim(rs("ip"))%></div></td>
</tr>
</table>
</td>
</tr>
<tr> 
<td colspan="2" style="padding:10px"><b>内 容：</b> 
<%if len(rs("pingluncontent"))>50000 then 
response.write left(rs("pingluncontent"),50000)&"...<a href=""pinglunll.asp?id="&rs("pinglunid")&""" title="&trim(rs("pingluntitle"))&">[详细内容]</a>" 
else response.write rs("pingluncontent")
end if%> </td>
</tr>
<%if trim(rs("huifu"))<>"" then%>
<tr> 
<td colspan="2" style="padding-left:30px"><table style="border:1px solid #E7DFE7" width="95%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b><font color="#CC3333">回 复：</font></b><%=rs("huifu")%></td>
</tr>
</table>
</td>
</tr>
<%end if%>
</table>
<%rs.movenext
next%></td>
</tr>
<tr> 
<td bgcolor="#ffffff">&nbsp; </td>
</tr>
<tr> 
<td bgcolor="#5A7DBD"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
<td width="55%"> 
<%call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>")
end if
rs.close
set rs=nothing
Sub PageControl(iCount,pagecount,page,table_style,font_style)
'生成上一页下一页链接
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 " & Table_style & ">" & vbCrLf )
Response.Write("<form method=get onsubmit=""document.location = '" & action & "?" & temp & "Page='+ this.page.value;return false;""><TR>" & vbCrLf )
Response.Write("<TD align=right>" & vbCrLf )
Response.Write(font_style & vbCrLf )
if page<=1 then
Response.Write ("首页 " & vbCrLf)
Response.Write ("上页 " & vbCrLf)
else
Response.Write("<A HREF=" & action & "?" & temp & "Page=1>首页</A> " & vbCrLf)
Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page-1) & ">上页</A> " & vbCrLf)
end if
if page>=pagecount then
Response.Write ("下页 " & vbCrLf)
Response.Write ("尾页 " & vbCrLf)
else
Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page+1) & ">下页</A> " & vbCrLf)
Response.Write("<A HREF=" & action & "?" & temp & "Page=" & pagecount & ">尾页</A> " & vbCrLf)
end if
Response.Write(" 页次：" & page & "/" & pageCount & "页" &vbCrLf)
Response.Write(" 共有" & iCount & "条评论" &vbCrLf)
Response.Write(" 转到" & "<INPUT TYEP=TEXT NAME=page SIZE=1 Maxlength=5 VALUE=" & page & ">" & "页"& vbCrLf & "<INPUT type=submit style=""font-size: 9pt"" value=GO class=b2>")
Response.Write("</TD>" & vbCrLf )
Response.Write("</TR></form>" & vbCrLf )
Response.Write("</table>" & vbCrLf )
End Sub%>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> 
<td width="75%"><table border="0" cellspacing="0" cellpadding="0">
<tr> 
<td>&nbsp;</td>
<td width="500">&nbsp;</td>
</tr>
<tr> 
<td>&nbsp;</td>
<td><img src="image/pinglun02.gif" width="27" height="21"><strong>提交你的留言</strong></td>
</tr>
<tr> 
<td width="20">&nbsp;</td>
<td><table width="500" border="0" cellpadding="0" cellspacing="4">
  <form name="pinglunform" method="post" action="list.asp?action=save&id=<%=request("id")%>">
          <tr> 
            
      <td width="65">姓 名：</td>
            <td> 
              <input class="wenbenkuang" name="pinglunname" type="text" id="pinglunname" maxlength="18">
      </td>
</tr>
<tr> 
            <td>标 题：</td>
            <td> 
              <input class="wenbenkuang" name="pingluntitle" type="text" id="pingluntitle" size="50">
            </td>
</tr>
<tr> 
<td valign="top">内 容：</td>
<td>
<textarea class="wenbenkuang" name="pingluncontent" cols="50" rows="3" id="pingluncontent" style="BORDER-RIGHT: #ffffff 1px groove; BORDER-TOP: BORDER-LEFT: COLOR: #333333; BORDER-BOTTOM: HEIGHT: 18px; BACKGROUND-COLOR:"; ";";";"></textarea>
</td>
</tr>
<tr>
<td></td>
<td>
<input class="go-wenbenkuang" name="submit" value="提交保存" type="submit" onClick="return check();">
<input class="go-wenbenkuang" onClick="window.location='shangpintj.asp?id=<%=request("id")%>'" type="reset" value="推荐给朋友" name="Submit2">
</td>
</tr></form>
</table>
<%function HTMLEncode2(fString)
fString = replace(fString, ">", "&gt;")
fString = replace(fString, "<", "&lt;")
fString = Replace(fString, CHR(32), "<I></I>&nbsp;")
fString = Replace(fString, CHR(9), "&nbsp;")
fString = Replace(fString, CHR(34), "&quot;")
fString = Replace(fString, CHR(39), "&#39;")
fString = Replace(fString, CHR(13), "")
fString = Replace(fString, CHR(10) & CHR(10), "</P><P> ")
fString = Replace(fString, CHR(10), "<BR> ")
HTMLEncode2 = fString
end function%>
<script language="javascript">
<!--
function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}
function check()
{
  if(checkspace(document.pinglunform.pinglunname.value)) {
	document.pinglunform.pinglunname.focus();
    alert("请填写您的姓名！");
	return false;
  }
  if(checkspace(document.pinglunform.pingluntitle.value)) {
	document.pinglunform.pingluntitle.focus();
    alert("请填写评论标题！");
	return false;
  }
  if(checkspace(document.pinglunform.pingluncontent.value)) {
	document.pinglunform.pingluncontent.focus();
    alert("请填写评论正文！");
	return false;
  }
	  }
//-->
</script></td>
</tr>
</table></td>
<td>&nbsp;</td>
</tr>
<tr> 
<td colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
<td><img src="image/pinglun03.gif" width="39" height="29"><strong>请您注意：</strong></td>
</tr>
<tr> 
<td width="20">&nbsp;</td>
<td>· 尊重网上道德，遵守《全国人大常委会关于维护互联网安全的决定》及中华人民共和国其他各项有关法律法规<br>
· 尊重网上道德，遵守中华人民共和国的各项有关法律法规<br>
· 承担一切因您的行为而直接或间接导致的民事或刑事法律责任<br>
· 本网站产品库留言板管理人员有权保留或删除其管辖留言中的任意内容<br>
· 您在留言板发表的作品，本网站有权在网站内转载或引用<br>
· 参与本留言即表明您已经阅读并接受上述条款 </td>
</tr>
</table></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--#include file="service.asp"-->
<!--#include file="copyright.asp"-->
</body>
</html>