<?php
 include template("header"); ;echo '<div id="menu2">
    <a href="'; echo WEB_ROOT; ;echo '/manage/flow.php?user_id='; echo $id ;echo '">账务记录</a>
    &nbsp;&nbsp;<a href="#" onclick="$(\'#user_store\').css(\'display\',\'\')">充值</a>
    &nbsp;&nbsp;<a href="#" onclick="$(\'#user_withdraw\').css(\'display\',\'\')">提现</a>
</div>
<div id="data">
    <h2>'; echo $user['username'] ;echo '&nbsp;&nbsp;（账户余额：'; echo $user['money']; ;echo '）</h2>
    &nbsp;&nbsp;用户级别：'; echo $user['level'] ;echo '<br />&nbsp;&nbsp;注册时间：'; echo date('Y-m-d H:i:s',$user['create_time']) ;echo '<br />&nbsp;&nbsp;最近登录：'; echo date('Y-m-d H:i:s',$user['login_time']) ;echo '    <div id="user_store" style="display:none">
        <form id="account_store" action="'; echo WEB_ROOT; ;echo '/manage/account_detail.php?id='; echo $id ;echo '" method="post">
            <label>充值金额：</label><input type="text" size="10" name="store" />
            财务摘要：<input type="text" size="20" name="detail" /><input type="submit" value="确认充值" />
        </form>
    </div>
    <div id="user_withdraw" style="display:none">
        <form id="account_withdraw" action="'; echo WEB_ROOT; ;echo '/manage/account_detail.php?id='; echo $id ;echo '" method="post">
            <label>提现金额：</label><input type="text" size="10" name="withdraw" />
            财务摘要：<input type="text" size="20" name="detail" /><input type="submit" value="确认提现" />
        </form>
    </div>
    <form id="account_form" action="'; echo WEB_ROOT; ;echo '/manage/account_detail.php?id='; echo $id ;echo '" method="post">
    <table>
        <tr><td>密码</td><td><input type="password" name="password" value="'; echo $user['password'] ;echo '" onfocus="this.select()" /></td>
            <td>密码（重复）</td><td><input type="password" name="password2" value="'; echo $user['password'] ;echo '" onfocus="this.select()" /></td></tr>
        <tr><td>真实姓名</td><td><input type="text" name="realname" value="'; echo $user['realname'] ;echo '" /></td>
            <td>移动电话</td><td><input type="text" name="mobile" value="'; echo $user['mobile'] ;echo '" /></td></tr>
        <tr><td>性别</td><td><input type="text" name="gender" value="'; echo $user['gender'] ;echo '" />（M男，F女）</td>
            <td>QQ</td><td><input type="text" name="qq" value="'; echo $user['qq'] ;echo '" /></td></tr>
        <tr><td>电子邮件</td><td><input type="text" name="email" value="'; echo $user['email'] ;echo '" /></td>
            <td>邮政编码</td><td><input type="text" name="zipcode" value="'; echo $user['zipcode'] ;echo '" /></td></tr>
        <tr><td>地址</td><td><input type="text" name="address" value="'; echo $user['address'] ;echo '" /></td>
            <td>会员等级</td><td><input type="text" name="level" value="'; echo $user['level'] ;echo '" /></td>
        </tr>

    </table>
        <input '; if($user['manager']=='Y') echo "checked='checked'"; ;echo 'type="checkbox" name="manager" value="Y" onclick="if(!confirm(\'确定改变管理员设置吗？\')) return false;" />添加为管理员
        <input '; if($user['enable']=='N') echo "checked='checked'"; ;echo 'type="checkbox" name="enable" value="N" onclick="if(!confirm(\'确定改变用户状态吗？\')) return false;" />关闭此用户
    </form>
</div>

<div id="op">
    <h2>【<a href="javascript:if(confirm(\'确定修改个人资料吗？\'))$(\'#account_form\').submit()">确定修改</a>】</h2>
</div>
<div id="help">help</div>
'; include template("footer"); ?>
