/ Forside / Teknologi / Udvikling / ASP / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
ASP
#NavnPoint
smorch 9259
Harlekin 1866
molokyle 1040
Steffanst.. 758
gandalf 657
smilly 564
gibson 560
cumano 530
MouseKeep.. 480
10  Random 410
HJÆLPE!
Fra : Marc Zacho


Dato : 21-08-04 14:50

<%
if session("login") = "" Then
Response.redirect("adminlogin.asp")
end if
%>
<html>

<head>
<link rel="stylesheet" type="text/css" href="style.css">
<title>Crazy Boys 4 Life</title>
</head>

<body background="HLbackground.jpg">

<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0"
style="border-collapse: collapse" bordercolor="#111111"
width="802" id="AutoNumber1" height="35">
<tr>
<td width="801" height="100" colspan="5" nowrap>
<img border="0" src="top.jpg" width="800"
height="100"></td>
</tr>
<tr>
<td width="801" height="18" colspan="5" nowrap></td>
</tr>
<tr>
<td width="128" height="22" bgcolor="#000000"
align="center" nowrap>
<font face="Verdana" size="2"
color="#FFFFFF">Menu</font></td>
<td width="12" height="22">&nbsp;</td>
<td width="523" height="22" bgcolor="#000000"
align="center" nowrap>
<font face="Verdana" size="2"
color="#FFFFFF">Main</font></td>
<td width="11" height="22">&nbsp;</td>
<td width="128" height="22" bgcolor="#000000"
align="center" nowrap>
<font face="Verdana" size="2"
color="#FFFFFF">News</font></td>
</tr>
<tr>
<td width="128" height="460" bgcolor="#2B2B2B" valign="top"
nowrap><!--#include file="adminmenu.inc"--></td>
<td width="12" height="460" nowrap>&nbsp;</td>
<td width="523" height="460" bgcolor="#2B2B2B" valign="top"
nowrap>
<br>
<font color="white" size="2" face="verdana">
<%
' Databaseforbindelse - husk at angive sti til din database
Set Conn = Server.CreateObject("ADODB.Connection")
DSN = "DRIVER={Microsoft Access Driver (*.mdb)}; "
DSN = DSN & "DBQ=" & Server.MapPath("database.mdb")
Conn.Open DSN

strSQL = "Select * From besked Order by ip Desc"
Set rs = Conn.Execute(strSQL)

Do
' Personens navn
strNavn = rs("navn")
%>
</font>

<center>
<table border="1" cellspacing="0" style="border-collapse:
collapse" bordercolor="#FFFFFF" width="450" id="AutoNumber5"
cellpadding="0" height="28">
<tr>
<td width="50" height="14" bgcolor="#2B2B2B">
<font face="Verdana">
<a href="ret.asp?funktion=slet&id=<%=RS("id")%>"><font size="2"
color="#FFFFFF">Slet</font></a><font size="2" color="#FFFFFF">
</font></font>
</td>
<td width="200" height="14" bgcolor="#2B2B2B">
<font face="Verdana" size="2" color="#FFFFFF">Dato:
<%Response.Write rs("dato") & ""%></font>
</td>

<%
' lav et link til retbesked.asp med Id-værdien i URL
strLink = "<a href='retbesked.asp?id=" & rs("Id") & "'>" &
strNavn & "</a>"
%><font face="Verdana"> </font>

<td width="200" height="14" bgcolor="#2B2B2B">
<font face="Verdana">
<font color="#FFFFFF" size="2">Navn: <% Response.Write "" &
strLink & "" %></font>
</td>
</tr>
</table>
</center>
<%
rs.MoveNext
Loop While Not rs.EOF

Conn.Close
Set Conn = Nothing
%><font color="#FFFFFF" size="2">
<%
If request("funktion") = "slet" then

Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ=" &
Server.Mappath("database.mdb")
SQL = "Delete from besked WHERE id=" &
Request.QueryString("id")

Conn.Execute (SQL)

Conn.Close
set Conn = nothing

response.redirect "ret.asp"

End If
%>
</font>
</td>
<td width="11" height="460" nowrap>&nbsp;</td>
<td width="128" height="460" bgcolor="#2B2B2B" valign="top"
nowrap>
<font color="white" size="2" face="verdana">
<%
' Databaseforbindelse - husk at angive sti til din database
Set Conn = Server.CreateObject("ADODB.Connection")
DSN = "DRIVER={Microsoft Access Driver (*.mdb)}; "
DSN = DSN & "DBQ=" & Server.MapPath("news.mdb")
Conn.Open DSN

strSQL = "Select * from news"
Set rs = Conn.Execute(strSQL)
Do

response.write "" & rs("news") & ""

rs.MoveNext
Loop While Not rs.EOF
Conn.Close
Set Conn = Nothing
%>
</font>
</td>
</tr>
<tr>
<td width="801" height="22" colspan="5" nowrap>&nbsp;</td>
</tr>
<tr>
<td width="801" height="21" colspan="5" bgcolor="#000000"
align="center" nowrap>
<font face="Verdana" size="2" color="#FFFFFF">Copyright
<span style="mso-char-type: symbol; mso-symbol-font-family:
Symbol; font-size: 12.0pt; font-family: Symbol;
mso-ascii-font-family: Times New Roman; mso-fareast-font-family:
Times New Roman; mso-hansi-font-family: Times New Roman;
mso-bidi-font-family: Times New Roman; mso-ansi-language: DA;
mso-fareast-language: DA; mso-bidi-language: AR-SA">ã</span>
Sebastian 2003</font></td>
</tr>
</table>
</center>
</div>
<p><font face="Verdana" size="2"
color="#FFFFFF">&nbsp;</font></p>

</body>

</html>


--
Vil du lære at kode HTML, XHTML, CSS, SSI eller ASP?
- Pædagogiske tutorials på dansk
- Kom godt i gang med koderne
KLIK HER! => http://www.html.dk/tutorials

 
 
Søg
Reklame
Statistik
Spørgsmål : 177501
Tips : 31968
Nyheder : 719565
Indlæg : 6408527
Brugere : 218887

Månedens bedste
Årets bedste
Sidste års bedste