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

$thumb_width = 1200;
$thumb_height = 600;
?>

    <?php
    for ($i=0; $i<count($list); $i++) {
    $thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $thumb_width, $thumb_height, false, true);

    if($thumb['src']) {
        $img = $thumb['src'];
    } else {
        $img = G5_IMG_URL.'/no_img.png';
        $thumb['alt'] = '이미지가 없습니다.';
    }
    $img_content = '<img class="d-block w-100" src="'.$img.'" alt="'.$thumb['alt'].'" >';
    ?>
        <div class="carousel-item <?php if($i==0) echo 'active';?>">
            <?php echo $img_content; ?>
            <div class="carousel-caption d-none d-md-block">
              <h5><?php echo $list[$i]['subject'];?></h5>
              <p><?php echo cut_str($list[$i]['wr_content'],46,'...'); ?></p>
          </div>
        </div>
    <?php }  ?>
