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

<table align="center" cellpadding="0" cellspacing="0" width="100%">
	<tr>
		<td width="3" background="<?=$latest_skin_path?>/img/latest_t_1.gif"></td>
		<td background="<?=$latest_skin_path?>/img/latest_t_bg.gif">
			<!--타이틀 시작: 실선 색상을 바꾸려면 215, 215, 215를 고치세요.-->				
			<table align="center" cellpadding="0" cellspacing="0" width="100%" border="0">
				<tr height="30">
					<td width="10"></td>
					<td><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><font color="#57697c" ><b><?=$board[bo_subject]?></b></font></a></td>
					<td width="40"><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><img src="<?=$latest_skin_path?>/img/more.gif" border="0"></a>
					<td width="5"></td>
				</tr>
			</table>
			<!--타이틀 끝-->
		</td>
		<td width="3" background="<?=$latest_skin_path?>/img/latest_t_2.gif"></td>
	</tr>
	<tr>
		<td width="3" background="<?=$latest_skin_path?>/img/latest_m_1.gif"></td>
		<td align="center">
		
	<? for ($i=0; $i<count($list); $i++) { ?>

        <?  // View 
	 		 $table = "10";
			 $wr_id = $list[$i]['wr_id'];
			 $href = "$g4[bbs_path]/link.php?bo_table={$table}&wr_id=$wr_id&no=1";
			 sql_query(" update {$g4[write_prefix]}{$table} set wr_3 = wr_3 + 1 where wr_id = '$wr_id' ");              
		echo "<a href='$href' target='_blank'>";
             $image = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
             if (preg_match("/\.(gif|jpg|png)$/i", $image)) { ?>
			<img src='<?=$g4[path]?>/data/file/<?=$bo_table?>/<?=$image?>' width='90' border='0'></a>
		<? } else { ?>
			<img src='<?=$latest_skin_path?>/img/noimage.gif' width='90' border='0'></a>
		<? } ?>

	<? } ?>
			
		</td>
		<td width="3" background="<?=$latest_skin_path?>/img/latest_m_2.gif"></td>
	</tr>
	<tr height="3">
		<td width="3" background="<?=$latest_skin_path?>/img/latest_b_1.gif"></td>
		<td background="<?=$latest_skin_path?>/img/latest_b_bg.gif"></td>
		<td width="3" background="<?=$latest_skin_path?>/img/latest_b_2.gif"></td>
	</tr>
</table>
