<?php include pTemplate("header");?>
<link href="<?php echo PUBURL;?>css/editor.css" rel="stylesheet" type="text/css" />
<link href="<?php echo PUBURL;?>css/forum.css" rel="stylesheet" type="text/css" />
     <div id="loadingbar"></div>
     
     <div id="main" class="mainPanel wd txt_left">
     
     
     <div class="path b_size"><ul>
        <li class="home" style="z-index:100;"><a href="<?php echo SITEURL;?>?mod=group&do=group">讨论组</a></li>
        <li style="z-index:2;"><a href="<?php echo SITEURL;?>?mod=group&do=group&cateid=<?php echo $str_groupcate['cateid'];?>"><?php echo $str_groupcate['catename'];?></a></li>
        <li style="z-index:1;"><a href="<?php echo SITEURL;?>?mod=group&do=group&groupid=<?php echo $str_group['groupid'];?>"><?php echo $str_group['groupname'];?></a></li>
         <li style="z-index:0;"><a href="javascript:;">查看话题</a></li>
        </ul>
        </div>
        
        <div class="content">
        <div class="forum clearfix" id="J_Forum">
	<div class="forum-main box-shadow">
	<div class="forum-title clearfix">
					<h3><em class="wordbreak" id="J_Forumtitle"><a href="<?php echo SITEURL;?>?mod=group&do=group&c=topic&topicid=<?php echo $content['topicid'];?>" title="<?php echo $content['title'];?>"><?php echo $content['title'];?></a></em>
						<span id="J_ForumStatusIcons">
                        
						<i class="icon i-forum i-status-ask" title="问答帖"></i>
						
                        </span>
					</h3>
                                         
                      
                      
		</div>
		<div class="forum-con">
			<ul class="forum-post " id="J_ForumPost" style="display: block;">
            	<li class="first">
					<a class="img" href="#" target="_blank">
                        <img title="<?php echo $content['user']['realname'];?>" alt="<?php echo $content['user']['realname'];?>" src="<?php echo PUBURL;?><?php echo $content['user']['face'];?>" width="50px" height="50px">
                    </a>
					
										<span class="info">
												<a href="#" target="_blank" title="<?php echo $content['user']['realname'];?>"><?php echo $content['user']['realname'];?></a>
																																					<span class="time"> 发布于 <?php echo Ue_time($content['addtime']);?></span>
					</span>
					<div class="post wordbreak" id="J_PostArtical"><?php echo $content['content'];?></div>
					<span class="post-floor"><b>楼主</b></span>
					<div class="oper clearfix">
<?php if($_CO['groupid']==1||$content['uid']==$_CO['uid']) { ?>
<a href="<?php echo SITEURL;?>?mod=group&do=group&c=topic_istop&topicid=<?php echo $content['topicid'];?>">置顶</a>

<a href="<?php echo SITEURL;?>?mod=group&do=group&c=topic_isposts&topicid=<?php echo $content['topicid'];?>">精华</a>


  <a href="<?php echo SITEURL;?>?mod=group&do=group&c=edit_topic&topicid=<?php echo $content['topicid'];?>">编辑</a> 
<a href="<?php echo SITEURL;?>?mod=group&do=group&c=deltopic&topicid=<?php echo $content['topicid'];?>" onclick="return confirm('确定删除?')">删除</a>
<?php } ?>
					 <span class="mr5 ml5"> | </span><a id="J_PostCmt">评论</a>
                      					</div>
					</li>
            										
				<?php if(is_array($arrTopicComment)) { ?>
<?php foreach((array)$arrTopicComment as $key=>$item) {?>
										
						
									<li data-cmtid="<?php echo $item['commentid'];?>" id="data-cmt_<?php echo $item['commentid'];?>">
            						<a class="img" href="<?php echo SITEURL;?>" target="_blank" title="<?php echo $item['user'][username];?>"><img src="<?php echo PUBURL;?><?php echo $item['user'][face];?>" width="50px" height="50px"></a>
            						<span class="info">
                                     <?php if($item['user'][darenid]) { ?>
       <a class="J_UserNick g-daren" href="<?php echo SITEURL;?>" target="_blank"><em><?php echo $item['user'][username];?></em><i class="i-daren">达人</i></a>
        <?php } else { ?>
         <a class="J_UserNick" href="<?php echo SITEURL;?>" target="_blank"><?php echo $item['user'][username];?></a>
        <?php } ?>
            							            							            							            								            							            							<span class="time"> 发布于 <?php echo date('Y-m-d H:i',$item['addtime'])?></span>
            						</span>
            						<div class="post">
            							<?php if($item['referid'] !='0') { ?> 
                                        <div class="post-reply" data-cmtid="<?php echo $item['referid'];?>">
            								<span class="info">回复 
                                          
<a class="J_UserNick" href="<?php echo SITEURL;?>" target="_blank" title="<?php echo $item['recomment'][user][username];?>"><?php echo $item['recomment'][user][username];?></a>

            								<span class="time">/  <?php echo date('m-d H:i',$item['recomment'][addtime])?></span></span>
            								<p class="post-quoteContent J_PostCon" data-content='<?php echo $item['recomment'][content];?>'>
            								
            								<?php echo $item['recomment'][content];?>
            								
            								</p>
            								<span class="post-floor"></span>
            							</div>
                                         <?php } ?>     							
            							
            							<p class="J_PostCon wordbreak" data-content='<?php echo $item['content'];?>'>
            								<?php echo $item['content'];?>
            							</p>
            							
            						</div>
            						<span class="post-floor">
                                   
                    				 <?php echo $key+2+$lstart?>楼
                  				    
                                   </span>
            						<p class="oper" data-cmtid="<?php echo $item['commentid'];?>">
                                    	
            							
                                        <?php if($_CO['groupid']==1||$item['uid']==$_CO['uid']) { ?>
                                        <span class="mr5 ml5"> | </span>
                                        <a href="<?php echo SITEURL;?>?mod=group&do=group&c=delcomment&commentid=<?php echo $item['commentid'];?>" onclick="return confirm('确定删除该条评论吗?')">删除</a> 
                                        <?php } else { ?>
                                        <a class="J_PostCmtReply">回复</a> 
                                      <?php } ?>
                                    </p>
                                    
            								
            													</li>
																								
<?php }?>
<?php } ?>														
											
							</ul>
			<div class="pagin inlineblock clearfix" align="right">
			<?php echo $pageinfo;?>
				</div>
              <div class="forum-editor clearfix">
			<form class="form-cmt" id="J_PostCmtArea" method="post" action="" enctype="multipart/form-data">
				<input type="hidden" value="1"/>
				<input type="hidden" name="topicid" value="<?php echo $content['topicid'];?>" />
				<ul class="pos-r clearfix">
					<li class="g-daren"> <?php echo $_CO['username'];?></li><br />
    				<li id="J_PostCmtSegment" class="post-reply"></li>
    				<li class="clearfix mb10"><textarea class="b-textarea" id="J_ForumPostCon" name="content" placeholder="说两句~~"></textarea></li>
    				<li class="clearfix"><input type="submit" class="btnSubmit" id="J_ForumPostEditBtn" value="回复"/></li>
				</ul>
			</form>
            
            <div class="tuntron-editor-mediaViewWrap clearfix" style="display:none"></div>
			    		</div>
		</div>
	</div>
	<div class="forum-sidebar">
   		<div class="box box-shadow">
			<div class="hd_forum">
				<h3>专题讨论</h3>
			</div>
			<div class="bd_forum user-member forum-latest">
				<div style="margin-top:10px;">
					<a href="http://www.tuntron.com" target="_blank">
						<img src="<?php echo PUBURL;?>images/8_1_2380335361047.jpg" width="210" height="100" alt="橙创家校通，您身边的教育助手！" title="橙创家校通，您身边的教育助手！">
					
					<div class="mt5 wbbw" align="center">
						橙创家校通，您身边的教育助手
					</div>
                    </a>
				</div>
                
			</div>
		</div>
		<div class="box box-shadow">
			<div class="hd_forum">
				<h3>最新讨论</h3>
			</div>
			<div class="bd_forum user-member forum-latest">
				<ul>
                
                		<?php if(is_array($arr_new_topic)) { ?>
<?php foreach((array)$arr_new_topic as $key=>$item) {?>
										<li class="last">
			<a class="img" href="<?php echo SITEURL;?>?mod=group&do=group&c=topic&topicid=<?php echo $item['topicid'];?>" title="<?php echo $item['user'][realname];?>"><img src="<?php echo PUBURL;?><?php echo $item['user'][face];?>" width="40px" height="40px"></a>
						<a href="<?php echo SITEURL;?>?mod=group&do=group&c=topic&topicid=<?php echo $item['topicid'];?>" class="ofh wordbreak" title="<?php echo $item['title'];?>"><?php echo $item['title'];?></a>
						<span><?php echo $item['count_comment'];?>条回复</span>
					</li>
	
				<?php }?>
<?php } ?>							
									</ul>
			</div>
		</div>
        
        
			</div>
</div>
        
        </div>
    
</div>

<?php include pTemplate("footer");?>
 <script src="<?php echo PUBURL;?>js/jquery.upload-1.0.js"></script>
<script src="<?php echo PUBURL;?>js/tuntron-editor-min.js" type="text/javascript"></script>

 <script>
	$.tuntron.editor = $.tuntron.Editor({
		formId:"J_PostCmtArea",
		btnFontSize:{
			visible:12
		}
	});
	$.tuntron.editor.mediaImgList = <?php echo G_class('image_file')->get_mediaImgList($content['content'].$allcomment)?>;
						$.tuntron.editor.mediaVideoList = null;
</script>
<script src="<?php echo PUBURL;?>js/ShowContent.js" type="text/javascript"></script>

</body>
</html>