BxNexusAlerts.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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 Nexus Nexus - Mobile Apps and Desktop apps connector
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. class BxNexusAlerts extends BxDolAlertsResponse
  12. {
  13. protected $_oModule;
  14. function __construct()
  15. {
  16. parent::__construct();
  17. }
  18. public function response($o)
  19. {
  20. if (getParam('bx_nexus_option_custom_homepage') && 'system' == $o->sUnit && 'page_output' == $o->sAction && 'sys_home' == $o->aExtras['page_name'] && !isLogged() && false !== strpos($_SERVER['HTTP_USER_AGENT'], 'UNAMobileApp')) {
  21. // require_once(BX_DIRECTORY_PATH_INC . "design.inc.php");
  22. $sLoginForm = BxDolService::call('system', 'login_form', array('ajax_form'), 'TemplServiceLogin');
  23. $oTemplate = BxDolTemplate::getInstance();
  24. $oTemplate->setPageNameIndex (BX_PAGE_DEFAULT);
  25. $oTemplate->setPageContent ('page_main_code', DesignBoxContent('', $sLoginForm, BX_DB_PADDING_NO_CAPTION));
  26. $oTemplate->getPageCode();
  27. exit;
  28. }
  29. }
  30. }
  31. /** @} */