
<%
dim conn
dim connstr
on error resume next
connstr="DBQ="+server.mappath("/intonet_data/idee_solarrain_data.asp")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
set conn=server.createobject("ADODB.CONNECTION")
conn.open connstr
sql = "select product_id,product_name from products where sign='meizi' order by update_date,update_time desc"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write " 目前没有商品
"
else
%>
<% do while not rs.eof
pid=rs("product_id")
%>
<%
if Cint(productid)=CInt(pid) then
%>
■ |
<% response.write rs("product_name")
%>
|
<% else
%>
■ |
<% response.write rs("product_name")
%>
|
<% end if
%>
<% rs.movenext
loop
%>
<% rs.close
end if
set rs=nothing
%>
|
教师节用花:
康乃馨:温馨祝福
马蹄莲:赞美老师品性高洁
大丽花:表达感谢之意
向日葵:崇拜,敬慕
推荐花束:
12支康乃馨配以满天星,表达对老师的祝福、敬爱的情意。
--节日优惠价:20元。
以康乃馨、马蹄莲、剑兰、菊花、勿忘我等鲜花组成的花束
表达对老师的赞美、崇敬之情。
--节日优惠价:38元
以康乃馨为主,精心插制而成的小型盆花,花篮在节日里送给老师,
更是增加一份温馨、祝福的师生情谊。
--节日优惠价:56元
以上品种请进入专卖店订购。
假如您工作繁忙,不要紧,您只需在订购时写清楚老师的姓名地址,
我们的工作人员会将代表您师生情谊的鲜花直接送到老师的手中。
|
<%
'------------------------------------------------------------------------------------------
'显示用户评分及评论
Set rs= Server.CreateObject("ADODB.Recordset")
sql="select count(*) from comments where product_id=" & product_id
RS.Open sql,conn
mycount=rs(0)
rs.close
set rs=nothing
Set rs= Server.CreateObject("ADODB.Recordset")
sql="select avg(d_vote),avg(f_vote),avg(ui_vote),avg(fp_vote) from comments where product_id=" & product_id
RS.Open sql,conn
mark=Cint((rs(0)+rs(1)+rs(2)+rs(3))/4)
d_vote=rs(0)
f_vote=rs(1)
ui_vote=rs(2)
fp_vote=rs(3)
rs.close
set rs=nothing
%>
用户评分:
<% =mark %>
评分人次:
<% =mycount %>
<%
Set rs= Server.CreateObject("ADODB.Recordset")
sql="select top 4 * from comments where product_id=" & product_id & " order by comment_id desc"
RS.Open sql,conn,1,1
if rs.eof and rs.bof then
%>
还没有用户评论 |
<% else
do while not rs.eof
%>
·
<% if Len(rs("comment"))>18 then
response.write Left(rs("comment"), 18) & "..." &"[" & rs("username") & "]"
else
response.write rs("comment")&"[" & rs("username") & "]"
end if
%>
|
<% rs.movenext
loop
%>
<% end if
rs.close
set rs=nothing
'-------------------------------------------------------------------------------------------
%>
|