소스 문의 드립니다.

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>

<table width="800" cellpadding=0 cellspacing=0 border=0><tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<!-- <tr><td height=10></td></tr> -->
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
<td align="center">

<? // View
$table = "01_3";
$wr_id = $list[$i]['wr_id'];
$href = "$g4[bbs_path]/link.php?bo_table={$table}&wr_id=$wr_id&no=1";
sql_query(" update {$g4[write_prefix]}{$table} set wr_3 = wr_3 + 1 where wr_id = '$wr_id' ");
echo "<a href='$href' target='_blank'>";
$image = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
if (preg_match("/\.(gif|jpg|png)$/i", $image)) { ?>
<img src='<?=$g4[path]?>/data/file/<?=$bo_table?>/<?=$image?>' width='150' height='50' border='0'></a>
<? } else { ?>
<img src='<?=$latest_skin_path?>/img/noimage.gif' width='150' height='50' border='0'></a><br>
<? } ?>

</td>
</tr>
<? } ?>
</table>
</td></tr></table>
|

댓글 4개

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>

<table width="800" cellpadding=0 cellspacing=0 border=0><tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<!-- <tr><td height=10></td></tr> -->
<?
for ($i=0; $i<count($list); $i++) {
if ($i%3==0) echo "</tr><tr>"; //가로로 3개씩 나열되는 코드 설명 드리자면 i 가 3의 배수이면 한줄을 닫고 한줄을 열어 준다는 의미입니다. ^^
?>
알려주신대로 해봤는데 안되네요...아래와 같은이 넣어주는거 아닌가요?

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>

<table width="800" cellpadding=0 cellspacing=0 border=0><tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<!-- <tr><td height=10></td></tr> -->
<?
for ($i=0; $i<count($list); $i++) {
if ($i%3==0) echo "</tr><tr>";
?>
<tr>
<td align="center">

<? // View
$table = "01_3";
$wr_id = $list[$i]['wr_id'];
$href = "$g4[bbs_path]/link.php?bo_table={$table}&wr_id=$wr_id&no=1";
sql_query(" update {$g4[write_prefix]}{$table} set wr_3 = wr_3 + 1 where wr_id = '$wr_id' ");
echo "<a href='$href' target='_blank'>";
$image = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
if (preg_match("/\.(gif|jpg|png)$/i", $image)) { ?>
<img src='<?=$g4[path]?>/data/file/<?=$bo_table?>/<?=$image?>' width='150' height='50' border='0'></a>
<? } else { ?>
<img src='<?=$latest_skin_path?>/img/noimage.gif' width='150' height='50' border='0'></a><br>
<? } ?>

</td>
</tr>
<? } ?>
</table>
</td></tr></table>
답변좀 부탁드립니다~~~ 계속 보고 있어요~~~ ㅜㅜ
아 죄송함니다.

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>

<table width="800" cellpadding=0 cellspacing=0 border=0><tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<!-- <tr><td height=10></td></tr> -->
<? for ($i=0; $i<count($list); $i++) { ?>


<? if ($i%3==0) echo "</tr><tr>"; //가로로 3개씩 나열되는 코드 설명 드리자면 i 가 3의 배수이면 한줄을 닫고 한줄을 열어 준다는 의미입니다. ^^
?>

<tr> 이 루프에서 사용되면 않됨니다.... 그럼 전 100% 된다는 확신으로 이만 자러 가요... ^^

약주를 좀 한 관계로.. 이만..~~
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
17년 전 조회 900
17년 전 조회 739
17년 전 조회 971
17년 전 조회 1,206
17년 전 조회 798
17년 전 조회 969
17년 전 조회 995
17년 전 조회 1,292
17년 전 조회 842
17년 전 조회 756
17년 전 조회 726
17년 전 조회 770
17년 전 조회 820
17년 전 조회 963
17년 전 조회 800
17년 전 조회 790
17년 전 조회 779
17년 전 조회 1,186
17년 전 조회 729
17년 전 조회 798