{template "header.html"}
<script>
    function edit_seo(id, name) {
        dr_iframe('<i class="fa fa-internet-explorer"></i> '+name,'{dr_url('seo_category/edit', ['dir'=>$dirname])}&id='+id, '70%', '70%');
    }
    function edit_seo2() {
        dr_iframe_show('<i class="fa fa-internet-explorer"></i> {dr_lang("模块SEO")}','{dr_url('seo_module/show_index', ['dir'=>$dirname])}', '70%', '70%');
    }
    // ajax关闭或启用
    function dr_cat_ajax_open_close(e, url, fan) {
        var index = layer.load(2, {
            shade: [0.3,'#fff'], //0.1透明度的白色背景
            time: 10000
        });
        $.ajax({
            type: "GET",
            cache: false,
            url: url,
            dataType: "json",
            success: function (json) {
                layer.close(index);
                if (json.code == 1) {
                    if (json.data.share == 1) {
                        if (json.data.value == fan) {
                            $(e).attr('class', 'badge badge-no');
                            $(e).html('<i class="fa fa-times"></i>');
                        } else {
                            $(e).attr('class', 'badge badge-yes');
                            $(e).html('<i class="fa fa-check"></i>');
                        }
                    } else {
                        // 独立模块 dr_is_page_html
                        var obj = $('.dr_is_page_html');
                        if (json.data.value == fan) {
                            obj.attr('class', 'dr_is_page_html badge badge-no');
                            obj.html('<i class="fa fa-times"></i>');
                        } else {
                            obj.attr('class', 'dr_is_page_html badge badge-yes');
                            obj.html('<i class="fa fa-check"></i>');
                        }
                    }
                    dr_tips(1, json.msg);
                } else {
                    dr_tips(0, json.msg);
                }
            },
            error: function(HttpRequest, ajaxOptions, thrownError) {
                dr_ajax_alert_error(HttpRequest, ajaxOptions, thrownError);
            }
        });
    }
</script>
<div class="note note-danger my-content-top-tool">
    <p><a href="javascript:dr_update_cache();">{dr_lang('更改数据之后需要更新缓存之后才能生效')}</a></p>
</div>
<form action="" class="form-horizontal" method="post" name="myform" id="myform">
{dr_form_hidden()}
    <div class="portlet bordered light ">
        <div class="portlet-title tabbable-line">
            <ul class="nav nav-tabs" style="float:left;">
                <li class="active">
                    <a href="#" data-toggle="tab" > <i class="fa fa-internet-explorer"></i> {$site_name} </a>
                </li>
            </ul>
        </div>
        <div class="portlet-body">
            <div class="tab-content">

                <div class="tab-pane  active">
                    <div class="table-scrollable">

                    <table class="table table-striped table-bordered table-hover table-checkable dataTable">
                        <thead>
                        <tr class="heading">
                            <th width="70" style="text-align:center"> Id </th>
                            <th> {dr_lang('栏目')} </th>
                            <th width="180"> {dr_lang('URL规则')} </th>
                            <th width="50" style="text-align:center"> {dr_lang('静态')} </th>
                            <th>{dr_lang('操作')}</th>
                        </tr>
                        </thead>
                        <tbody>
                        {$list}
                        </tbody>
                    </table>

                </div>
                </div>
            </div>
        </div>
    </div>


</form>
{template "footer.html"}