경로 및 파일명 수정
This commit is contained in:
@ -280,9 +280,7 @@ function get_file($bo_table, $wr_id)
|
||||
$file[$no]['download'] = $row['bf_download'];
|
||||
// 4.00.11 - 파일 path 추가
|
||||
$file[$no]['path'] = G4_DATA_URL.'/file/'.$bo_table;
|
||||
//$file[$no]['size'] = get_filesize("{$file[$no]['path']}/$row['bf_file']");
|
||||
$file[$no]['size'] = get_filesize($row['bf_filesize']);
|
||||
//$file[$no]['datetime'] = date("Y-m-d H:i:s", @filemtime("$g4['path']/data/file/$bo_table/$row['bf_file']"));
|
||||
$file[$no]['datetime'] = $row['bf_datetime'];
|
||||
$file[$no]['source'] = addslashes($row['bf_source']);
|
||||
$file[$no]['bf_content'] = $row['bf_content'];
|
||||
@ -290,8 +288,6 @@ function get_file($bo_table, $wr_id)
|
||||
//$file[$no]['view'] = view_file_link($row['bf_file'], $file[$no]['content']);
|
||||
$file[$no]['view'] = view_file_link($row['bf_file'], $row['bf_width'], $row['bf_height'], $file[$no]['content']);
|
||||
$file[$no]['file'] = $row['bf_file'];
|
||||
// prosper 님 제안
|
||||
//$file[$no]['imgsize'] = @getimagesize("{$file[$no]['path']}/$row['bf_file']");
|
||||
$file[$no]['image_width'] = $row['bf_width'] ? $row['bf_width'] : 640;
|
||||
$file[$no]['image_height'] = $row['bf_height'] ? $row['bf_height'] : 480;
|
||||
$file[$no]['image_type'] = $row['bf_type'];
|
||||
@ -1055,21 +1051,6 @@ function view_file_link($file, $width, $height, $content='')
|
||||
// 이미지에 속성을 주지 않는 이유는 이미지 클릭시 원본 이미지를 보여주기 위한것임
|
||||
// 게시판설정 이미지보다 크다면 스킨의 자바스크립트에서 이미지를 줄여준다
|
||||
return "<img src='".G4_DATA_URL."/file/{$board['bo_table']}/".urlencode($file)."' onclick='image_window(this);' alt='{$content}'>";
|
||||
/*
|
||||
// 110106 : FLASH XSS 공격으로 인하여 코드 자체를 막음
|
||||
else if (preg_match("/\.($config['cf_flash_extension'])$/i", $file))
|
||||
//return "<embed src='$g4['path']/data/file/$board['bo_table']/$file' $attr></embed>";
|
||||
return "<script>doc_write(flash_movie('$g4['path']/data/file/$board['bo_table']/$file', '_g4_{$ids}', '$width', '$height', 'transparent'));</script>";
|
||||
*/
|
||||
//=============================================================================================
|
||||
// 동영상 파일에 악성코드를 심는 경우를 방지하기 위해 경로를 노출하지 않음
|
||||
//---------------------------------------------------------------------------------------------
|
||||
/*
|
||||
else if (preg_match("/\.($config['cf_movie_extension'])$/i", $file))
|
||||
//return "<embed src='$g4['path']/data/file/$board['bo_table']/$file' $attr></embed>";
|
||||
return "<script>doc_write(obj_movie('$g4['path']/data/file/$board['bo_table']/$file', '_g4_{$ids}', '$width', '$height'));</script>";
|
||||
*/
|
||||
//=============================================================================================
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user