<%
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(dbfolder&dbname)
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open connstr
If Err Then
err.Clear
Set Conn = Nothing
Response.Write "<p style='font-size:9pt' align=center>Database Error</p>"
Response.Write "<p style='font-size:9pt' align=center></p>"
Response.End
End If
set rs7=server.createobject("adodb.recordset")
sql="select * from WrzcNethtml_system"
rs7.open sql,conn,1,1
sv=split(rs7("siteinfo"),"##")
sitename=sv(0)
homepage=sv(1)
web=sv(2)
logo=sv(3)
banner=sv(4)
mail=sv(5)
tel=sv(6)
oicq=sv(7)
oicq_n=sv(8)
msn=sv(9)
fax=sv(10)
code=sv(11)
ymaddr=sv(12)
icp=sv(13)
tongj=sv(14)
photoh=sv(15)
ser=sv(16)
ser_t=sv(17)
guestorder=sv(18)
sortb=sv(19)
awidth=sv(20)
aheight=sv(21)
widtht=sv(22)
heightt=sv(23)
lookt=sv(24)
lookpage=sv(25)
lookhang=int(sv(26))
mail_sever=sv(27)
mail_user=sv(28)
mail_pass=sv(29)
mail_sendmail=sv(30)
mail_sendname=sv(31)
mail_type=sv(32)
E_Server=mail_sever
E_ServerUser=mail_user
E_ServerPass=mail_pass
E_SendManMail=mail_sendmail
E_SendManName=mail_sendname
E_SendManType=mail_type
tjindex=sv(33)
tejia=sv(34)
gun=sv(35)
commentshow=sv(36)
baojiashow=sv(37)
adminshow=sv(38)
huoshow=sv(39)
vbut=sv(40)
vword=sv(41)
keyword=sv(42)
company=sv(43)
showc=sv(44)
wangwang=sv(45)
yahoo=sv(46)
huobi=sv(47)
fuhao=sv(48)
taobao=sv(49)
yiqu=sv(50)
paipai=sv(51)
bizhong=sv(52)
danwei=sv(53)
fapiao=sv(54)
shuidian=sv(55)
yunfei=sv(56)
mian=sv(57)
kucun=sv(58)
vwidth=sv(59)
vheight=sv(60)
dxt=sv(61)
snt=sv(62)
jft=sv(63)
simgt=sv(64)
delt=sv(65)
admint=sv(66)
sy_type=sv(67)
sy_types=sv(68)
sy_p=sv(69)
sy_text=sv(70)
sy_img=sv(71)
sy_color=sv(72)
sy_font=sv(73)
sy_size=sv(74)
sy_b=sv(75)
prot=sv(76)
wangwang_n=sv(77)
zengt=sv(78)
addt=sv(79)
editt=sv(80)
delet=sv(81)
kfa=sv(82)
kft=sv(83)
indexhang=int(sv(84))
xinp=int(sv(85))
phcount=int(sv(86))
msn_n=sv(87)
skypes=sv(88)
skypes_n=sv(89)
gbshow=sv(90)
youa=sv(91)
searchn=sv(92)
searchsn=sv(93)
searchc1=sv(94)
searchc2=sv(95)
searchk=sv(96)
quant=sv(97)
description=sv(98)
mail_regs=rs7("mail_regs")
mail_regc=rs7("mail_regc")
mail_orders=rs7("mail_orders")
mail_orderc=rs7("mail_orderc")
mail_fahuos=rs7("mail_fahuos")
mail_fahuoc=rs7("mail_fahuoc")
reg=rs7("reg")
WrzcNethtml_skin=rs7("skin")
seo=split(rs7("seohw")&"#"&rs7("seosort")&"#"&rs7("seonsort")&"#"&rs7("seopinpai")&"#"&rs7("seoa")&"#"&rs7("seoasort")&"#"&rs7("seoansort")&"#"&rs7("seoh")&"#"&rs7("seohtype"),"#")
seo_hw1=seo(0)
seo_hw2=seo(1)
seo_hw3=seo(2)
seo_hw4=seo(3)
seo_hw5=seo(4)
seo_hw6=seo(5)
seo_sort1=seo(6)
seo_sort2=seo(7)
seo_sort3=seo(8)
seo_sort4=seo(9)
seo_sort5=seo(10)
seo_sort6=seo(11)
seo_nsort1=seo(12)
seo_nsort2=seo(13)
seo_nsort3=seo(14)
seo_nsort4=seo(15)
seo_nsort5=seo(16)
seo_nsort6=seo(17)
seo_pinpai1=seo(18)
seo_pinpai2=seo(19)
seo_pinpai3=seo(20)
seo_pinpai4=seo(21)
seo_pinpai5=seo(22)
seo_pinpai6=seo(23)
seo_a1=seo(24)
seo_a2=seo(25)
seo_a3=seo(26)
seo_a4=seo(27)
seo_a5=seo(28)
seo_a6=seo(29)
seo_asort1=seo(30)
seo_asort2=seo(31)
seo_asort3=seo(32)
seo_asort4=seo(33)
seo_asort5=seo(34)
seo_asort6=seo(35)
seo_ansort1=seo(36)
seo_ansort2=seo(37)
seo_ansort3=seo(38)
seo_ansort4=seo(39)
seo_ansort5=seo(40)
seo_ansort6=seo(41)
seo_h1=seo(42)
seo_h2=seo(43)
seo_h3=seo(44)
seo_h4=seo(45)
seo_h5=seo(46)
seo_h6=seo(47)
seo_htype1=seo(48)
seo_htype2=seo(49)
seo_htype3=seo(50)
seo_htype4=seo(51)
seo_htype5=seo(52)
seo_htype6=seo(53)
rs7.close
set rs7=nothing
set rs=server.createobject("adodb.recordset")
sql="select top 1 * from WrzcNethtml_WrzcNetad"
rs.open sql,conn,1,1
t_is=rs("t_is")
t_height=rs("t_height")
t_width=rs("t_width")
iszuo=rs("iszuo")
isyou=rs("isyou")
urlzuo=rs("urlzuo")
urlyou=rs("urlyou")
piczuo=rs("piczuo")
picyou=rs("picyou")
redim ad_img(1),ad_url(1),ad_img(2),ad_url(2),ad_img(3),ad_url(3),ad_img(4),ad_url(4),ad_img(5),ad_url(5),ad_img(6),ad_url(6),ad_img(7),ad_url(7),ad_img(8),ad_url(8)
for i=1 to 8
redim preserve ad_img(i),ad_url(i),ad_w(i),ad_h(i)
ad_img(i)=rs("ad_img"&i)
ad_url(i)=rs("ad_url"&i)
ad_w(i)=rs("ad_w"&i)
ad_h(i)=rs("ad_h"&i)
next
rs.close
set rs=nothing

if wangwang_n=1 then

if request("iz")="yes" then
m=""
else
m="../"
end if

iel=Lcase(Request.ServerVariables("HTTP_ACCEPT_LANGUAGE"))
if request("action")="ielgo" then
		if request("p")=wangwang then
			Response.Cookies("WrzcNethtml")("i")="yes"
			response.redirect "index.html"
			Response.End
		else
			if iel="zh-cn" and Request.Cookies("WrzcNethtml")("i")="" then
			response.write "window.location.reload("""&m&"cnlogin.asp""); "
			Response.End
			end if
		end if
	end if
	if iel="zh-cn" and Request.Cookies("WrzcNethtml")("i")="" then
		response.write "window.location.href="""&m&"cnlogin.asp""; "
		Response.End
	end if
end if

if request("WrzcNethtml_skin")<>"" then Response.Cookies("WrzcNethtml")("WrzcNethtml_skin")=request("WrzcNethtml_skin")
if Request.Cookies("WrzcNethtml")("WrzcNethtml_skin")<>"" then WrzcNethtml_skin=Request.Cookies("WrzcNethtml")("WrzcNethtml_skin")
qq=split(oicq,"/")
qq_n=split(oicq_n,"/")
ww=split(wangwang,"/")
ww_n=split(wangwang_n,"/")
msni=split(msn,"/")
msni_n=split(msn_n,"/")
skype=split(skypes,"/")
skype_n=split(skypes_n,"/")
totalcash=0
totalisbn=0
totalc=0
totalpage=1
Function chkid(id)
If Not(isNumeric(id)) or isnull(trim(id)) or len(id)=0 Then
showerr "e"
End If
End Function
Function Showflash(img,url,wt,hg,oname)
if img<>"" then
if left(lcase(img),4)<>"http" then img="../"&img
if right(img,3)="swf" then
response.write "<object classid=""clsid:D27CDB6E-AE6D-11CF-96B8-444553540000"" name="&oname&" codebase=""http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"" border=""0"" width="&wt&" height="&hg&">"&vbcrlf
response.write "<param name=""movie"" value="&img&">"&vbcrlf
response.write "<param name=""wmode"" value=""Opaque"">"&vbcrlf
response.write "<param name=""quality"" value=""High"">"&vbcrlf
response.write "<embed src="&img&" pluginspage=""http://www.macromedia.com/go/getflashplayer"" type=""application/x-shockwave-flash"" name="&oname&" quality=""High"" width="&wt&" height="&hg&"></object>"&vbcrlf
else
if img<>"" then
if url<>"" then response.write "<a href="""&url&""" target=""_blank"">"
response.write "<img src="""&img&""" border=""0"""
if hg<>"" and hg<>0 then response.write " height="&hg
if wt<>"" and wt<>0 then response.write " width="&wt
response.write ">"
if url<>"" then response.write "</a>"
end if
end if
end if
End Function

Function ShowAdImg(i)
showflash ad_img(i),ad_url(i),ad_w(i),ad_h(i),null
End Function
Function chklogin(user_name)
set rs=server.createobject("adodb.recordset")
sql="select userpass from WrzcNethtml_user where username='"&user_name&"'"
rs.open sql,conn,1,1
if rs.eof then
Response.Cookies("WrzcNethtml")("user_name")=""
Response.Cookies("WrzcNethtml")("user_pass")=""
Response.Cookies("WrzcNethtml")("user_class")=""
Response.Cookies("UserID")=""
Response.Cookies("UserPassword")=""
Response.Cookies("Invisible")=""
response.redirect "login.asp"
response.end
else
user_pass=rs("userpass")
end if
rs.close
set rs=nothing
if trim(Request.Cookies("WrzcNethtml")("user_pass"))<>trim(user_pass) then
Response.Cookies("WrzcNethtml")("user_name")=""
Response.Cookies("WrzcNethtml")("user_pass")=""
Response.Cookies("WrzcNethtml")("user_class")=""
Response.Cookies("UserID")=""
Response.Cookies("UserPassword")=""
Response.Cookies("Invisible")=""
response.redirect "login.asp"
response.end
end if
End Function
Function GetFav(user_name)
set rs=server.createobject("adodb.recordset")
sql="select user_fav from WrzcNethtml_user where username='"&user_name&"'"
rs.open sql,conn,1,1
if rs.eof then
GetFav=0
else
user_f=split(rs("user_fav"),"/")
GetFav=ubound(user_f)
if GetFav<=0 then GetFav=0
end if
rs.close
set rs=nothing
End Function
Function DelStr(Str)
If IsNull(Str) Or IsEmpty(Str) Then
Str= ""
End If
DelStr=Replace(Str,"'","")
DelStr=Replace(DelStr,"&","")
DelStr=Replace(DelStr,"%20","")
DelStr=Replace(DelStr,"<","")
DelStr=Replace(DelStr,">","")
DelStr=Replace(DelStr,"%","")
End Function
index_wh=""
if heightt<>0 then index_wh=" height="&trim(heightt)
if widtht<>0 then index_wh=index_wh&" width="&trim(widtht)
sort_wh=""
if aheight<>0 then sort_wh=" height="&trim(aheight)
if awidth<>0 then sort_wh=sort_wh&" width="&trim(awidth)
view_wh=""
if vheight<>0 then view_wh=" height="&trim(vheight)
if vwidth<>0 then view_wh=view_wh&" width="&trim(vwidth)
Function countfee(ps_id,yunfei,hw_yunfei,hw_weight,hw_count,hw_cash,hw_mian)
if hw_mian>0 and hw_cash>=hw_mian then
countfee=0
else
select case yunfei
case "2"
set rsp=server.CreateObject("adodb.recordset")
rsp.open "select ps_fei from WrzcNethtml_ps where ps_id="&ps_id&"",conn,1,1
if rsp.eof and rsp.bof then
ps_fei=0
else
ps_fei=rsp("ps_fei")
end if
rsp.close
set rsp=nothing
countfee=hw_yunfei+ps_fei
case "3"
set rsp=server.CreateObject("adodb.recordset")
rsp.open "select ps_fei,ps_qi,ps_xu,ps_xufei from WrzcNethtml_ps where ps_id="&ps_id&"",conn,1,1
if rsp.eof and rsp.bof then
ps_fei=0
else
if hw_weight<=rsp("ps_qi") then
ps_fei=rsp("ps_fei")
else
if int((hw_weight-rsp("ps_qi"))/rsp("ps_xu"))<(hw_weight-rsp("ps_qi"))/rsp("ps_xu") then
wp=int((hw_weight-rsp("ps_qi"))/rsp("ps_xu"))+1
else
wp=int((hw_weight-rsp("ps_qi"))/rsp("ps_xu"))
end if
ps_fei=rsp("ps_fei")+wp*rsp("ps_xufei")
end if
end if
rsp.close
set rsp=nothing
countfee=ps_fei
case "4"
set rsp=server.CreateObject("adodb.recordset")
rsp.open "select ps_fei,ps_xufei from WrzcNethtml_ps where ps_id="&ps_id&"",conn,1,1
if rsp.eof and rsp.bof then
ps_fei=0
else
ps_fei=rsp("ps_fei")+hw_count*rsp("ps_xufei")
end if
rsp.close
set rsp=nothing
countfee=ps_fei
case "5"
countfee=0
case else
set rsp=server.CreateObject("adodb.recordset")
rsp.open "select ps_fei from WrzcNethtml_ps where ps_id="&ps_id&"",conn,1,1
if rsp.eof and rsp.bof then
ps_fei=0
else
ps_fei=rsp("ps_fei")
end if
rsp.close
set rsp=nothing
countfee=ps_fei
end select
end if
End Function
Function checkshui(scash,sdian,stype)
if stype=1 then
checkshui=scash*(100+sdian)/100
else
checkshui=scash
end if
End Function
Function getpage(page)
getpage=page
if getpage="" then getpage=1
if not(isnumeric(getpage)) then getpage=1
if getpage<1 then getpage=1
getpage=int(getpage)
End Function

Function getorder(order)
select case order
case "time"
getorder="hw_id desc"
case "hot"
getorder="hw_buys desc,hw_id desc"
case "view"
getorder="hw_views desc,hw_id desc"
case "price1"
getorder="hw_price2 asc,hw_id desc"
case "price2"
getorder="hw_price2 desc,hw_id desc"
case "hw_price1"
getorder="hw_price2 asc,hw_id desc"
case "hw_price2"
getorder="hw_price2 desc,hw_id desc"
case else
getorder="hw_xu desc,hw_id desc"
end select
End Function

function getsearch(count,size,cname)
set rs=server.createobject("adodb.recordset")
sql="select top "&count&" search_name from WrzcNethtml_search order by hits desc,id desc"
rs.open sql,conn,1,1
do while not rs.eof
response.write "<a class="""&cname&""" href=""../search.asp?action=search&hw_name="&rs("search_name")&""">"&left(rs("search_name"),size)&"</a> | "
rs.movenext
loop
rs.close
set rs=nothing
end function

function shownotice(count,size)
set rs=server.createobject("adodb.recordset")
sql="select top "&count&" id,title from WrzcNethtml_pub order by ID DESC"
rs.open sql,conn,1,1
do while not rs.eof
response.write "<div style=""width:100%;height:25px;line-height:25px;overflow:hidden; text-align:left;""><img border=""0"" src=""../Img/notice.gif"" align=""absmiddle""> <a href=""#"" onclick=""javascript:window.open('../notice/Notice-"&rs("id")&".html','newwindow','toolbar=no,scrollbars=yes,resizable=no,top=0,left=0,width=370,height=300');"">"&left(rs("title"),size)&"</a></div>"
rs.movenext
loop
rs.close
set rs=nothing
end function

Function showstat(tongji)
select case tongji
case 1
response.write "<script src=""../tj_WrzcNet.asp""></script>"
case 2
response.write "<script src=""../tj_WrzcNet.asp?style=text""></script>"
case 3
response.write "<script src=""../tj_WrzcNet.asp?style=icon""></script>"
case 4
response.write "<script src=""../tj_WrzcNet.asp?style=counter""></script>"
case 5
response.write "<script src=""../tj_WrzcNet.asp?style=flash""></script>"
end select
End Function

function getnsort(sort_id)
set rs2=server.createobject("adodb.recordset")
  sql="select nsort_id,nsort_name from WrzcNethtml_nsort where sort_id="&sort_id&" order by nsort_xu desc,nsort_id desc"
  rs2.open sql,conn,1,1
if not rs2.eof then
response.write "<p style=""line-height: 150%; margin: 3px;""><b>Categories:</b> "
do while not rs2.eof
response.write "<a href=""../product/nsort"&rs2("nsort_id")&"-1.html"" title="""&rs2("nsort_name")&"""><u>"&rs2("nsort_name")&"</u></a>&nbsp;&nbsp;"
rs2.movenext
loop
end if
rs2.close
set rs2=nothing
end function

function getpinpai(sort_id,sc)
set rs2=conn.execute("select distinct(pinpai_id) from WrzcNethtml_hw where "&sc&"_id="&sort_id&" and pinpai_id<>0")
if not rs2.eof and not rs2.bof then
response.write "<p style=""line-height: 150%; margin: 3px;""><b>Brands:</b> "
do while not rs2.eof
ppinpai_name=""
ppinpai_id=rs2("pinpai_id")
set rsp=server.CreateObject("adodb.recordset")
rsp.open "select pinpai_name from WrzcNethtml_pinpai where pinpai_id="&ppinpai_id&"",conn,1,1
if not rsp.eof then
ppinpai_name=rsp("pinpai_name")
response.write "<a href=""../pinpai.asp?pinpai_id="&ppinpai_id&"&"&sc&"_id="&sort_id&""" title="""&ppinpai_name&"""><u>"&ppinpai_name&"</u></a>&nbsp;&nbsp;"
end if
rsp.close
set rsp=nothing
rs2.MoveNext
Loop
end if
rs2.close
set rs2=nothing
end function


function allsort
response.write "<DIV id=Layer_0 onmouseover=""MM_showHideLayers('Layer_0','','show')"" class=""top4"" onmouseout=""MM_showHideLayers('Layer_0','','hide')"">"
response.write "<table border=""0"" cellpadding=""0"" cellspacing=""0""><tr><td class=""topk1""></td><td><table border=""0"" cellspacing=""0"" cellpadding=""3"" class=""top3"">"
set rs8=server.CreateObject("adodb.recordset")
rs8.open "select sort_id,sort_name from WrzcNethtml_sort order by sort_xu desc,sort_id desc",conn,1,1
i=0
do while not rs8.eof and not rs8.bof
i=i+1
if (i mod 2)=1 then response.write "<tr>"
response.write "<td height=""20"" width=""120""  onmouseout=""this.style.backgroundColor=''"" onmouseover=""this.style.backgroundColor='#EDF5FA'"">"
response.write "<img border=""0"" src=""../Skin/"&WrzcNethtml_skin&"/dot.gif"" align=""absmiddle""> <a title="""&rs8("sort_name")&""" href=""../product/sort"&rs8("sort_id")&"-1.html"" class=""nsort"">"&rs8("sort_name")&"</a></td>"
if (i mod 2)=0 then response.write "</tr>"
rs8.movenext
loop
rs8.close
set rs8=nothing
if (i mod 2)=1 then response.write "<td></td></tr>"
response.write "</table></td></tr></table></DIV>"
end function

function allp
response.write "<DIV id=Layer_00 onmouseover=""MM_showHideLayers('Layer_00','','show')"" class=""top4"" onmouseout=""MM_showHideLayers('Layer_00','','hide')"">"
response.write "<table border=""0"" cellpadding=""0"" cellspacing=""0""><tr><td class=""topk2""></td><td><table  border=""0"" cellspacing=""0"" cellpadding=""3"" class=""top3"">"
set rs8=server.CreateObject("adodb.recordset")
rs8.open "select top 20 pinpai_id,pinpai_name from WrzcNethtml_pinpai order by pinpai_xu desc,pinpai_id desc",conn,1,1
i=0
do while not rs8.eof and not rs8.bof
i=i+1
if (i mod 4)=1 then response.write "<tr>"
response.write "<td height=""20"" width=""120"" onmouseout=""this.style.backgroundColor=''"" onmouseover=""this.style.backgroundColor='#EDF5FA'"">"
response.write "<img border=""0"" src=""../Skin/"&WrzcNethtml_skin&"/dot.gif"" align=""absmiddle""> <a title="""&rs8("pinpai_name")&""" href=""../product/pinpai"&rs8("pinpai_id")&"-1.html"" class=""nsort"">"&rs8("pinpai_name")&"</a></td>"
if (i mod 4)=0 then response.write "</tr>"
rs8.movenext
loop
rs8.close
set rs8=nothing
if (i mod 4)>0 then
for ii=1 to 4-(i mod 4)
response.write "<td></td>"
next
response.write "</tr>"
end if
response.write "</table></td></tr></table></DIV>"
end function

function allb
response.write "<DIV id=Layer_000 onmouseover=""MM_showHideLayers('Layer_000','','show')"" class=""top4"" onmouseout=""MM_showHideLayers('Layer_000','','hide')"">"
response.write "<table border=""0"" cellpadding=""0"" cellspacing=""0""><tr><td class=""topk3""></td><td><table  border=""0"" cellspacing=""0"" cellpadding=""3"" class=""top3"">"
set rs8=server.CreateObject("adodb.recordset")
rs8.open "select sort_id,sort_name from WrzcNethtml_sort order by sort_xu desc,sort_id desc",conn,1,1
i=0
do while not rs8.eof and not rs8.bof
i=i+1
if (i mod 2)=1 then response.write "<tr>"
response.write "<td height=""20"" width=""120"" onmouseout=""this.style.backgroundColor=''"" onmouseover=""this.style.backgroundColor='#EDF5FA'"">"
response.write "<img border=""0"" src=""../Skin/"&WrzcNethtml_skin&"/dot.gif"" align=""absmiddle""> <a title="""&rs8("sort_name")&" Quotation"" href=""../baojia.asp?sort_id="&rs8("sort_id")&""" class=""nsort"">"&rs8("sort_name")&" Quotation</a></td>"
if (i mod 2)=0 then response.write "</tr>"
rs8.movenext
loop
rs8.close
set rs8=nothing
if (i mod 2)=1 then response.write "<td></td></tr>"
response.write "</table></td></tr></table></DIV>"
end function



function getcopy(count)
response.write "<table border=""0"" cellpadding=""5"" cellspacing=""0"" width=""95%"">"
set rs=server.createobject("adodb.recordset")
sql="select top "&count&" id,typename from WrzcNethtml_type order by xu desc,id desc"
rs.open sql,conn,1,1
i=0 
do while not rs.eof
i=i+1
typeid=rs("id")
lclass=""
'if i>1 then lclass="background:url('skin/"&WrzcNethtml_skin&"/copy_line.gif') no-repeat 0 5px;"
response.write "<td  align=""left"" valign=""top"" width=""17%"" style=""padding-left:10px;"&lclass&"""><table border=""0"" cellpadding=""0"" cellspacing=""0"" width=""100%"">"
response.write "<tr><td height=""23""><a class=""copy_t"" target=""_blank"" href=""../help/help"&rs("id")&".html"">"&rs("typename")&"</a></td></tr>"
set rs8=server.CreateObject("adodb.recordset")
rs8.open "select id,title from WrzcNethtml_book where typeid="&typeid&" order by id asc",conn,1,1
do while not rs8.eof and not rs8.bof
response.write "<tr><td height=""20""><a class=""copy_c"" href=""../help/help"&rs("id")&"-"&rs8("id")&".html"" target=""_blank"">"&rs8("title")&"</a></td></tr>"
rs8.movenext
loop
rs8.close
set rs8=nothing
response.write "</table></td>"
rs.movenext
loop
rs.close
set rs=nothing
response.write "</table>"
end function


function allsort_left(sortb)
select case sortb
case 1
set rs=server.createobject("adodb.recordset")
sql="select sort_id,sort_name from WrzcNethtml_sort order by sort_xu desc,sort_id desc" 
rs.open sql,conn,1,1 
do while not rs.eof 
insortid=rs("sort_id")
response.write "<table cellpadding=0 width=""90%""  border=0 cellspacing=""0"" style=""margin:0px auto;""><tr><td align=left height=""26""><IMG src=""../Skin/"&WrzcNethtml_skin&"/dot.gif"" border=0 align=""absmiddle""> "
response.write "<a title="""&rs("sort_name")&""" class=""sort"" href=""../Product/sort"&rs("sort_id")&"-1.html"">"&rs("sort_name")&"</a></td></tr><tr><td height=""2"" background=""../Img/dot_menu.gif""></td></tr>"
set rs8=server.CreateObject("adodb.recordset")
rs8.open "select nsort_id,nsort_name from WrzcNethtml_nsort where sort_id="&insortid&" order by nsort_xu desc,nsort_id desc",conn,1,1
do while not rs8.eof and not rs8.bof
response.write "<tr><td height=20 align=left>&nbsp;&nbsp;&nbsp;<a title="""&rs8("nsort_name")&""" class=""nsort"" href=""../Product/nsort"&rs8("nsort_id")&"-1.html"">"&rs8("Nsort_name")&"</a></td></tr><tr><td height=""2"" background=""../Img/dot_menu.gif""></td></tr>"
rs8.movenext
loop
rs8.close
set rs8=nothing
response.write "</table>"
rs.movenext 
loop 
rs.close
set rs=nothing
case 2
response.write "<table cellpadding=0 width=""90%""  border=0 cellspacing=""0"" style=""margin:0px auto;"">"
set rs=server.createobject("adodb.recordset")
sql="select sort_id,sort_name from WrzcNethtml_sort order by sort_xu DESC,sort_id desc" 
rs.open sql,conn,1,1 
do while not rs.eof 
insortid=rs("sort_id")
response.write "<tr><td height=""26"" align=""left""><IMG src=""../Skin/"&WrzcNethtml_skin&"/dot.gif"" border=0 align=""absmiddle""> "
response.write "<a onclick=menuclick('submenu"&rs("sort_id")&"') class=""sort"" href=""#"">"&rs("sort_name")&"</a></td></tr><tr><td height=""2"" background=""../Img/dot_menu.gif""></td></tr>"
response.write "<tr id=""submenu"&rs("sort_id")&""" style=""display:none;""><td><table cellspacing=0 cellpadding=0 width=""100%""  border=0>"
set rs8=server.CreateObject("adodb.recordset")
rs8.open "select nsort_id,nsort_name from WrzcNethtml_nsort where sort_id="&insortid&" order by nsort_xu desc,nsort_id desc",conn,1,1
do while not rs8.eof and not rs8.bof
response.write "<tr><td height=20 align=left>&nbsp;&nbsp;&nbsp;<a title="""&rs8("nsort_name")&""" class=""nsort"" href=""../Product/nsort"&rs8("nsort_id")&"-1.html"">"&rs8("Nsort_name")&"</a></td></tr>"
response.write "<tr><td height=2 background=../Img/dot_menu.gif></td></tr>"
rs8.movenext
loop
rs8.close
set rs8=nothing
response.write "</table></td></tr>"
rs.movenext 
loop 
rs.close
set rs=nothing
response.write "</table>"
response.write "<SCRIPT language=javascript1.2 src=""../inc/menu.js""></SCRIPT>"
case 3
response.write "<table cellpadding=0 width=""90%""  border=0 cellspacing=""0"" style=""margin:0px auto;"">"
set rs=server.createobject("adodb.recordset")
sql="select sort_id,sort_name from WrzcNethtml_sort order by sort_xu DESC,sort_id desc" 
rs.open sql,conn,1,1 
do while not rs.eof 
insortid=rs("sort_id")
response.write "<TR><TD onmouseover=""MM_showHideLayers('Layer_"&insortid&"', '', 'show')"" onmouseout=""MM_showHideLayers('Layer_"&insortid&"', '', 'hide')"" height=""26"" align=""left""> &nbsp;<IMG src=""../Skin/"&WrzcNethtml_skin&"/dot.gif"" border=0 align=""absmiddle""> "
response.write "<a class=""sort"" title="""&rs("sort_name")&""" href=""../Product/sort"&rs("sort_id")&"-1.html"">"&rs("sort_name")&"</a>"
response.write "<DIV id=Layer_"&insortid&" onmouseover=""MM_showHideLayers('Layer_"&insortid&"','','show')"" style=""margin:-20px 0px 0px 80px; *margin:0px 0px 0px 0px; Z-INDEX: 1; VISIBILITY: hidden; POSITION: absolute;"" onmouseout=""MM_showHideLayers('Layer_"&insortid&"','','hide')"">"
response.write "<table  border=""0"" cellspacing=""0"" cellpadding=""5"" class=""sort1"">"
set rs8=server.CreateObject("adodb.recordset")
rs8.open "select nsort_id,nsort_name from WrzcNethtml_nsort where sort_id="&insortid&" order by nsort_xu desc,nsort_id desc",conn,1,1
i=0
do while not rs8.eof and not rs8.bof
i=i+1
response.write "<tr><td class=""cartshow"&i mod 2&"""><a title="""&rs8("nsort_name")&""" href=""../Product/nsort"&rs8("nsort_id")&"-1.html"" class=""nsort"">"&rs8("Nsort_name")&"</a></td></tr>"
rs8.movenext
loop
rs8.close
set rs8=nothing
response.write "</table></DIV></TD></TR>"
rs.movenext
loop
rs.close
set rs=nothing
response.write "</table>"
end select
end function

function getpaymentid
set rs2=conn.execute("select id from WrzcNethtml_type where typename like '%pay%' or typename like '%bank%'")
if rs2.bof and rs2.eof then
getpaymentid=0
else
getpaymentid=rs2("id")
end if
rs2.close
set rs2=nothing
end function
function getpsid
set rs2=conn.execute("select id,typename from WrzcNethtml_type where typename like '%delivery%' or typename like '%shipping%'")
if rs2.bof and rs2.eof then
getpsid=0
else
getpsid=rs2("id")
end if
rs2.close
set rs2=nothing
end function
psid=getpsid
paymentid=getpaymentid

Function showerr(stype)
select case stype
case "e"
response.write "<script language=javascript>alert('Error');history.go(-1);</script>"
response.End
case "e1"
response.write "<script language=javascript>alert('Product Existed');history.go(-1);</script>"
response.End
case "e2"
response.write "<script language=javascript>alert('Product must be the same Category');history.go(-1);</script>"
response.End
case "e3"
response.write "<script language=javascript>alert('Sorry,Out of Stock!');history.go(-1);</script>"
response.End
case "e4"
response.write "<script language=javascript>alert('Sorry,Shortage of stock!');history.go(-1);</script>"
response.End
case "e5"
response.write "<script language=javascript>alert('Product Existed');history.go(-1);</script>"
response.End
case "e6"
response.write "<script language=javascript>alert('No Product in Shopping Cart');history.go(-1);</script>"
response.End
case "e7"
response.write "<script language=javascript>alert('Please enter correct email');history.go(-1);</script>"
response.End
case "e8"
response.write "<script language=javascript>alert('Product Existed');history.go(-1);</script>"
response.End
end select
End Function

Function GBtoUTF8(szInput) 
If szInput="" Then 
	GBtoUTF8=szInput
	Exit Function
End If
For x=1 To Len(szInput) 
	wch=Mid(szInput,x,1) 
	nAsc=AscW(wch) 
	If nAsc < 0 Then nAsc = nAsc + 65536 
	If (nAsc And &HFF80) = 0 Then 
		szRet = szRet & wch 
	Else 
		If (nAsc And &HF000) = 0 Then
		uch = "%" & Hex(((nAsc \ 2 ^ 6)) Or &HC0) & Hex(nAsc And &H3F Or &H80)
		szRet = szRet & uch
		Else
		uch = "%" & Hex((nAsc \ 2 ^ 12) Or &HE0) & "%" & _
		Hex((nAsc \ 2 ^ 6) And &H3F Or &H80) & "%" & _
		Hex(nAsc And &H3F Or &H80)
		szRet = szRet & uch
		End If
	End If 
Next 
GBtoUTF8=szRet 
End Function
if request("lookt")<>"" then lookt=request("lookt")
pagecc=5
if Request.Cookies("WrzcNethtml")("user_name")<>"" then
user_name=Request.Cookies("WrzcNethtml")("user_name")
elseif Request.Cookies("WrzcNethtml")("guest")<>"" then
user_name=Request.Cookies("WrzcNethtml")("guest")
end if
Function FormatNum(Num)
FormatNum=FormatNumber(Num,2,-1,-1,False)
End Function

hui=1
huobix=huobi
if Request.Cookies("WrzcNethtml")("v")<>"" then
v=Request.Cookies("WrzcNethtml")("v")
set rs=server.createobject("adodb.recordset")
sql="select * from WrzcNethtml_curr where curr_name='"&v&"'"
rs.open sql,conn,1,1
if not rs.eof then
bizhong=rs("curr_name")
danwei=rs("curr_danwei")
fuhao=rs("curr_fuhao")
hui=rs("curr_hui")
curr_pay=rs("curr_pay")
end if
rs.close
set rs=nothing
end if

%><%Function vencode(WrzcNethtml)
for i=1 to len(WrzcNethtml)
if mid(WrzcNethtml,i,1)<>vword then
ven=asc(mid(WrzcNethtml,i,1))-vbut
if ven>126 then
ven=ven-95
elseif ven<32 then
ven=ven+95
end if
vena=vena&chr(ven)
else
vena=vena&chr(13)
end if
next
vencode=vena
End Function%>