첨부파일 이미지 새창 띄우는 방법 좀 알려주세요ㅜㅜ 정보
첨부파일 이미지 새창 띄우는 방법 좀 알려주세요ㅜㅜ본문
오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.
오류 주소 :
// 파일 출력
$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>";
}
파일첨부부 부분은 이부분인 것 같은데~~ 클릭하면 원본크기로 새창에 띄우고 싶습니다ㅜㅜ
어떻게 해야할까요~?
오류 주소 :
// 파일 출력
$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>";
}
파일첨부부 부분은 이부분인 것 같은데~~ 클릭하면 원본크기로 새창에 띄우고 싶습니다ㅜㅜ
어떻게 해야할까요~?
댓글 전체
http://sir.co.kr/bbs/board.php?bo_table=g4_tiptech&wr_id=32804#c_32895
여기 링크 들어가보세요 전에 써둔건데 이렇게 하면 될 거에요
여기 링크 들어가보세요 전에 써둔건데 이렇게 하면 될 거에요
답변 감사해요ㅜㅜ 그런데 해봤는데 안되네요ㅜㅜㅜㅜㅜ
<td width="140" height="140" bgcolor="#FFFFFF"><div align="center"><?=$thumimg[1]?></div></td>
<td width="5"> </td>
<td width="140" bgcolor="#FFFFFF"><div align="center"><?=$thumimg[2]?></div></td>
<td width="5"> </td>
<td width="140" bgcolor="#FFFFFF"><div align="center"><?=$thumimg[3]?></div></td>
<td width="5"> </td>
<td width="140" bgcolor="#FFFFFF"><div align="center"><?=$thumimg[4]?></div></td>
<td width="5"> </td>
<td width="140" bgcolor="#FFFFFF"><div align="center"><?=$thumimg[5]?></div></td>
확인해보니 이쪽이 첨부파일이 뜨는 부분인것 같아요ㅜㅜ 글 수정이 안되어~~ 댓글로 씁니다!^^
<td width="5"> </td>
<td width="140" bgcolor="#FFFFFF"><div align="center"><?=$thumimg[2]?></div></td>
<td width="5"> </td>
<td width="140" bgcolor="#FFFFFF"><div align="center"><?=$thumimg[3]?></div></td>
<td width="5"> </td>
<td width="140" bgcolor="#FFFFFF"><div align="center"><?=$thumimg[4]?></div></td>
<td width="5"> </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>
// 파일 출력
$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>
너무너무 감사해요! 덕분에 며칠 고생하던거 바로 해결됐어요ㅜㅜ
시간내 주셔서 너무 감사해요ㅜㅜㅜ
시간내 주셔서 너무 감사해요ㅜㅜㅜ