<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 

if (!defined('LAH_BASIC_BTN')) {
	define('LAH_BASIC_BTN', true);
	echo '<link rel="stylesheet" href="'.$latest_head_url.'/latest.head.css">'."\n";
}

?>

<div class="lah-basic-btn<?php echo $opt['head']; ?>">
	<?php if($opt['tab_cnt'] > 1) { ?>
		<div class="lh-btn-box">
		<?php
			for ($i=0; $i < $opt['tab_cnt']; $i++) {

				$p = ($i - 1 < 0) ? $opt['tab_cnt'] - 1 : $i - 1;
				$n = ($i + 1 == $opt['tab_cnt']) ? 0 : $i + 1;
				$v = ($i == 0) ? '' : ' style="display:none;"';

				//Prev Btn
				list($list_effect, $list_etime) = explode(";", $tab[$p]['list_effect']);
				$prev_btn = " href=\"javascript:amina_latest_btn('".$opt['tab_cnt']."','".$opt['tab_id']."','".$tab[$p]['num']."','".$tab[$p]['query']."','".$list_effect."','".$list_etime."');\"";

				//Next Btn
				list($list_effect, $list_etime) = explode(";", $tab[$n]['list_effect']);
				$next_btn = " href=\"javascript:amina_latest_btn('".$opt['tab_cnt']."','".$opt['tab_id']."','".$tab[$n]['num']."','".$tab[$n]['query']."','".$list_effect."','".$list_etime."');\"";
			?>
				<span id="Btn<?php echo $i;?>_<?php echo $opt['tab_id'];?>" class="lh-btn"<?php echo $v;?>>
					<span class="lh-page"><?php echo $i + 1;?>/<?php echo $opt['tab_cnt'];?></span>
					<a<?php echo $prev_btn;?>><span class="lh-prev"><i class="fa fa-chevron-circle-left"></i></span></a>
					<a<?php echo $next_btn;?>><span class="lh-next"><i class="fa fa-chevron-circle-right"></i></span></a>
				</span>
			<?php } ?>
		</div>
	<?php } ?>
	<div class="lh-title-box">
		<a><span class="lh-title"><?php echo $tab[0]['title']; ?></span></a>
	</div>
	<div class="clear"></div>
</div>
