<!--#include file="conn.asp"-->
<!--#include file="inc/function.asp"-->
<%
'**************************************
'* 最后更新 2011-12-13 by 56770.Kingdge
'* Copyright www.56770.com
'**************************************
Dim favocou,zj,cang,showtype
showtype = request("showtype")
userid = request.cookies(cookiesname&"_basket")("order_userid")
If userid = "" Then userid = Session(cookiesname&"_basket"&"order_userid")
user_id = safereplace(request.cookies(cookiesname&"_basket")("order_"& userid &"_id"))
If user_id = "" Then user_id = safereplace(Session(cookiesname&"_basket"&"order_"& userid &"_id"))
cookiesid = checknum(request.cookies(cookiesname&"_basket")("order_"& userid &"_cookiesid"),0)
If CookiesId = 0 Then CookiesId = CheckNum(Session(cookiesname&"_basket"&"order_"& userid &"_cookiesid"),0)
If cookiesid <> 0 Then
		set Rs = conn.execute("select basket_count,price from [Lebi_lsbuy] where (sessionid="& CookiesId &" or (User_Id = '"& user_id &"' and User_Id <> '')) and IsGift=0")
		If rs.eof And rs.bof Then
				favocou=0
				zj=0
		Else
				Do While Not rs.eof
				favocou = favocou + rs("basket_count")
				zj = zj + rs("price") * rs("basket_count")
				rs.movenext
				loop
		End If
		rs.close:Set rs=Nothing
Else
		favocou=0
		zj=0
End If
If showtype = "0" Then
		response.write""& formatnumber2(zj) &"|"& favocou &""
Else
		response.write "document.getElementById('carttotalprice').innerHTML="""& formatnumber2(zj) &""";document.getElementById('carttotalnum').innerHTML="""& favocou &""";"
End If
%>