/asp/freeapps/postcardmentor/viewcard.asp
<!--#include file="inccard.asp"-->
<%
Dim nCardId, sSmallGufUrl
Dim nID, nOtherId
nCardId = LTrim(Request.QueryString("cardid"))
nCardId = RTrim(nCardId)
if nCardId = "" Then
nCardId = Request.Form("cardid")
nCardId = LTrim(nCardId)
nCardId = RTrim(nCardId)
If nCardId = "" Then
Response.Redirect "."
End If
End If
If Len(nCardId ) < 11 Then
Response.Redirect "error.asp?error=" & Server.URLEncode("Card id is not correct")
Response.Flush
Response.End
End If
nOtherID = Left( nCardId,10)
nID = Mid( nCardId,11)
Dim oRS
Set oRS = Server.CreateObject("ADODB.Recordset")
Dim oConn
Set oConn = Postcard_GetDatabaseConn()
oRS.Open "select gifurl, nameto, namefrom, emailfrom, greeting, bgcolor, textcolor, stext from " & Postcard_GetTablePrefix() & "createdpostcards as createdpostcards, " & Postcard_GetTablePrefix() & "card as card where createdpostcards.fldAuto=" & nId & " AND otherid='" & nOtherId & "' and card.fldAuto=createdpostcards.cardid", oConn
If oRS.EOF Then
oRS.Close
Set oRS = Nothing
oConn.Close
Set oConn = Nothing
Response.Redirect "error.asp?error=" & Server.URLEncode("Card id is not correct")
Response.Flush
Response.End
End If
Dim sGifUrl, sNameTo, sNameFrom, sEmailFrom, sText, sEmailTo
Dim sBGColor
Dim sTextColor
sGifUrl = oRS("gifurl")
sNameTo = oRS("nameto")
sNameFrom = oRS("namefrom")
sEmailFrom = oRS("emailfrom")
sGreeting = oRS("greeting")
sText = oRS("stext")
sBGColor = oRS("BgColor")
sTextColor = oRS("TextColor")
oRS.Close
'Update pickup
oRS.Open "select fldAuto, pickedupwhen from " & Postcard_GetTablePrefix() & "createdpostcards where fldAuto=" & nID ,oConn ,adOpenDynamic,adLockOptimistic
oRS("pickedupwhen") = Now()
oRS.Update
oRS.Close
Set oRS = Nothing
oConn.Close
Set oConn = Nothing
%>
<HTML><HEAD><TITLE>PostcardMentor Card</TITLE>
<META content="text/html; charset=windows-1252" http-equiv=Content-Type>
<META content="Microsoft FrontPage 4.0" name=GENERATOR></HEAD>
<BODY aLink=#000000 bgColor=#<%=sBGColor%> link=#000080 text=#<%=sTextColor%> vLink=#000080>
<CENTER>
<CENTER>
<TABLE border=0 cellPadding=0 cellSpacing=0 width=591>
<TBODY>
<TR>
<TD align=middle vAlign=top width="468">
<%=Inccard_GetAd(1)%>
</TD>
<TD></TD>
<TD vAlign=top><%=Inccard_GetAd(2)%></TD></TR></TBODY></TABLE></CENTER>
<div align="center">
<center>
<table border="0">
<tr>
<td valign="top" align="center">
<P><b><font face="Arial,Helvetica,Sans Serif" size="5"><%=sNameTo%>, you
got a card:</font></b></td>
<td valign="top" align="center">
</td>
</tr>
</table>
</center>
</div>
<FORM action=default.asp method=post>
<p> </p>
<TABLE border=0 cellPadding=0 width=580>
<TBODY>
<TR>
<TD>
<p align="center"><b><font size="4">
From: <a href="mailto:<%=sEmailFrom%>"><%=sNameFrom%></a></font></b>
</p><br>
</TD></TR>
<TR>
<TD height=15>
<p align="center"><b><font size="4"><%=sGreeting%></font></b></TD></TR>
<TR>
<TD align=middle height=25>
<p align="center"><img src="<%=sGifUrl%>"></p>
</TD></TR>
<TR>
<TD align=middle height=25>
<p align="center"><textarea rows="5" name="S1" cols="24"><%=sText%></textarea></TD></TR>
<TR>
<TD align=middle height=25><INPUT name=submit type=submit value="Send a card myself!"></TD></TR></TBODY></TABLE>
</FORM>
<P><BR>This script is developed by Stefan Holmberg - <a href="http://www.aspcode.net/postcardmentor">http://www.aspcode.net/postcardmentor</a><P><%=Inccard_GetAd(3)%></CENTER>
<P><BR>
<P><BR></P></BODY></HTML>