$m .= $view[file][$i][content] . "<br/><br/>"; } echo $m; $movie_viewer .= $m; } else { if ($view[file][$i][view]) { if (is_g5()) { $view[file][$i][view] = preg_replace("/<a[^>]+>/i", "", $view[file][$i][view]); $view[file][$i][view] = preg_replace("/<\\/a>/", "", $view[file][$i][view]); } // 원본 강제 리사이징 if ($mw_basic[cf_resize_original]) { if ($view[file][$i][image_width] > $mw_basic[cf_resize_original] || $view[file][$i][image_height] > $mw_basic[cf_resize_original]) { $file = "{$file_path}/{$view[file][$i][file]}"; thumb_log($file, 'resize-original'); mw_make_thumbnail($mw_basic[cf_resize_original], $mw_basic[cf_resize_original], $file, $file, true); if ($mw_basic[cf_watermark_use] && is_mw_file($mw_basic[cf_watermark_path])) { mw_watermark_file($file); } $size = getimagesize($file); $view[file][$i][image_width] = $size[0]; $view[file][$i][image_height] = $size[1]; sql_query("update {$g4['board_file_table']} set bf_width = '{$size['0']}', bf_height = '{$size['1']}',\n bf_filesize = '" . filesize($file) . "'\n where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' and bf_file = '{$view[file][$i][file]}'"); } } // 이미지 크기 조절 if ($board[bo_image_width] < $view[file][$i][image_width]) { $img_width = $board[bo_image_width]; $img_class = " class=\"content-image\" "; } else { $img_width = $view[file][$i][image_width];
@unlink("{$watermark_path}/{$file}"); } } closedir($handle); } $sql = "select * from {$g4['board_file_table']} where bo_table = '{$bo_table}' and bf_width > 0 order by wr_id, bf_no"; $qry = sql_query($sql); while ($row = sql_fetch_array($qry)) { $file = "{$file_path}/{$row['bf_file']}"; // 원본 강제 리사이징 if ($mw_basic[cf_original_width] && $mw_basic[cf_original_height]) { mw_make_thumbnail($mw_basic[cf_original_width], $mw_basic[cf_original_height], $file, $file, true); $size = getImageSize($file); sql_query("update {$g4['board_file_table']} set bf_width = '{$size['0']}', bf_height = '{$size['1']}'\n where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' and bf_no = '{$row['bf_no']}'"); } // 기존 워터마크 삭제 //@unlink("$watermark_path/$row[bf_file]"); // 워터마크 생성 if ($mw_basic[cf_watermark_use] && file_exists($mw_basic[cf_watermark_path])) { mw_watermark_file($file); } // 워터마크 썸네일 재생성 if ($mw_basic[cf_watermark_use_thumb] && file_exists($mw_basic[cf_watermark_path])) { mw_make_thumbnail($mw_basic[cf_thumb_width], $mw_basic[cf_thumb_height], $source_file, "{$thumb_path}/{$wr_id}", $mw_basic[cf_thumb_keep]); mw_make_thumbnail($mw_basic[cf_thumb2_width], $mw_basic[cf_thumb2_height], $source_file, "{$thumb2_path}/{$wr_id}", $mw_basic[cf_thumb2_keep]); mw_make_thumbnail($mw_basic[cf_thumb3_width], $mw_basic[cf_thumb3_height], $source_file, "{$thumb3_path}/{$wr_id}", $mw_basic[cf_thumb3_keep]); mw_make_thumbnail($mw_basic[cf_thumb4_width], $mw_basic[cf_thumb4_height], $source_file, "{$thumb4_path}/{$wr_id}", $mw_basic[cf_thumb4_keep]); mw_make_thumbnail($mw_basic[cf_thumb5_width], $mw_basic[cf_thumb5_height], $source_file, "{$thumb5_path}/{$wr_id}", $mw_basic[cf_thumb5_keep]); } } echo "워터마크를 모두 재생성하였습니다.";
$size = getImageSize($file); if ($size[0] > $mw_basic[cf_resize_original] || $mw_basic[cf_resize_original] < $size[1]) { mw_make_thumbnail($mw_basic[cf_resize_original], $mw_basic[cf_resize_original], $file, $file, true); } } } } $write_run_time = mw_time_log($write_run_time, "[write] resize_original"); } // 첨부이미지 사이즈 사용자 변경 if ($mw_basic[cf_change_image_size] && $member[mb_level] >= $mw_basic[cf_change_image_size_level] && $change_image_size) { $sql = "select * from {$g4['board_file_table']} where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' and bf_width > 0 order by bf_no"; $qry = sql_query($sql); while ($row = sql_fetch_array($qry)) { $file = "{$file_path}/{$row['bf_file']}"; mw_make_thumbnail($change_image_size, $change_image_size, $file, $file, true); $size = getImageSize($file); sql_query("update {$g4['board_file_table']} set bf_width = '{$size['0']}', bf_height = '{$size['1']}',\n bf_filesize = '" . filesize($file) . "'\n where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' and bf_no = '{$row['bf_no']}'"); } $write_run_time = mw_time_log($write_run_time, "[write] resize_custom"); } // 썸네일 $thumb_file = mw_thumb_jpg($thumb_path . '/' . $wr_id); $thumb2_file = mw_thumb_jpg($thumb2_path . '/' . $wr_id); $thumb3_file = mw_thumb_jpg($thumb3_path . '/' . $wr_id); $thumb4_file = mw_thumb_jpg($thumb4_path . '/' . $wr_id); $thumb5_file = mw_thumb_jpg($thumb5_path . '/' . $wr_id); // 썸네일 생성 $is_thumb = mw_make_thumbnail_row($bo_table, $wr_id, $_POST['wr_content'], $mw_basic['cf_image_remote_save']); $write_run_time = mw_time_log($write_run_time, "[write] mw_make_thumbnail_row"); // 원본 워터마크
*/ } } else { $thumb_size = @getimagesize($thumb_file); $set_width = $mw_basic[cf_thumb_width]; $set_height = $mw_basic[cf_thumb_height]; if ($mw_basic[cf_thumb_keep]) { //$size = @getimagesize($thumb_file); $size = mw_thumbnail_keep($thumb_size, $set_width, $set_height); $set_width = $size[0]; $set_height = $size[1]; } if ($thumb_size[0]) { if ($thumb_size[0] != $set_width || $thumb_size[1] != $set_height) { thumb_log($thumb_file, 'list-resize'); mw_make_thumbnail($mw_basic[cf_thumb_width], $mw_basic[cf_thumb_height], $thumb_file, $thumb_file, $mw_basic[cf_thumb_keep], $list[$i]['wr_datetime']); $list_run_time = mw_time_log($list_run_time, "[list] resize thumbnail"); } } } if ($mw_basic[cf_social_commerce]) { $a = (include "{$social_commerce_path}/list.skin.php"); if (!$a) { continue; } $list_run_time = mw_time_log($list_run_time, "[list] include /social_commerce/list.skin.php"); } else { if ($mw_basic[cf_talent_market]) { $a = (include "{$talent_market_path}/list.skin.php"); if (!$a) { continue;