class BaseOutbox extends MyManager { public function __construct($class = 'Message') { parent::__construct($class); } public function initSearchPage() { $this->assertLogin(); parent::initSearchPage(); $this->pageTitle = 'Outbox'; } protected function getSearchFrom($params) { $from = "FROM {$this->object->outboxTable} b\n"; $from .= "INNER JOIN {$this->object->tableName} o\n"; $from .= "ON o.id = b.message_id\n"; return $from; } protected function getSearchWhere($params) { global $me; $where = parent::getSearchWhere($params); $where .= " AND b.user_id = '$me->id'\n"; return $where; } public function drawRows($rs) { if (count($rs)) { echo "
\n"; } } public function getPagesXml() { $xml = parent::getPagesXml(); $xml .= "