game = $game; $this->players = $game->getLib('beta5/player'); } function getSender() { return 'Military Advisor'; } function getSLink() { return ""; } function getRecipient() { $pinf = $this->players->call('getName', $this->player); return utf8entities($pinf); } function getRLink() { return ""; } function getSubject() { switch ($this->data['status']) : case 'TAKE': $s = "We have taken control of "; break; case 'LOSE': $s = "We have lost control of "; break; case 'VIEW': $s = "Owner change on "; break; endswitch; $s .= utf8entities($this->data['p_name']); return $s; } function getReplyLink() { return ""; } function getContents() { $planet = ''.utf8entities($this->data['p_name']).""; switch ($this->data['status']) : case 'TAKE': $s = "Sir! We have seized control of planet $planet"; if (!is_null($this->data['owner'])) { $pid = $this->data['owner']; $pn = utf8entities($this->players->call('getName', $pid)); $s .= " from the clutches of $pn, " . "its former owner"; } else { $s .= " from the local (lack of) government."; } $s .= "."; break; case 'LOSE': $pid = $this->data['owner']; $pn = utf8entities($this->players->call('getName', $pid)); $s = "We have lost control of planet $planet, which was taken from us by " . "$pn."; break; case 'VIEW': $pid = $this->data['owner']; $pn = utf8entities($this->players->call('getName', $pid)); $s = "Sir! Our forces orbitting $planet report that " . "$pn has taken " . "control of the planet."; break; endswitch; return $s; } } ?>