Ok, her har i scriptet...
------KLIP----Postkort.asp------
<%
'© Svend H. Bang Henriksen, smbang@mail1.stofanet.dk, svend_bh@hotmail.com
'opsaetning:
'----------------------------------------------
'Internetstien til "login.html":
homepage = "
http://www.vels.dk/login.html"'Det navn der skal staa under "venlig hilsen" sidst i en email (nu linie med "VbCrLf"):
Navn = "Jesper Vels" & VbCrLf & "webmaster@vels.dk"
'Din mailhost:
Mailhost = "vels.dk"
'Det navn der skal komme frem i feltet "fra" i emailprogrammet hos modtagerne:
Fromname = "Vels postkortservice"
'Afsenderens navn:
Sender = "Jesper Vels"
'Den tekst der skal komme frem i feltet subject i emailprogrammet:
Subject = "Du har modtaget et digitalt postkort"
'----------------------------------------------
sub login()
set conn = server.createobject("ADODB.connection")
conn.Open "DBQ=" & server.mappath("postkort.mdb") & ";Driver={Microsoft Access Driver (*.mdb)}"
Sql = "SELECT * FROM postkort where til='" & request.form("Brugernavn") & "' and password='" & request.form("password") & "' order by til"
set RS = conn.execute( SQL )
if request.form("password") = rs("password") then
session("inde") = True
session("brugernavn") = request.form("brugernavn")
call wiew()
else
response.redirect "login.html"
end if
conn.close
set conn = Nothing
set rs = Nothing
end sub
sub wiew()
if session("inde") = True then
set conn = server.createobject("ADODB.connection")
conn.Open "DBQ=" & server.mappath("postkort.mdb") & ";Driver={Microsoft Access Driver (*.mdb)}"
Sql = "SELECT * FROM postkort where til='" & session("brugernavn") & "' and password='" & request.form("password") & "' order by til"
set RS = conn.execute( SQL )
%>
<html>
<head>
<title>
<%=rs("Titel") %>
</title>
</head>
<body bgcolor="<%=rs("Baggrundsfarve") %>" text="<%=rs("Textfarve") %>">
<div align="center">
<h1>
<%=rs("Fra") %> har sendt dig et postkort.
</h1>
<br>
<h2>
Du kan svare ved at klikke <a href="mailto:<%=rs("Fraemail") %>">her</a>.
</h2>
<img src="<%=rs("Billede") %>">
</div>
<p>
<h4>
<%=rs("Besked") %>
</h4>
<br>
<br>
<br>
<br>
<div align="right">
<h3>
<%=rs("Underskrift") %>
</h3>
</div>
</body>
</html>
<%
conn.close
set conn = Nothing
set rs = Nothing
else
response.redirect "login.html"
end if
end sub
sub indset()
Bogstaver = Array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z",1,2,3,4,5,6,7,8,9,0)
Password = ""
for i=0 to 6
Randomize
Nummer = Int(Rnd*36)
Password = Password & Bogstaver(Nummer)
next
set my_conn = server.createobject("ADODB.connection")
my_conn.Open "DBQ=" & server.mappath("postkort.mdb") & ";Driver={Microsoft Access Driver (*.mdb)}"
set rs = Server.CreateObject("ADODB.Recordset")
Til = request.form("recip_name")
Tilemail = request.form("recip_email")
Fra = request.form("Sender_name")
Fraemail = request.form("Sender_email")
Billede = request.form("pic_select")
Textfarve = request.form("Text_color")
Baggrundsfarve = request.form("Back_color")
Titel = request.form("the_title")
Besked = request.form("the_message")
Underskrift = request.form("sig_line")
strSql = "insert into postkort (Password, Til, Tilemail, Fra, Fraemail, Billede, Textfarve, Baggrundsfarve, Titel, Besked, Underskrift) values ('"
strSql = StrSql & Password & "', '"
strSql = StrSql & Til & "', '"
strSql = StrSql & Tilemail & "', '"
strSql = StrSql & Fra & "', '"
strSql = StrSql & Fraemail & "', '"
strSql = StrSql & Billede & "', '"
strSql = StrSql & Textfarve & "', '"
strSql = StrSql & Baggrundsfarve & "', '"
strSql = StrSql & Titel & "', '"
strSql = StrSql & Besked & "', '"
strSql = StrSql & Underskrift & "')"
my_conn.Execute (StrSql)
my_conn.Close
set my_conn = nothing
set rs = Nothing
Response.write("<h3>Din besked er blevet sendt.</h3>")
Set JMail = Server.CreateObject("JMail.SMTPMail")
JMail.ServerAddress = Mailhost
JMail.Sender = Sender
JMail.Sendername = Fromname
JMail.AddRecipient ( Tilemail )
JMail.Priority = 1
JMail.Subject = Subject
JMail.body = "Fra & " har d. " & date & " kl. " & time " sendt dig et digitalt postkort." & VbCrLf & VbCrLf & "Du kan hente det ved at gå ind på "& homepage & " og indtaste følgende som brugernavn og password." & VbCrLf & VbCrLf & "Brugernavn:" & Navn & VbCrLf & "Password:" & Password & VbCrLf & VbCrLf & VbCrLf & "Med venlig hilsen" & VbCrLf & VbCrLf & ditnavn"
JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")
JMail.ContentType = "text/html"
JMail.Charset = "iso-8859-1"
JMail.ContentTransferEncoding = "8bit"
end sub
if not ikkeok then
if request.querystring("mode") = "wiew" then
call wiew()
elseif request.querystring("mode") = "login" then
call login()
else
call indset()
call sendemail()
end if
end if
%>
------KLIP------
------KLIP----login.html------
<html>
<head>
<title>
Login til postkort
</title>
</head>
<body>
<form method="post" action="postkort.asp?mode=login">
<table>
<tr>
<td>
Brugernavn:
</td>
<td>
<input name="brugernavn" size=30>
</td>
</tr>
<tr>
<td>
Password:
</td>
<td>
<input type="password" name="password" size=30>
</td>
</tr>
</table>
<br>
<br>
<input type="submit" value="Login">
</form>
</body>
</html>
------KLIP------
------KLIP----postkort.html------
<html>
<head>
<title>E-card</title>
</head>
<body>
<font face="verdana,arial"><a NAME="TOP">
<table width="478" border="0" cellspacing="0" cellpadding="0" height="70" align="center">
</table>
<a NAME="TOP">
<h2 align="center">Lav dit E-kort</h2>
<form METHOD="POST" ACTION="postkort.asp">
<input type="hidden" name="action_code" value="NEW"><div align="left"><p> </p>
</div><div align="center"><center><table border="0" cellpadding="2" width="514"
height="10" bgcolor="#C0C0C0">
<tr>
<td width="514" height="10"><strong>Vælg et billed:</strong></td>
</tr>
</table>
</center></div><div align="center"><center><table border="0" cellpadding="2" width="515"
bgcolor="#C0C0C0">
<tr>
<td><div align="center"><center><p><img src="1.jpg" width="109" height="167"
alt="1.jpg (49503 bytes)"><br>
<input type="radio" value="1.jpg" checked name="pic_select"></td>
<td align="center"><div align="center"><center><p><img src="2.jpg" width="109"
height="166" alt="2.jpg (41140 bytes)"><br>
<input type="radio" name="pic_select" value="2.jpg"></td>
</tr>
<tr align="center">
<td><div align="center"><center><p><img src="3.jpg" width="109" height="165"
alt="3.jpg (40672 bytes)"><br>
<input type="radio" name="pic_select" value="3.jpg"></td>
<td align="center"><div align="center"><center><p><img src="4.jpg" width="109"
height="165" alt="4.jpg (55581 bytes)"><br>
<input type="radio" name="pic_select" value="4.jpg"></td>
</tr>
<tr align="center">
<td><div align="center"><center><p><img src="5.jpg" width="109" height="164"
alt="5.jpg (25061 bytes)"><br>
<input type="radio" name="pic_select" value="5.jpg"></td>
<td align="center"><div align="center"><center><p><img src="6.jpg" width="109"
height="164" alt="6.jpg (61940 bytes)"><br>
<input type="radio" name="pic_select" value="6.jpg"></td>
</tr>
<tr align="center">
<td><div align="center"><center><p><img src="7.jpg" width="109" height="165"
alt="7.jpg (31531 bytes)"><br>
<input type="radio" name="pic_select" value="7.jpg"></td>
<td align="center"><div align="center"><center><p><img src="8.jpg" width="109"
height="163" alt="8.jpg (88852 bytes)"><br>
<input type="radio" name="pic_select" value="8.jpg"></td>
</tr>
</table>
</center></div><div align="center"><center><p> </p>
</center></div><div align="center"><center><table BGCOLOR="#C0C0C0" BORDER="0" WIDTH="515"
cellspacing="2" cellpadding="2">
<tr>
<td><div align="center"><center><p><b>Hvem er E-kortet fra?</b> </td>
</tr>
<tr align="center">
<td ALIGN="center">Name: <input TYPE="TEXT" NAME="sender_name" MAXLENGTH="100"
SIZE="35"> </td>
</tr>
<tr align="center">
<td ALIGN="center">E-mail: <input TYPE="TEXT" NAME="sender_email"
MAXLENGTH="70" SIZE="35"> </td>
</tr>
<tr align="center">
<td><div align="center"><center><p><b>Hvem er E-kortet til?</b> </td>
</tr>
<tr align="center">
<td ALIGN="center">Name: <input TYPE="TEXT" NAME="recip_name" MAXLENGTH="100"
SIZE="35"> </td>
</tr>
<tr align="center">
<td ALIGN="center">E-mail: <input TYPE="TEXT" NAME="recip_email" MAXLENGTH="70"
SIZE="35"> </td>
</tr>
<tr align="center">
<td ALIGN="CENTER"><b>Tekst farve:</b> <select NAME="text_color" size="1">
<option selected value="#000000">Sort</option>
<option value="#FFFFFF">Hvid</option>
<option value="#FF0000">Rød</option>
<option value="#00FF00">Grøn</option>
<option value="#0000FF">Blå</option>
<option value="#99FFFF">Lyseblå</option>
<option value="#FFFF33">Gul</option>
<option value="#9933FF">Pink </option>
<option value="#FF9933">Orange </option>
<option value="Aqua">Aqua </option>
</select> </td>
</tr>
<tr align="center">
<td ALIGN="CENTER"><b>Baggrunds farve:</b> <select NAME="back_color" size="1">
<option selected value="#FFFFFF">Hvid</option>
<option value="#000000">Sort</option>
<option value="#FF0000">Rød</option>
<option value="#00FF00">Grøn</option>
<option value="#0000FF">Blå</option>
<option value="#99FFFF">Lyseblå</option>
<option value="#FFFF33">Gul</option>
<option value="#9933FF">Pink </option>
<option value="#FF9933">Orange </option>
<option value="Aqua">Aqua </option>
</select> </td>
</tr>
<!/TABLE>
<!TABLE BGCOLOR="#99FF99" BORDER=1 WIDTH=515>
<tr align="center">
<td ALIGN="CENTER"><b>Titlen til dit E-kort:</b> </td>
</tr>
<tr align="center">
<td ALIGN="CENTER"><input TYPE="TEXT" NAME="the_title" MAXLENGTH="75" SIZE="55"> </td>
</tr>
<tr align="center">
<td ALIGN="CENTER"><b>Din besked:</b> </td>
</tr>
<tr align="center">
<td ALIGN="CENTER"><textarea NAME="the_message" WRAP="VIRTUAL" ROWS="4" COLS="60"></textarea>
</td>
</tr>
<tr align="center">
<td ALIGN="CENTER"><b>"Underskrift":</b><br>
</td>
</tr>
<tr align="center">
<td ALIGN="CENTER"><input TYPE="TEXT" NAME="sig_line" MAXLENGTH="100" SIZE="35"><br>
<br>
</td>
</tr>
</table>
</center></div><div align="center"><center><p><input TYPE="submit" VALUE="Preview"> <input
TYPE="reset" value="Slet"> </p>
</center></div>
</form>
</a></font>
<p align="center"><font face="verdana,arial"><font size="-1"><b><a NAME="TOP">©1999 b</a>y
<a href="mailto:e-card@vels.dk">Vels.dk</a></b></font><br>
</font></p>
<div align="center"><center>
<table>
<tr>
<td valign="top" align="center"><p ALIGN="CENTER"><a
HREF="
http://webhulen.dk/cgi-bin/banswap/ads.pl?member=vels;banner=NonSSI;page=03"><img SRC="
http://webhulen.dk/cgi-bin/banswap/ads.pl?member=vels;page=01" HEIGHT="60"
WIDTH="250" BORDER="0" ALT="Webhulen's Bannerswap"></a><br>
<small><a HREF="
http://banner.webhulen.dk/">Webhulen's Bannerswap</a></small></td>
<td valign="top" align="center"><p ALIGN="CENTER"><a
HREF="
http://webhulen.dk/cgi-bin/banswap/ads2.pl?member=vels;banner=NonSSI;page=03"><img SRC="
http://webhulen.dk/cgi-bin/banswap/ads2.pl?member=vels;page=01" HEIGHT="60"
WIDTH="250" BORDER="0" ALT="Webhulen's Bannerswap"></a><br>
<small><a HREF="
http://banner.webhulen.dk/">Webhulen's Bannerswap</a></small></td>
</tr>
</table>
</center></div>
</body>
</html>
------KLIP------
Det var det...
Derudover kræver det en acces-database med følgende felter:
ID: Autonumerering
Password: Notat
Til: Notat
Tilemail: Notat
Fra: Notat
Fraemail: Notat
Dato: Dato
Billede: Notat
Textfarve: Notat
Baggrundsfarve: Notat
Titel: Notat
Besked: Notat
Underskrift: Notat
Det skal lige bemærkes at scritet i øjebliket er tilpasset til @ webside (især postkort.html)...
Derudover bruger det Jmail...
Håber i kan få det til at virke...
M.v.h.
Svend H. B. Henriksen.