%Checklogin()%>
<%
product=Request.QueryString("productId")
country=Request.QueryString("country")
str=""
Set Rs=Server.CreateObject("ADODB.RecordSet")
Rs.open "select ProductName,ProductImg,unit,moq,tips from Products where id="&product,conn,1,1
If not Rs.bof and Not Rs.eof Then
productname=Rs("productname")
productImg=Rs("productImg")
unit=Rs("unit")
moq=Rs("moq")
tips=TextUnCode(Rs("tips"))
if isnull(moq) Then moq="无数量限制"
str="
"&productname&" |  | "&moq&" | "
End If
Rs.close
Rs.open "select * from Products where (nosale like '"&country&"%' or nosale like '%,"&country&",%' or nosale like '%"&country&"') and Id="&product&"",conn,1,1
If Not Rs.bof and not Rs.eof Then
str=str&"产品无法在该地区销售,请勿报价。 "&TextUnCode(Rs("note"))&" | "
Else
Set Rs1=Server.CreateObject("ADODB.RecordSet")
Rs1.open "select distinct num,price from price where productId="&product&" and AreaId="&country&" order by num asc",conn,1,1
If not Rs1.bof and not Rs1.eof Then
str=str&""
for i=1 to Rs1.Recordcount
str=str&"- 订单数量:≥"&Rs2("num")&""&unit&""&Rs2("price")&"RMB
"
Rs1.moveNext
Next
str=str&" | "&tips&" | "
Else
Set Rs2=Server.CreateObject("ADODB.RecordSet")
Rs2.open "select distinct num,price from price where productId="&product&" and AreaId=0 order by num asc",conn,1,1
str=str&""
Do while Not Rs2.bof and not Rs2.eof
str=str&"- 订单数量:≥"&Rs2("num")&""&unit&""&Rs2("price")&"RMB
"
Rs2.moveNext
loop
str=str&" | "&tips&" | "
Rs2.close
Set Rs2=Nothing
End if
Rs1.close
Set Rs1=Nothing
End If
Rs.close
response.write str
Set Rs=Nothing
conn.close
Set conn=Nothing
%>