diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index 238002908..5f0e4679f 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -158,22 +158,6 @@ if(file_exists(_XE_PATH_.'.htaccess')&&$this->db_info->use_rewrite == 'Y') $this->allow_rewrite = true; else $this->allow_rewrite = false; - // add common JS/CSS files - $this->addJsFile("./common/js/jquery.js", true, '', -100000); - $this->addJsFile("./common/js/x.js"); - $this->addJsFile("./common/js/common.js"); - $this->addJsFile("./common/js/js_app.js"); - $this->addJsFile("./common/js/xml_handler.js"); - $this->addJsFile("./common/js/xml_js_filter.js"); - $this->addCSSFile("./common/css/default.css"); - $this->addCSSFile("./common/css/button.css"); - - // for admin page, add admin css - if(Context::get('module')=='admin' || strpos(Context::get('act'),'Admin')>0){ - $this->addCssFile("./modules/admin/tpl/css/font.css", true, 'all', '',10000); - $this->addCssFile("./modules/admin/tpl/css/pagination.css", true, 'all', '', 100001); - $this->addCssFile("./modules/admin/tpl/css/admin.css", true, 'all', '', 100002); - } // set locations for javascript use if($_SERVER['REQUEST_METHOD'] == 'GET') { @@ -1179,7 +1163,7 @@ /** * @brief js file을 추가 **/ - function _addJsFile($file, $optimized, $targetie,$index) { + function _addJsFile($file, $optimized = true, $targetie = '',$index=null) { if(strpos($file,'://')===false && $file{0}!='/' && $file{0}!='.') $file = './'.$file; $file = preg_replace('@/\./|(?gz_enabled = true; // request method에 따른 컨텐츠 결과물 추출 - if(Context::get('xeVirtualRequestMethod')=='xml') $output = $this->_toVirtualXmlDoc($oModule); - else if(Context::getRequestMethod() == 'XMLRPC') { - if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) $this->gz_enabled = false; - $output = $this->_toXmlDoc($oModule); + if(Context::get('xeVirtualRequestMethod')=='xml') { + require_once("./classes/display/VirtualXMLDisplayHandler.php"); + $handler = new VirtualXMLDisplayHandler(); + } + else if(Context::getRequestMethod() == 'XMLRPC') { + require_once("./classes/display/XMLDisplayHandler.php"); + $handler = new XMLDisplayHandler(); + if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) $this->gz_enabled = false; + } + else if(Context::getRequestMethod() == 'JSON') { + require_once("./classes/display/JSONDisplayHandler.php"); + $handler = new JSONDisplayHandler(); + } + else { + require_once("./classes/display/HTMLDisplayHandler.php"); + $handler = new HTMLDisplayHandler(); } - else if(Context::getRequestMethod() == 'JSON') $output = $this->_toJSON($oModule); - else $output = $this->_toHTMLDoc($oModule); - // HTML 출력 요청일 경우 레이아웃 컴파일과 더블어 완성된 코드를 제공 - if(Context::getResponseMethod()=="HTML") { - - // 관리자 모드일 경우 #xeAdmin id를 가지는 div 추가 - if(Context::get('module')!='admin' && strpos(Context::get('act'),'Admin')>0) $output = '