상하단 이미지 보기 width 값이 클 때 처리 코드 추가

This commit is contained in:
chicpro
2013-04-22 16:24:13 +09:00
parent d53c562d05
commit 3cdabf7c06
4 changed files with 55 additions and 8 deletions

View File

@ -54,8 +54,14 @@ include_once (G4_ADMIN_PATH.'/admin.head.php');
<?
$himg = G4_DATA_PATH.'/faq/'.$fm['fm_id'].'_h';
if (file_exists($himg)) {
$size = @getimagesize($himg);
if($size[0] && $size[0] > 750)
$width = 750;
else
$width = $size[0];
echo '<input type="checkbox" name="fm_himg_del" value="1" id="fm_himg_del"> <label for="fm_himg_del">삭제</label>';
$himg_str = '<img src="'.G4_DATA_URL.'/faq/'.$fm['fm_id'].'_h" alt="">';
$himg_str = '<img src="'.G4_DATA_URL.'/faq/'.$fm['fm_id'].'_h" width="'.$width.'" alt="">';
}
if ($himg_str) {
echo '<div class="banner_or_img">';
@ -72,8 +78,14 @@ include_once (G4_ADMIN_PATH.'/admin.head.php');
<?
$timg = G4_DATA_PATH.'/faq/'.$fm['fm_id'].'_t';
if (file_exists($timg)) {
$size = @getimagesize($timg);
if($size[0] && $size[0] > 750)
$width = 750;
else
$width = $size[0];
echo '<input type="checkbox" name="fm_timg_del" value="1" id="fm_timg_del"><label for="fm_timg_del">삭제</label>';
$timg_str = '<img src="'.G4_DATA_URL.'/faq/'.$fm['fm_id'].'_t" alt="">';
$timg_str = '<img src="'.G4_DATA_URL.'/faq/'.$fm['fm_id'].'_t" width="'.$width.'" alt="">';
}
if ($timg_str) {
echo '<div class="banner_or_img">';