게시판 목록에서 자신이 보고 있는 곳 다르게 표시하기기
본문
수고하십니다.
게시판에서 자신이 읽고 있는 목록을 다르게 표시하고 싶습니다.
첨부 이미지 처럼 읽고 있는 칸은 다른 색상으로 표시가 되는 거죠.
조언 좀 부탁드립니다.
감사합니다.

답변 2
아래의 코드를 한번 참고를 해보세요..
lisk.skin.php
// 현재 보고 있는 게시글 ID 가져오기
$current_wr_id = isset($_GET['wr_id']) ? $_GET['wr_id'] : '';
// 목록 출력 부분
for ($i=0; $i<count($list); $i++) {
// 현재 게시글인지 확인
$is_current = ($current_wr_id && $list[$i]['wr_id'] == $current_wr_id) ? 'current-post' : '';
echo '<tr class="'.$is_current.'">';
// 게시글 내용 출력
echo '</tr>';
}
css
/* 현재 보고 있는 게시글 강조 */
tr.current-post {
background-color: #e8f4ff !important;
border-left: 3px solid #4a90e2;
}
tr.current-post td {
font-weight: 500;
}
/* 호버 효과와 구분 */
tr.current-post:hover {
background-color: #d4e9ff !important;
}

basic 스킨에 기본적으로 열람중으로 표시가 됩니다.
이를 활용해서 class 를 주면 됩니다.
list.skin.php 파일에서 아래 부분 참조해서
<td class="td_num2">
<?php
if ($list[$i]['is_notice']) // 공지사항
echo '<strong class="notice_icon">공지</strong>';
else if ($wr_id == $list[$i]['wr_id'])
echo "<span class=\"bo_current\">열람중</span>";
else
echo $list[$i]['num'];
?>
</td>
아래와 같이 응용하세요.
<?php
for ($i=0; $i<count($list); $i++) {
if ($wr_id == $list[$i]['wr_id']) $lt_class = "open";
elseif ($i%2==0) $lt_class = "even";
else $lt_class = "";
?>