📄 listpl1.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<html>
<head>
<title><%=webname%>--商品信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!--#include file="webtop.asp"-->
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="1" bgcolor="C9C9C8"><img src="../images/block.gif" width="1" height="1"></td>
<td> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="168" valign="top">
<!--#include file="left.asp"-->
</td>
<td width="1" bgcolor="C9C9C8"><img src="images/block.gif" width="1" height="1"></td>
<td valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="images/bg1_4color_.jpg"><img src=images/bg1_4color_.jpg" width="1" height="3"></td>
</tr>
</table>
<br> <table width="98%" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td height="1" bgcolor="cccccc"><img src="images/dot_03.gif" width="9" height="1" border="0"></td>
</tr>
<tr>
<td height="25" bgcolor="efefef"><strong> <img src="images/dot_03.gif" width="9" height="9" border="0">
商品评论:</strong>
<%set rs=server.createobject("adodb.recordset")
rs.open "select * from shop_snsn where shopid="&request("id")&" order by shopname desc",conn,1,1
%>
<%=trim(rs("shopname"))%></td>
</tr>
<tr>
<td height="1" bgcolor="cccccc"><img src="images/dot_03.gif" width="9" height="1" border="0"></td>
</tr>
</table>
<%set rs=server.createobject("adodb.recordset")
rs.open "select * from shop_pinglun where shopid="&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" cellspacing="0" cellpadding="5" align="center">
<%
For i=1 To x
%>
<tr>
<td> <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr bgcolor="#FFFFFF">
<td width="5%" align="right"><img src="images/image002.gif" width="15" height="15"></td>
<td bgcolor="#FFFFFF"><b>主题:</b><a href="javascript:;" onClick="javascript:window.open('pinglunll.asp?id=<%=rs("pinglunid")%>','pinglun','width=300,height=400,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=no');return false;" title="<%=trim(rs("pingluntitle"))%>"><%=trim(rs("pingluntitle"))%></a></td>
<td width="36%"><img src="images/pingji/<%=rs("pingji")%>.gif"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="5%" height="22"> </td>
<td height="22"><b>作者:</b><%=trim(rs("pinglunname"))%> (<%=trim(rs("pinglundate"))%>)</td>
<td width="36%" height="22"><%=trim(rs("ip"))%></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="5%" height="22"> </td>
<td height="22" colspan="2"> <%=rs("pingluncontent")%>
</td>
</tr>
<%if trim(rs("huifu"))<>"" then%>
<tr bgcolor="#FFFFFF">
<td width="5%" height="22"> </td>
<td height="22" colspan="2" bgcolor="#FFFFFF"><b>管理员回复:</b><%=rs("huifu")%>
</td>
</tr>
<%end if%>
</table>
<br></td>
</tr>
<%
rs.movenext
next
%>
<tr>
<td align="center"> <input name="Submit2" type="reset" class="go-wenbenkuang" value="推荐给朋友" onClick="javascript:window.open('shangpintj.asp?id=<%=request("id")%>','pingluntj','width=325,height=200,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=no')">
<input name="Submit22" type="reset" class="go-wenbenkuang" value="发表评论" onClick="javascript:window.open('pinglun.asp?id=<%=request("id")%>','pinglun','width=295,height=325,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=no')">
</td>
</tr>
</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 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>
<td width="1" bgcolor="C9C9C8"><img src="../images/block.gif" width="1" height="1"></td>
</tr>
</table>
<!--#include file="copyright.asp"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -