1
0

BxDolStudioFormsPreValues.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 TridentStudio Trident Studio
  7. * @{
  8. */
  9. define('BX_DOL_STUDIO_FIELD_PRE_VALUE_INT_MAX', round(log(BX_DOL_INT_MAX, 2)));
  10. class BxDolStudioFormsPreValues extends BxTemplStudioGrid
  11. {
  12. protected $sModule;
  13. protected $sList;
  14. public function __construct ($aOptions, $oTemplate = false)
  15. {
  16. parent::__construct ($aOptions, $oTemplate);
  17. $this->oDb = new BxDolStudioFormsQuery();
  18. $sModule = bx_get('module');
  19. if(!empty($sModule)) {
  20. $this->sModule = bx_process_input($sModule);
  21. $this->_aQueryAppend['module'] = $this->sModule;
  22. }
  23. $sList = bx_get('list');
  24. if(!empty($sList)) {
  25. $this->sList = bx_process_input($sList);
  26. $this->_aQueryAppend['list'] = $this->sList;
  27. }
  28. }
  29. protected function _getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage)
  30. {
  31. if(empty($this->sList))
  32. return array();
  33. $this->_aOptions['source'] .= $this->oDb->prepareAsString(" AND `Key`=? ", $this->sList);
  34. return parent::_getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage);
  35. }
  36. }
  37. /** @} */