HEX
Server: nginx/1.28.1
System: Linux 10-41-63-61 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64
User: www (1001)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot//cs.wgegeghx.com/runtime/temp/3c653802b8937ec81482181f35db90ba.php
<?php /*a:3:{s:65:"/www/wwwroot/cs.wgegeghx.com/application/cms/view/cms/course.html";i:1628977204;s:69:"/www/wwwroot/cs.wgegeghx.com/application/admin/view/index_layout.html";i:1617866432;s:62:"/www/wwwroot/cs.wgegeghx.com/application/admin/view/layui.html";i:1617354798;}*/ ?>
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>后台管理系统</title>
    
    <link rel="stylesheet" href="/static/libs/layui/css/layui.css">
    <link rel="stylesheet" href="/static/admin/css/admin.css?v=<?php echo htmlentities(app('config')->get('version.yzncms_release')); ?>">
    <link rel="stylesheet" href="/static/common/font/iconfont.css?v=<?php echo htmlentities(app('config')->get('version.yzncms_release')); ?>">
    <script type="text/javascript">
    //全局变量
    var GV = {
        'site':<?php echo json_encode($site); ?>,
        'image_upload_url': '<?php echo !empty($image_upload_url) ? htmlentities($image_upload_url) :  url("attachment/upload/upload", ["dir" => "images", "module" => request()->module()]); ?>',
        'file_upload_url': '<?php echo !empty($file_upload_url) ? htmlentities($file_upload_url) :  url("attachment/upload/upload", ["dir" => "files", "module" => request()->module()]); ?>',
        'jcrop_upload_url': '<?php echo !empty($jcrop_upload_url) ? htmlentities($jcrop_upload_url) :  url("attachment/Attachments/cropper"); ?>',
        'ueditor_upload_url': '<?php echo !empty($ueditor_upload_url) ? htmlentities($ueditor_upload_url) :  url("attachment/upload/upload", ["dir" => "images","from"=>"ueditor", "module" => request()->module()]); ?>',
        'ueditor_grabimg_url': '<?php echo !empty($ueditor_upload_url) ? htmlentities($ueditor_upload_url) :  url("attachment/Attachments/geturlfile"); ?>',
        'image_select_url': '<?php echo !empty($image_select_url) ? htmlentities($image_select_url) :  url("attachment/Attachments/select"); ?>',
        'filter_word_url': '<?php echo !empty($filter_word_url) ? htmlentities($filter_word_url) :  url("admin/ajax/filterWord"); ?>',
    };
    </script>
</head>

<body class="childrenBody <?php echo defined('IS_DIALOG') && IS_DIALOG ? 'is-dialog' : ''; ?>">
    
<style type="text/css">
    .childrenBody {
        background: #fff;
    }
</style>
<h2><?php echo htmlentities($title); ?> - 课程列表</h2>
<table class="layui-hide" id="currentTable" lay-filter="currentTable"></table>
<script type="text/html" id="barTool">
    <a class="layui-btn layui-btn-xs" data-open='<?php echo url("editCourse",["catid"=>$catid]); ?>?id={{ d.id }}' data-title="编辑内容" data-full="true">编辑</a>
    <a href='<?php echo url("delCourse",["catid"=>$catid]); ?>?ids={{ d.id }}' class="layui-btn layui-btn-danger layui-btn-xs layui-tr-del">删除</a>

</script>
<script type="text/html" id="title">
    <a  data-open='<?php echo url("editCourse",["catid"=>$catid]); ?>?id={{ d.id }}' data-title="编辑内容" data-full="true">{{ d.title }}</a>
</script>
<script type="text/html" id="type">
    {{# if(d.type==1){ }}
    视频
    {{#  } else if(d.type == 2) { }}
    音频
    {{#  } else{ }}
    文章
    {{# } }}
</script>
<script type="text/html" id="statusTpl">
    <input type="checkbox" name="status" data-href='<?php echo url("setCourseState",["catid"=>$catid]); ?>?id={{d.id}}' value="{{d.id}}" lay-skin="switch" lay-text="通过|待审核" lay-filter="switchStatus" {{ d.status==1 ? 'checked' : '' }}>
</script>

<style type="text/css">
    .layui-layer-page .layui-layer-content {
        overflow: inherit;
    }
</style>

    <script src="/static/libs/layui/layui.js"></script>
    <script src="/static/libs/jquery/jquery.min.js"></script>
    
    <script type="text/javascript">
layui.config({
	version: '<?php echo htmlentities(app('config')->get('version.yzncms_release')); ?>',
	base: '/static/libs/layui_exts/'
}).extend({
	yzn: 'yzn/yzn',
	yznForm: 'yznForm/yznForm',
	yznTable: 'yznTable/yznTable',
	treeGrid: 'treeGrid/treeGrid',
	clipboard: 'clipboard/clipboard',
	notice: 'notice/notice',
	iconPicker: 'iconPicker/iconPicker',
	tableSelect: 'tableSelect/tableSelect',
	ztree: 'ztree/ztree',
	dragsort: 'dragsort/dragsort',
	tagsinput: 'tagsinput/tagsinput',
	xmSelect: 'xmSelect/xm-select',
	selectPage: 'selectPage/selectpage',
	echarts: 'echarts/echarts',
	echartsTheme: 'echarts/echartsTheme',
	citypicker: 'citypicker/city-picker',
	webuploader: 'webuploader/webuploader',
	ueditor: 'ueditor/ueditor.min',
}).use('yznForm');
</script>
    
    
<script>
    
    var table;
   function batch_edit(){
       var url = "<?php echo url('batch_add',['catid'=>$catid, 'courseid'=>$courseid]); ?>";
       var status = table.checkStatus('currentTable');
       var ids = [];
       for(var i=0;i<status.data.length;i++){
           ids.push(status.data[i].id);
       }
       if(ids.length){
           location.href = url+"?ids="+ids;
       }else{
           layer.msg('请选择要编辑的记录!');
       }
   }

    layui.use(['table', 'yznTable','upload', 'element', 'layer'], function() {
        table = layui.table;
        var $ = layui.$,
            form = layui.form,
            upload = layui.upload,
            yznTable = layui.yznTable;

        var init = {
            table_elem: '#currentTable',
            add_url: "<?php echo url('addCourseList',['catid'=>$catid, 'courseid'=>$courseid]); ?>",
            // delete_url: "<?php echo url('delCourseList',['catid'=>$catid]); ?>",
            delete_url: '<?php echo url("delCourse",["catid"=>$catid]); ?>?ids={{ d.id }}',
            modify_url: '<?php echo url("listorderCourseList",["catid"=>$catid]); ?>',
        };

        yznTable.render({
            init: init,
            id: 'currentTable',
            elem: '#currentTable',
            toolbar: ['refresh',
                [{
                    text: '添加',
                    url: init.add_url,
                    method: 'open',
                    icon: 'iconfont icon-add',
                    class: 'layui-btn layui-btn-normal layui-btn-sm',
                    extend: 'data-full="true"',
                }], 'delete',
                [{
                    html: '<button type="button" class="layui-btn layui-btn-sm" id="test3"><i class="layui-icon"></i>批量导入</button> <a href="<?php echo url('batch_add',['catid'=>$catid, 'courseid'=>$courseid]); ?>" class="layui-btn layui-btn-sm" style="background:#009688;color:white"><i class="layui-icon layui-icon-add-circle-fine"></i>批量添加</a><a href="javascript:batch_edit()" class="layui-btn layui-btn-sm" style="background:#009688;color:white"><i class="layui-icon layui-icon-edit"></i>批量修改</a><a class="layui-btn layui-btn-sm layui-btn-normal" href="javascript:history.go(-1)" style="float:right;margin-right:20px;"><i class="layui-icon layui-icon-return"></i>&nbsp;返回</a> '
                }]
            ],
            url: '<?php echo url("courselist",["courseid"=>$courseid]); ?>',
            cols: [
                [
                    { type: 'checkbox', fixed: 'left' },
                    { field: 'listorder', width: 70, title: '排序', edit: 'text' },
                    { field: 'id', width: 60, title: 'ID' },
                    { field: 'title', align: "left", title: '标题', templet: '#title' },
                    { field: 'type', width: 80, title: '类型', edit:"select", templet: '#type' },
                    { field: 'url', width: 60, align: "center", title: 'URL', templet:function(d){
                            return '<a class="layui-btn layui-btn-primary layui-btn-xs" href="/play/'+d.catid+'/'+d.id+'" target=_blank><i class="iconfont icon-lianjie"></i></a>';
                        }, search: false },
                    { field: 'status', width: 100, align: "center", title: '状态', templet: '#statusTpl', unresize: true, selectList: { 0: '待审核', 1: '通过' } },
                    { fixed: 'right', width: 180, title: '操作', toolbar: '#barTool' }
                ]
            ],
            page: {},
            limit:40
        });


        

        //指定允许上传的文件类型
        upload.render({
            elem: '#test3'
            ,url: "<?php echo url('addexcels',['catid'=>$catid, 'courseid'=>$courseid]); ?>" //改成您自己的上传接口
            ,accept: 'file' //普通文件
            ,done: function(res){
                
              
                if(res.status==1){
                    
            //   layer.msg('上传成功');
               
               
                layer.alert("导入成功", {icon: 6}, function () {
                    
               location.reload()
                            // // 获得frame索引
                            // var index = parent.layer.getFrameIndex(window.name);
                            // //关闭当前frame
                            // parent.layer.close(index);
                            // //修改成功后刷新父界面
                            // window.parent.location.reload();
                        });


                      
            //  	parent.location.reload();
                }else{
                    
                       layer.msg(res.msg); 
                }
                
            }
        });



    });
</script>



</body>

</html>