<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:38:"themes/admin_h/admin\third\market.html";i:1615187961;s:61:"D:\jsur\quant-server\public\themes\admin_h\public\header.html";i:1615187961;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <!-- HTML5 shim for IE8 support of HTML5 elements -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <![endif]-->
    <link href="/themes/admin_h/public/assets/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/static/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href="/themes/admin_h/public/assets/css/animate.css" rel="stylesheet">
    <link href="/themes/admin_h/public/assets/css/style.css?v=4.1.0" rel="stylesheet">
    <!--[if lt IE 9]>
    <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script type="text/javascript">
        //全局变量
        var GV = {
            ROOT: "/",
            WEB_ROOT: "/",
            JS_ROOT: "static/js/",
            APP: '<?php echo \think\Request::instance()->module(); ?>'/*当前应用名*/
        };
    </script>
    <style type="text/css">
        .form-required{
            color:red;
        }
    </style>
    <script src="/themes/admin_h/public/assets/js/jquery-1.10.2.min.js"></script>
    <script src="/static/js/wind.js"></script>
    <script src="/themes/admin_h/public/assets/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="/themes/admin_h/public/assets/js/content.js?v=1.0.0"></script>
    <script>
        Wind.css('artDialog');
        Wind.css('layer');
        $(function () {
            $("[data-toggle='tooltip']").tooltip({
                container:'body',
                html:true,
            });
            $("li.dropdown").hover(function () {
                $(this).addClass("open");
            }, function () {
                $(this).removeClass("open");
            });
        });
    </script>



<script src="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>

<link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet" />

</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInUp js-check-wrap">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>第三方市场列表</h5>
                        <div class="ibox-tools">
                            <a href="#" class="btn btn-primary btn-xs active">第三方市场列表</a>
                            <a href="<?php echo url('Third/addMarket'); ?>" class="btn btn-primary btn-xs">添加市场</a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <form class="js-ajax-form" action="<?php echo url('Third/listorderss'); ?>" method="post">
                            <div class="table-actions">
                                <button class="btn btn-primary btn-small js-ajax-submit" type="submit">排序</button>
                            </div>
                            <table class="table table-hover" id="menus-table">
                                <thead>
                                    <tr>
                                        <th>排序</th>
                                        <th width="60">ID</th>
                                        <th>平台</th>
                                        <th>市场名称</th>
                                        <th>市场标识</th>
                                        <th>市场类型</th>
                                        <th>交易币种</th>
                                        <th>结算货币</th>
                                        <th>更新时间</th>
                                        <!-- <th>状态</th>                -->
                                        <th width="150">操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php  $type_name = array('1'=>'币币交易','2'=>'合约交易');  if($datas == ''): ?>
                                        <tr>
                                            <td colspan="5" style="text-align: center">暂无数据</td>
                                        </tr>
                                        <?php else: if(is_array($datas) || $datas instanceof \think\Collection || $datas instanceof \think\Paginator): if( count($datas)==0 ) : echo "" ;else: foreach($datas as $key=>$vo): ?>

                                            <tr>
                                                <td style='padding-left:20px;'>
                                                    <input name='sort[<?php echo $vo['id']; ?>]' type='text' size='3' value='<?php echo $vo['sort']; ?>'
                                                        class='input input-order'>
                                                </td>
                                                <td><?php echo $vo['id']; ?> </td>
                                                <td><?php echo $vo['platform']; ?> </td>
                                                <td><?php echo $vo['market_name']; ?> </td>
                                                <td><?php echo $vo['market']; ?> </td>
                                                <td><?php echo $type_name[$vo['type']]; ?> </td>
                                                <td><?php echo $vo['stock']; ?> </td>
                                                <td><?php echo $vo['money']; ?></td>
                                                <td><?php echo date("Y-m-d H:i",$vo['update_time']); ?></td>
                                                <!-- <td>
                            <?php if($vo['status'] == '1'): ?>
                                <span class="label label-info" onclick="checktag('<?php echo $vo['id']; ?>','status','0')">已启用</span>&nbsp;&nbsp;&nbsp;
                            <?php else: ?>
                                <span class="label label-default" onclick="checktag('<?php echo $vo['id']; ?>','status','1')">已禁用</span>&nbsp;&nbsp;&nbsp;
                            <?php endif; ?>
                        </td> -->
                                                <td>
                                                    <a href="<?php echo url('Third/editMarket',['id'=> $vo['id']  ]  ); ?>">修改</a> |
                                                    <a href="<?php echo url('Third/delMarket',['id'=> $vo['id']  ]  ); ?>"
                                                        class="js-ajax-delete">删除</a>
                                                </td>
                                            </tr>
                                        <?php endforeach; endif; else: echo "" ;endif; endif; ?>
                                </tbody>
                            </table>



                            <div class="pagination">
                                <div>
                                    当前共有数据 <span style="color:blue;font-weight:bold"><?php echo $num; ?></span> 条
                                </div>
                                <?php echo (isset($page) && ($page !== '')?$page:''); ?>

                            </div>
                    </div>

                </div>
            </div>
        </div>
    </div>
    <script src="/static/js/admin.js"></script>
    <script>
        function checktag(id, tag, type) {
            $.ajax({
                url: "<?php echo url('Third/uptag'); ?>",
                type: "post",
                data: { id: id, tag: tag, type: type },
                success: function (data) {

                    $('.tips').text(data).fadeIn().delay(1500).fadeOut();
                    document.location.reload();


                }
            })
        }
    </script>
</body>

</html>