ajax.php 892 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  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 DolphinEndAdmin Dolphin Studio End Admin Pages
  7. * @ingroup DolphinStudio
  8. * @{
  9. */
  10. require_once('./../inc/header.inc.php');
  11. require_once(BX_DIRECTORY_PATH_INC . 'design.inc.php');
  12. require_once(BX_DIRECTORY_PATH_PLUGINS . 'Services_JSON.php');
  13. bx_import('BxDolLanguages');
  14. check_logged();
  15. if (!isAdmin())
  16. exit;
  17. $aResult = array();
  18. switch(bx_get('action')) {
  19. case 'page-bookmark':
  20. $sPage = bx_process_input(bx_get('page'));
  21. bx_import('BxDolStudioPage');
  22. $oPage = new BxDolStudioPage($sPage);
  23. $aResult = $oPage->bookmark();
  24. break;
  25. }
  26. header('Content-Type:text/javascript');
  27. $oJson = new Services_JSON();
  28. echo $oJson->encode($aResult);
  29. /** @} */