{include file="inc/header.html"} 
{if $group_info}
{include file="inc/group_title.html"}
{/if}
<div class="blank"></div>
<div class="long f_l">
<div class="message-list">
		<div class="message-row">
										<table class="msg_row">
											<tr>
												<td style="width:60px; text-align:left;">
													<div class="avatar_small">
													{function name="show_avatar" uid=$message_item.user_id  type="small" }
													</div>													
												</td>
												<td>
													<div class="item">	
														<p class="f_l">															
																{if $message_item.fav_id gt 0}
																	<strong>
																	{function name="get_user_name" value=$message_item.user_id} 
																	</strong>&nbsp;&nbsp;
																	<span style="font-size:12px; color:#999;">
																	<?php echo sprintf($GLOBALS['lang']['USER_FAV_THIS'],pass_date($this->_var['message_item']['create_time']));?>
																	</span>
																{elseif $message_item.relay_id gt 0}	
																	<strong>
																	{function name="get_user_name" value=$message_item.user_id} 
																	</strong>&nbsp;&nbsp;
																	<span style="font-size:12px; color:#999;">
																	<?php echo sprintf($GLOBALS['lang']['USER_RELAY_THIS'],pass_date($this->_var['message_item']['create_time']));?>
																	</span>
																{else}							
																	<strong>
																	{function name="get_user_name" value=$message_item.user_id} 
																	</strong>&nbsp;&nbsp;
																	<span style="font-size:12px; color:#999;">
																	<?php echo sprintf($GLOBALS['lang']['SUPPLIER_COMMENT_SAY'],pass_date($this->_var['message_item']['create_time']));?>
																	</span>
																{/if}
																
																
																
															</p>
															<p class="f_r" style="color:#ccc;">
															来自：
															{if $message_item.source_type eq 0}
															{function name="app_conf" v="SHOP_TITLE"}{$message_item.source_name}
															{else}
																{if $message_item.source_url neq ''}
																<a href="{$message_item.source_url}" target="_blank" title="{$message_item.source_name}">{$message_item.source_name}</a>
																{else}
																{$message_item.source_name}
																{/if}
															{/if}
															
															</p>		
															<div class="blank5"></div>											
															<span class="topic_title_row">{$message_item.forum_title}{if $message_item.group_id gt 0}
															&nbsp;&nbsp;
															<a href="{url x="shop" r="group#forum" p="id=$message_item.group_id"}" title="{$message_item.group_name}" style="font-weight:normal; color:#999;">[{$message_item.group_name}]</a>{/if}</span>
															<div class="blank5"></div>
															{if $message_item.rel_url neq ""}
															<a href="{$message_item.rel_url}" class="topic_title_link">{$message_item.title}</a>
															{else}
															<span class="topic_title_row">{$message_item.title}</span>
															{/if}
															<div class="blank"></div>
															<div class="text">							
																<span class="quote_begin"></span>{$message_item.content}<span class="quote_end"></span>
															</div>
															<div class="blank"></div>
															{foreach from=$message_item.images item=img key=key}
															<span class='toogle_topic_image_box'><a href="{$img.o_path}" target="_blank" title="查看原图"><img  src='{function name="get_spec_image" v=$img.o_path w=525 h=0 g=0 p=0 }'  class="lazy" /></a></span>
															{/foreach}	
															
										
															
															{if $message_item.id neq $message_item.origin_id}
																{if $message_item.origin}
																	<div class="topic_origin">
																		
																		<span class="avatar_small">
																		{function name="show_avatar" uid=$message_item.origin.user_id  type="small" }
																		</span>
																		
																		{if $message_item.origin.fav_id gt 0}
																			<strong>
																			{function name="get_user_name" value=$message_item.origin.user_id} 
																			</strong>&nbsp;&nbsp;
																			<span style="font-size:12px; color:#999;">
																			<?php echo sprintf($GLOBALS['lang']['USER_FAV_THIS'],pass_date($this->_var['message_item']['origin']['create_time']));?>
																			</span>
																		{elseif $message_item.origin.relay_id gt 0}	
																			<strong>
																			{function name="get_user_name" value=$message_item.origin.user_id} 
																			</strong>&nbsp;&nbsp;
																			<span style="font-size:12px; color:#999;">
																			<?php echo sprintf($GLOBALS['lang']['USER_RELAY_THIS'],pass_date($this->_var['message_item']['origin']['create_time']));?>
																			</span>
																		{else}							
																			<strong>
																			{function name="get_user_name" value=$message_item.origin.user_id} 
																			</strong>&nbsp;&nbsp;
																			<span style="font-size:12px; color:#999;">
																			<?php echo sprintf($GLOBALS['lang']['SUPPLIER_COMMENT_SAY'],pass_date($this->_var['message_item']['origin']['create_time']));?>
																			</span>
																		{/if}
																		
																		<a href="{url x="shop" r="topic" p="id=$message_item.origin.id"}"  class="origin_topic_title">{$LANG.ORIGIN_TOPIC}</a>
																		<div class="blank5"></div>
																		{$message_item.origin.content}
																		<div class="blank5"></div>
																		{foreach from=$message_item.origin.images item=img key=key}
																		<span class='toogle_topic_image_box'><a href="{$img.o_path}" target="_blank" title="查看原图"><img  src='{function name="get_spec_image" v=$img.o_path w=525 h=0 g=0 p=0 }' /></a></span>
																		{/foreach}	
																		
																	</div>
																
																{else}
																<div class="origin_delete">
																	{$LANG.ORIGIN_DELETE}
																</div>
																{/if}
															{/if}
																		
													</div>
													
												</td>
											</tr>
										</table>
											
										
											
										<div class="blank"></div>
										{if $message_item.tags}	
										<div class="f_l">
											<span class="msg_row_ico_tag">
											{foreach from=$message_item.tags_array item=tag}
											<a href="{url x="shop" r="topic#search" p="keyword=$tag"}" title="{$tag}">
											<?php 
												if(is_array($this->_var['kws_div'])&&in_array($this->_var['tag'],$this->_var['kws_div']))
												{
													echo "<span class='result_match'>".$this->_var['tag']."</span>";
												}
												else
												{
													echo $this->_var['tag'];
												}
											?>
											</a>
											{/foreach}
											</span>
										</div>
										{/if}										
										<div class="f_r">																		
											{if $message_item.user_id eq $user_info.id}		
											<span class="msg_row_ico_del">								
											<a href="javascript:void(0);" onclick="delete_topic({$message_item.id},$(this).parent().parent().parent());">{$LANG.DELETE}</a>
											</span>
											{/if}
												
											
											
											<span class="msg_row_ico_reply"><a href="{url x="shop" r="topic" p="id=$message_item.id"}#reply" onclick="load_topic_replys('{url x="shop" r="ajax#load_topic_replys" p="id=$message_item.id"}',true);">{$LANG.TOPIC_COMMENT} (<span id="reply_count">{$message_item.reply_count}</span>)</a></span>
											<span class="msg_row_ico_fav"><a href="javascript:void(0);" onclick="fav_topic({$message_item.id});">{$LANG.FAV_TOPIC} ({$message_item.fav_count}) </a></span>
											<span class="msg_row_ico_relay"><a href="javascript:void(0);" onclick="relay_topic({$message_item.id});">{$LANG.RELAY_TOPIC} ({$message_item.relay_count})</a></span>
										</div>
										<div class="blank1"></div>	
										<div class="tr">
											{if $message_item['group_id'] gt 0}
												{if $user_auth['group']['setbest'][0] or $user_auth['group']['setbest'][$message_item['group_id']]}
												<span class="">								
												<a href="javascript:void(0);" onclick="op_group_setbest({$message_item.id});">推荐</a>
												</span>
												{/if}
												
												
												{if $user_auth['group']['settop'][0] or $user_auth['group']['settop'][$message_item['group_id']]}
												<span class="">								
												<a href="javascript:void(0);" onclick="op_group_settop({$message_item.id});">置顶</a>
												</span>
												{/if}
												
												{if $user_auth['topic']['del']}
												<span class="">								
												<a href="javascript:void(0);" onclick="op_topic_del({$message_item.id});">{$LANG.DELETE}</a>
												</span>	
												{elseif $user_auth['group']['del'][0] or $user_auth['group']['del'][$message_item['group_id']]}
												<span class="">								
												<a href="javascript:void(0);" onclick="op_group_del({$message_item.id});">{$LANG.DELETE}</a>
												</span>												
												{/if}											
											{else}
												{if $user_auth['topic']['del']}
												<span class="">								
												<a href="javascript:void(0);" onclick="op_topic_del({$message_item.id});">{$LANG.DELETE}</a>
												</span>	
												{/if}
											{/if}
										</div>
		</div>
</div><!--end message-list-->
<input type="hidden" value="{url x="shop" r="ajax#load_topic_replys" p="id=$message_item.id"}" name="load_url" id="load_url" />
<div class="blank"></div>
<div id="reply">
<div id="topic_page_reply">
<script type="text/javascript">
	load_topic_replys("{url x="shop" r="ajax#load_topic_replys" p="id=$message_item.id"}",false);
</script>
</div>
</div>

</div>
<div class="short f_r">
	<div class="inc">
		<div class="inc_main pd10">
			<div  class="avatar_small f_l">
				{function name="show_avatar" uid=$message_item.user_id  type="small" }
			</div>
			<div class=" main_user_name f_l">
				<b>{function name="get_user_name" value=$message_item.user_id} </b>
				
				<div class="blank5"></div>
				{if $muser_info.focused eq 1}
				<a href="javascript:;" onclick="focus_user({$message_item.user_id},this);" class="remove_focus">{$LANG.CANCEL_FOCUS}</a>
				{else}
				<a class="add_focus" onclick="focus_user({$message_item.user_id},this);" href="javascript:;">关注TA</a>
				{/if}
			</div>
			<div class="blank"></div>
			<div style="border-bottom:#e6e6e6 dotted 1px; height:1px; line-height:0px; font-size:0px;"></div>
			<div class="blank"></div>
			<div class="tc my_counter" style="width:50px; border-right:#e6e6e6 solid 1px;">
				<span class="count_big">{$muser_info.focused_count}</span><br />
				{$LANG.FANS}
			</div>
			<div class="tc my_counter" style="width:50px; border-right:#e6e6e6 solid 1px;">
				<span class="count_big">{$muser_info.focus_count}</span><br />
				{$LANG.FOCUS}
			</div>
			<div class="tc my_counter" style="width:50px;">
				<span class="count_big">{$muser_info.fav_count}</span><br />
				{$LANG.FAV}
			</div>
			
			<div class="blank"></div>
			<div class="tc">
			<a href="{url x="shop" r="space" p="id=$muser_info.id"}"><img src="{$TMPL}/images/go_space.png" /></a>
			</div>
		</div>
	</div>
	{if $user_joing_group}
	<div class="blank"></div>
	<div class="inc">
		<div class="inc_top">TA加入的小组</div>
		<div class="inc_main pd10 clearfix">
			{foreach from=$user_joing_group key=key item=join_group}
			<div class="join_group_item" {if $key mod 2 eq 1}style="margin-right:0px; "{/if}>
				<a href="{url x="shop" r="group#forum" p="id=$join_group.id"}"><img src="{function name="get_spec_image" v=$join_group.icon w=64 h=64 g=1  }" alt="{$join_group.name}"  width=64 height=64 /></a>
				<div class="blank1"></div>
				<a href="{url x="shop" r="group#forum" p="id=$join_group.id"}" title="{$join_group.name}">{function name="msubstr" v=$join_group.name b=0 e=5 }</a>
			</div>
			{/foreach}			
			<div class="blank1"></div>
		</div>
	</div>
	{/if}
	
	{if $group_topic_rec_list}
	<div class="blank"></div>
	<div class="inc">
		<div class="inc_top">该小组其他精彩主题</div>
		<div class="inc_main clearfix">
			{foreach from=$group_topic_rec_list item=topic}
			<div class="new_topic_row">
			<a class="topic_title" title="{$topic.forum_title}" href="{url x="shop" r="topic" p="id=$topic.id"}"> {function name="msubstr" v=$topic.forum_title b=0 e=12}</a>
			<div class="blank5"></div>
			<a title="{$group_info.name}" href="{url x="shop" r="group#forum" p="id=$topic.group_id"}" class="topic_group_title">{function name="msubstr" v=$group_info.name b=0 e=12}</a>
			</div>
			{/foreach}		
			
		</div>
	</div>
	{/if}
</div>
<div class="blank"></div>
{include file="inc/footer.html"}