<?php if(!defined('IN_SDCMS')) exit;?>{include file="top.php"}
<title>{if strlen($seotitle)>0}{$seotitle}_{/if}{sdcms[bbs_webname]}</title>
<meta name="keywords" content="{$seokey}">
<meta name="description" content="{$seodesc}">
</head>

<body>
	
    {include file="head.php"}
    
    <div class="bg_inner">
        <div class="width banner_inner">
            <div class="left">
                <ul>
                    <li class="hover"><a>{sdcms[bbs_webname]}</a></li>
                </ul>
            </div>
            <div class="right"><span class="am-icon-phone am-icon-fw"></span>{sdcms[ct_tel]}{block("inner_text")}</div>
        </div>
    </div>

    <div class="width">
        <div class="bread bread-1 mt">
        	<ul>
                <li><a href="{$webroot}">首页</a></li>
                <li class="active"><a href="{N('bbs')}">社区首页</a></li>
            </ul>
        </div>
    </div>

    <div class="width minheight">
        <!---->
        <div class="bbs">
            <div class="lefter box">
                <div class="navs">
                    <a href="{N('bbs')}"{if $fid==0} class="hover"{/if}>全部主题</a>
                    {foreach $bbscate as $key=>$val}
                    <a href="{N('bbs','','fid='.$val['cateid'].'')}"{if $fid==$val['cateid']} class="hover"{/if} title="{$val['catename']}">{$val['catename']}</a>
                    {/foreach}
                    <a href="{N('bbsadd','','fid='.$fid.'')}" class="btn btn-blue">发布主题</a>
                </div>
                <div class="lists">
                    <ul>
                        {sdcms:rs pagesize="20" table="sd_bbs" join="left join sd_user on sd_bbs.userid=sd_user.id" where="sd_bbs.islock=1 $where" order="ontop desc,bbs_id desc" key="bbs_id"}
                        {rs:eof}暂无主题{/rs:eof}
                        <li>
                            <div class="face"><img src="{if strlen($rs[uface])}{$rs[uface]}{else}{WEB_ROOT}upfile/noface.gif{/if}" alt="{$rs[uname]}"></div>
                            <div class="info">
                                <h5><a href="{N('bbsshow','','id='.$rs[bbs_id].'')}" title="{$rs[title]}">{$rs[title]}</a>{if $rs[ontop]==1}<em>置顶</em>{/if}{if $rs[isnice]==1}<em>精</em>{/if}</h5>
                                <div class="nickname"><a href="{U('home/bbs/mytopic','uid='.$rs[userid].'')}">{$rs[uname]}</a>　{formatTime($rs[createdate])}</div>
                                <div class="other"><span class="ui-icon-eye"></span>{$rs[hits]}　<span class="ui-icon-comment"></span>{$rs[replynum]} </div>
                            </div>
                        </li>
                        {/sdcms:rs}
                    </ul>
                </div>
                {if $pg->totalpage>1}
                <div class="page page-center page-mid"><ul>{$showpage}</ul></div>
                {/if}
            </div>
            <div class="righter box">
                <div class="user">
                    <div class="nickname">{$uname}</div>
                    <div class="face"><img src="{$uface}" alt="{$uname}"></div>
                    <div class="count">
                        <a href="{U('home/bbs/mytopic','uid='.$userid.'')}"><span>{$total_1}</span><p>主题数</p></a>
                        <a href="{U('home/bbs/myreply','uid='.$userid.'')}"><span>{$total_2}</span><p>回复数</p></a>
                    </div>
                </div>
                
                <div class="searchs">
                    <h2>论坛搜索</h2>
                    <form action="{U('home/bbs/search')}" method="get">
                        {if sdcms[url_mode]==1}<input type="hidden" name="c" value="bbs" /><input type="hidden" name="a" value="search" />{/if}
                        <input type="text" name="keyword" placeholder="请输入关键字"><input type="submit" value="搜索">
                    </form>
                </div>
                
                <div class="topic">
                    <h2>热门帖子</h2>
                    <ul>
                        {sdcms:rs top="20" table="sd_bbs" where="islock=1" order="hits desc,replynum desc,bbs_id desc"}
                        <li><span{if $i<4} class="hover"{/if}>{substr("0".$i,-2)}</span><a href="{N('bbsshow','','id='.$rs[bbs_id].'')}" title="{$rs[title]}">{$rs[title]}</a></li>
                        {/sdcms:rs}
                    </ul>
                </div>
                
            </div>
        </div>
        <!---->
    </div>
    
    {include file="foot.php"}
    <script>
	$(function(){
		$("#nav_bbs").addClass("hover");
	});
	</script>
   
</body>
</html>