%%sitemember-view-editor-html%%
2002-07-18 22:33

%%preprocess%%
//look up the member's email?
$query= "SELECT obj.email FROM member AS obj WHERE obj.id='$this->memberid' ";
$member= new Member;
$member->selectObject($query);
$this->email= $member->email;

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

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

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


// if no headline, create one
if ($this->headline=="" && $this->role=="member") $this->headline= "A Member";
elseif ($this->headline=="") $this->headline= "An $this->role";

// if no bio or mission...
if ($this->description=="") $this->description= "Standard mission.";
if ($this->body=="") $this->body= "Classified.";

// editing twirlies
if ($sitemember->role=="admin" || $this->role=="member" || $this->sitememberid==$sitemember->id ) {
	$this->editTag= "<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> |";
	}
else $this->editTag= "You may not edit this sitemember. |";

// allow member to update email or password
if ($this->id==$sitemember->id) {
	$this->passwordTag= "<a href='$this->idUrl?method=updatemember$session->cgi'>change your email address or password</a><br><br>";
	}


%%header%%



%%css%%


%%template%%
<table class='objTable' cellspacing=5 cellpadding=5>
	<tr>
		<td>
			<table class='objHeader'>
				<tr>
					<td width='1' valign='middle'>$this->iconTag</td>
					<td>
						<span class='objFlavor'>$this->headline:<br></span>
						<span class='objTitle'>$this->name</span>
						<span class='objByline'> <br> 
							Since $this->dateTag. <img src='/bicons/event.png' alt='updated $this->updated' title='created $this->created - updated $this->updated' align=absmiddle border=0></span>
					</td>
				</tr>
			</table>
			<p align="right" class='info'> 
				<a href="$this->idUrl?method=edit$session->cgi"><img src='/bicons/edit.png' alt='edit' title='edit this object' align=absmiddle border=0></a>
				<a href="$this->idUrl?method=edit$session->cgi">edit</a> |
				<a href="$this->idUrl?method=pickup$session->cgi"><img src='/bicons/pickup.png' alt='pick up' title='pick up this object' align=absmiddle border=0></a>
				<a href="$this->idUrl?method=pickup$session->cgi">pick up</a>&nbsp;
			</p>
		</td>
	</tr>
</table>
<table border=0>
	<tr>
		<td width='1%'><img src='/bicons/spacer.png' border=0 alt=sitemember width=20 height=1></td>
		<td width='98%'>$this->passwordTag &nbsp;</td>
		<td width='1%'><img src='/bicons/spacer.png' border=0 alt=sitemember width=20 height=1></td>
	</tr>
	<tr>
		<td>&nbsp;</td>
		<td class='objBody'>
			<p><b>Email Address:</b> $this->email</p>
			<p><b>Role/Rank:</b> $this->role / $this->rank</p>
			<p><b>Mission:</b> $this->description</p>
			<b>Bio:</b> $this->body
			<p>&nbsp;</p>
		</td>
		<td>&nbsp;</td>
	</tr>
</table>


%%listrow%%
 

%%nullobject%%
<p><img src='/bicons/warning.png' alt='Warning' align=left><br>
	<b>The sitemember you requested was not found.</b></p>
<p><a href='$session->scriptname$folder->name/sitemember-.html?method=listall$session->cgi'>Here is a list</a> of all the sitemembers in this folder.</p> 


%%footer%%


%%postprocess%%


%%end of context%%
