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.

25 lines
655 B

7 years ago
  1. <?php
  2. defined('BASEPATH') OR exit('No direct script access allowed');
  3. class Content extends WB_Controller {
  4. public function index($page="")
  5. {
  6. // Page가 지정되지 않았다면?
  7. if(empty($page))
  8. {
  9. show_404();
  10. exit;
  11. }
  12. // 레이아웃 & 뷰파일 설정
  13. $this->theme = $this->site->get_layout();
  14. if(! is_file( VIEWPATH . DIR_THEME . DIRECTORY_SEPARATOR . $this->theme . DIRECTORY_SEPARATOR . "content" . DIRECTORY_SEPARATOR . $page . ".php" ))
  15. {
  16. show_404();
  17. exit;
  18. }
  19. $this->view = "content/" . $page;
  20. }
  21. }