달력에 입력한 내용이 나타나지 않아요
본문
케빈가넷 님의 회의실 예약 스킨이 그누보드4라 그누보드5로 변환해 보았는데요
스킨 원본은 아래 참조
https://sir.kr/g4_skin/88719?sfl=wr_subject%7C%7Cwr_content&stx=%ED%9A%8C%EC%9D%98%EC%8B%A4
달력에 입력한 내용들이 나타나지가 않네요.
아래 소스 코드입니다.
무엇이 잘못되었을까요? 고수님들의 간절한 도움을 바랍니다.
<!--?phpinclude_once($board_skin_path . '/lib/skin.lib.php');
$VAR['today'] = date('Ymd');
$VAR['select'] = date('Ym');
if(preg_match('/^[0-9]{6}$/', $_GET['schedule_ym']) == true && checkdate(substr($_GET['schedule_ym'], 4, 2), 1, substr($_GET['schedule_ym'], 0, 4)) == true) $VAR['select'] = $_GET['schedule_ym'];
$VAR['timestamp'] = strtotime($VAR['select'] . '01');
$VAR['weekday'] = date('w', $VAR['timestamp']);
$VAR['count'] = date('t', $VAR['timestamp']) + $VAR['weekday'] + 1;
$VAR['path'] = "<?php echo G5_BBS_URL; ?-->/board.php?bo_table={$bo_table}";
$col_width = "14%";
if($_GET[room])
$room = $_GET[room];
else
$room = 1;
$room_arr = array(1=>"잔디운동장", "친절마당", "기쁨마당","평화마당","온유마당","사랑마당");
?>
<style type="text/css">
/* 카테고리 스타일*/
#box_day{width:3%; padding-left: 7px; padding-top: 4px; font-size:12px; font-family:돋움; font-weight:bold; float:left;}
#box_list{width:97%;}
#box_list2{width:97%; padding:5px 7px 5px 7px;}
a.day1:link, a.day1:visited, a.day1:active { font-size:14px; text-decoration:none; color:#9e9e9e; }
a.day1:hover { font-size:16px;color:#9e9e9e; text-decoration:underline; font-weight:bold; }
a.day2:link, a.day2:visited, a.day2:active { font-size:14px; text-decoration:none; color:#9e9e9e; }
a.day2:hover { font-size:16px;color:#9e9e9e; text-decoration:underline; font-weight:bold; }
a.day3:link, a.day3:visited, a.day3:active { font-size:14px; text-decoration:none; color:#9e9e9e; }
a.day3:hover { font-size:16px;color:#9e9e9e; text-decoration:underline; font-weight:bold; }
.day4 {font-size:20px;color:#1641b2;}
.day5 {font-family:돋움;font-size:14px;color:#6c91c3;}
</style>
<link href="<?php echo $board_skin_url; ?>/css/list.skin.css" rel="stylesheet" type="text/css">
<script src="<?php echo $board_skin_url; ?>/js/list.skin.js" type="text/javascript" charset="<?php echo $g5['charset']; ?>"></script>
<link href="<?php echo $board_skin_url; ?>/css/dhtmlwindow.css" rel="stylesheet" type="text/css">
<script src="<?php echo $board_skin_url; ?>/js/dhtmlwindow.js" type="text/javascript"></script>
<link href="<?php echo $board_skin_url; ?>/css/modal.css" rel="stylesheet" type="text/css">
<script src="<?php echo $board_skin_url; ?>/js/modal.js" type="text/javascript"></script>
<script language="javascript">
function open_dialog(){
dialog = dhtmlmodal.open('write_madang1', 'iframe', '<?=$g5['url']; ?>/bbs/write.php?bo_table=<?=$bo_table?>&mode=layer&room=<?=$room?>', '한마음청소년수련원', 'width=580px,height=295px,center=1,resize=0,scrolling=0');
}
</script>
<table width="100%" height="34" background="<?=$board_skin_url?>/img/bar_bg.gif" border="0" cellspacing="0" cellpadding="0">
<tbody><tr>
<td width="10"> </td>
<td valign="bottom">
<!--? if($room==2){?-->
<a href='board.php?<?=($_GET[schedule_ym])?"schedule_ym=$_GET[schedule_ym]&":""?>bo_table=<?=$bo_table?>&room=1'>잔디운동장</a>|<a href='board.php?<?=($_GET[schedule_ym])?"schedule_ym=$_GET[schedule_ym]&":""?>bo_table=<?=$bo_table?>&room=2'><strong>친절마당</strong></a><strong>|<a href='board.php?<?=($_GET[schedule_ym])?"schedule_ym=$_GET[schedule_ym]&":""?>bo_table=<?=$bo_table?>&room=3'>기쁨마당
<!--? } else if($room==3){?-->
<a href='board.php?<?=($_GET[schedule_ym])?"schedule_ym=$_GET[schedule_ym]&":""?>bo_table=<?=$bo_table?>&room=1'>잔디운동장</a>|<a href='board.php?<?=($_GET[schedule_ym])?"schedule_ym=$_GET[schedule_ym]&":""?>bo_table=<?=$bo_table?>&room=2'>친절마당</a>|<a href='board.php?<?=($_GET[schedule_ym])?"schedule_ym=$_GET[schedule_ym]&":""?>bo_table=<?=$bo_table?>&room=3'>기쁨마당
<!--? } else {?-->
<a href='board.php?<?=($_GET[schedule_ym])?"schedule_ym=$_GET[schedule_ym]&":""?>bo_table=<?=$bo_table?>&room=1'><strong>잔디운동장</strong></a><strong>|<a href='board.php?<?=($_GET[schedule_ym])?"schedule_ym=$_GET[schedule_ym]&":""?>bo_table=<?=$bo_table?>&room=2'>친절마당</a>|<a href='board.php?<?=($_GET[schedule_ym])?"schedule_ym=$_GET[schedule_ym]&":""?>bo_table=<?=$bo_table?>&room=3'>기쁨마당
<!--? } ?-->
</a></strong></strong></td>
<td align="right">
<div align="right">
<!--?php if($admin_href || $write_href){ ?-->
<!--?php if($admin_href) echo "<img name=\"admin\" alt=\"관리자\" src=\"{$board_skin_url}/img/btn_admin.gif\" style='cursor:hand' onclick=\"window.document.location.href='{$admin_href}';\" /-->"; ?>
<!--?//php if($write_href) echo "<input type=\"button\" name=\"write\" value=\"마당사용 예약\" class=\"button\" onclick=\"open_dialog();\" /-->"; ?>
<!--?php if($write_href) echo "<img name=\"reg\" alt=\"마당사용 예약\" src=\"{$board_skin_url}/img/reg.gif\" style='cursor:hand' onclick=\"open_dialog();\" /-->"; ?>
<!--?php } ?-->
</div>
</td>
</tr>
</tbody></table>
';
else
{
$wr_1 = $VAR['select'] . sprintf('%02d', $date);
$schedule = null;
// 현재날짜로 끝
$query = sql_query("SELECT * FROM $write_table WHERE wr_1 <> '$wr_1' AND wr_3 = '$wr_1' AND ca_name = '$room_arr[$room]' ");
while($result = mysql_fetch_array($query))
{
$schedule .= "<div class="schedule"><img width="13" align="absmiddle" src="img/1.png"> <a onmouseover="\"highlight(this,'1');\"" onmouseout="\"highlight(this,'0');\"" onclick='\"return' href="\"{$VAR['path']}&wr_id={$result['wr_id']}&mode=layer\"" solid');\"="" show_hide_box(this,370,190,'1px="">{$result['wr_subject']} ~{$result['wr_4']}</a></div>";
}
// 당일꺼 뽑아내기
$query = sql_query("SELECT * FROM $write_table WHERE wr_1 = '$wr_1' AND wr_3 = '$wr_1' AND ca_name = '$room_arr[$room]' ORDER BY wr_2 ");
while($result = mysql_fetch_array($query))
{
$schedule .= "<div class="schedule"><a onmouseover="\"highlight(this,'2');\"" onmouseout="\"highlight(this,'0');\"" onclick='\"return' href="\"{$VAR['path']}&wr_id={$result['wr_id']}&mode=layer\"" show_hide_box(this,370,190,'1px="" solid')\"="">{$result['wr_2']}~{$result['wr_4']} {$result['wr_subject']}</a></div>";
}
// 현재날짜부터 시작
$query = sql_query("SELECT * FROM $write_table WHERE wr_1 = '$wr_1' AND wr_3 <> '$wr_1' AND ca_name = '$room_arr[$room]' ");
while($result = mysql_fetch_array($query))
{
$schedule .= "<div class="schedule"><a onmouseover="\"highlight(this,'1');\"" onmouseout="\"highlight(this,'0');\"" onclick='\"return' href="\"{$VAR['path']}&wr_id={$result['wr_id']}&mode=layer\"" show_hide_box(this,370,190,'1px="" solid')\"="">{$result['wr_2']}~ {$result['wr_subject']}</a> <img width="13" align="absmiddle" src="img/1.png"></div>";
}
// 기간 사이
$query = sql_query("SELECT * FROM $write_table WHERE wr_1 < '$wr_1' AND wr_3 > '$wr_1' AND ca_name = '$room_arr[$room]' ");
while($result = mysql_fetch_array($query))
{
$schedule .= "<div class="schedule"><a onmouseover="\"highlight(this,'1');\"" onmouseout="\"highlight(this,'0');\"" onclick='\"return' href="\"{$VAR['path']}&wr_id={$result['wr_id']}&mode=layer\"" show_hide_box(this,370,190,'1px="" solid')\"="">{$result['wr_subject']}</a> <img width="12" align="absmiddle" src="img/1.png"></div>";
}
if($i%7==1){ // 일요일
$date = "<font color="#ff0000">{$date}</font>";
$bgcolor = "#FFF3F5";
}
else if($i%7==0){ // 토요일
$date = "<font color="#0000ff">{$date}</font>";
$bgcolor = "#F0F8FF";
}
else if($VAR['today'] == $wr_1){ //오늘날짜
$date = "<font color="#6060a0">{$date}</font>";
$bgcolor = "#FFFFE0";
}
else{
$date = "<font color="#6060a0">{$date}</font>";
$bgcolor = "#FFFFFF";
}
echo "";
}
if($row > 0 && $row % 7 == 0 && $row < $VAR['count']) echo '';
}
$count = 7 - (($row - 1) % 7);
if($count != 7)
{
for($i = 1; $i <= $count; $i++) echo '';
}
?>
<table width="100%" class="tbline1" border="0" cellspacing="0" cellpadding="0">
<tbody><tr>
<td height="40" align="center" colspan="7">
<div>
<a href="<?php echo phpself('schedule_ym', date('Ym', strtotime('-1 month', $VAR['timestamp']))); ?>"><img alt="이전달" src="<?php echo $board_skin_url; ?>/img/b_prev_month.gif" border="0"></a>
<span class="day4"><!--?php echo date('Y', $VAR['timestamp']); ?--></span><span class="day5">년</span>
<span class="day4"><!--?php echo date('n', $VAR['timestamp']); ?--></span><span class="day5">월</span>
<a href="<?php echo phpself('schedule_ym', date('Ym', strtotime('+1 month', $VAR['timestamp']))); ?>"><img alt="다음달" src="<?php echo $board_skin_url; ?>/img/b_next_month.gif" border="0"></a>
</div>
</td>
</tr>
<tr>
<td width="<?=$col_width?>" align="center" class="tbline2 bbs_head bbs_fhead">일</td>
<td width="<?=$col_width?>" align="center" class="tbline2 bbs_head bbs_fhead">월</td>
<td width="<?=$col_width?>" align="center" class="tbline2 bbs_head bbs_fhead">화</td>
<td width="<?=$col_width?>" align="center" class="tbline2 bbs_head bbs_fhead">수</td>
<td width="<?=$col_width?>" align="center" class="tbline2 bbs_head bbs_fhead">목</td>
<td width="<?=$col_width?>" align="center" class="tbline2 bbs_head bbs_fhead">금</td>
<td width="<?=$col_width?>" align="center" class="tbline2 bbs_head bbs_fhead">토</td>
</tr>
<tr>
<!--?php
for($i = $row = 1; $i < $VAR['count']; $i++, $row++)
{
$date = $i - $VAR['weekday'];
if($date < 1) echo '<td class="tbline2" bgcolor=#F9F9F9--><td class='\"tbline2\"' valign="top"><div class="date">{$date}</div>{$schedule}</td></tr><tr height="90"><td class="tbline2" bgcolor="#f9f9f9"> </td></tr>
<tr>
<td height="2" bgcolor="#e5e5e5" colspan="7"></td>
</tr>
</tbody></table>
답변 3
mysql_fetch_array
일단 여기를 전부 이렇게.. 여러 군데에 있네요.
sql_fetch_array
작은별님 무지 감사합니다.
그런데 그렇게 해도 않되네요.
작은별님 정말 고맙습니다. 이렇게 신속하게 답해 주시다니요
그런데 아직 해결이 않되었습니다.
오늘 하루 종일 헤매고 있습니다.
없는 실력으로 삽질하다보니, 무지 피곤합니다.
답변을 작성하시기 전에 로그인 해주세요.