{template nheader.html}
<link href="{THEME_PATH}admin/weixin/home/css/base.css" rel="stylesheet">
<link href="{THEME_PATH}admin/weixin/home/css/module.css" rel="stylesheet">
<link href="{THEME_PATH}admin/weixin/home/css/wei.css" rel="stylesheet">
<script type="text/javascript" src="{THEME_PATH}admin/weixin/static/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="{THEME_PATH}admin/weixin/static/uploadify/jquery.uploadify.min.js"></script>
<script type="text/javascript" src="{THEME_PATH}admin/weixin/static/zclip/ZeroClipboard.min.js"></script>
<script type="text/javascript" src="{THEME_PATH}admin/weixin/home/js/dialog.js"></script>
<script type="text/javascript" src="{THEME_PATH}admin/weixin/home/js/admin_common.js"></script>
<script type="text/javascript" src="{THEME_PATH}admin/weixin/home/js/admin_image.js"></script>
<script type="text/javascript" src="{THEME_PATH}admin/weixin/static/masonry/masonry.pkgd.min.js"></script>
<script type="text/javascript" src="{THEME_PATH}admin/weixin/static/jquery.dragsort-0.5.2.min.js"></script>
<script type="text/javascript">
    var  IMG_PATH = "{THEME_PATH}admin/weixin/Home/images";
    var  STATIC = "{THEME_PATH}admin/weixin/static";
    var  ROOT = "{SITE_URL}";
    var  UPLOAD_FILE = "{dr_url('weixin/ajaxload')}";
</script>

<div class="page-bar">
    <ul class="page-breadcrumb mylink">
        {$menu.link}
    </ul>
    <ul class="page-breadcrumb myname">
        {$menu.name}
    </ul>

</div>

<div class="mytopsearch">
    <form class="row" method="post" action="" name="searchform" id="searchform">
        <input name="search" id="search" type="hidden" value="1" />
        <div class="col-md-12">
            <label>
                <select name="data[field]" class="form-control">
                    <option value="id" {if $param.field=='id'}selected{/if}>Id</option>
                    <option value="uid" {if $param.field=='uid'}selected{/if}>Uid</option>
                    {loop $field $t}
                    {if $t.ismain && $t.fieldname != 'inputtime'}
                    <option value="{$t.fieldname}" {if $param.field==$t.fieldname}selected{/if}>{$t.name}</option>
                    {/if}
                    {/loop}
                </select>
            </label>
            <label><i class="fa fa-caret-right"></i></label>
            <label style="padding-right: 20px;"><input type="text" class="form-control" placeholder="{fc_lang('多个Id可以用“,”分隔')}" value="{$param['keyword']}" name="data[keyword]" /></label>
            <label>{fc_lang('录入时间')} ：</label>
            <label>{dr_field_input('start', 'Date', array('option'=>array('format'=>'Y-m-d','width'=>'100')), (int)$param.start)}</label>
            <label><i class="fa fa-minus"></i></label>
            <label style="margin-right:10px">{dr_field_input('end', 'Date', array('option'=>array('format'=>'Y-m-d','width'=>'100')), (int)$param.end)}</label>
            <label><button type="submit" class="btn green btn-sm" name="submit" > <i class="fa fa-search"></i> {fc_lang('搜索')}</button></label>
        </div>
    </form>
</div>


<div class="portlet light bordered">
    <div class="portlet-body">
        <div class="table-scrollable v3table">

            <div style="padding-bottom: 20px;padding-top:10px;text-align:center">
                <a class="btn green btn-sm" href="{dr_url('wmaterial/tw', array('action'=> 'upload'))}"> <i class="fa fa-cloud-upload"></i> 一键上传素材到微信素材库</a>
                <a class="btn blue btn-sm" href="{dr_url('wmaterial/tw', array('action'=> 'download'))}"> <i class="fa fa-cloud-download"></i> 一键下载微信素材库到本地</a>
            </div>

            <div class="data-table">

                <div class="table-striped">
                    <ul class="material_list js-masonry"  data-masonry-options='{ "itemSelector": ".appmsg_li", "columWidth": 308 }'>
                       {loop $list $vo}
                            {if $vo[count]==1}
                                <!-- 单图文 -->
                                <li class="appmsg_li">
                                    <div class="appmsg_item">
                                        <h6 style="overflow: hidden;"><a href="{dr_weixin_show_url($vo.id)}" target="_blank">{$vo.title}</a></h6>
                                        <p class="title"><span class="badge badge-success">{$vo.id}</span> {dr_date($vo.inputtime)}</p>
                                        <div class="main_img">
                                            <img src="{dr_get_file($vo.thumb)}"/>
                                        </div>
                                        <p class="desc" style="overflow: hidden;">{$vo.description}</p>
                                    </div>
                                    <div class="appmsg_action">
                                        <a href="{dr_url('wmaterial/tw', array('action'=> 'edit', 'gid'=>$vo.group_id))}" title="修改"> <i class="fa fa-edit"></i> </a>
                                        <a href="{dr_url('wmaterial/tw', array('action'=> 'del', 'gid'=>$vo.group_id))}" title="删除"> <i class="fa fa-trash"></i> </a>
                                    </div>
                                </li>
                                {else}
                                <!-- 多图文 -->
                                <li class="appmsg_li">
                                    <div class="appmsg_item">
                                        <h6 style="overflow: hidden;"><a href="{dr_weixin_show_url($vo.id)}" target="_blank">{$vo.title}</a></h6>
                                        <p class="title"><span class="badge badge-success">{$vo.id}</span> {dr_date($vo.inputtime)}</p>
                                        <div class="main_img">
                                            <img src="{dr_get_file($vo.thumb)}"/>
                                            <h6>{$vo.title}</h6>
                                        </div>
                                        <p class="desc">{$vo.description}</p>
                                    </div>
                                    {loop $vo.child $vv}
                                        <div class="appmsg_sub_item">
                                            <p class="title"><a href="{dr_weixin_show_url($vv.id)}" target="_blank">{$vv.title}</a></p>
                                            <div class="main_img">
                                                <img src="{dr_get_file($vv.thumb)}"/>
                                            </div>
                                        </div>
                                    {/loop}
                                    <div class="appmsg_action">
                                        <a href="{dr_url('wmaterial/tw', array('action'=> 'edit', 'gid'=>$vo.group_id))}" title="修改"> <i class="fa fa-edit"></i> </a>
                                        <a href="{dr_url('wmaterial/tw', array('action'=> 'del', 'gid'=>$vo.group_id))}" title="删除"> <i class="fa fa-trash"></i> </a>
                                    </div>
                                </li>
                            {/if}
                        {/loop}
                    </ul>

                </div>
            </div>


            <div id="pages"><a>{fc_lang('共%s条', $param.total)}</a>{$pages}</div>
        </div>

    </div>
</div>

{template nfooter.html}