<?php
	
if (isset($haya_post_like_config['thread_like_position'])
	&& $haya_post_like_config['thread_like_position'] == 2
) {

	if (isset($haya_post_like_config['open_thread'])
		&& $haya_post_like_config['open_thread'] == 1
	) {
	?>
		<?php $haya_post_like_thread_check = haya_post_like_find_by_uid_and_pid($uid, $first['pid']); ?>

		<div class="haya-post-like px-2">
			<span class="btn-group" role="group">
				<?php if (!empty($uid)) { ?>
					<?php if($haya_post_like_thread_check){ ?>
						<span class="btn001 js-haya-post-like-thread-del" data-pid="<?php echo $first['pid'];?>" title="<?php echo $haya_post_like_is_delete ? lang('haya_post_like_unlike') : lang('haya_post_like_has_like'); ?>">
							<i class="icon iconfont icon-xihuan yzyz" aria-label="<?php echo $haya_post_like_is_delete ? lang('haya_post_like_unlike') : lang('haya_post_like_has_like'); ?>"></i>
							
						</span>
					<?php } else { ?>
						<span class="btn001 js-haya-post-like-thread-add" data-pid="<?php echo $first['pid'];?>" title="点赞本帖">
							<i class="icon iconfont icon-xihuan1 wzwz" aria-label="<?php echo lang('haya_post_like_like_thread'); ?>"></i>
							
						</span>
					<?php } ?>	
				<?php } else { ?>
					<span class="btn001 js-haya-post-like-thread-tip" data-pid="<?php echo $first['pid'];?>" title="点赞本帖">
						
						<i class="icon iconfont icon-xihuan1 wzwz"></i>
						
					</span>
				<?php } ?>

				<span class="btn001" title="<?php echo lang('haya_post_like_like_count'); ?>" data-tid="<?php echo $tid;?>">
					<span class="haya-post-like-thread-user-count"><?php echo intval($first['likes']); ?></span>
				</span>
			</span>
		</div>
	<?php } ?>

<?php } ?>
