<!--#include file="head.asp"-->
<!--#include file="subleft.asp"-->
<script>document.getElementById('o_1').setAttribute("class", "ed"); document.getElementById("t_1").style.display="";document.getElementById('s_1_1').setAttribute("class", "ed4");</script>

<meta name="keywords" content="<%=webname%>,<%=webkeywords%>">
<meta name="description" content="<%=webdescription%>">

<%
'call chktel()
'call iszizhu()

jiesuanzhouqi2=2 '未认证商户结算周期

response.Cookies("dateaa")=""
response.Cookies("datebb")=""
response.Cookies("dingdan")=""
response.Cookies("zhuangtai")=""
%>

<title><%=webname%>-会员中心</title><br>
			
<DIV id=main2> 
<%call webleft()%>
<DIV id=main_right>
<DIV id=main_right_content>


<%
'随机数
Const stringmodarr = "0123456789"
dim randarr2,strlength
strlength = Len(stringmodarr)
Randomize timer
For i = 1 To 4 
randarr2 = randarr2&Mid(stringmodarr,Int(Rnd * strlength + 1),1)  
Next 
get_timeh=timer()*100
get_timeh=right("00"&get_timeh,2)
get_timeh=replace(get_timeh,".","0")
randarr = Right((year(Now())),2)&Right(("00"&Month(Now())),2)&Right(("00"&Day(Now())),2)&Right(("00"&hour(Now())),2)&Right(("00"&minute(Now())),2)&Right(("00"&second(Now())),2)&get_timeh&randarr2

'开通VIP
if SafeRequest("c")="vip" then
Application.Lock
sql="select * from ayname where aynameid="&clng(request.Cookies("aynameid"))&"" 
rs.open sql,conn,1,3
if cint(rs("isvipid"))=1 then call PopErr("您已经是尊贵VIP了，不需要重复开通")
if ccur(rs("ayyue"))<ccur(vipj) then call PopErr2("开通尊贵VIP需要金额300元，您的账号余额不足，请先充值","/user/chong")

aycaiwuyue=ccur(rs("ayyue"))-300
if ccur(aycaiwuyue)<0 then aycaiwuyue=0
rs("ayyue")=aycaiwuyue
rs("ayxiaofei")=ccur(rs("ayxiaofei"))+300
rs("isvipid")=1

if isnull(trim(rs("vipdate")))=false and trim(rs("vipdate"))<>"" then
rs("vipdate")=DateAdd("yyyy",1,rs("vipdate"))
else
rs("vipdate")=now()
end if

rs.update
rs.close

'财务
conn.Execute("Insert Into "&request.Cookies("cwku")&"(aycaiwuleibie,aycaiwuuser,aycaiwudingdan,aycaiwudate,aycailiushui,aycaiwujine,aycaiwuyue,aycwfsjin,aycwinjin,aycaiwubody) values('2','"&request.Cookies("aynameid")&"','"&randarr&"','"&now()&"','"&randarr&"','"&Formatnumber(vipj,3,true,-1,0)&"','"&Formatnumber(aycaiwuyue,3,true,-1,0)&"','"&Formatnumber(vipj,3,true,-1,0)&"','"&Formatnumber(vipj,3,true,-1,0)&"','开通VIP')")
call logadd(request.Cookies("aynameid"),"开通VIP成功",0,0)
call PopErr2("开通VIP成功","index")
Application.Unlock	
end if


'消保解冻
if SafeRequest("c")="jd" then
response.End()
sql="select * from ayname where aynameid="&clng(request.Cookies("aynameid"))&"" 
rs.open sql,conn,1,3
if cint(rs("ayisxiaobao"))=0 then call PopErr("您未加入诚信保障服务")
if ccur(rs("ayisxiaojin"))<=0 then call PopErr("VIP错误")
if DateDiff("d",rs("xbdate"),now())<=10 then 
call logadd(request.Cookies("aynameid"),"加入消保金额10天后才可以解冻",0,1)
call PopErr("加入消保金额10天后才可以解冻")
end if

yjin=rs("ayisxiaojin")
rs("ayisxiaobao")=0
rs("ayisxiaojin")=0
aycaiwuyue=ccur(rs("ayyue"))+ccur(yjin)
rs("ayyue")=ccur(rs("ayyue"))+ccur(yjin)
'rs("aydongjie")=ccur(rs("aydongjie"))-ccur(yjin)
rs.update
rs.close

'财务
conn.Execute("Insert Into "&request.Cookies("cwku")&"(aycaiwuleibie,aycaiwuuser,aycaiwudingdan,aycaiwudate,aycailiushui,aycaiwujine,aycaiwuyue,aycwfsjin,aycwinjin,aycaiwubody) values('7','"&request.Cookies("aynameid")&"','"&randarr&"','"&now()&"','"&randarr&"','"&Formatnumber(yjin,3,true,-1,0)&"','"&Formatnumber(aycaiwuyue,3,true,-1,0)&"','"&Formatnumber(yjin,3,true,-1,0)&"','"&Formatnumber(yjin,3,true,-1,0)&"','解冻VIP')")
call logadd(request.Cookies("aynameid"),"解冻VIP操作成功",0,0)
call PopErr2("解冻VIP操作成功","myname")
end if

%>
<TABLE width="99%" align="center">
  <TBODY>
  <TR> 
    <TD height="30">
<%
if trim(request.Cookies("kamiku"))="" then call PopErr2("获取身份信息出错ES01，请重新登录","/index/exit")
if trim(request.Cookies("flku"))="" then call PopErr2("获取身份信息出错ES02，请重新登录","/index/exit")
if trim(request.Cookies("spku"))="" then call PopErr2("获取身份信息出错ES03，请重新登录","/index/exit")
if trim(request.Cookies("ddku"))="" then call PopErr2("获取身份信息出错ES04，请重新登录","/index/exit")
if trim(request.Cookies("cwku"))="" then call PopErr2("获取身份信息出错ES05，请重新登录","/index/exit")
if trim(request.Cookies("rzku"))="" then call PopErr2("获取身份信息出错ES06，请重新登录","/index/exit")

sql="select * from ayname where aynameid="&clng(request.Cookies("aynameid"))&"" 
rs.open sql,conn,1,1
if trim(request.Cookies("kamiku"))<>trim(rs("kamiku")) then call PopErr2("系统数据已更新ES01，请重新登录","/index/exit")
if trim(request.Cookies("flku"))<>trim(rs("flku")) then call PopErr2("系统数据已更新ES01，请重新登录","/index/exit")
if trim(request.Cookies("spku"))<>trim(rs("spku")) then call PopErr2("系统数据已更新ES02，请重新登录","/index/exit")
if trim(request.Cookies("ddku"))<>trim(rs("ddku")) then call PopErr2("系统数据已更新ES03，请重新登录","/index/exit")
if trim(request.Cookies("cwku"))<>trim(rs("cwku")) then call PopErr2("系统数据已更新ES04，请重新登录","/index/exit")
if trim(request.Cookies("rzku"))<>trim(rs("rzku")) then call PopErr2("系统数据已更新ES05，请重新登录","/index/exit")
istelrz=rs("istelrz")
ismailrz=rs("ismailrz")
ayxiaofei=rs("ayxiaofei")
aydongjie=rs("aydongjie")
%>	

<table width="98%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="200" height="35">
  <span style="font-size: 16px; font-weight: bold">
  <%if hour(now())>0 and hour(now())<5 then response.Write "凌晨好 "
if hour(now())>4 and hour(now())<9 then response.Write "早上好 "
if hour(now())>8 and hour(now())<12 then response.Write "上午好 "
if hour(now())>11 and hour(now())<14 then response.Write "中午好 "
if hour(now())>13 and hour(now())<19 then response.Write "下午好 "
if hour(now())>18 and hour(now())<22 then response.Write "晚上好 "
if hour(now())>21 and hour(now())<=24 then response.Write "深夜好 "
if hour(now())>=0 and hour(now())<=4 then response.Write "凌晨好 "
%>
  <%=rs("aytrueuser")%></span></td>
    </tr>
</table>

	</TD>
    </TR>
  
  </TBODY></TABLE>


<br><br>
<TABLE width="99%" align="center" class=table_style_1 > 
  <TBODY>
  <TR>
    <TD width="30"><A href="myname"><IMG align=absMiddle src="<%=ossurl%>images/00.gif" width=30  height=35></A></TD>
    <TD>&nbsp;<a href="myname">账户设置</a></TD>
    <TD width="30"><A href="anquan"><IMG src="<%=ossurl%>images/11.gif" width=30 height=35 border="0" align=absMiddle></A></TD>
    <TD>&nbsp;<a href="anquan">修改密码</a></TD>
    
    <TD width="30"><A href="jiesuan"><IMG src="<%=ossurl%>images/33.gif" width=30 height=35 border="0" align=absMiddle></A></TD>
    <TD>&nbsp;<a href="mydingdan">订单管理</a></TD>
        
    <TD width="30"><A href="mydingdan"><IMG src="<%=ossurl%>images/77.gif" width=30 height=35 border="0" align=absMiddle></A></TD>
    <TD>&nbsp;<a href="tousulist">投诉列表</a></TD>
  </TR>
</TBODY></TABLE>



<%
rs.close
%>


</DIV>

</DIV>
<DIV class=clear></DIV></DIV>
</DIV>


<br>

<!--#include virtual="/show/foot.asp"-->


