첨부파일 이미지 새창 띄우는 방법 좀 알려주세요ㅜㅜ > 그누4 질문답변

매출이 오르면 내리는 수수료! 지금 수수료센터에서 전자결제(PG)수수료 비교견적 신청해 보세요!

그누4 질문답변

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

첨부파일 이미지 새창 띄우는 방법 좀 알려주세요ㅜㅜ 정보

첨부파일 이미지 새창 띄우는 방법 좀 알려주세요ㅜㅜ

본문

오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.

오류 주소 :


// 파일 출력
$sql = "select * from $g4[board_file_table] where `bo_table`='$bo_table' and `wr_id`='$wr_id'";
$result=mysql_query($sql);

for($i=0 ; $row = mysql_fetch_array($result) ; $i++){
//echo "<img src =$g4[path]/data/file/$bo_table/$row[bf_file] width=350 height=250 border=0 $style>";
$thumimg2[$i]="<img src =$g4[path]/data/file/$bo_table/$row[bf_file] width=350 height=250 border=0>";
$thumimg[$i]="<img src =$g4[path]/data/file/$bo_table/$row[bf_file] width=140 height=140 border=0>";

}



파일첨부부 부분은 이부분인 것 같은데~~ 클릭하면 원본크기로 새창에 띄우고 싶습니다ㅜㅜ

어떻게 해야할까요~?

댓글 전체

<td width="140" height="140" bgcolor="#FFFFFF"><div align="center"><?=$thumimg[1]?></div></td>
        <td width="5">&nbsp;</td>
        <td width="140" bgcolor="#FFFFFF"><div align="center"><?=$thumimg[2]?></div></td>
        <td width="5">&nbsp;</td>
        <td width="140" bgcolor="#FFFFFF"><div align="center"><?=$thumimg[3]?></div></td>
        <td width="5">&nbsp;</td>
        <td width="140" bgcolor="#FFFFFF"><div align="center"><?=$thumimg[4]?></div></td>
        <td width="5">&nbsp;</td>
        <td width="140" bgcolor="#FFFFFF"><div align="center"><?=$thumimg[5]?></div></td>


확인해보니 이쪽이 첨부파일이 뜨는 부분인것 같아요ㅜㅜ 글 수정이 안되어~~ 댓글로 씁니다!^^
<?

// 파일 출력
$sql = "select * from $g4[board_file_table] where `bo_table`='$bo_table' and `wr_id`='$wr_id'";
$result=mysql_query($sql);

for($i=0 ; $row = mysql_fetch_array($result) ; $i++){
$tmp_width = $view[file][$i][image_width];
$tmp_height = $view[file][$i][image_height];

//echo "<img src =$g4[path]/data/file/$bo_table/$row[bf_file] width=350 height=250 border=0 $style>";
$thumimg2[$i]="<img src =$g4[path]/data/file/$bo_table/$row[bf_file] width=350 height=250 border=0 onclick='window.open(this.src,\"origin\",\"width=$tmp_width,height=$tmp_height,resizable=yes,scrollbars=yes\")' style='cursor:pointer;'>";
$thumimg[$i]="<img src =$g4[path]/data/file/$bo_table/$row[bf_file] width=140 height=140 border=0 onclick='window.open(this.src,\"origin\",\"width=$tmp_width,height=$tmp_height,resizable=yes,scrollbars=yes\")' style='cursor:pointer;'>";

}
?>

질문글에 써있는 부분 이렇게 바꿔보세요. 팝업창이 중앙에 오기를 원하시면 아래처럼 해보세요.

<?

// 파일 출력
$sql = "select * from $g4[board_file_table] where `bo_table`='$bo_table' and `wr_id`='$wr_id'";
$result=mysql_query($sql);

for($i=0 ; $row = mysql_fetch_array($result) ; $i++){
$tmp_width = $view[file][$i][image_width];
$tmp_height = $view[file][$i][image_height];

//echo "<img src =$g4[path]/data/file/$bo_table/$row[bf_file] width=350 height=250 border=0 $style>";
//openPopupCenter('팝업경로', '팝업명', '팝업가로사이즈', '팝업세로사이즈', '기타옵션')
$thumimg2[$i]="<a href='javascript:void(0);' onClick=\"openPopupCenter('$g4[path]/data/file/$bo_table/$row[bf_file]', 'origin', '$tmp_width', '$tmp_height', 'resizeable=yes,scrollbars=yes');return false;;\"><img src =$g4[path]/data/file/$bo_table/$row[bf_file] width=350 height=250 border=0></a>";
$thumimg[$i]="<a href='javascript:void(0);' onClick=\"openPopupCenter('$g4[path]/data/file/$bo_table/$row[bf_file]', 'origin', '$tmp_width', '$tmp_height', 'resizeable=yes,scrollbars=yes');return false;\"><img src =$g4[path]/data/file/$bo_table/$row[bf_file] width=140 height=140 border=0></a>";

}
?>
<script>
function openPopupCenter(theURL, winName, width, height, remFeatures) {
 var left = (screen.width/2) - (width/2);
 var top = (screen.availHeight/2) - (height/2);
 var features = "left="+left+",top="+top+",width="+width+",height="+height;
 if (typeof winName == "undefined") winName = "";
 if (typeof remFeatures != "undefined") features += ","+remFeatures;
 if (features.indexOf("status") < 0) features += ",status=yes";
 var popup = window.open(theURL, winName, features);
 popup.focus();
 return popup;
}
</script>
전체 7 |RSS
그누4 질문답변 내용 검색
  • 개별 목록 구성 번호 제목 작성자 작성일 조회
  • 게시물이 없습니다.

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT