%%document-email-anonymous-html%%
roots.encielo.org : /
2002-08-21 13:17:00

%%preprocess%%
// format the object for display
$this->beryliumToHtml(); 
$this->timeFormat("F j, Y \a\\t g:ia");
$this->getBaseUrl();

if ($this->id=="") {
	header("HTTP/1.0 404 Not Found");
	}

$recipient= new Document;
$query= "SELECT obj.* FROM document AS obj WHERE obj.id='".$_GET['recipientid']."' AND obj.status!='deleted' ";
$recipient->selectObject($query);
$recipient->beryliumToHtml();

$this->recipientAddress= "
    $recipient->p_salutation $recipient->p_givenname $recipient->p_surname<br>
    $recipient->p_mail
    ";
$this->recipientSalutation= "$recipient->p_salutation $recipient->p_surname";

$this->dateLine= date("F j, Y");

// determine how to link to email
if (substr($recipient->p_email,0,4)=="http") {
    $this->recipientLink= "<a href='$recipient->p_email'>click here</a> to continue to the recipient's website.";
    $this->recipientLinkText= " ($recipient->p_email)";
    }
else {
    $this->recipientLink= "<a href='mailto:$recipient->p_email?subject=$this->title'>click here</a> to open an email compose window.";
    $this->recipientLinkText= " ($recipient->p_email)";
    }

%%header%%


%%css%%


%%template%%
<tt>
<p><b>To email this letter, copy the following text to your clipboard, then<br>
$this->recipientLink</b> $this->recipientLinkText</p>
<hr height=1 noshade>
<p>Dear $this->recipientSalutation,</p>
$this->p_letter
<p>Sincerely,<br>
$sitemember->name</p>
<p>&nbsp;</p>
<p>PS: There more information on this issue at $this->baseUrl</p>
<hr height=1 noshade>
</tt>

%%listrow%%
 

%%nullobject%%
 

%%footer%%


%%postprocess%%


%%end of context%%

 
