php소스좀 봐주세요 초라라서 어떻게 해야할지 모르겠네요...

php소스좀 봐주세요 초라라서 어떻게 해야할지 모르겠네요...
이것 때문에 며칠째 고생 이네요ㅠ_ㅠ;;
아래 소스를 보시고 해결 방법좀 알려주세요....

■ write.skin.php페이지

<tr>
<td class=mw_basic_write_title>· 기간설정</td>
<td>
<input class=m_text type=text id=wr_4 name='wr_4' size=8 maxlength=8 minlength=8 required numeric itemname='마감날짜' value="<?=$write['wr_4']?>" readonly title='달력 - 날짜를 선택하세요.'>
<a href="javascript:win_calendar('wr_4', document.getElementById('wr_4').value, '');">
<img src='<?=$board_skin_path?>/img/btn_calendar.gif' border=0 align=absmiddle title='달력 - 날짜를 선택하세요'></a>
</td></tr>
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
----------------------------------------------------------------------------------
■ view.skin.php페이지

<td width="10%" height="28" align="center" bgcolor="#F9F9F2">기간설정</td>
<td width="40%" style="padding:0 0 0 10px;"><font color="#676767">
<?=date("Y년 m월 d일", strtotime("$view[wr_4] 00:00:00"))?> 까지</font>

<?
//////////////////////////////////////////////////////
// 현재시간
$current_time = time();
$current_time = date("Ymd", $current_time);

// event time
$notice_time = $view[wr_4];

$last_time = $notice_time - $current_time ;

//남은 날이 - 이면, 기간설정이 끝나면..
if($last_time < 0){
echo "<img src='$board_skin_path/img/icon_off.gif' border='0' align='absmiddle' title='종료'>";
}
else{
echo "<img src='$board_skin_path/img/icon_on.gif' border='0' align='absmiddle' title='진행중'>";
}

//////////////////////////////////////////////////////
?>
</td>
----------------------------------------------------------------------------------
■ list.skin.php페이지

<td align="center">
<?
//////////////////////////////////////////////////////
// 현재시간
$current_time = time();
$current_time = date("Ymd", $current_time);

// event time
$notice_time = $view[wr_4];

$last_time = $notice_time - $current_time ;

//남은 날이 - 이면, 기간설정이 끝나면..
if($last_time < 0){
echo "<img src='$board_skin_path/img/icon_off.gif' border='0' align='absmiddle' title='종료'>";
}
else{
echo "<img src='$board_skin_path/img/icon_on.gif' border='0' align='absmiddle' title='진행중'>";
}

//////////////////////////////////////////////////////
?>

</td>

======================================================
write.skin.php페이지에서 기간 설정을 하면 view.skin.php페이지에서 설정기간동안 진행중아이콘이 보이다가 설정 기간이 끝나면 종료아이콘이 보이도록은 돼는데,
list.skin.php페이지에서는 설정기간에 따라 종료 또는 진행중 아이콘만 출력 할려고 하는데 아무런 반응이 없네요 어떻게 소스를 수정해야할지 고수님들의 조언 부탁 드립니다.
|

댓글 4개

$notice_time = $view[wr_4];

=> $notice_time = $list[wr_4];
답변 감사합니다.

$notice_time = $view[wr_4]; 를

=> $notice_time = $list[wr_4]; 로 고쳐봤는데 여전이 안돼네요
$list[wr_4] => $list[$i][wr_4]
서누니님 감사 합니다.
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
15년 전 조회 3,106
15년 전 조회 1,404
15년 전 조회 1,730
15년 전 조회 1,790
15년 전 조회 2,188
15년 전 조회 1,544
15년 전 조회 1,402
15년 전 조회 1,706
15년 전 조회 3,939
15년 전 조회 1,562
15년 전 조회 1,812
15년 전 조회 1,430
15년 전 조회 1,567
15년 전 조회 3,141
15년 전 조회 3,772
15년 전 조회 1,515
15년 전 조회 1,694
15년 전 조회 1,516
15년 전 조회 2,433
15년 전 조회 1,519
🐛 버그신고