달력 최근 게시물에서 입력된 날짜 위에 마우스 올리면 제목이 나오게 하고 싶어요 정보
달력 최근 게시물에서 입력된 날짜 위에 마우스 올리면 제목이 나오게 하고 싶어요본문
오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.
오류 주소 : http://gwanakyae.co.kr/
제목 함수가 뭔지 모르겠습니다..
echo (" <td align='center' height='15'>\n");
if ($html_day[$cday]) {
$f_date = $year.sprintf("%02d",$month).sprintf("%02d",$cday);
echo "<p><a href=\"bbs/board.php?bo_table=schedule&&year=$year&month=$month\" class=writeday target=\"_self\" onfocus=\"this.blur()\" title=\"이곳에 함수\"><b>$daytext</b></a></p>\n";
"이곳에 함수" <<<<<< 이부분에 제목 함수를 넣으면 될 것 같은데 아무리 바꿔 넣어도 모르겠네요..
--------------------------------------------lastest.skin.php--------------------------------------------
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$cellh = 21;
$cellw = 21;
?>
<style type="text/css">
td.title {text-align: center; padding-top: 1pt; padding-bottom: 1pt; height: 25px; font-weight:bold;}
td.invalid {
text-align: center; padding-top: 2pt; height:<?=$cellh?>; width:<?=$cellh?>;
background-image: url(<?=$latest_skin_path?>/img/mini2.gif);
}
td.valid {
text-align: center; padding-top: 2pt; height:<?=$cellh?>; width:<?=$cellh?>;
background-image: url(<?=$latest_skin_path?>/img/mini2.gif);
}
td.today {
text-align: center; padding-top: 2pt; height:<?=$cellh?>; width:<?=$cellh?>;
background-image: url(<?=$latest_skin_path?>/img/mini3.gif);
}
.bgsun {text-align: center; font-size: 8pt; color: #da0303; padding-top: 2pt; height:<?=$cellh?>; width:<?=$cellh?>;
background-image: url(<?=$latest_skin_path?>/img/mini2.gif);
}
.bgsat {text-align: center; font-size: 8pt; color: #3285ec; padding-top: 2pt; height:<?=$cellh?>; width:<?=$cellh?>;
background-image: url(<?=$latest_skin_path?>/img/mini2.gif);
}
.bgweek {text-align: center; font-size: 8pt; padding-top: 2pt; height:<?=$cellh?>; width:<?=$cellh?>;
background-image: url(<?=$latest_skin_path?>/img/mini2.gif);
}
p.title {font-size: 1em; font-weight:bold}
p.sunday {text-align: center; font-size: 8pt; color: #da0303;}
p.saturday {text-align: center; font-size: 8pt; color: #A2A2A2;}
p.weekday {text-align: center; font-size: 8pt;}
a:link.writeday, a:visited.writeday {text-align: center; font-size: 8pt; color: #0069D2; font-weight:bold;}
img {border:0}
</style>
<?
$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;
}
$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="190" cellpadding=0 cellspacing=0 border=0>
<tr>
<td colspan=3 align=center><a href="<?=$g4[path]?>/bbs/board.php?bo_table=schedule" onfocus=this.blur()><img src="<?=$latest_skin_path?>/img/meeting_title.png" border="0"></a></td>
</tr>
<tr>
<td align=center width="5" height="120" background="<?=$latest_skin_path?>/img/meeting_left_bg.png"></td>
<td align=center width="180" valign="top">
<!-- 반복구문 시작 -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr height="20">
<td width="45" align="right"><a href="<?="$_SERVER[PHP_SELF]?&"?><?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&bo_table=$bo_table");?>" target="_self"onfocus="this.blur()" title="<?=$month_pre?> 월"><img src="<?=$latest_skin_path?>/img/month_prev.gif" align=absmiddle border=0></a></td>
<td width="80" align="center"><b><font style='font-family:돋움; font-size:9pt; color:#FB6900;'><?=$year?></a> 년 <?=$month?></a> 월</font></b></td>
<td width="45" align="left"><a href="<?="$_SERVER[PHP_SELF]?&"?><?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&bo_table=$bo_table");?>" target="_self"onfocus="this.blur()" title="<?=$month_pre?> 월"><img src="<?=$latest_skin_path?>/img/month_next.gif" align=absmiddle border=0></a></td>
</tr>
<tr><td colspan="3" height='1' align="center"><table width=160 height="1" cellSpacing=0 cellPadding=0 border=0 align="center"><tr><td height="1" bgcolor="#FFAC59"></td></tr></table></td></tr>
</table>
<TABLE width=170 cellSpacing=0 cellPadding=0 border=0 align=center>
<TR>
<td align="center" height="15"><img src="<?=$latest_skin_path?>/img/sun.jpg"></td>
<td align="center"><img src="<?=$latest_skin_path?>/img/mon.jpg"></td>
<td align="center"><img src="<?=$latest_skin_path?>/img/thu.jpg"></td>
<td align="center"><img src="<?=$latest_skin_path?>/img/wed.jpg"></td>
<td align="center"><img src="<?=$latest_skin_path?>/img/thu.jpg"></td>
<td align="center"><img src="<?=$latest_skin_path?>/img/fri.jpg"></td>
<td align="center"><img src="<?=$latest_skin_path?>/img/sat.jpg"></td>
</TR>
<tr><td colspan="7" height='1' align="center"><table width=160 height="1" cellSpacing=0 cellPadding=0 border=0 align="center"><tr><td height="1" bgcolor="#FFAC59"></td></tr></table></td></tr>
<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);
// 내용을 보여주는 부분
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;
}
for ($i = $start_day ; $i <= $end_day; $i++) {
// $html_day[$i].= 은 문자를 덧붙이는 작업이다. 바로 . (쩜) 의 위력이다.
$html_day[$i] = "1"; //"<p><a href='javascript:;' onclick=\"popup_schedule('./pop_schedule.php?bo_table=$bo_table&year=$year&month=$month&day=$i');\" class=writeday>"; //.</a>"."\n";
// $html_day[$i].= "<p><a href='javascript:;' onclick=\"popup_schedule('./popup_schedule.php?bo_table=$bo_table&wr_id=$row[wr_id]');\" class=writeday>"; //.</a>"."\n";
// $html_day[$i].= "<br><a href='?doc=bbs/gnuboard.php&bo_table=$bo_table&wr_id=$row[wr_id]'>".substr($row[wr_subject],0,18)."</a>"."\n";
// substr로 끊으면 경우에 따라 지져분해 지므로..
}
}
// 달력의 틀을 보여주는 부분
// 여기부터 분석하면 됨
$temp = 7- (($lastday[$month]+$dayoftheweek)%7);
// $dayoftheweek; // 6 이다.
// $temp = 6 이다. 무슨 의미인가?
if ($temp == 7) $temp = 0;
$lastcount = $lastday[$month]+$dayoftheweek + $temp;
// $lastcount = 42
// $lastcount 는 달력을 이루고 있는 전체 셀의 갯수이다. 2003년 11월은 날짜 30개와 빈칸 12개 다.
//
for ($iz = 1; $iz <= $lastcount; $iz++) { // 42번을 칠하게 된다.
$bgcolor = "#ffffff"; // 쭉 흰색으로 칠하고
$offset = $iz%7;
if ($offset == 1) echo (" <tr>\n"); // 주당 7개씩 한쎌씩을 쌓는다.
if ($dayoftheweek < $iz && $iz <= $lastday[$month]+$dayoftheweek) {
if ($b_year==$year && $b_mon==$month && $b_day==$cday) {
$cstyle = 'today';
} else {
$cstyle = 'valid';
}
switch ($offset) { // 요일에 따라 날짜의 색깔 결정
case 1: $dstyle = 'sunday';
break;
case 0: $dstyle = 'saturday';
break;
default: $dstyle = 'weekday';
}
// 전체 루프안에서 숫자가 들어가는 셀들만 해당됨
// 즉 11월 달에서 1일부터 30 일까지만 해당
$daytext = "$cday"; // $cday 는 숫자 예> 11월달은 1~ 30일 까지
//$daytext 은 셀에 써질 날짜 숫자 넣을 공간
// if ($iz%7 == 1) $daytext = "<font color=red>$daytext</font>"; // 일요일
// if ($iz%7 == 0) $daytext = "<font color=gray>$daytext</font>"; // 토요일
// 여기까지 숫자와 들어갈 내용에 대한 변수들의 세팅이 끝나고
// 이제 여기 부터 직접 셀이 그려지면서 그 안에 내용이 들어 간다.
echo (" <td align='center' height='15'>\n");
if ($html_day[$cday]) {
$f_date = $year.sprintf("%02d",$month).sprintf("%02d",$cday);
echo "<p><a href=\"bbs/board.php?bo_table=schedule&&year=$year&month=$month\" class=writeday target=\"_self\" onfocus=\"this.blur()\" title=\"이곳에 함수\"><b>$daytext</b></a></p>\n";
}
else { // 글쓰기 권한이 없으면 글쓰기 링크는 넣지 않고 그냥 숫자만 출력하기
echo "<p class=$dstyle>$daytext</p>\n";
}
// echo $html_day[$cday];
echo (" </td>\n"); // 한칸을 마무리
$cday++; // 날짜를 카운팅
}
// 11월에서 1일부터 30일에 해당되지 않으면 그냥 회색을 칠한다.
else { echo (" <td> </td>\n"); }
if (($iz%7) == 0) echo (" </tr>\n");
} // 반복구문이 끝남
?>
</table>
<!-- 반복구문 끝 -->
</td>
<td align=center width="5" background="<?=$latest_skin_path?>/img/meeting_right_bg.png"></td>
</tr>
<tr>
<td colspan=3 align=center><img src="<?=$latest_skin_path?>/img/meeting_bottom.png"></td>
</tr>
</table>
오류 주소 : http://gwanakyae.co.kr/
제목 함수가 뭔지 모르겠습니다..
echo (" <td align='center' height='15'>\n");
if ($html_day[$cday]) {
$f_date = $year.sprintf("%02d",$month).sprintf("%02d",$cday);
echo "<p><a href=\"bbs/board.php?bo_table=schedule&&year=$year&month=$month\" class=writeday target=\"_self\" onfocus=\"this.blur()\" title=\"이곳에 함수\"><b>$daytext</b></a></p>\n";
"이곳에 함수" <<<<<< 이부분에 제목 함수를 넣으면 될 것 같은데 아무리 바꿔 넣어도 모르겠네요..
--------------------------------------------lastest.skin.php--------------------------------------------
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$cellh = 21;
$cellw = 21;
?>
<style type="text/css">
td.title {text-align: center; padding-top: 1pt; padding-bottom: 1pt; height: 25px; font-weight:bold;}
td.invalid {
text-align: center; padding-top: 2pt; height:<?=$cellh?>; width:<?=$cellh?>;
background-image: url(<?=$latest_skin_path?>/img/mini2.gif);
}
td.valid {
text-align: center; padding-top: 2pt; height:<?=$cellh?>; width:<?=$cellh?>;
background-image: url(<?=$latest_skin_path?>/img/mini2.gif);
}
td.today {
text-align: center; padding-top: 2pt; height:<?=$cellh?>; width:<?=$cellh?>;
background-image: url(<?=$latest_skin_path?>/img/mini3.gif);
}
.bgsun {text-align: center; font-size: 8pt; color: #da0303; padding-top: 2pt; height:<?=$cellh?>; width:<?=$cellh?>;
background-image: url(<?=$latest_skin_path?>/img/mini2.gif);
}
.bgsat {text-align: center; font-size: 8pt; color: #3285ec; padding-top: 2pt; height:<?=$cellh?>; width:<?=$cellh?>;
background-image: url(<?=$latest_skin_path?>/img/mini2.gif);
}
.bgweek {text-align: center; font-size: 8pt; padding-top: 2pt; height:<?=$cellh?>; width:<?=$cellh?>;
background-image: url(<?=$latest_skin_path?>/img/mini2.gif);
}
p.title {font-size: 1em; font-weight:bold}
p.sunday {text-align: center; font-size: 8pt; color: #da0303;}
p.saturday {text-align: center; font-size: 8pt; color: #A2A2A2;}
p.weekday {text-align: center; font-size: 8pt;}
a:link.writeday, a:visited.writeday {text-align: center; font-size: 8pt; color: #0069D2; font-weight:bold;}
img {border:0}
</style>
<?
$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;
}
$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="190" cellpadding=0 cellspacing=0 border=0>
<tr>
<td colspan=3 align=center><a href="<?=$g4[path]?>/bbs/board.php?bo_table=schedule" onfocus=this.blur()><img src="<?=$latest_skin_path?>/img/meeting_title.png" border="0"></a></td>
</tr>
<tr>
<td align=center width="5" height="120" background="<?=$latest_skin_path?>/img/meeting_left_bg.png"></td>
<td align=center width="180" valign="top">
<!-- 반복구문 시작 -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr height="20">
<td width="45" align="right"><a href="<?="$_SERVER[PHP_SELF]?&"?><?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&bo_table=$bo_table");?>" target="_self"onfocus="this.blur()" title="<?=$month_pre?> 월"><img src="<?=$latest_skin_path?>/img/month_prev.gif" align=absmiddle border=0></a></td>
<td width="80" align="center"><b><font style='font-family:돋움; font-size:9pt; color:#FB6900;'><?=$year?></a> 년 <?=$month?></a> 월</font></b></td>
<td width="45" align="left"><a href="<?="$_SERVER[PHP_SELF]?&"?><?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&bo_table=$bo_table");?>" target="_self"onfocus="this.blur()" title="<?=$month_pre?> 월"><img src="<?=$latest_skin_path?>/img/month_next.gif" align=absmiddle border=0></a></td>
</tr>
<tr><td colspan="3" height='1' align="center"><table width=160 height="1" cellSpacing=0 cellPadding=0 border=0 align="center"><tr><td height="1" bgcolor="#FFAC59"></td></tr></table></td></tr>
</table>
<TABLE width=170 cellSpacing=0 cellPadding=0 border=0 align=center>
<TR>
<td align="center" height="15"><img src="<?=$latest_skin_path?>/img/sun.jpg"></td>
<td align="center"><img src="<?=$latest_skin_path?>/img/mon.jpg"></td>
<td align="center"><img src="<?=$latest_skin_path?>/img/thu.jpg"></td>
<td align="center"><img src="<?=$latest_skin_path?>/img/wed.jpg"></td>
<td align="center"><img src="<?=$latest_skin_path?>/img/thu.jpg"></td>
<td align="center"><img src="<?=$latest_skin_path?>/img/fri.jpg"></td>
<td align="center"><img src="<?=$latest_skin_path?>/img/sat.jpg"></td>
</TR>
<tr><td colspan="7" height='1' align="center"><table width=160 height="1" cellSpacing=0 cellPadding=0 border=0 align="center"><tr><td height="1" bgcolor="#FFAC59"></td></tr></table></td></tr>
<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);
// 내용을 보여주는 부분
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;
}
for ($i = $start_day ; $i <= $end_day; $i++) {
// $html_day[$i].= 은 문자를 덧붙이는 작업이다. 바로 . (쩜) 의 위력이다.
$html_day[$i] = "1"; //"<p><a href='javascript:;' onclick=\"popup_schedule('./pop_schedule.php?bo_table=$bo_table&year=$year&month=$month&day=$i');\" class=writeday>"; //.</a>"."\n";
// $html_day[$i].= "<p><a href='javascript:;' onclick=\"popup_schedule('./popup_schedule.php?bo_table=$bo_table&wr_id=$row[wr_id]');\" class=writeday>"; //.</a>"."\n";
// $html_day[$i].= "<br><a href='?doc=bbs/gnuboard.php&bo_table=$bo_table&wr_id=$row[wr_id]'>".substr($row[wr_subject],0,18)."</a>"."\n";
// substr로 끊으면 경우에 따라 지져분해 지므로..
}
}
// 달력의 틀을 보여주는 부분
// 여기부터 분석하면 됨
$temp = 7- (($lastday[$month]+$dayoftheweek)%7);
// $dayoftheweek; // 6 이다.
// $temp = 6 이다. 무슨 의미인가?
if ($temp == 7) $temp = 0;
$lastcount = $lastday[$month]+$dayoftheweek + $temp;
// $lastcount = 42
// $lastcount 는 달력을 이루고 있는 전체 셀의 갯수이다. 2003년 11월은 날짜 30개와 빈칸 12개 다.
//
for ($iz = 1; $iz <= $lastcount; $iz++) { // 42번을 칠하게 된다.
$bgcolor = "#ffffff"; // 쭉 흰색으로 칠하고
$offset = $iz%7;
if ($offset == 1) echo (" <tr>\n"); // 주당 7개씩 한쎌씩을 쌓는다.
if ($dayoftheweek < $iz && $iz <= $lastday[$month]+$dayoftheweek) {
if ($b_year==$year && $b_mon==$month && $b_day==$cday) {
$cstyle = 'today';
} else {
$cstyle = 'valid';
}
switch ($offset) { // 요일에 따라 날짜의 색깔 결정
case 1: $dstyle = 'sunday';
break;
case 0: $dstyle = 'saturday';
break;
default: $dstyle = 'weekday';
}
// 전체 루프안에서 숫자가 들어가는 셀들만 해당됨
// 즉 11월 달에서 1일부터 30 일까지만 해당
$daytext = "$cday"; // $cday 는 숫자 예> 11월달은 1~ 30일 까지
//$daytext 은 셀에 써질 날짜 숫자 넣을 공간
// if ($iz%7 == 1) $daytext = "<font color=red>$daytext</font>"; // 일요일
// if ($iz%7 == 0) $daytext = "<font color=gray>$daytext</font>"; // 토요일
// 여기까지 숫자와 들어갈 내용에 대한 변수들의 세팅이 끝나고
// 이제 여기 부터 직접 셀이 그려지면서 그 안에 내용이 들어 간다.
echo (" <td align='center' height='15'>\n");
if ($html_day[$cday]) {
$f_date = $year.sprintf("%02d",$month).sprintf("%02d",$cday);
echo "<p><a href=\"bbs/board.php?bo_table=schedule&&year=$year&month=$month\" class=writeday target=\"_self\" onfocus=\"this.blur()\" title=\"이곳에 함수\"><b>$daytext</b></a></p>\n";
}
else { // 글쓰기 권한이 없으면 글쓰기 링크는 넣지 않고 그냥 숫자만 출력하기
echo "<p class=$dstyle>$daytext</p>\n";
}
// echo $html_day[$cday];
echo (" </td>\n"); // 한칸을 마무리
$cday++; // 날짜를 카운팅
}
// 11월에서 1일부터 30일에 해당되지 않으면 그냥 회색을 칠한다.
else { echo (" <td> </td>\n"); }
if (($iz%7) == 0) echo (" </tr>\n");
} // 반복구문이 끝남
?>
</table>
<!-- 반복구문 끝 -->
</td>
<td align=center width="5" background="<?=$latest_skin_path?>/img/meeting_right_bg.png"></td>
</tr>
<tr>
<td colspan=3 align=center><img src="<?=$latest_skin_path?>/img/meeting_bottom.png"></td>
</tr>
</table>
댓글 전체

// $html_day[$i].= 은 문자를 덧붙이는 작업이다. 바로 . (쩜) 의 위력이다.
$html_day[$i] = "1";
요기를
$html_day[$i] =cut_str($row['wr_subject'],18);
요롷게 해주시고
이곳에 함수 <-요기다가 <?=$html_day[$cday]?>
요렇게 하면 안될라나요?;흐
$html_day[$i] = "1";
요기를
$html_day[$i] =cut_str($row['wr_subject'],18);
요롷게 해주시고
이곳에 함수 <-요기다가 <?=$html_day[$cday]?>
요렇게 하면 안될라나요?;흐
되네요..됩니다.. 다들 참조하세요...메가쵸코님 감사드립니다
달력 제목 쓰기
달력 제목 쓰기