<%

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

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 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


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 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 getpaymentid
set rs2=conn.execute("select id from WrzcNethtml_type where typename like '%pay%'")
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




Function FormatNum(Num)
FormatNum=FormatNumber(Num,2,-1,-1,False)
End Function

hui=1
huobix=huobi

%>
<%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%>