{template "header.html"}
<div class="note note-danger">
    <p><a href="javascript:dr_update_cache();">{dr_lang('更改数据之后需要更新缓存之后才能生效')}</a></p>
</div>
<form action="" class="form-horizontal" method="post" name="myform" id="myform">
    {$form}
    <div class="portlet bordered light myfbody">
        <div class="portlet-title tabbable-line">
            <ul class="nav nav-tabs" style="float:left;">
                <li class="{if $page==0}active{/if}">
                    <a href="#tab_0" data-toggle="tab" onclick="$('#dr_page').val('0')"> <i class="fa fa-link"></i> {dr_lang('店铺URL规则')} </a>
                </li>
                <?php $i=1;?>
                {loop $mall_page $t}
                <li class="{if $page==$i}active{/if}">
                    <a href="#tab_{$i}" data-toggle="tab" onclick="$('#dr_page').val('{$i}')"> <i class="{$t.icon}"></i> {dr_lang($t.name)} </a>
                </li>
                <?php $i++;?>
                {/loop}
            </ul>
        </div>
        <div class="portlet-body">
            <div class="tab-content">

                <div class="tab-pane {if $page==0}active{/if}" id="tab_0">
                    <div class="form-body">


                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('店铺首页规则')}</label>
                            <div class="col-md-9">
                                <input type="text" name="data[rule][show]" value="{$data['rule'][show]}" class="form-control" />
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('评论页面规则')}</label>
                            <div class="col-md-9">
                                <input type="text" name="data[rule][comment]" value="{$data['rule'][comment]}" class="form-control" />
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('介绍页面规则')}</label>
                            <div class="col-md-9">
                                <input type="text" name="data[rule][about]" value="{$data['rule'][about]}" class="form-control" />
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('商品列表规则')}</label>
                            <div class="col-md-9">
                                <input type="text" name="data[rule][goods]" value="{$data['rule'][goods]}" class="form-control" />
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('商品列表分页规则')}</label>
                            <div class="col-md-9">
                                <input type="text" name="data[rule][search]" value="{$data['rule'][search]}" class="form-control" />
                            </div>
                        </div>

                    </div>
                </div>
                <?php $ii=1;?>
                {loop $mall_page $i $t}
                <div class="tab-pane {if $page==$ii}active{/if}" id="tab_{$ii}">
                    <div class="form-body">

                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('SEO标题')}</label>
                            <div class="col-md-9">
                                <textarea class="form-control " style="height:70px" name="data[seo][{$i}][title]">{$data[seo][$i]['title']}</textarea>

                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('SEO关键字')}</label>
                            <div class="col-md-9">
                                <textarea class="form-control " style="height:70px" name="data[seo][{$i}][keywords]">{$data[seo][$i]['keywords']}</textarea>

                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('SEO描述信息')}</label>
                            <div class="col-md-9">
                                <textarea class="form-control" rows="3" name="data[seo][{$i}][description]">{$data[seo][$i]['description']}</textarea>
                            </div>
                        </div>

                    </div>

                </div>
                <?php $ii++;?>
                {/loop}


                <div class="form-body">


                    <div class="form-group">
                        <label class="col-md-2 control-label">{dr_lang('通用匹配标签')}</label>
                        <div class="col-md-9">
                            <p class="form-control-static">格式：{字段名}，例如：店铺名称 {title} 、 店铺ID {id} 、 列表分页标签 {param}</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="portlet-body form myfooter">
        <div class="form-actions text-center">
            <button type="button" onclick="dr_ajax_submit('{dr_now_url()}&page='+$('#dr_page').val(), 'myform', '2000')" class="btn green"> <i class="fa fa-save"></i> {dr_lang('保存')}</button>
        </div>
    </div>
</form>

{template "footer.html"}