xmlpage.class.inc.php 987 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. require_once("../application/webpage.class.inc.php");
  3. /**
  4. * Simple web page with no includes or fancy formatting, useful to generateXML documents
  5. * The page adds the content-type text/XML and the encoding into the headers
  6. */
  7. class XMLPage extends web_page
  8. {
  9. function __construct($s_title)
  10. {
  11. parent::__construct($s_title);
  12. $this->add_header("Content-type: text/xml; charset=utf-8");
  13. $this->add_header("Cache-control: no-cache");
  14. $this->add_header("Content-location: export.xml");
  15. $this->add("<?xml version=\"1.0\" encoding=\"UTF-8\"?".">\n");
  16. }
  17. public function output()
  18. {
  19. $this->add_header("Content-Length: ".strlen(trim($this->s_content)));
  20. foreach($this->a_headers as $s_header)
  21. {
  22. header($s_header);
  23. }
  24. echo trim($this->s_content);
  25. }
  26. public function small_p($sText)
  27. {
  28. }
  29. public function table($aConfig, $aData, $aParams = array())
  30. {
  31. }
  32. }
  33. ?>