{include file="templates/html_header.html"}
<!-- /section:basics/navbar.layout -->
<div class="main-container ace-save-state" id="main-container">
    <script type="text/javascript">
        {literal}
				try{ace.settings.loadState('main-container')}catch(e){}
			{/literal}
    </script>
    <!-- #section:basics/sidebar -->
    {include file="templates/html_sidebar.html"}
    <!-- /section:basics/sidebar -->
    <div class="main-content">
        <div class="main-content-inner">
            <!-- #section:basics/content.breadcrumbs -->
            <div class="breadcrumbs ace-save-state" id="breadcrumbs">
                <ul class="breadcrumb">
                    <li>
                        <i class="ace-icon fa fa-home home-icon">
                        </i>
                        <a href="index.php">
                            首页
                        </a>
                    </li>
                    <li class="active">
                        {$title}
                    </li>
                </ul>
                <!-- /.breadcrumb -->
                <!-- /section:basics/content.searchbox -->
            </div>
            <!-- /section:basics/content.breadcrumbs -->
            <div class="page-content">
                <h3 class="header smaller lighter blue">
                    {$title}
                    <small>
                        系统的配乐,默认音乐是《拉德斯基进行曲》，不需要音乐的页面可以关闭
                    </small>
                </h3>
                <div class="row">
                    <div class="col-xs-12">
                        <!-- PAGE CONTENT BEGINS -->
                        <div class="row">
                            {foreach $bgmusics as $item}
                            <div class="col-xs-6">
                                <div class="widget-box">
                                    <div class="widget-header">
                                        <h4 class="smaller">
                                            {$item['name']}
                                        </h4>
                                    </div>
                                    <div class="widget-body">
                                        <div class="widget-main" style="height:200px;">
                                            <form action="domusic.php?action=setbgmusic" class="form-horizontal" enctype="multipart/form-data" method="post" role="form">
                                                <div class="form-group">
                                                    <label class="col-sm-3 control-label no-padding-right" for="bgmusic">
                                                        默认状态：
                                                    </label>
                                                    <div class="col-sm-9">
                                                        <label>
                                                            <input name="bgmusicstatus" class="ace ace-switch ace-switch-3" type="checkbox" {if $item['bgmusicstatus']== 1}checked{/if} />
                                                            <span class="lbl" onclick=""></span>
                                                            
                                                        </label>
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <label class="col-sm-3 control-label no-padding-right" for="bgmusic">
                                                        音乐：
                                                    </label>
                                                    <div class="col-sm-9">
                                                        <input class="audiouploader" multiple="" name="bgmusicpath" type="file" value=""/>
                                                        <div class="hr hr-12 dotted">
                                                        </div>
                                                        <input type="hidden" name="plugname" value="{$item['plugname']}"/>
                                                        <input type="hidden" name="bgmusic" value="{$item['bgmusic']}">
                                                        <button class="btn btn-sm btn-primary" type="submit">
                                                            保存
                                                        </button>
                                                        <span class="alert-info">
                                                            不要超过{$maxfilesize}
                                                        </span>
                                                    </div>
                                                </div>
                                            </form>
                                            {if $item['bgmusicpath']!=''}
                                            <audio controls="controls">
                                                <source src="{$item['bgmusicpath']}" type="audio/mpeg">
                                                </source>
                                                您的浏览器不支持音乐播放，您可以下载这个谷歌浏览器， https://pan.baidu.com/s/1bp0MHFx，效果和性能会好一点哦
                                            </audio>
                                            {/if}
                                        </div>
                                    </div>
                                </div>
                            </div>
                            {/foreach}
                           
                        </div>
                        <!-- PAGE CONTENT ENDS -->
                    </div>
                    <!-- /.col -->
                </div>
                <!-- /.row -->
            </div>
            <!-- /.page-content -->
        </div>
    </div>
    <!-- /.main-content -->
    {include file="templates/html_footercontent.html"}
    <!-- 写每个页面自定的js -->
    <script type="text/javascript">
        $(function(){
        	// $('.audiouploader').ace_file_input({
        	// 	no_file:'No File ...',
        	// 	btn_choose:'点击此处选择音乐',
        	// 	btn_change:'点击此处选择音乐',
        	// 	droppable:false,
        	// 	onchange:null,
        	// 	thumbnail:false, //| true | large
        	// 	allowExt:['mp3'],
        	// });
        })
    </script>
    {include file="templates/html_footer.html"}
</div>