%%document-view-anonymous-html%%
roots.encielo.org : /recipients
2002-08-16 11:38: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");
	}

// convert generic flavor to objtype:
if ($this->flavor=="Generic") $this->flavor= "Document";

// show sitemember if no author defined, show sitename if no sitemember found...
if (trim($this->author)== "") $this->author= bparsebml("[sitemember:$this->sitememberid]");
if (trim($this->author)== "") $this->author= $site->title;

// determine dateTag
if ($this->p_originaldate) {
	$origdate= mysql_timestamp($this->p_originaldate);
	$this->originaldate= date("l, F j, Y", $origdate);
	$this->dateTag= $this->originaldate;
	}
else $this->dateTag= $this->created;
	
	
// compile publishStatus ( like: public-posted-100 ) and glow
switch (true) {
	case ($this->rank < 100) : 
		$lightrank= 50;
		break;	
	case ($this->rank < 500) :
		$lightrank= 100;
		break;
	case ($this->rank < 1000) :
		$lightrank= 500;
		break;
	case ($this->rank >= 1000) :
		$lightrank= 1000;
		break;
	}
if ($this->public) {
	$this->publishStatus= "public-$this->status-$this->rank";
	$this->glow= "public-$this->status-$lightrank";
	}
else {
	$this->publishStatus= "private-$this->status-$this->rank";
	$this->glow= "private-$this->status-$lightrank";
	$this->iconpvt= "-pvt";
	}
if ($this->status=="deleted") $this->glow= "deleted";

// show default icon or alt icon from imageid
if ($this->imageid!="0") {
	$this->iconTag= bparsebml("[icon:$this->imageid;document:$this->id]");
	}
else $this->iconTag= "<img src='/bicons/document$this->iconpvt.png' border=0 alt='document:$this->id' title='document:$this->id'><br>&nbsp;";

// special edit tag for owner
if ($this->sitememberid==$sitemember->id OR ($sitemember->role=="editor" OR $sitemember->role=="admin")) {
    $this->idTag= " (document:$this->id) ";
    $this->editTag= "<br><br><a href='$this->baseUrl?method=edit$session->cgi'><img src='/bicons/edit.png' align=middle border=0></a>&nbsp;You 
	    may <a href='$this->baseUrl?method=edit$session->cgi'>edit</a> this recipient...";
    }

%%header%%


%%css%%


%%template%%
<tt>
<font size='+2'><b>$this->p_salutation $this->title</b></font> ($this->p_category)<br>
<br>
As of $this->updated $this->idTag
$this->editTag</tt>
<br>
<br>
<tt>
$this->description, $this->p_location
<br>
<br>
$this->body
<br>
<br>&nbsp;
</tt>
<hr>
<tt>
<b>Email address:</b> <a href='mailto:$this->p_email'>$this->p_email</a>
<br>
<br>
<b>Website:</b> <a href='$this->p_website'>$this->p_website</a>
<br>
<br>
<b>Fax Number:</b> $this->p_fax
<br>
<br>
<b>Mailing address:</b>
<blockquote>
$this->p_salutation $this->p_givenname $this->p_surname<br>
$this->p_mail
</blockquote>
</tt>
<hr>
<tt>
<br>
<br>
<b>Comments:</b><br>
</tt>
<tt>
{list:SELECT obj.* FROM comment AS obj WHERE obj.siteid='$site->id' AND obj.parentobjtype='document' AND obj.parentid='$this->id' $this->statuswhere $this->publicwhere ORDER BY obj.created ASC;list}
</tt>

%%listrow%%
 

%%nullobject%%
 

%%footer%%


%%postprocess%%


%%end of context%%

 
