<!-- #include file="include/config.asp" -->
<!-- #include file="INCLUDE/skin.asp" -->
<!--#include file="include/conn.asp"-->
<!--#include file="z_bank_data.asp"-->
<!--#include file="z_bank_const.asp"-->
<!--#include file="z_bank_accrual.asp"-->
<%
'=========================================================
' File: z_bank_main.asp
' Version:1.0
' Date: 2003-7-20
' Script Written by 冰语，倚天电子，http://et8.126.com
'=========================================================
' Copyright (C) 2002,2003 et8.126.Com. All rights reserved.
' Web: ,http://et8.126.com
' Email: lupi@163.net
'=========================================================
tit_fir="<a href='z_bank_index.asp'>社区银行</a>"
tit="银行中心"
call web_head(1,0,2,0,0)
if not foundbankuserid then
    founderr=true
    Errmsg=Errmsg+"<br>"+"<li>您还没有在银行开户。</li>"
end if
if not FoundBankID then
    founderr=true
    Errmsg=Errmsg+"<br>"+"<li>没有找到该银行。</li><li>该银行还没有开放</li><li>非法操作</li>"
end if
if UserFreeze then
    founderr=true
    Errmsg=Errmsg+"<br>"+"<li>你在本银行的帐号已经被冻结，请连系行长。</li>"
end if
if FoundErr<>true then
    call main()
else 
   call bank_error() 
end if
sub main()
%>
<div align="center">
  <center>
<table cellpadding=3 cellspacing=1  border="2" bordercolor=<%response.write web_var(web_color,3)%> width="98%">
  <tr>
    <th width="100%" height=25 colspan=2><%=bankname%>营业大厅</td>
  </tr>
  <tr>
    <td width="100%" colspan=2 class=bg_3>
      <marquee><%if IsBankMaster then%><a href=z_bank_MasterWork.asp?bankid=<%=bankid%>>欢迎懂事长光临，若有需要，请点击进入行长办公室。</a><%else%>欢迎您光迎<font color=#ff0000><b><%=bankname%></b></font>，本行将竭诚您服务。本行简介：<%=msg%><%end if%></marquee>
    </td>
  </tr>
  <tr>
    <td width="40%" class=tablebody2 rowspan=6 valign=top>
      <table border="0" width="100%" cellspacing="3">
        <tr>
          <td width="100%" colspan=2><img src=images/img_bank/line.gif width=288 height=20></td>
        </tr>
        <tr>
          <td width="50%" valign=top>
          <%
            response.write "本行行长：<font color=#990000>"&bankmaster&"</font><br><br>"
            response.write "存款总额：<font color=#ff0000>"&AllDeposit&"</font><br><br>现有库金：<font color=#ff0000>"&StockPile&"</font><br><br>库存魅力：<font color=#ff0000>"&LoveLiness&"</font><br><br>客户数量：<font color=#ff0000>"&ClientCount&"</font><br><br>被贷款数：<font color=#ff0000>"&BPaymentForGoods&"</font><br><br>本行性质："
            if EveryBody then
                response.write "公有银行"
            else
                response.write "私人银行"
            end if
            response.write "<br><br>"
          %>
          </td>
          <td width="50%" valign=top>
          <img src='images/face/<%=BFace%>.gif' border=0> 
          <%         
          response.write "<br><br>行长个人信息：<br><br>"
          response.write "现金：<font color=#ff0000>"&BUserwealth&"</font><br>积分：<font color=#ff0000>"&BUserep&"</font><br>魅力：<font color=#ff0000>"&BUsercp&"</font><br><br>"
          %>
          </td>
        </tr>
        <tr>
          <td width="100%" align=center colspan=2><img src=images/img_bank/line.gif width=288 height=20><br><img src=h.gif height=5><br>
            <table border=1 cellpadding=10 cellspacing=3 width="100%">
              <tr>
                <td width="100%">
                <font color=#000066><b>您在<font color=#ff0000><%=bankname%></font>的财务状况</b>：</font><br>
                <%
                 response.write "现 金 总 数 ：　　　　<font color=#ff0000><b>"&usermoney&"</b></font>"&Curr&"<br>"
                 response.write "积　分　值　：　　　　<font color=#ff0000><b>"&uintegral&"</b></font>分<br>"
                 response.write "魅　力　值　：　　　　<font color=#ff0000><b>"&myuserCP&"</b></font>点<br>"
                 response.write "活期存款总数：　　　　<font color=#ff0000><b>"&CurrDeposit&"</b></font>"&Curr&"<br>"
                 response.write "活存利息总数：　　　　<font color=#ff0000><b>"&C_Accrual&"</b></font>"&Curr&"<br>"
                 response.write "定期存款总数：　　　　<font color=#ff0000><b>"&TimeDeposit&"</b></font>"&Curr&"<br>"
                 response.write "定存利息总数：　　　　<font color=#ff0000><b>"&T_Accrual&"</b></font>"&Curr&"<br>"
                 response.write "贷 款 总 数 ：　　　　<font color=#ff0000><b>"&PaymentForGoods&"</b></font>"&Curr&"<br>"
                 response.write "贷款利息总数：　　　　<font color=#ff0000><b>"&P_Accrual&"</b></font>"&Curr&"<br>"
                 response.write "贷款所押魅力：　　　　<font color=#ff0000><b>"&ByDetainCP&"</b></font>点"
                %>
                </td>
              </tr>
            </table>
          </td>
        </tr>
        <tr>
          <td width="100%" colspan=2>
            <img src=images/img_bank/line.gif width=288 height=20><div align=center><br><font color=#ff0000><b>本行存款排行前十名</b></font><br></div>
            <table cellpadding=3 cellspacing=3 align=center width="100%">
              <tr>
                <td class=tablebody2 align=center width="33%">用户名</td>
                <td class=tablebody2 align=center width="33%">活期存款</td>
                <td class=tablebody2 align=center width="34%">定期存款</td>
              </tr>
              <%
                csql="select top 10 name,CurrDeposit,TimeDeposit from bankuser where bankid="&bankid&" order by CurrDeposit+TimeDeposit desc"
                set crs=cjconn.execute (csql)
                if crs.bof and crs.eof then
                    Response.Write "<tr><td class=tablebody1 align=center width='100%' colspan=3>还没有任何用户</td></tr>"
                else
                    i=0
                    do while not crs.eof
                        i=i+1
              %>
              <tr>
                <td class=tablebody1 align=center width="33%"><%=crs(0)%></td>
                <td class=tablebody1 align=center width="33%"><%=crs(1)%></td>
                <td class=tablebody1 align=center width="34%"><%=crs(2)%></td>
              </tr>
              <%
                        if i>10 then exit do
                        crs.movenext
                    loop
                end if
              %>
            </table>
            <br><img src=images/img_bank/line.gif width=288 height=20>
          </td>
        </tr>
        <tr>
          <td width="100%" colspan=2></td>
        </tr>
        <tr>
          <td width="100%" colspan=2></td>
        </tr>
      </table>
    </td>
    <td width="60%" class=tablebody1 valign=top>
      <table cellpadding=0 cellspacing=5 width="100%">
        <tr>
          <td width="100%">
          　<img src=images/img_bank/bank.gif height=16 width=16> <FONT color=green>活期存款</font> <img src=images/img_bank/bank.gif height=16 width=16>　<b>1</b>号服务台　　本台兼办销户，点这里<A onclick="return confirm('这将把你所有的存款和累计利息加到你的现金上，如果你在本行有贷款，必须先还贷款以后才能销户。如果您有定期存款，请到期再销户。本行销户手续费为<%=log_on%><%=Curr%>是否真的要销户？');" href="z_bank_ebank.asp?bankid=<%=bankid%>&action=off"><FONT color=#cc0000><B>销户</B></FONT></A>
          <hr>
          </td>
        </tr>
        <tr>
        <form action=z_bank_ebank.asp?bankid=<%=bankid%>&action=C_d_1 method=post>
          <td width="100%">
          　存入现金：<input type=text name=C_d_1_1 size=16>　<input type=submit name=submit value=存入 <%if stockpile < 10000 then%>onclick="return confirm('该银行的库存金额已经只剩下<%=stockpile&Curr%>了，你是否还要在该银行存款？');"<%end if%>>　<input type=reset name=reset value=重填>　现金 <%=usermoney&Curr%>
          </td>
          </form>
        </tr>
        <tr>
        <form action=z_bank_ebank.asp?bankid=<%=bankid%>&action=C_d_2 method=post>
          <td width="100%">　取出现金：<input type=text name=C_d_2_1 size=16>　<input type=submit name=submit value=取出>　<input type=reset name=reset value=重填>　余额 <%=CurrDeposit&Curr%></td>
        </form>
       </tr>
       <tr>
         <td width="100%" align=left>说明：每次存款，都会自动把利息转为活存，如果只想取利息而不存款，请在存款处输入0提交即可。取款处成功后，利息将加到你的现金上。</td>
       </tr>
    </table>
    </td>
  </tr>
  <tr>
    <td width="60%" class=tablebody2 valign=top>
    <table cellpadding=0 cellspacing=5 width="100%">
        <tr>
          <td width="100%">
          　<img src=images/img_bank/bank.gif height=16 width=16> <FONT color=green>定期存款</font> <img src=images/img_bank/bank.gif height=16 width=16>　<b>2</b>号服务台　　本台兼办销户，点这里<A onclick="return confirm('这将把你所有的存款和累计利息加到你的现金上，如果你在本行有贷款，必须先还贷款以后才能销户。如果您有定期存款，请到期再销户。本行销户手续费为<%=log_on%><%=Curr%>是否真的要销户？');" href="z_bank_ebank.asp?bankid=<%=bankid%>&action=off"><FONT color=#cc0000><B>销户</B></FONT></A>
          <hr>
          </td>
        </tr>
        <tr>
        <form action=z_bank_ebank.asp?bankid=<%=bankid%>&action=T_d_1 method=post>
          <td width="100%">
          　存入现金：<input type=text name=T_d_1_1 size=16> 选择时长：
          <select name=timelong>
          <option value=10>十天</option>
          <option value=20>二十天</option>
          <option value=30>三十天</option>
          <option value=40>四十天</option>
          <option value=50>五十天</option>
          <option value=60>六十天</option>
          </select>
          　<input type=submit name=shubmit value=存入 <%if stockpile < 10000 then%>onclick="return confirm('该银行的库存金额已经只剩下<%=stockpile&Curr%>了，你是否还要在该银行存款？');"<%end if%>>　<input type=reset name=reset value=重填>
          </td>
        </form>
        </tr>
        <%
          csql="select TID,TimeDeposit,T_Accrual,DateCount,DateAndTime from TimeDeposit where bankuserid="&BankUserID
          set crs=cjconn.execute (csql)
          if not crs.bof and not crs.eof then
              do while not crs.eof
                  if datediff("d",datediff("d",crs(4),now()),crs(3))<=0 then
                      response.write "<form action=z_bank_ebank.asp?bankid="&bankid&"&action=T_d_2 method=post>"
                      response.write "<tr><td width='100%'><input type='hidden' name='TID' value='"&crs(0)&"'>"
                      response.write "　定存款项：<input type=text name=T_d_2_1 size=16 value="&crs(1)&"> <select name=timelong><option value=10>10天</option><option value=20>20天</option><option value=30>30天</option><option value=40>40天</option><option value=50>50天</option><option value=60>60天</option></select>　<select name=selects><option value=1>取出存款</option><option value=2>转入活存</option><option value=3>延长存期</option></select>　<input type=submit name=submit value=操作>"
                      response.write "</td></tr></form>"
                  end if
                  crs.movenext
              loop
          end if
        %>
        <tr>
          <td width="100%" align=left>注意：定期存款，存入后只有你选择的时间到了，才会出现相关的操作。出现相关操作时，如果选取款，请不要修改存款值；转活存不能把数据减小，只能增加或不改；选延时可增可减但不能减至<%=L_TimeDeposit%>以下，加的部分不能大于你的现金，超出的部分会自动从你的现金中扣除。取款和延时都把利息加到现金，转活把利息也转成活存，延时如果减少存款，减少部分也加到现金。</td>
        </tr>
    </table>
    </td>
  </tr>
  <tr>
    <td width="60%" class=tablebody1 valign=top>
    <table cellpadding=0 cellspacing=5 width="100%">
        <tr>
          <td width="100%">
          　<img src=images/img_bank/bank.gif height=16 width=16> <FONT color=green>魅力交易</font> <img src=images/img_bank/bank.gif height=16 width=16>　<b>3</b>号服务台
          <hr>
          </td>
        </tr>
        <form action=z_bank_ebank.asp?bankid=<%=bankid%>&action=B_loveliness method=post>
        <tr>
          <td width="100%">　买 <input type=text name=B_LS size=16> 点魅力　　<input type=submit name=submit value=买入>　<input type=reset name=reset value=重填></td>
        </tr>
        </form>
        <form action=z_bank_ebank.asp?bankid=<%=bankid%>&action=P_loveliness method=post>
        <tr>
          <td width="100%">　卖 <input type=text name=P_LS size=16> 点魅力　　<input type=submit name=submit value=卖出>　<input type=reset name=reset value=重填><div align=left>本行每点魅力为<%Response.Write "<font color=#ff0000><b>"&ZHML*4&"</b></font>"&Curr%>，本行库存的魅力还有<font color=#ff0000><b><%=loveliness%></b></font>点，您现在还有现金<%Response.Write "<font color=#ff0000><b>"&usermoney&"</b></font>"&Curr%>。本行收购每点魅力<%Response.Write "<font color=#ff0000><b>"&ZHML*2&"</b></font>"&Curr&"，你还有<font color=#ff0000><b>"&myusercp&"</b></font>点魅力。"%></div></td>
        </tr>
        </form>
    </table>
    </td>
  </tr>
  <tr>
    <td width="60%" class=tablebody2 valign=top>
    <table cellpadding=0 cellspacing=5 width="100%">
        <tr>
          <td width="100%">
          　<img src=images/img_bank/bank.gif height=16 width=16> <FONT color=green>社区信贷</font> <img src=images/img_bank/bank.gif height=16 width=16>　<b>4</b>号服务台
          <hr>
          </td>
        </tr>
        <tr>
        <form action=z_bank_ebank.asp?bankid=<%=bankid%>&action=P_f_1 method=post>
          <td width="100%">
          　用 <input type=text name=PFG size=16> 点魅力来贷款　<input type=submit name=submit value=贷款>　<input type=reset name=reset value=重填>
          </td>
        </form>
        </tr>
        <%
          csql="select PID,PaymentForGoods,DateAndTime from PaymentForGoods where bankuserid="&BankUserID
          set crs=cjconn.execute (csql)
          if not crs.bof and not crs.eof then
              do while not crs.eof
                  if datediff("d",datediff("d",crs(2),now()),P_DateCount)<=0 then
                      response.write "<form action=z_bank_ebank.asp?bankid="&bankid&"&action=P_f_2 method=post>"
                      response.write "<tr><td width='%100'><input type='hidden' name='PID' value='"&crs(0)&"'>"
                      response.write "　您所贷款项：<input type=text name=PF2 size=10 value="&crs(1)&">　<input type=submit name=submit value=偿还>　本笔贷款离最后时间还有：<font color=#ff0000><b>"&datediff("d",datediff("d",crs(2),now()),P_repay)&"</b></font>天"
                      response.write "</td></tr></form>"
                  end if
                  crs.movenext
              loop
          end if
          set crs=nothing
        %>
        <tr>
          <td width="100%" align=left>注意：贷款后必须<font color=#ff0000><b><%=P_DateCount%></b></font>后才能开始还款，在<%=P_DateCount%>天以内不会出现相关的操作。每笔贷款都可以分期还清，每次最少必须还<font color=#ff0000><b><%=100*ZHML%></b></font><%=Curr%>，期数不限，只要是在<font color=#ff0000><b><%=P_repay%></b></font>天内就行。本行每点魅力可以贷<font color=#ff0000><b><%=ZHML%></b></font><%=Curr%>，您还有魅力<font color=#ff0000><b><%=myusercp%></b></font>点。</td>
        </tr>
    </table>
    </td>
  </tr>
  <tr>
    <td width="60%" class=tablebody1 valign=top>
    <table cellpadding=0 cellspacing=5 width="100%">
        <tr>
          <td width="100%">
          　<img src=images/img_bank/bank.gif height=16 width=16> <FONT color=green>汇款转账</font> <img src=images/img_bank/bank.gif height=16 width=16>　<b>5</b>号服务台　　<a href=z_bank_ClientEvents.asp?bankid=<%=bankid%>><font color=green>客户查询</font></a>
          <hr>
          </td>
        </tr>
        <%if uintegral>=EP then%>
        <tr>
        <form action=z_bank_ebank.asp?bankid=<%=bankid%>&action=vir method=post>
          <td width="100%">　转 <input type=text name=Bvir size=10> 给 <input type=text name=bankuser size=10>　<input type=submit name=submit value=转出>　<input type=reset name=reset value=重填></td>
        </form>
        </tr>
        <tr>
        <form action=z_bank_ebank.asp?bankid=<%=bankid%>&action=R_E_M method=post>
          <td width="100%">　汇 <input type=text name=BRemit size=10> 到 <input type=text name=takebank size=10> 给 <input type=text name=bankuser size=10>　<input type=submit name=submit value=汇出>　<input type=reset name=reset value=重填>
          <div align=left>说明：同行交易为转账，异行交易汇款，请查详对方资料并确定自己要哪种交易，认真填写上表。转账第一个方框填要转的账目，第一个方框填收款人，汇款依次填入要汇的款数，要汇到的银行，收款人。<font color=#ff0000><b>特别提醒：</b></font>转帐或汇款后千万别刷新，否则就等于再转或再汇一次，切记。</div>
          </td>
       </form>
       </tr>
       <%
       else
       response.write "<tr><td width='100%' align=center>本行行长设定，必须是积分大于"&EP&"的会员才能汇款转账</td></tr>"
       end if
       %>
    </table>
    </td>
  </tr>
  <tr>
    <td width="60%" class=tablebody2 valign=top>
    <table cellpadding=0 cellspacing=5 width="100%">
        <tr>
          <td width="100%">
          　<img src=images/img_bank/bank.gif height=16 width=16> <FONT color=green>个人账目</font> <img src=images/img_bank/bank.gif height=16 width=16>　　<%if OpenEventsLog then%>该银行实行事件记录，你的详细记录请看：<a href=z_bank_ClientEvents.asp?bankid=<%=bankid%>&action=events><font color=green>我的记录</font></a><%elseif session("joekoe_online_admin")="joekoe_admin" then%><a href=z_bank_ClientEvents.asp?bankid=<%=bankid%>&action=events><font color=green>事件记录</font></a><%else%>以下是你个人交易最近的银行记录<%end if%>
          <hr>
          </td>
        </tr>
        <tr>
          <td width="100%">
            <table border=1 cellpadding=0 width="100%" align=center>
              <tr align=center>
                <td width="40%">交易时间</td>
                <td width="20%">事件</td>
                <td width="20%">金额(交易金)</td>
                <td width="25%">余额(现金)</td>
              </tr>
              <tr align=center>
                <td width="40%"><%=Events(2)%>　</td>
                <td width="20%"><%=Events(1)%>　</td>
                <td width="20%"><%=Events(0)%>　</td>
                <td width="20%"><%=usermoney%>　</td>
              </tr>
            </table>
          </td>
        </tr>
    </table>
    </td>
  </tr>
</table>
  </center>
</div><br>
<%
end Sub
%><%
call web_end(0)
%>