<!DOCTYPE html>
<html lang=zh-cn>
    <head>
        <meta charset=utf-8>
        <title>纵横计量支付系统</title>
        <meta name=description content=计量支付>
        <meta name=copyright content=smartcost.com.cn>
        <link rel=stylesheet href=<?php echo $data['rootUrl']; ?>global/css/bootstrap.css>
        <link rel=stylesheet href=<?php echo $data['rootUrl']; ?>global/css/style.css>
        <script src=<?php echo $data['rootUrl']; ?>global/js/jquery-1.9.1.min.js></script>
        <script src=<?php echo $data['rootUrl']; ?>global/js/bootstrap.js></script>
        <script src=<?php echo $data['rootUrl']; ?>global/js/jl.js></script>
    </head>
    <body>
        <div class="wrapHeader">
            <h1 class="mainLogo" title="纵横计量支付"></h1>
            <div class="sysTools"><a title="返回首页" href="index.html"><i class="icon-circle-arrow-left icon-white"></i></a>&nbsp;&nbsp;&nbsp;<a title="纵横官网" target="_blank" href="http://smartcost.com.cn"><i class="icon-home icon-white"></i></a></div>
        </div>
        <?php include Doo::conf()->SITE_PATH .  Doo::conf()->PROTECTED_FOLDER . "viewc//top.php"; ?>
        <div class="warpAdmin">
            <div class="adminSidebar fL">
                <ul>
                    <li><a href="<?php echo $data['rootUrl']; ?>manage/user/list" class="now">用户列表</a></li>
                    <li><a href="<?php echo $data['rootUrl']; ?>manage/user/add">添加用户</a></li>
                    <li><a href="<?php echo $data['rootUrl']; ?>manage/item/list">标段管理</a></li>
                </ul>
            </div>
            <div class="adminContent">
                <div class="adminMain">
                    <fieldset>
                        <legend>用户列表</legend>
                        <table class="table table-striped">
                            <thead>
                                <tr>
                                    <th>#</th>
                                    <th>姓名</th>
                                    <th>单位（公司）</th>
                                    <th>职位</th>
                                    <th>电话</th>
                                    <th>手机</th>
                                    <th>邮箱（登录使用）</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php foreach($data['userlist'] as $k1=>$v1): ?>
                                <tr>
                                    <td><?php echo $v1['uid']; ?></td>
                                    <td><?php echo $v1['name']; ?></td>
                                    <td><?php echo $v1['company']; ?></td>
                                    <td><?php echo $v1['jobs']; ?></td>
                                    <td><?php echo $v1['phone']; ?></td>
                                    <td><?php echo $v1['mobile']; ?></td>
                                    <td><?php echo $v1['email']; ?></td>
                                    <td><?php if( $v1['isstop']==0 ): ?><a href="<?php echo $data['rootUrl']; ?>manage/user/<?php echo $v1['uid']; ?>/isstop" class="colRed" onclick="return confirm_stop();">停用</a><?php else: ?><a href="<?php echo $data['rootUrl']; ?>manage/user/<?php echo $v1['uid']; ?>/isstop" class="colGreen" onclick="return confirm_stop();">启用</a><?php endif; ?> <a href="<?php echo $data['rootUrl']; ?>manage/user/edit/<?php echo $v1['uid']; ?>/uid" >编辑</a> <a data-toggle="modal" href="#sendpw" data-keyboard="false" data-backdrop="ture" class="colGray" onclick="return confirm_resetpasswd(<?php echo $v1['uid']; ?>);">重置密码</a></td>
                                </tr>
                                <?php endforeach; ?>
                            </tbody>
                        </table>
                    </fieldset>
                </div>
            </div>
        </div>
        <!--重置密码-->
        <div class="modal hide fade" id="sendpw">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h3>重置密码成功</h3>
            </div>
            <div class="modal-body">
                <p>系统已将新密码发送至该用户的登录邮箱：<b id="email"></b></p>
                <p>如果长时间无法接收到邮件，请确认该邮箱是否可以正常接收邮件；</p>
                <p>添加 postmaster@zhzd.sendcloud.org 至邮箱白名单，再重新操作<b>重置密码</b>。</p>
            </div>
            <div class="modal-footer">
            </div>
        </div>
        <!--重置密码-->
        <script type="text/javascript">autoFlashHeight();</script>
        <script type="text/javascript">
                    function confirm_stop() {
                    if (confirm('是否停用此用户？'))
                            $('#myform').submit();
                    }
            function confirm_resetpasswd(uid) {
            $.get("<?php echo $data['rootUrl']; ?>manage/user/repasswd/" + uid + "/uid", function (data) {
            $('#email').html(data);
            });
            }
        </script>
    </body>
</html>