get($this->person_id); return $c; } function object() { $c = DB_DataObject::factory($this->ontable); $c->autoJoin(); if ($c->get($this->onid)) { return $c; } return false; } function event() { $c = DB_DataObject::factory('Events'); if ($c->get($this->event_id)) { return $c; } return false; } function delivered() { return !empty($msgid); } function status() // used by commandline reporting at present.. { switch($this->event_id) { case -1: return 'DELIVERED'; case 0: return 'PENDING'; default: return $this->event()->remarks; } } }