1
0

BxQuoteOfDayDb.php 971 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) UNA, Inc - https://una.io
  4. * MIT License - https://opensource.org/licenses/MIT
  5. *
  6. * @defgroup QuoteOfTheDay Quote of the Day
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. bx_import('BxDolModuleDb');
  12. class BxQuoteOfDayDb extends BxBaseModGeneralDb
  13. {
  14. function __construct(&$oConfig)
  15. {
  16. parent::__construct($oConfig);
  17. }
  18. public function getHiddenItemsCount()
  19. {
  20. $CNF = &$this->_oConfig->CNF;
  21. $sSql = $this->prepare("SELECT COUNT(*) FROM " . $CNF['TABLE_ENTRIES'] . " WHERE " . $CNF['FIELD_STATUS'] . "!='active'");
  22. return $this->getOne($sSql);
  23. }
  24. public function getData()
  25. {
  26. $CNF = &$this->_oConfig->CNF;
  27. return $this->getColumn("SELECT `" . $CNF['FIELD_TEXT'] . "` FROM " . $CNF['TABLE_ENTRIES'] . " WHERE " . $CNF['FIELD_STATUS'] . "='active'");
  28. }
  29. }
  30. /** @} */