달력스킨 소스 latest.skin.php질문입니다
그누보드 초보 사용자입니다
아래소스는 latest.skin.php 소스입니다.
여기서.. 년,월 폰트크기를 설정하는곳이어딘지 알고싶고,
또 달력 일(20)을클릭하면 팝업이 떠야하는데 페이지 오류라면서 안뜹니다.
제발 좀 도와주십시오 뭐가 문젠지 알수가 없네요^^;;
참고로 pop_schedule.php 파일은 /gnuboard4 폴더 안에있습니다.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
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);
}
$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);
}
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: #ff00ff; padding-top: 2pt; height:<?=$cellh?>; width:<?=$cellh?>;
background-image: url(<?=$latest_skin_path?>/img/mini2.gif);
}
.bgsat {text-align: center; font-size: 8pt; color: #3366cc; 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);
}
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: #ff00ff; padding-top: 2pt; height:<?=$cellh?>; width:<?=$cellh?>;
background-image: url(<?=$latest_skin_path?>/img/mini2.gif);
}
.bgsat {text-align: center; font-size: 8pt; color: #3366cc; 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: red;}
p.saturday {text-align: center; font-size: 8pt; color: #3366cc;}
p.weekday {text-align: center; font-size: 8pt; color: #828282;}
p.sunday {text-align: center; font-size: 8pt; color: red;}
p.saturday {text-align: center; font-size: 8pt; color: #3366cc;}
p.weekday {text-align: center; font-size: 8pt; color: #828282;}
a:link.writeday, a:visited.writeday {text-align: center; font-size: 8pt; color: #fd7100; font-weight:bold;}
img {border:0}
</style>
img {border:0}
</style>
<table width="217" background="<?=$latest_skin_path?>/img/cal_back.gif" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="34" style="padding-left:10px;padding-top:9px">
<tr>
<td height="34" style="padding-left:10px;padding-top:9px">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="5"></td>
<td width="17"><img src="<?=$latest_skin_path?>/img/b-1.gif" align="absmiddle"></td>
<td width="5"></td>
<td width="135"><a href='<?=$g4['bbs_path']?>/board.php?bo_table=<?=$bo_table?>'><strong><font color="white" size="1pt"><?=$board['bo_subject']?></font></strong></a></td>
<td width="34"><a href='<?=$g4['bbs_path']?>/board.php?bo_table=<?=$bo_table?>'><img src="<?=$latest_skin_path?>/img/more.gif" align="absmiddle"></a></td>
<td width="12"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="8" style="padding-left:12px">
</td>
</tr>
<tr>
<td style="padding-top:3px;padding-bottom:4px">
<tr>
<td width="5"></td>
<td width="17"><img src="<?=$latest_skin_path?>/img/b-1.gif" align="absmiddle"></td>
<td width="5"></td>
<td width="135"><a href='<?=$g4['bbs_path']?>/board.php?bo_table=<?=$bo_table?>'><strong><font color="white" size="1pt"><?=$board['bo_subject']?></font></strong></a></td>
<td width="34"><a href='<?=$g4['bbs_path']?>/board.php?bo_table=<?=$bo_table?>'><img src="<?=$latest_skin_path?>/img/more.gif" align="absmiddle"></a></td>
<td width="12"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="8" style="padding-left:12px">
</td>
</tr>
<tr>
<td style="padding-top:3px;padding-bottom:4px">
<?
$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;
}
$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));
if ($year%4 == 0) $lastday[2] = 29;
$dayoftheweek = date("w", mktime (0,0,0,$month,1,$year));
?>
<table width="180" border="0" cellspacing="1" cellpadding="0" align="center">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr height="30">
<td width="40" 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?>"><font size="1pt"><img src="<?=$latest_skin_path?>/img/month_prev.gif" align=absmiddle border=0></font></a></td>
<td width="90" align="center"><a href="<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>" onfocus="this.blur()" title="일정관리 바로가기"><b><?=$year?></b></a><font color="#474747"><b> - </b></font><a href="<?="$_SERVER[PHP_SELF]?&bo_table=$bo_table"?>" onfocus="this.blur()" title="이번 달"><b><?=$month?></b></a></td>
<td width="40" 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>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">
<TABLE width=<?=$cellw*7?> cellSpacing=0 cellPadding=0 border=0 align=center>
<TR>
<td class=bgsun><p class=sunday>S</p></td>
<td class=bgweek><p class=weekday>M</p></td>
<td class=bgweek><p class=weekday>T</p></td>
<td class=bgweek><p class=weekday>W</p></td>
<td class=bgweek><p class=weekday>T</p></td>
<td class=bgweek><p class=weekday>F</p></td>
<td class=bgsat><p class=saturday>S</p></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);
<table width="180" border="0" cellspacing="1" cellpadding="0" align="center">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr height="30">
<td width="40" 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?>"><font size="1pt"><img src="<?=$latest_skin_path?>/img/month_prev.gif" align=absmiddle border=0></font></a></td>
<td width="90" align="center"><a href="<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>" onfocus="this.blur()" title="일정관리 바로가기"><b><?=$year?></b></a><font color="#474747"><b> - </b></font><a href="<?="$_SERVER[PHP_SELF]?&bo_table=$bo_table"?>" onfocus="this.blur()" title="이번 달"><b><?=$month?></b></a></td>
<td width="40" 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>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">
<TABLE width=<?=$cellw*7?> cellSpacing=0 cellPadding=0 border=0 align=center>
<TR>
<td class=bgsun><p class=sunday>S</p></td>
<td class=bgweek><p class=weekday>M</p></td>
<td class=bgweek><p class=weekday>T</p></td>
<td class=bgweek><p class=weekday>W</p></td>
<td class=bgweek><p class=weekday>T</p></td>
<td class=bgweek><p class=weekday>F</p></td>
<td class=bgsat><p class=saturday>S</p></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;
}
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;
}
$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로 끊으면 경우에 따라 지져분해 지므로..
}
}
// $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 이다. 무슨 의미인가?
// $dayoftheweek; // 6 이다.
// $temp = 6 이다. 무슨 의미인가?
if ($temp == 7) $temp = 0;
$lastcount = $lastday[$month]+$dayoftheweek + $temp;
$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) {
// $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';
}
$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=blue>$daytext</font>"; // 토요일
// 여기까지 숫자와 들어갈 내용에 대한 변수들의 세팅이 끝나고
// 이제 여기 부터 직접 셀이 그려지면서 그 안에 내용이 들어 간다.
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=blue>$daytext</font>"; // 토요일
// 여기까지 숫자와 들어갈 내용에 대한 변수들의 세팅이 끝나고
// 이제 여기 부터 직접 셀이 그려지면서 그 안에 내용이 들어 간다.
echo (" <td class=$cstyle>\n");
if ($html_day[$cday]) {
$f_date = $year.sprintf("%02d",$month).sprintf("%02d",$cday);
if ($html_day[$cday]) {
$f_date = $year.sprintf("%02d",$month).sprintf("%02d",$cday);
echo "<p><a href=\"javascript:win_open('$g4[path]/pop_schedule.php?bo_table=$bo_table&year=$year&month=$month&day=$cday', 'schedule', 'left=50, top=50, width=300, height=400, scrollbars=1');\" class=writeday><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 class=invalid> </td>\n"); }
if (($iz%7) == 0) echo (" </tr>\n");
}
else { // 글쓰기 권한이 없으면 글쓰기 링크는 넣지 않고 그냥 숫자만 출력하기
echo "<p class=$dstyle>$daytext</p>\n";
}
// echo $html_day[$cday];
echo (" </td>\n"); // 한칸을 마무리
$cday++; // 날짜를 카운팅
}
// 11월에서 1일부터 30일에 해당되지 않으면 그냥 회색을 칠한다.
else { echo (" <td class=invalid> </td>\n"); }
if (($iz%7) == 0) echo (" </tr>\n");
} // 반복구문이 끝남
?>
</table>
</td>
</tr>
</table><br>
</td>
</tr>
</table>
</td>
</tr>
<tr><td height="10"></td></tr>
</table>
?>
</table>
</td>
</tr>
</table><br>
</td>
</tr>
</table>
</td>
</tr>
<tr><td height="10"></td></tr>
</table>
|
댓글을 작성하시려면 로그인이 필요합니다.
로그인
댓글 7개
<td width="90" align="center"><a href="<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>" onfocus="this.blur()" title="일정관리 바로가기"><b><?=$year?></b></a><font color="#474747"><b> - </b></font><a href="<?="$_SERVER[PHP_SELF]?&bo_table=$bo_table"?>" onfocus="this.blur()" title="이번 달"><b><?=$month?></b></a></td>
팝업 에러 내용은 뭔가유...?
그리고, 년월에서 숫자 나오는 부분요.. 2006년 11월 네서 숫자는 어디서 설정하나요?
javascript 함수에 win_open을 못 찾나 보네요.
/js/common.js 287 라인
function win_open(url, name, option)
그리고 위의 js를 선언한곳은
/head.sub.php 62라인
<script language="javascript" src="<?=$g4['path']?>/js/common.js"></script>
head.sub.php 파일에
<html>
<head>
</head>
<script language="javascript">
// 자바스크립트에서 사용하는 전역변수 선언
var g4_path = "<?=$g4['path']?>";
var g4_bbs = "<?=$g4['bbs']?>";
var g4_bbs_img = "<?=$g4['bbs_img']?>";
var g4_url = "<?=$g4['url']?>";
var g4_is_member = "<?=$is_member?>";
var g4_is_admin = "<?=$is_admin?>";
var g4_bo_table = "<?=isset($bo_table)?$bo_table:'';?>";
var g4_sca = "<?=isset($sca)?$sca:'';?>";
var g4_charset = "<?=$g4['charset']?>";
var g4_is_gecko = navigator.userAgent.toLowerCase().indexOf("gecko") != -1;
var g4_is_ie = navigator.userAgent.toLowerCase().indexOf("msie") != -1;
<? if ($is_admin) { echo "var g4_admin = '{$g4['admin']}';"; } ?>
</script>
<script language="javascript" src="<?=$g4['path']?>/js/common.js"></script>
<body topmargin="0" leftmargin="0" <?=isset($g4['body_script']) ? $g4['body_script'] : "";?> bgcolor="white" text="black" link="blue" vlink="purple" alink="red">
<a name="g4_head"></a>
내용을 index.php 파일에 상단에 올리니 팝업이 되더군요..
도움 주신분들 감사하구요.. 행복하세요^^