<?php /*a:2:{s:77:"/www/wwwroot/103.108.66.222_1111/app/backend/view/sys/attach/selectfiles.html";i:1734156624;s:66:"/www/wwwroot/103.108.66.222_1111/app/backend/view/layout/main.html";i:1734156624;}*/ ?>
<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title><?php echo syscfg('site','sys_name'); ?>后台管理</title>
    <meta property="og:keywords" content="<?php echo syscfg('site','site_seo_keywords'); ?>" />
    <meta property="og:description" content="<?php echo syscfg('site','site_seo_desc'); ?>" />
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="referrer" content="never">
    <meta name="format-detection" content="telephone=no">
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>
    <link rel="stylesheet" href="/static/plugins/layui/css/layui.css?v=<?php echo syscfg('site','site_version'); ?>" media="all" />
    <link rel="stylesheet" href="/static/backend/css/comm.css?v=<?php echo syscfg('site','site_version'); ?>" media="all">
    <link rel="stylesheet" href="/static/backend/css/global.css?v=<?php echo syscfg('site','site_version'); ?>" media="all" />
    <!--    <script src="/static/plugins/jquery/jquery-3.7.1.min.js"></script>-->
    <script src="/static/plugins/layui/layui.js?v=<?php echo syscfg('site','site_version'); ?>" charset="utf-8"></script>
    <style>
        .tox-promotion,
        .tox-statusbar__branding {  
            display: none;  
        }
    </style>
    <?php echo token_meta(); ?>
    <script>
        window.Config = <?php echo json_encode($config); ?>;
        window.FormArray = <?php echo isset($formData)?(json_encode($formData)):'""'; ?>,
        window.STATIC ='/static'
        window.PLUGINS = '/static/plugins';
        window.APP = '<?php echo htmlentities($APP); ?>';
        window.CONTROLLER = '<?php echo htmlentities($CONTROLLER); ?>';
        window.ACTION = '<?php echo htmlentities($ACTION); ?>';
        window.ADMIN_PATH = '<?php echo env("ADMIN_PATH", "backend"); ?>';
    </script>
</head>

<body style="padding: 10px;background: #fff">

<div class="fun-container" id="app">

    <style>body,html{margin:0;padding:0;height:100%;background:#fff}#tree{position:absolute;z-index:999}.file-group .group-header{width:100%;text-align:center}.file-group,.file-list{float:left;padding:0 10px}.file-list-right{padding:0}.file-list .box-header{margin-bottom:5px;height:30px}.box-body{width:100%}.box-body ul.file-list-item{overflow-y:auto;width:100%;height:480px}.box-body ul.file-list-item li{position:relative;float:left;margin:1%;padding:1%;width:20%;height:135px;overflow:hidden;border:1px solid rgba(0,0,0,.05);border-radius:6px;cursor:pointer;-webkit-transition:All .2s ease-in-out;-moz-transition:All .2s ease-in-out;-o-transition:All .2s ease-in-out;transition:All .2s ease-in-out}.box-body ul.file-list-item li:hover{border:1px solid dodgerblue}.box-body ul.file-list-item li .img-cover{display:table-cell;width:120px;height:120px;vertical-align:middle}.box-body ul.file-list-item li .img-cover image{width:120px}.box-body ul.file-list-item li p.file-name{overflow:hidden;margin:5px 0 0;width:120px;text-overflow:ellipsis;white-space:nowrap;word-wrap:normal}.box-body ul.file-list-item li.active .select-mask{display:block}.box-body ul.file-list-item li .select-mask{position:absolute;top:0;right:0;bottom:0;left:0;display:none;border-radius:6px;background:rgba(0,0,0,.5);text-align:center}.box-body ul.file-list-item li .select-mask img{position:absolute;top:50px;left:45px}.box-body ul.file-list-item li .file-edit{position:absolute;top:3px;right:3px;z-index:1;display:none}.box-body ul.file-list-item li .file-delete{position:absolute;top:3px;right:30px;z-index:1;display:none}.box-body ul.file-list-item li:hover .file-delete,.box-body ul.file-list-item li:hover .file-edit{display:block}.box-header .search,.box-header .layui-form-select .layui-input{display:inline-flex;padding-right:0px;height:32px}.layui-btn{height:32px;line-height:32px}.box-header .group-select .layui-btn{padding:0 2px 0 8px}.box-header .fl{margin-right:5px}.box-header .dropdown{position:relative;display:inline-block}.box-header .dropdown .dropdown-content{position:absolute;top:100%;left:0;z-index:1020;float:left;display:none;margin:9px 0 0;padding:10px 0;min-width:200px;border:1px solid #ddd;border-radius:0;background-color:#fff;background-clip:padding-box;text-align:left;line-height:1.6;-webkit-background-clip:padding-box;-webkit-animation-duration:.15s;animation-duration:.15s}.box-header .dropdown.active > .dropdown-content{display:block}.box-header .dropdown .dropdown-content:after,.box-header .dropdown .dropdown-content:before{position:absolute;z-index:1;display:block;width:0;height:0;content:"";border:8px dashed transparent;border-bottom:8px solid transparent;border-width:0 8px 8px}.box-header .dropdown .dropdown-content:before{bottom:0;border-bottom-color:#ddd}.box-header .dropdown .dropdown-content:after{bottom:-1px;border-bottom-color:#fff}.box-header .dropdown .dropdown-content:after,.box-header .dropdown .dropdown-content:before{top:-16px;left:10px;pointer-events:none}.box-header .dropdown .dropdown-content:after{top:-14px}.box-header .dropdown .dropdown-content:first-child{margin-top:0}.box-header .dropdown .dropdown-header{display:block;padding:6px 20px;color:#999;font-size:13px}.box-header .dropdown ul.dropdown-content > li > a{clear:both;display:block;padding:6px 20px;color:#333;white-space:nowrap;font-weight:400}.box-header .dropdown ul.dropdown-content > li > a:focus,.box-header .dropdown ul.dropdown-content > li > a:hover{background-color:#f5f5f5;color:#262626;text-decoration:none}.box-header .dropdown ul.dropdown-content > .active > a,.box-header .dropdown ul.dropdown-content > .active > a:focus,.box-header .dropdown ul.dropdown-content > .active > a:hover{outline:0;background-color:#f5f5f5;color:#333;text-decoration:none}@media screen and (min-width:1023px){.box-body ul.file-list-item{overflow-y:auto;width:100%;height:auto}}</style>
<?php echo token_field(); ?>
<div class="layui-row" id="list">
    <div class="layui-col-lg3 layui-col-xs3 layui-col-sm3 file-group">
        <button class="layui-btn layui-btn-normal layui-btn-sm group-header"> 文件分组 </button>
        <div class="tree" id="tree"
             data-radio="<?php echo isset($param['openradio'])?$param['openradio']:1; ?>"
             data-checkbox="<?php echo isset($param['opencheckbox'])?$param['opencheckbox']:0; ?>"
             style="margin-top: 20px;">
        </div>
    </div>
    <div class="layui-col-lg9 layui-col-xs9 layui-col-sm9 file-list file-list-right" >
        <div class="box-header layui-row">
            <div class="layui-col-lg12">
                <div class="fl group-select dropdown">
                    <button type="button" class="layui-btn  layui-btn-normal layui-btn-sm">
                        移动至<i class="layui-icon layui-icon-triangle-d"></i>
                    </button>
                    <ul class="group-list dropdown-content">
                        <li class="dropdown-header">选择分组</li>
                        <div class="tree" id="selectTree"></div>
                    </ul>
                </div>
                <div class="fl delete">
                    <button type="button" class="layui-btn layui-btn-danger layui-btn-sm file-delete">
                        <i class="layui-icon layui-icon-delete"></i>删除
                    </button>
                </div>
                <div class="fl ">
                    <button id="uploadfile" type="button" class="uploadfile layui-btn layui-btn-warm layui-btn-sm"
                            lay-filter="upload" data-chunk="1"
                            data-value='<?php echo json_encode($param); ?>'>
                        <i class="layui-icon layui-icon-upload"></i>上传
                    </button>
                </div>
                <form class="layui-form fl" action="" lay-filter="form">
                    <div class="layui-input-inline" style="width: 70px" >
                        <select name="mime" lay-verify="" lay-filter="mime">
                            <option value="*" <?php if(input('mime')=='*'): ?>selected<?php endif; ?>><?php echo lang('All'); ?></option>
                            <option value="image" <?php if(input('mime')=='image'): ?>selected<?php endif; ?>><?php echo lang('image'); ?></option>
                            <option value="video" <?php if(input('mime')=='video'): ?>selected<?php endif; ?>><?php echo lang('video'); ?></option>
                            <option value="audio" <?php if(input('mime')=='audio'): ?>selected<?php endif; ?>><?php echo lang('audio'); ?></option>
                            <option value="zip" <?php if(input('mime')=='zip'): ?>selected<?php endif; ?>><?php echo lang('zip'); ?></option>
                            <option value="text" <?php if(input('mime')=='text'): ?>selected<?php endif; ?>><?php echo lang('text'); ?></option>
                            <option value="office" <?php if(input('mime')=='office'): ?>selected<?php endif; ?>><?php echo lang('office'); ?></option>
                        </select>
                    </div>
                    <div class="layui-input-inline"  >
                        <input class="layui-input search" name="original_name" value="<?php echo isset($param['original_name'])?$param['original_name']:''; ?>" type="text" placeholder="搜索">
                    </div>
                    <button class="layui-btn  layui-btn-normal" type="submit">搜索</button>
                </form>
            </div>

            <!--内容-->
            <div id="file-list-body" class="box-body layui-col-xs12 layui--col-sm12" data-node="">
                <div id="file-container">
                    <ul class="file-list-item">
                        <?php if($data): if(is_array($data) || $data instanceof \think\Collection || $data instanceof \think\Paginator): $i = 0; $__LIST__ = $data;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                        <li  title="<?php echo htmlentities($vo['original_name']); ?>" data-type="<?php echo htmlentities($vo['mime']); ?>" data-id="<?php echo htmlentities($vo['id']); ?>" data-path="<?php echo htmlentities($vo['path']); ?>" data-url="<?php echo htmlentities($vo['url']); ?>">
                            <a class="file-delete" href="javascript:void(0);" title="<?php echo lang('DELETE'); ?>">
                                <i class="layui-icon layui-icon-delete"></i>
                            </a>
                            <a class="file-edit" href="javascript:void(0);" title="<?php echo lang('Edit'); ?>">
                                <i class="layui-icon layui-icon-edit"></i>
                            </a>
                            <div class="img-cover">

                                <img width="100%" src="
                                <?php if((strpos($vo['mime'],'image')!==false)): ?>
                                <?php echo htmlentities($vo['path']); elseif((strpos($vo['mime'],'video')!==false)): ?>
                                /static/backend/images/filetype/video.jpg
                                <?php elseif((strpos($vo['mime'],'audio')!==false)): ?>
                                /static/backend/images/filetype/audio.jpg
                                <?php elseif((strpos($vo['mime'],'zip')!==false)): ?>
                                /static/backend/images/filetype/zip.jpg
                                <?php else: ?>
                                /static/backend/images/filetype/file.jpg
                                <?php endif; ?>
                                "
                                data-type="image" >
                            </div>
                            <p class="file-name"><?php echo htmlentities($vo['original_name']); ?></p>
                            <div class="select-mask">
                                <img src="/static/backend/images/choose.png">
                            </div>
                        </li>
                        <?php endforeach; endif; else: echo "" ;endif; else: ?>
                        <div style="padding-top:80px;text-align:center;" class="empty">
                            <i style="font-size: 150px;color: #eee" class="layui-icon layui-icon-face-surprised"></i>
                            <div style="line-height:30px;color: #999;" class="">没有找到数据</div>
                        </div>
                        <?php endif; ?>
                    </ul>
                </div>
                <div id="page"></div>
            </div>
        </div>
        <!--End 内容-->
    </div>
</div>

</script>
<script>
    var treeData = <?php echo json_encode($groupList); ?>;
    var param = <?php echo json_encode($param); ?>;
    var count = <?php echo htmlentities($count); ?>;

</script>



</div>
</body>
</html>
<!--[if lt IE 9]>
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script defer src="/static/require.min.js?v=<?php echo syscfg('site','site_version'); ?>" data-main="/static/js/require-backend<?php echo syscfg('site','app_debug')?'':'.min'; ?>.js?v=<?php echo syscfg('site','site_version'); ?>" charset="utf-8"></script>

<?php if(!empty($formScript)): ?><?php echo $formScript; ?><?php endif; if(!empty($tableScript)): ?><?php echo $tableScript; ?><?php endif; ?>
