⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 z_bank_ebank.asp

📁 漂亮的企业网站系统v11 1、整体修改了上一版的一些BUG。 2、修改了页面底部的统计形式。 3、修改了“公告更新”栏目
💻 ASP
📖 第 1 页 / 共 3 页
字号:
      end if
      if PFG < 100 then
          FoundErr=true
          Errmsg=Errmsg+"<br>"+"<li>你这叫贷款?就贷那么点我还不如不要。</li>"
      end if
      if PFG*ZHML > StockPile - 10000 then
          FoundErr=true
          Errmsg=Errmsg+"<br>"+"<li>唉,虽然很想贷给你,但银行还得留点底,不然到时要给人拆了。(注意:每次贷款,不能使银行的库金少于一万,你可以偿试贷少一点)</li>"
      end if
      if PFG*ZHML > H_trade then
          FoundErr=true
          Errmsg=Errmsg+"<br>"+"<li>哇!!您真是超级万人迷,但请不要那么猛啊!(注意:你要贷的款项超过"&H_trade&Curr&",银行的最大单笔交易为"&H_trade&Curr&"。</li>"
      end if
  end if
  if not FoundErr then
      cjconn.execute ("insert into PaymentForGoods (bankid,bankuserid,PaymentForGoods,P_Accrual,ByDetainCP,LastTime) values ("&BankID&","&BankUserID&","&PFG*ZHML&","&int(P_DateProfit/100*PFG*ZHML*P_DateCount)&","&PFG&",'"&dateadd("d",P_DateCount,now())&"')")
      cjconn.execute ("update bankuser set PaymentForGoods=PaymentForGoods+"&PFG*ZHML&",P_accrual=P_accrual+"&int(P_DateProfit/100*PFG*ZHML*P_DateCount)&",ByDetainCP=ByDetainCP+"&PFG&",events='"&PFG*ZHML&"|贷款|"&now()&"' where bankuserid="&BankUserID)
      cjconn.execute ("update bank set StockPile=StockPile-"&PFG*ZHML&",PaymentForGoods=PaymentForGoods+"&PFG*ZHML&" where bankid="&BankID)
      if OpenEventsLog then
          cjconn.execute ("insert into bankevent (bankid,name1,name2,events,trade) values ("&bankid&",'"&login_username&"','','贷款',"&PFG*ZHML&")")
      end if
      conn.execute ("update user_data set emoney=emoney+"&PFG*ZHML&",userCP=userCP-"&PFG&" where username='"&login_username&"'")
      call yaoyue_banksuc()
  end if
end sub
'还款
sub P_f_2()
  dim PID,PF2_1,PF2_2,P_ac,P_CP,CentTB
  if not isnumeric(request.form("PF2")) then
      founderr=true
      Errmsg=Errmsg+"<br>"+"<li>请输入数字</li>"
  else
      PID=cint(Request.Form("PID"))
      PF2_1=int(abs(Request.Form("PF2")))
      CentTB=false
      csql="select PaymentForGoods,P_Accrual,ByDetainCP from PaymentForGoods where PID="&PID
      set crs=cjconn.execute (csql)
      if crs.bof and crs.eof then
          Errmsg=Errmsg+"<br>"+"<li>你有毛病还是发财了嫌钱多,这也刷?</li>"
          FoundErr=true
          exit sub
      else
          PF2_2=crs(0)
          P_ac=crs(1)
          P_CP=crs(2)
      end if
      set crs=nothing
      if PF2_1 > PF2_2 then
          FoundErr=true
          Errmsg=Errmsg+"<br>"+"<li>只见银行的柜台小姐的双颊泛红,眼带桃花直瞪着你,你还真凯,你本笔贷款并没有这么多钱。</li>"
      end if
      if PF2_1 + P_ac > usermoney then
          FoundErr=true
          Errmsg=Errmsg+"<br>"+"<li>sorry,我们不收假钞,真的你又没那么多,记住,要加上利息一并还的哦。</li>"
      end if
      if PF2_1 < PF2_2 then
          if PF2_1*ZHML < 100*ZHML then
              FoundErr=true
              Errmsg=Errmsg+"<br>"+"<li>分期还款每次最少得还" & 100*ZHML&Curr & "。</li>"
          elseif  PF2_1 mod ZHML > 0 then
              FoundErr=true
              Errmsg=Errmsg+"<br>"+"<li>分期还清贷款,还款的数目必须是"&zhml&"的倍数,也就是每"&zhml&Curr&"换回1点魅力。</li>"
          elseif P_CP-PF2_1\ZHML < 100 then
              Founderr=true
              Errmsg=Errmsg+"<br>"+"<li>本期还后剩下所押的魅力已经不足一百,请一次还清。</li>"
          elseif not FoundErr then
              CentTB=true
          end if
      end if
  end if
  if not FoundErr then
      if not CentTB then
          cjconn.execute ("delete from PaymentForGoods where PID="&PID)
      else
          cjconn.execute ("update PaymentForGoods set PaymentForGoods=PaymentForGoods-"&PF2_1&",P_Accrual=0,ByDetainCP=ByDetainCp-"&PF2_1\ZHML&" where PID="&PID)
      end if
      cjconn.execute ("update bankuser set PaymentForGoods=PaymentForGoods-"&PF2_1&",P_accrual=P_accrual-"&P_ac&",ByDetainCP=ByDetainCP-"&PF2_1\ZHML&",events='"&PF2_1&"|还贷款|"&now()&"' where bankuserid="&BankUserID)
      cjconn.execute ("update bank set StockPile=StockPile+"&PF2_1+P_ac&",PaymentForGoods=PaymentForGoods-"&PF2_1&" where bankid="&BankID)
      if OpenEventsLog then
          cjconn.execute ("insert into bankevent (bankid,name1,name2,events,trade) values ("&bankid&",'"&login_username&"','','贷款',"&PF2_1*ZHML&")")
      end if
      conn.execute ("update user_data set emoney=emoney-"&PF2_1+P_ac&",userCP=userCP+"&PF2_1 \ ZHML&" where username='"&login_username&"'")
      '记录盈利
      call record(P_ac)
      call yaoyue_banksuc()
  end if
end sub
'转帐
sub vir()
  dim Bvir,BankUser,TakeOverUser,BFreeze
  if not isnumeric(request.form("Bvir")) then
      founderr=true
      Errmsg=Errmsg+"<br>"+"<li>请输入数字</li>"
  else
      Bvir=int(abs(Request.Form("Bvir")))
      BankUser=trim(Request.Form("bankuser"))
      BFreeze=false
      csql="select bankuserid,freeze from bankuser where bankid="&BankID&" and name='"&BankUser&"'"
      set crs=cjconn.execute (csql)
      if crs.bof and crs.eof then
          Errmsg=Errmsg+"<br>"+"<li>本银行没有该用户,请确定输入的用户名正确。</li>"
          FoundErr=true
          exit sub
      else
          TakeOverUser=crs(0)
          if crs(1)=-1 then
              BFreeze=true
          end if
      end if
      set crs=nothing
      if BFreeze then
          FoundErr=true
          Errmsg=Errmsg+"<br>"+"<li>你所要转帐的用户已经被冻结。</li>"
      end if
      if int(Bvir+Bvir*virement/100) > usermoney then
          FoundErr=true
          Errmsg=Errmsg+"<br>"+"<li>你是不是好心过头啦?还是人家催债催得太紧,让你自己还有多少钱都不知道?(注意:所转的帐及转帐所需的手继费都从你现金中扣除,本笔转加手继费一共需"&int(Bvir+Bvir*virement/100)&Curr&",而你的现金只有"&usermomey&Curr&"。)</li>"
      end if
      if BankUser = login_username then
          FoundErr=true
          Errmsg=Errmsg+"<br>"+"<li>给自己转帐很好玩吗?</li>"
      end if
      if Bvir < L_trade then
          FoundErr=true
          Errmsg=Errmsg+"<br>"+"<li>HI!亲爱的客户,您转的钱也未免太……少了点吧?</li>"
      end if
      if Bvir > H_trade then
          FoundErr=true
          Errmsg=Errmsg+"<br>"+"<li>晕,你的钱太多太重了,请分次,OK?</li>"
      end if
  end if
  if not FoundErr then
      '转方更新信息
      cjconn.execute ("update bankuser set events='"&Bvir&"|转帐|"&now()&"' where bankuserid="&BankUserID)
      cjconn.execute ("update bank set alldeposit=alldeposit-"&Bvir&",StockPile=StockPile-"&int(Bvir+Bvir*virement/100)&" where bankid="&BankID)
      if OpenEventsLog then
          cjconn.execute ("insert into bankevent (bankid,name1,name2,events,trade) values ("&bankid&",'"&login_username&"','"&BankUser&"','转帐',"&Bvir&")")
      end if
      conn.execute ("update user_data set emoney=emoney-"&int(Bvir+Bvir*virement/100)&" where username='"&login_username&"'")
      '记录盈利
      call record(Bvir*virement/100)
      '收方更新信息
      cjconn.execute ("update bankuser set CurrDeposit=CurrDeposit+"&Bvir&" where bankuserid="&TakeOverUser)
      dim topic,word
	  topic="[银行转账]请查收"
	  word=login_username&"从"&bankname&"转"&Bvir&Curr&"给你,已经存入你在"&bankname&"的账户中。"
	  sql="insert into user_mail(accept_u,send_u,topic,word,tim,types,isread) values('"&BankUser&"','"&login_username&"','"&topic&"','"&word&"',Now(),1,0)"
	  conn.Execute(sql)
	  call yaoyue_banksuc
  end if
end sub
'汇款
sub R_E_M()
  dim BRemit,TakeBank,BankUser,TakeOverUser,TakeOverBank,BFreeze
  if not isnumeric(request.form("BRemit")) then
      founderr=true
      Errmsg=Errmsg+"<br>"+"<li>金额请输入数字。</li>"
  else
      BRemit=int(abs(Request.Form("BRemit")))
      TakeBank=trim(Request.Form("takebank"))
      BankUser=trim(Request.Form("bankuser"))
      csql="select bankid from bank where bankname='"&TakeBank&"'"
      BFreeze=false
      set crs=cjconn.execute (csql)
      if crs.BOF and crs.EOF then
          Errmsg=Errmsg+"<br>"+"<li>找不到你所要汇到的银行,请确定该银行存在。</li>"
          FoundErr=true
          exit sub
      else
          TakeOverBank=crs(0)
      end if
      csql="select bankuserid,freeze from bankuser where bankid="&TakeOverBank&" and name='"&BankUser&"'"
      set crs=cjconn.execute (csql)
      if crs.BOF and crs.EOF then
          Errmsg=Errmsg+"<br>"+"<li>在所汇到的银行中找不到所指定的用户,请确认该用户存在。</li>"
          FoundErr=true
          exit sub
      else
          TakeOverUser=crs(0)
          if crs(1)=-1 then
              BFreeze=true
          end if
      end if
      set crs=nothing
      if BFreeze then
          FoundErr=true
          Errmsg=Errmsg+"<br>"+"<li>你所要转帐的用户已经被冻结。</li>"
      end if
      if TakeBank=bankname then
          FoundErr=true
          Errmsg=Errmsg+"<br>"+"<li>相同银行,只要用转帐就行吧?</li>"
      end if
      if int(BRemit+BRemit*remit/100) > usermoney then
          FoundErr=true
          Errmsg=Errmsg+"<br>"+"<li>你是不是好心过头啦?还是人家催债催得太紧,让你自己还有多少钱都不知道?(注意:所转的帐及转帐所需的手继费都从你现金中扣除,本笔转加手继费一共需"&int(BRemit+BRemit*remit/100)&Curr&",而你的现金只有"&usermomey&Curr&"。)</li>"
      end if
      if BankUser = login_username then
          FoundErr=true
          Errmsg=Errmsg+"<br>"+"<li>给自己汇款很好玩吗?</li>"
      end if
      if BRemit < L_trade then
          FoundErr=true
          Errmsg=Errmsg+"<br>"+"<li>HI!亲爱的客户,您转的钱也未免太……少了点吧?</li>"
      end if
      if BRemit > H_trade then
          FoundErr=true
          Errmsg=Errmsg+"<br>"+"<li>晕,你的钱太多太重了,请分次,OK?</li>"
      end if
  end if
  if not FoundErr then
      '汇方更新信息
      cjconn.execute ("update bankuser set events='"&BRemit&"|转帐|"&now()&"' where bankuserid="&BankUserID)
      cjconn.execute ("update bank set StockPile=StockPile-"&int(BRemit*remit/100)&" where bankid="&BankID)
      if OpenEventsLog then
          cjconn.execute ("insert into bankevent (bankid,name1,name2,events,trade) values ("&bankid&",'"&login_username&"','"&BankUser&"','汇款',"&BRemit&")")
      end if
      conn.execute ("update user_data set emoney=emoney-"&int(BRemit+BRemit*remit/100)&" where username='"&login_username&"'")
      '记录盈利
      call record(BRemit*remit/100)
      '收方更新信息
      cjconn.execute ("update bankuser set CurrDeposit=CurrDeposit+"&BRemit&" where bankuserid="&TakeOverUser)
      cjconn.execute ("update bank set alldeposit=alldeposit+"&BRemit&",StockPile=StockPile+"&BRemit&" where bankid="&TakeOverBank)
      dim topic,word
	  topic="[银行汇款]请查收"
	  word=login_username&"从"&bankname&"汇"&BRemit&Curr&"到"&TakeBank&"给你,已经存入你在"&TakeBank&"的账户中。"
	  sql="insert into user_mail(accept_u,send_u,topic,word,tim,types,isread) values('"&BankUser&"','"&login_username&"','"&topic&"','"&word&"',Now(),1,0)"
	  conn.Execute(sql)
	  call yaoyue_banksuc
  end if
end sub
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -