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

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

// 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="
		<p align='center'> 
			<a href='$folder->baseUrl$this->objtype-.html?method=listall&listrank=0&listthisfolder=$folder->id$session->cgi'>$folder->title scene archive</a>
		</p>";
	}


if ($this->itemEditor || $this->itemOwner) {
	// how many fames?
	$query= "SELECT COUNT(obj.id) FROM comment AS obj WHERE obj.parentobjtype='$this->objtype' AND obj.parentid='$this->id' AND obj.flavor='Frame' $session->statuswhere $session->publicwhere";
	if ($result=@mysql_query($query)) {
		$commentTotal= mysql_fetch_row($result);
		$this->commentTotal= $commentTotal[0]." ";
		if ($this->commentTotal==0) $this->commentTotal="0";
		}
	$this->editorControls= "
		$this->commentTotal frames |
		<a href='$this->baseUrl?method=toggleRank&return=$object->baseUrl'><img src='/bicons/bulbsgif/$this->glow.gif' alt='$this->publishStatus' title='document:$this->id is $this->publishStatus' align=absmiddle border=0></a> |
		<a href='$this->baseUrl?method=edit$session->cgi'><img src='/bicons/edit.gif' alt='edit' title='edit this object' align=absmiddle border=0></a> |
		<a href='$this->baseUrl?method=pickup$session->cgi'><img src='/bicons/pickup.gif' alt='pick up' title='pick up this object' align=absmiddle border=0></a>
		";
	}
 
%%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='objTitle'><a href="$this->baseUrl" title='$this->description'>$this->title</a></span>
						<span class='objByline'> <br>
							By $this->authorTag on $this->dateTag. $this->folderTag</span>
					</td>
					<td align='right' valign='bottom' class='info'>
						$this->editorControls
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>



%%listrow%%
 



%%nullobject%%
 



%%footer%%
$this->archiveTag


%%postprocess%%



%%end of context%%
