<%
set conn = server.createobject(\"adodb.connection\")
conn.Open \"DBQ=\" & Server.Mappath(\"/admin/news.mdb\") & \";\" & \"Driver={Microsoft Access Driver (*.mdb)};\"
Dim news
news = Request.QueryString(\"news\")
SQL = \"SELECT * FROM news WHERE id=\" & news &\"
Set rs = Server.CreateObject(\"ADODB.Recordset\")
%>
<html>
<head>
<title>Anbefaling</title>
</head>
<body BGCOLOR=\"#FFFFFF\" TEXT=\"#000000\">
<%
dig = request(\"navn\")
ham = request(\"hisnavn\")
mail = request(\"ad\")
if Request.ServerVariables(\"REQUEST_METHOD\") = \"POST\" then
Set JMail = Server.CreateObject(\"JMail.SMTPMail\")
JMail.ContentTransferEncoding = \"8bit\"
JMail.Charset = \"ISO-8859-1\"
JMail.Priority = 1
JMail.ServerAddress = \"din_smtp.server.dk\"
JMail.Sender = \"Din_afsender_e-mail.dk\"
JMail.Subject = \"Artikkel sendt til dig, fra din ven \" & dig
JMail.Body = \"Hej\" & ham & vbCrLf & \"Din ven \" & dig & \", har besøgt vores side
http://www.DINSIDE.dk og sendt dig denne artikkel\" &vbCrlf
JMail.Body= JMail.Body + rs(\"titel\") & vbCrLf
JMail.Body= JMail.Body + rs(\"teaser\") & vbCrLf & vbCrlf
JMail.Body= JMail.Body + \"Du kan læse den fulde artikkel på
http://www.DINSIDE.dk/nyhed.asp?id\"& news & vbCrLf \"Håber vi ses dig\"
JMail.AddRecipient mail
JMail.Execute
set JMail = nothing
response.write \" Nyheden \" & rs(\"titel\") & \" er sendt til \" & ham & \" på \" & mail
else %>
<form action=\"anbef.asp\" METHOD=\"POST\">
<table cellpadding=\"2\" cellspacing=\"2\" border=\"1\">
<tr>
<td><div align=\"center\"><center><h2>Anbefal Min side</h2>
</center></div></td>
</tr>
<tr>
<td><input TYPE=\"TEXT\" onFocus=\"this.form.ad.select()\" value=\"Modtagerens e-mail?\"
NAME=\"ad\" SIZE=\"17\"> </td>
</tr>
<tr>
<td><input TYPE=\"TEXT\" onFocus=\"this.form.navn.select()\" value=\"Afsenderens navn?\"
NAME=\"navn\" SIZE=\"17\"> </td>
</tr>
<tr>
<td><input TYPE=\"TEXT\" onFocus=\"this.form.hisnavn.select()\" value=\"Modtagerens navn?\"
NAME=\"navn\" SIZE=\"17\"> </td>
</tr>
<tr>
<td><input type=\"submit\" value=\"Send\"> </td>
</tr>
</table>
</form>
<% end if%>
<%
DataConn.Close
Set DataConn = Nothing
%>
</body>
</html>