1:1문의를 최신글로 출력해보기
<?php
$qa_latest_skin_url = G5_THEME_URL."/skin/latest/basic/"; //테마를 사용하며 최신글 베이직 스킨을 사용할때의 경로
add_stylesheet('<link rel="stylesheet" href="'.$qa_latest_skin_url.'/style.css">', 0); //스타일시트를 적용
$rows = "5"; // 출력시킬 최신글 갯수
$sql = " select * from {$g5['qa_content_table']} where qa_type = 0 order by qa_id desc limit 0, {$rows} ";
$result = sql_query($sql);
?>
<div class="lt">
<strong class="lt_title"><a href="<?php echo G5_BBS_URL ?>/qalist.php">1:1문의</a></strong>
<ul>
<?php for ($i=0; $row = sql_fetch_array($result); $i++) {
// 오늘을 불러옵니다.
$intime = date("Y-m-d H:i:s", time() - (int)(60 * 60 * 24)); ?>
<li>
<a href="<?php echo G5_BBS_URL ?>/qaview.php?qa_id=<?php echo $row[qa_id];?>">
<?php echo $row[qa_subject];
if($row[qa_datetime] >= $intime) echo " <img src=".$qa_latest_skin_url."img/icon_new.gif";
//24시간 이내에 등록된 게시물은 new 아이콘 출력 시키기
?>
</a>
</li>
<?php } ?>
<?php if (count($result) == 0) { //게시물이 없을 때 ?>
<li>게시물이 없습니다.</li>
<?php } ?>
</ul>
<div class="lt_more"><a href="<?php echo G5_BBS_URL ?>/qalist.php"><span class="sound_only">1:1문의</span>더보기</a></div>
</div>
$qa_latest_skin_url = G5_THEME_URL."/skin/latest/basic/"; //테마를 사용하며 최신글 베이직 스킨을 사용할때의 경로
add_stylesheet('<link rel="stylesheet" href="'.$qa_latest_skin_url.'/style.css">', 0); //스타일시트를 적용
$rows = "5"; // 출력시킬 최신글 갯수
$sql = " select * from {$g5['qa_content_table']} where qa_type = 0 order by qa_id desc limit 0, {$rows} ";
$result = sql_query($sql);
?>
<div class="lt">
<strong class="lt_title"><a href="<?php echo G5_BBS_URL ?>/qalist.php">1:1문의</a></strong>
<ul>
<?php for ($i=0; $row = sql_fetch_array($result); $i++) {
// 오늘을 불러옵니다.
$intime = date("Y-m-d H:i:s", time() - (int)(60 * 60 * 24)); ?>
<li>
<a href="<?php echo G5_BBS_URL ?>/qaview.php?qa_id=<?php echo $row[qa_id];?>">
<?php echo $row[qa_subject];
if($row[qa_datetime] >= $intime) echo " <img src=".$qa_latest_skin_url."img/icon_new.gif";
//24시간 이내에 등록된 게시물은 new 아이콘 출력 시키기
?>
</a>
</li>
<?php } ?>
<?php if (count($result) == 0) { //게시물이 없을 때 ?>
<li>게시물이 없습니다.</li>
<?php } ?>
</ul>
<div class="lt_more"><a href="<?php echo G5_BBS_URL ?>/qalist.php"><span class="sound_only">1:1문의</span>더보기</a></div>
</div>
게시판 목록
그누보드5 팁자료실
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 공지 | 3년 전 | 4427 | ||
| 2604 | 8개월 전 | 676 | ||
| 2603 | 8개월 전 | 735 | ||
| 2602 | 8개월 전 | 649 | ||
| 2601 |
|
8개월 전 | 672 | |
| 2600 |
|
8개월 전 | 580 | |
| 2599 | 8개월 전 | 809 | ||
| 2598 | 8개월 전 | 604 | ||
| 2597 |
다케미카코
|
8개월 전 | 757 | |
| 2596 | 8개월 전 | 854 | ||
| 2595 |
|
9개월 전 | 446 | |
| 2594 | 9개월 전 | 608 | ||
| 2593 |
만두먹고또먹고
|
9개월 전 | 938 | |
| 2592 | 9개월 전 | 613 | ||
| 2591 | 9개월 전 | 620 | ||
| 2590 | 9개월 전 | 690 | ||
| 2589 |
|
9개월 전 | 760 | |
| 2588 | 9개월 전 | 479 | ||
| 2587 | 9개월 전 | 796 | ||
| 2586 | 9개월 전 | 644 | ||
| 2585 | 9개월 전 | 511 | ||
| 2584 | 9개월 전 | 578 | ||
| 2583 | 9개월 전 | 499 | ||
| 2582 | 9개월 전 | 644 | ||
| 2581 | 9개월 전 | 601 | ||
| 2580 |
만두먹고또먹고
|
9개월 전 | 517 | |
| 2579 |
|
9개월 전 | 665 | |
| 2578 | 9개월 전 | 649 | ||
| 2577 | 9개월 전 | 629 | ||
| 2576 | 10개월 전 | 562 | ||
| 2575 |
이슈DEV
|
10개월 전 | 993 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기