ccc님의 일정관리 소스입니다. 해당 날짜에 글이 있으면 그 날짜를 클릭시 뷰로 이동할 수 있게 하려면 어떻게 바꿔야 하는지요? 정보
ccc님의 일정관리 소스입니다. 해당 날짜에 글이 있으면 그 날짜를 클릭시 뷰로 이동할 수 있게 하려면 어떻게 바꿔야 하는지요?본문
<!------------------------------------
//###################################################################
//
// Basic Skin : Heohero http://heohero.com
// Diary Skin : 하늘비 http://webbada.com
// Diary Make : ⓒⓒⓒ http://ccc.na.ly msn : *** 개인정보보호를 위한 이메일주소 노출방지 ***
//
//###################################################################
-------------------------------------->
<table style='table-layout:fixed' width=100% border=0 align=center cellpadding=0 cellspacing=1 bgcolor=#CCCCCC>
<col style='padding:4px' bgcolor=white width=<?=$cell_width?> span=7>
<tr>
<td colspan=7 bgcolor=#eeeeee>
<table cellpadding=0 cellspacing=0 border=0 width=100% height=20>
<tr>
<td align=center><B class=w>일</B></td>
<td align=center><B class=w>월</B></td>
<td align=center><B class=w>화</B></td>
<td align=center><B class=w>수</B></td>
<td align=center><B class=w>목</B></td>
<td align=center><B class=w>금</B></td>
<td align=center><B class=w>토</B></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height=5 colspan=7></td>
</tr>
<tr height=<?=$cell_height?> valign=top>
<?
$bo_table=month;
$colcnt=0; // 칸 카운터
$rowcnt=2; // 줄 카운터
$tmp_sum_day=end_day($nyear,$nmonth)+$blank_no; // 전체 루프 회수
$org_date=date('Ymd',time()); // 오늘 날짜
// DB처리
$sql = " SELECT * FROM gb_write_{$bo_table} WHERE wr_comment = '0' AND wr_datetime like '$nyear-$nmonth%' AND wr_2 = 'month' ";
$result = sql_query($sql);
$tot_count = $result[0];
for ($d=0; $row=mysql_fetch_array($result); $d++) {
$list[$d][wr_id] = $row[wr_id];
$list[$d][day] = substr($row[wr_datetime],8,2);
$list[$d][wr_1] = $row[wr_1];
$list[$d][wr_subject] = $row[wr_subject];
$list[$d][subject] = conv_subject($row[wr_subject], 8);
$day = $list[$d][day];
$list["$day"] = $list["$day"];
}
for($i=1;$i<=$tmp_sum_day;$i++) {
$nnday=$i-$blank_no;
$colcnt++;
if($nnday>0) {
// 주말, 평일 색상지정
switch(($blank_no+$nnday)%7) {
case 0 : $tmp_nday = "<font color=blue>".$nnday."</font>"; break; // 토요일
case 1 : $tmp_nday = "<font color=red>".$nnday."</font>"; break; // 일요일
default : $tmp_nday = $nnday; break; // 평일
}
$now_date=$nyear*10000+$nmonth*100+$nnday;
if($org_date==$now_date) $tmp_nday="<b>".$tmp_nday."</b>"; // 오늘날짜 진하게
echo "<td onMouseOver=\"this.style.backgroundColor='#f7f7f7';\" onMouseOut=\"this.style.backgroundColor='#FFFFFF';\">"."<a href='?doc=bbs/gbform.php&w=&bo_table=$bo_table&wr_year=$nyear&wr_month=$nmonth&wr_day=$nnday&mode=month'>".$tmp_nday."</a><br>\n"; // 날짜 출력
for ($j=0; $j<$d; $j++) {
if ($nnday == $list[$j][day])
if ($list["$i"] < 3) { ?>
<?
echo "<a href='?doc=bbs/gnuboard.php&bo_table=$bo_table&wr_id=".$list[$j][wr_id]."&mode=month' title='".$list[$j][wr_subject]."' ><span class='comment'> [".$list[$j][wr_1]."]</span><font color=#3300CC>".$list[$j][subject]."</font></a><br>";
} else {
echo "<a href='?doc=bbs/gnuboard.php&bo_table=$bo_table&wr_id=".$list[$j][wr_id]."&mode=month' title='".$list[$j][wr_subject]."' ><font color=#FF0000>[".$list[$j][wr_1]."]</font><font color=#3300CC></font></a>";
}
}
} else {
echo "<td bgcolor=#ffffff> ";
}// 공란 출력
if(!($colcnt%7)&&($colcnt < $tmp_sum_day)) { // 줄 바꿈
echo "\n<tr height=$cell_height valign=top>";
$rowcnt++;
}
}
// 줄과 칸 마무리 부분
$td_tail = $colcnt%7;
$tr_tail = $rowcnt%7;
// 줄마무리
if($tr_tail) {
if($td_tail) {
for($i=$td_tail;$i<7;$i++) echo "<td bgcolor=#FFFFFF> ";
$td_tail=0;
}
if($tr_tail) {
echo"\n<tr height=$cell_height valign=top>";
$tr_tail=0;
}
}
// 칸마무리
if(!$tr_tail) {
for($i=$td_tail;$i<2;$i++) echo "<td bgcolor=#FFFFFF> ";
echo "<td colspan=5 valign=middle style='padding:0px'>\n";
}
// 한계연도 처리 부분
$limit_year=split('~',$limit_year);
if($nyear <= $limit_year[0]) {
$hide_lyear_start="<!--";$hide_lyear_end="-->";
if($nmonth <= 1) {
$hide_lmonth_start="<!--";$hide_lmonth_end="-->";
}
}
if($nyear >= $limit_year[1]) {
$hide_gyear_start="<!--";$hide_gyear_end="-->";
if($nmonth >= 12) {
$hide_gmonth_start="<!--";$hide_gmonth_end="-->";
}
}
?>
<table width=100% height=100% border=0 cellpadding=0 cellspacing=0 align=center>
<tr>
<td></td>
</tr>
</table>
</table>
이 소스는 ccc님의 gblist.month.skin 파일입니다.
여기 소스에서는 해당 날짜에 글을 쓰면 그 제목이 나와서 제목을 클릭시 뷰로 이동 되고
날짜를 클릭시 글쓰기로 되는데...
해당 날짜를 클릭시 뷰로 이동할 수 있는 방법을 알았으면 합니다.
이 부분에 대한 팁이나 자료가 없는듯 하여 질문을 남겨봅니다.
p.s 이 소스를 메인에 미니 달력으로 넣을려고 합니다. 그래서 글쓰기나 해당 날짜에 중복된 글의 문제
는 없을듯 합니다. 메인에서 해달날짜에 글이 있는것을 클릭시 팝업이나 뷰로 보여지게 할려는데
지금의 소스는 리스트로 이동되어서 리스트로 이동되는 한단계를 줄여 볼려 했습니다.
부탁드립니다.
//###################################################################
//
// Basic Skin : Heohero http://heohero.com
// Diary Skin : 하늘비 http://webbada.com
// Diary Make : ⓒⓒⓒ http://ccc.na.ly msn : *** 개인정보보호를 위한 이메일주소 노출방지 ***
//
//###################################################################
-------------------------------------->
<table style='table-layout:fixed' width=100% border=0 align=center cellpadding=0 cellspacing=1 bgcolor=#CCCCCC>
<col style='padding:4px' bgcolor=white width=<?=$cell_width?> span=7>
<tr>
<td colspan=7 bgcolor=#eeeeee>
<table cellpadding=0 cellspacing=0 border=0 width=100% height=20>
<tr>
<td align=center><B class=w>일</B></td>
<td align=center><B class=w>월</B></td>
<td align=center><B class=w>화</B></td>
<td align=center><B class=w>수</B></td>
<td align=center><B class=w>목</B></td>
<td align=center><B class=w>금</B></td>
<td align=center><B class=w>토</B></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height=5 colspan=7></td>
</tr>
<tr height=<?=$cell_height?> valign=top>
<?
$bo_table=month;
$colcnt=0; // 칸 카운터
$rowcnt=2; // 줄 카운터
$tmp_sum_day=end_day($nyear,$nmonth)+$blank_no; // 전체 루프 회수
$org_date=date('Ymd',time()); // 오늘 날짜
// DB처리
$sql = " SELECT * FROM gb_write_{$bo_table} WHERE wr_comment = '0' AND wr_datetime like '$nyear-$nmonth%' AND wr_2 = 'month' ";
$result = sql_query($sql);
$tot_count = $result[0];
for ($d=0; $row=mysql_fetch_array($result); $d++) {
$list[$d][wr_id] = $row[wr_id];
$list[$d][day] = substr($row[wr_datetime],8,2);
$list[$d][wr_1] = $row[wr_1];
$list[$d][wr_subject] = $row[wr_subject];
$list[$d][subject] = conv_subject($row[wr_subject], 8);
$day = $list[$d][day];
$list["$day"] = $list["$day"];
}
for($i=1;$i<=$tmp_sum_day;$i++) {
$nnday=$i-$blank_no;
$colcnt++;
if($nnday>0) {
// 주말, 평일 색상지정
switch(($blank_no+$nnday)%7) {
case 0 : $tmp_nday = "<font color=blue>".$nnday."</font>"; break; // 토요일
case 1 : $tmp_nday = "<font color=red>".$nnday."</font>"; break; // 일요일
default : $tmp_nday = $nnday; break; // 평일
}
$now_date=$nyear*10000+$nmonth*100+$nnday;
if($org_date==$now_date) $tmp_nday="<b>".$tmp_nday."</b>"; // 오늘날짜 진하게
echo "<td onMouseOver=\"this.style.backgroundColor='#f7f7f7';\" onMouseOut=\"this.style.backgroundColor='#FFFFFF';\">"."<a href='?doc=bbs/gbform.php&w=&bo_table=$bo_table&wr_year=$nyear&wr_month=$nmonth&wr_day=$nnday&mode=month'>".$tmp_nday."</a><br>\n"; // 날짜 출력
for ($j=0; $j<$d; $j++) {
if ($nnday == $list[$j][day])
if ($list["$i"] < 3) { ?>
<?
echo "<a href='?doc=bbs/gnuboard.php&bo_table=$bo_table&wr_id=".$list[$j][wr_id]."&mode=month' title='".$list[$j][wr_subject]."' ><span class='comment'> [".$list[$j][wr_1]."]</span><font color=#3300CC>".$list[$j][subject]."</font></a><br>";
} else {
echo "<a href='?doc=bbs/gnuboard.php&bo_table=$bo_table&wr_id=".$list[$j][wr_id]."&mode=month' title='".$list[$j][wr_subject]."' ><font color=#FF0000>[".$list[$j][wr_1]."]</font><font color=#3300CC></font></a>";
}
}
} else {
echo "<td bgcolor=#ffffff> ";
}// 공란 출력
if(!($colcnt%7)&&($colcnt < $tmp_sum_day)) { // 줄 바꿈
echo "\n<tr height=$cell_height valign=top>";
$rowcnt++;
}
}
// 줄과 칸 마무리 부분
$td_tail = $colcnt%7;
$tr_tail = $rowcnt%7;
// 줄마무리
if($tr_tail) {
if($td_tail) {
for($i=$td_tail;$i<7;$i++) echo "<td bgcolor=#FFFFFF> ";
$td_tail=0;
}
if($tr_tail) {
echo"\n<tr height=$cell_height valign=top>";
$tr_tail=0;
}
}
// 칸마무리
if(!$tr_tail) {
for($i=$td_tail;$i<2;$i++) echo "<td bgcolor=#FFFFFF> ";
echo "<td colspan=5 valign=middle style='padding:0px'>\n";
}
// 한계연도 처리 부분
$limit_year=split('~',$limit_year);
if($nyear <= $limit_year[0]) {
$hide_lyear_start="<!--";$hide_lyear_end="-->";
if($nmonth <= 1) {
$hide_lmonth_start="<!--";$hide_lmonth_end="-->";
}
}
if($nyear >= $limit_year[1]) {
$hide_gyear_start="<!--";$hide_gyear_end="-->";
if($nmonth >= 12) {
$hide_gmonth_start="<!--";$hide_gmonth_end="-->";
}
}
?>
<table width=100% height=100% border=0 cellpadding=0 cellspacing=0 align=center>
<tr>
<td></td>
</tr>
</table>
</table>
이 소스는 ccc님의 gblist.month.skin 파일입니다.
여기 소스에서는 해당 날짜에 글을 쓰면 그 제목이 나와서 제목을 클릭시 뷰로 이동 되고
날짜를 클릭시 글쓰기로 되는데...
해당 날짜를 클릭시 뷰로 이동할 수 있는 방법을 알았으면 합니다.
이 부분에 대한 팁이나 자료가 없는듯 하여 질문을 남겨봅니다.
p.s 이 소스를 메인에 미니 달력으로 넣을려고 합니다. 그래서 글쓰기나 해당 날짜에 중복된 글의 문제
는 없을듯 합니다. 메인에서 해달날짜에 글이 있는것을 클릭시 팝업이나 뷰로 보여지게 할려는데
지금의 소스는 리스트로 이동되어서 리스트로 이동되는 한단계를 줄여 볼려 했습니다.
부탁드립니다.
댓글 전체