포인트 3000점 겁니다.고수분들 부탁해요.. 정보
포인트 3000점 겁니다.고수분들 부탁해요..본문
ㅠㅠ도대체 어떻게 된 일인지 돌아 버리겟습니다..
갤러리 게시판에서 왜 리스트 화면에 그림 파일만 올리면 출력을 않하는지.ㅠㅠ
GD 설치대 있고 리스트 화면에 imagejpeg 를 imagepng로 고쳐도 않되고..
내용 보기에서는 그림이 출력되는데...
아래에 링크걸어 놓습니다.함 보세요...
내용보기화면:http://www.79ne.net/bbs/board.php?bo_table=ahffk&wr_id=1&page=&sca=&sfl=&stx=&sst=&sod=&spt=&page=
댓글 전체
내용보기는 view.skin.php 인가 그렇고.. 리스트는 list.skin.php 인데 리스트스킨파일에서 Call to undefined function: imagejpeg()
imagejpeg() 펑션이 정의되지 않았다고 하네요^^; list.skin.php 를 살펴보시면 답나올듯
imagejpeg() 펑션이 정의되지 않았다고 하네요^^; list.skin.php 를 살펴보시면 답나올듯
list.skin.php 파일은 건드리지 않앗습니다.ㅠㅠ
개러리 스킨만 사용하면 걍 아무이유없이 오류가 뜹니다..
아무 파일두 건드리지 않앗는데두요.ㅠㅠ
개러리 스킨만 사용하면 걍 아무이유없이 오류가 뜹니다..
아무 파일두 건드리지 않앗는데두요.ㅠㅠ
본문출력에서 정상작동된다면 리스트스킨의 문제가 분명합니다. 해당 스킨 list.skin.php 와 view.skin.php 소스를 한번 올려봐주세요
list.skin.php 의 소스에요...
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");
$data_path = $g4[path]."/data/file/$bo_table";
if ($board[bo_1] == '1') {
$thumb_path = $data_path.'/thumb';
// 타입1 썸네일
$thumb_width = 160; //썸네일 가로길이
$thumb_height = 105; //썸네일 세로길이
}
else if ($board[bo_1] == '2') {
$thumb_path = $data_path.'/thumb_l_type2';
// 타입2 썸네일
$thumb_width = 140; //썸네일 가로길이
$thumb_height = 140; //썸네일 세로길이
$L_Type_2_S = 14; //앨범형 제목길이
} else {
$thumb_path = $data_path.'/thumb';
// 그외 썸네일
$thumb_width = 160; //썸네일 가로길이
$thumb_height = 105; //썸네일 세로길이
}
$thumb_quality = 100; //퀼리티 100이하로 설정
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
$mod = $board[bo_gallery_cols];
// 선택옵션으로 인해 셀합치기가 가변적으로 변함
$colspan = 5;
if ($is_category) $colspan++;
if ($is_checkbox) $colspan++;
if ($is_good) $colspan++;
if ($is_nogood) $colspan++;
// 제목이 두줄로 표시되는 경우 이 코드를 사용해 보세요.
// <nobr style='display:block; overflow:hidden; width:000px;'>제목</nobr>
?>
<link rel='stylesheet' type='text/css' href='<?=$board_skin_path?>/board_style.css'>
<!-- 게시판 목록 시작 -->
<table width="<?=$width?>" align=center cellpadding=0 cellspacing=0 border='0'>
<tr>
<td valign="top" colspan="2">
<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr>
<td style='border:3px solid #F8F8F8;' width="100%">
<table style='border:1px solid #EEEEEE;' width="100%" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr>
<td width="10"></td>
<td height="30">
<a href="<?=$g4[path]?>/service/mall/cash/my_page.php" target="_blank"><font color='#ff9000'>물품등록현황</font></a></td>
<td width="10"></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td style="padding:10 10 10 0px;" width="150" valign="top">
<table style="border:1px solid #EEEEEE;" width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td style="padding:0 10 0 10px;" height="30">
<? if ($is_category) { ?>
<?
$cnt_bo_1 = $bo_1[0] ? $bo_1[0] : 1; // 한줄당 분류 갯수(현재:10)
$cnt = 1;
$cnt0 = 0;
$bb_s=""; $bb_e="";
$b_s=""; $b_e="";
$arr = explode("|", $board[bo_category_list]); // 구분자가 , 로 되어 있음
$str = "";
for ($i=0; $i<count($arr); $i++)
if (trim($arr[$i])) {
if ($sca == $arr[$i]) { $cnt0++; $b_s="<b>"; $b_e="</b>"; } else {$b_s=""; $b_e="";}
//게시판 뽑기
$tmp_write_table = $g4['write_prefix'] . $bo_table; // 게시판 테이블 전체이름
//카테고리 별 카운트
$mall_sql2 = " select count(*) as cnt from $tmp_write_table where ca_name = '$arr[$i]' and wr_is_comment = '0' ";
$cate_cnt = sql_fetch($mall_sql2);
//전체 카운트
$mall_sql3 = " select count(*) as cnt from $tmp_write_table where wr_is_comment = '0' ";
$cate_cnt_all = sql_fetch($mall_sql3);
$str .= " <a href='./board.php?bo_table=$bo_table&sca=".($arr[$i])."'><span class=L_Tcategory>$b_s$arr[$i]$b_e</span></a> <span class=L_Tcategory_cnt>({$cate_cnt[cnt]})</span>";
if ($cnt == $cnt_bo_1) { $cnt = 0; $str .= "<br>"; }
$cnt++;
}
if ($cnt0 == 0 ) { $bb_s="<b>"; $bb_e="</b>"; }
?>
<a href='./board.php?bo_table=<?=$bo_table?>&page=<?=$page?>'><span class=L_Tcategory><?=$bb_s?>전체<?=$bb_e?></span></a> <span class=L_Tcategory_cnt>(<?=$cate_cnt_all[cnt]?>)</span>
<br>
<?=$bb_e?>
<span class=L_Tcategory><?=$str?></span><? } ?></td>
</tr>
</table></td>
<td valign="top">
<form name="fboardlist" method="post" style="margin:0px;">
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
<input type="hidden" name="sfl" value="<?=$sfl?>">
<input type="hidden" name="stx" value="<?=$stx?>">
<input type="hidden" name="spt" value="<?=$spt?>">
<input type="hidden" name="page" value="<?=$page?>">
<input type="hidden" name="sw" value="">
<table width=100% cellpadding=0 cellspacing=0 border='0'>
<tr>
<td height="10"></td>
</tr>
<tr>
<? for ($i=0; $i<count($list); $i++) {
if ($board[bo_1] == '1') {
$img = "<img src='$board_skin_path/img/no_img.gif' border=0 title='이미지 없음'>";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
if (!file_exists($thumb))
{
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file))
{
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
continue;
$rate = $thumb_width / $size[0];
$height = (int)($size[1] * $rate);
if ($height < $thumb_height)
$dst = imagecreatetruecolor($thumb_width, $height);
else
$dst = imagecreatetruecolor($thumb_width, $thumb_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $thumb_width, $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $thumb_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' border=0>";
$subject = "<span $style>".cut_str($list[$i][subject],1000)."</span>";
}
else if ($board[bo_1] == '2') {
if ($i && $i%$mod==0)
echo "</tr><tr>";
$img = "<img src='$board_skin_path/img/no_img.gif' border=0 title='이미지 없음'>";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
if (!file_exists($thumb))
{
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file))
{
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
continue;
$rate = $thumb_width / $size[0];
$height = (int)($size[1] * $rate);
if ($height < $thumb_height)
$dst = imagecreatetruecolor($thumb_width, $height);
else
$dst = imagecreatetruecolor($thumb_width, $thumb_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $thumb_width, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $thumb_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' border=0>";
$subject = "<span $style>".cut_str($list[$i][subject],$L_Type_2_S)."</span>";
} else {
$img = "<img src='$board_skin_path/img/no_img.gif' border=0 title='이미지 없음'>";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
if (!file_exists($thumb))
{
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file))
{
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
continue;
$rate = $thumb_width / $size[0];
$height = (int)($size[1] * $rate);
if ($height < $thumb_height)
$dst = imagecreatetruecolor($thumb_width, $height);
else
$dst = imagecreatetruecolor($thumb_width, $thumb_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $thumb_width, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $thumb_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' border=0>";
$subject = "<span $style>".cut_str($list[$i][subject],1000)."</span>";
}
$style = "";
if ($list[$i][icon_new])
$style = ""; // 읽지 않은 글?? style='font-weight:bold;' 추가
$wr_content = "<span $style>".cut_str(get_text($list[$i][wr_content]),$list_content)."</span>";
$comment_cnt = "";
if ($list[$i][comment_cnt])
$comment_cnt = " <span class='L_comment_cnt'>{$list[$i][comment_cnt]}</span>";
$cehckbox = "";
if ($is_checkbox)
$cehckbox = "<input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}'>";
$category = "";
if ($is_category)
$category = "<span class=L_line>┃</span><span class=L_category>{$list[$i][ca_name]}</span>";
?>
<? if ($board[bo_1] == '1') { //L_Type_1 start ?>
<td valign=bottom>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<? if (file_exists($thumb)) { ?>
<td width="<?=$thumb_width?>" height="<?=$thumb_height?>" style="border:1px solid #CCCCCC; padding:3px" align="center" valign="top"><a href='<?=$list[$i][href]?>'><?=$img?></a></td>
<td width="15"></td>
<? } ?>
<td height="<?=$thumb_height?>" valign="top">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td style="padding:0 0 3 0px;" height="21">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td>
<?=$cehckbox?><a href='<?=$list[$i][href]?>'><span class=L_subject><?=$subject?></span></a><?=$category?> <?=$list[$i][icon_new]?></td>
<td width="80" align="right" valign="bottom">
<span class="L_hit">조회 : <?=$list[$i][wr_hit]?></span></td>
</tr>
</table></td>
</tr>
<tr><td bgcolor="#e4e4e4" height="1"></td></tr>
<tr>
<td style="padding:5 0 5 0px;" height="88" valign="top">
<span class=L_wr>제조사 : <?=$list[$i][wr_1]?></span><p>
<span class=L_wr>원산지 : <?=$list[$i][wr_2]?></span><p>
<span class=L_wr>판매가 : </span><span class=L_money><? echo number_format("{$list[$i][wr_4]}");?></span></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr><td height='30'></td></tr>
<?
} //L_Type_1 end
else if ($board[bo_1] == '2') { //L_Type_2 start
echo "<td valign=top style='word-break:break-all;' align='center'>";
echo "<table cellpadding=0 cellspacing=0 border=0 align='center'>";
echo "<tr><td align=center style='border:1px solid #CCCCCC; padding:3px;'><a href='{$list[$i][href]}' onfocus='this.blur()'>$img</a></td></tr>";
echo "<tr><td height='3'></td></tr>";
echo "<tr><td height=20 align=center><a href='{$list[$i][href]}'><span class=L_subject2>$subject</span></a></td></tr>";
echo "<tr><td height=20 align=center><a href='{$list[$i][href]}'><span class=L_money2>" . number_format("{$list[$i][wr_4]}") . "</span></a></td></tr>";
if ($is_checkbox) echo "<tr><td align=center><input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}'></td></tr>";
echo "<tr><td height=20></td></tr>";
echo "</table></td>\n";
}
else { //기본 start
?>
<td valign=bottom>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<? if (file_exists($thumb)) { ?>
<td width="<?=$thumb_width?>" height="<?=$thumb_height?>" style="border:1px solid #CCCCCC; padding:3px" align="center" valign="top"><a href='<?=$list[$i][href]?>'><?=$img?></a></td>
<td width="15"></td>
<? } ?>
<td height="<?=$thumb_height?>" valign="top">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td style="padding:0 0 3 0px;" height="21">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td>
<?=$cehckbox?><a href='<?=$list[$i][href]?>'><span class=L_subject><?=$subject?></span></a><?=$category?> <?=$list[$i][icon_new]?></td>
<td width="80" align="right" valign="bottom">
<span class="L_hit">조회 : <?=$list[$i][wr_hit]?></span></td>
</tr>
</table></td>
</tr>
<tr><td bgcolor="#e4e4e4" height="1"></td></tr>
<tr>
<td style="padding:5 0 5 0px;" height="88" valign="top">
<span class=L_wr>제조사 : <?=$list[$i][wr_1]?></span><p>
<span class=L_wr>원산지 : <?=$list[$i][wr_2]?></span><p>
<span class=L_wr>판매가격 : </span><span class=L_money><? echo number_format("{$list[$i][wr_4]}");?></span></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr><td height='30'></td></tr>
<?
} //기본 end
} //for end
//$L_Type_2
if ($board[bo_1] == '2') {
// 나머지 td 를 채운다.
if (($cnt = $i%$board[bo_gallery_cols]) != 0)
for ($k=$cnt; $k<$board[bo_gallery_cols]; $k++)
echo "<td> </td>\n";
}
?>
</tr>
<? if (count($list) == 0) { echo "<tr><td colspan='$mod' height=100 align=center>등록된 상품이 없습니다.</td></tr>"; } ?>
</table>
</form>
<!-- 페이지 -->
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td height="37" align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" align="center">
<? if ($prev_part_href) { echo "<a href='$prev_part_href'><img src='$board_skin_path/img/search_prev.gif' width=50 height=20 border=0 align=absmiddle title='이전검색'></a>"; } ?>
<?
// 기본으로 넘어오는 페이지를 아래와 같이 변환하여 이미지로도 출력할 수 있습니다.
//echo $write_pages;
$write_pages = str_replace("처음", "<img src='$board_skin_path/img/begin.gif' border='0' align='absmiddle' title='처음'>", $write_pages);
$write_pages = str_replace("이전", "<img src='$board_skin_path/img/page_prev.gif' border='0' align='absmiddle' title='이전'>", $write_pages);
$write_pages = str_replace("다음", "<img src='$board_skin_path/img/page_next.gif' border='0' align='absmiddle' title='다음'>", $write_pages);
$write_pages = str_replace("맨끝", "<img src='$board_skin_path/img/end.gif' border='0' align='absmiddle' title='맨끝'>", $write_pages);
$write_pages = preg_replace("/<span>([0-9]*)<\/span>/", "<font style=\"font-family:돋움; font-size:9pt; color:#797979\">$1</font>", $write_pages);
$write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<font style=\"font-family:돋움; font-size:9pt; color:orange;\">$1</font>", $write_pages);
?>
<?=$write_pages?>
<? if ($next_part_href) { echo "<a href='$next_part_href'><img src='$board_skin_path/img/search_next.gif' width=50 height=20 border=0 align=absmiddle title='다음검색'></a>"; } ?>
</td>
</tr>
</table></td>
</tr>
</table>
<!-- 버튼 링크 -->
<form name=fsearch method=get style="margin:0px;">
<input type=hidden name=bo_table value="<?=$bo_table?>">
<input type=hidden name=sca value="<?=$sca?>">
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td width="50%" height="40">
<? if ($list_href) { ?><a href="<?=$list_href?>"><img src="<?=$board_skin_path?>/img/list.gif" border="0"></a><? } ?>
<? if ($write_href) { ?><a href="<?=$write_href?>"><img src="<?=$board_skin_path?>/img/write.gif" border="0"></a><? } ?>
<? if ($is_checkbox) { ?>
<a href="javascript:select_delete();"><img src="<?=$board_skin_path?>/img/delete.gif" border="0"></a>
<a href="javascript:select_copy('copy');"><img src="<?=$board_skin_path?>/img/copy.gif" border="0"></a>
<a href="javascript:select_copy('move');"><img src="<?=$board_skin_path?>/img/move.gif" border="0"></a>
<? } ?>
</td>
<td width="50%" align="right">
<? if ($admin_href) { ?>
<select name=sfl class=L_select>
<option value='wr_subject||wr_content'>제목+내용</option>
<option value='wr_subject'>제목</option>
<option value='wr_content'>내용</option>
<option value='mb_id'>회원아이디</option>
<option value='wr_name'>이름</option>
</select>
<input name=stx maxlength=15 size=10 itemname="검색어" required value="<?=$stx?>" class=L_input>
<select name=sop class=L_select>
<option value=and>and</option>
<option value=or>or</option>
</select>
<input type=image src="<?=$board_skin_path?>/img/search.gif" border=0 align=absmiddle><? } ?></td>
</tr>
</table>
</form></td>
</tr></table>
<? if ($is_checkbox) { ?>
<script language="JavaScript">
function all_checked(sw)
{
var f = document.fboardlist;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]")
f.elements[i].checked = sw;
}
}
function check_confirm(str)
{
var f = document.fboardlist;
var chk_count = 0;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]" && f.elements[i].checked)
chk_count++;
}
if (!chk_count) {
alert(str + "할 게시물을 하나 이상 선택하세요.");
return false;
}
return true;
}
// 선택한 게시물 삭제
function select_delete()
{
var f = document.fboardlist;
str = "삭제";
if (!check_confirm(str))
return;
if (!confirm("선택한 게시물을 정말 "+str+" 하시겠습니까?\n\n한번 "+str+"한 자료는 복구할 수 없습니다"))
return;
f.action = "./delete_all.php";
f.submit();
}
// 선택한 게시물 복사 및 이동
function select_copy(sw)
{
var f = document.fboardlist;
if (sw == "copy")
str = "복사";
else
str = "이동";
if (!check_confirm(str))
return;
var sub_win = window.open("", "move", "left=50, top=50, width=396, height=550, scrollbars=1");
f.sw.value = sw;
f.target = "move";
f.action = "./move.php";
f.submit();
}
</script>
<? } ?>
<!-- 게시판 목록 끝 -->
view.php 스킨의 소스구요
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
//길이 설정
$view_w_1 = $width - 260;
$view_w_2 = $width - 131;
$view_w_3 = $width - 20;
$view_w_4 = $width - 30;
?>
<link rel='stylesheet' type='text/css' href='<?=$board_skin_path?>/board_style.css'>
<!-- 게시글 보기 시작 -->
<table width="<?=$width?>" align="center" cellpadding="0" cellspcing="0"><tr><td>
<!-- 링크 버튼 -->
<?
ob_start();
?>
<table width='100%' cellpadding=0 cellspacing=0>
<tr height=80>
<td width=75%>
<? if ($search_href) { echo "<a href=\"$search_href\"><img src='$board_skin_path/img/search_list.gif' border='0' align='absmiddle'></a> "; } ?>
<? echo "<a href=\"$list_href\"><img src='$board_skin_path/img/list.gif' border='0' align='absmiddle'></a> "; ?>
<? if ($write_href) { echo "<a href=\"$write_href\"><img src='$board_skin_path/img/write.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($reply_href) { echo "<a href=\"$reply_href\"><img src='$board_skin_path/img/reply.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($update_href) { echo "<a href=\"$update_href\"><img src='$board_skin_path/img/modify.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($delete_href) { echo "<a href=\"$delete_href\"><img src='$board_skin_path/img/delete.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($good_href) { echo "<a href=\"$good_href\" target='hiddenframe'><img src='$board_skin_path/img/good.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($nogood_href) { echo "<a href=\"$nogood_href\" target='hiddenframe'><img src='$board_skin_path/img/nogood.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($scrap_href) { echo "<a href=\"javascript:;\" onclick=\"win_scrap('./scrap_popin.php?bo_table=$bo_table&wr_id=$wr_id');\"><img src='$board_skin_path/img/scrap.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($copy_href) { echo "<a href=\"$copy_href\"><img src='$board_skin_path/img/copy.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($move_href) { echo "<a href=\"$move_href\"><img src='$board_skin_path/img/move.gif' border='0' align='absmiddle'></a> "; } ?>
</td>
<td width=25% align=right>
<? if ($prev_href) { echo "<a href=\"$prev_href\" title=\"$prev_wr_subject\"><img src='$board_skin_path/img/prev.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($next_href) { echo "<a href=\"$next_href\" title=\"$next_wr_subject\"><img src='$board_skin_path/img/next.gif' border='0' align='absmiddle'></a> "; } ?>
</td>
</tr>
</table>
<?
$link_buttons = ob_get_contents();
ob_end_clean();
?>
<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr>
<td style='border:3px solid #F8F8F8;' width="<?=$view_w_1?>">
<table style='border:1px solid #EEEEEE;' width="100%" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr>
<td width="10"></td>
<td width="100" height="30">물품명</td>
<td width="1" height="30"><img src="<?=$board_skin_path?>/img/line_01.gif" width="1" height="13"></td>
<td width="10"></td>
<td width="<?=$view_w_2?>"><?=$view['wr_subject']?></td>
<td width="10"></td>
</tr>
<tr>
<td width="10"></td>
<td background="<?=$board_skin_path?>/img/lh_bg.gif" height="1" colspan="6"></td>
<td width="10"></td>
</tr>
<tr>
<td width="10"></td>
<td width="100" height="30">판매가격</td>
<td width="1" height="30"><img src="<?=$board_skin_path?>/img/line_01.gif" width="1" height="13"></td>
<td width="10"></td>
<td width="<?=$view_w_2?>"><?=number_format($view['wr_4']);?></td>
<td width="10"></td>
</tr>
<tr>
<td width="10"></td>
<td background="<?=$board_skin_path?>/img/lh_bg.gif" height="1" colspan="6"></td>
<td width="10"></td>
</tr>
<tr>
<td width="10"></td>
<td width="100" height="30">적립포인트</td>
<td width="1" height="30"><img src="<?=$board_skin_path?>/img/line_01.gif" width="1" height="13"></td>
<td width="10"></td>
<td width="<?=$view_w_2?>">
<?
$view_mb_id = get_member($view[mb_id]);
if ($view_mb_id[mb_point] >= $view[wr_5]) {
$insert_point = number_format($view[wr_5]);
} else {
$insert_point = number_format(0);
}
echo $insert_point;
?></td>
<td width="10"></td>
</tr>
<tr>
<td width="10"></td>
<td background="<?=$board_skin_path?>/img/lh_bg.gif" height="1" colspan="6"></td>
<td width="10"></td>
</tr>
<tr>
<td width="10"></td>
<td width="100" height="30">옵션</td>
<td width="1" height="30"><img src="<?=$board_skin_path?>/img/line_01.gif" width="1" height="13"></td>
<td width="10"></td>
<td width="<?=$view_w_2?>">
없음</td>
<td width="10"></td>
</tr>
</table></td>
<td width="10"><td>
<td style='border:3px solid #F8F8F8;' width="250" align="center">
<table style='border:1px solid #EEEEEE;' width="250" height="123" cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td height="123" align="center">
<a href='#' onclick="javascript:window.open('<?=$g4[path];?>/service/mall/cash/mall.php?bo_table=<?=$bo_table?>&wr_id=<?=$wr_id?>','mall','width=450,height=562,top=30,left=50,scrollbars=no,resizable=no')"><img src="<?=$board_skin_path?>/img/buy_now.gif" width="232" height="115" border="0"></a></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr><td height="10"></td></tr>
<tr>
<td style='border:3px solid #F8F8F8;' width="100%">
<table style='border:1px solid #EEEEEE;' width="100%" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr>
<td width="10"></td>
<td style="padding:10 0 10 0px;" width="<?=$view_w_3?>">
<?
// 파일 출력
for ($i=0; $i<=count($view[file]); $i++) {
if ($view[file][$i][view])
echo $view[file][$i][view] . "<p>";
}
?>
<span class="V_content"><?=$view[content];?></span>
<?//echo $view[rich_content]; // {이미지:0} 과 같은 코드를 사용할 경우?>
<!-- 테러 태그 방지용 --></xml></xmp><a href=""></a><a href=''></a></td>
<td width="10"></td>
</tr>
</table></td>
</tr>
<tr><td height="10"></td></tr>
</table>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td bgcolor="#cacde2" width="30" valign="top"><img src="<?=$board_skin_path?>/img/item_01.gif" width="30" height="100"></td>
<td width="<?=$view_w_4?>">
<table width="100%" cellspacing="0" cellpadding="0" border="0" valign="top">
<tr>
<td bgcolor="#cacde2" width="<?=$view_w_4?>" height="1"></td>
</tr>
<tr>
<td style="padding:5 10 5 10px;" width="<?=$view_w_4?>" height="99">
<?
if ($view[wr_7]) {
echo conv_content($view[wr_7], $html);
} else {
echo "상품 설명이 없습니다.";
}
?></td>
</tr>
</table></td>
</tr>
<tr height="1"><td></td><td></td></tr>
<tr>
<td bgcolor="#d6e1a7" width="30" valign="top"><img src="<?=$board_skin_path?>/img/item_02.gif" width="30" height="100"></td>
<td width="<?=$view_w_4?>">
<table width="100%" cellspacing="0" cellpadding="0" border="0" valign="top">
<tr>
<td bgcolor="#d6e1a7" width="<?=$view_w_4?>" height="1"></td>
</tr>
<tr>
<td style="padding:5 10 5 10px;" width="<?=$view_w_4?>" height="99">
<?
if ($view[wr_8]) {
echo conv_content($view[wr_8], $html);
} else {
echo "배송 정보가 없습니다.";
}
?></td>
</tr>
</table></td>
</tr>
<tr height="1"><td></td><td></td></tr>
<tr>
<td bgcolor="#f6dbab" width="30" valign="top"><img src="<?=$board_skin_path?>/img/item_03.gif" width="30" height="100"></td>
<td width="<?=$view_w_4?>">
<table width="100%" cellspacing="0" cellpadding="0" border="0" valign="top">
<tr>
<td bgcolor="#f6dbab" width="<?=$view_w_4?>" height="1"></td>
</tr>
<tr>
<td style="padding:5 10 5 10px;" width="<?=$view_w_4?>" height="99">
<?
if ($view[wr_9]) {
echo conv_content($view[wr_9], $html);
} else {
echo "교환 · 반품정보가 없습니다.";
}
?></td>
</tr>
</table></td>
</tr>
<tr height="1"><td></td><td></td></tr>
<tr>
<td bgcolor="#a7dfe1" width="30" valign="top"><img src="<?=$board_skin_path?>/img/item_04.gif" width="30" height="100"></td>
<td width="<?=$view_w_4?>">
<table width="100%" cellspacing="0" cellpadding="0" border="0" valign="top">
<tr>
<td bgcolor="#a7dfe1" width="<?=$view_w_4?>" height="1"></td>
</tr>
<tr>
<td style="padding:0 0 5 10px;" width="<?=$view_w_4?>" height="99">
<?
include_once("./view_comment.php");
?></td>
</tr>
</table></td>
</tr>
</table>
<?=$link_buttons?>
</td></tr></table>
<script language="JavaScript">
// HTML 로 넘어온 <img ... > 태그의 폭이 테이블폭보다 크다면 테이블폭을 적용한다.
function resize_image()
{
var target = document.getElementsByName('target_resize_image[]');
var image_width = parseInt('<?=$board[bo_image_width]?>');
var image_height = 0;
for(i=0; i<target.length; i++) {
// 원래 사이즈를 저장해 놓는다
target[i].tmp_width = target[i].width;
target[i].tmp_height = target[i].height;
// 이미지 폭이 테이블 폭보다 크다면 테이블폭에 맞춘다
if(target[i].width > image_width) {
image_height = parseFloat(target[i].width / target[i].height)
target[i].width = image_width;
target[i].height = parseInt(image_width / image_height);
}
}
}
window.onload = resize_image;
function file_download(link, file)
{
<? if ($board[bo_download_point] < 0) { ?>if (confirm("'"+file+"' 파일을 다운로드 하시면 포인트가 차감(<?=number_format($board[bo_download_point])?>점)됩니다.\n\n포인트는 게시물당 한번만 차감되며 다음에 다시 다운로드 하셔도 중복하여 차감하지 않습니다.\n\n그래도 다운로드 하시겠습니까?"))<?}?>
document.location.href = link;
}
</script>
<!-- 게시글 보기 끝 -->
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");
$data_path = $g4[path]."/data/file/$bo_table";
if ($board[bo_1] == '1') {
$thumb_path = $data_path.'/thumb';
// 타입1 썸네일
$thumb_width = 160; //썸네일 가로길이
$thumb_height = 105; //썸네일 세로길이
}
else if ($board[bo_1] == '2') {
$thumb_path = $data_path.'/thumb_l_type2';
// 타입2 썸네일
$thumb_width = 140; //썸네일 가로길이
$thumb_height = 140; //썸네일 세로길이
$L_Type_2_S = 14; //앨범형 제목길이
} else {
$thumb_path = $data_path.'/thumb';
// 그외 썸네일
$thumb_width = 160; //썸네일 가로길이
$thumb_height = 105; //썸네일 세로길이
}
$thumb_quality = 100; //퀼리티 100이하로 설정
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
$mod = $board[bo_gallery_cols];
// 선택옵션으로 인해 셀합치기가 가변적으로 변함
$colspan = 5;
if ($is_category) $colspan++;
if ($is_checkbox) $colspan++;
if ($is_good) $colspan++;
if ($is_nogood) $colspan++;
// 제목이 두줄로 표시되는 경우 이 코드를 사용해 보세요.
// <nobr style='display:block; overflow:hidden; width:000px;'>제목</nobr>
?>
<link rel='stylesheet' type='text/css' href='<?=$board_skin_path?>/board_style.css'>
<!-- 게시판 목록 시작 -->
<table width="<?=$width?>" align=center cellpadding=0 cellspacing=0 border='0'>
<tr>
<td valign="top" colspan="2">
<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr>
<td style='border:3px solid #F8F8F8;' width="100%">
<table style='border:1px solid #EEEEEE;' width="100%" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr>
<td width="10"></td>
<td height="30">
<a href="<?=$g4[path]?>/service/mall/cash/my_page.php" target="_blank"><font color='#ff9000'>물품등록현황</font></a></td>
<td width="10"></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td style="padding:10 10 10 0px;" width="150" valign="top">
<table style="border:1px solid #EEEEEE;" width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td style="padding:0 10 0 10px;" height="30">
<? if ($is_category) { ?>
<?
$cnt_bo_1 = $bo_1[0] ? $bo_1[0] : 1; // 한줄당 분류 갯수(현재:10)
$cnt = 1;
$cnt0 = 0;
$bb_s=""; $bb_e="";
$b_s=""; $b_e="";
$arr = explode("|", $board[bo_category_list]); // 구분자가 , 로 되어 있음
$str = "";
for ($i=0; $i<count($arr); $i++)
if (trim($arr[$i])) {
if ($sca == $arr[$i]) { $cnt0++; $b_s="<b>"; $b_e="</b>"; } else {$b_s=""; $b_e="";}
//게시판 뽑기
$tmp_write_table = $g4['write_prefix'] . $bo_table; // 게시판 테이블 전체이름
//카테고리 별 카운트
$mall_sql2 = " select count(*) as cnt from $tmp_write_table where ca_name = '$arr[$i]' and wr_is_comment = '0' ";
$cate_cnt = sql_fetch($mall_sql2);
//전체 카운트
$mall_sql3 = " select count(*) as cnt from $tmp_write_table where wr_is_comment = '0' ";
$cate_cnt_all = sql_fetch($mall_sql3);
$str .= " <a href='./board.php?bo_table=$bo_table&sca=".($arr[$i])."'><span class=L_Tcategory>$b_s$arr[$i]$b_e</span></a> <span class=L_Tcategory_cnt>({$cate_cnt[cnt]})</span>";
if ($cnt == $cnt_bo_1) { $cnt = 0; $str .= "<br>"; }
$cnt++;
}
if ($cnt0 == 0 ) { $bb_s="<b>"; $bb_e="</b>"; }
?>
<a href='./board.php?bo_table=<?=$bo_table?>&page=<?=$page?>'><span class=L_Tcategory><?=$bb_s?>전체<?=$bb_e?></span></a> <span class=L_Tcategory_cnt>(<?=$cate_cnt_all[cnt]?>)</span>
<br>
<?=$bb_e?>
<span class=L_Tcategory><?=$str?></span><? } ?></td>
</tr>
</table></td>
<td valign="top">
<form name="fboardlist" method="post" style="margin:0px;">
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
<input type="hidden" name="sfl" value="<?=$sfl?>">
<input type="hidden" name="stx" value="<?=$stx?>">
<input type="hidden" name="spt" value="<?=$spt?>">
<input type="hidden" name="page" value="<?=$page?>">
<input type="hidden" name="sw" value="">
<table width=100% cellpadding=0 cellspacing=0 border='0'>
<tr>
<td height="10"></td>
</tr>
<tr>
<? for ($i=0; $i<count($list); $i++) {
if ($board[bo_1] == '1') {
$img = "<img src='$board_skin_path/img/no_img.gif' border=0 title='이미지 없음'>";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
if (!file_exists($thumb))
{
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file))
{
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
continue;
$rate = $thumb_width / $size[0];
$height = (int)($size[1] * $rate);
if ($height < $thumb_height)
$dst = imagecreatetruecolor($thumb_width, $height);
else
$dst = imagecreatetruecolor($thumb_width, $thumb_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $thumb_width, $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $thumb_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' border=0>";
$subject = "<span $style>".cut_str($list[$i][subject],1000)."</span>";
}
else if ($board[bo_1] == '2') {
if ($i && $i%$mod==0)
echo "</tr><tr>";
$img = "<img src='$board_skin_path/img/no_img.gif' border=0 title='이미지 없음'>";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
if (!file_exists($thumb))
{
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file))
{
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
continue;
$rate = $thumb_width / $size[0];
$height = (int)($size[1] * $rate);
if ($height < $thumb_height)
$dst = imagecreatetruecolor($thumb_width, $height);
else
$dst = imagecreatetruecolor($thumb_width, $thumb_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $thumb_width, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $thumb_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' border=0>";
$subject = "<span $style>".cut_str($list[$i][subject],$L_Type_2_S)."</span>";
} else {
$img = "<img src='$board_skin_path/img/no_img.gif' border=0 title='이미지 없음'>";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
if (!file_exists($thumb))
{
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file))
{
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
continue;
$rate = $thumb_width / $size[0];
$height = (int)($size[1] * $rate);
if ($height < $thumb_height)
$dst = imagecreatetruecolor($thumb_width, $height);
else
$dst = imagecreatetruecolor($thumb_width, $thumb_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $thumb_width, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $thumb_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' border=0>";
$subject = "<span $style>".cut_str($list[$i][subject],1000)."</span>";
}
$style = "";
if ($list[$i][icon_new])
$style = ""; // 읽지 않은 글?? style='font-weight:bold;' 추가
$wr_content = "<span $style>".cut_str(get_text($list[$i][wr_content]),$list_content)."</span>";
$comment_cnt = "";
if ($list[$i][comment_cnt])
$comment_cnt = " <span class='L_comment_cnt'>{$list[$i][comment_cnt]}</span>";
$cehckbox = "";
if ($is_checkbox)
$cehckbox = "<input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}'>";
$category = "";
if ($is_category)
$category = "<span class=L_line>┃</span><span class=L_category>{$list[$i][ca_name]}</span>";
?>
<? if ($board[bo_1] == '1') { //L_Type_1 start ?>
<td valign=bottom>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<? if (file_exists($thumb)) { ?>
<td width="<?=$thumb_width?>" height="<?=$thumb_height?>" style="border:1px solid #CCCCCC; padding:3px" align="center" valign="top"><a href='<?=$list[$i][href]?>'><?=$img?></a></td>
<td width="15"></td>
<? } ?>
<td height="<?=$thumb_height?>" valign="top">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td style="padding:0 0 3 0px;" height="21">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td>
<?=$cehckbox?><a href='<?=$list[$i][href]?>'><span class=L_subject><?=$subject?></span></a><?=$category?> <?=$list[$i][icon_new]?></td>
<td width="80" align="right" valign="bottom">
<span class="L_hit">조회 : <?=$list[$i][wr_hit]?></span></td>
</tr>
</table></td>
</tr>
<tr><td bgcolor="#e4e4e4" height="1"></td></tr>
<tr>
<td style="padding:5 0 5 0px;" height="88" valign="top">
<span class=L_wr>제조사 : <?=$list[$i][wr_1]?></span><p>
<span class=L_wr>원산지 : <?=$list[$i][wr_2]?></span><p>
<span class=L_wr>판매가 : </span><span class=L_money><? echo number_format("{$list[$i][wr_4]}");?></span></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr><td height='30'></td></tr>
<?
} //L_Type_1 end
else if ($board[bo_1] == '2') { //L_Type_2 start
echo "<td valign=top style='word-break:break-all;' align='center'>";
echo "<table cellpadding=0 cellspacing=0 border=0 align='center'>";
echo "<tr><td align=center style='border:1px solid #CCCCCC; padding:3px;'><a href='{$list[$i][href]}' onfocus='this.blur()'>$img</a></td></tr>";
echo "<tr><td height='3'></td></tr>";
echo "<tr><td height=20 align=center><a href='{$list[$i][href]}'><span class=L_subject2>$subject</span></a></td></tr>";
echo "<tr><td height=20 align=center><a href='{$list[$i][href]}'><span class=L_money2>" . number_format("{$list[$i][wr_4]}") . "</span></a></td></tr>";
if ($is_checkbox) echo "<tr><td align=center><input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}'></td></tr>";
echo "<tr><td height=20></td></tr>";
echo "</table></td>\n";
}
else { //기본 start
?>
<td valign=bottom>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<? if (file_exists($thumb)) { ?>
<td width="<?=$thumb_width?>" height="<?=$thumb_height?>" style="border:1px solid #CCCCCC; padding:3px" align="center" valign="top"><a href='<?=$list[$i][href]?>'><?=$img?></a></td>
<td width="15"></td>
<? } ?>
<td height="<?=$thumb_height?>" valign="top">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td style="padding:0 0 3 0px;" height="21">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td>
<?=$cehckbox?><a href='<?=$list[$i][href]?>'><span class=L_subject><?=$subject?></span></a><?=$category?> <?=$list[$i][icon_new]?></td>
<td width="80" align="right" valign="bottom">
<span class="L_hit">조회 : <?=$list[$i][wr_hit]?></span></td>
</tr>
</table></td>
</tr>
<tr><td bgcolor="#e4e4e4" height="1"></td></tr>
<tr>
<td style="padding:5 0 5 0px;" height="88" valign="top">
<span class=L_wr>제조사 : <?=$list[$i][wr_1]?></span><p>
<span class=L_wr>원산지 : <?=$list[$i][wr_2]?></span><p>
<span class=L_wr>판매가격 : </span><span class=L_money><? echo number_format("{$list[$i][wr_4]}");?></span></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr><td height='30'></td></tr>
<?
} //기본 end
} //for end
//$L_Type_2
if ($board[bo_1] == '2') {
// 나머지 td 를 채운다.
if (($cnt = $i%$board[bo_gallery_cols]) != 0)
for ($k=$cnt; $k<$board[bo_gallery_cols]; $k++)
echo "<td> </td>\n";
}
?>
</tr>
<? if (count($list) == 0) { echo "<tr><td colspan='$mod' height=100 align=center>등록된 상품이 없습니다.</td></tr>"; } ?>
</table>
</form>
<!-- 페이지 -->
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td height="37" align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" align="center">
<? if ($prev_part_href) { echo "<a href='$prev_part_href'><img src='$board_skin_path/img/search_prev.gif' width=50 height=20 border=0 align=absmiddle title='이전검색'></a>"; } ?>
<?
// 기본으로 넘어오는 페이지를 아래와 같이 변환하여 이미지로도 출력할 수 있습니다.
//echo $write_pages;
$write_pages = str_replace("처음", "<img src='$board_skin_path/img/begin.gif' border='0' align='absmiddle' title='처음'>", $write_pages);
$write_pages = str_replace("이전", "<img src='$board_skin_path/img/page_prev.gif' border='0' align='absmiddle' title='이전'>", $write_pages);
$write_pages = str_replace("다음", "<img src='$board_skin_path/img/page_next.gif' border='0' align='absmiddle' title='다음'>", $write_pages);
$write_pages = str_replace("맨끝", "<img src='$board_skin_path/img/end.gif' border='0' align='absmiddle' title='맨끝'>", $write_pages);
$write_pages = preg_replace("/<span>([0-9]*)<\/span>/", "<font style=\"font-family:돋움; font-size:9pt; color:#797979\">$1</font>", $write_pages);
$write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<font style=\"font-family:돋움; font-size:9pt; color:orange;\">$1</font>", $write_pages);
?>
<?=$write_pages?>
<? if ($next_part_href) { echo "<a href='$next_part_href'><img src='$board_skin_path/img/search_next.gif' width=50 height=20 border=0 align=absmiddle title='다음검색'></a>"; } ?>
</td>
</tr>
</table></td>
</tr>
</table>
<!-- 버튼 링크 -->
<form name=fsearch method=get style="margin:0px;">
<input type=hidden name=bo_table value="<?=$bo_table?>">
<input type=hidden name=sca value="<?=$sca?>">
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td width="50%" height="40">
<? if ($list_href) { ?><a href="<?=$list_href?>"><img src="<?=$board_skin_path?>/img/list.gif" border="0"></a><? } ?>
<? if ($write_href) { ?><a href="<?=$write_href?>"><img src="<?=$board_skin_path?>/img/write.gif" border="0"></a><? } ?>
<? if ($is_checkbox) { ?>
<a href="javascript:select_delete();"><img src="<?=$board_skin_path?>/img/delete.gif" border="0"></a>
<a href="javascript:select_copy('copy');"><img src="<?=$board_skin_path?>/img/copy.gif" border="0"></a>
<a href="javascript:select_copy('move');"><img src="<?=$board_skin_path?>/img/move.gif" border="0"></a>
<? } ?>
</td>
<td width="50%" align="right">
<? if ($admin_href) { ?>
<select name=sfl class=L_select>
<option value='wr_subject||wr_content'>제목+내용</option>
<option value='wr_subject'>제목</option>
<option value='wr_content'>내용</option>
<option value='mb_id'>회원아이디</option>
<option value='wr_name'>이름</option>
</select>
<input name=stx maxlength=15 size=10 itemname="검색어" required value="<?=$stx?>" class=L_input>
<select name=sop class=L_select>
<option value=and>and</option>
<option value=or>or</option>
</select>
<input type=image src="<?=$board_skin_path?>/img/search.gif" border=0 align=absmiddle><? } ?></td>
</tr>
</table>
</form></td>
</tr></table>
<? if ($is_checkbox) { ?>
<script language="JavaScript">
function all_checked(sw)
{
var f = document.fboardlist;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]")
f.elements[i].checked = sw;
}
}
function check_confirm(str)
{
var f = document.fboardlist;
var chk_count = 0;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]" && f.elements[i].checked)
chk_count++;
}
if (!chk_count) {
alert(str + "할 게시물을 하나 이상 선택하세요.");
return false;
}
return true;
}
// 선택한 게시물 삭제
function select_delete()
{
var f = document.fboardlist;
str = "삭제";
if (!check_confirm(str))
return;
if (!confirm("선택한 게시물을 정말 "+str+" 하시겠습니까?\n\n한번 "+str+"한 자료는 복구할 수 없습니다"))
return;
f.action = "./delete_all.php";
f.submit();
}
// 선택한 게시물 복사 및 이동
function select_copy(sw)
{
var f = document.fboardlist;
if (sw == "copy")
str = "복사";
else
str = "이동";
if (!check_confirm(str))
return;
var sub_win = window.open("", "move", "left=50, top=50, width=396, height=550, scrollbars=1");
f.sw.value = sw;
f.target = "move";
f.action = "./move.php";
f.submit();
}
</script>
<? } ?>
<!-- 게시판 목록 끝 -->
view.php 스킨의 소스구요
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
//길이 설정
$view_w_1 = $width - 260;
$view_w_2 = $width - 131;
$view_w_3 = $width - 20;
$view_w_4 = $width - 30;
?>
<link rel='stylesheet' type='text/css' href='<?=$board_skin_path?>/board_style.css'>
<!-- 게시글 보기 시작 -->
<table width="<?=$width?>" align="center" cellpadding="0" cellspcing="0"><tr><td>
<!-- 링크 버튼 -->
<?
ob_start();
?>
<table width='100%' cellpadding=0 cellspacing=0>
<tr height=80>
<td width=75%>
<? if ($search_href) { echo "<a href=\"$search_href\"><img src='$board_skin_path/img/search_list.gif' border='0' align='absmiddle'></a> "; } ?>
<? echo "<a href=\"$list_href\"><img src='$board_skin_path/img/list.gif' border='0' align='absmiddle'></a> "; ?>
<? if ($write_href) { echo "<a href=\"$write_href\"><img src='$board_skin_path/img/write.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($reply_href) { echo "<a href=\"$reply_href\"><img src='$board_skin_path/img/reply.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($update_href) { echo "<a href=\"$update_href\"><img src='$board_skin_path/img/modify.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($delete_href) { echo "<a href=\"$delete_href\"><img src='$board_skin_path/img/delete.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($good_href) { echo "<a href=\"$good_href\" target='hiddenframe'><img src='$board_skin_path/img/good.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($nogood_href) { echo "<a href=\"$nogood_href\" target='hiddenframe'><img src='$board_skin_path/img/nogood.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($scrap_href) { echo "<a href=\"javascript:;\" onclick=\"win_scrap('./scrap_popin.php?bo_table=$bo_table&wr_id=$wr_id');\"><img src='$board_skin_path/img/scrap.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($copy_href) { echo "<a href=\"$copy_href\"><img src='$board_skin_path/img/copy.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($move_href) { echo "<a href=\"$move_href\"><img src='$board_skin_path/img/move.gif' border='0' align='absmiddle'></a> "; } ?>
</td>
<td width=25% align=right>
<? if ($prev_href) { echo "<a href=\"$prev_href\" title=\"$prev_wr_subject\"><img src='$board_skin_path/img/prev.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($next_href) { echo "<a href=\"$next_href\" title=\"$next_wr_subject\"><img src='$board_skin_path/img/next.gif' border='0' align='absmiddle'></a> "; } ?>
</td>
</tr>
</table>
<?
$link_buttons = ob_get_contents();
ob_end_clean();
?>
<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr>
<td style='border:3px solid #F8F8F8;' width="<?=$view_w_1?>">
<table style='border:1px solid #EEEEEE;' width="100%" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr>
<td width="10"></td>
<td width="100" height="30">물품명</td>
<td width="1" height="30"><img src="<?=$board_skin_path?>/img/line_01.gif" width="1" height="13"></td>
<td width="10"></td>
<td width="<?=$view_w_2?>"><?=$view['wr_subject']?></td>
<td width="10"></td>
</tr>
<tr>
<td width="10"></td>
<td background="<?=$board_skin_path?>/img/lh_bg.gif" height="1" colspan="6"></td>
<td width="10"></td>
</tr>
<tr>
<td width="10"></td>
<td width="100" height="30">판매가격</td>
<td width="1" height="30"><img src="<?=$board_skin_path?>/img/line_01.gif" width="1" height="13"></td>
<td width="10"></td>
<td width="<?=$view_w_2?>"><?=number_format($view['wr_4']);?></td>
<td width="10"></td>
</tr>
<tr>
<td width="10"></td>
<td background="<?=$board_skin_path?>/img/lh_bg.gif" height="1" colspan="6"></td>
<td width="10"></td>
</tr>
<tr>
<td width="10"></td>
<td width="100" height="30">적립포인트</td>
<td width="1" height="30"><img src="<?=$board_skin_path?>/img/line_01.gif" width="1" height="13"></td>
<td width="10"></td>
<td width="<?=$view_w_2?>">
<?
$view_mb_id = get_member($view[mb_id]);
if ($view_mb_id[mb_point] >= $view[wr_5]) {
$insert_point = number_format($view[wr_5]);
} else {
$insert_point = number_format(0);
}
echo $insert_point;
?></td>
<td width="10"></td>
</tr>
<tr>
<td width="10"></td>
<td background="<?=$board_skin_path?>/img/lh_bg.gif" height="1" colspan="6"></td>
<td width="10"></td>
</tr>
<tr>
<td width="10"></td>
<td width="100" height="30">옵션</td>
<td width="1" height="30"><img src="<?=$board_skin_path?>/img/line_01.gif" width="1" height="13"></td>
<td width="10"></td>
<td width="<?=$view_w_2?>">
없음</td>
<td width="10"></td>
</tr>
</table></td>
<td width="10"><td>
<td style='border:3px solid #F8F8F8;' width="250" align="center">
<table style='border:1px solid #EEEEEE;' width="250" height="123" cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td height="123" align="center">
<a href='#' onclick="javascript:window.open('<?=$g4[path];?>/service/mall/cash/mall.php?bo_table=<?=$bo_table?>&wr_id=<?=$wr_id?>','mall','width=450,height=562,top=30,left=50,scrollbars=no,resizable=no')"><img src="<?=$board_skin_path?>/img/buy_now.gif" width="232" height="115" border="0"></a></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr><td height="10"></td></tr>
<tr>
<td style='border:3px solid #F8F8F8;' width="100%">
<table style='border:1px solid #EEEEEE;' width="100%" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr>
<td width="10"></td>
<td style="padding:10 0 10 0px;" width="<?=$view_w_3?>">
<?
// 파일 출력
for ($i=0; $i<=count($view[file]); $i++) {
if ($view[file][$i][view])
echo $view[file][$i][view] . "<p>";
}
?>
<span class="V_content"><?=$view[content];?></span>
<?//echo $view[rich_content]; // {이미지:0} 과 같은 코드를 사용할 경우?>
<!-- 테러 태그 방지용 --></xml></xmp><a href=""></a><a href=''></a></td>
<td width="10"></td>
</tr>
</table></td>
</tr>
<tr><td height="10"></td></tr>
</table>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td bgcolor="#cacde2" width="30" valign="top"><img src="<?=$board_skin_path?>/img/item_01.gif" width="30" height="100"></td>
<td width="<?=$view_w_4?>">
<table width="100%" cellspacing="0" cellpadding="0" border="0" valign="top">
<tr>
<td bgcolor="#cacde2" width="<?=$view_w_4?>" height="1"></td>
</tr>
<tr>
<td style="padding:5 10 5 10px;" width="<?=$view_w_4?>" height="99">
<?
if ($view[wr_7]) {
echo conv_content($view[wr_7], $html);
} else {
echo "상품 설명이 없습니다.";
}
?></td>
</tr>
</table></td>
</tr>
<tr height="1"><td></td><td></td></tr>
<tr>
<td bgcolor="#d6e1a7" width="30" valign="top"><img src="<?=$board_skin_path?>/img/item_02.gif" width="30" height="100"></td>
<td width="<?=$view_w_4?>">
<table width="100%" cellspacing="0" cellpadding="0" border="0" valign="top">
<tr>
<td bgcolor="#d6e1a7" width="<?=$view_w_4?>" height="1"></td>
</tr>
<tr>
<td style="padding:5 10 5 10px;" width="<?=$view_w_4?>" height="99">
<?
if ($view[wr_8]) {
echo conv_content($view[wr_8], $html);
} else {
echo "배송 정보가 없습니다.";
}
?></td>
</tr>
</table></td>
</tr>
<tr height="1"><td></td><td></td></tr>
<tr>
<td bgcolor="#f6dbab" width="30" valign="top"><img src="<?=$board_skin_path?>/img/item_03.gif" width="30" height="100"></td>
<td width="<?=$view_w_4?>">
<table width="100%" cellspacing="0" cellpadding="0" border="0" valign="top">
<tr>
<td bgcolor="#f6dbab" width="<?=$view_w_4?>" height="1"></td>
</tr>
<tr>
<td style="padding:5 10 5 10px;" width="<?=$view_w_4?>" height="99">
<?
if ($view[wr_9]) {
echo conv_content($view[wr_9], $html);
} else {
echo "교환 · 반품정보가 없습니다.";
}
?></td>
</tr>
</table></td>
</tr>
<tr height="1"><td></td><td></td></tr>
<tr>
<td bgcolor="#a7dfe1" width="30" valign="top"><img src="<?=$board_skin_path?>/img/item_04.gif" width="30" height="100"></td>
<td width="<?=$view_w_4?>">
<table width="100%" cellspacing="0" cellpadding="0" border="0" valign="top">
<tr>
<td bgcolor="#a7dfe1" width="<?=$view_w_4?>" height="1"></td>
</tr>
<tr>
<td style="padding:0 0 5 10px;" width="<?=$view_w_4?>" height="99">
<?
include_once("./view_comment.php");
?></td>
</tr>
</table></td>
</tr>
</table>
<?=$link_buttons?>
</td></tr></table>
<script language="JavaScript">
// HTML 로 넘어온 <img ... > 태그의 폭이 테이블폭보다 크다면 테이블폭을 적용한다.
function resize_image()
{
var target = document.getElementsByName('target_resize_image[]');
var image_width = parseInt('<?=$board[bo_image_width]?>');
var image_height = 0;
for(i=0; i<target.length; i++) {
// 원래 사이즈를 저장해 놓는다
target[i].tmp_width = target[i].width;
target[i].tmp_height = target[i].height;
// 이미지 폭이 테이블 폭보다 크다면 테이블폭에 맞춘다
if(target[i].width > image_width) {
image_height = parseFloat(target[i].width / target[i].height)
target[i].width = image_width;
target[i].height = parseInt(image_width / image_height);
}
}
}
window.onload = resize_image;
function file_download(link, file)
{
<? if ($board[bo_download_point] < 0) { ?>if (confirm("'"+file+"' 파일을 다운로드 하시면 포인트가 차감(<?=number_format($board[bo_download_point])?>점)됩니다.\n\n포인트는 게시물당 한번만 차감되며 다음에 다시 다운로드 하셔도 중복하여 차감하지 않습니다.\n\n그래도 다운로드 하시겠습니까?"))<?}?>
document.location.href = link;
}
</script>
<!-- 게시글 보기 끝 -->
제 생각에는
imagejpeg()은 php내장함수인데, GD 제대로 설치되어있으면 저런 오류는 나오지 않아야합니다.
list.skin.php 에서는 썸네일 이미지를 생성해서, 썸네일 이미지를 보여주는 거구요.
view.skin.php에서는 썸네일 이미지가 아니라 원본이미지가 보여지는 겁니다. 로직이 다르죠.
소스코드의 문제는 없어보입니다. 전혀 건드리지 않으셨다니 당연한거고요.
먼저 GD가 제대로 설치된건지 확인해보셔야할 듯 합니다.
imagejpeg()은 php내장함수인데, GD 제대로 설치되어있으면 저런 오류는 나오지 않아야합니다.
list.skin.php 에서는 썸네일 이미지를 생성해서, 썸네일 이미지를 보여주는 거구요.
view.skin.php에서는 썸네일 이미지가 아니라 원본이미지가 보여지는 겁니다. 로직이 다르죠.
소스코드의 문제는 없어보입니다. 전혀 건드리지 않으셨다니 당연한거고요.
먼저 GD가 제대로 설치된건지 확인해보셔야할 듯 합니다.
소스는 문제가 없는것 같은데 이상하네요...;; gd는 설치되어 있는 것같은데..아..모르겠습니다..;;
imagecopyresampled 는 정상작동하는데..php 버전때문일지도;;
imagecopyresampled 는 정상작동하는데..php 버전때문일지도;;
혹시 GD 1.8버전이하라면 안되는게 맞습니다..ㅠ
PHP는 PHP Version 4.3.4
GD는 GD Version bundled (2.0.15 compatible)
이렇습니다..이정도면 버전이 낮은건가요?
GD는 GD Version bundled (2.0.15 compatible)
이렇습니다..이정도면 버전이 낮은건가요?
아무리봐도 다른문제는 없는것 같습니다.
심비님 말씀대로 GB가 제대로 설치된건지 확인해보세요. 혼란스럽게 해드려 죄송합니다^^;
심비님 말씀대로 GB가 제대로 설치된건지 확인해보세요. 혼란스럽게 해드려 죄송합니다^^;
