<%
set adocmd = server.CreateObject("adodb.command")
adoCmd.ActiveConnection = dbstr
adoCmd.CommandType = adCmdStoredProc
adoCmd.CommandText = "dbo.MainBoardListSelect"
set objParameter = adoCmd.CreateParameter ("mode", adInteger, adparaminput, 4 ,"2")
adoCmd.Parameters.Append objParameter
set objParameter = adoCmd.CreateParameter ("uid", adVarchar, adparaminput, 12 ,"helper")
adoCmd.Parameters.Append objParameter
set objParameter = adoCmd.CreateParameter ("page", adInteger, adparaminput, 4 ,page)
adoCmd.Parameters.Append objParameter
Set adoRs = adoCmd.Execute
If Not adoRs.EOF Then
noticeLise_rs = adoRs.GetRows
noticeLise_rs_cnt = ubound(noticeLise_rs,2)
Else
noticeLise_rs_cnt = -1
End If
Set adoRs = Nothing
Set adoCmd = Nothing
%>
<%
if page = 1 then
pageNumS = 0
else
pageNumS = pagesize*(page-1)
end if
if (pagesize*page)-1 >= noticeLise_rs_cnt then '페이지 끝일 때
pageNumE = noticeLise_rs_cnt
page = page
else
pageNumE = (pagesize*page)-1
page = page + 1
end if
if noticeLise_rs_cnt > -1 then
for i = pageNumS to pageNumE
if len(noticeLise_rs(1, i)) > 25 then
msg = left(noticeLise_rs(1, i),25)&"..."
end if
%>
<%=noticeLise_rs(0, i)%> |
<%=msg%>
<% if DateDiff("h",noticeLise_rs(2, i),Now()) < 24 then
response.write " "
end if
%> |
<%=left(noticeLise_rs(2, i),10)%> |
|
<% next
end if
%>
|
<% if page > 1 then %> <% end if %> |
|