아래의 소스를 뷰페이지에서 4번 나오도록 사용하려고 합니다. 라이트페이지에서 4개를 만들고 뷰페이지에서 따로따로 나오게 하려고요.
본문
아래의 소스를 뷰페이지에서 4번 나오도록 사용하려고 합니다.
라이트페이지에서 4개를 만들고 뷰페이지에서 따로따로 나오게 하려고요.
감사합니다.
====================================
<div class="bo_all">
<div class="bo_img">
<div class="swiper-container1" style="overflow:hidden; position:relative; ">
<div class="swiper-wrapper">
<?php
$sqlb = " select bf_file from {$g5['board_file_table']} where bo_table = '$bo_table' and wr_id = '".$wr_id."' ";
$rsb =sql_query($sqlb);
$tfarray_filea = array();
while($rowb = sql_fetch_array($rsb)){
if($rowb['bf_file']){
$tfarray_file = thumbnail($rowb['bf_file'], G5_DATA_PATH.'/file/'.$bo_table, G5_DATA_PATH.'/file/'.$bo_table, 720, 525, true, true);
if($tfarray_file){
$tfarray_filea[] = thumbnail($rowb['bf_file'], G5_DATA_PATH.'/file/'.$bo_table, G5_DATA_PATH.'/file/'.$bo_table, 100, 70, true, true);
?>
<div class="swiper-slide"><img src="<?php echo G5_URL; ?>/data/file/<?php echo $bo_table.'/'.$tfarray_file?>" border=0 alt="<?php echo $trow['wr_subject']?>" ></div>
<?php }
}
}
unset($tfarray);
?>
</div>
<div class="swiper-button-next1" style="display:none; background-image:url('/html/image/visual_prev_on.png');left:20px;right:auto; "></div>
<div class="swiper-button-prev1" style="display:none; background-image:url('/html/image/visual_prev_on.png');left:20px;right:auto; "></div>
</div>
<div class="swiper-container gallery-thumbs" >
<div class="swiper-wrapper">
<?php foreach($tfarray_filea as $k => $v){?>
<div class="swiper-slide"><img src="<?php echo G5_URL; ?>/data/file/<?php echo $bo_table.'/'.$v?>" border=0></div>
<?php }?>
</div>
</div>
<script>
var galleryThumbs = new Swiper('.gallery-thumbs', {
spaceBetween: 10,
slidesPerView: 6,
loop: <?php if(count($tfarray_filea) < 6) echo "false"; else echo "true";?>,
autoHeight: true,
calculateHeight:true,
freeMode: true,
loopedSlides: 6, //looped slides should be the same
watchSlidesVisibility: true,
watchSlidesProgress: true,
speed: 1000,
autoplay: {
delay: 5000,
disableOnInteraction: false
}
});
var swiper = new Swiper('.swiper-container1', {
direction: 'horizontal',
effect : 'slide',
slidesPerView: 1,
spaceBetween: 0,
autoHeight : true,
loop: true,
loopedSlides: 6, //looped slides should be the same
speed: 1000,
autoplay: {
delay: 5000,
disableOnInteraction: false
},
pagination: {
el: '.swiper-pagination1',
clickable: true,
},
navigation: {
nextEl: '.swiper-button-next1',
prevEl: '.swiper-button-prev1',
},
thumbs: {
swiper: galleryThumbs
}
});
$( ".swiper-container1" ).mouseover(function(){
$(".swiper-button-next1").show();
$(".swiper-button-prev1").show();
});
$( ".swiper-container1" ).mouseleave(function(){
$(".swiper-button-next1").hide();
$(".swiper-button-prev1").hide();
});
</script>
</div>
<div class="bo_info">
<header>
<h2 id="bo_v_title" style="border-bottom:1px solid #000; margin-bottom:20px;">
<?php if ($category_name) { ?>
<span class="bo_v_cate"><?php echo $view['ca_name']; // 분류 출력 끝 ?></span>
<?php } ?>
<span class="bo_v_tit">
<?php
echo cut_str(get_text($view['wr_subject']), 70); // 글제목 출력
?></span>
</h2>
</header>
<table class="tb1">
<?php for($i=1; $i<=7; $i++){
if(trim($view["wr_".$i])){
$opp = explode(":",$view["wr_".$i]);
?>
<tr>
<th><?php echo $opp[0]?></th>
<td><?php echo $opp[1]?></td>
</tr>
<?php }
}?>
</table>
<section id="bo_v_info" style="display:none;">
<h2>페이지 정보</h2>
<span class="sound_only">작성자</span> <strong><?php echo $view['name'] ?><?php if ($is_ip_view) { echo " ($ip)"; } ?></strong>
<span class="sound_only">댓글</span><strong><a href="#bo_vc"> <i class="fa fa-commenting-o" aria-hidden="true"></i> <?php echo number_format($view['wr_comment']) ?>건</a></strong>
<span class="sound_only">조회</span><strong><i class="fa fa-eye" aria-hidden="true"></i> <?php echo number_format($view['wr_hit']) ?>회</strong>
<strong class="if_date"><span class="sound_only">작성일</span><i class="fa fa-clock-o" aria-hidden="true"></i> <?php echo date("y-m-d H:i", strtotime($view['wr_datetime'])) ?></strong>
</section>
<br>
<a href="<?php echo $list_href ?>" class="btn_b011 btn list_btn"><i class="fa fa-list" aria-hidden="true"></i> 목록으로</a>
</div>
</div>
========================