<?php AdmincpView::head(); ?>
<div class="content" id="<?php echo APP_MAINID; ?>">
    <div class="block">
        <ul class="nav nav-tabs nav-tabs-block" data-toggle="tabs" role="tablist">
            <li class="nav-item"><a class="nav-link active" href="#base0"><i class="<?php echo $icon;?>"></i> <?php echo $title;?>配置</a></li>
            <?php foreach ($tabs as $key=>$tab) {?>
            <li class="nav-item"><a class="nav-link" href="#config-<?php echo $key;?>"><i class="<?php echo $tab['icon'];?>"></i> <?php echo $tab['title'];?>配置</a></li>
            <?php } ?>
            <li class="nav-item ml-auto">
                <div class="block-options p-2">
                    <button type="button" class="btn-block-option" data-toggle="block-option" data-action="fullscreen_toggle"><i class="si si-size-fullscreen"></i></button>
                    <button type="button" class="btn-block-option" data-toggle="block-option" data-action="content_toggle"><i class="si si-arrow-up"></i></button>
                    <!-- <button type="button" class="btn-block-option" data-toggle="block-option" data-action="state_toggle" data-action-mode="demo">
                        <i class="si si-refresh"></i>
                    </button> -->
                    <!-- <button type="button" class="btn-block-option" data-toggle="block-option" data-action="close">
                        <i class="si si-close"></i>
                    </button> -->
                </div>
            </li>
        </ul>
        <div class="block-content">
            <form action="<?php echo APP_URL; ?>&action=save_<?php echo $action;?>" method="POST" id="<?php echo APP_FORMID; ?>" target="iPHP_FRAME">
                <div class="tab-content">
                    <div id="base0" class="tab-pane active" role="tabpanel">
                        <div class="block">
                            <?php if($header_enable){?>
                            <div class="block-header <?php echo $header_class;?>">
                                <h3 class="block-title"> <?php echo $title;?> <small><?php echo $subTitle;?></small></h3>
                            </div>
                            <?php } ?>
                            <div class="block-content <?php echo $content_class;?>">
                                <?php echo $content; ?>
                            </div>
                        </div>
                    </div>
                    <?php foreach ($tabs as $key=>$tab) {?>
                    <div id="config-<?php echo $key;?>" class="tab-pane" role="tabpanel">
                        <div class="block">
                            <?php if($tab['block']['header_enable']){?>
                            <div class="block-header <?php echo $tab['block']['header_class'];?>">
                                <h3 class="block-title"> <?php echo $tab['title'];?> <small><?php echo $tab['subTitle'];?></small></h3>
                            </div>
                            <?php } ?>
                            <div class="block-content <?php echo $tab['block']['content_class'];?>">
                                <?php include $tab['path'];?>
                            </div>
                        </div>
                    </div>
                    <?php } ?>
                    <div class="form-group row py-4 bg-body-light">
                        <label class="col-sm-2 col-xl-1"></label>
                        <div class="col-sm-8"><button type="submit" class="btn btn-lg btn-primary px-5 py-2">提交</button></div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<?php AdmincpView::foot(); ?>
