최근게시물로 호출한 게시물의 wr_id를 출력하려면 어떻게해야 되나요?
본문
안녕하세요. :)
최근게시물로 호출한 게시물의 wr_id가 필요한데요.
<? echo latest ('latest', 'notice', 5, 45); ?> 이렇게 호출하였을때,
"35,67,32,10,5" 이런식으로 wr_id 값이 배열되어 나오게 하려고 해요
도움 부탁 드려요.
<?
echo latest ('latest', 'notice', 5, 45);
echo "$latest_w_id"; ->임의로 정한 wr_id 호출변수에요.
?>
답변 1
<?=$list[$i][wr_1]?> 이렇게 사용하시면 됩니다,
제가 예전에 만들어서 쓴 최근글 스킨이에요
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="padding:10 0 0 0;">
<tr>
<td width="140" align="center">접수일</td>
<td width="140" align="center">고객명</td>
<td width="140" align="center">구분</td>
<td align="center">세탁내용</td>
<td width="140" align="center">일반전화</td>
<td width="140" align="center">휴대전화</td>
<td width="140" align="center">접수상황</td>
</tr>
</table>
<hr width="1000">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
<td align="center">
<table width="100%">
<tr>
<td width="140" align="center"><?=$list[$i][datetime]?>
<!--<a href="<?=$list[$i][href]?>"><?
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']}>"; }
?></a>--></td>
<td width="140" align="center"><a href="<?=$list[$i][href]?>"><?=$list[$i][name]?></a></td>
<td width="140" align="center"><a href="<?=$list[$i][href]?>"><?=$list[$i][wr_1]?></a></td>
<td align="center"><a href="<?=$list[$i][href]?>"><?=$list[$i][wr_2]?></a></td>
<td width="140" align="center"><a href="<?=$list[$i][href]?>"><?=$list[$i][wr_4]?></a></td>
<td width="140" align="center"><a href="<?=$list[$i][href]?>"><?=$list[$i][wr_5]?></a></td>
<td width="140" align="center"><a href="<?=$list[$i][href]?>"><?=$list[$i][wr_3]?></a></td>
</tr>
</table>
</td>
</tr>
<? } ?>
<? if (count($list) == 0) { ?><tr>
<td align=center height=50><font color=#6A6A6A>게시물이 없습니다.</a></td>
</tr><? } ?>
</table>
답변을 작성하시기 전에 로그인 해주세요.