<!--#include file="data.asp"-->
<!-- #include file="inc/const.asp" -->
<!--#include file="inc/char.asp"-->
<!-- #include file="chkuser.asp" -->
<!-- #include file="inc/theme.asp" -->

<%
if membername="" then
%>
<script language=vbscript>
  location.href = "login.asp"
</script>
<%

else

	sql="SELECT * FROM bank WHERE UserName='"&membername&"'"
	Set Rs=conn.Execute(sql)
	if not rs.bof then
    rs.close

%>
<script language=vbscript>
  msgbox "您已经开了一个帐号,我们不会给你腐败的机会的。：）"
  location.href = "bank.asp"
</script>
<%
else

sql="Select  * from user where UserName='"&membername&"'"  
set rs=conn.Execute(sql)

temptime=date

membername=request.cookies("aspsky")("username")
sql="insert into bank(username,depositmoney,lendmoney,accrual,deposittime,lendtime) values('"&membername&"','0','0','0','"&temptime&"','"&temptime&"')"
conn.Execute sql
sqlstr="update bank set ac=ac+1 where username='银行'"
conn.Execute sqlstr
conn.close
set conn=nothing
%>

<script language=vbscript>


location.href = "bank.asp"

</script>
<%
end if
end if
%>