%%editor%%
2002-11-08 10:07

%%prequery%%
if ($this->statuswhere=="" && $session->p_showDeleted==1) $this->statuswhere= " AND obj.status LIKE '%'  "; 
elseif ($this->statuswhere=="") $this->statuswhere= " AND obj.status!='deleted' "; 
if ($this->statusfolder=="") $this->statusfolder= " AND folder.status!='deleted' ";
if ($this->publicwhere=="") $this->publicwhere= " AND obj.public LIKE '%' ";
if ($this->publicfolder=="") $this->publicfolder= " AND folder.public LIKE '%' ";
if ($this->insertstatus=="") $this->insertstatus= "posted";
if ($this->insertpublic=="") $this->insertpublic= "1";
if ($this->insertrank=="") $this->insertrank= "100";
$this->updatestatus= "";
$this->updatepublic= "";
$this->updaterank= "";
if ($this->orderby!= "") {
	// do nothing
	}
elseif ($getvars[orderby]!="") {
	if ($getvars[direction]!="") $direction= strtoupper(addslashes($getvars[direction]));
	$orderby= strtoupper(addslashes($getvars[orderby]));
	$this->orderby= "ORDER BY obj.$orderby $direction";
	}
else $this->orderby= "ORDER BY obj.id ASC";
if ($getvars[limit]!="") {
	$offset= strtoupper(addslashes($getvars[offset]));
	$limit= strtoupper(addslashes($getvars[limit]));
	if ($offset!="") $this->limit= "LIMIT $offset, $limit ";
	else $this->limit= "LIMIT $limit ";
	}
else $this->limit= "LIMIT 30 ";

%%addons%%
berror("<b>Ownership?</b> does $object->sitememberid == $sitemember->id?",1);
if ($object->sitememberid==$sitemember->id) { 
	$this->itemOwner=="1";
	berror("<b>Sitemember owns this object...</b>",1);
	}
$this->itemEditor=1;
$this->canAddChild=1;
$this->canSave[all]=1;
$this->canSavenew[all]=1;

%%end of policy%%
