<!--{hook thread_list_inc_start.htm}-->

					<?php 
					if($threadlist) { 
						$have_allowtop = 0;
						foreach($threadlist as &$_thread) {
							$_thread['allowtop'] = forum_access_mod($_thread['fid'], $gid, 'allowtop');
							if($_thread['allowtop']) $have_allowtop = 1;
						}
					}
					?>

					<?php if($threadlist) { foreach($threadlist as &$_thread) { 
						$post = post_read($_thread['firstpid']);
								$_message = mb_substr(strip_tags($post['message']), '0', $light_config['thread_summary_word'], 'utf-8')."...";
								$patten="/<[img|IMG].*?src=[\'|\"](.*?(?:[\.gif|\.jpg|\.png]))[\'|\"].*?[\/]?>/";
						?>
					<li class="media thread tap <?php echo $_thread['top_class'];?>"
						data-href="<?php echo url("thread-$_thread[tid]");?>" data-tid="<?php echo $_thread['tid'];?>">
						
						<div class="media-body">
						<div class="subject_body">
							<div class="d-flex justify-content-between">
							<div class="mb-2 small">
								<a <?php if(isset($light_config['user_info_card']) && $light_config['user_info_card']){ ?> data-toggle="popover"  data-trigger="hover" data-html="true" data-content="
								<div class='media'>
									<img class='avatar-4 mr-3' src='<?php echo $_thread['user_avatar_url'];?>'>
									<div class='media-body'>
									  <h5><?php echo $_thread['username'];?></h5>
									  <span class='badge badge-primary mr-2'>UID:<?php echo $_thread['user']['uid'];?></span><span class='badge badge-info mr-2'><?php echo $_thread['user']['groupname'];?></span><span class='badge badge-secondary'><?php echo humandate($_thread['user']['login_date']);?></span>
									  <div class='mt-1'><span class='mr-4'><?php echo lang('threads');?>：<?php echo $_thread['user']['threads'];?></span><span><?php echo lang('posts');?>：<?php echo $_thread['user']['posts'];?></span></div>
									</div>
								  </div>
								" <?php } ?> href="<?php echo url("user-$_thread[uid]");?>" tabindex="-1" class="ml-1 mt-1 mr-1">
									<img class="avatar-1" src="<?php echo $_thread['user_avatar_url'];?>">
								</a>
								<!--{hook thread_list_inc_username_before.htm}-->
								<a href="<?php echo url("user-$_thread[uid]");?>" class="username mr-1 text-muted"
									uid="<?php echo $_thread['uid'];?>"><?php echo $_thread['username'];?>
								</a>
								<!--{hook thread_list_inc_username_after.htm}-->
								<!--{hook thread_list_inc_create_time_before.htm}-->
								<span class="date text-grey "><?php echo $_thread['create_date_fmt'];?></span>	
								<!--{hook thread_list_inc_create_time_after.htm}-->
							</div>
							<div>
								<!--{hook thread_list_inc_top_badge_before.htm}-->
								<?php if($_thread['top'] == 3) { ?>
									<span class="badge jb-pink">置顶</span>
								<?php }else if($_thread['top'] == 1){ ?>
									<span class="badge jb-yellow">置顶</span>
									<?php } ?>
									<!--{hook thread_list_inc_top_badge_after.htm}-->
									<?php if($have_allowtop) { ?>
										<?php if($_thread['allowtop']) { ?>
										<input type="checkbox" name="modtid" class="thread_checkbox" value="<?php echo $_thread['tid']; ?>" />
										<?php } ?>
		
										<?php } ?>
							</div>
						</div>
							<div class="d-flex justify-content-between">
							<div>
								
							<div class="subject font-weight-bold break-all mb-2" style="font-size: <?php echo $light_config['thread_subject_size'];?>px;">
								
								<!--{hook thread_list_inc_top_icon_before.htm}-->
								<!-- <?php if($_thread['top'] > 0) { ?>
									<i class="icon-top-<?php echo $_thread['top']; ?> rounded"></i>
								<?php } ?> -->
								<!--{hook thread_list_inc_subject_top_after.htm}-->
				
								<!--{hook thread_list_inc_subject_before.htm}-->
								<a href="<?php echo url("thread-$_thread[tid]");?>"><?php echo $_thread['subject'];?></a>
								<!--{hook thread_list_inc_subject_after.htm}-->
								
							
								<!--{hook thread_list_inc_filetype_icon_before.htm}-->
								<?php if($_thread['files'] > 0) { ?><i class="icon small filetype other"></i><?php } ?>
								<!--{hook thread_list_inc_filetype_icon_after.htm}-->

								<!--{hook thread_list_inc_lock_icon_before.htm}-->
								<?php if($_thread['closed'] > 0) { ?><i class="icon-lock"></i><?php } ?>
								<!--{hook thread_list_inc_lock_icon_after.htm}-->

							</div>
							<?php if($_thread['content_buy'] > 0 && $user['uid'] != 1){ ?>
									<p class="text-warning"><i class="fa fa-coins" aria-hidden="true"></i> <?php echo lang('pay_read');?></p>
								<?php } else  if(strpos($post['message'],'[reply]',0)||strpos($post['message'],'[ttreply]',0)||strpos($post['message'],'[ttlogin]',0) && $user['uid'] != 1){?>
										<p class="text-primary"><i class="fa fa-low-vision" aria-hidden="true"></i> <?php echo lang('no_read');?></p>
									
								<?php } else if($_thread['VIPonly'] > 0 && $user['uid'] != 1){ ?>
									<p class="text-danger"><i class="icon-trophy" aria-hidden="true"></i> <?php echo lang('vip_read');?></p>
									<?php } else if($_thread['OK']=='0' && $user['uid'] != 1) { ?>
										<div class="text-info"
											<i class="fas fa-coffee" aria-hidden="true"></i> 该主题正在由管理员审核中……
											</div>
									<?php } else {?>
									<!--{hook thread_list_brief_before.htm}-->
									
										<?php if($light_config['thread_summary_word']){ ?>
								
												<div class="threadlist_brief text-gray small">
													<a href="<?php echo url("thread-$_thread[tid]");?>" class="text-gray"><?php echo $_message ? $_message : '';?></a>
												</div>
												<?php }?>
										<!--{hook thread_list_brief_after.htm}-->
									<?php } ?>
									<div class="text-muted small mt-2 text-nowrap">
										<!--{hook thread_list_inc_view_before.htm}-->
										<span  data-toggle="tooltip" data-placement="top" title="浏览"><span class="iconfont icon-yanjing" ></span><span > <?php echo convert($_thread['views']);?></span></span>
										<!--{hook thread_list_inc_view_after.htm}-->
	
										<!--{hook thread_list_inc_posts_before.htm}-->
											<a href="<?php echo url("thread-$_thread[tid]");?>#comments" class="ml-2"><span class="text-muted" data-toggle="tooltip" data-placement="top" title="评论"><span class="iconfont  icon-xiaoxi" ></span><span> <?php echo convert($_thread['posts']);?></span></span></a>
										
										<!--{hook thread_list_inc_posts_after.htm}-->
									</div>
										
									
								</div>
								<?php if (isset($light_config['thread_summary']) && $light_config['thread_summary'] == 1) { ?>
								<div class="ml-2 left_img_box">
									<?php
										if (preg_match($patten, $post['message'], $arr)) {
												if (!empty($arr[1])) {
											 echo '<a href="'.url("thread-$_thread[tid]").'"><img src="'. $arr[1] .'" class="d-block subject_body_img rounded" style="min-width:100px;" alt="点击查看详情" onerror="this.src=\'plugin/zaesky_theme_xiunoo/view/img/errpic.png\'" /></a>';
												}
										}
									?>
								</div>
								<?php } ?>
								</div>
							
						</div>
						</div>
					</li>
					<?php }} else { ?>
					<!-- <li>
						<div><?php echo lang('none');?></div>
					</li> -->
					<div class="row justify-content-center">
						<div class="col-6">
							<div class="text-center my-5" style="color:gainsboro"><i class="fa fa-bug display-1"></i><br /><?php echo lang('none');?></div>
						</div>
					</div>
					<?php } ?>
					<!--{hook thread_list_inc_end.htm}-->
