달력 최근게시물 latest.skin.php에서 날짜 링크 연결 방법좀 부탁드립니다. > 자유게시판

자유게시판

달력 최근게시물 latest.skin.php에서 날짜 링크 연결 방법좀 부탁드립니다. 정보

달력 최근게시물 latest.skin.php에서 날짜 링크 연결 방법좀 부탁드립니다.

본문

안녕하세요! 좋은 아침 시간이네요.
요즘 이 문제 때문에 고민이 많네요. 어떻게 해결해야 하는데 쉽지가 않네요.
질문답변에 글을 올렸는데 해결 못했습니다.
이것이 어려운 것인가요. 날짜 링크 방법만 알면 될 것 같은데 해결이 안되네요.
그래서 그누보드 중에서 참여도가 가장 좋은 자유게시판에 글을 올려 봅니다.
꼭좀 아시는 분이 계시면 답변좀 부탁드릴께요.
먼저 질문했던 곳 확인해 볼 수 있도록 링크 주소 올립니다.
한번 확인해 주세요!
http://sir.co.kr/bbs/tb.php/g4_qa/116977/287cb8074450c72550446fb0d7564051


질문내용
달력 최근게시물 latest.skin.php에서 내용보기를 팝업창 띄우기로 되어 있는데 이방법 말고, 그냥 날짜 클릭시 팝업보기 말고, 연결된 달력게시판 내용보기로 바로 가게 하려고 하는데 어떻게 해야 하는지 모르겠네요.
latest.skin.php내용에서 보시면 팝업보기로 되어 있는데 이부분입니다.
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";

이 부분에서 날자 클릭시 연결된 일정 게시판 내용보기로 가게 하려고 합니다.
어떻게 해야하는지 꼭좀 답변 부탁드립니다.

그럼 좋은 하루, 행복한 하루 되세요!
감사합니다.
추천
0
  • 복사

댓글 4개

그누보드에 대한 질문은 그누질답을 이용해주시면 됩니다.

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";



echo "<p><a href='{$list[$i][href]}'>$daytext</a></p>";
국방부장관관님의 답변에 먼저 감사드립니다.
말씀해 주신대로 echo "<p><a href='{$list[$i][href]}'>$daytext</a></p>";
적용해 보았습니다. 날짜 클릭시 페이지 이동이 안되고 그냥 그 페이지로 이동됩니다.
다시 말씀드리면 메인에 있는 달력최근게시물에 내용이 입력된 날짜를 클릭하면 내용보기 분문페이지로 링크되어야 하는데 페이지 이동이 안되고 그냥 그 페이지 그대로 링크되네요.
어디가 잘 못 되었는지 다시 한번 답변 부탁드립니다.
말슴해 주신 대로 적용하면 될 것 같다는 생각이 드는데 적용이 안되네요.
그리고 질문답변에 이 글을 올려야 하는데 정말 죄송하네요.
그누보드 정책을 잘 지켜야 하는데 그러지 못해서 죄송 이해해 주세요!
역시 자유게시판 참여도가 더 높네요. 그래도 이렇게 외면하지 않으시고 국방부장관님께서 답변 주셨네요. 아무튼 감사드립니다.
다시한번 답변 기달립니다. 꼭좀 부탁드릴께요.
질문답변에 질문드린 것과 동일합니다. 정말 힘드네요. 쉽게 해결 된 것 같은데 장말 안되네요.
저좀 살려 주세요!!! 감사~~~~
아니, 그런 겸손의 말씀을 국방부장관님께서 초보라고 말슴하시면 저희들은.....

그냥 달력 최근게시물 latest.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: #3285ec;}
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 align=center width="190" valign="top">
<!-- 반복구문 시작 -->
<table width="190" border="0" cellspacing="0" cellpadding="0">
  <tr height="20">
<td width="8"></td>
<td width="52"><b><span style="font-size:8pt;"><font face="돋움">공연일정</font></span></b></td>
    <td width="140" 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>
    <b><font style='font-family:돋움; font-size:9pt; color:#FB6900;'><?=$year?></a>.<?=$month?></a> </font></b>
    <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>
<td width="12">&nbsp;</td>
  </tr>
<tr>
    <td width="10" height="2" align="right"></td>
</tr>
  <tr><td colspan="3" height='1' align="center"><table width=190 height="1" cellSpacing=0 cellPadding=0 border=0 align="center"><tr><td height="1" bgcolor="#484848"></td></tr></table></td></tr>
</table>
<TABLE width=190 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=190 height="1" cellSpacing=0 cellPadding=0 border=0 align="center"><tr><td height="1" bgcolor="#484848"></td></tr>
<tr><td height="6"></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=blue>$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='{$list[$i][href]}'>$daytext</a></p>";
  }
  else { // 글쓰기 권한이 없으면 글쓰기 링크는 넣지 않고 그냥 숫자만 출력하기
        echo "<p class=$dstyle>$daytext</p>\n";
      }
//   echo $html_day[$cday];
  echo ("    </td>\n");  // 한칸을 마무리
  $cday++; // 날짜를 카운팅
}
// 11월에서 1일부터 30일에 해당되지 않으면 그냥 회색을 칠한다.
else { echo ("    <td>&nbsp;</td>\n"); }
  if (($iz%7) == 0) echo ("  </tr>\n");

} // 반복구문이 끝남
?>
</table>  
<!-- 반복구문 끝 -->
</td>
</tr>
</table>

말씀해 주신 부분 수정해서 올렸습니다. 안되네요.
제가 잘 몰라서 팝업 나오는 부분 링크만 수정하면 될 것이라 생각했는데 그것이 아닌가 보네요.
혹시 다른 부분까지 수정해 주어야 하는 것 아닌지 모르겠네요.
정말 감사드립니다.
이렇게 관심 가져 주셔서.... 꼭 좀 해결 할 수 있도록 도와 주세요!
감사드립니다.
© SIRSOFT
현재 페이지 제일 처음으로