최신글의 리스트링크시 PHPSESSID에 대한 질문 > 그누3질답

그누3질답

최신글의 리스트링크시 PHPSESSID에 대한 질문 정보

그누보드 최신글의 리스트링크시 PHPSESSID에 대한 질문

본문

3.24까지는 괜찮았는데 그이후 버전부터 처음부라우져를 킨다음에
최신글의 제목의 링크경로가
  http://www.홈페이지주소/그누폴더/?PHPSESSID=fe078cef8049d7303c000453723fcd4a
이런식으로 나타나서 위의 링크를 클릭하면 첫페이지가 다시뜨고 그다음부터는 제대로 됩니다.
처음에 그누보드 최신글 어느 링크든지 한번만 클릭을 한 후에 다시 첫페이지에서 그 링크를 보면 경로가 제대로 떠서 이상이 없어진다는 말씀이죠. (글이 복잡한느낌.. )
 
basic스킨에서는 아무이상이 없는데 예전에 받았던 최신글  스킨일부에서만 이런 현상이 나타납니다.

아래는 스킨소스입니다.


<table width=100% cellpadding=0 cellspacing=1>
<tr><td colspan=3 height=1 background='./<?=$cfg[bbs_dir]?>/line.gif'></td></tr>
<tr class='subject subjectbg ht'><td colspan=3 align=center><a href='<?="./?doc=bbs/gnuboard.php&bo_table=$bo_table"?>'><?=$bo_subject?></a></td></tr>
<tr><td colspan=3 height=1 background='./<?=$cfg[bbs_dir]?>/line.gif'></td></tr>

<? for ($i=0; $i<count($list); $i++) { ?>
<? if ($i==0){?>
<tr height=22>
<td width=70 align=center> <font color=gray><?=$list[$i][date]?></font></td><td><a href=
'<?="./?doc=bbs/gnuboard.php&bo_table=$bo_table&wr_id={$list[$i][wr_id
]}"?>'><?=$list[$i][subject]?></a> </td>

</tr>
</table>
<table width=100% cellpadding=0 cellspacing=0>
<tr height=44><td> <img src='<?=$list[$i][file_image1]?>' width=135 height=85 bo
rder=0 vspace="2" hspace="5"></td>
<td><?=nl2br(stripslashes(cut_str($list[$i][content], 210, '....' )))?></td>

</tr>
</table>
<!-- 경계선 -->
<table width=100%><tr bgcolor=gray height=1><td></td></tr></table>

<? }else{?>
<table width=100% cellpadding=0 cellspacing=0>
<tr height=22>
<td width=70 align=center><font color=gray><?=$list[$i][date]?></font></td><td><?=$list[$i][icon_new]?><a href=
'<?="./?doc=bbs/gnuboard.php&bo_table=$bo_table&wr_id={$list[$i][wr_id
]}"?>'><?=$list[$i][subject]?></a></td>
<tr><td colspan=8 height=1 background='./<?=$cfg[bbs_dir]?>/line.gif'></td></tr>
 
</tr>
<? } ?>
<? } ?>

<? if (count($list) == 0) { echo "<tr><td colspan=3 align=center height=50>자료가 없습니다.</td></tr>"; } ?>
</table>


그동안 업그레이와중에 수정한 파일들이 많고 정신이 없어서 3.26버전으로 새로 깔봤는데 똑같은 현상이 나타나내요. (괜한 헛수고한것 같은 느낌.. 허~~)
 
원인을 아시는분께서는 답변좀 부탁드립니다.
  • 복사

댓글 전체

emoticon_113흐르는 구름님 답변감사합니다.  불행히도 똑같은 현상이 나타나는군요..
3.26 패치까지 모두해봤는데요.  basic 스킨은 되니까 그것을 가지고 새로 만들어봐야겠습니다.  원인을 꼭알고 싶은데..
lib/latest.lib.php 입니다. 비교해 보시고 사용해 보시기 바랍니다.
위의 뿌려주신 소스는 이상이 없습니다. 3.26 사용중 입니다.

뒤부분에 붙는것에 대해서 ....
제가 겪은 바로는 ....

스킨자료실에 KSN님이 링크를 걸으셨는데 ....
링크주소를(주소는 짧죠)클릭하면 PHP어쩌고저쩌고가 뒤에 붙더군요.
그러려니 했는데 ....

KSN님 께서 해킹도(?) 하시냐며 궁금해 하시더군요. 며칠 지나지 않아서
관리자 권한획득에 관련된 버그가 패치가 되었던걸로 기억 됩니다. 요즘도
가끔 하위버전의 그누보드가 설치된 사이트를 다니다 보면 PHP어쩌고저쩌고
가 눈에 보이기도 하더군요. 차근히 점검해 보시기 바랍니다.

자료실을 한번 둘러 보시는것도 좋을듯 합니다.

<?
if (defined(__FILE__)) return;
define(__FILE__, TRUE);

//==============================================================================
//  최신글 관련 함수
//==============================================================================

// 최신글 추출
function latest($skin_dir='', $bo_table, $rows=10, $len=40)
{
    global $latest_skin, $cfg;

    $tmp_latest_skin = $latest_skin;

    // 스킨디렉토리값이 넘어왔다면
    if ($skin_dir) {
        $latest_skin = "./$cfg[bbs_dir]/skin/latest/$skin_dir";
    }

    $sql = " select * from $cfg[table_board] where bo_table = '$bo_table' ";
    $bo = sql_fetch($sql);
    $bo_subject = $bo[bo_subject];

    $sql = " select *
              from {$cfg[write_table_prefix]}{$bo_table}
              where wr_comment = 0
              order by wr_id desc limit 0, $rows ";
    $result = sql_query($sql);
    for ($i=0; $row = mysql_fetch_array($result); $i++) {
        $list[$i] = $row;

        $list[$i][href] = "./?doc=$cfg[bbs_dir]/gnuboard.php&bo_table=$bo_table&wr_id=$row[wr_id]";

        // 코멘트 카운트
        $list[$i][commentcnt] = "";
        if ($row[wr_commentcnt] > 0) {
            $list[$i][commentcnt] = "($row[wr_commentcnt])";
        }

        $list[$i][name] = gblayer($row[mb_id], cut_str($row[wr_name],10), $row[wr_email], $row[wr_homepage]);
        $list[$i][subject] = conv_subject($row[wr_subject], $len,"...");
        $list[$i][content] = ($row[wr_content]);
$list[$i][date] = substr($row[wr_datetime],2,8);

        $list[$i][icon_new] = "";
        if ($row[wr_datetime] >= date("Y-m-d H:i:s", time() - $bo[bo_new] * 3600)) {
            $list[$i][icon_new] = "<img src='$latest_skin/icon_new.gif' align=absmiddle> ";
        }

        for ($k=1; $k<=$cfg[file_count]; $k++) {
            if (@preg_match($cfg[image_extension], $row["wr_file".$k])) {
                $list[$i]["file_image".$k] = "./data/file/$bo_table/" . $row["wr_file".$k];
            }
        }

        for ($k=1; $k<=$cfg[link_count]; $k++) {
            if ($row["wr_link".$k]) {
                $link[$i]["link".$k] = set_http(get_text(cut_str($row["wr_link".$k], 255)));
                $link[$i]["link_href".$k] = "./?doc=$cfg[bbs_dir]/gblink.php&$qstr&wr_id=$row[wr_id]&index=$k";
            }
        }
    }
    mysql_free_result($result);
   
    include "$latest_skin/latest.skin.php";

    $latest_skin = $tmp_latest_skin;
}
?>
© SIRSOFT
현재 페이지 제일 처음으로