searchKeywordContent.php 847 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /**
  3. * Copyright (c) UNA, Inc - https://una.io
  4. * MIT License - https://opensource.org/licenses/MIT
  5. *
  6. * @defgroup UnaCore UNA Core
  7. * @{
  8. */
  9. require_once('./inc/header.inc.php');
  10. require_once(BX_DIRECTORY_PATH_INC . "design.inc.php");
  11. bx_import('BxDolLanguages');
  12. $sClass = 'BxDolSearch';
  13. if(BxDolModuleQuery::getInstance()->isEnabledByName('bx_elasticsearch')) {
  14. $oModule = BxDolModule::getInstance('bx_elasticsearch');
  15. bx_import('Search', $oModule->_aModule);
  16. $sClass = 'BxElsSearch';
  17. }
  18. $o = new $sClass(bx_get('section'));
  19. $o->setLiveSearch(bx_get('live_search') ? 1 : 0);
  20. $o->setMetaType(bx_process_input(bx_get('type')));
  21. $o->setCategoryObject(bx_process_input(bx_get('cat')));
  22. $s = $o->response();
  23. if (!$s)
  24. $s = $o->getEmptyResult();
  25. header('Content-type: text/html; charset=utf-8');
  26. echo $s;
  27. /** @} */