최근게시물 그림밑에 여분필드로 입력한 숫자가 콤마로 변환이 안되네요..그림참조 정보
최근게시물 그림밑에 여분필드로 입력한 숫자가 콤마로 변환이 안되네요..그림참조본문
db에서 int로 변환했구요
1 . <?=number_format($list[$i][wr_1])?>
이렇게 넣어도 안되고
2 . <?=$view[wr_1]=number_format($view[wr_1]); ?>
이렇게 넣어도 안되고
3 . <?=$list[$i][wr_1]=number_format($list[$i][wr_1]);?>
이렇게 넣어도 안되고
★왜 콤마가 안먹을까요...
---------------------------------
그나마 적용이 안되서 일단 이렇게 넣었더니 그냥 나오긴합니다.
<font color=1DB1F7><b>충전가:{$list[$i][wr_1]}원 ▷{$list[$i][wr_6]} ▷{$list[$i][wr_10]}
-------------------------------------
그리고 1번하고 3번하고 뭐가 틀린건가요....
어떤상황에서 1번처럼 해야하고 또 2번처럼 해야 하는건가요
설명좀 부탁드릴께요...
1 . <?=number_format($list[$i][wr_1])?>
이렇게 넣어도 안되고
2 . <?=$view[wr_1]=number_format($view[wr_1]); ?>
이렇게 넣어도 안되고
3 . <?=$list[$i][wr_1]=number_format($list[$i][wr_1]);?>
이렇게 넣어도 안되고
★왜 콤마가 안먹을까요...
---------------------------------
그나마 적용이 안되서 일단 이렇게 넣었더니 그냥 나오긴합니다.
<font color=1DB1F7><b>충전가:{$list[$i][wr_1]}원 ▷{$list[$i][wr_6]} ▷{$list[$i][wr_10]}
-------------------------------------
그리고 1번하고 3번하고 뭐가 틀린건가요....
어떤상황에서 1번처럼 해야하고 또 2번처럼 해야 하는건가요
설명좀 부탁드릴께요...
댓글 전체
http://www.sir.co.kr/bbs/board.php?bo_table=g4_qa&wr_id=13550&sca=&sfl=wr_subject%7C%7Cwr_content&stx=%C4%DE%B8%B6&spt=&page=
미래전산님이 이전에 올리셨던 질문 답변중에 좋은 답변들이 많았는데...
왜 또 물으시는지 모르겠군요. 답변을 해드리면서도 좀 씁쓸하네요.
미래전산님이 이전에 올리셨던 질문 답변중에 좋은 답변들이 많았는데...
왜 또 물으시는지 모르겠군요. 답변을 해드리면서도 좀 씁쓸하네요.
최근게시물에서 하는거 저번에 물어물어 했거든요
저도 저번에 가르쳐준데로 넣었는데 안되네요..
<?=number_format($list[$i][wr_1])?> ★''''저도 맨첨에 이렇게 했는데도 안되요...
그래서 2번도 해도보 3번도 안되서요?
소스
<td style='word-break:break-all;' valign="top" align="left">
<table width='{$td_width}%' cellspacing='0' cellpadding='0' border='0'>
<tr>
<td width='100' height='75' align=center><div style='width:100px; height:75px; position: relative; overflow:hidden;' align=center><a href='{$list[$i][href]}'>{$img}</a></div></td>
<td></td>
<td valign='top'>
<table width='{$td_width}%' cellspacing='0' cellpadding='0' border='0'>
<tr>
<td height='20' style='padding:0 10' valign='top'><a href='{$list[$i][href]}'><strong>{$subject}</strong></a>{$comment_cnt} {$list[$i][icon_new]}</td>
</tr>
<!-- 최근게시물 여분필드 출력 -->
<tr>
<td>
<font color=1DB1F7><b>충전가:<?=number_format($list[$i][wr_1])?>원 </font></td></tr> <!-- ★ 정말 이렇게 해도 안되요 ★ -->
<!-- -->
<td style='padding:0 10' valign='top'><a href='{$list[$i][href]}'>{$wr_content} <!-- 날짜 안나오게<font color='#999999'> <{$list[$i][datetime]}> --> </font></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
HEREDOC;
}
?>
</tr>
</table>
<? } ?>
<? if ($i==1) { ?>
<table width="100
저도 저번에 가르쳐준데로 넣었는데 안되네요..
<?=number_format($list[$i][wr_1])?> ★''''저도 맨첨에 이렇게 했는데도 안되요...
그래서 2번도 해도보 3번도 안되서요?
소스
<td style='word-break:break-all;' valign="top" align="left">
<table width='{$td_width}%' cellspacing='0' cellpadding='0' border='0'>
<tr>
<td width='100' height='75' align=center><div style='width:100px; height:75px; position: relative; overflow:hidden;' align=center><a href='{$list[$i][href]}'>{$img}</a></div></td>
<td></td>
<td valign='top'>
<table width='{$td_width}%' cellspacing='0' cellpadding='0' border='0'>
<tr>
<td height='20' style='padding:0 10' valign='top'><a href='{$list[$i][href]}'><strong>{$subject}</strong></a>{$comment_cnt} {$list[$i][icon_new]}</td>
</tr>
<!-- 최근게시물 여분필드 출력 -->
<tr>
<td>
<font color=1DB1F7><b>충전가:<?=number_format($list[$i][wr_1])?>원 </font></td></tr> <!-- ★ 정말 이렇게 해도 안되요 ★ -->
<!-- -->
<td style='padding:0 10' valign='top'><a href='{$list[$i][href]}'>{$wr_content} <!-- 날짜 안나오게<font color='#999999'> <{$list[$i][datetime]}> --> </font></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
HEREDOC;
}
?>
</tr>
</table>
<? } ?>
<? if ($i==1) { ?>
<table width="100
<!-- 최근게시물 여분필드 출력 -->
<tr>
<td>
<font color=1DB1F7><b>충전가:<?=number_format($list[$i][wr_1])?>원 </font></td></tr> <!-- ★ 정말 이렇게 해도 안되요 ★ -->
+++++++++++++++++++++++
제가 이넘의 HEREDOC을 몰라서 그러는데요
현재 방식대로 하면 절대 안나오지요.....ㅎㅎㅎ
이게 되려나 모르겠네요
{number_format($list[$i][wr_1])}
<tr>
<td>
<font color=1DB1F7><b>충전가:<?=number_format($list[$i][wr_1])?>원 </font></td></tr> <!-- ★ 정말 이렇게 해도 안되요 ★ -->
+++++++++++++++++++++++
제가 이넘의 HEREDOC을 몰라서 그러는데요
현재 방식대로 하면 절대 안나오지요.....ㅎㅎㅎ
이게 되려나 모르겠네요
{number_format($list[$i][wr_1])}
^^ 안되네요~....
사용하신 최신글 소스 좀 알려주세요
예~
---★---
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!$board[bo_4]) alert("해당 게시판 설정 : 여분 필드 4 에 목록에서 보여질 이미지의 폭을 설정하십시오. (픽셀 단위)");
if (!$board[bo_5]) alert("해당 게시판 설정 : 여분 필드 5 에 목록에서 보여질 이미지의 질(quality)을 비율로 설정하십시오. (100 이하)");
if (!$board[bo_8]) alert("게시판 설정 : 여분 필드 8 에 목록에서 내용길이를 입력하십시오.");
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 스킨 입니다.");
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb100';
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
?>
<!-- <?=$board[bo_subject]?> (<?=$board[bo_table]?>) 최신글 시작 -->
<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td>
<? for ($i=0; $i<count($list); $i++) { ?>
<? if ($i==i) { ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<!-- 밑줄라인 ★ <tr><td bgcolor="#EEEEEE" width="100%" height="1"></td></tr> -->
<tr><td height="5"></td></tr>
<tr>
<?
{
if ($i > 0)
echo "<tr><td width=20> </td></tr>";
$img = "<img src='$latest_skin_path/img/no_image.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
break;
$rate = $board[bo_4] / $size[0];
$height = (int)($size[1] * $rate);
$dst = imagecreatetruecolor($board[bo_4], $height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $board[bo_4], $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $board[bo_5]);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' border=0>";
$href = "$g4[bbs_path]/board.php?bo_table=$bo_table";
$subject = "<span $style>".cut_str($list[$i][subject],1000)."</span>";
$wr_content = "<span $style>".cut_str($list[$i][wr_content],$board[bo_8])."</span>";
echo <<<HEREDOC
<td style='word-break:break-all;' valign="top" align="left">
<table width='{$td_width}%' cellspacing='0' cellpadding='0' border='0'>
<tr>
<td width='100' height='75' align=center><div style='width:100px; height:75px; position: relative; overflow:hidden;' align=center><a href='{$list[$i][href]}'>{$img}</a></div></td>
<td></td>
<td valign='top'>
<table width='{$td_width}%' cellspacing='0' cellpadding='0' border='0'>
<tr>
<td height='20' style='padding:0 10' valign='top'><a href='{$list[$i][href]}'><strong>{$subject}</strong></a>{$comment_cnt} {$list[$i][icon_new]}</td>
</tr>
<!-- 최근게시물 여분필드 출력 --> 네잎크로버님 ★★ 1번째 요부분입니다.★ 밑에도 똑같은거 또있구요...
<tr>
<td>
<font color=1DB1F7><b>충전가:{$list[$i][wr_1]}원 ▷{$list[$i][wr_6]} ▷{$list[$i][wr_10]}</font></b></td></tr>
<!-- -->
<td style='padding:0 10' valign='top'><a href='{$list[$i][href]}'>{$wr_content} <!-- 날짜 안나오게<font color='#999999'> <{$list[$i][datetime]}> --> </font></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
HEREDOC;
}
?>
</tr>
</table>
<? } ?>
<? if ($i==1) { ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<?
{
if ($i > 0)
echo "<tr><td width=20> </td></tr>";
$img = "<img src='$latest_skin_path/img/no_image.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
break;
$rate = $board[bo_4] / $size[0];
$height = (int)($size[1] * $rate);
$dst = imagecreatetruecolor($board[bo_4], $height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $board[bo_4], $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $board[bo_5]);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' border=0>";
$href = "$g4[bbs_path]/board.php?bo_table=$bo_table";
$subject = "<span $style>".cut_str($list[$i][subject],1000)."</span>";
$wr_content = "<span $style>".cut_str($list[$i][wr_content],$board[bo_8])."</span>";
echo <<<HEREDOC
<td style='word-break:break-all;' valign="top" align="left">
<table width='{$td_width}%' cellspacing='0' cellpadding='0' border='0'>
<tr>
<td width='100' height='75' align=center><div style='width:100px; height:75px; position: relative; overflow:hidden;' align=center><a href='{$list[$i][href]}'>{$img}</a></div></td>
<td></td>
<td valign='top'>
<table width='{$td_width}%' cellspacing='0' cellpadding='0' border='0'>
<tr>
<td height='20' style='padding:0 10' valign='top'><a href='{$list[$i][href]}'><strong>{$subject}</strong></a>{$comment_cnt} {$list[$i][icon_new]}</td>
</tr>
<!-- 최근게시물 2번째간 여분필드 출력 --> ★★★ 2번째 같은 부분
<tr>
<td>
<font color=1DB1F7><b>충전가:{$list[$i][wr_1]}원 ▷{$list[$i][wr_6]} ▷{$list[$i][wr_10]}</font></b></td></tr>
<!-- -->
<tr>
<td style='padding:0 10' valign='top'><a href='{$list[$i][href]}'>{$wr_content} <!-- 날짜 안나오게 <font color='#999999'><{$list[$i][datetime]}></font> --></td>
</tr>
<tr><td><?=$view[wr_1]?></td></tr>
</table>
</td>
</tr>
</table>
</td>
HEREDOC;
}
?>
</tr>
</table>
<? } ?>
<? if ($i==2) { ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<?
{
if ($i > 0)
echo "<tr><td width=20> </td></tr>";
$img = "<img src='$latest_skin_path/img/no_image.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
break;
$rate = $board[bo_4] / $size[0];
$height = (int)($size[1] * $rate);
$dst = imagecreatetruecolor($board[bo_4], $height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $board[bo_4], $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $board[bo_5]);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' border=0>";
$href = "$g4[bbs_path]/board.php?bo_table=$bo_table";
$subject = "<span $style>".cut_str($list[$i][subject],1000)."</span>";
$wr_content = "<span $style>".cut_str($list[$i][wr_content],$board[bo_8])."</span>";
echo <<<HEREDOC
<td style='word-break:break-all;' valign="top" align="left">
<table width='{$td_width}%' cellspacing='0' cellpadding='0' border='0'>
<tr>
<td width='100' height='75' align=center><div style='width:100px; height:75px; position: relative; overflow:hidden;' align=center><a href='{$list[$i][href]}'>{$img}</a></div></td>
<td></td>
<td valign='top'>
<table width='{$td_width}%' cellspacing='0' cellpadding='0' border='0'>
<tr>
<td height='20' style='padding:0 10' valign='top'><a href='{$list[$i][href]}'><strong>{$subject}</strong></a>{$comment_cnt} {$list[$i][icon_new]}</td>
</tr>
<tr>
<td style='padding:0 10' valign='top'><a href='{$list[$i][href]}'>{$wr_content} <font color='#999999'><{$list[$i][datetime]}></font></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
HEREDOC;
}
?>
</tr>
<tr><td height="5"></td></tr>
<tr><td background="<?=$latest_skin_path?>/img/btn_line_bg.gif" width="520" height="1"></td></tr>
</table>
<? } ?>
<? if ($i<3) { ?>
<? } else { ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20" height="20" align="center" valign="middle"><img src="<?=$latest_skin_path?>/img/board_icon.gif" width="9" height="13"></td>
<td style='word-break:break-all;'>
<?
echo $list[$i][icon_reply] . " ";
echo "<a href='{$list[$i][href]}'>";
if ($list[$i][is_notice])
echo "<font style='font-family:돋움; font-size:9pt; color:#2C88B9;'><strong>{$list[$i][subject]}</strong></font>";
else
echo "<font style='font-family:돋움; font-size:9pt; color:#6A6A6A;'>{$list[$i][subject]}</font>";
echo "</a>";
if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span style='font-family:돋움; font-size:8pt; color:#9A9A9A;'>{$list[$i][comment_cnt]}</span></a>";
// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }
echo " " . $list[$i][icon_new];
?>
</td>
<td align=right><font style=font-size:8pt; color=#999999>[<?=$list[$i][datetime]?>]</font></td>
<td width=15></td>
</tr>
</table>
<? } ?>
<? } ?>
</td></tr></table>
<!-- <?=$board[bo_subject]?> (<?=$board[bo_table]?>) 최신글 끝 -->
--★--
입니다....
---★---
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!$board[bo_4]) alert("해당 게시판 설정 : 여분 필드 4 에 목록에서 보여질 이미지의 폭을 설정하십시오. (픽셀 단위)");
if (!$board[bo_5]) alert("해당 게시판 설정 : 여분 필드 5 에 목록에서 보여질 이미지의 질(quality)을 비율로 설정하십시오. (100 이하)");
if (!$board[bo_8]) alert("게시판 설정 : 여분 필드 8 에 목록에서 내용길이를 입력하십시오.");
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 스킨 입니다.");
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb100';
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
?>
<!-- <?=$board[bo_subject]?> (<?=$board[bo_table]?>) 최신글 시작 -->
<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td>
<? for ($i=0; $i<count($list); $i++) { ?>
<? if ($i==i) { ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<!-- 밑줄라인 ★ <tr><td bgcolor="#EEEEEE" width="100%" height="1"></td></tr> -->
<tr><td height="5"></td></tr>
<tr>
<?
{
if ($i > 0)
echo "<tr><td width=20> </td></tr>";
$img = "<img src='$latest_skin_path/img/no_image.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
break;
$rate = $board[bo_4] / $size[0];
$height = (int)($size[1] * $rate);
$dst = imagecreatetruecolor($board[bo_4], $height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $board[bo_4], $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $board[bo_5]);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' border=0>";
$href = "$g4[bbs_path]/board.php?bo_table=$bo_table";
$subject = "<span $style>".cut_str($list[$i][subject],1000)."</span>";
$wr_content = "<span $style>".cut_str($list[$i][wr_content],$board[bo_8])."</span>";
echo <<<HEREDOC
<td style='word-break:break-all;' valign="top" align="left">
<table width='{$td_width}%' cellspacing='0' cellpadding='0' border='0'>
<tr>
<td width='100' height='75' align=center><div style='width:100px; height:75px; position: relative; overflow:hidden;' align=center><a href='{$list[$i][href]}'>{$img}</a></div></td>
<td></td>
<td valign='top'>
<table width='{$td_width}%' cellspacing='0' cellpadding='0' border='0'>
<tr>
<td height='20' style='padding:0 10' valign='top'><a href='{$list[$i][href]}'><strong>{$subject}</strong></a>{$comment_cnt} {$list[$i][icon_new]}</td>
</tr>
<!-- 최근게시물 여분필드 출력 --> 네잎크로버님 ★★ 1번째 요부분입니다.★ 밑에도 똑같은거 또있구요...
<tr>
<td>
<font color=1DB1F7><b>충전가:{$list[$i][wr_1]}원 ▷{$list[$i][wr_6]} ▷{$list[$i][wr_10]}</font></b></td></tr>
<!-- -->
<td style='padding:0 10' valign='top'><a href='{$list[$i][href]}'>{$wr_content} <!-- 날짜 안나오게<font color='#999999'> <{$list[$i][datetime]}> --> </font></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
HEREDOC;
}
?>
</tr>
</table>
<? } ?>
<? if ($i==1) { ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<?
{
if ($i > 0)
echo "<tr><td width=20> </td></tr>";
$img = "<img src='$latest_skin_path/img/no_image.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
break;
$rate = $board[bo_4] / $size[0];
$height = (int)($size[1] * $rate);
$dst = imagecreatetruecolor($board[bo_4], $height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $board[bo_4], $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $board[bo_5]);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' border=0>";
$href = "$g4[bbs_path]/board.php?bo_table=$bo_table";
$subject = "<span $style>".cut_str($list[$i][subject],1000)."</span>";
$wr_content = "<span $style>".cut_str($list[$i][wr_content],$board[bo_8])."</span>";
echo <<<HEREDOC
<td style='word-break:break-all;' valign="top" align="left">
<table width='{$td_width}%' cellspacing='0' cellpadding='0' border='0'>
<tr>
<td width='100' height='75' align=center><div style='width:100px; height:75px; position: relative; overflow:hidden;' align=center><a href='{$list[$i][href]}'>{$img}</a></div></td>
<td></td>
<td valign='top'>
<table width='{$td_width}%' cellspacing='0' cellpadding='0' border='0'>
<tr>
<td height='20' style='padding:0 10' valign='top'><a href='{$list[$i][href]}'><strong>{$subject}</strong></a>{$comment_cnt} {$list[$i][icon_new]}</td>
</tr>
<!-- 최근게시물 2번째간 여분필드 출력 --> ★★★ 2번째 같은 부분
<tr>
<td>
<font color=1DB1F7><b>충전가:{$list[$i][wr_1]}원 ▷{$list[$i][wr_6]} ▷{$list[$i][wr_10]}</font></b></td></tr>
<!-- -->
<tr>
<td style='padding:0 10' valign='top'><a href='{$list[$i][href]}'>{$wr_content} <!-- 날짜 안나오게 <font color='#999999'><{$list[$i][datetime]}></font> --></td>
</tr>
<tr><td><?=$view[wr_1]?></td></tr>
</table>
</td>
</tr>
</table>
</td>
HEREDOC;
}
?>
</tr>
</table>
<? } ?>
<? if ($i==2) { ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<?
{
if ($i > 0)
echo "<tr><td width=20> </td></tr>";
$img = "<img src='$latest_skin_path/img/no_image.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
break;
$rate = $board[bo_4] / $size[0];
$height = (int)($size[1] * $rate);
$dst = imagecreatetruecolor($board[bo_4], $height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $board[bo_4], $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $board[bo_5]);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' border=0>";
$href = "$g4[bbs_path]/board.php?bo_table=$bo_table";
$subject = "<span $style>".cut_str($list[$i][subject],1000)."</span>";
$wr_content = "<span $style>".cut_str($list[$i][wr_content],$board[bo_8])."</span>";
echo <<<HEREDOC
<td style='word-break:break-all;' valign="top" align="left">
<table width='{$td_width}%' cellspacing='0' cellpadding='0' border='0'>
<tr>
<td width='100' height='75' align=center><div style='width:100px; height:75px; position: relative; overflow:hidden;' align=center><a href='{$list[$i][href]}'>{$img}</a></div></td>
<td></td>
<td valign='top'>
<table width='{$td_width}%' cellspacing='0' cellpadding='0' border='0'>
<tr>
<td height='20' style='padding:0 10' valign='top'><a href='{$list[$i][href]}'><strong>{$subject}</strong></a>{$comment_cnt} {$list[$i][icon_new]}</td>
</tr>
<tr>
<td style='padding:0 10' valign='top'><a href='{$list[$i][href]}'>{$wr_content} <font color='#999999'><{$list[$i][datetime]}></font></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
HEREDOC;
}
?>
</tr>
<tr><td height="5"></td></tr>
<tr><td background="<?=$latest_skin_path?>/img/btn_line_bg.gif" width="520" height="1"></td></tr>
</table>
<? } ?>
<? if ($i<3) { ?>
<? } else { ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20" height="20" align="center" valign="middle"><img src="<?=$latest_skin_path?>/img/board_icon.gif" width="9" height="13"></td>
<td style='word-break:break-all;'>
<?
echo $list[$i][icon_reply] . " ";
echo "<a href='{$list[$i][href]}'>";
if ($list[$i][is_notice])
echo "<font style='font-family:돋움; font-size:9pt; color:#2C88B9;'><strong>{$list[$i][subject]}</strong></font>";
else
echo "<font style='font-family:돋움; font-size:9pt; color:#6A6A6A;'>{$list[$i][subject]}</font>";
echo "</a>";
if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span style='font-family:돋움; font-size:8pt; color:#9A9A9A;'>{$list[$i][comment_cnt]}</span></a>";
// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }
echo " " . $list[$i][icon_new];
?>
</td>
<td align=right><font style=font-size:8pt; color=#999999>[<?=$list[$i][datetime]?>]</font></td>
<td width=15></td>
</tr>
</table>
<? } ?>
<? } ?>
</td></tr></table>
<!-- <?=$board[bo_subject]?> (<?=$board[bo_table]?>) 최신글 끝 -->
--★--
입니다....
$wr_content = "<span $style>".cut_str($list[$i][wr_content],$board[bo_8])."</span>";
echo <<<HEREDOC
<td style='word-break:break-all;' valign="top" align="left">
<table width='{$td_width}%' cellspacing='0' cellpadding='0' border='0'>
<tr>
<td width='100' height='75' align=center><div style='width:100px; height:75px; position: relative; overflow:hidden;' align=center><a href='{$list[$i][href]}'>{$img}</a></div></td>
<td></td>
<td valign='top'>
<table width='{$td_width}%' cellspacing='0' cellpadding='0' border='0'>
<tr>
<td height='20' style='padding:0 10' valign='top'><a href='{$list[$i][href]}'><strong>{$subject}</strong></a>{$comment_cnt} {$list[$i][icon_new]}</td>
</tr>
<!-- 최근게시물 여분필드 출력 --> 네잎크로버님 ★★ 1번째 요부분입니다.★ 밑에도 똑같은거 또있구요...
+++++++++++++++++++++++++++++
위의 잘라낸 소스 맨위줄 아래에 다음 추가하시고요
$wr_1 = ".number_format($list[$i][wr_1]).";
출력부분을 {$wr_1} 으로 바꾸어 보세요
echo <<<HEREDOC
<td style='word-break:break-all;' valign="top" align="left">
<table width='{$td_width}%' cellspacing='0' cellpadding='0' border='0'>
<tr>
<td width='100' height='75' align=center><div style='width:100px; height:75px; position: relative; overflow:hidden;' align=center><a href='{$list[$i][href]}'>{$img}</a></div></td>
<td></td>
<td valign='top'>
<table width='{$td_width}%' cellspacing='0' cellpadding='0' border='0'>
<tr>
<td height='20' style='padding:0 10' valign='top'><a href='{$list[$i][href]}'><strong>{$subject}</strong></a>{$comment_cnt} {$list[$i][icon_new]}</td>
</tr>
<!-- 최근게시물 여분필드 출력 --> 네잎크로버님 ★★ 1번째 요부분입니다.★ 밑에도 똑같은거 또있구요...
+++++++++++++++++++++++++++++
위의 잘라낸 소스 맨위줄 아래에 다음 추가하시고요
$wr_1 = ".number_format($list[$i][wr_1]).";
출력부분을 {$wr_1} 으로 바꾸어 보세요
죄송합니다.. 제가 전체적인 소스를 못보고 부분 적으로 알려주신곳만 보았네요......
---★---
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!$board[bo_4]) alert("해당 게시판 설정 : 여분 필드 4 에 목록에서 보여질 이미지의 폭을 설정하십시오. (픽셀 단위)");
if (!$board[bo_5]) alert("해당 게시판 설정 : 여분 필드 5 에 목록에서 보여질 이미지의 질(quality)을 비율로 설정하십시오. (100 이하)");
if (!$board[bo_8]) alert("게시판 설정 : 여분 필드 8 에 목록에서 내용길이를 입력하십시오.");
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 스킨 입니다.");
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb100';
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
?>
<!-- <?=$board[bo_subject]?> (<?=$board[bo_table]?>) 최신글 시작 -->
<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td>
<? for ($i=0; $i<count($list); $i++) {
$list[$i][wr_1] = number_format($list[$i][wr_1]); ★★★★★★ 원래대로 돌리시고 이 부분만 추가하세요.......죄송합니다.....
?>
---★---
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!$board[bo_4]) alert("해당 게시판 설정 : 여분 필드 4 에 목록에서 보여질 이미지의 폭을 설정하십시오. (픽셀 단위)");
if (!$board[bo_5]) alert("해당 게시판 설정 : 여분 필드 5 에 목록에서 보여질 이미지의 질(quality)을 비율로 설정하십시오. (100 이하)");
if (!$board[bo_8]) alert("게시판 설정 : 여분 필드 8 에 목록에서 내용길이를 입력하십시오.");
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 스킨 입니다.");
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb100';
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
?>
<!-- <?=$board[bo_subject]?> (<?=$board[bo_table]?>) 최신글 시작 -->
<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td>
<? for ($i=0; $i<count($list); $i++) {
$list[$i][wr_1] = number_format($list[$i][wr_1]); ★★★★★★ 원래대로 돌리시고 이 부분만 추가하세요.......죄송합니다.....
?>
[미래전산] -> [쌩초보]
귀한시간 내주셔서 너무감사합니다...
...즐거운 하루 되세요...
질문을 너무 많이 올려 민망한 나머지 이름을 바꿨어요^^
귀한시간 내주셔서 너무감사합니다...
...즐거운 하루 되세요...
질문을 너무 많이 올려 민망한 나머지 이름을 바꿨어요^^