%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
Function select_picName(nProductID,nimage_type)
set ress=conn.execute("select product_imgurl from product_pics where product_id=" & nProductID & " and image_Type=" & nImage_type&" order by I_OrderID desc,imageID DESC")
'??????
if not ress.eof then
select_picName=ress("product_imgurl")
else
select_picName="UploadFiles/hd2.jpg"
end if
ress.close
set ress=nothing
End Function
dim class_id
class_id=trim(request("class_Id"))
dim rs,sql
set rs=server.CreateObject("adodb.recordset")
if class_id<>"" then
if not IsNumeric(class_id) then
response.Write "Error"
response.End()
end if
end if
%>
GAIN BELONG TRADING [HK]CO.,LIMITED
Products Center
<% Mem_Name=trim(session("Mem_Name"))
Keywords=trim(request("Keywords"))
'response.Write Keywords
set rs=server.CreateObject("adodb.recordset")
if class_ID<>"" then
'sql="select * from Products where product_class_id="&class_id&" and product_name_cn like '%"&keywords&"%' order by product_ord desc"
if Mem_Name="" then
sql="select a.* from Products as a,product_classes as b where ((a.product_class_id=b.class_id and b.parent_id="&class_id&") or (a.product_class_id=b.class_Id and b.class_id="&class_id&")) and a.Product_name_en like '%"&keywords&"%' and a.product_ispublic=0 order by product_ord desc"
else
sql="select a.* from Products as a,product_classes as b where ((a.product_class_id=b.class_id and b.parent_id="&class_id&") or (a.product_class_id=b.class_Id and b.class_id="&class_id&")) and a.Product_name_en like '%"&keywords&"%' order by product_ord desc"
end if
else
if Mem_Name="" then
sql="select * from Products where Product_name_en like '%"&keywords&"%' and product_ispublic=0 order by product_ord desc"
else
sql="select * from Products where product_name_en like '%"&keywords&"%' order by product_ord desc"
end if
end if
'response.Write sql
rs.open sql,conn,1,1
if not rs.eof then
'if page_count="" then
rs.pagesize=12
'else
'rs.pagesize=page_count
'end if
ipage=request("page")
ipage=clng(ipage)
if ipage<1 then ipage=1
if ipage>rs.pagecount then ipage=rs.pagecount end if
rs.absolutepage=ipage
for i=1 to 4
if rs.eof then exit for end if
%>
<%
next
else
response.Write "You are not our VIP member yet. If you want to know the new products,please contact us by info@hkgainbelong.com with your detail.We will provide you VIP ID & Password."
'rs.close
%>
<%
end if
%>