 |
|
|
 |
| what's new
listing |
<%
present_day = Cint(day(date))
present_month = Cint(month(date))
present_year = Cint(year(date))
if (present_day < 10) then
present_day = "0" & present_day
end if
if (present_month < 10) then
present_month = "0" & present_month
end if
if ((whichYear = "") and (whichmonth = "") and (whichdate = "")) then
call selection()
%>
<%
response.end
elseif ((whichYear = "empty") or (whichmonth = "empty")) then
call incorrect_para()
%>
<%
response.end
end if
if (((whichYear <> "empty") and (whichmonth <> "empty") and (whichdate <> "empty")) or ((whichYear <> "empty") and (whichmonth <> "empty") and (whichdate = "empty"))) then
if ((whichYear <> "empty") and (whichmonth <> "empty") and (whichdate <> "empty")) then
sqltext = "SELECT pub_date, title, fname FROM news WHERE to_char(pub_date,'dd') ='"& whichdate &"' and to_char(pub_date,'mm') ='"& whichmonth &"' and to_char(pub_date,'yyyy') ='"& whichYear &"' ORDER BY pub_date"
sqltext1 = "SELECT COUNT(*) FROM news WHERE to_char(pub_date,'dd') ='"& whichdate &"' and to_char(pub_date,'mm') ='"& whichmonth &"' and to_char(pub_date,'yyyy') ='"& whichYear &"' ORDER BY pub_date"
elseif ((whichYear <> "empty") and (whichmonth <> "empty") and (whichdate = "empty")) then
sqltext = "SELECT pub_date, title, fname FROM news WHERE to_char(pub_date,'mm') ='"& whichmonth &"' and to_char(pub_date,'yyyy') ='"& whichYear &"' ORDER BY pub_date"
sqltext1 = "SELECT COUNT(*) FROM news WHERE to_char(pub_date,'mm') ='"& whichmonth &"' and to_char(pub_date,'yyyy') ='"& whichYear &"' ORDER BY pub_date"
end if
set rs1=conntemp.Execute(sqltext1)
totalRecord = rs1.fields(0)
rs1.close
set rs1 = nothing
set rs=conntemp.Execute(sqltext)
if rs.eof then
call incorrect_para()
%>
<%
response.end
end if
RS.PageSize = 25 ' Number of rows per page
if (ScrollAction <> "") Then
PageNo = ScrollAction
if (PageNo < 1) Then
PageNo = 1
end if
else
PageNo = 1
end if
display = 0
if not rs.eof then
display = 1
end if
RowCount = rs.PageSize
%>
<%startpoint = ((PageNo - 1) * 25) + 1
stoppoint = PageNo * 25
x = 1%>
<%
if not rs.eof then
%>
|
Date
|
Title
|
<%
do while not rs.eof and RowCount > 0
if x => startpoint and x <= stoppoint then
%>
|
<%=formatdatetime(rs("pub_date"),2)%>
|
"><%=rs("title")%> |
<% end if %>
<% rs.movenext
x = x+1
loop
%>
<% n = 1 %>
<%if (Cint(totalRecord)/25) > 1 then %>
| page
<%do while n <= ( cint(totalRecord)/25)+1%>
<%=n%>
<%n = n +1
loop%>
|
<%end if %>
<%
end if
rs.close
set rs = nothing
end if %>
<% sub incorrect_para() %>
| Oops, we cannot find any records that match your request. |
 |
|
|