내용미리보기/달력/일정/기념일/음력표시/아이콘사용 스케쥴스킨(2008년 추가) 정보
달력 내용미리보기/달력/일정/기념일/음력표시/아이콘사용 스케쥴스킨(2008년 추가)첨부파일
본문
원소스 : http://www.sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=26398
[주요기능]
네번째 기능 업데이트, 2008년 달력 추가
사용방법은 기존과 동일하며, 아이콘이 일부 수정되었습니다. img 디렉토리만 기존것 백업하세요.
[내용]
1. file로 저장된 기념일을 불러서 출력
2. 양력일은 별도파일로 년도와 상관없이 출력
스킴은 해당년도 파일이 없으면, 디폴트 파일의 양력일만 뿌려 주도록 했습니다.
해가 바뀌면 양력일 내용을 복사 + 음력일 내용 추가하여 new year 파일을 만드시면 되겠습니다.
3. 사용자가 한정돼 있다면 아이디에 따라 아이콘 지정가능(list.skin.php 주석참고)
4. 글쓰기에서 분류아이콘 사용
[설치방법]
1. 압축된 파일을 풀어 schedule_i 디렉토리를 /skin/board/ 에 올린다.
2. /bbs/calendar/mydiary.2007, mydiary.0000(기념일 내용) 파일을 /bbs/calendar/ 에 올린다.
3. 여분필드1 에 기념일 파일이름을 입력한다.
예)mydiary.0000 (해가 바뀌면 mydiary.2008을 만들어서 추가하고, 여분필드는 고칠필요 없음)
※ 여분필드를 사용하는 이유는 동일스킨을 중복으로 사용할때 기념일을 각각 따로 적용하기 위해서임.
4. 달력 최신글을 사용하려면 제일 위 링크된 페이지에서 다운받아서 사용 하면 됨.
※ 기존 schedule skin 과 db 내용 호환
※ 기념일 파일의 기념일, 절기, 음력등의 날짜가 중복되는 경우 가장 아래 위치한 내용만 출력됩니다.
이때는 html tag로 보기좋게 합치시면 됩니다. 보시면 금방 알수 있음.
※ 미리보기 레이어 위치 조절은 list.skin.php의 49, 54줄에서 +,- 값으로 조절하시면 됩니다.
※ 기존 사용자님들께서는 아이콘이 몇개 늘면서 이름이 바뀐게 있습니다.
기존 아이콘은 백업 받고, 필요에 따라 바꾸시길 바랍니다. 아이콘은 첨부된 스크린샷과 동일합니다.
원작자님을 비롯하여 기존 수정하신님, 디자인 하신님께 감사드립니다.
많이 사용하시고 추천도 팍팍 ^^
[주요기능]
네번째 기능 업데이트, 2008년 달력 추가
사용방법은 기존과 동일하며, 아이콘이 일부 수정되었습니다. img 디렉토리만 기존것 백업하세요.
[내용]
1. file로 저장된 기념일을 불러서 출력
2. 양력일은 별도파일로 년도와 상관없이 출력
스킴은 해당년도 파일이 없으면, 디폴트 파일의 양력일만 뿌려 주도록 했습니다.
해가 바뀌면 양력일 내용을 복사 + 음력일 내용 추가하여 new year 파일을 만드시면 되겠습니다.
3. 사용자가 한정돼 있다면 아이디에 따라 아이콘 지정가능(list.skin.php 주석참고)
4. 글쓰기에서 분류아이콘 사용
[설치방법]
1. 압축된 파일을 풀어 schedule_i 디렉토리를 /skin/board/ 에 올린다.
2. /bbs/calendar/mydiary.2007, mydiary.0000(기념일 내용) 파일을 /bbs/calendar/ 에 올린다.
3. 여분필드1 에 기념일 파일이름을 입력한다.
예)mydiary.0000 (해가 바뀌면 mydiary.2008을 만들어서 추가하고, 여분필드는 고칠필요 없음)
※ 여분필드를 사용하는 이유는 동일스킨을 중복으로 사용할때 기념일을 각각 따로 적용하기 위해서임.
4. 달력 최신글을 사용하려면 제일 위 링크된 페이지에서 다운받아서 사용 하면 됨.
※ 기존 schedule skin 과 db 내용 호환
※ 기념일 파일의 기념일, 절기, 음력등의 날짜가 중복되는 경우 가장 아래 위치한 내용만 출력됩니다.
이때는 html tag로 보기좋게 합치시면 됩니다. 보시면 금방 알수 있음.
※ 미리보기 레이어 위치 조절은 list.skin.php의 49, 54줄에서 +,- 값으로 조절하시면 됩니다.
※ 기존 사용자님들께서는 아이콘이 몇개 늘면서 이름이 바뀐게 있습니다.
기존 아이콘은 백업 받고, 필요에 따라 바꾸시길 바랍니다. 아이콘은 첨부된 스크린샷과 동일합니다.
원작자님을 비롯하여 기존 수정하신님, 디자인 하신님께 감사드립니다.
많이 사용하시고 추천도 팍팍 ^^
추천
26
26
댓글 전체
감사합니다. ^^
잘쓰겠습니다.
잘쓰겠습니다.
행복한 하루입니다.
너무 좋은 스킨에 감사드립니다.
잘 사용하겠습니다.
너무 좋은 스킨에 감사드립니다.
잘 사용하겠습니다.
감사합니다.^^
잘 사용하겠습니다
감사합니다. ^^
감사합니다!!!!!!!!!!!!!!
일정게시판에는 에디터 사용할수 없을까요?~ ㅠㅠ
아이콘 들어가니 분위기가 확 살아요 감사합니당
감사합니다. 잘 쓰겠습니다.
유용하겠네요.
^^
^^
감사합니다.
감사합니다~ 잘쓸께요~
감사합니다...
음력도 있고 좋네요~~
멋지삼
음력까지..
감사합니다^^ 잘 활용 하겠습니다 ~!!
정말 예쁘게 잘 만드셨습니다..감사합니다.^^
감사합니다.
안녕하세요^^.. 2008년일정 추가되었네요^^ 너무잘쓰고있습니다^^
아, 그런데^^ 7월 17일 제헌절은
올해 2008년부터 법정공휴일에서 제외되었으므로
b20080717로 바꾸어야할것 같습니다^^
감사합니다^^
아, 그런데^^ 7월 17일 제헌절은
올해 2008년부터 법정공휴일에서 제외되었으므로
b20080717로 바꾸어야할것 같습니다^^
감사합니다^^
맞아요
그걸 몰라서 다른곳에도 같은 실수를.. ^^
7월 17일 빨간색에서 파란색으로 바꾸시면 됩니다.
감사합니다~~
그걸 몰라서 다른곳에도 같은 실수를.. ^^
7월 17일 빨간색에서 파란색으로 바꾸시면 됩니다.
감사합니다~~
멋집니다.
멋지네여
잘 사용하고 있습니다. 감사^^ 새해 복많이 받으세요
음력 멋집니다.
음력.. 약간 손이 가죠?
음력 알고리즘을 복잡하게 연구하다가 엄청난 디비와 오류발생땜에 막고품는 방식으로 바꿨습니다.. ^^
대신 해가 바뀌면 직접 수정해야 돼요
누군가가 수정해서 또 올려주시겠지만요..
댓글 감사합니다 ^^
음력 알고리즘을 복잡하게 연구하다가 엄청난 디비와 오류발생땜에 막고품는 방식으로 바꿨습니다.. ^^
대신 해가 바뀌면 직접 수정해야 돼요
누군가가 수정해서 또 올려주시겠지만요..
댓글 감사합니다 ^^
감사합니다.
감사합니다...
저기..저는 기념일 표시가 왜 안돼는거죠? ㅠㅠ
달력만 나오는데요. 아무런 표시 없이요.
처음 설치하는건데, 혹 원본 스킨에서 뭘 더 설치해야하는건가요?
달력만 나오는데요. 아무런 표시 없이요.
처음 설치하는건데, 혹 원본 스킨에서 뭘 더 설치해야하는건가요?
글 남겼어요 확인해 보세요~~ ^^
이 스킨에서 아이콘이 더 추가된 건 없나요?
감사합니다. 잘 사용하겠습니다. ^-^
유용하게 잘쓸게요
음력도 나오다니. ^^;;
좋네요~~ ^^
음력자동계산 버전도 완성되었습니다.
테스트해보고 괜찮다싶으면 올리겠습니다.
많이 사용해 주셔서 감사합니다 ^^
설치하는데 힘들어 하시는분들이 계신데.. 설명서 꼼꼼히 읽어보세염..
테스트해보고 괜찮다싶으면 올리겠습니다.
많이 사용해 주셔서 감사합니다 ^^
설치하는데 힘들어 하시는분들이 계신데.. 설명서 꼼꼼히 읽어보세염..
잘쓰겠습니다.
감사합니다. 잘쓰겠습니다.
감사히 잘 쓰겠습니다.
근데. 일정 수정이나 삭제는 어케???
해당 일정으로 마우스 가져가면 팝업이 나타나서리.....
근데. 일정 수정이나 삭제는 어케???
해당 일정으로 마우스 가져가면 팝업이 나타나서리.....
멋져요^
일정관리 ^^
잘 쓰겠습니다..
감사합니다..~
~
~
일정관리 달력 감사히 잘 쓰겠습니다.
멋져요 잘쓸게용~~~
혹시 이 달력일정을 최신글로 뺄때는 어떻게 해야 되죠? ^^
아..2007년을 받았네여...여기 2008년이 있을줄이야...
감사합니다
감사합니다
추천합니다
최근게시물이랄까 그건 어떤게 맞을까요?
감사합니다. 잘 쓸게요.
감사합니다. 잘 쓸게요.
일정
멋집니다~
감사합니다 잘쓸께요
감사합니다. ^^
한번적용해볼께요^^
좋아요..^^
감사합니다.^^
좋네요!!! .. 고맙습니다. ^^
감사합니다
잘 쓰겠습니다. 감사합니다
감사합니다
일정에 마우스 올려놓으면 내용이 레이어로 뜨면서 ... 글제목을 중앙으로 배치되는 현상이 있어서
list.skin.php 54줄을 수정하였습니다.
저만 경험하는 현상일수도 있겠지만.. 유사한 경험을 하는 분이 있을까 싶어서 적습니다.
// 원본
dest.style.pixelTop = getRealPosition(i,"Top") - 65 // 불러오는 메뉴 좌표
// 수정
dest.style.pixelTop = getRealPosition(i,"Top") + 15 // 불러오는 메뉴 좌표
list.skin.php 54줄을 수정하였습니다.
저만 경험하는 현상일수도 있겠지만.. 유사한 경험을 하는 분이 있을까 싶어서 적습니다.
// 원본
dest.style.pixelTop = getRealPosition(i,"Top") - 65 // 불러오는 메뉴 좌표
// 수정
dest.style.pixelTop = getRealPosition(i,"Top") + 15 // 불러오는 메뉴 좌표
공부 잘하겠습니다.
f
달력~~ 스킨이쁘고 좋음^^
정말 감사합니다 잘 쓰겠습니다^^ 팝업 뜨는거 정말 멋지네요!! 감사합니다!!
게시판 설정:여분필드 1에 파일이름 설정하십시오 가 무슨 말인가요? 도와주세요
내 이놈의 추천을 당장~
list.php 파일 올립니다.글짜가 깨지는데 도와 주십시요.
http://dawndew.org/bbs/board.php?bo_table=schedule
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once("$board_skin_path/moonday.php"); // 석봉운님의 음력날짜 함수
/* 탈루 (*** 개인정보보호를 위한 이메일주소 노출방지 ***) 님 소스를 수정하였습니다. 아이콘 나오게 수정함(회사일정,바이블) */
if (!$board[bo_1]) alert("게시판 설정 : 여분 필드 1 에 파일이름을 설정하십시오(꼭 영어이름!!). (예)memday.2007");
if (eregi('%', $width)) {
$col_width = "14%"; //표의 가로 폭이 100보다 크면 픽셀값입력
}else{
$col_width = round($width/7); //표의 가로 폭이 100보다 작거나 같으면 백분율 값을 입력
}
$col_height= 80 ;//내용 들어갈 사각공간의 세로길이를 가로 폭과 같도록
$today = getdate();
$b_mon = $today['mon'];
$b_day = $today['mday'];
$b_year = $today['year'];
if ($year < 1) { // 오늘의 달력 일때
$month = $b_mon;
$mday = $b_day;
$year = $b_year;
}
// 기념일 파일읽어 배열선언
// 날짜 파일의 갯수가 많아지면 디렉토리를 자신에게 맞게 수정하여 관리한다.
$file_len = strlen($board[bo_1]);
$file_name = substr($board[bo_1],0,$file_len-5);
$file_index = $g4['bbs_path']."/calendar/".$file_name ; // 기념일 파일의 위치를 수정하려면 여기에서 한다.
if( file_exists($file_index.".".$year)) {
$dayfile = file($file_index.".".$year);
$cutpoint1 = 1;
$cutpoint2 = 8;
}
else if( file_exists($file_index.".0000")) {
$dayfile = file($file_index.".0000");
$cutpoint1 = 5;
$cutpoint2 = 4;
}
$lastday=array(0,31,28,31,30,31,30,31,31,30,31,30,31);
if ($year%4 == 0) $lastday[2] = 29;
$dayoftheweek = date("w", mktime (0,0,0,$month,1,$year));
?>
<table width="<?=$width?>" border=0 cellpadding="0" cellspacing="0">
<tr>
<td width="20%"> </td>
<td width="60%" height="30" align="center">
<form name="form1" style="display:inline">
<select name="formselect1" size="1" OnChange="namosw_goto_byselect(this, 'self')">
<option value="#">년</option>
<?
$year_plus = $year+5 ;
for( $i=$year-4 ; $i<$year_plus ; $i++ ){
echo "<option value=".$g4['bbs_path']."/board.php?bo_table=$bo_table&year=".$i."&month=".$month.">".$i."</option>";
}
?>
</select></form>
<a href="<?="$_SERVER[PHP_SELF]?bo_table=$bo_table&"?><?if ($month == 1) { $year_pre=$year-1; $month_pre=$month; } else {$year_pre=$year-1; $month_pre=$month;} echo ("year=$year_pre&month=$month_pre");?>" target="_self" onfocus="this.blur()"><img src="<?=$board_skin_path?>/img/y_prev.gif" border="0" title="<?=$year_pre?>년" align="abbottom"></a>
<a href="<?="$_SERVER[PHP_SELF]?bo_table=$bo_table&"?><?if ($month == 1) { $year_pre=$year-1; $month_pre=12; } else {$year_pre=$year; $month_pre=$month-1;} echo ("year=$year_pre&month=$month_pre");?>" target="_self" onfocus="this.blur()"><img src="<?=$board_skin_path?>/img/m_prev.gif" border="0" title="<?=$month_pre?>월" align="abbottom"></a>
<a href="<?="$_SERVER[PHP_SELF]?bo_table=$bo_table&"?>" title="오늘로" onfocus="this.blur()"><span style="font:15pt 돋음체;color:#FF9900;"><b><? echo ("$year".년."$month".월); ?></b></span></a>
<a href="<?="$_SERVER[PHP_SELF]?bo_table=$bo_table&"?><?if ($month == 12) { $year_pre=$year+1; $month_pre=1; } else {$year_pre=$year; $month_pre=$month+1;} echo ("&year=$year_pre&month=$month_pre");?>" target="_self" onfocus="this.blur()"><img src="<?=$board_skin_path?>/img/m_next.gif" border="0" title="<?=$month_pre?>월" align="abbottom"></a>
<a href="<?="$_SERVER[PHP_SELF]?bo_table=$bo_table&"?><?if ($month == 12) { $year_pre=$year+1; $month_pre=$month; } else {$year_pre=$year+1; $month_pre=$month;} echo ("&year=$year_pre&month=$month_pre");?>" target="_self" onfocus="this.blur()"><img src="<?=$board_skin_path?>/img/y_next.gif" border="0" title="<?=$year_pre?>년" align="abbottom"></a>
<form name="form2" style="display:inline">
<select name="formselect1" size="1" OnChange="namosw_goto_byselect(this, 'self')">
<option value="#">월</option>
<?
for( $i=1 ; $i<13 ; $i++ ){
echo "<option value=".$g4['bbs_path']."/board.php?bo_table=$bo_table&year=".$year."&month=".$i.">".$i."</option>";
}
?>
</select></form>
</td>
<td width="20%" align="right" valign="bottom">
<?
if ($write_href) { echo " <a href='$write_href' title='일정추가' onfocus='this.blur()'><img src='$board_skin_path/img/btn_write.gif' border=0></a>"; }
if ($admin_href) { echo " <a href='$admin_href' title='관리자' onfocus='this.blur()'><img src='$board_skin_path/img/admin.gif' border=0 align=absmiddle></a>"; }
?>
</td>
</tr>
</table>
<TABLE cellSpacing=0 cellPadding=0 bgcolor=#999999 width='<?=$width?>' align=center border=0>
<tr><td>
<table border=1 cellpadding=0 cellspacing=0 width=100% bgcolor=white bordercolor=white bordercolorlight=#c8d8e0>
<tr class=size2 height=30>
<td align=center valign="middle" bgcolor="#fa8072">일요일</td>
<td align=center valign="middle" bgcolor="#efefef">월요일</td>
<td align=center valign="middle" bgcolor="#efefef">화요일</td>
<td align=center valign="middle" bgcolor="#efefef">수요일</td>
<td align=center valign="middle" bgcolor="#efefef">목요일</td>
<td align=center valign="middle" bgcolor="#efefef">금요일</td>
<td align=center valign="middle" bgcolor="#afeeee">토요일</td>
</tr>
<?
$cday = 1;
$sel_mon = sprintf("%02d",$month);
$query = "SELECT * FROM $write_table WHERE left(wr_link1,6) <= '$year$sel_mon' and left(wr_link2,6) >= '$year$sel_mon' ORDER BY wr_id ASC";
$result = sql_query($query);
$j=0; // layer id
// 내용을 보여주는 부분
while ($row = mysql_fetch_array($result)) { // 제목글 뽑아서 링크 문자열 만들기..
if( substr($row[wr_link1],0,6) < $year.$sel_mon ) {
$start_day =1;
$start_day= (int)$start_day;
} else {
$start_day = substr($row[wr_link1],6,2);
$start_day= (int)$start_day;
}
if( substr($row[wr_link2],0,6) > $year.$sel_mon ) {
$end_day = $lastday[$month];
$end_day= (int)$end_day;
} else {
$end_day = substr($row[wr_link2],6,2);
$end_day= (int)$end_day;
}
// 아이디에 따라 다른 아이콘이미지 출력 하고 싶을때 ///주석을 해제
$imgown = 'icon';
for ($i = $start_day ; $i <= $end_day; $i++) {
if($row[mb_id]=='admin'){$imgown='bull_1'; }
else if($row[mb_id]=='test1971'){$imgown='bull_2'; }
else if($row[mb_id]=='mintbluejh'){$imgown='bull_3'; }
else if($row[mb_id]=='acelink1'){$imgown='bull_6'; }
else if($row[mb_id]=='bible750'){$imgown='bull_4'; }
else if($row[mb_id]=='seven'){$imgown='bull_2'; }
if (strlen($row[wr_1]) > 0) { // 입력된 아이콘 값이 있을 때
$imgown = $row[wr_1] ;
}
$j++; // layer ID
$list[comment_cnt] = "($row[wr_comment])"; // row에 대하여 코멘트 카운터 정의
if($row[wr_comment] == 0) {
$list[comment_cnt] = null ;
} else {
//날짜와 관계없이 24시간 코멘트 굵게
if($row['wr_last'] >= date("Y-m-d H:i:s", $g4['server_time'] - ($board['bo_new'] * 3600)))
{
$list[comment_cnt] = "($row[wr_comment])";
if($list[comment_cnt]!=null) $list[comment_cnt] = "<b><font color=#7679E0>".$list[comment_cnt]."</font></b>";
} else {
$list[comment_cnt] = "<span style='font-size:7pt;color:#ff6600;'>".$list[comment_cnt]."</span>" ;
}
}
$list['icon_new'] = null; //icon_new 정의
$row[wr_subject] = cut_str(get_text($row[wr_subject]),$board[bo_subject_len],"…"); // subject length cut
if ($row['wr_datetime'] >= date("Y-m-d H:i:s", $g4['server_time'] - ($board['bo_new'] * 3600)))
$list['icon_new'] = "<img src='$board_skin_path/img/icon_new.gif' align='absmiddle'>";
// $html_day[$i].= 은 문자를 덧붙이는 작업이다. 바로 . (쩜) 의 위력이다.
if ($member[mb_level] < $board[bo_read_level]) {
$functionlayer="" ;
} else { $functionlayer="onmouseover";}
$html_day[$i].= "<br><a ".$functionlayer."=\"showLayers('popup_schd".$j."')\" onmouseout=\"startTimer(this)\" href='$g4[bbs_path]/board.php?bo_table=$bo_table&year=$year&month=$month&wr_id=$row[wr_id]'><img src='$board_skin_path/img/".$imgown.".gif' border=0 align=absmiddle> ".$row[wr_subject]."</a>".$list[icon_new].$list[comment_cnt];
?>
<!-- 뷰 팝업레이어 -->
<DIV ID=popup_schd<?=$j?> onmouseout="startTimer(event.srcElement)" style="BORDER-RIGHT: #a2a2a2 1px solid; BORDER-TOP: #a2a2a2 1px solid; BORDER-LEFT: #a2a2a2 1px solid; BORDER-BOTTOM: #a2a2a2 1px solid; BACKGROUND-COLOR: white; FILTER: alpha(opacity=90); padding: 5 5 5 5; POSITION:absolute; width:200px; top:-200px; visibility: hidden; Z-INDEX:1;">
<?
$html = 0;
if (strstr($row[wr_option], "html1"))
$html = 1;
else if (strstr($row[wr_option], "html2"))
$html = 2;
$viewlist = cut_str(conv_content($row[wr_content], $html),200,"…");
echo "글쓴이 : ".$row[wr_name]."<br>";
echo "─────────<br>";
echo $viewlist;
?>
</DIV>
<?
}
}
// 달력의 틀을 보여주는 부분
$temp = 7- (($lastday[$month]+$dayoftheweek)%7);
if ($temp == 7) $temp = 0;
$lastcount = $lastday[$month]+$dayoftheweek + $temp;
for ($iz = 1; $iz <= $lastcount; $iz++) { // 42번을 칠하게 된다.
$bgcolor = "#ffffff"; // 쭉 흰색으로 칠하고
if ($b_year==$year && $b_mon==$month && $b_day==$cday) $bgcolor = "#DEFADE"; // "#DFFDDF"; // 오늘날짜 연두색으로 표기
if (($iz%7) == 1) echo ("<tr>"); // 주당 7개씩 한쎌씩을 쌓는다.
if ($dayoftheweek < $iz && $iz <= $lastday[$month]+$dayoftheweek) {
// 전체 루프안에서 숫자가 들어가는 셀들만 해당됨
// 즉 11월 달에서 1일부터 30 일까지만 해당
$daytext = "$cday"; // $cday 는 숫자 예> 11월달은 1~ 30일 까지
//$daytext 은 셀에 써질 날짜 숫자 넣을 공간
$daycontcolor = "" ;
$daycolor = "";
if ($iz%7 == 1) $daycolor = "red"; // 일요일
if ($iz%7 == 0) $daycolor = "blue"; // 토요일
// 여기까지 숫자와 들어갈 내용에 대한 변수들의 세팅이 끝나고
// 이제 여기 부터 직접 셀이 그려지면서 그 안에 내용이 들어 간다.
echo ("<td width=$col_width height=$col_height bgcolor=$bgcolor valign=top class='cal_title'>");
$f_date = $year.sprintf("%02d",$month).sprintf("%02d",$cday);
// 기념일 파일 내용 비교위한 변수 선언, 월과 일을 두자리 포맷으로 고정
if (strlen($month) == 1) { $monthp = "0".$month ; }
else {$monthp = $month ; }
if (strlen($cday) == 1) { $cdayp = "0".$cday ; }
else {$cdayp = $cday ; }
$memday = $year.$monthp.$cdayp;
// *.0000 파일인 해마다 동일한 양력기념일은 월일로만 구분한다.
if( !file_exists($file_index.".".$year)) { $memday = $monthp.$cdayp; }
$daycont = "" ;
// 년월일 8자리 또는 4자리를 잘라 비교하여 뒷 문장을 출력
for($i=0 ; $i < sizeof($dayfile) ; $i++){ // 파일 첫 행부터 끝행까지 루프
if($memday == substr($dayfile[$i],$cutpoint1,$cutpoint2)){$daycont = substr($dayfile[$i],9,strlen($dayfile[$i])-10);
// r,b,y,g 구분자로 글자색깔 구분
$daycl = substr($dayfile[$i],0,1) ;
if($daycl == "r"){
$daycontcolor = "red" ; // 휴일
$daycolor = "red";
}
else if($daycl == "y"){$daycontcolor = "brown" ;} // 생일
else if($daycl == "g"){$daycontcolor = "gray" ;} // 음력
else{$daycontcolor = "blue" ;}
}
}
// 석봉운님의 음력날짜 변수선언
$myarray = soltolun($year,$month,$cday);
if ($myarray[day]==1 || $myarray[day]==11 || $myarray[day]==21) {
$moonday ="<font color=gray> (음)$myarray[month].$myarray[day]$myarray[leap]</font>";
} else {
$moonday="";
}
include("$file_index.moon"); // 음력절기 & 음력기념일
if ($annivmoonday&&$daycont) $blank="<br>"; // 음력절기와 양력기념일이 동시에 있으면 한칸 띔
else $blank="";
if ($write_href) {
// $write_href (글쓰기 권한)이 있으면
// 날짜를 클릭하면 글씨쓰기가 가능한 링크를 넣어서 출력하기
echo "<a href='$write_href&f_date=$f_date&t_date=$f_date'><font color=$daycolor>$daytext</font></a>$moonday <font color=$daycontcolor>$daycont</font>$blank $annivmoonday";
}
else { // 글쓰기 권한이 없으면 글쓰기 링크는 넣지 않고 그냥 숫자와 기념일 내용만 출력하기
echo "<font color=$daycolor>$daytext</font>$moonday <font color=$daycontcolor>$daycont</font>$blank $annivmoonday";
}
echo $html_day[$cday];
echo ("</td>"); // 한칸을 마무리
$cday++; // 날짜를 카운팅
}
// 11월에서 1일부터 30일에 해당되지 않으면 그냥 회색을 칠한다.
else { echo (" <td width=$col_width height=$col_height bgcolor=#F7F7F7 valign=top class=size1> </td>"); }
if (($iz%7) == 0) echo (" </tr>");
} // 반복구문이 끝남
?>
</table>
</td></tr></table>
<!--년, 월 form 스크립트 -->
<script language="JavaScript">
<!--
function namosw_goto_byselect(sel, targetstr)
{
var index = sel.selectedIndex;
if (sel.options[index].value != '') {
if (targetstr == 'blank') {
window.open(sel.options[index].value, 'win1');
} else {
var frameobj;
if (targetstr == '') targetstr = 'self';
if ((frameobj = eval(targetstr)) != null)
frameobj.location = sel.options[index].value;
}
}
}
// 레이어 뷰 스크립트
var iDelay = 50 // Delay to hide in milliseconds
var iNSWidth=130 // Default width for netscape
var sDisplayTimer = null, oLastItem
function getRealPosition(i,which) {
iPos = 0
while (i!=null) {
iPos += i["offset" + which]
i = i.offsetParent
}
return iPos
}
function showLayers(sDest,itop,ileft,iWidth) {
if (document.all!=null) {
var i = window.event.srcElement
stopTimer()
dest = document.all[sDest]
if ((oLastItem!=null) && (oLastItem!=dest))
hideItem()
if (dest) {
// Netscape Hack
if (i.offsetWidth==0)
if (iWidth)
i.offsetWidth=iWidth
else
i.offsetWidth=iNSWidth;
if (ileft)
dest.style.pixelLeft = ileft
else
dest.style.pixelLeft = getRealPosition(i,"Left") - 60 // 미리보기 레이어 팝업 X좌표 설정(-10)
// dest.style.pixelLeft = getRealPosition(i,"Left") + i.offsetWidth *0.1 // 불러오는 메뉴 좌표
if (itop)
dest.style.pixelTop = itop
else
dest.style.pixelTop = getRealPosition(i,"Top") - 65 // 미리보기 레이어 팝업 Y좌표 설정(-30)
dest.style.visibility = "visible"
}
oLastItem = dest
}
}
function stopTimer() {
clearTimeout(sDisplayTimer)
}
function startTimer(el) {
if (!el.contains(event.toElement)) {
stopTimer()
sDisplayTimer = setTimeout("hideItem()",iDelay)
}
}
function hideItem() {
if (oLastItem)
oLastItem.style.visibility="hidden"
}
function checkOver() {
if ((oLastItem) && (oLastItem.contains(event.srcElement))) {
stopTimer()
}
}
function checkOut() {
if (oLastItem==event.srcElement)
startTimer(event.srcElement)
}
document.onmouseover = checkOver
document.onmouseout = checkOut
http://dawndew.org/bbs/board.php?bo_table=schedule
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once("$board_skin_path/moonday.php"); // 석봉운님의 음력날짜 함수
/* 탈루 (*** 개인정보보호를 위한 이메일주소 노출방지 ***) 님 소스를 수정하였습니다. 아이콘 나오게 수정함(회사일정,바이블) */
if (!$board[bo_1]) alert("게시판 설정 : 여분 필드 1 에 파일이름을 설정하십시오(꼭 영어이름!!). (예)memday.2007");
if (eregi('%', $width)) {
$col_width = "14%"; //표의 가로 폭이 100보다 크면 픽셀값입력
}else{
$col_width = round($width/7); //표의 가로 폭이 100보다 작거나 같으면 백분율 값을 입력
}
$col_height= 80 ;//내용 들어갈 사각공간의 세로길이를 가로 폭과 같도록
$today = getdate();
$b_mon = $today['mon'];
$b_day = $today['mday'];
$b_year = $today['year'];
if ($year < 1) { // 오늘의 달력 일때
$month = $b_mon;
$mday = $b_day;
$year = $b_year;
}
// 기념일 파일읽어 배열선언
// 날짜 파일의 갯수가 많아지면 디렉토리를 자신에게 맞게 수정하여 관리한다.
$file_len = strlen($board[bo_1]);
$file_name = substr($board[bo_1],0,$file_len-5);
$file_index = $g4['bbs_path']."/calendar/".$file_name ; // 기념일 파일의 위치를 수정하려면 여기에서 한다.
if( file_exists($file_index.".".$year)) {
$dayfile = file($file_index.".".$year);
$cutpoint1 = 1;
$cutpoint2 = 8;
}
else if( file_exists($file_index.".0000")) {
$dayfile = file($file_index.".0000");
$cutpoint1 = 5;
$cutpoint2 = 4;
}
$lastday=array(0,31,28,31,30,31,30,31,31,30,31,30,31);
if ($year%4 == 0) $lastday[2] = 29;
$dayoftheweek = date("w", mktime (0,0,0,$month,1,$year));
?>
<table width="<?=$width?>" border=0 cellpadding="0" cellspacing="0">
<tr>
<td width="20%"> </td>
<td width="60%" height="30" align="center">
<form name="form1" style="display:inline">
<select name="formselect1" size="1" OnChange="namosw_goto_byselect(this, 'self')">
<option value="#">년</option>
<?
$year_plus = $year+5 ;
for( $i=$year-4 ; $i<$year_plus ; $i++ ){
echo "<option value=".$g4['bbs_path']."/board.php?bo_table=$bo_table&year=".$i."&month=".$month.">".$i."</option>";
}
?>
</select></form>
<a href="<?="$_SERVER[PHP_SELF]?bo_table=$bo_table&"?><?if ($month == 1) { $year_pre=$year-1; $month_pre=$month; } else {$year_pre=$year-1; $month_pre=$month;} echo ("year=$year_pre&month=$month_pre");?>" target="_self" onfocus="this.blur()"><img src="<?=$board_skin_path?>/img/y_prev.gif" border="0" title="<?=$year_pre?>년" align="abbottom"></a>
<a href="<?="$_SERVER[PHP_SELF]?bo_table=$bo_table&"?><?if ($month == 1) { $year_pre=$year-1; $month_pre=12; } else {$year_pre=$year; $month_pre=$month-1;} echo ("year=$year_pre&month=$month_pre");?>" target="_self" onfocus="this.blur()"><img src="<?=$board_skin_path?>/img/m_prev.gif" border="0" title="<?=$month_pre?>월" align="abbottom"></a>
<a href="<?="$_SERVER[PHP_SELF]?bo_table=$bo_table&"?>" title="오늘로" onfocus="this.blur()"><span style="font:15pt 돋음체;color:#FF9900;"><b><? echo ("$year".년."$month".월); ?></b></span></a>
<a href="<?="$_SERVER[PHP_SELF]?bo_table=$bo_table&"?><?if ($month == 12) { $year_pre=$year+1; $month_pre=1; } else {$year_pre=$year; $month_pre=$month+1;} echo ("&year=$year_pre&month=$month_pre");?>" target="_self" onfocus="this.blur()"><img src="<?=$board_skin_path?>/img/m_next.gif" border="0" title="<?=$month_pre?>월" align="abbottom"></a>
<a href="<?="$_SERVER[PHP_SELF]?bo_table=$bo_table&"?><?if ($month == 12) { $year_pre=$year+1; $month_pre=$month; } else {$year_pre=$year+1; $month_pre=$month;} echo ("&year=$year_pre&month=$month_pre");?>" target="_self" onfocus="this.blur()"><img src="<?=$board_skin_path?>/img/y_next.gif" border="0" title="<?=$year_pre?>년" align="abbottom"></a>
<form name="form2" style="display:inline">
<select name="formselect1" size="1" OnChange="namosw_goto_byselect(this, 'self')">
<option value="#">월</option>
<?
for( $i=1 ; $i<13 ; $i++ ){
echo "<option value=".$g4['bbs_path']."/board.php?bo_table=$bo_table&year=".$year."&month=".$i.">".$i."</option>";
}
?>
</select></form>
</td>
<td width="20%" align="right" valign="bottom">
<?
if ($write_href) { echo " <a href='$write_href' title='일정추가' onfocus='this.blur()'><img src='$board_skin_path/img/btn_write.gif' border=0></a>"; }
if ($admin_href) { echo " <a href='$admin_href' title='관리자' onfocus='this.blur()'><img src='$board_skin_path/img/admin.gif' border=0 align=absmiddle></a>"; }
?>
</td>
</tr>
</table>
<TABLE cellSpacing=0 cellPadding=0 bgcolor=#999999 width='<?=$width?>' align=center border=0>
<tr><td>
<table border=1 cellpadding=0 cellspacing=0 width=100% bgcolor=white bordercolor=white bordercolorlight=#c8d8e0>
<tr class=size2 height=30>
<td align=center valign="middle" bgcolor="#fa8072">일요일</td>
<td align=center valign="middle" bgcolor="#efefef">월요일</td>
<td align=center valign="middle" bgcolor="#efefef">화요일</td>
<td align=center valign="middle" bgcolor="#efefef">수요일</td>
<td align=center valign="middle" bgcolor="#efefef">목요일</td>
<td align=center valign="middle" bgcolor="#efefef">금요일</td>
<td align=center valign="middle" bgcolor="#afeeee">토요일</td>
</tr>
<?
$cday = 1;
$sel_mon = sprintf("%02d",$month);
$query = "SELECT * FROM $write_table WHERE left(wr_link1,6) <= '$year$sel_mon' and left(wr_link2,6) >= '$year$sel_mon' ORDER BY wr_id ASC";
$result = sql_query($query);
$j=0; // layer id
// 내용을 보여주는 부분
while ($row = mysql_fetch_array($result)) { // 제목글 뽑아서 링크 문자열 만들기..
if( substr($row[wr_link1],0,6) < $year.$sel_mon ) {
$start_day =1;
$start_day= (int)$start_day;
} else {
$start_day = substr($row[wr_link1],6,2);
$start_day= (int)$start_day;
}
if( substr($row[wr_link2],0,6) > $year.$sel_mon ) {
$end_day = $lastday[$month];
$end_day= (int)$end_day;
} else {
$end_day = substr($row[wr_link2],6,2);
$end_day= (int)$end_day;
}
// 아이디에 따라 다른 아이콘이미지 출력 하고 싶을때 ///주석을 해제
$imgown = 'icon';
for ($i = $start_day ; $i <= $end_day; $i++) {
if($row[mb_id]=='admin'){$imgown='bull_1'; }
else if($row[mb_id]=='test1971'){$imgown='bull_2'; }
else if($row[mb_id]=='mintbluejh'){$imgown='bull_3'; }
else if($row[mb_id]=='acelink1'){$imgown='bull_6'; }
else if($row[mb_id]=='bible750'){$imgown='bull_4'; }
else if($row[mb_id]=='seven'){$imgown='bull_2'; }
if (strlen($row[wr_1]) > 0) { // 입력된 아이콘 값이 있을 때
$imgown = $row[wr_1] ;
}
$j++; // layer ID
$list[comment_cnt] = "($row[wr_comment])"; // row에 대하여 코멘트 카운터 정의
if($row[wr_comment] == 0) {
$list[comment_cnt] = null ;
} else {
//날짜와 관계없이 24시간 코멘트 굵게
if($row['wr_last'] >= date("Y-m-d H:i:s", $g4['server_time'] - ($board['bo_new'] * 3600)))
{
$list[comment_cnt] = "($row[wr_comment])";
if($list[comment_cnt]!=null) $list[comment_cnt] = "<b><font color=#7679E0>".$list[comment_cnt]."</font></b>";
} else {
$list[comment_cnt] = "<span style='font-size:7pt;color:#ff6600;'>".$list[comment_cnt]."</span>" ;
}
}
$list['icon_new'] = null; //icon_new 정의
$row[wr_subject] = cut_str(get_text($row[wr_subject]),$board[bo_subject_len],"…"); // subject length cut
if ($row['wr_datetime'] >= date("Y-m-d H:i:s", $g4['server_time'] - ($board['bo_new'] * 3600)))
$list['icon_new'] = "<img src='$board_skin_path/img/icon_new.gif' align='absmiddle'>";
// $html_day[$i].= 은 문자를 덧붙이는 작업이다. 바로 . (쩜) 의 위력이다.
if ($member[mb_level] < $board[bo_read_level]) {
$functionlayer="" ;
} else { $functionlayer="onmouseover";}
$html_day[$i].= "<br><a ".$functionlayer."=\"showLayers('popup_schd".$j."')\" onmouseout=\"startTimer(this)\" href='$g4[bbs_path]/board.php?bo_table=$bo_table&year=$year&month=$month&wr_id=$row[wr_id]'><img src='$board_skin_path/img/".$imgown.".gif' border=0 align=absmiddle> ".$row[wr_subject]."</a>".$list[icon_new].$list[comment_cnt];
?>
<!-- 뷰 팝업레이어 -->
<DIV ID=popup_schd<?=$j?> onmouseout="startTimer(event.srcElement)" style="BORDER-RIGHT: #a2a2a2 1px solid; BORDER-TOP: #a2a2a2 1px solid; BORDER-LEFT: #a2a2a2 1px solid; BORDER-BOTTOM: #a2a2a2 1px solid; BACKGROUND-COLOR: white; FILTER: alpha(opacity=90); padding: 5 5 5 5; POSITION:absolute; width:200px; top:-200px; visibility: hidden; Z-INDEX:1;">
<?
$html = 0;
if (strstr($row[wr_option], "html1"))
$html = 1;
else if (strstr($row[wr_option], "html2"))
$html = 2;
$viewlist = cut_str(conv_content($row[wr_content], $html),200,"…");
echo "글쓴이 : ".$row[wr_name]."<br>";
echo "─────────<br>";
echo $viewlist;
?>
</DIV>
<?
}
}
// 달력의 틀을 보여주는 부분
$temp = 7- (($lastday[$month]+$dayoftheweek)%7);
if ($temp == 7) $temp = 0;
$lastcount = $lastday[$month]+$dayoftheweek + $temp;
for ($iz = 1; $iz <= $lastcount; $iz++) { // 42번을 칠하게 된다.
$bgcolor = "#ffffff"; // 쭉 흰색으로 칠하고
if ($b_year==$year && $b_mon==$month && $b_day==$cday) $bgcolor = "#DEFADE"; // "#DFFDDF"; // 오늘날짜 연두색으로 표기
if (($iz%7) == 1) echo ("<tr>"); // 주당 7개씩 한쎌씩을 쌓는다.
if ($dayoftheweek < $iz && $iz <= $lastday[$month]+$dayoftheweek) {
// 전체 루프안에서 숫자가 들어가는 셀들만 해당됨
// 즉 11월 달에서 1일부터 30 일까지만 해당
$daytext = "$cday"; // $cday 는 숫자 예> 11월달은 1~ 30일 까지
//$daytext 은 셀에 써질 날짜 숫자 넣을 공간
$daycontcolor = "" ;
$daycolor = "";
if ($iz%7 == 1) $daycolor = "red"; // 일요일
if ($iz%7 == 0) $daycolor = "blue"; // 토요일
// 여기까지 숫자와 들어갈 내용에 대한 변수들의 세팅이 끝나고
// 이제 여기 부터 직접 셀이 그려지면서 그 안에 내용이 들어 간다.
echo ("<td width=$col_width height=$col_height bgcolor=$bgcolor valign=top class='cal_title'>");
$f_date = $year.sprintf("%02d",$month).sprintf("%02d",$cday);
// 기념일 파일 내용 비교위한 변수 선언, 월과 일을 두자리 포맷으로 고정
if (strlen($month) == 1) { $monthp = "0".$month ; }
else {$monthp = $month ; }
if (strlen($cday) == 1) { $cdayp = "0".$cday ; }
else {$cdayp = $cday ; }
$memday = $year.$monthp.$cdayp;
// *.0000 파일인 해마다 동일한 양력기념일은 월일로만 구분한다.
if( !file_exists($file_index.".".$year)) { $memday = $monthp.$cdayp; }
$daycont = "" ;
// 년월일 8자리 또는 4자리를 잘라 비교하여 뒷 문장을 출력
for($i=0 ; $i < sizeof($dayfile) ; $i++){ // 파일 첫 행부터 끝행까지 루프
if($memday == substr($dayfile[$i],$cutpoint1,$cutpoint2)){$daycont = substr($dayfile[$i],9,strlen($dayfile[$i])-10);
// r,b,y,g 구분자로 글자색깔 구분
$daycl = substr($dayfile[$i],0,1) ;
if($daycl == "r"){
$daycontcolor = "red" ; // 휴일
$daycolor = "red";
}
else if($daycl == "y"){$daycontcolor = "brown" ;} // 생일
else if($daycl == "g"){$daycontcolor = "gray" ;} // 음력
else{$daycontcolor = "blue" ;}
}
}
// 석봉운님의 음력날짜 변수선언
$myarray = soltolun($year,$month,$cday);
if ($myarray[day]==1 || $myarray[day]==11 || $myarray[day]==21) {
$moonday ="<font color=gray> (음)$myarray[month].$myarray[day]$myarray[leap]</font>";
} else {
$moonday="";
}
include("$file_index.moon"); // 음력절기 & 음력기념일
if ($annivmoonday&&$daycont) $blank="<br>"; // 음력절기와 양력기념일이 동시에 있으면 한칸 띔
else $blank="";
if ($write_href) {
// $write_href (글쓰기 권한)이 있으면
// 날짜를 클릭하면 글씨쓰기가 가능한 링크를 넣어서 출력하기
echo "<a href='$write_href&f_date=$f_date&t_date=$f_date'><font color=$daycolor>$daytext</font></a>$moonday <font color=$daycontcolor>$daycont</font>$blank $annivmoonday";
}
else { // 글쓰기 권한이 없으면 글쓰기 링크는 넣지 않고 그냥 숫자와 기념일 내용만 출력하기
echo "<font color=$daycolor>$daytext</font>$moonday <font color=$daycontcolor>$daycont</font>$blank $annivmoonday";
}
echo $html_day[$cday];
echo ("</td>"); // 한칸을 마무리
$cday++; // 날짜를 카운팅
}
// 11월에서 1일부터 30일에 해당되지 않으면 그냥 회색을 칠한다.
else { echo (" <td width=$col_width height=$col_height bgcolor=#F7F7F7 valign=top class=size1> </td>"); }
if (($iz%7) == 0) echo (" </tr>");
} // 반복구문이 끝남
?>
</table>
</td></tr></table>
<!--년, 월 form 스크립트 -->
<script language="JavaScript">
<!--
function namosw_goto_byselect(sel, targetstr)
{
var index = sel.selectedIndex;
if (sel.options[index].value != '') {
if (targetstr == 'blank') {
window.open(sel.options[index].value, 'win1');
} else {
var frameobj;
if (targetstr == '') targetstr = 'self';
if ((frameobj = eval(targetstr)) != null)
frameobj.location = sel.options[index].value;
}
}
}
// 레이어 뷰 스크립트
var iDelay = 50 // Delay to hide in milliseconds
var iNSWidth=130 // Default width for netscape
var sDisplayTimer = null, oLastItem
function getRealPosition(i,which) {
iPos = 0
while (i!=null) {
iPos += i["offset" + which]
i = i.offsetParent
}
return iPos
}
function showLayers(sDest,itop,ileft,iWidth) {
if (document.all!=null) {
var i = window.event.srcElement
stopTimer()
dest = document.all[sDest]
if ((oLastItem!=null) && (oLastItem!=dest))
hideItem()
if (dest) {
// Netscape Hack
if (i.offsetWidth==0)
if (iWidth)
i.offsetWidth=iWidth
else
i.offsetWidth=iNSWidth;
if (ileft)
dest.style.pixelLeft = ileft
else
dest.style.pixelLeft = getRealPosition(i,"Left") - 60 // 미리보기 레이어 팝업 X좌표 설정(-10)
// dest.style.pixelLeft = getRealPosition(i,"Left") + i.offsetWidth *0.1 // 불러오는 메뉴 좌표
if (itop)
dest.style.pixelTop = itop
else
dest.style.pixelTop = getRealPosition(i,"Top") - 65 // 미리보기 레이어 팝업 Y좌표 설정(-30)
dest.style.visibility = "visible"
}
oLastItem = dest
}
}
function stopTimer() {
clearTimeout(sDisplayTimer)
}
function startTimer(el) {
if (!el.contains(event.toElement)) {
stopTimer()
sDisplayTimer = setTimeout("hideItem()",iDelay)
}
}
function hideItem() {
if (oLastItem)
oLastItem.style.visibility="hidden"
}
function checkOver() {
if ((oLastItem) && (oLastItem.contains(event.srcElement))) {
stopTimer()
}
}
function checkOut() {
if (oLastItem==event.srcElement)
startTimer(event.srcElement)
}
document.onmouseover = checkOver
document.onmouseout = checkOut