페이징 처리된 나의 최신글에서 질문 정보
페이징 처리된 나의 최신글에서 질문본문
회원 여러분 모두 즐거운 저녁 시간 보내세요.
다름이 아니라, 헐랭이님께서 올려주신 페이징 처리된 나의 최신글을 사용하려고 하는데, 로그인을 안 했을때에 첨부 파일에서 볼수 있는것처럼, 작은 회색의 이미지가 나타납니다.
(위에 있는 첨부파일이 로그인전/아래 있는 첨부 파일이 로그인후입니다.)
질/답을 검색을 해 봐도 이런 문제로 질문을 올리신 분은 안계신것 같습니다.
이것을 로그인을 안 했을때는 안 보이게 하고 싶은데, 혹시 방법이 있겠는지요?
알려주시면 감사드립니다.
아래부터 my_view.php----------------------------
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="7" height="7"><img src="<?=$g4[path]?>/img/line_mid_p1.gif"></td>
<td background="<?=$g4[path]?>/img/line_mid_p5.gif"></td>
<td width="7"><img src="<?=$g4[path]?>/img/line_mid_p2.gif"></td>
</tr>
<tr>
<td background="<?=$g4[path]?>/img/line_mid_p8.gif"></td>
<td>
<?
// 나의 최근게시물
if ($member[mb_id])
{
//환경설정하세요. by 헐랭이
$new_count = 5; //한번에 보여줄 갯수
$page_count = 5; //페이지출력수
$sql2 = " select count(*) as cnt from $g4[board_new_table]
where wr_id = wr_parent and mb_id = '$member[mb_id]' ";
$row2 = sql_fetch($sql2);
$total_count = number_format($row2[cnt]);
$rows = $page_count;
$total_page = ceil($total_count / $rows);
if (!$page) { $page = 1; }
$from_record = ($page - 1) * $rows;
$sql = " select bo_table, wr_parent from $g4[board_new_table] a
where mb_id = '$member[mb_id]'
and a.wr_id = a.wr_parent
group by bo_table, wr_parent
order by bn_id desc limit $from_record, $new_count ";
$res = sql_query($sql);
echo "<table width=95% cellpadding=0 cellspacing=0 align=center>";
echo "<tr height=25><td><img src='$g4[path]/img/list_icon.gif'> <a href='$g4[bbs_path]/new.php?view=w&mb_id=$member[mb_id]'><span style='color:#333333;'><b>나의 최근게시물 ({$total_count}) </b></span></a></td></tr><tr><td height=1 bgcolor=#FF9900></td></tr>";
$list = array();
for ($i=0; $row=sql_fetch_array($res), $i<$new_count; $i++)
{
if (!$row[bo_table])
{
continue;
}
$tmp_table = $g4[write_prefix].$row[bo_table];
$sql2 = " select wr_subject, wr_comment from $tmp_table where wr_id = '$row[wr_parent]' ";
$row2 = sql_fetch($sql2);
$list[$i] = $row2;
$subj = get_text($list[$i][wr_subject]);
$comment = "";
if ($list[$i][wr_comment])
$comment = "<span class=small>({$list[$i][wr_comment]})</span>";
echo "<tr height=23><td class=bg_menu2 title='$subj'>";
echo "<nobr style='display:block;overflow:hidden;width:160px;'>";
echo "<img src='$g4[path]/img/list_icon2.gif'> <a href='$g4[bbs_path]/board.php?bo_table=$row[bo_table]&wr_id=$row[wr_parent]'>";
echo "<span style='color:#666666;'>$comment $subj</span></a>";
echo "</nobr></td></tr>";
// $cnt++;
}
if (!$total_count) {
echo "<tr><td><span style='color:gray;'>게시글이 없습니다.</span></td></tr>";
}else{
echo "<tr><td><span style='color:gray;'>";
$page = get_paging($page_count, $page, $total_page, "?page=");
echo "$page";
echo "</span></td></tr>";
}
echo "</table>\n";
}
?>
</td>
<td background="<?=$g4[path]?>/img/line_mid_p6.gif"></td>
</tr>
<tr>
<td height="7"><img src="<?=$g4[path]?>/img/line_mid_p4.gif"></td>
<td background="<?=$g4[path]?>/img/line_mid_p7.gif"></td>
<td><img src="<?=$g4[path]?>/img/line_mid_p3.gif"></td>
</tr>
</table>
<tr>
<td width="7" height="7"><img src="<?=$g4[path]?>/img/line_mid_p1.gif"></td>
<td background="<?=$g4[path]?>/img/line_mid_p5.gif"></td>
<td width="7"><img src="<?=$g4[path]?>/img/line_mid_p2.gif"></td>
</tr>
<tr>
<td background="<?=$g4[path]?>/img/line_mid_p8.gif"></td>
<td>
<?
// 나의 최근게시물
if ($member[mb_id])
{
//환경설정하세요. by 헐랭이
$new_count = 5; //한번에 보여줄 갯수
$page_count = 5; //페이지출력수
$sql2 = " select count(*) as cnt from $g4[board_new_table]
where wr_id = wr_parent and mb_id = '$member[mb_id]' ";
$row2 = sql_fetch($sql2);
$total_count = number_format($row2[cnt]);
$rows = $page_count;
$total_page = ceil($total_count / $rows);
if (!$page) { $page = 1; }
$from_record = ($page - 1) * $rows;
$sql = " select bo_table, wr_parent from $g4[board_new_table] a
where mb_id = '$member[mb_id]'
and a.wr_id = a.wr_parent
group by bo_table, wr_parent
order by bn_id desc limit $from_record, $new_count ";
$res = sql_query($sql);
echo "<table width=95% cellpadding=0 cellspacing=0 align=center>";
echo "<tr height=25><td><img src='$g4[path]/img/list_icon.gif'> <a href='$g4[bbs_path]/new.php?view=w&mb_id=$member[mb_id]'><span style='color:#333333;'><b>나의 최근게시물 ({$total_count}) </b></span></a></td></tr><tr><td height=1 bgcolor=#FF9900></td></tr>";
$list = array();
for ($i=0; $row=sql_fetch_array($res), $i<$new_count; $i++)
{
if (!$row[bo_table])
{
continue;
}
$tmp_table = $g4[write_prefix].$row[bo_table];
$sql2 = " select wr_subject, wr_comment from $tmp_table where wr_id = '$row[wr_parent]' ";
$row2 = sql_fetch($sql2);
$list[$i] = $row2;
$subj = get_text($list[$i][wr_subject]);
$comment = "";
if ($list[$i][wr_comment])
$comment = "<span class=small>({$list[$i][wr_comment]})</span>";
echo "<tr height=23><td class=bg_menu2 title='$subj'>";
echo "<nobr style='display:block;overflow:hidden;width:160px;'>";
echo "<img src='$g4[path]/img/list_icon2.gif'> <a href='$g4[bbs_path]/board.php?bo_table=$row[bo_table]&wr_id=$row[wr_parent]'>";
echo "<span style='color:#666666;'>$comment $subj</span></a>";
echo "</nobr></td></tr>";
// $cnt++;
}
if (!$total_count) {
echo "<tr><td><span style='color:gray;'>게시글이 없습니다.</span></td></tr>";
}else{
echo "<tr><td><span style='color:gray;'>";
$page = get_paging($page_count, $page, $total_page, "?page=");
echo "$page";
echo "</span></td></tr>";
}
echo "</table>\n";
}
?>
</td>
<td background="<?=$g4[path]?>/img/line_mid_p6.gif"></td>
</tr>
<tr>
<td height="7"><img src="<?=$g4[path]?>/img/line_mid_p4.gif"></td>
<td background="<?=$g4[path]?>/img/line_mid_p7.gif"></td>
<td><img src="<?=$g4[path]?>/img/line_mid_p3.gif"></td>
</tr>
</table>
댓글 전체

<? if ($member[mb_id]) { ?>
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="7" height="7"><img src="<?=$g4[path]?>/img/line_mid_p1.gif"></td>
<td background="<?=$g4[path]?>/img/line_mid_p5.gif"></td>
<td width="7"><img src="<?=$g4[path]?>/img/line_mid_p2.gif"></td>
</tr>
<tr>
<td background="<?=$g4[path]?>/img/line_mid_p8.gif"></td>
<td>
<?
// 나의 최근게시물
//환경설정하세요. by 헐랭이
$new_count = 5; //한번에 보여줄 갯수
$page_count = 5; //페이지출력수
$sql2 = " select count(*) as cnt from $g4[board_new_table]
where wr_id = wr_parent and mb_id = '$member[mb_id]' ";
$row2 = sql_fetch($sql2);
$total_count = number_format($row2[cnt]);
$rows = $page_count;
$total_page = ceil($total_count / $rows);
if (!$page) { $page = 1; }
$from_record = ($page - 1) * $rows;
$sql = " select bo_table, wr_parent from $g4[board_new_table] a
where mb_id = '$member[mb_id]'
and a.wr_id = a.wr_parent
group by bo_table, wr_parent
order by bn_id desc limit $from_record, $new_count ";
$res = sql_query($sql);
echo "<table width=95% cellpadding=0 cellspacing=0 align=center>";
echo "<tr height=25><td><img src='$g4[path]/img/list_icon.gif'> <a href='$g4[bbs_path]/new.php?view=w&mb_id=$member[mb_id]'><span style='color:#333333;'><b>나의 최근게시물 ({$total_count}) </b></span></a></td></tr><tr><td height=1 bgcolor=#FF9900></td></tr>";
$list = array();
for ($i=0; $row=sql_fetch_array($res), $i<$new_count; $i++)
{
if (!$row[bo_table])
{
continue;
}
$tmp_table = $g4[write_prefix].$row[bo_table];
$sql2 = " select wr_subject, wr_comment from $tmp_table where wr_id = '$row[wr_parent]' ";
$row2 = sql_fetch($sql2);
$list[$i] = $row2;
$subj = get_text($list[$i][wr_subject]);
$comment = "";
if ($list[$i][wr_comment])
$comment = "<span class=small>({$list[$i][wr_comment]})</span>";
echo "<tr height=23><td class=bg_menu2 title='$subj'>";
echo "<nobr style='display:block;overflow:hidden;width:160px;'>";
echo "<img src='$g4[path]/img/list_icon2.gif'> <a href='$g4[bbs_path]/board.php?bo_table=$row[bo_table]&wr_id=$row[wr_parent]'>";
echo "<span style='color:#666666;'>$comment $subj</span></a>";
echo "</nobr></td></tr>";
// $cnt++;
}
if (!$total_count) {
echo "<tr><td><span style='color:gray;'>게시글이 없습니다.</span></td></tr>";
}else{
echo "<tr><td><span style='color:gray;'>";
$page = get_paging($page_count, $page, $total_page, "?page=");
echo "$page";
echo "</span></td></tr>";
}
echo "</table>\n";
?>
</td>
<td background="<?=$g4[path]?>/img/line_mid_p6.gif"></td>
</tr>
<tr>
<td height="7"><img src="<?=$g4[path]?>/img/line_mid_p4.gif"></td>
<td background="<?=$g4[path]?>/img/line_mid_p7.gif"></td>
<td><img src="<?=$g4[path]?>/img/line_mid_p3.gif"></td>
</tr>
</table>
<? } ?>
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="7" height="7"><img src="<?=$g4[path]?>/img/line_mid_p1.gif"></td>
<td background="<?=$g4[path]?>/img/line_mid_p5.gif"></td>
<td width="7"><img src="<?=$g4[path]?>/img/line_mid_p2.gif"></td>
</tr>
<tr>
<td background="<?=$g4[path]?>/img/line_mid_p8.gif"></td>
<td>
<?
// 나의 최근게시물
//환경설정하세요. by 헐랭이
$new_count = 5; //한번에 보여줄 갯수
$page_count = 5; //페이지출력수
$sql2 = " select count(*) as cnt from $g4[board_new_table]
where wr_id = wr_parent and mb_id = '$member[mb_id]' ";
$row2 = sql_fetch($sql2);
$total_count = number_format($row2[cnt]);
$rows = $page_count;
$total_page = ceil($total_count / $rows);
if (!$page) { $page = 1; }
$from_record = ($page - 1) * $rows;
$sql = " select bo_table, wr_parent from $g4[board_new_table] a
where mb_id = '$member[mb_id]'
and a.wr_id = a.wr_parent
group by bo_table, wr_parent
order by bn_id desc limit $from_record, $new_count ";
$res = sql_query($sql);
echo "<table width=95% cellpadding=0 cellspacing=0 align=center>";
echo "<tr height=25><td><img src='$g4[path]/img/list_icon.gif'> <a href='$g4[bbs_path]/new.php?view=w&mb_id=$member[mb_id]'><span style='color:#333333;'><b>나의 최근게시물 ({$total_count}) </b></span></a></td></tr><tr><td height=1 bgcolor=#FF9900></td></tr>";
$list = array();
for ($i=0; $row=sql_fetch_array($res), $i<$new_count; $i++)
{
if (!$row[bo_table])
{
continue;
}
$tmp_table = $g4[write_prefix].$row[bo_table];
$sql2 = " select wr_subject, wr_comment from $tmp_table where wr_id = '$row[wr_parent]' ";
$row2 = sql_fetch($sql2);
$list[$i] = $row2;
$subj = get_text($list[$i][wr_subject]);
$comment = "";
if ($list[$i][wr_comment])
$comment = "<span class=small>({$list[$i][wr_comment]})</span>";
echo "<tr height=23><td class=bg_menu2 title='$subj'>";
echo "<nobr style='display:block;overflow:hidden;width:160px;'>";
echo "<img src='$g4[path]/img/list_icon2.gif'> <a href='$g4[bbs_path]/board.php?bo_table=$row[bo_table]&wr_id=$row[wr_parent]'>";
echo "<span style='color:#666666;'>$comment $subj</span></a>";
echo "</nobr></td></tr>";
// $cnt++;
}
if (!$total_count) {
echo "<tr><td><span style='color:gray;'>게시글이 없습니다.</span></td></tr>";
}else{
echo "<tr><td><span style='color:gray;'>";
$page = get_paging($page_count, $page, $total_page, "?page=");
echo "$page";
echo "</span></td></tr>";
}
echo "</table>\n";
?>
</td>
<td background="<?=$g4[path]?>/img/line_mid_p6.gif"></td>
</tr>
<tr>
<td height="7"><img src="<?=$g4[path]?>/img/line_mid_p4.gif"></td>
<td background="<?=$g4[path]?>/img/line_mid_p7.gif"></td>
<td><img src="<?=$g4[path]?>/img/line_mid_p3.gif"></td>
</tr>
</table>
<? } ?>
천상재회님,감사합니다.
잘 됩니다.
편안한 저녁 시간 보내시기 바랍니다.
잘 됩니다.
편안한 저녁 시간 보내시기 바랍니다.