00001 <?
00010 class XMLTemplate extends BaseTemplate
00011 {
00015 public function drawPage()
00016 {
00017
00018 header("Content-type: text/xml; charset=UTF-8");
00019
00020
00021 echo '<?xml version="1.0" encoding="ISO-8859-1"?>' . "\n";
00022 echo "<!-- generator=\"BaseJumper v2\" -->\n";
00023
00024
00025 if ($this->object->hasError())
00026 $this->drawError();
00027
00028 else if ($this->object->hasStatus())
00029 $this->drawStatus();
00030
00031 else
00032 $this->drawContent();
00033 }
00034
00035 public function drawError()
00036 {
00037 echo "<error>" . htmlentities($this->object->getError()) . "</error>";
00038 }
00039
00040 public function drawStatus()
00041 {
00042 $status = $this->object->getStatus();
00043
00044 foreach ($status AS $msg)
00045 echo "<status>" . htmlentities($msg) . "</status>\n";
00046 }
00047 }
00048 ?>