From 7894c0b0ca91bef019fe356edd16467db28b17bb Mon Sep 17 00:00:00 2001 From: zero Date: Tue, 12 Jun 2007 09:28:51 +0000 Subject: [PATCH] git-svn-id: http://xe-core.googlecode.com/svn/trunk@1612 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- classes/db/DB.class.php | 4 ++-- classes/display/DisplayHandler.class.php | 2 +- classes/template/TemplateHandler.class.php | 6 +++--- config/config.inc.php | 2 +- modules/editor/tpl/css/editor.css | 7 +++++++ modules/editor/tpl/editor.html | 7 ++++--- modules/editor/tpl/images/buttonTypeBCenter.gif | Bin 0 -> 183 bytes modules/editor/tpl/images/buttonTypeBLeft.gif | Bin 0 -> 166 bytes modules/editor/tpl/images/buttonTypeBRight.gif | Bin 0 -> 166 bytes modules/importer/importer.admin.controller.php | 3 --- modules/layout/layout.admin.controller.php | 5 ++--- modules/menu/menu.admin.controller.php | 8 ++++---- modules/page/page.admin.controller.php | 2 +- modules/page/page.admin.view.php | 6 ++++++ modules/page/tpl/page_insert.html | 14 ++++++++++++++ 15 files changed, 45 insertions(+), 21 deletions(-) create mode 100644 modules/editor/tpl/images/buttonTypeBCenter.gif create mode 100644 modules/editor/tpl/images/buttonTypeBLeft.gif create mode 100644 modules/editor/tpl/images/buttonTypeBRight.gif diff --git a/classes/db/DB.class.php b/classes/db/DB.class.php index 394f1e499..b4468b532 100644 --- a/classes/db/DB.class.php +++ b/classes/db/DB.class.php @@ -118,14 +118,14 @@ * @brief 로그 남김 **/ function actStart($query) { - if(__DEBUG__ < 2 && !defined('__STOP_DEBUG__')) return; + if(__DEBUG__ < 2) return; $this->setError(0,'success'); $this->query = $query; $this->act_start = getMicroTime(); } function actFinish() { - if(__DEBUG__ < 2 || !$this->query || defined('__STOP_DEBUG__')) return; + if(__DEBUG__ < 2 || !$this->query ) return; $this->act_finish = getMicroTime(); $elapsed_time = $this->act_finish - $this->act_start; $GLOBALS['__db_elapsed_time__'] += $elapsed_time; diff --git a/classes/display/DisplayHandler.class.php b/classes/display/DisplayHandler.class.php index bbfb2aa61..a4e96fdca 100644 --- a/classes/display/DisplayHandler.class.php +++ b/classes/display/DisplayHandler.class.php @@ -156,7 +156,7 @@ * tail -f ./files/_debug_message.php로 하여 console로 확인하면 편리함\n **/ function _debugOutput() { - if(!__DEBUG__ || Context::getResponseMethod()!='HTML') return; + if(!__DEBUG__ || (__DEBUG_OUTPUT!=0 && Context::getResponseMethod()!='HTML') ) return; $end = getMicroTime(); // debug string 작성 시작 diff --git a/classes/template/TemplateHandler.class.php b/classes/template/TemplateHandler.class.php index 91b1ecf47..1018c0116 100644 --- a/classes/template/TemplateHandler.class.php +++ b/classes/template/TemplateHandler.class.php @@ -19,7 +19,7 @@ * @brief TemplateHandler의 기생성된 객체를 return **/ function &getInstance() { - if(__DEBUG__==3 && !defined('__STOP_DEBUG__')) { + if(__DEBUG__==3 ) { if(!isset($GLOBALS['__TemplateHandlerCalled__'])) $GLOBALS['__TemplateHandlerCalled__']=1; else $GLOBALS['__TemplateHandlerCalled__']++; } @@ -35,7 +35,7 @@ **/ function compile($tpl_path, $tpl_filename, $tpl_file = '') { // 디버그를 위한 컴파일 시작 시간 저장 - if(__DEBUG__==3 && !defined('__STOP_DEBUG__') ) $start = getMicroTime(); + if(__DEBUG__==3 ) $start = getMicroTime(); // 변수 체크 $tpl_path = ereg_replace('(\/+)$', '', $tpl_path).'/'; @@ -59,7 +59,7 @@ // Context와 compiled_tpl_file로 컨텐츠 생성 $output = $this->_fetch($compiled_tpl_file, $buff); - if(__DEBUG__==3 && !defined('__STOP_DEBUG__')) $GLOBALS['__template_elapsed__'] += getMicroTime() - $start; + if(__DEBUG__==3 ) $GLOBALS['__template_elapsed__'] += getMicroTime() - $start; return $output; } diff --git a/config/config.inc.php b/config/config.inc.php index 6b81f4ac3..97b6b78d0 100644 --- a/config/config.inc.php +++ b/config/config.inc.php @@ -24,7 +24,7 @@ * 2 : 1 + DB 쿼리 * 3 : 모든 로그 **/ - define('__DEBUG__', 1); + define('__DEBUG__', 3); /** * @brief 간단하게 사용하기 위한 함수 정의한 파일 require diff --git a/modules/editor/tpl/css/editor.css b/modules/editor/tpl/css/editor.css index c680be5cb..1a86f28e5 100644 --- a/modules/editor/tpl/css/editor.css +++ b/modules/editor/tpl/css/editor.css @@ -38,3 +38,10 @@ div.editor_autosaved_message { font-size:9pt; font-weight:bold; color:#888888; d .xeEditor .fileAttach .fileListArea .info strong { color:#ff6600; font:bold 1em Tahoma;} .xeEditor .fileAttach .fileUploadControl { float:left;} .xeEditor .fileAttach .fileUploadControl li { float:left; clear:both; margin-bottom:.3em;} + +.xeEditor .fileAttach .fileUploadControl .uploaderButton { display:block; cursor:pointer; background:url(../images/buttonTypeBCenter.gif) repeat-x left center; line-height:100%; overflow:visible; color:#3f4040; margin:0 1px; font-size:.9em; white-space:nowrap;} +.xeEditor .fileAttach .fileUploadControl .uploaderButton:hover { text-decoration:none;} +.xeEditor .fileAttach .fileUploadControl .uploaderButton img { vertical-align:middle;} +.xeEditor .fileAttach .fileUploadControl .uploaderButton .leftCap { width:2px; height:21px; background:url(../images/buttonTypeBLeft.gif) no-repeat; margin:0 .3em 0 0; position:relative; left:-1px;} +.xeEditor .fileAttach .fileUploadControl .uploaderButton .rightCap { width:2px; height:21px; background:url(../images/buttonTypeBRight.gif) no-repeat; margin:0 -1px 0 .4em;} +.xeEditor .fileAttach .fileUploadControl .uploaderButton .icon { margin:0 .2em;} diff --git a/modules/editor/tpl/editor.html b/modules/editor/tpl/editor.html index 238e39083..8b6a07d7c 100644 --- a/modules/editor/tpl/editor.html +++ b/modules/editor/tpl/editor.html @@ -142,10 +142,11 @@ diff --git a/modules/editor/tpl/images/buttonTypeBCenter.gif b/modules/editor/tpl/images/buttonTypeBCenter.gif new file mode 100644 index 0000000000000000000000000000000000000000..8998cbae2ec247463cbbd2773cd0d2070cd6d949 GIT binary patch literal 183 zcmZ?wbhEHbWMvR#IKsg2`}fbEKY#rA@$LJMuV24@{`>dOx9>p4r+@$c{{H>z@891) zetiG+>&NcB+dhB!c;n{PFJC_W`Sbhhw=e(y|7RcqDE?#ttI`3HAUhdYO&%zB1xG4r zM6Fr(96G#r_ug%%P9M8*^Xh*vV88(sf3h$#Fo-kg xfaF1TGO#K?2<2r@(wvrPIxWFgEJai-RZuM1^;(jrSi5Q>V+7OG(<&?s)&O33Nh<&V literal 0 HcmV?d00001 diff --git a/modules/editor/tpl/images/buttonTypeBRight.gif b/modules/editor/tpl/images/buttonTypeBRight.gif new file mode 100644 index 0000000000000000000000000000000000000000..4a85fd289a54562d59b9de6679dfacea8c490ac2 GIT binary patch literal 166 zcmZ?wbhEHbWMU9yI3mulZ~u-x`?g=aboR!LD<@AKIdk^-m8%zCym)r)`sMuxc3!=9 z@$k`o$4?x(botzYL%YvkIDPK?$)m>(96G#r_ug%%P9M8*^Xh*vV88(sf3h$#Fo-kg xfaF1TGO#Kql*%@@Ms%e{^r}YmvqrYMMz$P{n7B1UsQd7w4Gdb1CskP(tO1|*OvwNM literal 0 HcmV?d00001 diff --git a/modules/importer/importer.admin.controller.php b/modules/importer/importer.admin.controller.php index 87285798c..58ad54a36 100644 --- a/modules/importer/importer.admin.controller.php +++ b/modules/importer/importer.admin.controller.php @@ -96,9 +96,6 @@ // 실행시간 무한대로 설정 @set_time_limit(0); - // 디버그 메세지의 양이 무척 커지기에 디버그 메세지 생성을 중단 - //define('__STOP_DEBUG__', true); - // 변수 체크 $this->module_srl = Context::get('module_srl'); $this->category_srl = Context::get('category_srl'); diff --git a/modules/layout/layout.admin.controller.php b/modules/layout/layout.admin.controller.php index cc26b8d41..3a86b5eeb 100644 --- a/modules/layout/layout.admin.controller.php +++ b/modules/layout/layout.admin.controller.php @@ -55,9 +55,8 @@ if(count($menus)) { foreach($menus as $menu_id => $val) { $menu_srl = Context::get($menu_id); - if($menu_srl) { - $menu_srl_list[] = $menu_srl; - } + if(!$menu_srl) continue; + $menu_srl_list[] = $menu_srl; } // 정해진 메뉴가 있으면 모듈 및 메뉴에 대한 레이아웃 연동 diff --git a/modules/menu/menu.admin.controller.php b/modules/menu/menu.admin.controller.php index 216f65872..e5206e2a8 100644 --- a/modules/menu/menu.admin.controller.php +++ b/modules/menu/menu.admin.controller.php @@ -123,9 +123,9 @@ // XML 파일을 갱신하고 위치을 넘겨 받음 $xml_file = $this->makeXmlFile($args->menu_srl); - // url에 mid=? 있을 경우 기록 남김 - if(substr($args->url,0,4)=='mid=') { - $mid = substr($args->url,4); + // url이 mid일 경우 기록 남김 + if(eregi('^([a-zA-Z0-9\_\-]+)$', $args->url)) { + $mid = $args->url; $mid_args->menu_srl = $args->menu_srl; $mid_args->mid = $mid; @@ -379,7 +379,7 @@ // 속성을 생성한다 ( url_list를 이용해서 선택된 메뉴의 노드에 속하는지를 검사한다. 꽁수지만 빠르고 강력하다고 생각;;) $attribute = sprintf( - '"node_srl"=>"%s","text"=>(%s?"%s":""),"href"=>(%s?"%s":""),"url"=>(%s?"%s":""),"open_window"=>"%s","normal_btn"=>"%s","hover_btn"=>"%s","active_btn"=>"%s","selected"=>(%s&&in_array(Context::get("mid"),array(%s))?1:0),"list"=>array(%s)', + '"node_srl"=>"%s","text"=>(%s?"%s":""),"href"=>(%s?"%s":""),"url"=>(%s?"%s":""),"open_window"=>"%s","normal_btn"=>"%s","hover_btn"=>"%s","active_btn"=>"%s","selected"=>(array(%s)&&in_array(Context::get("mid"),array(%s))?1:0),"list"=>array(%s)', $node->menu_item_srl, $group_check_code, $name, diff --git a/modules/page/page.admin.controller.php b/modules/page/page.admin.controller.php index 0e30aaf07..e52fcd930 100644 --- a/modules/page/page.admin.controller.php +++ b/modules/page/page.admin.controller.php @@ -18,7 +18,7 @@ **/ function procPageAdminInsert() { // 일단 입력된 값들을 모두 받아서 db 입력항목과 그외 것으로 분리 - $args = Context::gets('module_srl','module_category_srl','page_name','browser_title','content','is_default'); + $args = Context::gets('module_srl','module_category_srl','page_name','browser_title','content','is_default','layout_srl'); $args->module = 'page'; $args->mid = $args->page_name; unset($args->page_name); diff --git a/modules/page/page.admin.view.php b/modules/page/page.admin.view.php index 30f1042df..ee1a66825 100644 --- a/modules/page/page.admin.view.php +++ b/modules/page/page.admin.view.php @@ -136,6 +136,12 @@ $editor = $oEditorModel->getEditor($module_srl, $option); Context::set('editor', $editor); + // 레이아웃 목록을 구해옴 + $oLayoutMode = &getModel('layout'); + $layout_list = $oLayoutMode->getLayoutList(); + Context::set('layout_list', $layout_list); + + // 템플릿 파일 지정 $this->setTemplateFile('page_insert'); } diff --git a/modules/page/tpl/page_insert.html b/modules/page/tpl/page_insert.html index 8f6700e53..2bb099af3 100644 --- a/modules/page/tpl/page_insert.html +++ b/modules/page/tpl/page_insert.html @@ -45,6 +45,20 @@ {$lang->about_browser_title} + + {$lang->layout} + + + + + + {$lang->about_layout} +