options.php 959 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * Copyright (c) UNA, Inc - https://una.io
  4. * MIT License - https://opensource.org/licenses/MIT
  5. *
  6. * @defgroup UnaEndAdmin UNA Studio End Admin Pages
  7. * @ingroup UnaStudio
  8. * @{
  9. */
  10. require_once('./../inc/header.inc.php');
  11. require_once(BX_DIRECTORY_PATH_INC . 'design.inc.php');
  12. require_once(BX_DOL_DIR_STUDIO_INC . 'utils.inc.php');
  13. bx_import('BxDolLanguages');
  14. bx_require_authentication(true);
  15. $sType = bx_get('type');
  16. $sType = $sType !== false ? bx_process_input($sType) : '';
  17. $mixedCategory = '';
  18. if(($mixedCategory = bx_get('category')) !== false)
  19. $mixedCategory = bx_process_input($mixedCategory);
  20. if(!$mixedCategory && ($mixedCategory = bx_get('categories')) !== false)
  21. $mixedCategory = bx_process_input($mixedCategory);
  22. $oOptions = new BxTemplStudioOptions($sType, $mixedCategory);
  23. if(($mixedResult = $oOptions->checkAction()) !== false) {
  24. echoJson($mixedResult);
  25. exit;
  26. }
  27. echo $oOptions->getCode();
  28. /** @} */