달력스킨을 사용중인 게시판의 내용을 뽑아서 메인화면을 만들게 되면 일반적인 링크를 걸게되면 날짜가 잘못 표시되는 버그가 생기게 됩니다.
이유는 달력스킨에서 view.asp 에 날짜부분이 넘어온 값을 받게 되어 있는데 일반적인 링크에서는 날짜를 넘기지 않기 때문에 무조건 현재 날짜를 뿌리게 되어서 그렇습니다.
<table width="240" border="0" cellspacing="0" cellpadding="0">
<%
strBoardID = "달력스킨사용하는 보드 아이디"
SET RS = DBCON.EXECUTE("select * from mplus_board where strBoardID=" & "'" & strBoardID & "'" & " and dateRegDate between getdate() and dateadd(day,7,getdate()) and bitDelete <> 1 or strBoardID=" & "'" & strBoardID & "'" & " and datediff(d,dateRegDate,getdate())=0 and bitDelete <> 1 order by dateRegdate ASC")
%>
<tr bgcolor="#f6eded">
<td height="25" colspan="2"><div align="left"><strong>::: <a href="/mboard.asp?exec=list&strBoardID=pd_schedule" title="Products Schedules">스케줄</a> :::</strong></div></td>
</tr>
<tr>
<td height="5" colspan="2"></td>
</tr>
<%
WHILE NOT(RS.EOF)
' // 게시글 본문링크
' /Mboard.asp?exec=옵션&strBoardID=게시판아이디&intSeq=글번호
strScYear = YEAR(Rs("dateRegDate"))
strScMonth = MONTH(Rs("dateRegDate"))
strScDay = DAY(Rs("dateRegDate"))
' // 위와 같이 날짜를 받아 옵니다.
intSeq = Rs("intSeq")
strBoardID = Rs("strBoardID")
strName = RS("strName")
strSubject = GetCutSubject(RS("strSubject"), 38)
dateRegDate = GetDateType(2,Rs("dateRegDate"))
intComment = RS("intComment")
' // 여긴 적절히 하시면 되구요..
%>
<tr>
<td width="210" height="15"><div align="left"><img src="/mainInclude/images/icon_list.gif" border="0" align="middle"> <a href="/Mboard.asp?exec=view&strBoardID=<%=strBoardID%>&intSeq=<%=intSeq%>&strScYear=<%=strScYear%>&strScMonth=<%=strScMonth%>&strScDay=<%=strScDay%>"><span style="font-size:8pt; letter-spacing:-1px"> <%=strSubject%></span><font style="font-family:verdana;color:#F16007;font-size:7pt"></font></a></div></td>
<td width="30" align="right"><%=dateRegDate%></td>
</tr>
<%
RS.MOVENEXT
WEND
%>
</table>
view 로 링크를 걸때 strScYear=<%=strScYear%>&strScMonth=<%=strScMonth%>&strScDay=<%=strScDay%> 이걸 추가해 줘서 원하는 현재 게시물의 날짜를 같
댓글 0