{template "header.html", "/"}

<div class="page-container">
    <div class="page-content-wrapper">
        {template "header.html"}
        <div class="page-content">
            <div class="container">

                <ul class="page-breadcrumb breadcrumb">
                    <li>
                        <a href="{SITE_URL}">首页</a>
                        <i class="fa fa-circle"></i>
                    </li>
                    {if !IS_SHARE}
                    <li>
                        <a href="{MODULE_URL}">{MODULE_NAME}</a>
                        <i class="fa fa-circle"></i>
                    </li>
                    {/if}
                    {dr_catpos($catid, '', true, '<li><a href="{url}">{name}</a><i class="fa fa-circle"></i></li>')}
                    <li>
                        <span>搜索：{$keyword}</span>
                    </li>
                </ul>

                <div class="page-content-inner">
                    <div class="search-page search-content-1">
                        <div class="portlet light ">
                            <p style="line-height:30px">
                                <strong>栏目分类：</strong>
                                <a class="label {if !$catid || $cat.child}label-success{else}label-default{/if}" href="{dr_search_url($params, 'catid', NULL)}">不限</a>
                                <!--调用栏目分类，这种用法只能用于模块列表与搜索页面-->
                                {loop $related $t}
                                <a class="label {if $t.id==$catid}label-success{else}label-default{/if}" href="{dr_search_url($params, 'catid', $t.id)}">{$t.name}</a>
                                {/loop}
                            </p>
                            <p style="line-height:30px">
                                <strong>地区搜索：</strong>
                                <a class="label {if !$get.area}label-success{else}label-default{/if}" href="{dr_search_url($params, 'area', NULL)}">不限</a>
                                <!--下面方式是调用下拉选择框字段的值-->
                                {php $area = dr_field_options('area', $catid = $catid, MOD_DIR);}
                                {loop $area $t}
                                <a class="label {if $t==$get.area}label-success{else}label-default{/if}" href="{dr_search_url($params, 'area', $t)}">{$t}</a>
                                {/loop}
                            </p>
                            <p style="line-height:30px">
                                <strong>发行年代：</strong>
                                <!--循环一组数字，这个都懂得，php最基础的数组用法-->
                                <a class="label {if !$get.year}label-success{else}label-default{/if}" href="{dr_search_url($params, 'year', NULL)}">不限</a>
                                {php for($i=2005;$i<=date('Y');$i++){ }
                                <a class="label {if $i==$get.year}label-success{else}label-default{/if}" href="{dr_search_url($params, 'year', $i)}">{$i}</a>
                                {php } }
                            </p>

                            <div>
                                <div class="input-group">
                                    <input type="text" class="form-control" onkeypress="if(event.keyCode==13) {searchByClass();return false;}" name='keyword' value='{$keyword}' id='dr_search_keyword'>
                                    <span class="input-group-btn">
                                        <button class="btn blue" onclick="searchByClass()" type="button">搜索</button>
                                    </span>
                                </div>
                                <script type="text/javascript">
                                    function searchByClass(){
                                        var url="{dr_search_url($params, 'keyword', 'dayruicom')}";
                                        var value=$("#dr_search_keyword").val();
                                        if (value) {
                                            location.href=url.replace('dayruicom', value);
                                        } else {
                                            dr_tips("输入关键字");
                                        }
                                    }
                                </script>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-12">
                                <div class="search-container ">
                                    {if $searchid}
                                    <ul class="search-container">
                                        {list action=search module=$dirname id=$searchid total=$sototal catid=$catid page=1 pagesize=10 urlrule=$urlrule}
                                        <li class="search-item clearfix">
                                            <a title="{$t.title}" href="{$t.url}">
                                                <img src="{dr_thumb($t.thumb, 100, 90)}" width="100" height="90" style="margin-top: 15px;">
                                            </a>
                                            <div class="search-content text-left">
                                                <h4 class="search-title">
                                                    <a title="{$t.title}" href="{$t.url}">{dr_keyword_highlight($t.title, $keyword)}</a>
                                                </h4>
                                                <p class="search-desc">{dr_keyword_highlight($t.description, $keyword)}</p>
                                                <div class="search-post-foot">
                                                    <ul class="search-post-tags">
                                                        {php $kw=@explode(',', $t.keywords);}
                                                        {loop $kw $a}
                                                        {if $a}
                                                        <li class="uppercase">
                                                            <a href="{dr_tag_url(MOD_DIR, $a)}" target="_blank">{$a}</a>
                                                        </li>
                                                        {/if}
                                                        {/loop}
                                                    </ul>
                                                    <div class="search-post-meta">
                                                        <i class="icon-calendar font-blue"></i>
                                                        <a href="javascript:;">{$t.updatetime}</a>
                                                    </div>
                                                    <div class="search-post-meta">
                                                        <i class="icon-fire font-blue"></i>
                                                        <a href="javascript:;">{$t.hits}次</a>
                                                    </div>
                                                    <div class="search-post-meta">
                                                        <i class="icon-bubble font-blue"></i>
                                                        <a href="javascript:;">{$t.comments}</a>
                                                    </div>
                                                </div>
                                            </div>
                                        </li>
                                        {/list}
                                    </ul>
                                    {/if}
                                    {if !$total || !$searchid}
                                    <div style="clear: both; padding:20px; padding-bottom: 0">
                                        <div class="alert alert-danger"><strong>对不起!</strong> 没有找到任何记录 </div>
                                    </div>
                                    {/if}
                                    <div class="search-pagination">
                                        <ul class="pagination">
                                            {$pages}
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>


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



{template "footer.html", "/"}