Alfabetisk orden ...Probs
Hej denne kode her laver ikke de ip'er i alfabetiske orden why ....<%
'Åbn databasen
Set conntemp = Server.CreateObject("ADODB.Connection")
DSN = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & server.mappath("servers.mdb") & "; UID=Administrator; PWD="
conntemp.open DSN
response.write "<HTML><HEAD><TITLE>Serveroversigt</TITLE><LINK rel=""stylesheet"" type=""text/css"" href=""style.css""></HEAD><BODY bgcolor=""#000000"">"
response.write "<DIV align=""center""><TABLE width=""100%"" cellspacing=""0"" cellpadding=""5"" BORDER=""0"" height=""80%""><TR><TD style=""BORDER: #000000 1px solid"" bgcolor=""#000000"" valign=""top"">"
mode=request("mode")
' ********************************* Tilføj Artikel
if mode="news" and request("functions") = "add" then
If Request.Form("Add") <> "" Then
'Indsæt i databasen
SQL = "INSERT INTO [servers] (navn,ip,kommentar) VALUES ('" & request("navn") & "', '" & request("ip") & "', '" & request("kommentar") & "')"
conntemp.execute(sql)
response.write "<FONT face=""Verdana"" size=""1""><B>Server IP'en er nu oprettet!, klik <a href=""servers.asp""><B>her</B></a></FONT>"
Else
response.write "<FORM action=""artikle.asp?mode=news&functions=add"" method=""post""><FONT face=""Verdana"" size=""1"">"
response.write "<B>Navn:<br></B><input name=""navn"" size=""35"" class=""oneline""><br><br>"
response.write "<B>Ip:<br></B><input name=""emne"" size=""35"" class=""oneline""><br><br>"
response.write "<B>Kommentar:<br></B><TEXTAREA name=""kommentar"" cols=""35"" rows=""8"" class=""box""></TEXTAREA><br><br>"
response.write "<input type=""submit"" name=""add"" class=""box"" value=""OPRET SERVER IP""></FORM>"
response.write "Bemærk at Artiklen ikke vil blive vist før at den er blevet accepteret!!</FONT>"
End if
' ********************************* Vis Artikle
Elseif mode="news" and request("id") <> "" then
sql = "SELECT * from artikle WHERE id="& request("id") &" "
set rstemp = conntemp.execute(sql)
'Hvis Artikelen er accepteret
if rstemp("vis") = true then
response.write "<FONT face=""Verdana"" size=""1"">" & rstemp("ip") & " (<B>" & rstemp("dato") & " " & rstemp("tid") & "</B>)<br>"
response.write "--------------------------------------------------------------------------------------------"
response.write "<P>"
response.write "" & rstemp("kommentar") & ""
response.write "<br><br>Af:</B><br> <a href=""mailto:" & rstemp("mail") & """>" & rstemp("navn") & "</a></FONT>"
response.write "<br><br>Klik <a href=""../default.asp""><B>her</B></a> Forsiden</FONT>"
'Hvis Artiklen ikke er accepteret
else
response.write "<FONT face=""Verdana"" size=""1""><B>Denne Artikle kan ikke vises!!</B></FONT>"
end if
rstemp.close
' ********************************* Vis alle Artikler
else
sql = "SELECT * from [servers] where vis=-1 ORDER BY dato desc,tid desc"
set rstemp = conntemp.execute(sql)
response.write "<FONT face=""Verdana"" size=""1""><B>Servers:</B><BR>"
do while not (rstemp.eof or rstemp.bof)
response.write "<a href=""artikle.asp?mode=news&id=" & rstemp("id") & """>" & rstemp("ip") & " <B> (" & rstemp("dato") & " " & rstemp("tid") & ")</B></a><br>"
rstemp.movenext
loop
rstemp.close
response.write "<br><br>Klik <a href=""http://www.cs-basen.dk/default.asp""><B>her </B></a> Forsiden</FONT>"
end if
response.write "</TD></TR></TABLE></DIV>"
response.write "</BODY></HTML>"
'Luk databasen
conntemp.close
set conntemp=nothing
%>