{include h}
{include thread_header}
{if $thread_data['bid']!=5}
<!--{hook t_m_thread_index_1}-->
<section class="body" id="thread-body">
<div style="padding-bottom:60px">
<!--{hook t_m_thread_index_2}-->
	<div class="hy-box thread-index" style="margin-top: 50px;border-bottom: 1px solid rgb(227, 227, 227);margin-bottom: 10px;">
	<!--{hook t_m_thread_index_3}-->
		<h2>{$thread_data.title}{if $thread_data['state']}<span title="{$_LANG['禁止回复']}" style="    color: brown;"> - {$_LANG['已锁定']}</span>{/if}</h2>
		<!--{hook t_m_thread_index_4}-->
		<p class="cl">
			<a href="{php HYBBS_URL('my',$thread_data['user']);}" class="user">
				<img src="{#WWW}{$thread_data.avatar.b}" class="avatar">{$thread_data.user}
			</a>
			<em class="">{php echo date("Y-m-d",($thread_data['atime']));}</em><span class="louzhu" >楼主</span>
			<span class="touxian"><?php
$User = M("User");
$uid=$User->get_gid($thread_data['uid']);
$Usergroup = M("Usergroup");
echo $Usergroup->gid_to_name($uid);
?></span> 
		</p>
			<ul class="hy-lable-group-thread">
			{if $forum[$thread_data['fid']]['fid'] != -1}
	        <li style="display: inline;word-spacing: -0.35em;">
	            <a style="background:{php echo forum($forum,$forum[$thread_data['fid']]['fid'],'background');};color:{php echo forum($forum,$forum[$thread_data['fid']]['fid'],'color');};" href="{php HYBBS_URL('forum',$forum[$thread_data['fid']]['fid'])}" class="hy-lable hy-lable-zz">{php echo forum($forum,$forum[$thread_data['fid']]['fid'],'name');}</a>
	        </li>
	        {/if}
	        <li style="display: inline;word-spacing: -0.35em;">
	            <a style="background:{php echo forum($forum,$thread_data['fid'],'background');};color:{php echo forum($forum,$thread_data['fid'],'color');};    border: 1px solid {php echo forum($forum,$thread_data['fid'],'color');};
    border-radius: 50px;"  href="{php HYBBS_URL('forum',$thread_data['fid'])}" class="hy-lable hy-lable-zz">{php echo forum($forum,$thread_data['fid'],'name');}</a>
	        </li>
	     </ul>
		<!--{hook t_m_thread_index_5}-->
	</div>
	<!--{hook t_m_thread_index_6}-->
	<div class="hy-box thread-cen">
	<!--{hook t_m_thread_content_top}-->
		{if $thread_data['show'] && $thread_data['gold_show']}
		{$post_data.content}
		{else}
		{if $thread_data['gold_show']}
          <blockquote style="color: #B75C5C;font-weight: bold;">
          {$_LANG['内容隐藏提示']}
          </blockquote>
          {else}
          <blockquote style="color: #B75C5C;font-weight: bold;">
          {$_LANG['内容需要付费']} <a href="javascript:void(0);" onclick="buy_thread({$thread_data['tid']},{$thread_data['gold']})">({$_LANG['点击购买']})</a> {$_LANG['售价']}：{$thread_data['gold']} {$_LANG['金币']}
          </blockquote>
          {/if}
        {/if}
    <!--{hook t_m_thread_content_bottom}-->
	
	</div>
	<!--{hook banquan}-->
	<div class="neir" >
	<div class="r post-div" style="width:33.3333%;text-align: center;">
		<a onclick="tp('thread2',{$thread_data.tid},this)">
			<i class="iconfont"></i>
			<!--踩-->不喜欢 <span>{$thread_data['nos']}</span>
		</a>
	</div>
	<div class="r post-div" style="width:33.3333%;text-align: center;">
		<a onclick="tp('thread1',{$thread_data.tid},this)">
			<i class="iconfont"></i>
			<!--赞-->喜欢 <span>{$thread_data['goods']}</span>
		</a>
	</div>
	<div class="r post-div" style="width:33.3333%;text-align: center;">
		<a>
			<i class="iconfont"></i>
			<!--查看-->查看 <span>{$thread_data['views']}</span>
		</a>
	</div>
</div>
	{if $thread_data['files']}
	<!--{hook t_m_thread_index_7}-->
	<div class="hy-box hy-bo-t" style="padding:10px">
		<h2 class="hy-bo-b" style="padding-bottom:5px">{$_LANG['附件列表']}</h2>
		<!--{hook t_m_thread_index_8}-->
		{foreach $filelist as $v}
		<!--{hook t_m_thread_index_9}-->
	     {if $v['show']}
	      <p style="padding:10px 0;font-size:18px">
	        <a href="javascript:void(0);" onclick="hy_downfile({$v.fileid})">{$v.name}</a>
	        <i style="color: grey;    font-size: 14px;">&nbsp;&nbsp;{$_LANG['文件大小']}:{php echo round($v['size']/1024/1024,2);}M ({$_LANG['下载次数']}：{$v.downs})</i>
	        {if $v['gold']}
	        <span style="color: brown;"> &nbsp;&nbsp;{$_LANG['售价']}:{$v.gold}</span>
	        {/if}
	      </p>
	      {else}
	      <p style="padding:10px 0;font-size:18px">
	        <a href="javascript:void(0);"  style="color: #c31d1d;">{$_LANG['附件隐藏提示']}</a>
	      </p>
	     {/if}
	     <!--{hook t_m_thread_index_10}-->
	     {/foreach}
	     <!--{hook t_m_thread_index_11}-->
	</div>
	{/if}
	<!--{hook t_m_thread_index_12}-->
	<div class="hy-box postlist">
	<!--{hook t_m_thread_index_13}--><div class="comment_count">校友的评论
	<a class="gdxy" onclick="$.hy.popover_bottom_show()"><i class="iconfont"></i></a>
	</div>
	<table style="width: 100%;">
		{foreach $PostList as $k => $v}
		<!--{hook t_m_thread_index_14}-->
		<tr>
			<!--{hook t_m_thread_index_15}-->
			<td class="user">
				<a href="{php HYBBS_URL('my',$v['user']);}" class="avatar">
					<img src="{#WWW}{$v.avatar.c}">
		        </a>
			</td>
			<!--{hook t_m_thread_index_16}-->
			<td class="content">
			    <div class="info">
			    	<h4 class="cl">
			        <a href="{php HYBBS_URL('my',$v['user']);}" class="info-user">{$v.user}</a><span class="touxian"><?php
//用户组GID转用户组名称
$usergid=M("User")->read($v['uid']);
//取得用户组id
$group=$usergid['gid'];
//实例UsergroupModel对象
$Usergroup = M("Usergroup");
echo $Usergroup->gid_to_name($group);$User = M("User");
?></span>{if $group==$thread_data['uid']}<span class="louzhu" >楼主</span> {/if}
					</h4>
  				<div class="ce">
  				<!--{hook t_m_post_content_top}-->
              		{$v.content}
              	<!--{hook t_m_post_content_bottom}-->
				</div>
			    	<p class="time"><em># {$k+1}{$_LANG['楼']}</em> {php echo date("Y-m-d",($thread_data['atime']));} 
			    	{if IS_LOGIN }
	                    {if $v['uid'] == NOW_UID || NOW_GID == C("ADMIN_GROUP")}
	                        <!-- 帖子作者 或者 管理员 -->
	                        <a class="" href="{php HYBBS_URL('post','edit',['id'=>$v['pid']]); }">{$_LANG['编辑']}</a>
	                    {/if}
	                    {if $v['uid'] == NOW_UID || NOW_GID == C("ADMIN_GROUP") || is_forumg($forum,NOW_UID,$thread_data['fid'])}
	                        <!-- 作者 与 管理员 判断 -->
	                        <a href="javascript:void(0);" class="" onclick="del_thread({$v.pid},'post')" >{$_LANG['删除帖子']}</a>
	                    {/if}
						{if NOW_UID == $v['uid']}
                {else}
				<a style="float:right;width:auto;height:auto" href="javascript:void(0);" class="hy-body-overflow" onclick="open_post_box(this);edit_app_text('{$v.user}')">
				<span class="icon-reply"></span> 回复</a>
                {/if}
	                {/if}
	                </p> 

			    </div>
    
			</td>
			<!--{hook t_m_thread_index_17}-->
		</tr>
		<!--{hook t_m_thread_index_18}-->
		{/foreach}
		<!--{hook t_m_thread_index_19}-->
	</table>
	<!--{hook t_m_thread_index_20}-->
	</div>
	<div class="hy-box hy-bo-t" style="padding:10px;    margin: 20px 15px;">
	<!--{hook t_m_thread_index_page_top}-->
		<a href="{if $pageid==1}javascript:void(0);{else}{php HYBBS_URL('thread',$thread_data['tid'],$pageid-1);}{php echo X("get.order")?"?order=desc":'';}{/if}" class="hy-btn hy-btn-danger l {if $pageid==1}disabled{/if}">{$_LANG['上一页']}</a>
		<!--{hook t_m_thread_index_21}-->
		<a href="{if $pageid==$page_count}javascript:void(0);{else}{php HYBBS_URL('thread',$thread_data['tid'],$pageid+1);}{php echo X("get.order")?"?order=desc":'';}{/if}" class="hy-btn hy-btn-danger r {if $pageid==$page_count}disabled{/if}">{$_LANG['下一页']}</a>
		<div style="clear: both;"></div>
	<!--{hook t_m_thread_index_page_bottom}-->
	</div>
</div>
</section>

<div class="hy-fix-b hy-bo-t" {if !IS_MOBILE}style="
    width: 720px !important;
    margin: auto !important;
    text-align: center;"{/if}style="background: rgba(246, 246, 246, 0);width:100%;padding:10px;text-align: center;">
<!--{hook t_m_thread_index_22}-->
	<!--{hook t_m_thread_index_23}-->
	<button type="button" onclick="open_post_box(this)" class="hy-btn hy-btn-danger hy-btn-outlined" style="border-radius: 15px;width:40%">{$_LANG['评论']}</button>
	<!--{hook t_m_thread_index_28}-->
</div>
<div class="post-box  hy-bo-t">
	<!--{hook t_m_post_editer_top}-->
        {if IS_LOGIN}
            <!--{hook t_m_thread_index}-->
        {else}
            <a class="hy-btn hy-btn-block" href="{php HYBBS_URL('user','login')}">{$_LANG['登陆后才可发表内容']}</a>
        {/if}
      <!--{hook t_m_post_editer_bottom}-->
</div>
   {else}
   {if $thread_data['sex']==1}
   {include boy_index}
   {elseif $thread_data['sex']==2 }
   {include gir_index}
   {else}
   {include dtheme_index} 
  {/if}
  {/if}
{include f}