열매님 일기장 스킨에서 달력의 일요일, 토요일 출력색을 바꾸려면... 정보
열매님 일기장 스킨에서 달력의 일요일, 토요일 출력색을 바꾸려면...
본문
http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=47892&sca=&sfl=wr_name%2C1&stx=%BF%AD%B8%C5&sop=and
어떻게 해야 하나요?
set.php를 건드리는 것 같긴한데....
제가 PHP 완전 초짜라,,, 상세한 답변 부탁드려요 ㅠㅠ
set.php 소스↓
<?
$td_height="20"; //테이블 크기
$today_color="#005866 style='font-weight:bold;'"; //오늘날짜 색
$else_color="858585"; //나머지 날짜 색
//// wr_link1 값이 있을경우 , month , year 바꿈
if($wr_link1){
$temptemp=explode("/",$wr_link1);
$year=$temptemp[0];
$month=$temptemp[1];
}
//한달의 총 날짜 계산 함수
function Month_Day($i_month,$i_year){
$day=1;
while(checkdate($i_month,$day,$i_year)){
$day++;
}
$day--;
return $day;
}
//오늘 날짜를 년월일별로 구하기
$today=date("Ymd");
$today_year=date("Y");
$today_month=date("m");
$today_day=date("d");
//month와 year의 변수값이 지정되어있지 않으면 오늘로 지정.
if(!$month)$month=$today_month;
if(!$year)$year=$today_year;
//선택한 월의 총 일수를 구함.
$total_day=Month_Day($month,$year);
//선택한 월의 1일의 요일을 구함. 일요일은 0.
$first=date(w,mktime(0,0,0,$month,1,$year));
// 지난달과 다음달을 보는 루틴 //
$year_p=$year-1;
$year_n=$year+1;
if($month==1){
$year_prev=$year_p;
$year_next=$year;
$month_prev=12;
$month_next=$month+1;
}
if($month==12){
$year_prev=$year;
$year_next=$year_n;
$month_prev=$month-1;
$month_next=1;
}
if($month!=1 && $month!=12){
$year_prev=$year;
$year_next=$year;
$month_prev=$month-1;
$month_next=$month+1;
}
if(strlen($month_prev)!=2) $month_prev="0".$month_prev;
if(strlen($month_next)!=2) $month_next="0".$month_next;
$value[month_prev]=$month_prev;
$value[month_next]=$month_next;
$value[year_prev]=$year_prev;
$value[year_next]=$year_next;
$value[year]=$year;
$value[month]=$month;
// 오늘 작성한 글이 없고, wr_link1 값이 없을때 최근에 작성 글을 선택한다
if(!$wr_link1 && !mysql_num_rows(mysql_query("SELECT * FROM $write_table WHERE wr_link1='$today_year/$today_month/$today_day'")))
{
$q_today=mysql_query("SELECT * FROM $write_table order by wr_link1 desc limit 1");
if(mysql_num_rows($q_today)){
$data_today=mysql_fetch_array($q_today);
$wr_link1=$data_today[wr_link1];
}
}
?>
댓글 전체
달력 표시하는 for문이나 roof 문 보시면 css로 정의되어있지않을까요??