여기를 수정하면 될것 같은데 어떻게...ㅜㅡ > 그누4 질문답변

그누4 질문답변

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

여기를 수정하면 될것 같은데 어떻게...ㅜㅡ 정보

여기를 수정하면 될것 같은데 어떻게...ㅜㅡ

본문

<내가 쓴글에 최신 코멘트, 댓글 확인 리스트 스킨>을 설치했습니다.
http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=65553

전체게시판이 포함되던데 원하는 게시판만 지정할 수 있을까요?

$list[$i][bo_table] = $row[bo_table]; ← 여기를 수정하면 될것 같은데 어떻게...ㅜㅡ

조언 부탁드립니다~




------------------------------------------------------------------



<?
include_once("./_common.php");

include_once("$g4[path]/lib/latest.lib.php");

// 비회원 접근제한
if (!$member[mb_id]) {
    alert("접근 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.", "./login.php?wr_id=$wr_id{$qstr}&url=".urlencode("./mylist.php"));
    }

$g4[title] = "나의 게시물 코멘트 확인";
include_once("./_head.php");

if (!$my_date) $my_date = "30"; // 아무런 입력이 없으면 최근 30일로...
$new_icon = 3; // 뉴 아이콘 생성 기간 설정

$rows = 20; // 페이지 목록수 지정


// 현재 페이지 로딩할때 마다 write_mb_id 필드에 코멘트글일 경우 원본글의 작성자 id값을 등록해준다.
// 코멘트 입력시 마다 서버에 저장하는 방식을 취할수도 있다.


$sqlc = " SELECT * from $g4[board_new_table] WHERE wr_id <> wr_parent AND write_mb_id = ''"; 
$resultc = mysql_query($sqlc);

for ($i=0; $rowc = sql_fetch_array($resultc); $i++){
    $sql8 = "SELECT * from $g4[write_prefix]$rowc[bo_table] where wr_id = '$rowc[wr_parent]' ";
    $row8 = sql_fetch($sql8);

    if ($row8[wr_is_comment] == '0') { // 코멘트가 아닌경우
        sql_fetch(" UPDATE $g4[board_new_table] set write_mb_id = '$row8[mb_id]' where bn_id = '$rowc[bn_id]' ");
    }
}


// $today = getdate();

// 30일간의 기간 설정
$before_time = date("Y-m-d H:i:s", $g4[server_time] - (86400 * $my_date));


// 최신 코멘트 new 아이콘 생성관련 기간 설정
$newicon_time = date("Y-m-d H:i:s", $g4[server_time] - (86400 * $new_icon));

$sql_common = " from $g4[board_new_table] a, $g4[board_table] b, $g4[group_table] c
                where a.bo_table = b.bo_table and b.gr_id = c.gr_id and b.bo_use_search = '1'
        and a.wr_id <> a.wr_parent
and a.write_mb_id = '$member[mb_id]' 
and a.bn_datetime > '$before_time'
ORDER BY a.bn_datetime DESC";

// 총 게시물 갯수 파악 및 페이징 사전 처리
$sqlm = " select count(*) as cnt $sql_common ";
$rowm = sql_fetch($sqlm);
$total_countm = $rowm[cnt];


$total_page  = ceil($total_countm / $rows);  // 전체 페이지 계산
if (!$page) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함



$list = array();
$sql = " select a.*, b.bo_subject, c.gr_subject, c.gr_id
          $sql_common
          limit $from_record, $rows ";
$result = sql_query($sql);


for ($i=0; $row=sql_fetch_array($result); $i++)
{
    $tmp_write_table = $g4[write_prefix] . $row[bo_table];


        $comment = "[코] ";
        $comment_link = "#c_{$row[wr_id]}";
        $row2 = sql_fetch(" select * from $tmp_write_table where wr_id = '$row[wr_parent]' ");
        $row3 = sql_fetch(" select mb_id, wr_name, wr_email, wr_homepage, wr_datetime from $tmp_write_table where wr_id = '$row[wr_id]' ");
        $list[$i] = $row2;
        $list[$i][mb_id] = $row3[mb_id];
        $list[$i][wr_name] = $row3[wr_name];
        $list[$i][wr_email] = $row3[wr_email];
        $list[$i][wr_homepage] = $row3[wr_homepage];

        $name = get_sideview($row3[mb_id], cut_str($row3[wr_name], $config[cf_cut_name]), $row3[wr_email], $row3[wr_homepage]);
        // 당일인 경우 시간으로 표시함
        $datetime = substr($row3[wr_datetime],0,10);
        $datetime2 = $row3[wr_datetime];
        if ($datetime == $g4[time_ymd])
            $datetime2 = substr($datetime2,11,5);
        else
            $datetime2 = substr($datetime2,5,5);


        if($row[bn_datetime] > $newicon_time)
    {  $list[$i][newicon] = "<img src='http://freemovie2.com/skin/board/basic/img/icon_new.gif'>";
}else{ $list[$i][newicon] = '';  }

        $list[$i][gr_id] = $row[gr_id];
        $list[$i][bo_table] = $row[bo_table];
        $list[$i][name] = $name;
        $list[$i][comment] = $comment;
        $list[$i][href] = "./board.php?bo_table=$row[bo_table]&wr_id=$row2[wr_id]{$comment_link}";
        $list[$i][datetime] = $datetime;
        $list[$i][datetime2] = $datetime2;
        $list[$i][gr_subject] = $row[gr_subject];
        $list[$i][bo_subject] = $row[bo_subject];
        $list[$i][wr_subject] = $row2[wr_subject];
}



$write_pages = get_paging($config[cf_write_pages], $page, $total_page, "?gr_id=$gr_id&view=$view&page=");

// 최근게시물 스킨을 불러와서 처리할수도 있고 그냥 한 화일에서 처리할수도있습니다.
//$new_skin_path = "$g4[path]/skin/new/$config[cf_new_skin]";

echo "<script language=\"javascript\" src=\"$g4[path]/js/sideview.js\"></script>\n";
$color = array('#669999');
 shuffle($color);

  for( $i = 0; $i < 1; $i++ )
{
    $ran_color = $color[$i];
    }
?>

<style>
.n_title1 { font-family:굴림;돋움; font-size:9pt; color:#FFFFFF; }
.n_title2 { font-family:굴림;돋움; font-size:9pt; color:<? echo $ran_color?>; }
.line_bg {background-color: <? echo $ran_color?>; filter: Alpha(Opacity=60); -moz-opacity:0.6;}
</style>


<table width="100%" align="center" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">

<tr><td>* 최근 <?=$my_date?> 일 동안 <b><font color='#555555'><?=$member[mb_name]?></font></b> 님의 게시글에 달린 코멘트는  <b><font color='#555555'><?=$total_countm?></font></b> 건 입니다.

<tr>
    <td>
<table width="100%" border="0" cellpadding="0" cellspacing="5" bgcolor="#f9f9f9">
<tr>
  <td bgcolor="#dddddd">
  <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="5"></td>
  </tr>
  <tr>
    <td height="100" valign="top">

<!-- 제목 시작 -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<?php
for ($i=0; $i<count($list); $i++)
{
    $gr_subject = cut_str($list[$i][gr_subject], 50);
    $bo_subject = cut_str($list[$i][bo_subject], 50);
    $wr_subject = get_text(cut_str($list[$i][wr_subject], 50));
    $list[$i][name] = strip_tags($list[$i][name]);

    echo <<<HEREDOC
<tr>
    <!--<td align="center" height="30" colspan=3><a href='./group.php?gr_id={$list[$i][gr_id]}'  title='{$list[$i][gr_subject]}'><font class='n_title2'><B>{$gr_subject}</B></font></a></td>-->
    <td style="padding-left: 10px;" align="left" height="25"><a href='./board.php?bo_table={$list[$i][bo_table]}' title='{$list[$i][bo_subject]}'><font style='color:#3399CC;'>+&nbsp;<B>{$bo_subject}</B></font></a>&nbsp;<a href='{$list[$i][href]}' title='{$list[$i][wr_subject]}'>&nbsp;&nbsp;&nbsp;&nbsp;{$list[$i][comment]}{$wr_subject}</a>&nbsp;&nbsp;<font style='font-size:8pt;font-family:tahoma;color:#555555;'> {$list[$i][datetime2]}</font>&nbsp;&nbsp;<font style='font-size:8pt;font-family:tahoma;color:#0099CC; text-align=right;'> {$list[$i][name]} </font> </td>
  </tr>
<tr>
    <td colspan="4" height="1" bgcolor="#F8F8F8"></td>
</tr>
HEREDOC;
}

if ($i == 0) { ?>
<tr><td height=50 align=center>최근 등록된 댓글이 없습니다.</td></tr>
<? } ?>

<tr>
    <td colspan="9" height="50" align="center"><?=$write_pages?></td>
</tr>
</table>

</td>
  </tr>
  <tr>
    <td height="3"></td>
  </tr>
</table>
 </td>
  </tr>
    </table>
    </td>
  </tr>
</table>
</td>
  </tr>
</table>

<?
include_once("./_tail.php");
?>

댓글 전체

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

회원로그인

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