달력스킨에 게시글 내용보이게 하는방법 문의드립니다. 채택완료
현재 엑셀 프레임웤을 짜고 있는데,
달력 날짜밑부분 에다가 그누보드 [wr_content] 를 각각 넣고 싶은데 어떻게 루프를 돌려야할지 감이 안잡힙니다!
고수님들 도와주십시요!

$sdate_a = $_GET[sdate]." 00:00:00"; $edate_a = $_GET[edate]." 23:59:59";
$searches .= "and (wr_datetime between '{$sdate_a}' and '{$edate_a}') "; } $total_count = $board['bo_count_write']; if($_GET[year]){ $exyear = $_GET[year];} else {$exyear = date("Y");} $sql = "select * from $write_table where YEAR(wr_1) = {$exyear} and wr_is_comment = '0' ORDER BY wr_1 ASC "; $result = sql_query($sql); $cnt = @mysql_num_rows($result);
$i=0; while($row = sql_fetch_array($result)) { $list[$i]['번호'] = $row['wr_num']; $list[$i]['작성자'] = $row['wr_name']; $list[$i]['결과서'] = $row['wr_3']; $list[$i]['특이사항'] = $row['wr_4']; $list[$i]['서명'] = $row['wr_5']; $list[$i]['수행기간(까지)'] = date("Y-m-d", strtotime(substr($row['wr_2'],0,10))); //$list[$i]['고정자산'] = $row['wr_5']; //$list[$i]['고정자산부가세'] = $row['wr_6']; $list[$i]['수행장소'] = $row['wr_content']; //$list[$i]['비고'] = $row['wr_8']; $list[$i]['수행자'] = $row['wr_10']; $list[$i]['수행기간(부터)'] = date("Y-m-d", strtotime(substr($row['wr_1'],0,10))); $i++; } header("Content-charset=utf-8"); header("Content-Type: application/x-msexcel; name=\"{$bo_table}-".date("ymd", time())."wk".".xls\""); header("Content-Disposition: attachment; filename=\"{$bo_table}-".date("ymd", time())."wk".".xls\""); $fname = tempnam(G5_DATA_PATH, $board.".xls"); $fh=fopen($fname, "rb"); fpassthru($fh); unlink($fname); /****************************** 달력 ******************************/
/********** 사용자 설정값 **********/ $startYear = 2007; $endYear = date( "Y" ) + 4;
/********** 입력값 **********/ $year = ( $_GET['toYear'] )? $_GET['toYear'] : date( "Y" ); $month = ( $_GET['toMonth'] )? $_GET['toMonth'] : date( "m" ); $doms = array( "일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일" );
/********** 계산값 **********/ $mktime = mktime( 0, 0, 0, $month, 1, $year ); // 입력된 값으로 년-월-01을 만든다 $days = date( "t", $mktime ); // 현재의 year와 month로 현재 달의 일수 구해오기 $startDay = date( "w", $mktime ); // 시작요일 알아내기
// 지난달 일수 구하기 $prevDayCount = date( "t", mktime( 0, 0, 0, $month, 0, $year ) ) - $startDay + 1;
$nowDayCount = sprintf("%02d", 1); // 이번달 일자 카운팅 $nextDayCount = 1; // 다음달 일자 카운팅
// 이전, 다음 만들기 $prevYear = ( $month == 1 )? ( $year - 1 ) : $year; $prevMonth = ( $month == 1 )? 12 : ( $month - 1 ); $nextYear = ( $month == 12 )? ( $year + 1 ) : $year; $nextMonth = ( $month == 12 )? 1 : ( $month + 1 );
// 출력행 계산 $setRows = ceil( ( $startDay + $days ) / 7 ); ?> http://www.w3.org/TR/REC-html40">http://www.w3.org/TR/REC-html40">
| "; ?> | ||||||
| if ( $doms[$i] == "일요일" ) { ?> ="일요일"?> } else if ( $doms[$i] == "토요일" ) { ?> ="토요일"?> } else { ?> =$doms[$i] ?> } ?> } ?> | ||||||
| if ( date( "w", mktime( 0, 0, 0, $month, $nowDayCount, $year ) ) == 6 ) { ?> =$month."월".sprintf("%02d", $nowDayCount++)."일"?> } else if ( date( "w", mktime( 0, 0, 0, $month, $nowDayCount, $year ) ) == 0 ) { ?> =$month."월".sprintf("%02d", $nowDayCount++)."일"?> } else { ?> =$month."월".sprintf("%02d", $nowDayCount++)."일"?> } ?> | // 이전달이라면 } else if ( $cellIndex < $startDay ) { ?>=date(m,strtotime("-1 month"))."월".sprintf("%02d", $prevDayCount++)."일"?> | // 다음달 이라면 } else if ( $cellIndex >= $days ) { ?>=date(m,strtotime("+1 month"))."월".sprintf("%02d", $nextDayCount++)."일"?> | } ?> } ?>||||
날짜 <td> 안에서 쿼리를 만들어 달력의 날짜와 비교해서 해당되는 칸만 wr_content 를 출력하면 된다는 말씀이신가요?!