첨부파일 목록을 가로로 표시하고싶습니다만.. 정보
첨부파일 목록을 가로로 표시하고싶습니다만..
본문
http://www.hey-man.net/@/bbs/board.php?bo_table=free&wr_id=8&page=0&page=0
가로로 표시까진 쉽게 했습니다만...
첨부파일이 없을땐 '첨부파일' 부분을 없애거나, 파일 목록뜨는부분에 '파일이 없습니다.' 라는 문구를 쓰고싶은데 잘 안돼네요 ㅠㅠ
혼자 이것저것 해보다가 안돼서 질문글 남깁니다.
도와주세요 고수님들~!! ㅠㅠ
가로로 표시까진 쉽게 했습니다만...
첨부파일이 없을땐 '첨부파일' 부분을 없애거나, 파일 목록뜨는부분에 '파일이 없습니다.' 라는 문구를 쓰고싶은데 잘 안돼네요 ㅠㅠ
혼자 이것저것 해보다가 안돼서 질문글 남깁니다.
도와주세요 고수님들~!! ㅠㅠ
댓글 전체

<?
// 이미지가 아닌 것
$sql = " select bf_file from $g4[board_file_table] where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' and bf_file != '' and bf_type not in (1,2,3) ";
$viewFile = sql_fetch($sql);
if ($viewFile['bf_file']) { ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr height="25">
<?
// 가변 파일
$cnt = 0;
for ($i=0; $i<count($view[file]); $i++) {
if ($view[file][$i][source] && !$view[file][$i][view]) {
$cnt++;
?>
<td><a href="javascript:file_download('<?=$view['file'][$i]['href']?>', '<?=$view['file'][$i]['source']?>');" title="<?=$view['file'][$i]['content']?>"><?=$view['file'][$i]['source']?></a></td>
<? }} ?>
</tr>
</table>
<? } else { ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>첨부파일이 없습니다.</td>
</tr>
</table>
<? } ?>
// 이미지가 아닌 것
$sql = " select bf_file from $g4[board_file_table] where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' and bf_file != '' and bf_type not in (1,2,3) ";
$viewFile = sql_fetch($sql);
if ($viewFile['bf_file']) { ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr height="25">
<?
// 가변 파일
$cnt = 0;
for ($i=0; $i<count($view[file]); $i++) {
if ($view[file][$i][source] && !$view[file][$i][view]) {
$cnt++;
?>
<td><a href="javascript:file_download('<?=$view['file'][$i]['href']?>', '<?=$view['file'][$i]['source']?>');" title="<?=$view['file'][$i]['content']?>"><?=$view['file'][$i]['source']?></a></td>
<? }} ?>
</tr>
</table>
<? } else { ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>첨부파일이 없습니다.</td>
</tr>
</table>
<? } ?>

감사합니다. 정말 잘 되요!
그누.. 더 공부해야겠어요. ㅎㅎ
그누.. 더 공부해야겠어요. ㅎㅎ