%%document-index-anonymous-html%%
2002-07-21 14:10

%%preprocess%%
// format the object for display
$this->beryliumToHtml(); 
$this->getRuntimeVars();

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

// headline fix if only title
if ($this->title=="" && $this->headline=="") $this->title= "Untitled ($this->name)";
elseif ($this->title=="") $this->title= $this->headline;

// more tag if body exists
if ($this->body!="") $this->moreTag="<a href='$this->baseUrl'>full document</a> &raquo; |";

// alternating rows
$session=$GLOBALS[session];
if ($session->row=="" || $session->row=="odd") {
	$this->rowclass="oddrow";
	}
else {
	$this->rowclass="evenrow";
	}
	
// show folder link?
if ($folder->id != $this->folderid) $this->folderTag= bparsebml(", in [folder:$this->folderid]");
	
// show archive link?
if ($folder->rank<=500) {
	$this->archiveTag="
		<table class='objTable' cellspacing=5 cellpadding=5>
			<tr>
				<td align='center'>
					<a href='$folder->baseUrl$this->objtype-.html?method=listall&listranksign=<$session->cgi'>$folder->title $this->objtype archive</a>
				</td>
			</tr>
		</table>";
	}
	
// how many comments?
$query= "SELECT COUNT(obj.id) FROM comment AS obj WHERE obj.parentobjtype='$this->objtype' AND obj.parentid='$this->id' $session->statuswhere $session->publicwhere";
if ($result=@mysql_query($query)) {
	$commentTotal= mysql_fetch_row($result);
	$this->commentTotal= $commentTotal[0]." ";
	if ($this->commentTotal==0) $this->commentTotal="";
	}

 
%%header%%



%%css%%



%%template%%
<table class='objTable' cellspacing=5 cellpadding=5>
	<tr class='$this->rowclass'>
		<td>
			<table class='objHeader'>
				<tr>
					<td width='1' valign='middle'>$this->iconTag</td>
					<td>
						<span class='objFlavor'>$this->flavor:<br></span>
						<span class='objTitle'><a href="$this->baseUrl">$this->title</a>
						<span class='objByline'> <br> 
							By $this->authorTag on $this->dateTag$this->folderTag.</span>
					</td>
				</tr>
			</table>
			<blockquote class='objDescription'>$this->description</blockquote>
			<p align="right" class='info'>$this->moreTag 
				<a href='$this->baseUrl#comments'><img src='/bicons/comment.png' alt='' title='view/add comments' align=absmiddle border=0></a> 
				<a href='$this->baseUrl#comments'>$this->commentTotal<!-- -->comments</a> 
			</p>
		</td>
	</tr>
</table>



%%listrow%%
 



%%nullobject%%
 



%%footer%%
$this->archiveTag


%%postprocess%%



%%end of context%%
