지식인 게시판 view_comment 문제 질문합니다. > 그누4 질문답변

그누4 질문답변

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

지식인 게시판 view_comment 문제 질문합니다. 정보

지식인 게시판 view_comment 문제 질문합니다.

첨부파일

view_comment.skin.php (20.4K) 4회 다운로드 2010-10-28 12:30:02

본문

http://www.geeyoung.com/bbs/board.php?bo_table=B51

현재 그림장수님의 지식인 게시판을 이용하여 홈페이지를 구성하고 있는데
이상하게 1페이지에선 글을클릭하면 답변이 정상적으로 보이지만
2페이지를 넘어가게 되면 답변이 보이지 않고 1로 보이고 6페이지를 넘어가면

처음 이전 다음 끝

이렇게 나옵니다.ㅠㅠ
문제점이 무엇인지 궁금하네요.

분명 view_comment.skin.php 이쪽의 문제인데 제 능력으론 분석조차 힘듭니다.
파일과 의심가는 부분 올려봅니다.

---------
unset($list);

if (!$is_comments) {

$sql = " select * from $write_table where wr_parent = '$wr_id' and wr_is_comment = 1 order by  wr_10, wr_id desc ";
$result = mysql_query($sql);
$total_row = mysql_num_rows($result); //전체 개시물

$php_self = $PHP_SELF . "?bo_table=$bo_table&wr_id=$wr_id";

if (!$page) $page = 1;

$page_page = 5; //한화면에 표시할 페이지 수

$page_list = 10; //한화면에 표시할 게시물 수

$pages = $page_list * ($page-1); // 한화면에 출력 되어지는 개시물

$total_page = ceil($total_row / $page_list); //총페이지 수

$total_pp = ceil($total_page / $page_page); //총 다중 페이지 수

$now_pp =intval(($page-1) / $page_page);

$first_page = ($now_pp * $page_page); //처음 다중 페이지

$first_page_next = $first_page + $page_page; //한 화면에 출력한 다중 페이지의 갯수

if ($first_page_next >= $total_page) $first_page_next = $total_page;

$sql .= " limit $pages, $page_list ";
$result = mysql_query($sql);

for ($i=0; $row=sql_fetch_array($result); $i++) {
    $list[$i] = $row;

    $tmp_name = get_text(cut_str($row[wr_name], $config[cf_cut_name])); // 설정된 자리수 만큼만 이름 출력
    if ($board[bo_use_sideview])
        $list[$i][name] = get_sideview($row[mb_id], $tmp_name, $row[wr_email], $row[wr_homepage]);
    else
        $list[$i][name] = "<span class='".($row[mb_id]?'member':'guest')."'>$tmp_name</span>";


    $list[$i][content] = $list[$i][content1]= "비밀글 입니다.";
    if (!strstr($row[wr_option], "secret") ||
        $is_admin ||
        ($write[mb_id]==$member[mb_id] && $member[mb_id]) ||
        ($row[mb_id]==$member[mb_id] && $member[mb_id])) {
        $list[$i][content1] = $row[wr_content];
        $list[$i][content] = conv_content($row[wr_content], 0, 'wr_content');
        $list[$i][content] = search_font($stx, $list[$i][content]);
    }

    $list[$i][trackback] = url_auto_link($row[wr_trackback]);
    $list[$i][datetime] = substr($row[wr_datetime],2,14);

    // 관리자가 아니라면 중간 IP 주소를 감춘후 보여줍니다.
    $list[$i][ip] = $row[wr_ip];
    if (!$is_admin)
        $list[$i][ip] = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", "\\1.♡.\\3.\\4", $row[wr_ip]);

    $list[$i][is_reply] = false;
    $list[$i][is_edit] = false;
    $list[$i][is_del]  = false;
    if ($is_comment_write || $is_admin)
    {
        if ($member[mb_id])
        {
            if ($row[mb_id] == $member[mb_id] || $is_admin)
            {
                $list[$i][del_link]  = "./delete_comment.php?bo_table=$bo_table&comment_id=$row[wr_id]&cwin=$cwin&page=$page".$qstr;
                $list[$i][is_edit]  = true;
                $list[$i][is_del]    = true;
            }
        }
        else
        {
            if (!$row[mb_id]) {
                $list[$i][del_link] = "./password.php?w=x&bo_table=$bo_table&comment_id=$row[wr_id]&cwin=$cwin&page=$page".$qstr;
                $list[$i][is_del]  = true;
            }
        }

        if (strlen($row[wr_comment_reply]) < 5)
            $list[$i][is_reply] = true;
    }

    // 05.05.22
    // 답변있는 코멘트는 수정, 삭제 불가
    if ($i > 0 && !$is_admin)
    {
        if ($row[wr_comment_reply])
        {
            $tmp_comment_reply = substr($row[wr_comment_reply], 0, strlen($row[wr_comment_reply]) - 1);
            if ($tmp_comment_reply == $list[$i-1][wr_comment_reply])
            {
                $list[$i-1][is_edit] = false;
                $list[$i-1][is_del] = false;
            }
        }
    }
}

$strs = "<table height=30 align=center cellpadding='0' cellspacing='0' border='0'>";

if ($total_row > 0) {

$first = 0;
//처음 버튼
if ($now_pp != 0) {
$strs .= "<td width='30' align='center'><a href='$php_self&page=$first'>처음</a></td>";
}

$prev = ($now_pp - 1) * ($page_page + 1);
//이전 버튼
if ($now_pp != 0) {
$strs .= "<td width='30' align='center'><a href='$php_self&page=$prev'>이전</a></td>";
}

for ($i=$first_page; $i<$first_page_next; $i++) {
if ($i+1==$first_page_next) $dot = ""; else $dot = " | ";

if ($i==$page-1) {
$strs .= "<td align=center width=30><span style='text-decoration:underline;font-weight:bold;font-size:10pt;'>".($i+1)."</span></td><td width=10 align=center>$dot</td>";
}else{
$strs .= "<td align=center width=30><a href='$php_self&page=".($i+1)."'><span style='color:#999999;font-weight:bold;font-size:10pt;'>".($i+1)."</span></a></td><td width=10 align=center>$dot</td>";
}
}

$next = ($now_pp+1) * ($page_page+1);
//다음 버튼
if ($now_pp!=$total_pp-1) {
$strs .= "<td width='30' align='center'><a href='$php_self&page=$next'>다음</a></td>";
}

$end = $total_page;
//마지막 버튼
if ($now_pp!=$total_pp-1) {
$strs .= "<td width='30' align='center'><a href='$php_self&page=$end'>끝</a></td>";
}
}

$strs .= "</table>";
?>

-----

부탁드리겠습니다.ㅠㅠ

댓글 전체

전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT