상하단 이미지 보기 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

@ -82,8 +82,14 @@ include_once (G4_ADMIN_PATH.'/admin.head.php');
<?
$himg = G4_DATA_PATH.'/content/'.$co['co_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="co_himg_del" value="1" id="co_himg_del"> <label for="co_himg_del">삭제</label>';
$himg_str = '<img src="'.G4_DATA_URL.'/content/'.$co['co_id'].'_h" alt="">';
$himg_str = '<img src="'.G4_DATA_URL.'/content/'.$co['co_id'].'_h" width="'.$width.'" alt="">';
}
if ($himg_str) {
echo '<div class="banner_or_img">';
@ -100,8 +106,14 @@ include_once (G4_ADMIN_PATH.'/admin.head.php');
<?
$timg = G4_DATA_PATH.'/content/'.$co['co_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="co_timg_del" value="1" id="co_timg_del"> <label for="co_timg_del">삭제</label>';
$timg_str = '<img src="'.G4_DATA_URL.'/content/'.$co['co_id'].'_t" alt="">';
$timg_str = '<img src="'.G4_DATA_URL.'/content/'.$co['co_id'].'_t" width="'.$width.'" alt="">';
}
if ($timg_str) {
echo '<div class="banner_or_img">';