<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<!--#include file="fuction.asp"-->
<!--#include file="webtop.asp"-->
<table width="1000" align="center" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="6" colspan="3"></td>
  </tr>
  <tr>
    <td width="20">&nbsp;</td>
    <td valign="bottom"><img src="<%=weburl%>images/arrow01.gif" width="11" height="11" /> Your present position: <a href="<%=weburl%>"><%=webname%></a> -> 商品评论 ->
 
    <%set rs=server.createobject("adodb.recordset")
		rs.open "select * from wygkcn_shop where shopid="&nosql(request("id"))&"  order by shopname desc",conn,1,1
		if rs.EOF or rs.bof  then
response.write"<SCRIPT language=JavaScript>alert('对不起，该商品不存在！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end 
end if
		%>
    <%=trim(rs("shopname"))%></td>
    <td valign="bottom"> 
       
    </td>
  </tr>
  <tr>
    <td height="6" colspan="3"></td>
  </tr>
</table>
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr> 
    <td> <table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td valign="top"> 
            <table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td height="8"></td>
              </tr>
            </table>
            <%			
			if session("admin")="" then
			set rs=server.createobject("adodb.recordset")
		rs.open "select * from shop_pinglun where shopid="&nosql(request("id"))&" and shenhe=1 order by pinglunid desc",conn,1,1
		else
set rs=server.createobject("adodb.recordset")
rs.open "select * from shop_pinglun where shopid="&nosql(request("id"))&"  order by pinglunid desc",conn,1,1
		end if
				if rs.EOF or rs.bof  then
response.write"<SCRIPT language=JavaScript>alert('对不起，该商品不存在！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end 
end if
		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" cellspacing="0" cellpadding="5" align="center">
              <%
			For i=1 To x
			%>
              <tr> 
                <td> <table width="760" border="0" align="center" cellpadding="0" cellspacing="1">
                    <tr>
                <td colspan="3"><img src="<%=weburl%>images/xuxian05.gif" width="760" height="1" /></td>
              </tr>
                    <tr bgcolor="#FFFFFF">
                      <td height="22" align="right"><div align="center"><img src="<%=weburl%>images/arrow03.gif" width="4" height="6" /> </div></td> 
                      <td width="49%" bgcolor="#FFFFFF"><strong>主题：</strong><%=trim(rs("pingluntitle"))%><strong> 评级：</strong><img src="img/pingji/<%=rs("pingji")%>.gif"></td>
                      <td width="49%" bgcolor="#FFFFFF"><div align="right"><b>作者：</b><%=trim(rs("pinglunname"))%>　(<%=trim(rs("pinglundate"))%>)<strong> IP：</strong><%=trim(rs("ip"))%></div></td>
                    </tr><tr>
                  <td height="1" background="images/xian_001.gif"></td>
				   <td height="1" colspan="2" background="images/xian_001.gif"></td>
                </tr>
                    <tr bgcolor="#FFFFFF"> 
                      <td width="2%" height="22">&nbsp;</td>
                      <td height="22" colspan="2"><b>内容：</b><%=rs("pingluncontent")%> </td>
                    </tr>
                    <%if trim(rs("huifu"))<>"" then%>
                    <tr bgcolor="#FFFFFF">
                      <td height="22" align="right"><div align="center"><img src="<%=weburl%>images/arrow03.gif" width="4" height="6" /> </div></td> 
                      <td height="22" colspan="2" bgcolor="#FFFFFF"><b><font color="#FF6600">本站回复：</font></b><font color="#FF0000"><%=rs("huifu")%></font></td>
                    </tr>
                    <%end if%>
                  </table>                  </td>
              </tr>
              <%
			rs.movenext
		    next
			%>
            </table>
          <%
		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 class=wenbenkuang Maxlength=5 VALUE=" & page & ">" & " 页"  & vbCrLf & "<input name=go type=image  src="&weburl&"img/butn_go.gif alt=GO align=absMiddle  border=0>")
    Response.Write("</TD>" & vbCrLf )                
    Response.Write("</TR></form>" & vbCrLf )        
    Response.Write("</table>" & vbCrLf )        
End Sub
%>          </td>
        </tr>
      </table><table width="760" border="0" align="center" cellpadding="0" cellspacing="1">
            <form action=pinglun.asp method=post name="pinglunform" id="pinglunform">
              <tr >
                <td height="25" colspan="3" bgcolor="#CCCCCC" ><div align="center">发 表 评 论</div></td>
              </tr>
              <tr >
                <td width="26%" height="30" >&nbsp;标题：
                  <input name="pingluntitle"  class="wenbenkuang"type="text" id="pingluntitle2" size="20"></td>
                <td width="23%" >&nbsp;姓名：
                  <input name="pinglunname" class="wenbenkuang"type="text" id="pinglunname" size="14"></td>
                <td width="51%" >&nbsp;您对该商品的评级：
                  <select name="pingji" id="select2">
                      <option value="5">五星级</option>
                      <option value="4">四星级</option>
                      <option value="3">三星级</option>
                      <option value="2">二星级</option>
                      <option value="1">一星级</option>
                    </select>
                    <input name="id" type="hidden" value=<%=request("id")%>>
                    <input name="shopname" type="hidden" value=<%=shopname%>>     </td>
              </tr>
              
              
              <tr >
                <td height="12" colspan="3" align="left" valign="top" >&nbsp;<textarea name="pingluncontent"border-right: #ffffff 1px groove; border-top: border-left: color: #333333; border-bottom: height: 18px;  cols="90" rows="5" id="textarea2" class="wenbenkuang"></textarea></td>
                </tr>
              
              <tr>
                <td height="30" colspan="3"><div align="left"><font 
                  color=#000000><b><strong>&nbsp;<font color="<%=flzhzt%>"></font></strong></b></font>
                    <input name="Submit" type="submit" class="go-wenbenkuang" value="提交保存" onClick="return check();">
                  &nbsp;
                    <input name="Submit22" type="reset" class="go-wenbenkuang" value="清除重写">                
                </div></td>
              </tr>
            </form>
          </table></td>
  </tr>
</table>
<!--#include file="copyright.asp"-->
</body>
</html>
