<%
'写入cookies---writecookies()
function writecookies()
dim xing,ming,xingbie,xuexing,nian1,yue1,ri1,hh1,mm1
xing=newtrim(request("xing"))
ming=newtrim(request("ming"))
xingbie=newtrim(request("xingbie"))
xuexing=newtrim(request("xuexing"))
'公历
nian1=newtrim(request("nian"))
yue1=newtrim(request("yue"))
ri1=newtrim(request("ri"))
hh1=newtrim(request("hh"))
mm1=newtrim(request("mm"))
'农历
dim glstr,nlstr
glstr=nian1&"-"&yue1&"-"&ri1
nlstr=hhcal(glstr)
dim nlarray,nlnian,nlyue,nlri,sx
nlarray=split(nlstr,"|",-1,1)
nlnian=nlarray(0)
nlyue=nlarray(1)
nlri=nlarray(2)
sx=nlarray(3)

response.Cookies("Bmcha").Expires=date+1
response.Cookies("Bmcha")("xing")=xing
response.Cookies("Bmcha")("ming")=ming
response.Cookies("Bmcha")("xingbie")=xingbie
response.Cookies("Bmcha")("xuexing")=xuexing
'公历
response.Cookies("Bmcha")("nian1")=nian1
response.Cookies("Bmcha")("yue1")=yue1
response.Cookies("Bmcha")("ri1")=ri1
response.Cookies("Bmcha")("hh1")=hh1
response.Cookies("Bmcha")("mm1")=mm1
'农历
response.Cookies("Bmcha")("nian2")=nlnian
response.Cookies("Bmcha")("yue2")=nlyue
response.Cookies("Bmcha")("ri2")=nlri
response.Cookies("Bmcha")("hh2")=hh1
response.Cookies("Bmcha")("mm2")=mm1
response.Cookies("Bmcha")("sx")=sx
end function
%>
<%
'清除cookies---clearcookies()
function clearcookies()
response.Cookies("Bmcha")("xing")=""
response.Cookies("Bmcha")("ming")=""
response.Cookies("Bmcha")("xingbie")=""
response.Cookies("Bmcha")("xuexing")=""
'公历
response.Cookies("Bmcha")("nian1")=""
response.Cookies("Bmcha")("yue1")=""
response.Cookies("Bmcha")("ri1")=""
response.Cookies("Bmcha")("hh1")=""
response.Cookies("Bmcha")("mm1")=""
'农历
response.Cookies("Bmcha")("nian2")=""
response.Cookies("Bmcha")("yue2")=""
response.Cookies("Bmcha")("ri2")=""
response.Cookies("Bmcha")("hh2")=""
response.Cookies("Bmcha")("mm2")=""
response.Cookies("Bmcha")("sx")=""
end function
%>