최신글 추출관련 문의 > 그누4 질문답변

그누4 질문답변

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

최신글 추출관련 문의 정보

최신글 추출관련 문의

본문

http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=131512&sca=&sfl=wr_subject%7C%7Cwr_content&stx=%EC%9D%B4%EB%B2%A4%ED%8A%B8: 의 이벤트 게시판을 이용하고 있습니다.

그런데 위 게시판의 내용을 최신글로 추출 하고자 합니다.

<?
$wr_1 = strtotime($list[$i][wr_1]) + ($list[$i][wr_2] * 3600); // 시작날짜 + 시작시간 계산
$wr_3 = strtotime($list[$i][wr_3]) + ($list[$i][wr_4] * 3600); // 마감날짜 + 마감시간 계산

$wr_1_text = date("Y년 m월 d일", $wr_1);
$wr_3_text = date("Y년 m월 d일", $wr_3);

// 이벤트신청인원 체크
$wr_tmp = $list[$i][wr_id];
$sql_event_total = " select count(*) as cnt_total from g4_event_request where bo_table = '$bo_table' and wr_id = '$wr_tmp' ";
$row_event_total = sql_fetch($sql_event_total);

if($wr_1 < $current_time && $wr_3 > $current_time){ // 진행중 아이콘
if($list[$i][wr_5] == 0 ){ // 이벤트 진행중
$ico_state_img = "ico_state.png";
}else if( $row_event_total[cnt_total] >= $list[$i][wr_5] ){ // 이벤트 신청인원 마감
$ico_state_img = "ico_state_complete.png";
}else{
$ico_state_img = "ico_state.png"; // 이벤트 진행중
}
}else if($wr_3 < $current_time){ // 완료 아이콘
$ico_state_img = "ico_state_complete.png";
}else if($wr_1 > $current_time){ // 진행전 아이콘
$ico_state_img = "ico_state_before.png";
}
?>

<?
            echo $nobr_begin;
            echo "<li>제목 : <a href='{$list[$i][href]}'>{$list[$i][subject]}</a> ". $list[$i][icon_new] . "</li>";
echo "<li>기간 : $wr_1_text ~ $wr_3_text</li>";
echo "<li>진행상태 : <img src='{$board_skin_path}/img/{$ico_state_img}'></li>";
echo "<li><a href='{$list[$i][href]}'><img src='{$board_skin_path}/img/btn_event_view.gif'></a></li>";
            echo $nobr_end;
          ?>

위 기간이 "1970년 01월 01일 ~ 1970년 01월 01일"로 추출되는데 사용해 보신분 답변 부탁 드립니다.
게시판의 리스트는 제대로 나오는데 메인 추출글에는 잘 않되서요

댓글 전체

해결 했습니다.
IF문 안에
$wr_1 = strtotime($list[$i][wr_1]) + ($list[$i][wr_2] * 3600); // 시작날짜 + 시작시간 계산
 $wr_3 = strtotime($list[$i][wr_3]) + ($list[$i][wr_4] * 3600); // 마감날짜 + 마감시간 계산
 
$wr_1_text = date("Y년 m월 d일", $wr_1);
$wr_3_text = date("Y년 m월 d일", $wr_3);
위 부분이 있어야 했는데 다른 곳에 있어 그렇게 되었군요
전체 66,558 |RSS
그누4 질문답변 내용 검색

회원로그인

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