<?php
if (!defined("_GNUBOARD_"))
    exit; // 개별 페이지 접근 불가
    /*
     * g4m Basic
     */
$list_count = count($list);
?>     
<div class="g4latest_basic col-sm-6">
    <div class="latest_wrap">
        <h2><a href='<?php echo $g4['g4m_bbs_path'] ?>/board.php?bo_table=<?php echo $bo_table ?>'><?php echo $board['bo_subject'] ?></a></h2>
        <ul>
            <?php for ($i = 0; $i < $list_count; $i++) { ?>
                <li>
                    <?php
                    echo "<a href=\"{$list[$i]['href']}\">";
                    echo $list[$i]['icon_reply'] . " ";     //답글
                    //공지
                    if ($list[$i]['is_notice']) {
                        echo "<span class=\"lt_notice\">{$list[$i]['subject']}</span>";
                    } else {
                        echo "{$list[$i]['subject']}";
                    }

                    //댓글수
                    if ($list[$i]['comment_cnt']) {
                        echo " <span class='list_comment'>{$list[$i]['comment_cnt']}</span>";
                    }

                    // if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
                    // if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }

                    if ($list[$i]['icon_new']) {
                        echo "<span class='icon-leaf'></i>";
                    }
                    if ($list[$i]['icon_file']) {
                        echo "<span class='icon-file'></i>";
                    }
                    if ($list[$i]['icon_link']) {
                        echo "<span class='icon-star'></i>";
                    }
                    if ($list[$i]['icon_hot']) {
                        echo "<span class='glyphicon glyphicon-fire'></i>";
                    }
                    if ($list[$i]['icon_secret']) {
                        echo "<span class='glyphicon glyphicon-lock'></i>";
                    }
                    echo "</a>";
                    ?>
                </li>
            <?php } ?>

            <?php if ($list_count == 0) { ?><li><p style="padding: 48px; text-align: center">게시물이 없습니다.</p></li><?php } ?>
        </ul>
    </div>
</div>