<% strDSN = "DRIVER={MySQL}; Server=mydb6.surf-town.net; Database=spoforum; Uid=spoaddi_php; Password=smovs;" Function DBFix(tempString) tempString = Replace(Trim(tempString), "'", "''") tempString = Replace(tempString, "|", "") DBFix = tempString End Function %> <% If Session("ADMINID") = 1 Then godkendt = 1 elseIf Session("ADMINID") = 2 Then godkendt = 1 elseIf Session("ADMINID") = 7 Then godkendt = 1 elseIf Session("ADMINID") = 8 Then godkendt = 1 elseIf Session("ADMINID") = 9 Then godkendt = 1 elseIf Session("ADMINID") = 28 Then godkendt = 1 Else godkendt = 0 END IF %> <% reslige = 0 Set myConn = Server.CreateObject("ADODB.Connection") myConn.Open strDSN strSQL = "SELECT * FROM 16ccw ORDER BY ID DESC" Set rs = myConn.Execute(strSQL) If Not (rs.BOF Or rs.EOF) Then Do While Not rs.EOF strSQL = "SELECT *, DATE_FORMAT(dato,'%d-%m-%Y') AS FormDate, TIME_FORMAT(dato,'%H:%i') AS FormTime FROM 16ccw WHERE (id =" & rs("id") & ")" Set formatDate = myConn.Execute(strSQL) dtmFormatDate = formatDate("FormDate") strSQL = "SELECT Count(*) AS ItemCount FROM 16ccw Where (id = " & rs("id") & ")" Set recordCount = myConn.Execute(strSQL) ' Vi tjekker om kampen er vundet eller tabt farve = 2 If rs("resultatos") > rs("resultatdem") Then farve = "#99ff99" cellepix = "wars-g.jpg" Elseif rs("resultatos") = rs("resultatdem") Then farve = "#ff9999" cellepix = "wars.jpg" Else farve = "blue" cellepix = "wars-r.jpg" END IF ' Vi tæller samlet resultat sammen If rs("resultatos") > rs("resultatdem") Then resos = resos + 1 Elseif rs("resultatos") < rs("resultatdem") Then resdem = resdem + 1 Else reslige = reslige + 1 END IF pointsos = pointsos + rs("resultatos") pointsdem = pointsdem + rs("resultatdem") antalwars = antalwars + 1 pointssamlet = pointsos - pointsdem ' Vi sætter et + foran hvis det samlede pointantal er positivt If pointssamlet > 0 Then pointssamlet = "+" & pointssamlet & "" Elseif pointssamlet < 0 Then pointssamlet = "" & pointssamlet & "" End if strRES = "Vi har spillet " & antalwars & " kampe, af dem har vi vundet " & resos & ", tabt " & resdem & " og spillet " & reslige & " uafgjort. Samlet har vi lavet " & pointsos & " point og der er blevet lavet " & pointsdem & " point mod os (" & pointssamlet & ")." ' Vi laver udskrift i tabellen If godkendt = 1 Then strHTML = strHTML & "[edit] " & rs("version") & "" & rs("tidspunkt") & "16c vs. " & rs("vs") & "
" & rs("resultatos") & "" & rs("resultatdem") & "" & rs("type") & "" & rs("Kommentar") & "" & rs("lineup") & "" Else strHTML = strHTML & "" & rs("version") & "" & rs("tidspunkt") & "16c vs. " & rs("vs") & "
" & rs("resultatos") & "" & rs("resultatdem") & "" & rs("type") & "" & rs("Kommentar") & "" & rs("lineup") & "" END IF rs.MoveNext Loop End If myConn.Close Set myConn = Nothing If godkendt = 1 Then strNY = "Indtast en ny war
" else Response.write "" End IF %> 16c wars
<%=strNY%><%=strRES%>
<%=strHTML%>
Version Dato Modstander Nationalitet

Os

Dem Type Maps Lineup