비교해서 넣어서 첨부파일 확장자별 이미지 표시 해볼것
비교해서 넣어서 첨부파일 확장자별 이미지 표시 해볼것
<?php
for ($j=0; $j<count($file)-1; $j++) {
echo "<tr><td style='border-bottom:0px solid #ddd;border-top:0px solid #ff6600;padding:3px 3px;'>";
$tempdata = sql_fetch(" select substring_index(bf_source, '.', -1) ext from $g5[board_file_table] where bo_table = '". $bo_table. "' and wr_id = '". $list[$i][wr_id] ."' order by bf_no ");
$tempdata = sql_fetch(" select substring_index(bf_source, '.', -1) ext from $g5[board_file_table] where bo_table = '". $bo_table. "' and wr_id = '". $list[$i][wr_id] ."' and bf_no='{$j}' order by bf_no ");
echo '<img src="'. $board_skin_url .'/filetype/'. $tempdata['ext'].'.gif"> ';
echo '<a href="'.$file[$j][href].'">'.$file[$j][source].' ('.$file[$j][size].')</a><br></td></tr>';
}
?>