dim rs
set rs = server.CreateObject("adodb.recordset")
defDate = DateToStr(dateadd("h",-24,strForumTimeAdjust))
strSql = "SELECT member_id, m_name, m_lastheredate FROM " & strMemberTablePrefix & "MEMBERS where M_lastheredate >= '" & defDate & "' ORDER BY M_LASTHEREDATE DESC"
rs.Open strSql, my_Conn
%>
<table align="center" width="95%" cellspacing="1" cellpadding="3" bgcolor="<%=strTableBorderColor%>">
<tr>
<td align="left" bgcolor="<%=strHeadCellColor%>" width="100%">
<font face="<%=strDefaultFontFace%>" size="<%=strDefaultFontSize%>" color="<%=strHeadFontColor%>"><b>
Active Members Seen In the Last 24 Hours
</b></font>
</td>
</tr>
<tr>
<td align="center" bgcolor="<%=strForumCellColor%>">
<table border="0" cellpadding="0" cellspacing="5" width="100%">
<tr>
<td valign="middle" width="10%"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><b>No.</b></font></td>
<td valign="middle" align="left"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><b>Member Name</b></font></td>
<td valign="middle" align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><b>Last Seen</b></font></td>
</tr>
<%
intCounter = 1
do while not rs.EOF%>
<tr>
<td><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><%= intCounter%>.</font></td>
<td align="left"><a href="pop_profile.asp?mode=display&id=<%=rs("member_id")%>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><%= rs("m_name")%></font></a></td>
<td align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">
<% minutesTotal = datediff("n",strtodate(rs("m_lastheredate")),strForumTimeAdjust)
hoursTotal = int(minutesTotal / 60)
daysSince = int(hoursTotal / 24)
hoursSince = hoursTotal mod 24
minutesSince = minutestotal mod 60
if daysSince = 1 then Response.Write daysSince & " day, "
if daysSince > 1 then Response.Write daysSince & " days, "
if hoursSince = 1 then Response.Write hoursSince & " hour, "
if hoursSince > 1 then Response.Write hoursSince & " hours, "
Response.Write minutesSince
%> minutes ago.</font>
</td>
</tr>
<%
intCounter = intCounter + 1
rs.movenext
loop
rs.Close
%>
</table>
<p align="right"><a href="#top"><img src="<%= strImageURL %>icon_go_up.gif" border="0" WIDTH="15" HEIGHT="15"></a></p>
</td>
</tr>
</table>
hows that looking?
i took the code fomr the Basic Stst mod that i liked to and just tinkered with it. seems to work for me on an access db<