%
Set myConn = Server.CreateObject("ADODB.Connection")
myConn.Open strDSN
' vi kontrolere om brugeren er medlem af SPO
intBrugerkontrol = Session("ID")
If isEmpty(intBrugerkontrol) Then
intMedlem = 0
Else
strSQL = "SELECT medlem, LifForum FROM spobruger WHERE (brugerID = " & intBrugerkontrol & ")"
Set rs = myConn.Execute(strSQL)
intMedlem = rs("medlem")
intLifForum = rs("LifForum")
End if
strSQL = "SELECT * FROM Forums"
Set rs = myConn.Execute(strSQL)
thisday = Right(Cstr(day(date)+100),2) & "-" & Right(Cstr(month(date)+100),2) & "-" & year(date)
If Not (rs.BOF Or rs.EOF) Then
Do While Not rs.EOF
strSQL = "SELECT *, DATE_FORMAT(date,'%d-%m-%Y') AS FormDate, TIME_FORMAT(date,'%H:%i') AS FormTime FROM Entries WHERE (ForumID =" & rs("Id") & ") AND (spam = 0) ORDER BY ID DESC"
Set formatDate = myConn.Execute(strSQL)
If (formatDate.BOF Or formatDate.EOF) Then
dtmFormatDate = "Ingen indlęg"
Else
compare = strComp(thisday,formatDate("FormDate"))
If (compare = 0) Then
dtmFormatDate = "" & formatDate("FormDate") & " - " & formatDate("FormTime") & """" & formatDate("Subject") & """
(" & formatDate("Name") & ")"
Else
dtmFormatDate = formatDate("FormDate") & " - " & formatDate("FormTime") & "
""" & formatDate("Subject") & """
(" & formatDate("Name") & ")"
End If
End If
strSQL = "SELECT Count(*) AS ItemCount FROM Entries Where (ForumID = " & rs("Id") & ")"
Set recordCount = myConn.Execute(strSQL)
' Vi viser kun det hemelige forum hvis brugeren er medlem af SPO
If rs("Id") = 14 Then
If intMedlem = 1 Then
intWriteHTML = 1
Else
intWriteHTML = 0
End if
Elseif rs("Id") = 15 Then
If intLifForum = 1 Then
intWriteHTML = 1
Else
intWriteHTML = 0
End if
Else
intWriteHTML = 1
End if
If intWriteHTML = 1 Then
strHTML = strHTML & "
" & rs("Forum") & " " & rs("Description") & " | "
strHTML = strHTML & "" & recordCount("ItemCount") & " | "
strHTML = strHTML & "" & dtmFormatDate & " |
"
End if
rs.MoveNext
Loop
End If
myConn.Close
Set myConn = Nothing
%>
StolPaaOs.dk -> Forum [ Oversigt ]
| Forums |
Antal
indlęg |
Seneste
indlęg |
<%=strHTML%>
|