<!--#include virtual="/inc/conn.asp"-->
<%
Response.CharSet="GB2312"
Response.ContentType="text/html"


'初始  分类 商品 数据
uid=SafeRequestform("uid")
'uid=SafeRequest("uid")
'uid="8983"  '调试  6991  8983

if uid="" then
response.End()
end if

set rs2=server.CreateObject("adodb.recordset")

'分类信息
str="["
rs.open "select aykafenleiid,aykafenleiname,aykafenleiqq,aykafenleiurl,ayshangjiid,aykanamesuoyou,aykafenleikg,aykafenleisx from aykafenlei where aykanamesuoyou="&uid&" and ayshangjiid=0 and aykafenleikg=0 order by aykafenleisx asc",conn,1,1
if not(rs.eof) then
do while not rs.eof

str=str&"{"
str=str&"""L"":0,"										'L 0 分类 1商品
str=str&"""I"":"&rs("aykafenleiid")&","					'I 分类ID
str=str&"""S"":"&rs("ayshangjiid")&","					'S 分类上级ID
str=str&"""N"":"""&trim(ReplaceTrim(rs("aykafenleiname")))&""","		'N 分类名称
'str=str&"""S"":"""&trim(rs("aykafenleishuoming"))&""","	'S 分类说明
'str=str&"""D"":"""","										'D 分类点卡信息
str=str&"""Q"":"""&trim(rs("aykafenleiqq"))&""","		'Q 分类QQ
str=str&"""U"":"""&trim(rs("aykafenleiurl"))&""""		'U 分类URL链接
str=str&"},"
	
	rs2.open "select ayshangjiid,aykafenleikg,aykafenleisx,aykafenleiid,aykafenleiname,aykafenleiqq,aykafenleiurl from aykafenlei where ayshangjiid="&rs("aykafenleiid")&" and aykafenleikg=0 order by aykafenleisx asc",conn,1,1
	if not(rs2.eof) then
	do while not rs2.eof
	
	str=str&"{"
	str=str&"""L"":0,"
	str=str&"""I"":"&rs2("aykafenleiid")&","
	str=str&"""S"":"&rs2("ayshangjiid")&","
	str=str&"""N"":""&nbsp;&nbsp;┕"&trim(rs2("aykafenleiname"))&""","
	'str=str&"""S"":"""&trim(rs2("aykafenleishuoming"))&""","
	'str=str&"""D"":"""","
	str=str&"""Q"":"""&trim(rs2("aykafenleiqq"))&""","
	str=str&"""U"":"""&trim(rs2("aykafenleiurl"))&""""
	str=str&"},"
	
	rs2.movenext
	loop
	end if
	rs2.close
	
rs.movenext
loop
end if
rs.close


	

'商品信息
rs.open "select aygoodsuoyouid,aygoodzhuangtai,aygoodsx,aygoodfl,aygoodid,aygoodname,ayshqq,ayshurl from aygood where aygoodsuoyouid="&uid&" and isptdx=0 and aygoodzhuangtai=0 and aygoodisydl=0 order by aygoodsx asc",conn,1,1
if not(rs.eof) then
do while not rs.eof


str=str&"{"
str=str&"""L"":1,"									'L 类别 0 分类 1商品
str=str&"""F"":"&rs("aygoodfl")&","					'F 分类ID
str=str&"""I"":"&rs("aygoodid")&","					'I 商品ID
str=str&"""N"":"""&trim(ReplaceTrim(rs("aygoodname")))&""","		'N 商品名称
'str=str&"""S"":"""&trim(rs("ayshmiaoshu"))&""","	'S 商品说明
str=str&"""Q"":"""&trim(rs("ayshqq"))&""","			'Q 商品QQ
str=str&"""U"":"""&trim(rs("ayshurl"))&""""			'U 商品URL链接
str=str&"},"

rs.movenext
loop
end if
rs.close




str=mid(str,1,len(str)-1)

str=str&"]"

response.Write str
%>

