You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
1.0 KiB

7 years ago
  1. <?php
  2. defined('BASEPATH') OR exit('No direct script access allowed');
  3. /*************************************************************
  4. * Class HookPreController
  5. ************************************************************/
  6. class HookPreController {
  7. /*********************************************************
  8. * 컨트롤러가 호출되기 직전에 실행합니다.
  9. ********************************************************/
  10. function init()
  11. {
  12. $this->page_define();
  13. }
  14. /**********************************************************
  15. * 현재페이지를 정의합니다.
  16. **********************************************************/
  17. function page_define()
  18. {
  19. $uri =& load_class('URI', 'core');
  20. $seg = $uri->segment(1);
  21. define("PAGE_ADMIN", strtoupper($seg) === 'ADMIN');
  22. define("PAGE_INSTALL", strtoupper($seg) === 'INSTALL');
  23. define("PAGE_AJAX", !empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtoupper($_SERVER['HTTP_X_REQUESTED_WITH']) == 'XMLHTTPREQUEST' );
  24. }
  25. }