view_image.php
본문
보기페이지에서 이미지클릭하면 새창으로 뜨는 건데요,,,
<?php
include_once('./_common.php');
$g5['title'] = '이미지 크게보기';
include_once(G5_PATH.'/head.sub.php');
$filename = preg_replace('/[^A-Za-z0-9 _ .\-\/]/', '', $_GET['fn']);
$extension = pathinfo($filename, PATHINFO_EXTENSION);
if ( ! preg_match('/(jpg|jpeg|png|gif|bmp)$/i', $extension) ){
alert_close('이미지 확장자가 아닙니다.');
}
if(strpos($filename, 'data/editor')) {
$editor_file = strstr($filename, 'editor');
$filepath = G5_DATA_PATH.'/'.$editor_file;
} else if(strpos($filename, 'data/qa')) {
$editor_file = strstr($filename, 'qa');
$filepath = G5_DATA_PATH.'/'.$editor_file;
} else {
$editor_file = '';
$filepath = G5_DATA_PATH.'/file/'.$bo_table.'/'.$filename;
}
if(is_file($filepath)) {
$size = @getimagesize($filepath);
if(empty($size))
alert_close('이미지 파일이 아닙니다.');
$width = $size[0];
$height = $size[1];
if($editor_file)
$fileurl = G5_DATA_URL.'/'.$editor_file;
else
$fileurl = G5_DATA_URL.'/file/'.$bo_table.'/'.$filename;
$img = '<img src="'.$fileurl.'" alt="" width="'.$width.'" height="'.$height.'" id="map" class="draggable" style="position:relative;top:0;left:0;cursor:move;">';
} else {
alert_close('파일이 존재하지 않습니다.');
}
?>
<div>
<?php echo $img ?>
</div>
이 창의 상단에 div 50px를 주고 싶습니다.
그밑에
<div></div>
<div><?php echo $img ?></div>
이렇게 나오게요,,
위에 div에 다운로드 버튼을 넣으려구요,,,
답변 1
<br><br> <--- 이렇게 넣으면 안되나요?
아니면 아래처럼
<div style="margin-top:50px;">다운로드버튼 </div>
<div><?php echo $img ?></div>
그런데 설마 이런 답변을 원하는 것이 맞나요?