%%comment-delete-member-html%%
2002-07-21 17:17

%%preprocess%%
$this->getBaseUrl();

if (($sitemember->id==$this->sitememberid && $sitemember->id!=0 && $this->status!="deleted") || $sitemember->role=="editor" || $sitemember->role=="admin") {
	switch (true) {
		case ($this->status=="deleted") :
			$this->status= "posted";
			break;
		
		case ($this->status!="deleted") : 
			$this->status= "deleted";
			break;
		}
	if ($sitemember->role=="member") {
		$session->updatestatus= "deleted";
		$GLOBALS['session']= $session;
		}
	$this->updateObject();
	$GLOBALS['session']->applyPolicy();
	}
else {
	berror("Sorry, you may not delete someone else's comment.",0);
	exit;
	}

%%header%%

%%css%%

%%template%%
Deleted $this->objtype:$this->id ($this->title).<br>
<a href="$this->idUrl?method=view$session->cgi">Continue</a>...

%%listrow%%

%%nullobject%%

%%footer%%

%%postprocess%%
$parent= $this->getParent();
$parent->getRuntimeVars();
if (!$GLOBALS['debug']) {
	header("Location: $parent->baseUrl?method=view$session->cgi");
	print "Redirecting to $parent->baseUrl now.";
	}
else print "Redirecting to $parent->baseUrl now.";

%%end of context%%