%%folder-view-editor-html%%
2002-06-21 21:54

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

// folder only-- force https for editors
if ($session->request->connection!="https") {
	 $newlocation= "https://$site->name$session->refreshURL";
	 berror("Editors connect via SSL. Trying to redirect to $newlocation.",1);
	 header("Location: $newlocation");
	 exit;
	 }
 
 // format the object for display
$this->beryliumToHtml(); 
$this->timeFormat();
$this->getBackPath();

// folder-only admin header
if ($sitemember->role=="admin") {
 $this->adminheader= " | <img src='/bicons/contexts.png' border=0 alt='contexts and policies' title='contexts and ploicies' align=middle>&nbsp;<a href='$folder->baseURL/context-.html?method=view$session->cgi'>context</a>/<a href='$folder->baseURL/policy-.html?method=view$session->cgi'>policy</a> "; 
 }

// folder-only login info
$this->loginfooter= "Prepared for <a href='$site->baseUrl/sitemember-$sitemember->id.html'>$sitemember->name</a>. ";
$this->loginfooter.= " Your role here is $sitemember->role. ";
$this->loginfooter.= "<a href='$refreshURL?method=logout$session->cgi'>Log Out</a>.&nbsp;";

// get proper icon for private object/folder
if (!$object->public) $object->iconpvt= "-pvt";
if (!$this->public) $this->iconpvt= "-pvt";
else $this->ispublic= "| <b>This item is public</b>";

// folder-only edit/view object button
if ($object->id && $session->request->method!="edit") {
	$this->switchview= "<a href='$refreshURL?method=edit$session->cgi'><img src='/bicons/$object->objtype$object->iconpvt.png' border=0 alt='edit $object->objtype' title='edit $object->objtype #$object->id' align=middle></a>&nbsp;<a href='$refreshURL?method=edit$session->cgi'>edit this $object->objtype</a>";
	}
elseif ($object->id) {
	$this->switchview= "<a href='$refreshURL?method=view$session->cgi'><img src='/bicons/$object->objtype$object->iconpvt.png' border=0 alt='view $object->objtype' title='view $object->objtype #$object->id' align=middle></a>&nbsp;<a href='$refreshURL?method=view$session->cgi'>view this $object->objtype</a>";
	}

// folder-only cancel button
if ($session->request->method!="view" && $session->request->method!="listall") {
	$this->cancelTag= "<a href='$object->baseUrl?method=view$session->cgi'><img src='/bicons/cancel.png' border=0 alt='' title='cancel' align=middle></a>&nbsp;<a href='$object->baseUrl?method=view$session->cgi'>cancel</a>";
	}
elseif ($object->objtype!="folder" || $session->request->method=="listall") {
	$this->cancelTag= "<a href='$this->baseUrl?method=view$session->cgi'><img src='/bicons/folder-open.png' border=0 alt='' title='parent folder' align=middle></a>&nbsp;<a href='$this->baseUrl?method=view$session->cgi'>$this->title</a>";
	}
else {
	$this->cancelTag= "<a href='".$containers[1]->baseUrl."?method=view$session->cgi'><img src='/bicons/folder-open.png' border=0 alt='' title='parent folder' align=middle></a>&nbsp;<a href='$this->baseUrl?method=view$session->cgi'>$this->title</a>";
	}
	
// show sitemember if no author defined
if ($this->author== "") $this->author="sitemember:$this->sitememberid";

// show default icon or alt icon from imageid
if ($this->imageid!="0") $this->iconTag= bparsebml("[image:$this->imageid;100,100;right]");
else $this->iconTag= "<img src='/bicons/folder$this->iconpvt.png' border=0 alt='folder:$this->id' title='folder:$this->id' align=right hspace=10 vspace=10>";



%%header%%
<table>
	<tr> 
		<td width=70%>
			<span class='folderFlavor'><a href='http://$site->name'>http://$site->name</a><a href='$site->baseURL'>/berylium</a> $this->backpath <br></span>
			<span class='folderTitle'><span class='siteTitle'>$site->title:</span> $folder->title<br> </span>
			<span class='buttons'>
			<img src='/bicons/folders.png' border=0 alt='folders' title='folders' align=middle>&nbsp;<a href='$site->baseURL/folder-.html?method=listall$session->cgi'>folders</a> |
			<img src='/bicons/documents.png' border=0 alt='documents' title='documents' align=middle>&nbsp;<a href='$site->baseURL/document-.html?method=listall$session->cgi'>documents</a> |
			<img src='/bicons/images.png' border=0 alt='images' title='images' align=middle>&nbsp;<a href='$site->baseURL/image-.html?method=listall$session->cgi'>images</a> |
			<img src='/bicons/sitemembers.png' border=0 alt='site members' title='site members' align=middle>&nbsp;<a href='$site->baseURL/sitemember-.html?method=listall$session->cgi'>members</a>
			$this->adminheader </span>
		</td>
		<td width=30%>$this->loginfooter</td>
	</tr>
	<tr> 
		<td colspan=2 align='center' class='buttons'>
				$this->switchview |
				<a href='$session->refreshURL'><img src='/bicons/refresh.png' border=0 alt='' title='refresh page' align=middle></a>&nbsp;<a href='$session->refreshURL'>refresh</a> | 
				$this->cancelTag | 
				<a href='#bottom'>bottom of page</a>
				&nbsp; &nbsp; 
		</td>
	</tr>
</table>
<table>
	<tr>
		<td valign='top' width='20%' class='navigationcell'>
			{list:SELECT obj.* FROM folder AS obj, folder WHERE obj.rank>=100 AND obj.siteid='$site->id' AND obj.status='posted' AND folder.id=obj.folderid AND obj.name!='/'  AND obj.folderid='$site->folderid' $session->publicwhere ORDER BY obj.rank DESC;navbar}
			<hr>
			<table class='foldertable'>
				<tr>
					<td>
						<img src='/bicons/folder.png' border=0 alt='new folder' title='new folder' align=middle>&nbsp;<a href='$session->scriptname$folder->name/folder-.html?method=create$session->cgi'>new folder</a><br>
					</td>
				</tr>
				<tr>
					<td>
						<img src='/bicons/document.png' border=0 alt='new document' title='new document' align=middle>&nbsp;<a href='$session->scriptname$folder->name/document.html?method=create$session->cgi'>new document</a><br>
					</td>
				</tr>
				<tr>
					<td>
						<img src='/bicons/image.png' border=0 alt='new image' title='new image' align=middle>&nbsp;<a href='$session->scriptname$folder->name/image-.html?method=create$session->cgi'>new image</a><br>
					</td>
				</tr>
				<tr>
					<td>
						<img src='/bicons/sitemember.png' border=0 alt='new site member' title='new site member' align=middle>&nbsp;<a href='$session->scriptname/sitemember-.html?method=create$session->cgi'>new member</a><br>
					</td>
				</tr>
			</table>
		</td>
		<td valign='top' width='80%' class='contentcell'>
<!-- begin object content -->



%%css%%
.foldertable td { border: 0px; border-style: none; border-color: #666688; }
.navigationcell { border: 0px; margin: 0px; border-style: none; }
.navigationcell hr { height: 1px; width: 96%; color: #006699; }
.contentcell { border: 1px; margin:0px; border-style: solid; border-color: #006699; }
.buttons {font-size: 12px; line-height: 32px; color: #999999; }
.buttons b {font-size: 12px; color: #aa9999; font-weight: bold; }

.folderInfo {font-size: 12px; color: #999999; }
.folderInfo b {font-size: 12px; color: #aa9999; font-weight: bold; }
.folderTable TD {padding: 0px; margin: 0px; }
.folderFlavor {font-size: 12px; }
.folderTitle {font-size: 18px; line-height: 24px; font-weight: bold; color: #006699; }
.folderHeadline {font-size: 18px; line-height: 24px; font-weight: bold; color: #006699; }
.folderByline {font-face: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 12px; color: green; }
.folderBody {font-size: 12px; line-height: 18px; }



%%template%%
$this->iconTag
<span class='folderHeadline'>$this->headline</span><span class="folderByline"><br>
	By $this->author on $this->created.</span><span class="folderInfo"><br>
	status: $this->status | rank: $this->rank $this->ispublic<br>&nbsp;<br></span>
<span class='folderBody'>$this->body<br>&nbsp;<br></span>
{index:document;index}
{index:image;index}
<p align="right"><img src='/bicons/news.png' border=0 alt='RSS Feed Link' title='RSS Feed Link' align=middle>&nbsp;<a href='$folder->baseUrl$folder->objtype-$folder->id.rdf'>Folder as RSS</a></p>


%%listrow%%
 



%%nullobject%%
 <p><img src='/bicons/warning.png' alt='Warning' align=left><br>
	<b>The folder you requested was not found.</b></p>
<p>Please see the <a href='$site->baseUrl'>site homepage</a> or choose one of the folders at left. Thanks!</p>




%%footer%%
<!-- end object content -->
		</td>
	</tr>
</table>
<a name='bottom'></a>
<table>
	<tr> 
		<td align='center'>
			<a href='$session->refreshURL'><img src='/bicons/refresh.png' border=0 alt='' title='refresh page' align=middle></a>&nbsp;<a href='$session->refreshURL'>refresh</a> | 
			$this->cancelTag | 
			<a href='#top'>top of page</a>
			<p align='right'>$this->loginfooter</p>
		</td>
	</tr>
</table>



%%postprocess%%



%%end of context%%
