view화면 첨부파일 다운이 안돼요!

· 2011-06-29 (수) 10:58:05 · 1743 · 2
err.jpg
err2.jpg
파일첨부는 정삭적으로 되고 있는데 정작 뷰화면에서

하단에 페이지에오류가있습니다 이런 메세지만 뜨고 다운이안됩니다! (첨부이미지 확인)

나름 고쳐본다고 이래저래 수정도 해보고 테스트 해봤는데 요지부동입니다 ㅠㅠㅠ

글 수정 눌러서 파일첨부된 링크를 누르면 정상다운이 되고 오직!!!!! 뷰화면에서 다운이 안됩니다!
(첨부 이미지 2번째 참고, 수정에서는 정상적으로 다운이 되고 있슴돠...)

경로가 잘못되서 링크가 안걸린거 같은데 어딜 고쳐야 할지 감이 안오네요 ㅠㅠ
정상적으로 다운이 될 수 있도록 도와주세요!



아래는 view.skin.php파일입니다~ ===================================================

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

<!-- 원글 내용 -->
<style>
.tt {font-size:9pt; COLOR: #575757;}
</style>

<table width="<?=$width?>" align="center" cellpadding="0" cellspcing="0"><tr><td>

<!-- 링크 버튼 -->
<?
ob_start();
?>
<table width='100%' cellpadding=0 cellspacing=0>
<tr>
<td width=75% height=35>
<? if ($search_href) { echo "<a href=\"$search_href\">검색목록</a> "; } ?>
<? echo "<a href=\"$list_href\">목록</a> "; ?>
<? if ($write_href) { echo "<a href=\"$write_href\">글쓰기</a> "; } ?>
<? if ($reply_href) { echo "<a href=\"$reply_href\">답글</a> "; } ?>
<? if ($update_href) { echo "<a href=\"$update_href\">수정</a> "; } ?>
<? if ($delete_href) { echo "<a href=\"$delete_href\">삭제</a> "; } ?>
<? if ($good_href) { echo "<a href=\"$good_href\" target='hiddenframe'>추천</a> "; } ?>
<? if ($nogood_href) { echo "<a href=\"$nogood_href\" target='hiddenframe'>비추천</a> "; } ?>
<? if ($scrap_href) { echo "<a href=\"javascript:;\" onclick=\"win_scrap('./scrap_popin.php?bo_table=$bo_table&wr_id=$wr_id');\">스크랩</a> "; } ?>
<? if ($copy_href) { echo "<a href=\"$copy_href\">복사</a> "; } ?>
<? if ($move_href) { echo "<a href=\"$move_href\">이동</a> "; } ?>
</td> <td width=25% align=right>
<? if ($prev_href) { echo "<a href=\"$prev_href\" title=\"$prev_wr_subject\"><img src='$board_skin_path/img/btn_prev.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($next_href) { echo "<a href=\"$next_href\" title=\"$next_wr_subject\"><img src='$board_skin_path/img/btn_next.gif' border='0' align='absmiddle'></a> "; } ?>
</td>
</tr>
</table>

<?
$link_buttons = ob_get_contents();
ob_end_flush();
?>

<table width='100%' border=0 cellpadding=0 cellspacing=0>
<tr>
<td colspan=2 height=2 background='<?=$board_skin_path?>/img/line_bg1.gif'></td>
</tr>
<tr align=left height=23>
<td height=23 colspan="2" background='<?=$board_skin_path?>/img/line_bg2.gif'>  <font color="#6633FF"><b>작성자</b></font>
:
<?=$view[name]?>
 
<? if ($is_admin == "super") { ?>
<? if ($is_ip_view) { echo " ($ip)"; } ?>
<? } ?>
 <font color="6633FF">조회</font> :
<?=$view[wr_hit]?>
  
<? if ($is_good) echo "<font color='#cf4900'>추천</font> : $view[wr_good] ";?>
  
<? if ($is_nogood) echo "<font color='#cf4900'>비추천</font> : $view[wr_nogood] ";?></font>
</td>
</tr>
<tr>
<td colspan=2 height=1 bgcolor=#C3BEB2></td>
</tr>
<tr>
<td height=28>  <font color=6633FF><b>지출일</b></font> :
<? if ($is_category) { echo ($category_name ? "$view[ca_name]" : ""); } ?>
 
<?=$write[wr_1]?>
월 
<?=$write[wr_2]?>
일</td>
<td height=28> </td>
</tr>
<tr>
<td colspan=2 height=1 bgcolor=#C3BEB2></td>
</tr>
<tr>
<td width="42%" height=28>  <font color=6633FF><b>거래처</b></font>
:
<?=$view[subject]?>
</td>
<td width="44%"> </td>
</tr>
<tr>
<td colspan=2 height=1 bgcolor=#C3BEB2></td>
</tr>
<tr>
<td height=28>  <font color=#CC0033><b>지출내역</b></font> :
<?=$view[wr_5];?>
</td>
<td height=28>  <font color=#0033CC><b>수입내역</b></font> :
<?=$view[wr_6];?>
</td>
</tr>
<tr>
<td colspan=2 height=1 bgcolor=#D4CFC3></td>
</tr>
<tr>
<td height=28>  <font color=CC0033><b>지출액</b></font> :
<?=number_format($write[wr_4])?>
원</td>
<td height=28>  <font color=0033CC><b>수입액</b></font> :
<?=number_format($write[wr_3])?>
원</td>
</tr>
<tr>
<td colspan=2 height=1 bgcolor=#C3BEB2></td>
</tr>
<tr>
<td colspan=2 height=10>
<? // 가변 파일
$cnt = 0;
for ($i=0; $i<count($view[file]); $i++) {
if ($view[file][$i][source] && !$view[file][$i][view]) {
$cnt++;
echo "<tr><td height=30 background=\"$board_skin_path/img/view_dot.gif\">";
echo "  <img src='{$board_skin_path}/img/icon_file.gif' align=absmiddle>";
echo "<a href=\"javascript:file_download('{$view[file][$i][href]}', '{$view[file][$i][source]}');\" title='{$view[file][$i][content]}'>";
echo " <span style=\"color:#888;\">{$view[file][$i][source]} ({$view[file][$i][size]})</span>";
echo " <span style=\"color:#ff6600; font-size:11px;\">[{$view[file][$i][download]}]</span>";
echo "</a></td></tr>";
}
}
?>
</td>
</tr>
<tr>
<td colspan=2 height=1 bgcolor=#C3BEB2></td>
</tr>
<tr>
<td colspan=2> <table width=100% cellpadding=5>
<tr>
<td style='word-break:break-all;' class='lh' height=20>
<?
// 파일 출력
for ($i=0; $i<=count($view[file]); $i++) {
if ($view[file][$i][view])
echo $view[file][$i][view] . "<p>";
}
?>
<!-- 내용 출력 -->
<span class=content id=Content[content0]>
<?=$view[content];?>
</span>
<?//echo $view[rich_content]; // {이미지:0} 과 같은 코드를 사용할 경우?>
<!-- 테러 태그 방지용 --></xml></xmp>
<a href=""></a><a href=''></a> </td>
</tr>
<?
// 링크 설정한 값만큼 출력
for ($i=1; $i<=$cfg[link_count]; $i++) {
if ($link[$i][link]) { echo "<tr><td class=tt> <img src='$board_skin/img/icon_link.gif' align='absmiddle'> <a href='{$link[$i][href]}' target='$default[de_link_target]'><span class=tt>{$link[$i][link]}</span></a>, Hit:{$link[$i][hit]}</td></tr>"; }
}
?>
<?
// 파일 업로드 설정한 값만큼 출력
for ($i=1; $i<=$cfg[file_count]; $i++) {
if ($file[$i][source]) { echo "<tr><td class=tt> <img src='$board_skin/img/icon_download.gif' align='absmiddle'> <a href='{$file[$i][href]}'><span class=tt>{$file[$i][source]} ({$file[$i][size]})</span></a>, Down:{$file[$i][download]}</td></tr>"; }
}
?>
<? if ($is_signature) { echo "<tr><td>$signature</td></tr>"; } // 서명 출력 ?>
</table></td>
</tr>
</table>

<?
include_once("./view_comment.php");
?>

<?=$link_buttons?>

</td></tr></table>
<br>
<br>

<script language="JavaScript">
// HTML 로 넘어온 <img ... > 태그의 폭이 테이블폭보다 크다면 테이블폭을 적용한다.
function resize_image()
{
var target = document.getElementsByName('target_resize_image[]');
var image_width = parseInt('<?=$board[bo_image_width]?>');
var image_height = 0;

for(i=0; i<target.length; i++) {
// 원래 사이즈를 저장해 놓는다
target[i].tmp_width = target[i].width;
target[i].tmp_height = target[i].height;
// 이미지 폭이 테이블 폭보다 크다면 테이블폭에 맞춘다
if(target[i].width > image_width) {
image_height = parseFloat(target[i].width / target[i].height)
target[i].width = image_width;
target[i].height = parseInt(image_width / image_height);
}
}
}

window.onload = resize_image;
</script>

첨부파일

err.jpg (16.3 KB)
2회 2011-06-29 13:07
err2.jpg (6.8 KB)
0회 2011-06-29 13:09
|

댓글 2개

view.skin.php 파일출력부분


// 가변 파일
$cnt = 0;
for ($i=0; $i<count($view[file]); $i++) {
if ($view[file][$i][source] && !$view[file][$i][view]) {
$cnt++;
echo "<tr><td height=30 background=\"$board_skin_path/img/view_dot.gif\">";
echo "  <img src='{$board_skin_path}/img/icon_file.gif' align=absmiddle border='0'>";
echo "<a href=\"javascript:file_download('{$view[file][$i][href]}', '{$view[file][$i][source]}');\" title='{$view[file][$i][content]}'>";
echo " <span style=\"color:#888;\">{$view[file][$i][source]} ({$view[file][$i][size]})</span>";
echo " <span style=\"color:#ff6600; font-size:11px;\">[{$view[file][$i][download]}]</span>";
echo " <span style=\"color:#d3d3d3; font-size:11px;\">DATE : {$view[file][$i][datetime]}</span>";
echo "</a></td></tr>";
}
}


이미지도 파일리스트에 출력 하실려면
&& !$view[file][$i][view] 제거..

// 가변 파일
$cnt = 0;
for ($i=0; $i<count($view[file]); $i++) {
if ($view[file][$i][source]) {
$cnt++;
echo "<tr><td height=30 background=\"$board_skin_path/img/view_dot.gif\">";
echo "  <img src='{$board_skin_path}/img/icon_file.gif' align=absmiddle border='0'>";
echo "<a href=\"javascript:file_download('{$view[file][$i][href]}', '{$view[file][$i][source]}');\" title='{$view[file][$i][content]}'>";
echo " <span style=\"color:#888;\">{$view[file][$i][source]} ({$view[file][$i][size]})</span>";
echo " <span style=\"color:#ff6600; font-size:11px;\">[{$view[file][$i][download]}]</span>";
echo " <span style=\"color:#d3d3d3; font-size:11px;\">DATE : {$view[file][$i][datetime]}</span>";
echo "</a></td></tr>";
}
}
2011-06-29 (수) 13:06:13
알려주신 소스 적용해도 역시나 마찬가지로 다운이 안됩니다 ㅠㅠㅠ
모가 문제인지 모르겠네요 ㅠㅠ
다운파일도 다 잘나오는디 왜 눌러도 반응이 없는지 ㅠㅠ
=============================================================
하단의 스크립트 소스가 제대로 되지 않아 오류가 났었네요!!
답변 주신 neue님 감사해요! ㅎㅎㅎ
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

66,531건

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
11-06-29 조회 1,263
11-06-29 조회 1,037
11-06-29 조회 914
11-06-29 조회 951
11-06-29 조회 937
11-06-29 조회 1,744
11-06-29 조회 1,041
11-06-29 조회 1,898
11-06-29 조회 1,599
11-06-29 조회 2,861
11-06-29 조회 1,071
11-06-29 조회 1,860
11-06-29 조회 1,060
11-06-29 조회 1,591
11-06-29 조회 1,603
11-06-28 조회 895
11-06-28 조회 1,024
11-06-28 조회 1,832
11-06-28 조회 1,641
11-06-28 조회 1,251