%
Dim arrTemp, pperm, ptype, pstatus
session("loc")="Home"
arrTemp = PagePrivs("index")
pperm = arrTemp(2)
ptype = arrTemp(3)
pstatus = arrTemp(1)
%>
DUCrows Headlines
<%
sql1 = "select top 15 * from hdlns where ((type \ " & session("type") & ") mod 2) > 0 and bdate <= now() and edate >= now()" & sqltday() & " order by ID desc"
Set rs1 = getSQLResult(sql1)
if rs1.EOF then
Response.Write("| No Current Headlines |
")
end if
while not rs1.EOF
Response.Write("| " & rs1("description") & " |
")
rs1.MoveNext
wend
rs1.close
%>
AXP - Lambda Chi Phi Messageboard
<%
sql1 = "select top 6 *,(select count(ID)-1 from entries where TID=t1.ID) as replies, t1.edate as updte, t1.etime as updtme, t2.edate as odte, t2.etime as otme from threads t1, entries t2, users t3 where ((t1.type \ " & session("type") & ") mod 2) > 0 and t2.TID=t1.ID and t2.msgnum=1 and t3.ID=t1.UID order by t1.edate desc, t1.etime desc"
Set rs1 = getSQLResult(sql1)
if rs1.EOF then
Response.Write("| No Threads for Your User Type")
Response.Write("This means that there are not any message board threads registered in our database for your current user type. |
")
end if
while not rs1.EOF
Dim strReply, strReplyTo, strBody
i = rs1("replies")
strReply = " (" & i & " replies)"
if (i = 1) and session("type") <> 2 then
strReply = " (" & i & " reply)"
elseif session("type") = 2 then
strReply = ""
end if
if session("type") <> 2 then
strReplyTo = " Post Reply"
else
strReplyTo = ""
end if
Response.Write("" & rs1("subject") & strReply & _
" View Thread" & strReplyTo & " Last Updated: " & rs1("updte") & " at " & rs1("updtme") & " Originiated By: " & ucase(rs1("uname")) & " on " & rs1("odte") & " at " & rs1("otme") & "")
strBody = rs1("body")
if len(strBody) > 300 then
strBody = mid(strBody,1,297) & "... More"
end if
Response.Write("" & strBody & " |
")
rs1.MoveNext
wend
rs1.close
%>
Upcoming Events
<%
sql1 = "select top 15 * from calendar where ((type \ " & session("type") & ") mod 2) > 0 and ((bdate <= now() and edate >= now()) or (datediff(" & chr(39) & "d" & chr(39) & ", now(), bdate) <= 7 and datediff(" & chr(39) & "d" & chr(39) & ", now(), bdate) > 0)) order by edate asc"
Set rs1 = getSQLResult(sql1)
if rs1.EOF then
Response.Write("| No Upcoming Events |
")
end if
dim arrItems(14)
i = 0
while not rs1.EOF
Dim strDate, strDate1
i = i + 1
strDate = dateprox(rs1("bdate"),rs1("edate"),rs1("sun"),rs1("mon"),rs1("tue"),rs1("wed"),rs1("thu"),rs1("fri"),rs1("sat"))
strDate1 = strDate
if strDate = date() then
strDate = "" & strDate & ""
end if
'Response.Write("| " & strDate & " - " & rs1("name") & " |
")
arrItems(i) = strDate1 & "| " & strDate & " - " & rs1("name") & " |
"
rs1.MoveNext
wend
Dim j
i = 0
j = 0
for i = 0 to 14
for j = i + 1 to 14
if arrItems(j) > "" and arrItems(i) > "" then
if datediff("D",mid(arrItems(i),1,instr(arrItems(i),"<")-1),mid(arrItems(j),1,instr(arrItems(j),"<")-1)) < 0 then
Dim strTemp
strTemp = arrItems(i)
arrItems(i) = arrItems(j)
arrItems(j) = strTemp
end if
end if
next
next
for i = 0 to 14
if len(arrItems(i)) > 0 then
response.write(mid(arrItems(i),instr(arrItems(i),"<"),len(arrItems(i))-instr(arrItems(i),"<") + 1))
end if
next
rs1.close
%>
<%
set rs1 = Nothing
else
%>
<% end if%>