<?php /*a:2:{s:55:"/www/wwwroot/117.72.69.185/app/curd/view/table/add.html";i:1734159472;s:76:"/www/wwwroot/117.72.69.185/app/curd/view/../../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">

    <form class="layui-form" lay-filter="form">
    <div class="layui-row">
        <div class="layui-col-md12">
            <div class="layui-col-md3">
                <?php echo Form::input('TABLE_NAME', 'text', ['label' => '表名', 'verify' => 'required','tips'=>'不需要表前缀'], ''); ?>

            </div>
            <div class="layui-col-md3">
                <?php echo Form::select('ENGINE' ,$engineList, ['label' => '表引擎', 'verify' => 'required','tips'=>'引擎'],[],'InnoDB'); ?>
            </div>
            <div class="layui-col-md3">
                <?php echo Form::input('TABLE_COMMENT', 'text', ['label' => '备注', 'verify' => 'required','tips'=>'表格备注'], ''); ?>

            </div>
            <?php echo Form::submit(); ?>
        </div>
        <div class="layui-col-md12">
            <blockquote class="layui-elem-quote">
                字段管理 (注意默认会生成 create_time ，update_time ,delete_time 三个字段)
                长度浮点型比如 10,3 ；字符串 就写比如255
            </blockquote>
            <table class="layui-table">
                <colgroup>
                    <col width="">
                    <col width="">
                    <col>
                </colgroup>
                <thead>
                <tr>
                    <th>字段名</th>
                    <th>字段类型</th>
                    <th>长度或值</th>
                    <th>是否必填</th>
                    <th>默认值</th>
                    <th>索引</th>
                    <th>备注</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <tr class="">
                    <td><input name="field[]" value="id" class="layui-input" type="text" ></td>
                    <td>
                        <select name="type[]"  lay-filter="type" lay-verify="required" lay-search>
                            <option value=""><?php echo lang('选择'); ?></option>
                            <?php if(is_array($fieldTypeList) || $fieldTypeList instanceof \think\Collection || $fieldTypeList instanceof \think\Paginator): $i = 0; $__LIST__ = $fieldTypeList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                            <option value="<?php echo htmlentities($key); ?>" <?php if($key=='int'): ?>selected<?php endif; ?>><?php echo htmlentities($vo); ?></option>
                            <?php endforeach; endif; else: echo "" ;endif; ?>
                        </select>
                    </td>
                    <td>
                        <input name="length[]" class="layui-input" type="text">
                    </td>
                    <td>
                        <input type="checkbox" name="require[]" value="1" title="是" checked>
                    </td>
                    <td>
                        <input name="default[]" class="layui-input" type="text">
                    </td>
                    <td><select name="index[]" value='PRI' lay-filter="index" lay-verify="" lay-search>
                        <option value=""><?php echo lang('选择'); ?></option>
                        <?php if(is_array($indexList) || $indexList instanceof \think\Collection || $indexList instanceof \think\Paginator): $i = 0; $__LIST__ = $indexList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                        <option value="<?php echo htmlentities($key); ?>" <?php if($key=='PRI'): ?>selected<?php endif; ?>><?php echo htmlentities($vo); ?>(<?php echo htmlentities($key); ?>)</option>
                        <?php endforeach; endif; else: echo "" ;endif; ?>
                    </td>
                    <td><input name="comment[]" VALUE="ID" class="layui-input" type="text" ></td>
                    <td>
                        <button class="layui-btn layui-btn-normal" lay-event="add">增加</button>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>


    </div>
</form>

<script type="text/html" id="trtpl">

    <tr>
        <td><input name="field[]" class="layui-input" type="text" ></td>
        <td>
            <select name="type[]" lay-filter="type" lay-verify="required" lay-search>
                <option value=""><?php echo lang('选择'); ?></option>
                <?php if(is_array($fieldTypeList) || $fieldTypeList instanceof \think\Collection || $fieldTypeList instanceof \think\Paginator): $i = 0; $__LIST__ = $fieldTypeList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                <option value="<?php echo htmlentities($key); ?>" ><?php echo htmlentities($vo); ?></option>
                <?php endforeach; endif; else: echo "" ;endif; ?>
            </select>
        </td>
        <td><input name="length[]" class="layui-input" type="text" ></td></td>
        <td>
            <input type="checkbox" name="require[]" value="1"  title="是">
        </td>
        <td><input name="default[]" class="layui-input" type="text" ></td>
        <td><select name="index[]" lay-filter="index" lay-verify="" lay-search>
            <option value=""><?php echo lang('选择'); ?></option>
            <?php if(is_array($indexList) || $indexList instanceof \think\Collection || $indexList instanceof \think\Paginator): $i = 0; $__LIST__ = $indexList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
            <option value="<?php echo htmlentities($key); ?>" ><?php echo htmlentities($vo); ?>(<?php echo htmlentities($key); ?>)</option>
            <?php endforeach; endif; else: echo "" ;endif; ?>
        </td>
        <td><input name="comment[]" class="layui-input" type="text" ></td>
        <td>
            <button class="layui-btn layui-btn-danger" lay-event="del">删除</button>
        </td>
    </tr>
</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; ?>
