{include h}
<div class="container">
  <div id="main">
    <!--{hook t_top_left_box}-->
    <!--{hook t_forum_thread_top_left_box}-->
    <div class="wrap-box">
      <a href="{#WWW}">{$_LANG['论坛首页']}</a>
      
      <?php $tmp_fid = forum($forum,$fid,'fid'); ?>
   
      <?php
      $tmp_str = '';
        while ($tmp_fid != -1) {
          $tmp_str='<span class="dhsp"> > </span><a href="' .WWW.URL('forum','',EXP.forum($forum,$tmp_fid,'id')).'">'.forum($forum,$tmp_fid,'name').'</a>'.$tmp_str;
          if($forum[$tmp_fid]['fid'] != -1){
            $tmp_fid = forum($forum,$tmp_fid,'fid');
          }else{
            break; 
          }
        }
        echo $tmp_str;
      ?>


      <span class="dhsp"> > </span>
      {php echo forum($forum,$fid,'name');}
    </div>
    <div class="h-20"></div>
    <div class="wrap-box t-list">
      <div class="head with-btns">
      <!--{hook t_forum_thread_list_head}-->
        <span class="Select">
          <select class="Select-input FormControl">
            <option value="{php echo WWW.URL('forum',$fid.EXP.'new');}" {if isset($_GET['HY_URL'][2])}{if $_GET['HY_URL'][2] == 'new'}selected{/if}{/if}>{$_LANG['最新主题']}</option>
            <option value="{php echo WWW.URL('forum',$fid.EXP.'btime');}" {if isset($_GET['HY_URL'][2])}{if $_GET['HY_URL'][2] == 'btime'}selected{/if}{/if}>{$_LANG['最新回复']}</option>
          </select>
          <script type="text/javascript">
            $(".FormControl").change(function(){
                window.location.href = $(this).val();
            })
            </script>
          <img src="{#WWW}View/hy_boss/sort.png" class="Select-caret">
        </span>

        <a href="{php echo WWW.URL('post','');}" class="btn large pull-right"><img src="{#WWW}View/hy_boss/Write.png" style="width: 12px;margin-right: 8px;">{$_LANG['发表新主题']}</a>
        <!--{hook t_forum_thread_list_foot}-->
      </div>
      <div class="list">
      <!--{hook t_forum_thread_thread_list_top}-->
      {foreach $top_list as $v}
        <div class="item"> 
          <a href="{php echo WWW.URL('my',$v['user']);}" target="_blank">
          <img pos="right" src="{#WWW}{$v.avatar.b}" width="50" height="50" uid="{$v.uid}" class="circle pull-left js-info">
          </a>
          <div class="middle text">
            <h4 class="title">
            <a style="{if $v['top']==2}font-weight: bold;color: #09C;{/if}" href="{php echo WWW.URL('thread','',EXP.$v['id']);}" >{if $v['top']==2}<span class="qzd">{$_LANG['全站置顶']}</span>{elseif $v['top']==1}<span class="fzd">{$_LANG['本版置顶']}</span>{/if}{$v.title}</a>
            </h4>
            <div class="meta">
              <a href="{php echo WWW.URL('my',$v['user']);}" class="author" target="_blank">{$v.user}</a>&nbsp;&nbsp;·&nbsp;&nbsp;{$_LANG['发表于']} {php echo humandate($v['atime']);}&nbsp;&nbsp;·&nbsp;&nbsp;{if isset($v['buser'])}{$v.buser} {$_LANG['最后回复']} {php echo humandate($v['btime']);}{/if}
            </div>
          </div>
          {if $v['posts']}
          <a href="{php echo WWW.URL('thread','',EXP.$v['id']);}" class="comment" ><span class="badge {if ($v['btime']+1800) > NOW_TIME}badge-success{/if}">{$v.posts}</span></a>
          {/if}
        </div>
        {/foreach}
      {foreach $top_f_data as $v}
        <div class="item">
          <a href="{php echo WWW.URL('my',$v['user']);}" target="_blank">
          <img pos="right" src="{#WWW}{$v.avatar.b}" width="50" height="50" uid="{$v.uid}" class="circle pull-left js-info">
          </a>
          <div class="middle text">
            <h4 class="title">
            <a  style="{if $v['top']==1}font-weight: bold;color: #CE792D;{/if}" href="{php echo WWW.URL('thread','',EXP.$v['id']);}" >{if $v['top']==2}<span class="qzd">{$_LANG['全站置顶']}</span>{elseif $v['top']==1}<span class="fzd">{$_LANG['本版置顶']}</span>{/if}{$v.title}</a>
            </h4>
            <div class="meta">
              <a href="{php echo WWW.URL('my',$v['user']);}" class="author" target="_blank">{$v.user}</a>&nbsp;&nbsp;·&nbsp;&nbsp;{$_LANG['发表于']} {php echo humandate($v['atime']);}&nbsp;&nbsp;·&nbsp;&nbsp;{if isset($v['buser'])}{$v.buser} {$_LANG['最后回复']} {php echo humandate($v['btime']);}{/if}
            </div>
          </div>
          {if $v['posts']}
          <a href="{php echo WWW.URL('thread','',EXP.$v['id']);}" class="comment" ><span class="badge {if ($v['btime']+1800) > NOW_TIME}badge-success{/if}">{$v.posts}</span></a>
          {/if}
        </div>
        {/foreach}
        {foreach $data as $v}
        <div class="item">
          <a href="{php echo WWW.URL('my',$v['user']);}" target="_blank">
          <img pos="right" src="{#WWW}{$v.avatar.b}" width="50" height="50" uid="{$v.uid}" class="circle pull-left js-info">
          </a>
          <div class="middle text">
            <h4 class="title">
            <a style="color: #09c;" href="<?php echo WWW.URL('forum','',EXP.$v['fid']); ?>">[ {php echo forum($forum,$v['fid'],'name');} ]</a>
            <a href="{php echo WWW.URL('thread','',EXP.$v['id']);}" >{$v.title}</a>
            </h4>
            <div class="meta">
              <a href="{php echo WWW.URL('my',$v['user']);}" class="author" target="_blank">{$v.user}</a>&nbsp;&nbsp;·&nbsp;&nbsp;{$_LANG['发表于']} {php echo humandate($v['atime']);}&nbsp;&nbsp;·&nbsp;&nbsp;{if isset($v['buser'])}{$v.buser} {$_LANG['最后回复']} {php echo humandate($v['btime']);}{/if}
            </div>
          </div>
          {if $v['posts']}
          <a href="{php echo WWW.URL('thread','',EXP.$v['id']);}" class="comment" ><span class="badge {if ($v['btime']+1800) > NOW_TIME}badge-success{/if}">{$v.posts}</span></a>
          {/if}
        </div>
        {/foreach}
        <!--{hook t_forum_thread_thread_list_bottom}-->

      </div>
    </div>
    <div class="h-20"></div>
    <div class="wrap-box">
    <!--{hook t_forum_thread_page_top}-->
      <a href="{if $pageid==1}javascript:void(0);{else}{php echo WWW.URL('forum',$fid.EXP.$type,EXP.($pageid-1));}{/if}"  class="btn bg-primary {if $pageid==1}disabled{/if}" >{$_LANG['上一页']}</a>
      <a  href="{if $pageid==$page_count}javascript:void(0);{else}{php echo WWW.URL('forum',$fid.EXP.$type,EXP.($pageid+1));}{/if}" class="btn bg-primary large pull-right {if $pageid==$page_count}disabled{/if}" >{$_LANG['下一页']}</a>
      <!--{hook t_forum_thread_page_bottom}-->
    </div>
  </div>
  {include r_m}
</div>

{include f}
