기존 스킨을 받아서 수정해서 사용중입니당!
여기 구문에서 새글이 올라왔을대만 new표시를 할려면 뭐를 건들여야할까요?
<div class="latest">
<p class="title"><strong><? echo $제목; ?> </strong></p>
<?php
include_once("./_common.php");
$tsql = sql_query("select bo_table, wr_id from $g4[board_new_table] where bo_table NOT IN $nobo_table order by bn_id desc limit 0, $new_latest_cnt");
for($i=0; $temp = sql_fetch_array($tsql); $i++) {
$temp1[$i] = $temp;
}
unset($temp);
$right_rolling = "";
foreach($temp1 as $temp) {
$array_new = sql_fetch(" select * from ". $g4['write_prefix'].$temp[bo_table]. " where wr_id = '$temp[wr_id]' ");
//$newlist[$count] = $array_new;
// 이부분이 보드명을 가져오는 겁니다. g4_board는 자신것에 맞게 수정하세요
$que_ = sql_fetch("select * from g4_board where bo_table='$temp[bo_table]' ");
if ($array_new['wr_is_comment'] == 1 )
{
$right_rolling .= "<ul>
<li>ㆍ[".$que_[bo_subject]." _댓글] <a href=\"".$g4['path']."/bbs/board.php?bo_table=$temp[bo_table]&wr_id=$temp[wr_id]\"> ". cut_str($array_new['wr_content'], $sub_num) . "</a>
". substr($array_new['wr_datetime'],5,5) ."
li>
</ul>";
} else {
$right_rolling .= "<ul>
<li>ㆍ[".$que_[bo_subject]."] <a href=\"".$g4['path']."/bbs/board.php?bo_table=$temp[bo_table]&wr_id=$temp[wr_id]\"> ". cut_str($array_new['wr_subject'],$sub_num) . "</a>
". substr($array_new['wr_datetime'],5,5) ."
"</li>
</ul>";
}
}
unset($temp1);
?>
<?= $right_rolling ?>
</div>
고수님들의 답변 점 부탁드리겠습니다 ㅜㅜ;
여기 구문에서 새글이 올라왔을대만 new표시를 할려면 뭐를 건들여야할까요?
<div class="latest">
<p class="title"><strong><? echo $제목; ?> </strong></p>
<?php
include_once("./_common.php");
$tsql = sql_query("select bo_table, wr_id from $g4[board_new_table] where bo_table NOT IN $nobo_table order by bn_id desc limit 0, $new_latest_cnt");
for($i=0; $temp = sql_fetch_array($tsql); $i++) {
$temp1[$i] = $temp;
}
unset($temp);
$right_rolling = "";
foreach($temp1 as $temp) {
$array_new = sql_fetch(" select * from ". $g4['write_prefix'].$temp[bo_table]. " where wr_id = '$temp[wr_id]' ");
//$newlist[$count] = $array_new;
// 이부분이 보드명을 가져오는 겁니다. g4_board는 자신것에 맞게 수정하세요
$que_ = sql_fetch("select * from g4_board where bo_table='$temp[bo_table]' ");
if ($array_new['wr_is_comment'] == 1 )
{
$right_rolling .= "<ul>
<li>ㆍ[".$que_[bo_subject]." _댓글] <a href=\"".$g4['path']."/bbs/board.php?bo_table=$temp[bo_table]&wr_id=$temp[wr_id]\"> ". cut_str($array_new['wr_content'], $sub_num) . "</a>
". substr($array_new['wr_datetime'],5,5) ."
li>
</ul>";
} else {
$right_rolling .= "<ul>
<li>ㆍ[".$que_[bo_subject]."] <a href=\"".$g4['path']."/bbs/board.php?bo_table=$temp[bo_table]&wr_id=$temp[wr_id]\"> ". cut_str($array_new['wr_subject'],$sub_num) . "</a>
". substr($array_new['wr_datetime'],5,5) ."
"</li>
</ul>";
}
}
unset($temp1);
?>
<?= $right_rolling ?>
</div>
고수님들의 답변 점 부탁드리겠습니다 ㅜㅜ;
댓글 4개
new이미지를 조건없이 제목 끝에 붙이려면
if ($array_new['wr_is_comment'] == 1 )
{
$right_rolling .= "<ul>
<li>ㆍ[".$que_[bo_subject]." _댓글] <a href=\"".$g4['path']."/bbs/board.php?bo_table=$temp[bo_table]&wr_id=$temp[wr_id]\"> ". cut_str($array_new['wr_content'], $sub_num) . "</a>
". substr($array_new['wr_datetime'],5,5) ."
<img src='$skin_path/img/icon_new.gif' align='absmiddle'></li>
</ul>";
} else {
$right_rolling .= "<ul>
<li>ㆍ[".$que_[bo_subject]."] <a href=\"".$g4['path']."/bbs/board.php?bo_table=$temp[bo_table]&wr_id=$temp[wr_id]\"> ". cut_str($array_new['wr_subject'],$sub_num) . "</a>
". substr($array_new['wr_datetime'],5,5) ."
<img src='$skin_path/img/icon_new.gif' align='absmiddle'></li>
</ul>";
}
if ($array_new['wr_is_comment'] == 1 )
{
$right_rolling .= "<ul>
<li>ㆍ[".$que_[bo_subject]." _댓글] <a href=\"".$g4['path']."/bbs/board.php?bo_table=$temp[bo_table]&wr_id=$temp[wr_id]\"> ". cut_str($array_new['wr_content'], $sub_num) . "</a>
". substr($array_new['wr_datetime'],5,5) ."
<img src='$skin_path/img/icon_new.gif' align='absmiddle'></li>
</ul>";
} else {
$right_rolling .= "<ul>
<li>ㆍ[".$que_[bo_subject]."] <a href=\"".$g4['path']."/bbs/board.php?bo_table=$temp[bo_table]&wr_id=$temp[wr_id]\"> ". cut_str($array_new['wr_subject'],$sub_num) . "</a>
". substr($array_new['wr_datetime'],5,5) ."
<img src='$skin_path/img/icon_new.gif' align='absmiddle'></li>
</ul>";
}
게시글 목록
| 번호 | 제목 |
|---|---|
| 284438 | |
| 284437 | |
| 284435 | |
| 284430 | |
| 284420 | |
| 284417 | |
| 284409 | |
| 284401 | |
| 284399 | |
| 284397 | |
| 284380 | |
| 284378 | |
| 284371 | |
| 284370 | |
| 284366 | |
| 284364 | |
| 284360 | |
| 284357 | |
| 284355 | |
| 284354 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기