최신글을 이용해 하나의 게시판에서 자신이 쓴글만 불러 올수 있나요? 정보
최신글을 이용해 하나의 게시판에서 자신이 쓴글만 불러 올수 있나요?본문
개인별 페이지를 만들어
특정하나의 게시판에 여러사람이 쓴 글 중에서
자기가 쓴 글만 뿌려주려고 하는데
최신글스킨을 이용해서 하려고 합니다.
최신글은 그 게시판의 모든사용자글을 예컨데 5개씩 출력해 주는거자나요
이건 되는데
자신이 쓴글만 추출하려면 어떻게 하나요
//lastest.skin.php
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
//두줄 최신글
$ia_width = '600'; //테이블폭
?>
<style type="text/css">
<!--
.w_t { font-family:굴림; font-size:9pt; color:#598389; }
.w_s { font-family:굴림; font-size:9pt; color:#676b72; padding-top:4px; padding-left:2px;}
-->
</style>
<table width='<?=$ia_width?>' cellpadding=0 cellspacing=0 border=0 align=center>
<tr>
<td width=11 height=35><img src="<?=$latest_skin_path?>/img/frame_1.gif" width=11 height=35></td>
<td background="<?=$latest_skin_path?>/img/frame_2.gif" align=center valign=bottom>
<table width=97% cellpadding=0 cellspacing=0 border=0>
<tr>
<td height=23 style='padding-top:3px;' class=w_t><img src="<?=$latest_skin_path?>/img/title.gif" width=14 height=15 border=0 align=absMiddle> <b><?=$board[bo_subject]?></b></td>
<td style='padding-top:3px;' align=right><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>' onfocus='this.blur()'><img src="<?=$latest_skin_path?>/img/more.gif" width=33 height=9 border=0 align=absmiddle></a></td>
</tr></table></td>
<td width=11><img src="<?=$latest_skin_path?>/img/frame_3.gif" width=11 height=35></td>
</tr>
<tr>
<td background="<?=$latest_skin_path?>/img/frame_4.gif"></td>
<td valign='top' align=center>
<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr><td height=4 colspan=6 ></td></tr>
<tr><td height=1 colspan=6 bgcolor=#dbe5e2></td></tr>
<tr><td height=2 colspan=6 ></td></tr>
<tr>
<? for ($i=0; $i<count($list); $i++) {
if ($i>0 && $i%2==0) { echo "</tr><tr>"; }
?>
<td width="5"><img width=5 height=1 border=0></td>
<td width="49%" height=24 class=w_s><img src="<?=$latest_skin_path?>/img/icon.gif" width=7 height=7 align=absmiddle>
<?
$style = "";
if ($list[$i][icon_new])
$style = "style='font-family:굴림; font-size:9pt; color:#006F00;' ";
$subject = "<span $style>".cut_str($list[$i][subject],35)."</span>"; //제목 글자수
$image = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
$href = "$g4[bbs_path]/board.php?bo_table=$bo_table";
if (preg_match("/\.(gif|jpg|png)$/i", $image)) {
echo "<a href='{$list[$i][href]}' title='{$list[$i][subject]}' onfocus='this.blur()'><img src='$g4[path]/data/file/$bo_table/$image' width='60' height='40' border=0 ></a>"; // 이미지크기
} else
echo "<a href='{$list[$i][href]}' title='{$list[$i][subject]}' onfocus='this.blur()'><img src='$latest_skin_path/img/no_image.gif' width='60' height='40' border=0></a>";
echo $list[$i][icon_reply] . " ";
echo "<a href='{$list[$i][href]}' title='{$list[$i][subject]}' onfocus='this.blur()'>";
if ($list[$i]['is_notice'])
echo "{$subject}";
else
echo "{$subject}";
if ($list[$i][comment_cnt])
echo " <span style='font-size:8pt; color:#9A9A9A;'>{$list[$i][comment_cnt]}</span>";
echo " " . $list[$i][icon_new];
echo "</a>";
?>
</td>
<td width="5"><img width=5 height=1 border=0></td>
<? } ?>
<?
$cnt = ($i%2);
for ($k=$cnt; $k<2 && $cnt; $k++) {
echo "<td width=5><img width=5 height=1 border=0></td><td width=49%> </td><td width=5><img width=5 height=1 border=0></td>";
}
?>
<? if (count($list) == 0) { ?><td colspan=6 align=center height=150 class=w_s>게시물이 없습니다.</td><? } ?>
</tr>
</table></td>
<td background="<?=$latest_skin_path?>/img/frame_6.gif" ></td>
</tr>
<tr>
<td height=11><img src="<?=$latest_skin_path?>/img/frame_7.gif" width=11 height=11></td>
<td background="<?=$latest_skin_path?>/img/frame_8.gif"></td>
<td><img src="<?=$latest_skin_path?>/img/frame_9.gif" width=11 height=11></td>
</tr>
</table>
특정하나의 게시판에 여러사람이 쓴 글 중에서
자기가 쓴 글만 뿌려주려고 하는데
최신글스킨을 이용해서 하려고 합니다.
최신글은 그 게시판의 모든사용자글을 예컨데 5개씩 출력해 주는거자나요
이건 되는데
자신이 쓴글만 추출하려면 어떻게 하나요
//lastest.skin.php
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
//두줄 최신글
$ia_width = '600'; //테이블폭
?>
<style type="text/css">
<!--
.w_t { font-family:굴림; font-size:9pt; color:#598389; }
.w_s { font-family:굴림; font-size:9pt; color:#676b72; padding-top:4px; padding-left:2px;}
-->
</style>
<table width='<?=$ia_width?>' cellpadding=0 cellspacing=0 border=0 align=center>
<tr>
<td width=11 height=35><img src="<?=$latest_skin_path?>/img/frame_1.gif" width=11 height=35></td>
<td background="<?=$latest_skin_path?>/img/frame_2.gif" align=center valign=bottom>
<table width=97% cellpadding=0 cellspacing=0 border=0>
<tr>
<td height=23 style='padding-top:3px;' class=w_t><img src="<?=$latest_skin_path?>/img/title.gif" width=14 height=15 border=0 align=absMiddle> <b><?=$board[bo_subject]?></b></td>
<td style='padding-top:3px;' align=right><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>' onfocus='this.blur()'><img src="<?=$latest_skin_path?>/img/more.gif" width=33 height=9 border=0 align=absmiddle></a></td>
</tr></table></td>
<td width=11><img src="<?=$latest_skin_path?>/img/frame_3.gif" width=11 height=35></td>
</tr>
<tr>
<td background="<?=$latest_skin_path?>/img/frame_4.gif"></td>
<td valign='top' align=center>
<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr><td height=4 colspan=6 ></td></tr>
<tr><td height=1 colspan=6 bgcolor=#dbe5e2></td></tr>
<tr><td height=2 colspan=6 ></td></tr>
<tr>
<? for ($i=0; $i<count($list); $i++) {
if ($i>0 && $i%2==0) { echo "</tr><tr>"; }
?>
<td width="5"><img width=5 height=1 border=0></td>
<td width="49%" height=24 class=w_s><img src="<?=$latest_skin_path?>/img/icon.gif" width=7 height=7 align=absmiddle>
<?
$style = "";
if ($list[$i][icon_new])
$style = "style='font-family:굴림; font-size:9pt; color:#006F00;' ";
$subject = "<span $style>".cut_str($list[$i][subject],35)."</span>"; //제목 글자수
$image = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
$href = "$g4[bbs_path]/board.php?bo_table=$bo_table";
if (preg_match("/\.(gif|jpg|png)$/i", $image)) {
echo "<a href='{$list[$i][href]}' title='{$list[$i][subject]}' onfocus='this.blur()'><img src='$g4[path]/data/file/$bo_table/$image' width='60' height='40' border=0 ></a>"; // 이미지크기
} else
echo "<a href='{$list[$i][href]}' title='{$list[$i][subject]}' onfocus='this.blur()'><img src='$latest_skin_path/img/no_image.gif' width='60' height='40' border=0></a>";
echo $list[$i][icon_reply] . " ";
echo "<a href='{$list[$i][href]}' title='{$list[$i][subject]}' onfocus='this.blur()'>";
if ($list[$i]['is_notice'])
echo "{$subject}";
else
echo "{$subject}";
if ($list[$i][comment_cnt])
echo " <span style='font-size:8pt; color:#9A9A9A;'>{$list[$i][comment_cnt]}</span>";
echo " " . $list[$i][icon_new];
echo "</a>";
?>
</td>
<td width="5"><img width=5 height=1 border=0></td>
<? } ?>
<?
$cnt = ($i%2);
for ($k=$cnt; $k<2 && $cnt; $k++) {
echo "<td width=5><img width=5 height=1 border=0></td><td width=49%> </td><td width=5><img width=5 height=1 border=0></td>";
}
?>
<? if (count($list) == 0) { ?><td colspan=6 align=center height=150 class=w_s>게시물이 없습니다.</td><? } ?>
</tr>
</table></td>
<td background="<?=$latest_skin_path?>/img/frame_6.gif" ></td>
</tr>
<tr>
<td height=11><img src="<?=$latest_skin_path?>/img/frame_7.gif" width=11 height=11></td>
<td background="<?=$latest_skin_path?>/img/frame_8.gif"></td>
<td><img src="<?=$latest_skin_path?>/img/frame_9.gif" width=11 height=11></td>
</tr>
</table>