BxBasePrivacy.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
  4. * CC-BY License - http://creativecommons.org/licenses/by/3.0/
  5. *
  6. * @defgroup TridentCore Trident Core
  7. * @{
  8. */
  9. bx_import('BxDolPrivacy');
  10. /**
  11. * Privacy representation.
  12. * @see BxDolPrivacy
  13. */
  14. class BxBasePrivacy extends BxDolPrivacy
  15. {
  16. protected $_oTemplate;
  17. public function __construct ($aOptions, $oTemplate)
  18. {
  19. parent::__construct ($aOptions);
  20. if ($oTemplate)
  21. $this->_oTemplate = $oTemplate;
  22. else
  23. $this->_oTemplate = BxDolTemplate::getInstance();
  24. }
  25. protected function _addJsCss()
  26. {
  27. /*
  28. $this->_oTemplate->addJs('BxDolGrid.js');
  29. $this->_oTemplate->addCss('grid.css');
  30. */
  31. }
  32. protected function _echoResultJson($a, $isAutoWrapForFormFileSubmit = false)
  33. {
  34. header('Content-type: text/html; charset=utf-8');
  35. $s = json_encode($a);
  36. if ($isAutoWrapForFormFileSubmit && !empty($_FILES))
  37. $s = '<textarea>' . $s . '</textarea>';
  38. echo $s;
  39. }
  40. }
  41. /** @} */