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

$c_w = 7;
$c_h = 7;

 $ss_view_row = 10;  //출력수량
 $hit_subject = "<b>최신 등록글</b>";
 $latest_skin_path = $g4[bbs_path];

/*****검색할 날짜 지정****/
$day_s_ago =  20;  // 검색 시작일
$day_e_ago  = 0;   //검색 종료일
/*****검색할 날짜 지정****/

$day_s = 60*60*24*$day_s_ago;
$day_e = 60*60*24*$day_e_ago;

$start_t = time() - $day_s;
$g4[time_s_ago] = date("Y-m-d H:i:s",$start_t);
$end_t = time() - $day_e;
$g4[time_e_ago] = date("Y-m-d H:i:s",$end_t);

  $ss_mct      = " where bn_datetime between  '$g4[time_s_ago]' AND '$g4[time_e_ago]' ";
  $sql         = " select * from {$g4[site_count]}  $ss_mct order by bn_id desc limit 0, $ss_view_row "; 
  $result    = sql_query($sql);
  $total_count     = mysql_num_rows($result);
?>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
    <td width="<?=$c_w?>" height="<?=$c_h?>"><img src="<?=$latest_skin_path?>/img_count/line_1.gif"></td>
    <td background="<?=$latest_skin_path?>/img_count/line_2.gif"></td>
    <td width="<?=$c_w?>" height="<?=$c_h?>"><img src="<?=$latest_skin_path?>/img_count/line_3.gif" ></td>
</tr>
<tr>
    <td background="<?=$latest_skin_path?>/img_count/line_4.gif"  width="<?=$c_w?>" ></td>
    <td>

<div style="padding:5px; background-color:#ffffff;">
<strong><?=$hit_subject?> [<font color="red"><?=$day_s_ago?>일</font> 이내자료]</strong>
</div>

<table width=100% cellpadding=0 cellspacing=0>

<?
for ($si=1;$list = sql_fetch_array($result);$si++) 
{
    $wr_id        = $list[wr_id];

    $wr_subject   = cut_str($list[wr_subject], 22);
    $list_href   = "$g4[bbs_path]/board.php?bo_table={$list[bo_table]}&wr_id={$wr_id}";
	

	?>
<tr>
    <td colspan=4 align=center>
        <table width=95%>
        <tr>
            <td height=20><img src='<?=$latest_skin_path?>/img_count/hit_<?=$si?>.gif' align=absmiddle> 
            <?
            echo $list[$i]['icon_reply'] . " ";
            echo "<a href='{$list_href}'>";
            if ($list[$i]['is_notice'])
                echo "<font style='font-family:돋움; font-size:9pt; color:#2C88B9;'><strong>{$wr_subject}</strong></font>";
            else
                echo "<font style='font-family:돋움; font-size:9pt; color:#6A6A6A;'>{$wr_subject}</font>";
            echo "</a>";
			echo "(".$list[wr_hit].")"


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

            // echo " " . $list[$i]['icon_new'];
            // echo " " . $list[$i]['icon_file'];
            // echo " " . $list[$i]['icon_link'];
            // echo " " . $list[$i]['icon_hot'];
            // echo " " . $list[$i]['icon_secret'];
            ?></td></tr>
        <tr><td bgcolor=#EBEBEB height=1></td></tr>
        </table></td>
</tr>
<? } ?>

<? if ($total_count == 0) { ?><tr><td colspan=4 align=center height=50><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?>

</table>

    </td>
    <td background="<?=$latest_skin_path?>/img_count/line_5.gif"  width="<?=$c_w?>" ></td>
</tr>
<tr>
    <td  width="<?=$c_w?>" height="<?=$c_h?>"><img src="<?=$latest_skin_path?>/img_count/line_6.gif" ></td>
    <td background="<?=$latest_skin_path?>/img_count/line_7.gif" height="<?=$c_h?>"></td>
    <td  width="<?=$c_w?>" height="<?=$c_h?>"><img src="<?=$latest_skin_path?>/img_count/line_8.gif" ></td>
</tr>
</table>