File: D:/web/homefly/emailfriend.asp
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
<TITLE>Email Friend</TITLE>
<LINK REL=STYLESHEET TYPE="text/css" HREF="style.css">
</HEAD>
<body marginheight="0" marginwidth="0" topmargin="0" leftmargin="0" rightmargin="0">
<!--#include file="vsadmin/db_conn_open.asp"-->
<!--#include file="vsadmin/includes.asp"-->
<!--#include file="vsadmin/inc/languagefile.asp"-->
<!--#include file="vsadmin/inc/incfunctions.asp"-->
<!--#include file="vsadmin/inc/incemail.asp"-->
<table border='0' cellspacing='4' cellpadding='3' width='100%'>
<% if request.form("posted")="1" then
Set rs = Server.CreateObject("ADODB.RecordSet")
Set cnn=Server.CreateObject("ADODB.Connection")
cnn.open sDSN
sSQL="SELECT adminEmail,adminStoreURL FROM admin WHERE adminID=1"
rs.Open sSQL,cnn,0,1
emailAddr = rs("adminEmail")
adminStoreURL = rs("adminStoreURL")
if (left(LCase(adminStoreURL),7) <> "http://") AND (left(LCase(adminStoreURL),8) <> "https://") then
adminStoreURL = "http://" & adminStoreURL
end if
if Right(adminStoreURL,1) <> "/" then adminStoreURL = adminStoreURL & "/"
rs.Close
seBody = xxEFYF1 & request.form("yourname") & " ("&request.form("youremail")&")" & xxEFYF2
if Trim(request.form("yourcomments"))<>"" then
seBody = seBody & xxEFYF3 & vbCrLf
seBody = seBody & Trim(request.form("yourcomments")) & vbCrLf
else
seBody = seBody & "." & vbCrLf
end if
seBody = seBody & vbCrLf & adminStoreURL
if Trim(Request.Form("id")) <> "" then seBody = seBody & "proddetail.asp?prod=" & Trim(Request.Form("id"))
seBody = seBody & vbCrLf
call DoSendEmail(request.form("friendsemail"),emailAddr,request.form("yourname") & " recommends this site",seBody)
%>
<tr>
<td bgcolor="#FF0000" colspan="2" align="center" width="100%"> </td>
</tr>
<tr>
<td colspan="2" align="center" width="100%"><p> </p>
<p>Thank you, your recommendation has been sent.</p>
<p>Please click below to close this window.</p>
<p> </p>
</td>
</tr>
<tr>
<td colspan="2" align="center" width="100%"><input type="button" name="close" value="Close Window" onClick="javascript:self.close()">
<p> </p>
</td>
</tr>
<tr>
<td bgcolor="#FF0000" colspan="2" align="center" width="100%"> </td>
</tr>
<% else %>
<script Language="JavaScript">
<!--
function formvalidator(theForm)
{
if (theForm.yourname.value == "")
{
alert("<%=xxPlsEntr%> \"<%=xxEFNam%>\".");
theForm.yourname.focus();
return (false);
}
if (theForm.youremail.value == "")
{
alert("<%=xxPlsEntr%> \"<%=xxEFEm%>\".");
theForm.youremail.focus();
return (false);
}
if (theForm.friendsemail.value == "")
{
alert("<%=xxPlsEntr%> \"<%=xxEFFEm%>\".");
theForm.friendsemail.focus();
return (false);
}
return (true);
}
//-->
</script>
<form method="POST" action="emailfriend.asp" onSubmit="return formvalidator(this)">
<input type="hidden" name="posted" value="1">
<input type="hidden" name="id" value="<%=Request.QueryString("id")%>">
<tr>
<td bgcolor="#FF0000" colspan="2" align="center" width="100%"> </td>
</tr>
<tr>
<td colspan="2" align="center" width="100%">
<table border='0' cellspacing='1' cellpadding='1' width='350'>
<tr>
<td width="100%"><%=xxEFBlr%>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="40%" align="right"><font color="#FF0000">*</font><%=xxEFNam%>:</td><td><input type="text" name="yourname" size="30"></td>
</tr>
<tr>
<td width="40%" align="right"><font color="#FF0000">*</font><%=xxEFEm%>:</td><td><input type="text" name="youremail" size="30"></td>
</tr>
<tr>
<td width="40%" align="right"><font color="#FF0000">*</font><%=xxEFFEm%>:</td><td><input type="text" name="friendsemail" size="30"></td>
</tr>
<tr>
<td colspan="2" align="center" width="100%">
<table border='0' cellspacing='1' cellpadding='1' width='250'>
<tr>
<td width="100%"> <br><%=xxEFCmt%>:<br>
<textarea name="yourcomments" cols="30" rows="5"></textarea>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" align="center" width="100%"><input type="submit" name="Send" value="Send"> <input type="button" name="close" value="<%=xxClsWin%>" onClick="javascript:self.close()">
</td>
</tr>
<tr>
<td bgcolor="#FF0000" colspan="2" align="center" width="100%"> </td>
</tr>
</form>
<% end if %>
</table>
</BODY>
</HTML>