form.php 819 B

1234567891011121314151617181920212223242526272829
  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. require_once(BX_DIRECTORY_PATH_INC . "utils.inc.php");
  12. bx_import('BxDolLanguages');
  13. $sObject = bx_process_input(bx_get('o'));
  14. $sDisplay = bx_process_input(bx_get('d'));
  15. $sAction = bx_process_input(bx_get('a'));
  16. if(!empty($sAction))
  17. $sAction = 'performAction' . bx_gen_method_name($sAction);
  18. // try to create form object and call its method
  19. if(!empty($sObject) && !empty($sDisplay) && !empty($sAction)) {
  20. $oForm = BxTemplFormView::getObjectInstance($sObject, $sDisplay);
  21. if($oForm && method_exists($oForm, $sAction))
  22. $oForm->$sAction();
  23. }
  24. /** @} */