diff --git a/addons/autolink/autolink.js b/addons/autolink/autolink.js index 62cc2c3e5..fa4478039 100644 --- a/addons/autolink/autolink.js +++ b/addons/autolink/autolink.js @@ -2,25 +2,29 @@ jQuery(function($) { var url_regx = /((http|https|ftp|news|telnet|irc):\/\/(([0-9a-z\-._~!$&'\(\)*+,;=:]|(%[0-9a-f]{2}))*\@)?((\[(((([0-9a-f]{1,4}:){6}([0-9a-f]{1,4}:[0-9a-f]{1,4})|(([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])){3}[0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])))|(::([0-9a-f]{1,4}:){5}([0-9a-f]{1,4}:[0-9a-f]{1,4})|(([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])){3}[0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])))|(([0-9a-f]{1,4})?::([0-9a-f]{1,4}:){4}([0-9a-f]{1,4}:[0-9a-f]{1,4})|(([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])){3}[0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])))|((([0-9a-f]{1,4}:)?[0-9a-f]{1,4})?::([0-9a-f]{1,4}:){3}([0-9a-f]{1,4}:[0-9a-f]{1,4})|(([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])){3}[0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])))|((([0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::([0-9a-f]{1,4}:){2}([0-9a-f]{1,4}:[0-9a-f]{1,4})|(([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])){3}[0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])))|((([0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:([0-9a-f]{1,4}:[0-9a-f]{1,4})|(([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])){3}[0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])))|((([0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::([0-9a-f]{1,4}:[0-9a-f]{1,4})|(([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])){3}[0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])))|((([0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4})|((([0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::))|(v[0-9a-f]+.[0-9a-z\-._~!$&'\(\)*+,;=:]+))\])|(([0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5])){3}[0-9]|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5]))|(([0-9a-z\-._~!$&'\(\)*+,;=]|(%[0-9a-f]{2}))+))(:[0-9]*)?(\/([0-9a-z\-._~!$&'\(\)*+,;=:@]|(%[0-9a-f]{2}))*)*(\?([0-9a-z\-._~!$&'\(\)*+,;=:@\/\?]|(%[0-9a-f]{2}))*)?(#([0-9a-z\-._~!$&'\(\)*+,;=:@\/\?]|(%[0-9a-f]{2}))*)?)/i; - function replaceHrefLink(target_obj) { - var obj = target_obj; + function replaceHrefLink(obj) { var obj_list = obj.childNodes; - for(var i=0; i < obj_list.length; ++i) { + for(var i = 0; i < obj_list.length; ++i) { var obj = obj_list[i]; var pObj = obj.parentNode; if(!pObj) continue; var pN = pObj.nodeName.toLowerCase(); - if($.inArray(pN, ['a', 'pre', 'xml', 'textarea', 'input']) != -1) continue; + if($.inArray(pN, ['a', 'pre', 'xml', 'textarea', 'input', 'option', 'code']) != -1) continue; if(obj.nodeType == 3 && obj.length >= 10) { - var html = obj.nodeValue.replace(url_regx, '$1'); - $(obj).replaceWith(html); - delete(html); + var content = obj.nodeValue; + if(!url_regx.test(content)) continue; + + content = content.replace(//g, '>'); + content = content.replace(url_regx, '$1'); + + $(obj).replaceWith(content); + delete(content); } else if(obj.nodeType == 1 && obj.childNodes.length) { - if($.inArray(obj.nodeName.toLowerCase(), ['a', 'pre', 'xml', 'textarea', 'input']) != -1) continue; replaceHrefLink(obj); } } diff --git a/addons/keyword_link/conf/info.xml b/addons/keyword_link/conf/info.xml index 64735755d..285e83d16 100644 --- a/addons/keyword_link/conf/info.xml +++ b/addons/keyword_link/conf/info.xml @@ -1,11 +1,17 @@ 키워드 링크 애드온 + 關鍵字連結 게시글과 댓글의 내용중 등록된 키워드에 링크를 걸어주는 애드온입니다. 키워드는 콤마(,)로 구분하여 여러개 등록할 수 있습니다. 먼저 등록된 키워드가 우선순위를 갖습니다. + + 게시글과 댓글의 내용중 등록된 키워드에 링크를 걸어주는 애드온입니다. + 可用逗號(,)區隔多個關鍵字。 + 以第一關鍵字為主。 + 0.1 2008-12-20 @@ -21,51 +27,69 @@ cssquery + cssquery 치환할 부분의 jQuery cssquery입니다. xe_board 게시판 스킨이면 공백으로 두면 됩니다. + 치환할 부분의 jQuery cssquery입니다. + xe_board 게시판 스킨이면 공백으로 두면 됩니다. 링크 방법 + 連結方式 키워드가 여러개 있을때 "첫번째 키워드"에만 링크를 걸 것인지 "모든 키워드"에 걸 것인지 선택합니다. + 키워드가 여러개 있을때 "첫번째 키워드"에만 링크를 걸 것인지 "모든 키워드"에 걸 것인지 선택합니다. + 첫번째 키워드 + 第一關鍵字 모든 키워드 + 所有關鍵字 키워드 + 關鍵字 링크 + 連結 키워드 + 關鍵字 링크 + 連結 키워드 + 關鍵字 링크 + 連結 키워드 + 關鍵字 링크 + 連結 키워드 + 關鍵字 링크 + 連結 diff --git a/addons/keyword_link/keyword_link.addon.php b/addons/keyword_link/keyword_link.addon.php index 8e5c7aac4..8be78f139 100644 --- a/addons/keyword_link/keyword_link.addon.php +++ b/addons/keyword_link/keyword_link.addon.php @@ -8,16 +8,18 @@ **/ if($called_position == 'after_module_proc' && Context::getResponseMethod()!="XMLRPC" && Context::getResponseMethod()!="JSON" ) { $json = array(); + $arg = array(); for($i=1;$i<=5;$i++){ + $arg = array(); $ii = sprintf("%02d",$i); $keyword = $addon_info->{"keyword".$ii}; $url = $addon_info->{"url".$ii}; if($keyword && $url){ - $arg->url = $url; + $arg['url'] = $url; $keyword = explode(",",$keyword); for($j=0,$c=count($keyword);$j<$c;$j++){ if(trim($keyword[$j]) == "") continue; - $arg->keyword = trim($keyword[$j]); + $arg['keyword'] = trim($keyword[$j]); $json[] = $arg; } } diff --git a/addons/keyword_link/keyword_link.js b/addons/keyword_link/keyword_link.js index f788ae825..ba111e215 100644 --- a/addons/keyword_link/keyword_link.js +++ b/addons/keyword_link/keyword_link.js @@ -1,7 +1,7 @@ (function($){ $(function(){ if(addon_keyword_link.length > 0){ - if(!addon_keyword_link_cssquery) addon_keyword_link_cssquery= 'div.contentBody > div, div.replyContent > div'; + if(!addon_keyword_link_cssquery) addon_keyword_link_cssquery= '.xe_content'; $(addon_keyword_link_cssquery).each(function(){ var content = $(this).html(); for(var i=0,c=addon_keyword_link.length;isetError(0,'success'); @@ -145,26 +145,29 @@ $this->elapsed_time = $elapsed_time; $GLOBALS['__db_elapsed_time__'] += $elapsed_time; - $str = sprintf("\t%02d. %s (%0.6f sec)\n", ++$GLOBALS['__dbcnt'], $this->query, $elapsed_time); + $log['query'] = $this->query; + $log['elapsed_time'] = $elapsed_time; // 에러 발생시 에러 로그를 남김 (__DEBUG_DB_OUTPUT__이 지정되어 있을경우) if($this->isError()) { - $str .= sprintf("\t Query Failed : %d\n\t\t\t %s\n", $this->errno, $this->errstr); + $log['result'] = 'Failed'; + $log['errno'] = $this->errno; + $log['errstr'] = $this->errstr; - if(__DEBUG_DB_OUTPUT__==1) { + if(__DEBUG_DB_OUTPUT__ == 1) { $debug_file = _XE_PATH_."files/_debug_db_query.php"; $buff = sprintf("%s\n",print_r($str,true)); - if($display_line) $buff = "\n====================================\n".$buff."------------------------------------\n"; + if($display_line) $buff = "\n\n"; if(@!$fp = fopen($debug_file,"a")) return; fwrite($fp, $buff); fclose($fp); } } else { - $str .= "\t Query Success\n"; + $log['result'] = 'Success'; } - $GLOBALS['__db_queries__'] .= $str; + $GLOBALS['__db_queries__'][] = $log; // __LOG_SLOW_QUERY__ 가 정해져 있다면 시간 체크후 쿼리 로그 남김 if(__LOG_SLOW_QUERY__>0 && $elapsed_time > __LOG_SLOW_QUERY__) { @@ -207,7 +210,7 @@ /** * @brief query xml 파일을 실행하여 결과를 return * - * query_id = module.queryname + * query_id = module.queryname * query_id에 해당하는 xml문(or 캐싱파일)을 찾아서 컴파일 후 실행 **/ function executeQuery($query_id, $args = NULL) { @@ -229,6 +232,20 @@ $xml_file = sprintf('%s%s/%s/queries/%s.xml', _XE_PATH_, $target, $module, $id); if(!file_exists($xml_file)) return new Object(-1, 'msg_invalid_queryid'); + // 캐쉬파일을 찾아 본다 + $cache_file = $this->checkQueryCacheFile($query_id,$xml_file); + + // 쿼리를 실행한다 + return $this->_executeQuery($cache_file, $args, $query_id); + } + + + /** + * @brief 캐쉬파일을 찾아 본다 + * + **/ + function checkQueryCacheFile($query_id,$xml_file){ + // 일단 cache 파일을 찾아본다 $cache_file = sprintf('%s%s%s.cache.php', _XE_PATH_, $this->cache_file, $query_id); if(file_exists($cache_file)) $cache_time = filemtime($cache_file); @@ -236,15 +253,14 @@ // 캐시 파일이 없거나 시간 비교하여 최근것이 아니면 원본 쿼리 xml파일을 찾아서 파싱을 한다 if($cache_timeparse($query_id, $xml_file, $cache_file); } - - // 쿼리를 실행한다 - return $this->_executeQuery($cache_file, $args, $query_id); + return $cache_file; } + /** * @brief 쿼리문을 실행하고 결과를 return한다 **/ @@ -258,6 +274,7 @@ $output = @include($cache_file); if( (is_a($output, 'Object')||is_subclass_of($output,'Object'))&&!$output->toBool()) return $output; + $output->_tables = ($output->_tables && is_array($output->_tables)) ? $output->_tables : array(); // action값에 따라서 쿼리 생성으로 돌입 @@ -349,15 +366,18 @@ $value = preg_replace('/(^\'|\'$){1}/','',$value); switch($operation) { - case 'like_prefix' : + case 'like_prefix' : $value = $value.'%'; break; - case 'like_tail' : + case 'like_tail' : $value = '%'.$value; break; - case 'like' : + case 'like' : $value = '%'.$value.'%'; break; + case 'notin' : + return "'".$value."'"; + break; case 'in' : return "'".$value."'"; break; @@ -381,6 +401,7 @@ case 'like_prefix' : case 'like' : case 'in' : + case 'notin' : case 'notequal' : // 변수가 세팅되지 않고, 문자열이나 숫자형이 아니면 리턴 if(!isset($value)) return; @@ -412,6 +433,9 @@ case 'in' : return $name.' in ('.$value.')'; break; + case 'notin' : + return $name.' notin ('.$value.')'; + break; case 'notequal' : return $name.' <> '.$value; break; @@ -454,7 +478,7 @@ if(!is_array($tables)) $tables_str = $tables; else $tables_str = implode('.',$tables); - + $cache_path = sprintf('%s/%s%s', $this->count_cache_path, $this->prefix, $tables_str); if(!is_dir($cache_path)) FileHandler::makeDir($cache_path); @@ -511,5 +535,17 @@ return true; } + + function getSupportedDatabase(){ + $result = array(); + if(function_exists('mysql_connect')) $result[] = 'MySQL'; + if(function_exists('cubrid_connect')) $result[] = 'Cubrid'; + if(function_exists('ibase_connect')) $result[] = 'FireBird'; + if(function_exists('pg_connect')) $result[] = 'Postgre'; + if(function_exists('sqlite_open')) $result[] = 'sqlite2'; + if(function_exists('PDO')) $result[] = 'sqlite3(PDO)'; + return $result; + } + } ?> diff --git a/classes/db/DBCubrid.class.php b/classes/db/DBCubrid.class.php index acabc3dac..85cf76f3c 100644 --- a/classes/db/DBCubrid.class.php +++ b/classes/db/DBCubrid.class.php @@ -18,7 +18,7 @@ var $userid = NULL; ///< user id var $password = NULL; ///< password var $database = NULL; ///< database - var $port = 33000; ///< db server port + var $port = 33000; ///< db server port var $prefix = 'xe'; ///< XE에서 사용할 테이블들의 prefix (한 DB에서 여러개의 XE 설치 가능) var $cutlen = 12000; ///< 큐브리드의 최대 상수 크기(스트링이 이보다 크면 '...'+'...' 방식을 사용해야 한다 @@ -75,7 +75,7 @@ // db 정보가 없으면 무시 if(!$this->hostname || !$this->userid || !$this->password || !$this->database || !$this->port) return; - // 접속시도 + // 접속시도 $this->fd = @cubrid_connect($this->hostname, $this->port, $this->database, $this->userid, $this->password); // 접속체크 @@ -385,9 +385,19 @@ **/ function getCondition($output) { if(!$output->conditions) return; + $condition = $this->_getCondition($output->conditions,$output->column_type); + if($condition) $condition = ' where '.$condition; + return $condition; + } + function getLeftCondition($conditions,$column_type){ + return $this->_getCondition($conditions,$column_type); + } + + + function _getCondition($conditions,$column_type) { $condition = ''; - foreach($output->conditions as $val) { + foreach($conditions as $val) { $sub_condition = ''; foreach($val['condition'] as $v) { if(!isset($v['value'])) continue; @@ -397,30 +407,24 @@ $name = $v['column']; $operation = $v['operation']; $value = $v['value']; - $type = $this->getColumnType($output->column_type,$name); + $type = $this->getColumnType($column_type,$name); $pipe = $v['pipe']; - $value = $this->getConditionValue($name, $value, $operation, $type, $output->column_type); + $value = $this->getConditionValue($name, $value, $operation, $type, $column_type); if(!$value) $value = $v['value']; - if(strpos($name,'.')===false) $name = '"'.$name.'"'; - else $name = str_replace('.','."',$name).'"'; - $str = $this->getConditionPart($name, $value, $operation); - if($sub_condition) $sub_condition .= ' '.$pipe.' '; $sub_condition .= $str; } - if($sub_condition) { if($condition && $val['pipe']) $condition .= ' '.$val['pipe'].' '; $condition .= '('.$sub_condition.')'; } } - - if($condition) $condition = ' where '.$condition; return $condition; } + /** * @brief insertAct 처리 **/ @@ -430,7 +434,7 @@ $table_list[] = '"'.$this->prefix.$val.'"'; } - // 컬럼 정리 + // 컬럼 정리 foreach($output->columns as $key => $val) { $name = $val['name']; $value = $val['value']; @@ -471,15 +475,15 @@ $table_list[] = "\"".$this->prefix.$val."\" as ".$key; } - // 컬럼 정리 + // 컬럼 정리 foreach($output->columns as $key => $val) { if(!isset($val['value'])) continue; $name = $val['name']; $value = $val['value']; - for ($i = 0; $i < $key; $i++) { // 한문장에 같은 속성에 대한 중복 설정은 큐브리드에서는 허용치 않음 - if ($output->columns[$i]['name'] == $name) break; - } - if ($i < $key) continue; // 중복이 발견되면 이후의 설정은 무시 + for ($i = 0; $i < $key; $i++) { // 한문장에 같은 속성에 대한 중복 설정은 큐브리드에서는 허용치 않음 + if ($output->columns[$i]['name'] == $name) break; + } + if ($i < $key) continue; // 중복이 발견되면 이후의 설정은 무시 if(strpos($name,'.')!==false&&strpos($value,'.')!==false) $column_list[] = $name.' = '.$value; else { if($output->column_type[$name]!='number') { @@ -543,6 +547,17 @@ $table_list[] = '"'.$this->prefix.$val.'" as '.$key; } + $left_join = array(); + // why??? + $left_tables= (array)$output->left_tables; + + foreach($left_tables as $key => $val) { + $condition = $this->_getCondition($output->left_conditions[$key],$output->column_type); + if($condition){ + $left_join[] = $val . ' "'.$this->prefix.$output->tables[$key].'" as '.$key . ' on (' . $condition . ')'; + } + } + if(!$output->columns) { $columns = '*'; } else { @@ -572,9 +587,9 @@ $condition = $this->getCondition($output); - if($output->list_count && $output->page) return $this->_getNavigationData($table_list, $columns, $condition, $output); + if($output->list_count && $output->page) return $this->_getNavigationData($table_list, $columns, $left_join, $condition, $output); - $query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition); + $query = sprintf("select %s from %s %s %s", $columns, implode(',',$table_list),implode(' ',$left_join), $condition); if(count($output->groups)) $query .= sprintf(' group by %s', implode(',',$output->groups)); @@ -597,7 +612,7 @@ else { if ($condition) $query = sprintf('%s and inst_num() between %d and %d', $query, $start_count + 1, $list_count + $start_count); - else + else $query = sprintf('%s where inst_num() between %d and %d', $query, $start_count + 1, $list_count + $start_count); } } @@ -630,7 +645,7 @@ $output = "
\n"; $output .= "Backtrace:
\n"; $backtrace = debug_backtrace(); - + foreach ($backtrace as $bt) { $args = ''; foreach ($bt['args'] as $a) { @@ -672,18 +687,18 @@ $output .= "
\n"; return $output; } - + /** * @brief query xml에 navigation 정보가 있을 경우 페이징 관련 작업을 처리한다 * * 그닥 좋지는 않은 구조이지만 편리하다.. -_-; **/ - function _getNavigationData($table_list, $columns, $condition, $output) { + function _getNavigationData($table_list, $columns, $left_join, $condition, $output) { require_once(_XE_PATH_.'classes/page/PageHandler.class.php'); // 전체 개수를 구함 - $count_query = sprintf('select count(*) as "count" from %s %s', implode(',',$table_list), $condition); + $count_query = sprintf("select count(*) as count from %s %s %s", implode(',',$table_list),implode(' ',$left_join), $condition); $total_count = $this->getCountCache($output->tables, $condition); if($total_count === false) { $result = $this->_query($count_query); @@ -707,7 +722,7 @@ if($page > $total_page) $page = $total_page; $start_count = ($page-1)*$list_count; - $query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition); + $query = sprintf("select %s from %s %s %s", $columns, implode(',',$table_list), implode(' ',$left_join), $condition); if(count($output->groups)) $query .= sprintf(' group by %s', implode(',',$output->groups)); @@ -724,7 +739,7 @@ else { if ($condition) $query = sprintf('%s and inst_num() between %d and %d', $query, $start_count + 1, $list_count + $start_count); - else + else $query = sprintf('%s where inst_num() between %d and %d', $query, $start_count + 1, $list_count + $start_count); } } diff --git a/classes/db/DBFirebird.class.php b/classes/db/DBFirebird.class.php index d3facb5be..e5181f810 100644 --- a/classes/db/DBFirebird.class.php +++ b/classes/db/DBFirebird.class.php @@ -89,7 +89,7 @@ // get server version and implementation strings $server_info = ibase_server_info($service, IBASE_SVC_SERVER_VERSION); ibase_service_detach($service); - } + } else { $this->setError(ibase_errcode(), ibase_errmsg()); return; @@ -341,7 +341,7 @@ /** * @brief 1씩 증가되는 sequence값을 return (firebird의 generator 값을 증가) **/ - function getNextSequence() { + function getNextSequence() { $gen = "GEN_".$this->prefix."sequence_ID"; $sequence = ibase_gen_id($gen, 1); return $sequence; @@ -509,7 +509,7 @@ if($this->column_type[$type]=='INTEGER') $size = null; else if($this->column_type[$type]=='VARCHAR' && !$size) $size = 256; - + $column_schema[] = sprintf('"%s" %s%s %s %s', $name, $this->column_type[$type], @@ -540,8 +540,8 @@ //commit(); @ibase_commit($this->fd); if(!$output) return false; - - if(count($index_list)) { + + if(count($index_list)) { foreach($index_list as $key => $val) { // index name = prefix + table name + index_list // index name 크기가 31byte로 제한되어 있어 중복되지 않을만큼 테이블명을 줄임 @@ -567,7 +567,7 @@ if(!$output) return false; } } - + foreach($auto_increment_list as $increment) { $schema = sprintf('CREATE GENERATOR GEN_%s_ID;', $table_name); $output = $this->_query($schema); @@ -598,8 +598,19 @@ **/ function getCondition($output) { if(!$output->conditions) return; + $condition = $this->_getCondition($output->conditions,$output->column_type); + if($condition) $condition = ' where '.$condition; + return $condition; + } - foreach($output->conditions as $val) { + function getLeftCondition($conditions,$column_type){ + return $this->_getCondition($conditions,$column_type); + } + + + function _getCondition($conditions,$column_type) { + $condition = ''; + foreach($conditions as $val) { $sub_condition = ''; foreach($val['condition'] as $v) { if(!isset($v['value'])) continue; @@ -609,15 +620,11 @@ $name = $v['column']; $operation = $v['operation']; $value = $v['value']; - $type = $this->getColumnType($output->column_type,$name); + $type = $this->getColumnType($column_type,$name); $pipe = $v['pipe']; - $value = $this->getConditionValue('"'.$name.'"', $value, $operation, $type, $output->column_type); + $value = $this->getConditionValue($name, $value, $operation, $type, $column_type); if(!$value) $value = $v['value']; - - $name = $this->autoQuotes($name); - $value = $this->autoValueQuotes($value, $output); - $str = $this->getConditionPart($name, $value, $operation); if($sub_condition) $sub_condition .= ' '.$pipe.' '; $sub_condition .= $str; @@ -627,8 +634,6 @@ $condition .= '('.$sub_condition.')'; } } - - if($condition) $condition = ' Where '.$condition; return $condition; } @@ -641,7 +646,7 @@ $table_list[] = '"'.$this->prefix.$val.'"'; } - // 컬럼 정리 + // 컬럼 정리 foreach($output->columns as $key => $val) { $name = $val['name']; $value = $val['value']; @@ -752,9 +757,21 @@ // 테이블 정리 $table_list = array(); foreach($output->tables as $key => $val) { - $table_list[] = sprintf("\"%s%s\" as \"%s\"", $this->prefix, $val, $key); + $table_list[] = sprintf("\"%s%s\" as \"%s\"", $this->prefix, $val, $key); } + $left_join = array(); + // why??? + $left_tables= (array)$output->left_tables; + + foreach($left_tables as $key => $val) { + $condition = $this->_getCondition($output->left_conditions[$key],$output->column_type); + if($condition){ + $left_join[] = $val . ' "'.$this->prefix.$output->_tables[$key].'" as '.$key . ' on (' . $condition . ')'; + } + } + + if(!$output->columns) { $columns = '*'; } else { @@ -762,7 +779,7 @@ foreach($output->columns as $key => $val) { $name = $val['name']; $alias = $val['alias']; - + if($alias == "") $column_list[] = $this->autoQuotes($name); else @@ -773,7 +790,7 @@ $condition = $this->getCondition($output); - if($output->list_count && $output->page) return $this->_getNavigationData($table_list, $columns, $condition, $output); + if($output->list_count && $output->page) return $this->_getNavigationData($table_list, $columns, $left_join, $condition, $output); // list_order, update_order 로 정렬시에 인덱스 사용을 위해 condition에 쿼리 추가 if($output->order) { @@ -792,7 +809,7 @@ if($output->list_count['value']) $limit = sprintf('FIRST %d', $output->list_count['value']); else $limit = ''; - $query = sprintf("select %s %s from %s %s", $limit, $columns, implode(',',$table_list), $condition); + $query = sprintf("select %s from %s %s %s", $columns, implode(',',$table_list),implode(' ',$left_join), $condition); if($output->groups) { foreach($output->groups as $key => $val) { @@ -825,11 +842,11 @@ * * 그닥 좋지는 않은 구조이지만 편리하다.. -_-; **/ - function _getNavigationData($table_list, $columns, $condition, $output) { + function _getNavigationData($table_list, $columns, $left_join, $condition, $output) { require_once(_XE_PATH_.'classes/page/PageHandler.class.php'); // 전체 개수를 구함 - $count_query = sprintf('select count(*) as "count" from %s %s;', implode(',',$table_list), $condition); + $count_query = sprintf("select count(*) as count from %s %s %s", implode(',',$table_list),implode(' ',$left_join), $condition); $total_count = $this->getCountCache($output->tables, $condition); if($total_count === false) { $result = $this->_query($count_query); @@ -868,8 +885,8 @@ } } - $limit = sprintf('FIRST %d SKIP %d ', $list_count, $start_count); - $query = sprintf('SELECT %s %s FROM %s %s', $limit, $columns, implode(',',$table_list), $condition); + $limit = sprintf('FIRST %d SKIP %d ', $list_count, $start_count); + $query = sprintf('SELECT %s %s FROM %s %s %s', $limit, $columns, implode(',',$table_list), implode(' ',$left_join), $condition); if($output->groups) { foreach($output->groups as $key => $val) { diff --git a/classes/db/DBMysql.class.php b/classes/db/DBMysql.class.php index dee547f95..d61a1f869 100644 --- a/classes/db/DBMysql.class.php +++ b/classes/db/DBMysql.class.php @@ -376,8 +376,19 @@ **/ function getCondition($output) { if(!$output->conditions) return; + $condition = $this->_getCondition($output->conditions,$output->column_type); + if($condition) $condition = ' where '.$condition; + return $condition; + } - foreach($output->conditions as $val) { + function getLeftCondition($conditions,$column_type){ + return $this->_getCondition($conditions,$column_type); + } + + + function _getCondition($conditions,$column_type) { + $condition = ''; + foreach($conditions as $val) { $sub_condition = ''; foreach($val['condition'] as $v) { if(!isset($v['value'])) continue; @@ -387,10 +398,9 @@ $name = $v['column']; $operation = $v['operation']; $value = $v['value']; - $type = $this->getColumnType($output->column_type,$name); + $type = $this->getColumnType($column_type,$name); $pipe = $v['pipe']; - - $value = $this->getConditionValue($name, $value, $operation, $type, $output->column_type); + $value = $this->getConditionValue($name, $value, $operation, $type, $column_type); if(!$value) $value = $v['value']; $str = $this->getConditionPart($name, $value, $operation); if($sub_condition) $sub_condition .= ' '.$pipe.' '; @@ -401,8 +411,6 @@ $condition .= '('.$sub_condition.')'; } } - - if($condition) $condition = ' where '.$condition; return $condition; } @@ -493,6 +501,16 @@ $table_list[] = '`'.$this->prefix.$val.'` as '.$key; } + $left_join = array(); + // why??? + $left_tables= (array)$output->left_tables; + foreach($left_tables as $key => $val) { + $condition = $this->_getCondition($output->left_conditions[$key],$output->column_type); + if($condition){ + $left_join[] = $val . ' `'.$this->prefix.$output->_tables[$key].'` as '.$key . ' on (' . $condition . ')'; + } + } + if(!$output->columns) { $columns = '*'; } else { @@ -515,7 +533,7 @@ $condition = $this->getCondition($output); - if($output->list_count && $output->page) return $this->_getNavigationData($table_list, $columns, $condition, $output); + if($output->list_count && $output->page) return $this->_getNavigationData($table_list, $columns, $left_join, $condition, $output); // list_order, update_order 로 정렬시에 인덱스 사용을 위해 condition에 쿼리 추가 if($output->order) { @@ -530,7 +548,7 @@ } } - $query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition); + $query = sprintf("select %s from %s %s %s", $columns, implode(',',$table_list),implode(' ',$left_join), $condition); if(count($output->groups)) $query .= sprintf(' group by %s', implode(',',$output->groups)); @@ -558,11 +576,11 @@ * * 그닥 좋지는 않은 구조이지만 편리하다.. -_-; **/ - function _getNavigationData($table_list, $columns, $condition, $output) { + function _getNavigationData($table_list, $columns, $left_join, $condition, $output) { require_once(_XE_PATH_.'classes/page/PageHandler.class.php'); // 전체 개수를 구함 - $count_query = sprintf("select count(*) as count from %s %s", implode(',',$table_list), $condition); + $count_query = sprintf("select count(*) as count from %s %s %s", implode(',',$table_list),implode(' ',$left_join), $condition); $total_count = $this->getCountCache($output->tables, $condition); if($total_count === false) { $result = $this->_query($count_query); @@ -599,7 +617,7 @@ } } - $query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition); + $query = sprintf("select %s from %s %s %s", $columns, implode(',',$table_list), implode(' ',$left_join), $condition); if(count($output->groups)) $query .= sprintf(' group by %s', implode(',',$output->groups)); @@ -611,7 +629,6 @@ } $query = sprintf('%s limit %d, %d', $query, $start_count, $list_count); - $result = $this->_query($query); if($this->isError()) { $buff = new Object(); diff --git a/classes/db/DBMysql_innodb.class.php b/classes/db/DBMysql_innodb.class.php index f9cfa704e..4203d1c7b 100644 --- a/classes/db/DBMysql_innodb.class.php +++ b/classes/db/DBMysql_innodb.class.php @@ -385,8 +385,19 @@ **/ function getCondition($output) { if(!$output->conditions) return; + $condition = $this->_getCondition($output->conditions,$output->column_type); + if($condition) $condition = ' where '.$condition; + return $condition; + } - foreach($output->conditions as $val) { + function getLeftCondition($conditions,$column_type){ + return $this->_getCondition($conditions,$column_type); + } + + + function _getCondition($conditions,$column_type) { + $condition = ''; + foreach($conditions as $val) { $sub_condition = ''; foreach($val['condition'] as $v) { if(!isset($v['value'])) continue; @@ -396,10 +407,10 @@ $name = $v['column']; $operation = $v['operation']; $value = $v['value']; - $type = $this->getColumnType($output->column_type,$name); + $type = $this->getColumnType($column_type,$name); $pipe = $v['pipe']; - $value = $this->getConditionValue($name, $value, $operation, $type, $output->column_type); + $value = $this->getConditionValue($name, $value, $operation, $type, $column_type); if(!$value) $value = $v['value']; $str = $this->getConditionPart($name, $value, $operation); if($sub_condition) $sub_condition .= ' '.$pipe.' '; @@ -410,8 +421,6 @@ $condition .= '('.$sub_condition.')'; } } - - if($condition) $condition = ' where '.$condition; return $condition; } @@ -502,6 +511,17 @@ $table_list[] = '`'.$this->prefix.$val.'` as '.$key; } + $left_join = array(); + // why??? + $left_tables= (array)$output->left_tables; + + foreach($left_tables as $key => $val) { + $condition = $this->_getCondition($output->left_conditions[$key],$output->column_type); + if($condition){ + $left_join[] = $val . ' `'.$this->prefix.$output->_tables[$key].'` as '.$key . ' on (' . $condition . ')'; + } + } + if(!$output->columns) { $columns = '*'; } else { @@ -524,7 +544,8 @@ $condition = $this->getCondition($output); - if($output->list_count && $output->page) return $this->_getNavigationData($table_list, $columns, $condition, $output); + if($output->list_count && $output->page) return $this->_getNavigationData($table_list, $columns, $left_join, $condition, $output); + // list_order, update_order 로 정렬시에 인덱스 사용을 위해 condition에 쿼리 추가 if($output->order) { @@ -539,7 +560,7 @@ } } - $query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition); + $query = sprintf("select %s from %s %s %s", $columns, implode(',',$table_list),implode(' ',$left_join), $condition); if(count($output->groups)) $query .= sprintf(' group by %s', implode(',',$output->groups)); @@ -567,11 +588,11 @@ * * 그닥 좋지는 않은 구조이지만 편리하다.. -_-; **/ - function _getNavigationData($table_list, $columns, $condition, $output) { + function _getNavigationData($table_list, $columns, $left_join, $condition, $output) { require_once(_XE_PATH_.'classes/page/PageHandler.class.php'); // 전체 개수를 구함 - $count_query = sprintf("select count(*) as count from %s %s", implode(',',$table_list), $condition); + $count_query = sprintf("select count(*) as count from %s %s %s", implode(',',$table_list),implode(' ',$left_join), $condition); $total_count = $this->getCountCache($output->tables, $condition); if($total_count === false) { $result = $this->_query($count_query); @@ -608,7 +629,7 @@ } } - $query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition); + $query = sprintf("select %s from %s %s %s", $columns, implode(',',$table_list), implode(' ',$left_join), $condition); if(count($output->groups)) $query .= sprintf(' group by %s', implode(',',$output->groups)); if($output->order) { diff --git a/classes/db/DBPostgresql.class.php b/classes/db/DBPostgresql.class.php index ac593469a..0e7fb8b07 100644 --- a/classes/db/DBPostgresql.class.php +++ b/classes/db/DBPostgresql.class.php @@ -69,20 +69,20 @@ * @brief DB 접속 **/ function _connect() { - // pg용 connection string - $conn_string = ""; + // pg용 connection string + $conn_string = ""; // db 정보가 없으면 무시 if(!$this->hostname || !$this->userid || !$this->database) return; - // connection string 만들기 - $conn_string .= ($this->hostname) ? " host=$this->hostname" : ""; - $conn_string .= ($this->userid) ? " user=$this->userid" : ""; - $conn_string .= ($this->password) ? " password=$this->password" : ""; - $conn_string .= ($this->database) ? " dbname=$this->database" : ""; - $conn_string .= ($this->port) ? " port=$this->port" : ""; + // connection string 만들기 + $conn_string .= ($this->hostname) ? " host=$this->hostname" : ""; + $conn_string .= ($this->userid) ? " user=$this->userid" : ""; + $conn_string .= ($this->password) ? " password=$this->password" : ""; + $conn_string .= ($this->database) ? " dbname=$this->database" : ""; + $conn_string .= ($this->port) ? " port=$this->port" : ""; - // 접속시도 + // 접속시도 $this->fd = @pg_connect($conn_string); if(!$this->fd || pg_connection_status($this->fd) != PGSQL_CONNECTION_OK) { $this->setError(-1, "CONNECTION FAILURE"); @@ -314,10 +314,10 @@ // 테이블 생성 schema 작성 $table_name = $xml_obj->table->attrs->name; - if($table_name == 'sequence') { + if($table_name == 'sequence') { $query = sprintf('create sequence %s', $this->prefix.$table_name); - return $this->_query($query); - } + return $this->_query($query); + } if($this->isTableExists($table_name)) return; $table_name = $this->prefix.$table_name; @@ -336,7 +336,7 @@ $default = $column->attrs->default; $auto_increment = $column->attrs->auto_increment; - if($type == "bignumber" || $type == "number") $size = 0; + if($type == "bignumber" || $type == "number") $size = 0; $column_schema[] = sprintf('%s %s%s %s %s', $name, @@ -361,7 +361,7 @@ } } - + $schema = sprintf('create table %s (%s%s);', $this->addQuotes($table_name), "\n", implode($column_schema,",\n")); $output = $this->_query($schema); @@ -381,8 +381,19 @@ **/ function getCondition($output) { if(!$output->conditions) return; + $condition = $this->_getCondition($output->conditions,$output->column_type); + if($condition) $condition = ' where '.$condition; + return $condition; + } - foreach($output->conditions as $val) { + function getLeftCondition($conditions,$column_type){ + return $this->_getCondition($conditions,$column_type); + } + + + function _getCondition($conditions,$column_type) { + $condition = ''; + foreach($conditions as $val) { $sub_condition = ''; foreach($val['condition'] as $v) { if(!isset($v['value'])) continue; @@ -392,10 +403,10 @@ $name = $v['column']; $operation = $v['operation']; $value = $v['value']; - $type = $this->getColumnType($output->column_type,$name); + $type = $this->getColumnType($column_type,$name); $pipe = $v['pipe']; - $value = $this->getConditionValue($name, $value, $operation, $type, $output->column_type); + $value = $this->getConditionValue($name, $value, $operation, $type, $column_type); if(!$value) $value = $v['value']; $str = $this->getConditionPart($name, $value, $operation); if($sub_condition) $sub_condition .= ' '.$pipe.' '; @@ -406,11 +417,10 @@ $condition .= '('.$sub_condition.')'; } } - - if($condition) $condition = ' where '.$condition; return $condition; } + /** * @brief insertAct 처리 **/ @@ -420,7 +430,7 @@ $table_list[] = $this->prefix.$val; } - // 컬럼 정리 + // 컬럼 정리 foreach($output->columns as $key => $val) { $name = $val['name']; $value = $val['value']; @@ -446,7 +456,7 @@ $table_list[] = $this->prefix.$val.' as '.$key; } - // 컬럼 정리 + // 컬럼 정리 foreach($output->columns as $key => $val) { if(!isset($val['value'])) continue; $name = $val['name']; @@ -498,6 +508,18 @@ $table_list[] = $this->prefix.$val.' as '.$key; } + $left_join = array(); + // why??? + $left_tables= (array)$output->left_tables; + + foreach($left_tables as $key => $val) { + $condition = $this->_getCondition($output->left_conditions[$key],$output->column_type); + if($condition){ + $left_join[] = $val . ' '.$this->prefix.$output->_tables[$key].' as '.$key . ' on (' . $condition . ')'; + } + } + + if(!$output->columns) { $columns = '*'; } else { @@ -520,7 +542,7 @@ $condition = $this->getCondition($output); - if($output->list_count && $output->page) return $this->_getNavigationData($table_list, $columns, $condition, $output); + if($output->list_count && $output->page) return $this->_getNavigationData($table_list, $columns, $left_join, $condition, $output); // list_order, update_order 로 정렬시에 인덱스 사용을 위해 condition에 쿼리 추가 if($output->order) { @@ -535,7 +557,7 @@ } } - $query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition); + $query = sprintf("select %s from %s %s %s", $columns, implode(',',$table_list),implode(' ',$left_join), $condition); if(count($output->groups)) $query .= sprintf(' group by %s', implode(',',$output->groups)); @@ -560,11 +582,11 @@ * * 그닥 좋지는 않은 구조이지만 편리하다.. -_-; **/ - function _getNavigationData($table_list, $columns, $condition, $output) { + function _getNavigationData($table_list, $columns, $left_join, $condition, $output) { require_once(_XE_PATH_.'classes/page/PageHandler.class.php'); // 전체 개수를 구함 - $count_query = sprintf("select count(*) as count from %s %s", implode(',',$table_list), $condition); + $count_query = sprintf("select count(*) as count from %s %s %s", implode(',',$table_list),implode(' ',$left_join), $condition); $total_count = $this->getCountCache($output->tables, $condition); if($total_count === false) { $result = $this->_query($count_query); @@ -601,7 +623,7 @@ } } - $query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition); + $query = sprintf("select %s from %s %s %s", $columns, implode(',',$table_list), implode(' ',$left_join), $condition); if(count($output->groups)) $query .= sprintf(' group by %s', implode(',',$output->groups)); diff --git a/classes/db/DBSqlite2.class.php b/classes/db/DBSqlite2.class.php index 47bfd5f48..34efa7da6 100644 --- a/classes/db/DBSqlite2.class.php +++ b/classes/db/DBSqlite2.class.php @@ -357,8 +357,19 @@ **/ function getCondition($output) { if(!$output->conditions) return; + $condition = $this->_getCondition($output->conditions,$output->column_type); + if($condition) $condition = ' where '.$condition; + return $condition; + } - foreach($output->conditions as $val) { + function getLeftCondition($conditions,$column_type){ + return $this->_getCondition($conditions,$column_type); + } + + + function _getCondition($conditions,$column_type) { + $condition = ''; + foreach($conditions as $val) { $sub_condition = ''; foreach($val['condition'] as $v) { if(!isset($v['value'])) continue; @@ -368,10 +379,10 @@ $name = $v['column']; $operation = $v['operation']; $value = $v['value']; - $type = $this->getColumnType($output->column_type,$name); + $type = $this->getColumnType($column_type,$name); $pipe = $v['pipe']; - $value = $this->getConditionValue($name, $value, $operation, $type, $output->column_type); + $value = $this->getConditionValue($name, $value, $operation, $type, $column_type); if(!$value) $value = $v['value']; $str = $this->getConditionPart($name, $value, $operation); if($sub_condition) $sub_condition .= ' '.$pipe.' '; @@ -382,8 +393,6 @@ $condition .= '('.$sub_condition.')'; } } - - if($condition) $condition = ' where '.$condition; return $condition; } @@ -509,6 +518,17 @@ $table_list[] = $this->prefix.$val.' as '.$key; } + $left_join = array(); + // why??? + $left_tables= (array)$output->left_tables; + + foreach($left_tables as $key => $val) { + $condition = $this->_getCondition($output->left_conditions[$key],$output->column_type); + if($condition){ + $left_join[] = $val . ' '.$this->prefix.$output->_tables[$key].' as '.$key . ' on ' . $condition . ''; + } + } + if(!$output->columns) { $columns = '*'; } else { @@ -531,7 +551,7 @@ $condition = $this->getCondition($output); - if($output->list_count && $output->page) return $this->_getNavigationData($table_list, $columns, $condition, $output); + if($output->list_count && $output->page) return $this->_getNavigationData($table_list, $columns, $left_join, $condition, $output); // list_order, update_order 로 정렬시에 인덱스 사용을 위해 condition에 쿼리 추가 if($output->order) { @@ -546,7 +566,7 @@ } } - $query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition); + $query = sprintf("select %s from %s %s %s", $columns, implode(',',$table_list),implode(' ',$left_join), $condition); if(count($output->groups)) $query .= sprintf(' group by %s', implode(',',$output->groups)); @@ -574,12 +594,14 @@ * * 그닥 좋지는 않은 구조이지만 편리하다.. -_-; **/ - function _getNavigationData($table_list, $columns, $condition, $output) { + function _getNavigationData($table_list, $columns, $left_join, $condition, $output) { require_once(_XE_PATH_.'classes/page/PageHandler.class.php'); // 전체 개수를 구함 - $count_query = sprintf("select count(*) as count from %s %s", implode(',',$table_list), $condition); + $count_query = sprintf("select count(*) as count from %s %s %s", implode(',',$table_list),implode(' ',$left_join), $condition); + $total_count = $this->getCountCache($output->tables, $condition); + if($total_count === false) { $result = $this->_query($count_query); $count_output = $this->_fetch($result); @@ -615,7 +637,8 @@ } } - $query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition); + $query = sprintf("select %s from %s %s %s", $columns, implode(',',$table_list), implode(' ',$left_join), $condition); + if(count($output->groups)) $query .= sprintf(' group by %s', implode(',',$output->groups)); diff --git a/classes/db/DBSqlite3_pdo.class.php b/classes/db/DBSqlite3_pdo.class.php index 994e1cec9..000487132 100644 --- a/classes/db/DBSqlite3_pdo.class.php +++ b/classes/db/DBSqlite3_pdo.class.php @@ -386,8 +386,19 @@ **/ function getCondition($output) { if(!$output->conditions) return; + $condition = $this->_getCondition($output->conditions,$output->column_type); + if($condition) $condition = ' where '.$condition; + return $condition; + } - foreach($output->conditions as $val) { + function getLeftCondition($conditions,$column_type){ + return $this->_getCondition($conditions,$column_type); + } + + + function _getCondition($conditions,$column_type) { + $condition = ''; + foreach($conditions as $val) { $sub_condition = ''; foreach($val['condition'] as $v) { if(!isset($v['value'])) continue; @@ -397,12 +408,11 @@ $name = $v['column']; $operation = $v['operation']; $value = $v['value']; - $type = $this->getColumnType($output->column_type,$name); + $type = $this->getColumnType($column_type,$name); $pipe = $v['pipe']; - $value = $this->getConditionValue($name, $value, $operation, $type, $output->column_type); + $value = $this->getConditionValue($name, $value, $operation, $type, $column_type); if(!$value) $value = $v['value']; - $str = $this->getConditionPart($name, $value, $operation); if($sub_condition) $sub_condition .= ' '.$pipe.' '; $sub_condition .= $str; @@ -412,8 +422,6 @@ $condition .= '('.$sub_condition.')'; } } - - if($condition) $condition = ' where '.$condition; return $condition; } @@ -550,6 +558,19 @@ $table_list[] = $this->prefix.$val.' as '.$key; } + $left_join = array(); + // why??? + $left_tables= (array)$output->left_tables; + + foreach($left_tables as $key => $val) { + $condition = $this->_getCondition($output->left_conditions[$key],$output->column_type); + if($condition){ + $left_join[] = $val . ' '.$this->prefix.$output->_tables[$key].' as '.$key . ' on (' . $condition . ')'; + } + } + + + if(!$output->columns) { $columns = '*'; } else { @@ -572,7 +593,7 @@ $condition = $this->getCondition($output); - if($output->list_count && $output->page) return $this->_getNavigationData($table_list, $columns, $condition, $output); + if($output->list_count && $output->page) return $this->_getNavigationData($table_list, $columns, $left_join, $condition, $output); // list_order, update_order 로 정렬시에 인덱스 사용을 위해 condition에 쿼리 추가 if($output->order) { @@ -587,7 +608,7 @@ } } - $query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition); + $query = sprintf("select %s from %s %s %s", $columns, implode(',',$table_list),implode(' ',$left_join), $condition); if(count($output->groups)) $query .= sprintf(' group by %s', implode(',',$output->groups)); @@ -615,11 +636,11 @@ * * 그닥 좋지는 않은 구조이지만 편리하다.. -_-; **/ - function _getNavigationData($table_list, $columns, $condition, $output) { + function _getNavigationData($table_list, $columns, $left_join, $condition, $output) { require_once(_XE_PATH_.'classes/page/PageHandler.class.php'); // 전체 개수를 구함 - $count_query = sprintf("select count(*) as count from %s %s", implode(',',$table_list), $condition); + $count_query = sprintf("select count(*) as count from %s %s %s", implode(',',$table_list),implode(' ',$left_join), $condition); $total_count = $this->getCountCache($output->tables, $condition); if($total_count === false) { $this->_prepare($count_query); @@ -656,7 +677,7 @@ } } - $query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition); + $query = sprintf("select %s from %s %s %s", $columns, implode(',',$table_list), implode(' ',$left_join), $condition); if(count($output->groups)) $query .= sprintf(' group by %s', implode(',',$output->groups)); diff --git a/classes/display/DisplayHandler.class.php b/classes/display/DisplayHandler.class.php index 34345fcc2..d81093ffd 100644 --- a/classes/display/DisplayHandler.class.php +++ b/classes/display/DisplayHandler.class.php @@ -33,7 +33,7 @@ // 요청방식에 따라 출력을 별도로 if(Context::getResponseMethod()=="HTML") { - + Context::set('content', $content); // 레이아웃을 컴파일 @@ -60,7 +60,7 @@ if(__DEBUG__==3) $GLOBALS['__trans_widget_editor_elapsed__'] = getMicroTime()-$start; - // 최종 결과를 common_layout에 넣어버림 + // 최종 결과를 common_layout에 넣어버림 Context::set('zbxe_final_content', $zbxe_final_content); $output = $oTemplate->compile('./common/tpl', 'common_layout'); @@ -172,50 +172,116 @@ $end = getMicroTime(); - // debug string 작성 시작 - $buff = "\n\n** Debug at ".date('Y-m-d H:i:s')." ************************************************************\n"; + if(__DEBUG_OUTPUT__ != 2) { + // debug string 작성 시작 + $buff = "\n\n** Debug at ".date('Y-m-d H:i:s')." ************************************************************\n"; - // Request/Response 정보 작성 - $buff .= "\n- Request/ Response info\n"; - $buff .= sprintf("\tRequest URI \t\t\t: %s:%s%s%s%s\n", $_SERVER['SERVER_NAME'], $_SERVER['SERVER_PORT'], $_SERVER['PHP_SELF'], $_SERVER['QUERY_STRING']?'?':'', $_SERVER['QUERY_STRING']); - $buff .= sprintf("\tRequest method \t\t\t: %s\n", $_SERVER['REQUEST_METHOD']); - $buff .= sprintf("\tResponse method \t\t: %s\n", Context::getResponseMethod()); - $buff .= sprintf("\tResponse contents size\t\t: %d byte\n", $this->getContentSize()); + // Request/Response 정보 작성 + $buff .= "\n- Request/ Response info\n"; + $buff .= sprintf("\tRequest URI \t\t\t: %s:%s%s%s%s\n", $_SERVER['SERVER_NAME'], $_SERVER['SERVER_PORT'], $_SERVER['PHP_SELF'], $_SERVER['QUERY_STRING']?'?':'', $_SERVER['QUERY_STRING']); + $buff .= sprintf("\tRequest method \t\t\t: %s\n", $_SERVER['REQUEST_METHOD']); + $buff .= sprintf("\tResponse method \t\t: %s\n", Context::getResponseMethod()); + $buff .= sprintf("\tResponse contents size\t\t: %d byte\n", $this->getContentSize()); - // DB 로그 작성 - if(__DEBUG__>1) { - if($GLOBALS['__db_queries__']) { - $buff .= "\n- DB Queries\n"; - $buff .= $GLOBALS['__db_queries__']; + // DB 로그 작성 + if(__DEBUG__ > 1) { + if($GLOBALS['__db_queries__']) { + $buff .= "\n- DB Queries\n"; + $num = 0; + foreach($GLOBALS['__db_queries__'] as $query) { + $buff .= sprintf("\t%02d. %s (%0.6f sec)\n", ++$num, $query['query'], $query['elapsed_time']); + if($query['result'] == 'Success') { + $buff .= "\t Query Success\n"; + } else { + $buff .= sprintf("\t Query $s : %d\n\t\t\t %s\n", $query['result'], $query['errno'], $query['errstr']); + } + } + } + $buff .= "\n- Elapsed time\n"; + + if($GLOBALS['__db_elapsed_time__']) $buff .= sprintf("\tDB queries elapsed time\t\t: %0.5f sec\n", $GLOBALS['__db_elapsed_time__']); } - $buff .= "\n- Elapsed time\n"; - if($GLOBALS['__db_elapsed_time__']) $buff .= sprintf("\tDB queries elapsed time\t\t: %0.5f sec\n", $GLOBALS['__db_elapsed_time__']); + // 기타 로그 작성 + if(__DEBUG__==3) { + $buff .= sprintf("\tclass file load elapsed time \t: %0.5f sec\n", $GLOBALS['__elapsed_class_load__']); + $buff .= sprintf("\tTemplate compile elapsed time\t: %0.5f sec (%d called)\n", $GLOBALS['__template_elapsed__'], $GLOBALS['__TemplateHandlerCalled__']); + $buff .= sprintf("\tXmlParse compile elapsed time\t: %0.5f sec\n", $GLOBALS['__xmlparse_elapsed__']); + $buff .= sprintf("\tPHP elapsed time \t\t: %0.5f sec\n", $end-__StartTime__-$GLOBALS['__template_elapsed__']-$GLOBALS['__xmlparse_elapsed__']-$GLOBALS['__db_elapsed_time__']-$GLOBALS['__elapsed_class_load__']); + + // 위젯 실행 시간 작성 + $buff .= sprintf("\n\tWidgets elapsed time \t\t: %0.5f sec", $GLOBALS['__widget_excute_elapsed__']); + + // 레이아웃 실행 시간 + $buff .= sprintf("\n\tLayout compile elapsed time \t: %0.5f sec", $GLOBALS['__layout_compile_elapsed__']); + + // 위젯, 에디터 컴포넌트 치환 시간 + $buff .= sprintf("\n\tTrans widget&editor elapsed time: %0.5f sec\n\n", $GLOBALS['__trans_widget_editor_elapsed__']); + } + + // 전체 실행 시간 작성 + $buff .= sprintf("\tTotal elapsed time \t\t: %0.5f sec", $end-__StartTime__); } - // 기타 로그 작성 - if(__DEBUG__==3) { - $buff .= sprintf("\tclass file load elapsed time \t: %0.5f sec\n", $GLOBALS['__elapsed_class_load__']); - $buff .= sprintf("\tTemplate compile elapsed time\t: %0.5f sec (%d called)\n", $GLOBALS['__template_elapsed__'], $GLOBALS['__TemplateHandlerCalled__']); - $buff .= sprintf("\tXmlParse compile elapsed time\t: %0.5f sec\n", $GLOBALS['__xmlparse_elapsed__']); - $buff .= sprintf("\tPHP elapsed time \t\t: %0.5f sec\n", $end-__StartTime__-$GLOBALS['__template_elapsed__']-$GLOBALS['__xmlparse_elapsed__']-$GLOBALS['__db_elapsed_time__']-$GLOBALS['__elapsed_class_load__']); - - // 위젯 실행 시간 작성 - $buff .= sprintf("\n\tWidgets elapsed time \t\t: %0.5f sec", $GLOBALS['__widget_excute_elapsed__']); - - // 레이아웃 실행 시간 - $buff .= sprintf("\n\tLayout compile elapsed time \t: %0.5f sec", $GLOBALS['__layout_compile_elapsed__']); - - // 위젯, 에디터 컴포넌트 치환 시간 - $buff .= sprintf("\n\tTrans widget&editor elapsed time: %0.5f sec\n\n", $GLOBALS['__trans_widget_editor_elapsed__']); + if(__DEBUG_OUTPUT__ == 1 && Context::getResponseMethod() == 'HTML') { + if(__DEBUG_PROTECT__ == 1 && __DEBUG_PROTECT_IP__ != $_SERVER['REMOTE_ADDR']) { + $buff = '허용되지 않은 IP 입니다. config/config.inc.php 파일의 __DEBUG_PROTECT_IP__ 상수 값을 자신의 IP로 변경하세요.'; + } + return ""; } - // 전체 실행 시간 작성 - $buff .= sprintf("\tTotal elapsed time \t\t: %0.5f sec", $end-__StartTime__); - - if(__DEBUG_OUTPUT__==1 && Context::getResponseMethod()=='HTML') return ""; - if(__DEBUG_OUTPUT__==0) debugPrint($buff, false); + + // Firebug 콘솔 출력 + if(__DEBUG_OUTPUT__ == 2) { + debugPrint( + array('Request / Response info >>> '.Context::getResponseMethod().' / '.$_SERVER['REQUEST_METHOD'], + array( + array('Request URI', 'Request method', 'Response method', 'Response contents size'), + array( + sprintf("%s:%s%s%s%s", $_SERVER['SERVER_NAME'], $_SERVER['SERVER_PORT'], $_SERVER['PHP_SELF'], $_SERVER['QUERY_STRING']?'?':'', $_SERVER['QUERY_STRING']), + $_SERVER['REQUEST_METHOD'], + Context::getResponseMethod(), + $this->getContentSize().' byte' + ) + ) + ), + FirePHP::TABLE + ); + + // 기타 로그 작성 + if(__DEBUG__ == 3 || __DEBUG__ == 1) { + debugPrint( + array('Elapsed time >>> Total : '.sprintf('%0.5f sec', $end - __StartTime__), + array(array('DB queries', 'class file load', 'Template compile', 'XmlParse compile', 'PHP', 'Widgets', 'Trans widget&editor'), + array( + sprintf('%0.5f sec', $GLOBALS['__db_elapsed_time__']), + sprintf('%0.5f sec', $GLOBALS['__elapsed_class_load__']), + sprintf('%0.5f sec (%d called)', $GLOBALS['__template_elapsed__'], $GLOBALS['__TemplateHandlerCalled__']), + sprintf('%0.5f sec', $GLOBALS['__xmlparse_elapsed__']), + sprintf('%0.5f sec', $end-__StartTime__-$GLOBALS['__template_elapsed__']-$GLOBALS['__xmlparse_elapsed__']-$GLOBALS['__db_elapsed_time__']-$GLOBALS['__elapsed_class_load__']), + sprintf('%0.5f sec', $GLOBALS['__widget_excute_elapsed__']), + sprintf('%0.5f sec', $GLOBALS['__trans_widget_editor_elapsed__']) + ) + ) + ), + FirePHP::TABLE + ); + } + + // DB 쿼리 로그 + if(__DEBUG__ > 1) { + $queries_output = array(array('Query', 'Elapsed time', 'Result')); + foreach($GLOBALS['__db_queries__'] as $query) { + array_push($queries_output, array($query['query'], sprintf('%0.5f', $query['elapsed_time']), $query['result'])); + } + debugPrint( + array('DB Queries >>> '.count($GLOBALS['__db_queries__']).' Queries, '.sprintf('%0.5f sec', $GLOBALS['__db_elapsed_time__']), $queries_output), + FirePHP::TABLE + ); + } + + } } /** diff --git a/classes/mail/Mail.class.php b/classes/mail/Mail.class.php index f9f2898b6..9c201559c 100644 --- a/classes/mail/Mail.class.php +++ b/classes/mail/Mail.class.php @@ -66,10 +66,12 @@ $headers = sprintf( "From: %s".$eol. + "To: %s".$eol. "MIME-Version: 1.0".$eol. "Content-Type: multipart/alternative;".$eol."\tboundary=\"%s\"".$eol.$eol. "", $this->getSender(), + $this->getReceiptor(), $boundary ); @@ -93,7 +95,7 @@ $boundary ); - return mail($this->getReceiptor(), $this->getTitle(), $body, $headers); + return mail($this->receiptor_email, $this->getTitle(), $body, $headers); } function checkMailMX($email_address) { diff --git a/classes/xml/XmlQueryParser.class.php b/classes/xml/XmlQueryParser.class.php index 2420b6b9c..be30f05d7 100644 --- a/classes/xml/XmlQueryParser.class.php +++ b/classes/xml/XmlQueryParser.class.php @@ -15,7 +15,7 @@ **/ function parse($query_id, $xml_file, $cache_file) { // query xml 파일을 찾아서 파싱, 결과가 없으면 return - $buff = FileHandler::readFile($xml_file); + $buff = FileHandler::readFile($xml_file); $xml_obj = parent::parse($buff); if(!$xml_obj) return; unset($buff); @@ -38,9 +38,14 @@ // 테이블 정리 (배열코드로 변환) $tables = $xml_obj->query->tables->table; + $output->left_tables = array(); + + $left_conditions = array(); + if(!$tables) return; if(!is_array($tables)) $tables = array($tables); foreach($tables as $key => $val) { + // 테이블과 alias의 이름을 구함 $table_name = $val->attrs->name; $alias = $val->attrs->alias; @@ -48,6 +53,11 @@ $output->tables[$alias] = $table_name; + if(in_array($val->attrs->type,array('left join','left outer join','right join','right outer join')) && count($val->conditions)){ + $output->left_tables[$alias] = $val->attrs->type; + $left_conditions[$alias] = $val->conditions; + } + // 테이블을 찾아서 컬럼의 속성을 구함 $table_file = sprintf('%s%s/%s/schemas/%s.xml', _XE_PATH_, 'modules', $module, $table_name); if(!file_exists($table_file)) { @@ -75,167 +85,92 @@ } } + // 컬럼 정리 $columns = $xml_obj->query->columns->column; - if(!$columns) { - $output->column[] = array("*" => "*"); - } else { - if(!is_array($columns)) $columns = array($columns); - foreach($columns as $key => $val) { - $name = $val->attrs->name; - /* - if(strpos('.',$name)===false && count($output->tables)==1) { - $tmp = array_values($output->tables); - $name = sprintf('%s.%s', $tmp[0], $val->attrs->name); - } - */ + $out = $this->_setColumn($columns); + $output->columns = $out->columns; - $output->columns[] = array( - "name" => $name, - "var" => $val->attrs->var, - "default" => $val->attrs->default, - "notnull" => $val->attrs->notnull, - "filter" => $val->attrs->filter, - "minlength" => $val->attrs->minlength, - "maxlength" => $val->attrs->maxlength, - "alias" => $val->attrs->alias, - ); - } - } - - // 조건절 정리 $conditions = $xml_obj->query->conditions; + $out = $this->_setConditions($conditions); + $output->conditions = $out->conditions; - $condition = $conditions->condition; - if($condition) { - $obj->condition = $condition; - unset($condition); - $condition = array($obj); - } - - $condition_group = $conditions->group; - if($condition_group && !is_array($condition_group)) $condition_group = array($condition_group); - - if($condition && $condition_group) $cond = array_merge($condition, $condition_group); - elseif($condition_group) $cond = $condition_group; - else $cond = $condition; - - if($cond) { - foreach($cond as $key => $val) { - unset($cond_output); - - if($val->attrs->pipe) $cond_output->pipe = $val->attrs->pipe; - else $cond_output->pipe = null; - - if(!$val->condition) continue; - if(!is_array($val->condition)) $val->condition = array($val->condition); - - foreach($val->condition as $k => $v) { - $obj = $v->attrs; - if(!$obj->alias) $obj->alias = $obj->column; - $cond_output->condition[] = $obj; - } - - $output->conditions[] = $cond_output; + foreach($output->left_tables as $key => $val){ + if($left_conditions[$key]){ + $out = $this->_setConditions($left_conditions[$key]); + $output->left_conditions[$key] = $out->conditions; } } - // group 정리 $group_list = $xml_obj->query->groups->group; - if($group_list) { - if(!is_array($group_list)) $group_list = array($group_list); - for($i=0;$iattrs->column); - if(!$column) continue; - $group_column_list[] = $column; - } - if(count($group_column_list)) $output->groups = $group_column_list; - } + $out = $this->_setGroup($group_list); + $output->groups = $out->groups; // 네비게이션 정리 - $navigation = $xml_obj->query->navigation; - if($navigation) { - $order = $navigation->index; - if($order) { - if(!is_array($order)) $order = array($order); - foreach($order as $order_info) { - $output->order[] = $order_info->attrs; - } - } + $out = $this->_setNavigation($xml_obj); + $output->order = $out->order; + $output->list_count = $out->list_count; + $output->page_count = $out->page_count; + $output->page = $out->page; - $list_count = $navigation->list_count->attrs; - $output->list_count = $list_count; - - $page_count = $navigation->page_count->attrs; - $output->page_count = $page_count; - - $page = $navigation->page->attrs; - $output->page = $page ; - } $column_count = count($output->columns); $condition_count = count($output->conditions); - // php script 생성 - - // table 정리 $buff .= '$output->tables = array( '; + foreach($output->tables as $key => $val) { + if(!array_key_exists($key,$output->left_tables)){ + $buff .= sprintf('"%s"=>"%s",', $key, $val); + } + } + $buff .= ' );'."\n"; + + + // php script 생성 + $buff .= '$output->_tables = array( '; foreach($output->tables as $key => $val) { $buff .= sprintf('"%s"=>"%s",', $key, $val); } $buff .= ' );'."\n"; + + + if(count($output->left_tables)){ + $buff .= '$output->left_tables = array( '; + foreach($output->left_tables as $key => $val) { + $buff .= sprintf('"%s"=>"%s",', $key, $val); + } + $buff .= ' );'."\n"; + } + + // column 정리 if($column_count) { $buff .= '$output->columns = array ( '; - foreach($output->columns as $key => $val) { - $val['default'] = $this->getDefault($val['name'], $val['default']); - if($val['var'] && strpos($val['var'],'.')===false) { - - if($val['default']) $buff .= sprintf('array("name"=>"%s", "alias"=>"%s", "value"=>$args->%s?$args->%s:%s),%s', $val['name'], $val['alias'], $val['var'], $val['var'], $val['default'] ,"\n"); - else $buff .= sprintf('array("name"=>"%s", "alias"=>"%s", "value"=>$args->%s),%s', $val['name'], $val['alias'], $val['var'], "\n"); - - if($val['default']) $default_list[$val['var']] = $val['default']; - if($val['notnull']) $notnull_list[] = $val['var']; - if($val['minlength']) $minlength_list[$val['var']] = $val['minlength']; - if($val['maxlength']) $maxlength_list[$val['var']] = $val['maxlength']; - } else { - if($val['default']) $buff .= sprintf('array("name"=>"%s", "alias"=>"%s", "value"=>%s),%s', $val['name'], $val['alias'], $val['default'] ,"\n"); - else $buff .= sprintf('array("name"=>"%s", "alias"=>"%s",),%s', $val['name'], $val['alias'], "\n"); - } - } + $buff .= $this->_getColumn($output->columns); $buff .= ' );'."\n"; } // conditions 정리 if($condition_count) { $buff .= '$output->conditions = array ( '; - foreach($output->conditions as $key => $val) { - $buff .= sprintf('array("pipe"=>"%s",%s"condition"=>array(', $val->pipe,"\n"); - foreach($val->condition as $k => $v) { - $v->default = $this->getDefault($v->column, $v->default); - if($v->var) { - if(strpos($v->var,".")===false) { - if($v->default) $default_list[$v->var] = $v->default; - if($v->filter) $filter_list[] = $v; - if($v->notnull) $notnull_list[] = $v->var; - if($v->default) $buff .= sprintf('array("column"=>"%s", "value"=>$args->%s?$args->%s:%s,"pipe"=>"%s","operation"=>"%s",),%s', $v->column, $v->var, $v->var, $v->default, $v->pipe, $v->operation, "\n"); - else $buff .= sprintf('array("column"=>"%s", "value"=>$args->%s,"pipe"=>"%s","operation"=>"%s",),%s', $v->column, $v->var, $v->pipe, $v->operation, "\n"); - } else { - $buff .= sprintf('array("column"=>"%s", "value"=>"%s","pipe"=>"%s","operation"=>"%s",),%s', $v->column, $v->var, $v->pipe, $v->operation, "\n"); - } - } else { - if($v->default) $buff .= sprintf('array("column"=>"%s", "value"=>%s,"pipe"=>"%s","operation"=>"%s",),%s', $v->column, $v->default ,$v->pipe, $v->operation,"\n"); - else $buff .= sprintf('array("column"=>"%s", "pipe"=>"%s","operation"=>"%s",),%s', $v->column, $v->pipe, $v->operation,"\n"); - } - } - $buff .= ')),'."\n"; - } - + $buff .= $this->_getConditions($output->conditions); $buff .= ' );'."\n"; } + // conditions 정리 + if(count($output->left_conditions)) { + $buff .= '$output->left_conditions = array ( '; + foreach($output->left_conditions as $key => $val){ + $buff .= "'{$key}' => array ( "; + $buff .= $this->_getConditions($val); + $buff .= "),\n"; + } + $buff .= ' );'."\n"; + } + + + // order 정리 if($output->order) { $buff .= '$output->order = array('; @@ -312,6 +247,179 @@ FileHandler::writeFile($cache_file, $buff); } + + + + function _setColumn($columns){ + + if(!$columns) { + $output->column[] = array("*" => "*"); + } else { + if(!is_array($columns)) $columns = array($columns); + foreach($columns as $key => $val) { + $name = $val->attrs->name; + /* + if(strpos('.',$name)===false && count($output->tables)==1) { + $tmp = array_values($output->tables); + $name = sprintf('%s.%s', $tmp[0], $val->attrs->name); + } + */ + + $output->columns[] = array( + "name" => $name, + "var" => $val->attrs->var, + "default" => $val->attrs->default, + "notnull" => $val->attrs->notnull, + "filter" => $val->attrs->filter, + "minlength" => $val->attrs->minlength, + "maxlength" => $val->attrs->maxlength, + "alias" => $val->attrs->alias, + ); + } + } + return $output; + } + + + function _setConditions($conditions){ + // 조건절 정리 + + $condition = $conditions->condition; + if($condition) { + $obj->condition = $condition; + unset($condition); + $condition = array($obj); + } + $condition_group = $conditions->group; + if($condition_group && !is_array($condition_group)) $condition_group = array($condition_group); + + if($condition && $condition_group) $cond = array_merge($condition, $condition_group); + elseif($condition_group) $cond = $condition_group; + else $cond = $condition; + + if($cond) { + foreach($cond as $key => $val) { + unset($cond_output); + + if($val->attrs->pipe) $cond_output->pipe = $val->attrs->pipe; + else $cond_output->pipe = null; + + if(!$val->condition) continue; + if(!is_array($val->condition)) $val->condition = array($val->condition); + + foreach($val->condition as $k => $v) { + $obj = $v->attrs; + if(!$obj->alias) $obj->alias = $obj->column; + $cond_output->condition[] = $obj; + } + + $output->conditions[] = $cond_output; + } + } + return $output; + } + + function _setGroup($group_list){ + // group 정리 + + if($group_list) { + if(!is_array($group_list)) $group_list = array($group_list); + for($i=0;$iattrs->column); + if(!$column) continue; + $group_column_list[] = $column; + } + if(count($group_column_list)) $output->groups = $group_column_list; + } + return $output; + } + + + function _setNavigation($xml_obj){ + $navigation = $xml_obj->query->navigation; + if($navigation) { + $order = $navigation->index; + if($order) { + if(!is_array($order)) $order = array($order); + foreach($order as $order_info) { + $output->order[] = $order_info->attrs; + } + } + + $list_count = $navigation->list_count->attrs; + $output->list_count = $list_count; + + $page_count = $navigation->page_count->attrs; + $output->page_count = $page_count; + + $page = $navigation->page->attrs; + $output->page = $page ; + } + return $output; + } + + + + + + function _getColumn($columns){ + $buff = ''; + foreach($columns as $key => $val) { + $val['default'] = $this->getDefault($val['name'], $val['default']); + if($val['var'] && strpos($val['var'],'.')===false) { + + if($val['default']) $buff .= sprintf('array("name"=>"%s", "alias"=>"%s", "value"=>$args->%s?$args->%s:%s),%s', $val['name'], $val['alias'], $val['var'], $val['var'], $val['default'] ,"\n"); + else $buff .= sprintf('array("name"=>"%s", "alias"=>"%s", "value"=>$args->%s),%s', $val['name'], $val['alias'], $val['var'], "\n"); + + if($val['default']) $default_list[$val['var']] = $val['default']; + if($val['notnull']) $notnull_list[] = $val['var']; + if($val['minlength']) $minlength_list[$val['var']] = $val['minlength']; + if($val['maxlength']) $maxlength_list[$val['var']] = $val['maxlength']; + } else { + if($val['default']) $buff .= sprintf('array("name"=>"%s", "alias"=>"%s", "value"=>%s),%s', $val['name'], $val['alias'], $val['default'] ,"\n"); + else $buff .= sprintf('array("name"=>"%s", "alias"=>"%s",),%s', $val['name'], $val['alias'], "\n"); + } + } + return $buff; + } + + + + + + function _getConditions($conditions){ + $buff = ''; + foreach($conditions as $key => $val) { + $buff .= sprintf('array("pipe"=>"%s",%s"condition"=>array(', $val->pipe,"\n"); + foreach($val->condition as $k => $v) { + $v->default = $this->getDefault($v->column, $v->default); + if($v->var) { + if(strpos($v->var,".")===false) { + if($v->default) $default_list[$v->var] = $v->default; + if($v->filter) $filter_list[] = $v; + if($v->notnull) $notnull_list[] = $v->var; + if($v->default) $buff .= sprintf('array("column"=>"%s", "value"=>$args->%s?$args->%s:%s,"pipe"=>"%s","operation"=>"%s",),%s', $v->column, $v->var, $v->var, $v->default, $v->pipe, $v->operation, "\n"); + else $buff .= sprintf('array("column"=>"%s", "value"=>$args->%s,"pipe"=>"%s","operation"=>"%s",),%s', $v->column, $v->var, $v->pipe, $v->operation, "\n"); + } else { + $buff .= sprintf('array("column"=>"%s", "value"=>"%s","pipe"=>"%s","operation"=>"%s",),%s', $v->column, $v->var, $v->pipe, $v->operation, "\n"); + } + } else { + if($v->default) $buff .= sprintf('array("column"=>"%s", "value"=>%s,"pipe"=>"%s","operation"=>"%s",),%s', $v->column, $v->default ,$v->pipe, $v->operation,"\n"); + else $buff .= sprintf('array("column"=>"%s", "pipe"=>"%s","operation"=>"%s",),%s', $v->column, $v->pipe, $v->operation,"\n"); + } + } + $buff .= ')),'."\n"; + } + return $buff; + } + + + + + + + /** * @brief column, condition등의 key에 default 값을 세팅 **/ @@ -331,7 +439,7 @@ $val = 'time()'; break; case 'curdate' : - $val = 'date("YmdHis")'; + $val = 'date("YmdHis")'; break; case 'sequence' : $val = '$this->getNextSequence()'; diff --git a/common/js/jquery.js b/common/js/jquery.js index 88e661eec..82b98e1d7 100644 --- a/common/js/jquery.js +++ b/common/js/jquery.js @@ -1,4 +1,3 @@ -(function(){ /* * jQuery 1.2.6 - New Wave Javascript * @@ -9,3541 +8,25 @@ * $Date: 2008-05-24 14:22:17 -0400 (Sat, 24 May 2008) $ * $Rev: 5685 $ */ - -// Map over jQuery in case of overwrite -var _jQuery = window.jQuery, -// Map over the $ in case of overwrite - _$ = window.$; - -var jQuery = window.jQuery = window.$ = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - return new jQuery.fn.init( selector, context ); -}; - -// A simple way to check for HTML strings or ID strings -// (both of which we optimize for) -var quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/, - -// Is it a simple selector - isSimple = /^.[^:#\[\.]*$/, - -// Will speed up references to undefined, and allows munging its name. - undefined; - -jQuery.fn = jQuery.prototype = { - init: function( selector, context ) { - // Make sure that a selection was provided - selector = selector || document; - - // Handle $(DOMElement) - if ( selector.nodeType ) { - this[0] = selector; - this.length = 1; - return this; - } - // Handle HTML strings - if ( typeof selector == "string" ) { - // Are we dealing with HTML string or an ID? - var match = quickExpr.exec( selector ); - - // Verify a match, and that no context was specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) - selector = jQuery.clean( [ match[1] ], context ); - - // HANDLE: $("#id") - else { - var elem = document.getElementById( match[3] ); - - // Make sure an element was located - if ( elem ){ - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id != match[3] ) - return jQuery().find( selector ); - - // Otherwise, we inject the element directly into the jQuery object - return jQuery( elem ); - } - selector = []; - } - - // HANDLE: $(expr, [context]) - // (which is just equivalent to: $(content).find(expr) - } else - return jQuery( context ).find( selector ); - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) - return jQuery( document )[ jQuery.fn.ready ? "ready" : "load" ]( selector ); - - return this.setArray(jQuery.makeArray(selector)); - }, - - // The current version of jQuery being used - jquery: "1.2.6", - - // The number of elements contained in the matched element set - size: function() { - return this.length; - }, - - // The number of elements contained in the matched element set - length: 0, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num == undefined ? - - // Return a 'clean' array - jQuery.makeArray( this ) : - - // Return just the object - this[ num ]; - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - // Build a new jQuery matched element set - var ret = jQuery( elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - // Return the newly-formed element set - return ret; - }, - - // Force the current matched set of elements to become - // the specified array of elements (destroying the stack in the process) - // You should use pushStack() in order to do this, but maintain the stack - setArray: function( elems ) { - // Resetting the length to 0, then using the native Array push - // is a super-fast way to populate an object with array-like properties - this.length = 0; - Array.prototype.push.apply( this, elems ); - - return this; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - var ret = -1; - - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem && elem.jquery ? elem[0] : elem - , this ); - }, - - attr: function( name, value, type ) { - var options = name; - - // Look for the case where we're accessing a style value - if ( name.constructor == String ) - if ( value === undefined ) - return this[0] && jQuery[ type || "attr" ]( this[0], name ); - - else { - options = {}; - options[ name ] = value; - } - - // Check to see if we're setting style values - return this.each(function(i){ - // Set all the styles - for ( name in options ) - jQuery.attr( - type ? - this.style : - this, - name, jQuery.prop( this, options[ name ], type, i, name ) - ); - }); - }, - - css: function( key, value ) { - // ignore negative width and height values - if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 ) - value = undefined; - return this.attr( key, value, "curCSS" ); - }, - - text: function( text ) { - if ( typeof text != "object" && text != null ) - return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); - - var ret = ""; - - jQuery.each( text || this, function(){ - jQuery.each( this.childNodes, function(){ - if ( this.nodeType != 8 ) - ret += this.nodeType != 1 ? - this.nodeValue : - jQuery.fn.text( [ this ] ); - }); - }); - - return ret; - }, - - wrapAll: function( html ) { - if ( this[0] ) - // The elements to wrap the target around - jQuery( html, this[0].ownerDocument ) - .clone() - .insertBefore( this[0] ) - .map(function(){ - var elem = this; - - while ( elem.firstChild ) - elem = elem.firstChild; - - return elem; - }) - .append(this); - - return this; - }, - - wrapInner: function( html ) { - return this.each(function(){ - jQuery( this ).contents().wrapAll( html ); - }); - }, - - wrap: function( html ) { - return this.each(function(){ - jQuery( this ).wrapAll( html ); - }); - }, - - append: function() { - return this.domManip(arguments, true, false, function(elem){ - if (this.nodeType == 1) - this.appendChild( elem ); - }); - }, - - prepend: function() { - return this.domManip(arguments, true, true, function(elem){ - if (this.nodeType == 1) - this.insertBefore( elem, this.firstChild ); - }); - }, - - before: function() { - return this.domManip(arguments, false, false, function(elem){ - this.parentNode.insertBefore( elem, this ); - }); - }, - - after: function() { - return this.domManip(arguments, false, true, function(elem){ - this.parentNode.insertBefore( elem, this.nextSibling ); - }); - }, - - end: function() { - return this.prevObject || jQuery( [] ); - }, - - find: function( selector ) { - var elems = jQuery.map(this, function(elem){ - return jQuery.find( selector, elem ); - }); - - return this.pushStack( /[^+>] [^+>]/.test( selector ) || selector.indexOf("..") > -1 ? - jQuery.unique( elems ) : - elems ); - }, - - clone: function( events ) { - // Do the clone - var ret = this.map(function(){ - if ( jQuery.browser.msie && !jQuery.isXMLDoc(this) ) { - // IE copies events bound via attachEvent when - // using cloneNode. Calling detachEvent on the - // clone will also remove the events from the orignal - // In order to get around this, we use innerHTML. - // Unfortunately, this means some modifications to - // attributes in IE that are actually only stored - // as properties will not be copied (such as the - // the name attribute on an input). - var clone = this.cloneNode(true), - container = document.createElement("div"); - container.appendChild(clone); - return jQuery.clean([container.innerHTML])[0]; - } else - return this.cloneNode(true); - }); - - // Need to set the expando to null on the cloned set if it exists - // removeData doesn't work here, IE removes it from the original as well - // this is primarily for IE but the data expando shouldn't be copied over in any browser - var clone = ret.find("*").andSelf().each(function(){ - if ( this[ expando ] != undefined ) - this[ expando ] = null; - }); - - // Copy the events from the original to the clone - if ( events === true ) - this.find("*").andSelf().each(function(i){ - if (this.nodeType == 3) - return; - var events = jQuery.data( this, "events" ); - - for ( var type in events ) - for ( var handler in events[ type ] ) - jQuery.event.add( clone[ i ], type, events[ type ][ handler ], events[ type ][ handler ].data ); - }); - - // Return the cloned set - return ret; - }, - - filter: function( selector ) { - return this.pushStack( - jQuery.isFunction( selector ) && - jQuery.grep(this, function(elem, i){ - return selector.call( elem, i ); - }) || - - jQuery.multiFilter( selector, this ) ); - }, - - not: function( selector ) { - if ( selector.constructor == String ) - // test special case where just one selector is passed in - if ( isSimple.test( selector ) ) - return this.pushStack( jQuery.multiFilter( selector, this, true ) ); - else - selector = jQuery.multiFilter( selector, this ); - - var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType; - return this.filter(function() { - return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector; - }); - }, - - add: function( selector ) { - return this.pushStack( jQuery.unique( jQuery.merge( - this.get(), - typeof selector == 'string' ? - jQuery( selector ) : - jQuery.makeArray( selector ) - ))); - }, - - is: function( selector ) { - return !!selector && jQuery.multiFilter( selector, this ).length > 0; - }, - - hasClass: function( selector ) { - return this.is( "." + selector ); - }, - - val: function( value ) { - if ( value == undefined ) { - - if ( this.length ) { - var elem = this[0]; - - // We need to handle select boxes special - if ( jQuery.nodeName( elem, "select" ) ) { - var index = elem.selectedIndex, - values = [], - options = elem.options, - one = elem.type == "select-one"; - - // Nothing was selected - if ( index < 0 ) - return null; - - // Loop through all the selected options - for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { - var option = options[ i ]; - - if ( option.selected ) { - // Get the specifc value for the option - value = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value; - - // We don't need an array for one selects - if ( one ) - return value; - - // Multi-Selects return an array - values.push( value ); - } - } - - return values; - - // Everything else, we just grab the value - } else - return (this[0].value || "").replace(/\r/g, ""); - - } - - return undefined; - } - - if( value.constructor == Number ) - value += ''; - - return this.each(function(){ - if ( this.nodeType != 1 ) - return; - - if ( value.constructor == Array && /radio|checkbox/.test( this.type ) ) - this.checked = (jQuery.inArray(this.value, value) >= 0 || - jQuery.inArray(this.name, value) >= 0); - - else if ( jQuery.nodeName( this, "select" ) ) { - var values = jQuery.makeArray(value); - - jQuery( "option", this ).each(function(){ - this.selected = (jQuery.inArray( this.value, values ) >= 0 || - jQuery.inArray( this.text, values ) >= 0); - }); - - if ( !values.length ) - this.selectedIndex = -1; - - } else - this.value = value; - }); - }, - - html: function( value ) { - return value == undefined ? - (this[0] ? - this[0].innerHTML : - null) : - this.empty().append( value ); - }, - - replaceWith: function( value ) { - return this.after( value ).remove(); - }, - - eq: function( i ) { - return this.slice( i, i + 1 ); - }, - - slice: function() { - return this.pushStack( Array.prototype.slice.apply( this, arguments ) ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function(elem, i){ - return callback.call( elem, i, elem ); - })); - }, - - andSelf: function() { - return this.add( this.prevObject ); - }, - - data: function( key, value ){ - var parts = key.split("."); - parts[1] = parts[1] ? "." + parts[1] : ""; - - if ( value === undefined ) { - var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]); - - if ( data === undefined && this.length ) - data = jQuery.data( this[0], key ); - - return data === undefined && parts[1] ? - this.data( parts[0] ) : - data; - } else - return this.trigger("setData" + parts[1] + "!", [parts[0], value]).each(function(){ - jQuery.data( this, key, value ); - }); - }, - - removeData: function( key ){ - return this.each(function(){ - jQuery.removeData( this, key ); - }); - }, - - domManip: function( args, table, reverse, callback ) { - var clone = this.length > 1, elems; - - return this.each(function(){ - if ( !elems ) { - elems = jQuery.clean( args, this.ownerDocument ); - - if ( reverse ) - elems.reverse(); - } - - var obj = this; - - if ( table && jQuery.nodeName( this, "table" ) && jQuery.nodeName( elems[0], "tr" ) ) - obj = this.getElementsByTagName("tbody")[0] || this.appendChild( this.ownerDocument.createElement("tbody") ); - - var scripts = jQuery( [] ); - - jQuery.each(elems, function(){ - var elem = clone ? - jQuery( this ).clone( true )[0] : - this; - - // execute all scripts after the elements have been injected - if ( jQuery.nodeName( elem, "script" ) ) - scripts = scripts.add( elem ); - else { - // Remove any inner scripts for later evaluation - if ( elem.nodeType == 1 ) - scripts = scripts.add( jQuery( "script", elem ).remove() ); - - // Inject the elements into the document - callback.call( obj, elem ); - } - }); - - scripts.each( evalScript ); - }); - } -}; - -// Give the init function the jQuery prototype for later instantiation -jQuery.fn.init.prototype = jQuery.fn; - -function evalScript( i, elem ) { - if ( elem.src ) - jQuery.ajax({ - url: elem.src, - async: false, - dataType: "script" - }); - - else - jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" ); - - if ( elem.parentNode ) - elem.parentNode.removeChild( elem ); -} - -function now(){ - return +new Date; -} - -jQuery.extend = jQuery.fn.extend = function() { - // copy reference to target object - var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options; - - // Handle a deep copy situation - if ( target.constructor == Boolean ) { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target != "object" && typeof target != "function" ) - target = {}; - - // extend jQuery itself if only one argument is passed - if ( length == i ) { - target = this; - --i; - } - - for ( ; i < length; i++ ) - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) - // Extend the base object - for ( var name in options ) { - var src = target[ name ], copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) - continue; - - // Recurse if we're merging object values - if ( deep && copy && typeof copy == "object" && !copy.nodeType ) - target[ name ] = jQuery.extend( deep, - // Never move original objects, clone them - src || ( copy.length != null ? [ ] : { } ) - , copy ); - - // Don't bring in undefined values - else if ( copy !== undefined ) - target[ name ] = copy; - - } - - // Return the modified object - return target; -}; - -var expando = "jQuery" + now(), uuid = 0, windowData = {}, - // exclude the following css properties to add px - exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i, - // cache defaultView - defaultView = document.defaultView || {}; - -jQuery.extend({ - noConflict: function( deep ) { - window.$ = _$; - - if ( deep ) - window.jQuery = _jQuery; - - return jQuery; - }, - - // See test/unit/core.js for details concerning this function. - isFunction: function( fn ) { - return !!fn && typeof fn != "string" && !fn.nodeName && - fn.constructor != Array && /^[\s[]?function/.test( fn + "" ); - }, - - // check if an element is in a (or is an) XML document - isXMLDoc: function( elem ) { - return elem.documentElement && !elem.body || - elem.tagName && elem.ownerDocument && !elem.ownerDocument.body; - }, - - // Evalulates a script in a global context - globalEval: function( data ) { - data = jQuery.trim( data ); - - if ( data ) { - // Inspired by code by Andrea Giammarchi - // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html - var head = document.getElementsByTagName("head")[0] || document.documentElement, - script = document.createElement("script"); - - script.type = "text/javascript"; - if ( jQuery.browser.msie ) - script.text = data; - else - script.appendChild( document.createTextNode( data ) ); - - // Use insertBefore instead of appendChild to circumvent an IE6 bug. - // This arises when a base node is used (#2709). - head.insertBefore( script, head.firstChild ); - head.removeChild( script ); - } - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase(); - }, - - cache: {}, - - data: function( elem, name, data ) { - elem = elem == window ? - windowData : - elem; - - var id = elem[ expando ]; - - // Compute a unique ID for the element - if ( !id ) - id = elem[ expando ] = ++uuid; - - // Only generate the data cache if we're - // trying to access or manipulate it - if ( name && !jQuery.cache[ id ] ) - jQuery.cache[ id ] = {}; - - // Prevent overriding the named cache with undefined values - if ( data !== undefined ) - jQuery.cache[ id ][ name ] = data; - - // Return the named cache data, or the ID for the element - return name ? - jQuery.cache[ id ][ name ] : - id; - }, - - removeData: function( elem, name ) { - elem = elem == window ? - windowData : - elem; - - var id = elem[ expando ]; - - // If we want to remove a specific section of the element's data - if ( name ) { - if ( jQuery.cache[ id ] ) { - // Remove the section of cache data - delete jQuery.cache[ id ][ name ]; - - // If we've removed all the data, remove the element's cache - name = ""; - - for ( name in jQuery.cache[ id ] ) - break; - - if ( !name ) - jQuery.removeData( elem ); - } - - // Otherwise, we want to remove all of the element's data - } else { - // Clean up the element expando - try { - delete elem[ expando ]; - } catch(e){ - // IE has trouble directly removing the expando - // but it's ok with using removeAttribute - if ( elem.removeAttribute ) - elem.removeAttribute( expando ); - } - - // Completely remove the data cache - delete jQuery.cache[ id ]; - } - }, - - // args is for internal usage only - each: function( object, callback, args ) { - var name, i = 0, length = object.length; - - if ( args ) { - if ( length == undefined ) { - for ( name in object ) - if ( callback.apply( object[ name ], args ) === false ) - break; - } else - for ( ; i < length; ) - if ( callback.apply( object[ i++ ], args ) === false ) - break; - - // A special, fast, case for the most common use of each - } else { - if ( length == undefined ) { - for ( name in object ) - if ( callback.call( object[ name ], name, object[ name ] ) === false ) - break; - } else - for ( var value = object[0]; - i < length && callback.call( value, i, value ) !== false; value = object[++i] ){} - } - - return object; - }, - - prop: function( elem, value, type, i, name ) { - // Handle executable functions - if ( jQuery.isFunction( value ) ) - value = value.call( elem, i ); - - // Handle passing in a number to a CSS property - return value && value.constructor == Number && type == "curCSS" && !exclude.test( name ) ? - value + "px" : - value; - }, - - className: { - // internal only, use addClass("class") - add: function( elem, classNames ) { - jQuery.each((classNames || "").split(/\s+/), function(i, className){ - if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) ) - elem.className += (elem.className ? " " : "") + className; - }); - }, - - // internal only, use removeClass("class") - remove: function( elem, classNames ) { - if (elem.nodeType == 1) - elem.className = classNames != undefined ? - jQuery.grep(elem.className.split(/\s+/), function(className){ - return !jQuery.className.has( classNames, className ); - }).join(" ") : - ""; - }, - - // internal only, use hasClass("class") - has: function( elem, className ) { - return jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1; - } - }, - - // A method for quickly swapping in/out CSS properties to get correct calculations - swap: function( elem, options, callback ) { - var old = {}; - // Remember the old values, and insert the new ones - for ( var name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - callback.call( elem ); - - // Revert the old values - for ( var name in options ) - elem.style[ name ] = old[ name ]; - }, - - css: function( elem, name, force ) { - if ( name == "width" || name == "height" ) { - var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ]; - - function getWH() { - val = name == "width" ? elem.offsetWidth : elem.offsetHeight; - var padding = 0, border = 0; - jQuery.each( which, function() { - padding += parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0; - border += parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0; - }); - val -= Math.round(padding + border); - } - - if ( jQuery(elem).is(":visible") ) - getWH(); - else - jQuery.swap( elem, props, getWH ); - - return Math.max(0, val); - } - - return jQuery.curCSS( elem, name, force ); - }, - - curCSS: function( elem, name, force ) { - var ret, style = elem.style; - - // A helper method for determining if an element's values are broken - function color( elem ) { - if ( !jQuery.browser.safari ) - return false; - - // defaultView is cached - var ret = defaultView.getComputedStyle( elem, null ); - return !ret || ret.getPropertyValue("color") == ""; - } - - // We need to handle opacity special in IE - if ( name == "opacity" && jQuery.browser.msie ) { - ret = jQuery.attr( style, "opacity" ); - - return ret == "" ? - "1" : - ret; - } - // Opera sometimes will give the wrong display answer, this fixes it, see #2037 - if ( jQuery.browser.opera && name == "display" ) { - var save = style.outline; - style.outline = "0 solid black"; - style.outline = save; - } - - // Make sure we're using the right name for getting the float value - if ( name.match( /float/i ) ) - name = styleFloat; - - if ( !force && style && style[ name ] ) - ret = style[ name ]; - - else if ( defaultView.getComputedStyle ) { - - // Only "float" is needed here - if ( name.match( /float/i ) ) - name = "float"; - - name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase(); - - var computedStyle = defaultView.getComputedStyle( elem, null ); - - if ( computedStyle && !color( elem ) ) - ret = computedStyle.getPropertyValue( name ); - - // If the element isn't reporting its values properly in Safari - // then some display: none elements are involved - else { - var swap = [], stack = [], a = elem, i = 0; - - // Locate all of the parent display: none elements - for ( ; a && color(a); a = a.parentNode ) - stack.unshift(a); - - // Go through and make them visible, but in reverse - // (It would be better if we knew the exact display type that they had) - for ( ; i < stack.length; i++ ) - if ( color( stack[ i ] ) ) { - swap[ i ] = stack[ i ].style.display; - stack[ i ].style.display = "block"; - } - - // Since we flip the display style, we have to handle that - // one special, otherwise get the value - ret = name == "display" && swap[ stack.length - 1 ] != null ? - "none" : - ( computedStyle && computedStyle.getPropertyValue( name ) ) || ""; - - // Finally, revert the display styles back - for ( i = 0; i < swap.length; i++ ) - if ( swap[ i ] != null ) - stack[ i ].style.display = swap[ i ]; - } - - // We should always get a number back from opacity - if ( name == "opacity" && ret == "" ) - ret = "1"; - - } else if ( elem.currentStyle ) { - var camelCase = name.replace(/\-(\w)/g, function(all, letter){ - return letter.toUpperCase(); - }); - - ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ]; - - // From the awesome hack by Dean Edwards - // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 - - // If we're not dealing with a regular pixel number - // but a number that has a weird ending, we need to convert it to pixels - if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) { - // Remember the original values - var left = style.left, rsLeft = elem.runtimeStyle.left; - - // Put in the new values to get a computed value out - elem.runtimeStyle.left = elem.currentStyle.left; - style.left = ret || 0; - ret = style.pixelLeft + "px"; - - // Revert the changed values - style.left = left; - elem.runtimeStyle.left = rsLeft; - } - } - - return ret; - }, - - clean: function( elems, context ) { - var ret = []; - context = context || document; - // !context.createElement fails in IE with an error but returns typeof 'object' - if (typeof context.createElement == 'undefined') - context = context.ownerDocument || context[0] && context[0].ownerDocument || document; - - jQuery.each(elems, function(i, elem){ - if ( !elem ) - return; - - if ( elem.constructor == Number ) - elem += ''; - - // Convert html string into DOM nodes - if ( typeof elem == "string" ) { - // Fix "XHTML"-style tags in all browsers - elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){ - return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ? - all : - front + ">"; - }); - - // Trim whitespace, otherwise indexOf won't work as expected - var tags = jQuery.trim( elem ).toLowerCase(), div = context.createElement("div"); - - var wrap = - // option or optgroup - !tags.indexOf("", "" ] || - - !tags.indexOf("", "" ] || - - tags.match(/^<(thead|tbody|tfoot|colg|cap)/) && - [ 1, "", "
" ] || - - !tags.indexOf("", "" ] || - - // matched above - (!tags.indexOf("", "" ] || - - !tags.indexOf("", "" ] || - - // IE can't serialize and diff --git a/modules/board/tpl/index.html b/modules/board/tpl/index.html index 6f0323789..810c93f96 100644 --- a/modules/board/tpl/index.html +++ b/modules/board/tpl/index.html @@ -37,7 +37,7 @@ - + {$no} diff --git a/modules/board/tpl/js/board_admin.js b/modules/board/tpl/js/board_admin.js index 80e45da0c..b3d33fb2f 100644 --- a/modules/board/tpl/js/board_admin.js +++ b/modules/board/tpl/js/board_admin.js @@ -5,191 +5,6 @@ **/ -function Tree(url){ - // clear tree; - jQuery('#menu > ul > li > ul').remove(); - if(jQuery("ul.simpleTree > li > a").size() ==0)jQuery('').bind("click",function(e){addNode(0,e);}).appendTo("ul.simpleTree > li"); - - //ajax get data and transeform ul il - jQuery.get(url,function(data){ - jQuery(data).find("node").each(function(i){ - var text = jQuery(this).attr("text"); - var node_srl = jQuery(this).attr("node_srl"); - var parent_srl = jQuery(this).attr("parent_srl"); - var color = jQuery(this).attr("color"); - var url = jQuery(this).attr("url"); - - // node - - var node = ''; - if(color){ - node = jQuery('
  • '+text+'
  • '); - }else{ - node = jQuery('
  • '+text+'
  • '); - } - - - - // button - jQuery('').bind("click",function(e){ - jQuery("#tree_"+node_srl+" > span").click(); - addNode(node_srl,e); - return false; - }).appendTo(node); - - jQuery('').bind("click",function(e){ - jQuery("#tree_"+node_srl+" > span").click(); - modifyNode(node_srl,e); - return false; - }).appendTo(node); - - jQuery('').bind("click",function(e){ - deleteNode(node_srl); - return false; - }).appendTo(node); - - // insert parent child - if(parent_srl>0){ - if(jQuery('#tree_'+parent_srl+'>ul').length==0) jQuery('#tree_'+parent_srl).append(jQuery('
      ')); - jQuery('#tree_'+parent_srl+'> ul').append(node); - }else{ - if(jQuery('#menu ul.simpleTree > li > ul').length==0) jQuery("
        ").appendTo('#menu ul.simpleTree > li'); - jQuery('#menu ul.simpleTree > li > ul').append(node); - } - - }); - - //button show hide - jQuery("#menu li").each(function(){ - if(jQuery(this).parents('ul').size() > max_menu_depth) jQuery("a.add",this).hide(); - if(jQuery(">ul",this).size()>0) jQuery(">a.delete",this).hide(); - }); - - - // draw tree - simpleTreeCollection = jQuery('.simpleTree').simpleTree({ - autoclose: false, - afterClick:function(node){ - jQuery('#category_info').html(""); - //alert("text-"+jQuery('span:first',node).text()); - }, - afterDblClick:function(node){ - //alert("text-"+jQuery('span:first',node).text()); - }, - afterMove:function(destination, source, pos){ - if(destination.size() == 0){ - Tree(xml_url); - return; - } - var module_srl = jQuery("#fo_category input[name=module_srl]").val(); - var parent_srl = destination.attr('id').replace(/.*_/g,''); - var source_srl = source.attr('id').replace(/.*_/g,''); - - var target = source.prevAll("li:not([class^=line])"); - var target_srl = 0; - if(target.length >0){ - target_srl = source.prevAll("li:not([class^=line])").get(0).id.replace(/.*_/g,''); - parent_srl = 0; - } - - jQuery.exec_json("board.procBoardAdminMoveCategory",{ "module_srl":module_srl,"parent_srl":parent_srl,"target_srl":target_srl,"source_srl":source_srl}, - function(data){ - jQuery('#category_info').html(''); - if(data.error > 0) Tree(xml_url); - }); - - }, - - // i want you !! made by sol - beforeMovedToLine : function(destination, source, pos){ - return (jQuery(destination).parents('ul').size() + jQuery('ul',source).size() <= max_menu_depth); - }, - - // i want you !! made by sol - beforeMovedToFolder : function(destination, source, pos){ - return (jQuery(destination).parents('ul').size() + jQuery('ul',source).size() <= max_menu_depth-1); - }, - afterAjax:function() - { - //alert('Loaded'); - }, - animate:true - ,docToFolderConvert:true - }); - - - - // open all node - nodeToggleAll(); - },"xml"); -} -function addNode(node,e){ - var params ={ - "category_srl":0 - ,"parent_srl":node - ,"module_srl":jQuery("#fo_category [name=module_srl]").val() - }; - - jQuery.exec_json('board.getBoardAdminCategoryTplInfo', params, function(data){ - jQuery('#category_info').html(data.tpl); - }); -} - -function modifyNode(node,e){ - var params ={ - "category_srl":node - ,"parent_srl":0 - ,"module_srl":jQuery("#fo_category [name=module_srl]").val() - }; - - jQuery.exec_json('board.getBoardAdminCategoryTplInfo', params, function(data){ - jQuery('#category_info').html(data.tpl); - }); -} - - -function nodeToggleAll(){ - jQuery("[class*=close]", simpleTreeCollection[0]).each(function(){ - simpleTreeCollection[0].nodeToggle(this); - }); -} - -function deleteNode(node){ - if(confirm(lang_confirm_delete)){ - jQuery('#category_info').html(""); - var params ={ - "category_srl":node - ,"parent_srl":0 - ,"module_srl":jQuery("#fo_category [name=module_srl]").val() - }; - - jQuery.exec_json('board.procBoardAdminDeleteCategory', params, function(data){ - if(data.error==0) Tree(xml_url); - }); - } -} - -/* 카테고리 아이템 입력후 */ -function completeInsertCategory(ret_obj) { - jQuery('#category_info').html(""); - Tree(xml_url); -} - -function hideCategoryInfo() { - jQuery('#category_info').html(""); -} - - - - - - - - - - - - /* 모듈 생성 후 */ function completeInsertBoard(ret_obj) { var error = ret_obj['error']; @@ -265,116 +80,13 @@ function doChangeCategory(fo_obj) { /* 일괄 설정 */ function doCartSetup(act_type) { - var fo_obj = xGetElementById('fo_list'); var module_srl = new Array(); - if(typeof(fo_obj.cart.length)=='undefined') { - if(fo_obj.cart.checked) module_srl[module_srl.length] = fo_obj.cart.value; - } else { - for(var i=0;i200) { - obj.style.marginTop = ( xScrollTop() - 210 )+'px'; - } else { - obj.style.marginTop = '0px'; - } - - var tpl = ret_obj['tpl']; - xInnerHtml(obj, tpl); - obj.style.display = 'block'; - - var fo_obj = xGetElementById("fo_category"); - fo_obj.category_title.focus(); -} - - - - -/* 카테고리를 드래그하여 이동한 후 실행할 함수 , 이동하는 category_srl과 대상 category_srl을 받음 */ -function doMoveTree(category_id, source_category_srl, target_category_srl) { - source_category_srl = source_category_srl.replace(/menu_category_/,''); - target_category_srl = target_category_srl.replace(/menu_category_/,''); - var p_fo_obj = xGetElementById("fo_category"); - - var fo_obj = xGetElementById("fo_move_category"); - fo_obj.source_category_srl.value = source_category_srl; - fo_obj.target_category_srl.value = target_category_srl; - fo_obj.module_srl.value = p_fo_obj.module_srl.value; - - // 이동 취소를 선택하였을 경우 다시 그림;; - if(!procFilter(fo_obj, move_category)) { - var params = new Array(); - params["xml_file"] = xGetElementById('fo_category').xml_file.value; - params["source_category_srl"] = source_category_srl; - completeMoveCategory(params); - } -} - -function completeMoveCategory(ret_obj) { - var source_category_srl = ret_obj['source_category_srl']; - var xml_file = ret_obj['xml_file']; - - loadTreeMenu(xml_file, 'category', "zone_category", category_title, '', doGetCategoryInfo, source_category_srl, doMoveTree); -} - -/* 카테고리 목록 갱신 */ -function doReloadTreeCategory(module_srl) { - var params = new Array(); - params["module_srl"] = module_srl; - - // 서버에 요청하여 해당 노드의 정보를 수정할 수 있도록 한다. - var response_tags = new Array('error','message', 'xml_file'); - exec_xml('board', 'procBoardAdminMakeXmlFile', params, completeInsertCategory, response_tags, params); -} - -/* 카테고리 삭제 */ -function doDeleteCategory(category_srl) { - var fo_obj = xGetElementById("fo_category"); - if(!fo_obj) return; - - procFilter(fo_obj, delete_category); -} - -/* 카테고리 아이템 삭제 후 */ -function completeDeleteCategory(ret_obj) { - var module_srl = ret_obj['module_srl']; - var category_srl = ret_obj['category_srl']; - var xml_file = ret_obj['xml_file']; - alert(ret_obj['message']); - - loadTreeMenu(xml_file, 'category', 'zone_category', category_title, '', doGetCategoryInfo, category_srl, doMoveTree); - - var obj = xGetElementById('category_info'); - xInnerHtml(obj, ""); - obj.style.display = 'none'; -} - +} \ No newline at end of file diff --git a/modules/board/tpl/js/board_category.js b/modules/board/tpl/js/board_category.js new file mode 100644 index 000000000..06e601f6d --- /dev/null +++ b/modules/board/tpl/js/board_category.js @@ -0,0 +1,186 @@ +/** + * @file modules/board/tpl/js/board_category.js + * @author sol (sol@ngleader.com) + * @brief board 모듈의 category tree javascript + **/ + +function Tree(url){ + // clear tree; + jQuery('#menu > ul > li > ul').remove(); + if(jQuery("ul.simpleTree > li > a").size() ==0)jQuery('').bind("click",function(e){addNode(0,e);}).appendTo("ul.simpleTree > li"); + + //ajax get data and transeform ul il + jQuery.get(url,function(data){ + jQuery(data).find("node").each(function(i){ + var text = jQuery(this).attr("text"); + var node_srl = jQuery(this).attr("node_srl"); + var parent_srl = jQuery(this).attr("parent_srl"); + var color = jQuery(this).attr("color"); + var url = jQuery(this).attr("url"); + + // node + var node = ''; + if(color){ + node = jQuery('
      • '+text+'
      • '); + }else{ + node = jQuery('
      • '+text+'
      • '); + } + + // button + jQuery('').bind("click",function(e){ + jQuery("#tree_"+node_srl+" > span").click(); + addNode(node_srl,e); + return false; + }).appendTo(node); + + jQuery('').bind("click",function(e){ + jQuery("#tree_"+node_srl+" > span").click(); + modifyNode(node_srl,e); + return false; + }).appendTo(node); + + jQuery('').bind("click",function(e){ + deleteNode(node_srl); + return false; + }).appendTo(node); + + // insert parent child + if(parent_srl>0){ + if(jQuery('#tree_'+parent_srl+'>ul').length==0) jQuery('#tree_'+parent_srl).append(jQuery('
          ')); + jQuery('#tree_'+parent_srl+'> ul').append(node); + }else{ + if(jQuery('#menu ul.simpleTree > li > ul').length==0) jQuery("
            ").appendTo('#menu ul.simpleTree > li'); + jQuery('#menu ul.simpleTree > li > ul').append(node); + } + + }); + + //button show hide + jQuery("#menu li").each(function(){ + if(jQuery(this).parents('ul').size() > max_menu_depth) jQuery("a.add",this).hide(); + if(jQuery(">ul",this).size()>0) jQuery(">a.delete",this).hide(); + }); + + + // draw tree + simpleTreeCollection = jQuery('.simpleTree').simpleTree({ + autoclose: false, + afterClick:function(node){ + jQuery('#category_info').html(""); + //alert("text-"+jQuery('span:first',node).text()); + }, + afterDblClick:function(node){ + //alert("text-"+jQuery('span:first',node).text()); + }, + afterMove:function(destination, source, pos){ + if(destination.size() == 0){ + Tree(xml_url); + return; + } + var module_srl = jQuery("#fo_category input[name=module_srl]").val(); + var parent_srl = destination.attr('id').replace(/.*_/g,''); + var source_srl = source.attr('id').replace(/.*_/g,''); + + var target = source.prevAll("li:not([class^=line])"); + var target_srl = 0; + if(target.length >0){ + target_srl = source.prevAll("li:not([class^=line])").get(0).id.replace(/.*_/g,''); + parent_srl = 0; + } + + jQuery.exec_json("board.procBoardAdminMoveCategory",{ "module_srl":module_srl,"parent_srl":parent_srl,"target_srl":target_srl,"source_srl":source_srl}, + function(data){ + jQuery('#category_info').html(''); + if(data.error > 0) Tree(xml_url); + }); + + }, + + // i want you !! made by sol + beforeMovedToLine : function(destination, source, pos){ + return (jQuery(destination).parents('ul').size() + jQuery('ul',source).size() <= max_menu_depth); + }, + + // i want you !! made by sol + beforeMovedToFolder : function(destination, source, pos){ + return (jQuery(destination).parents('ul').size() + jQuery('ul',source).size() <= max_menu_depth-1); + }, + afterAjax:function() + { + //alert('Loaded'); + }, + animate:true + ,docToFolderConvert:true + }); + + + + // open all node + nodeToggleAll(); + },"xml"); +} +function addNode(node,e){ + var params ={ + "category_srl":0 + ,"parent_srl":node + ,"module_srl":jQuery("#fo_category [name=module_srl]").val() + }; + + jQuery.exec_json('board.getBoardAdminCategoryTplInfo', params, function(data){ + jQuery('#category_info').html(data.tpl); + }); +} + +function modifyNode(node,e){ + var params ={ + "category_srl":node + ,"parent_srl":0 + ,"module_srl":jQuery("#fo_category [name=module_srl]").val() + }; + + jQuery.exec_json('board.getBoardAdminCategoryTplInfo', params, function(data){ + jQuery('#category_info').html(data.tpl); + }); +} + + +function nodeToggleAll(){ + jQuery("[class*=close]", simpleTreeCollection[0]).each(function(){ + simpleTreeCollection[0].nodeToggle(this); + }); +} + +function deleteNode(node){ + if(confirm(lang_confirm_delete)){ + jQuery('#category_info').html(""); + var params ={ + "category_srl":node + ,"parent_srl":0 + ,"module_srl":jQuery("#fo_category [name=module_srl]").val() + }; + + jQuery.exec_json('board.procBoardAdminDeleteCategory', params, function(data){ + if(data.error==0) Tree(xml_url); + }); + } +} + +/* 카테고리 아이템 입력후 */ +function completeInsertCategory(ret_obj) { + jQuery('#category_info').html(""); + Tree(xml_url); +} + +function hideCategoryInfo() { + jQuery('#category_info').html(""); +} + +/* 카테고리 목록 갱신 */ +function doReloadTreeCategory(module_srl) { + var params = new Array(); + params["module_srl"] = module_srl; + + // 서버에 요청하여 해당 노드의 정보를 수정할 수 있도록 한다. + var response_tags = new Array('error','message', 'xml_file'); + exec_xml('board', 'procBoardAdminMakeXmlFile', params, completeInsertCategory, response_tags, params); +} \ No newline at end of file diff --git a/modules/board/tpl/skin_info.html b/modules/board/tpl/skin_info.html index 998bec559..ad54348d1 100644 --- a/modules/board/tpl/skin_info.html +++ b/modules/board/tpl/skin_info.html @@ -13,7 +13,7 @@
            {$lang->skin}
            {$skin_info->title} - +
            {$lang->skin_author}
            @@ -25,7 +25,7 @@
            {$lang->homepage}
            {$skin_info->homepage} - +
            {$lang->date}
            {zdate($skin_info->date, 'Y-m-d')}  @@ -39,7 +39,7 @@   - +
            {$lang->description}
            {nl2br(trim($skin_info->description))} @@ -79,7 +79,7 @@ {$group} - +
            {$val->title}
            @@ -135,7 +135,7 @@ - + diff --git a/modules/comment/tpl/comment_list.html b/modules/comment/tpl/comment_list.html index b2a45f9f5..2245ff497 100644 --- a/modules/comment/tpl/comment_list.html +++ b/modules/comment/tpl/comment_list.html @@ -35,7 +35,7 @@ - + diff --git a/modules/comment/tpl/comment_module_config.html b/modules/comment/tpl/comment_module_config.html index 6db771a78..6b88410e6 100644 --- a/modules/comment/tpl/comment_module_config.html +++ b/modules/comment/tpl/comment_module_config.html @@ -12,7 +12,7 @@

            {$lang->about_comment_count}

            - + diff --git a/modules/comment/tpl/declared_list.html b/modules/comment/tpl/declared_list.html index 1196f17f1..4fc17ae10 100644 --- a/modules/comment/tpl/declared_list.html +++ b/modules/comment/tpl/declared_list.html @@ -24,7 +24,7 @@ - + diff --git a/modules/comment/tpl/js/comment_admin.js b/modules/comment/tpl/js/comment_admin.js index a4093b0fc..57b99158c 100644 --- a/modules/comment/tpl/js/comment_admin.js +++ b/modules/comment/tpl/js/comment_admin.js @@ -1,31 +1,14 @@ -function doCheckAll(bToggle) { - var fo_obj = xGetElementById('fo_list'); - if(typeof(bToggle) == "undefined") bToggle = false; - for(var i=0;i
            {$no} {htmlspecialchars($module_list[$val->module_srl]->browser_title)}  {htmlspecialchars($val->nick_name)}
            {$no} {$oComment->getSummary(100)} {$oComment->getNickName()}
            - + - + @@ -50,5 +50,5 @@ diff --git a/modules/communication/tpl/js/communication_admin.js b/modules/communication/tpl/js/communication_admin.js index 7b888cd66..f98c745ac 100644 --- a/modules/communication/tpl/js/communication_admin.js +++ b/modules/communication/tpl/js/communication_admin.js @@ -9,8 +9,6 @@ function doGetSkinColorset(skin) { function doDisplaySkinColorset(ret_obj) { var tpl = ret_obj["tpl"]; - var old_height = xHeight("communication_colorset"); - xInnerHtml("communication_colorset", tpl); - var new_height = xHeight("communication_colorset"); + jQuery('#communication_colorset').html(tpl); } diff --git a/modules/counter/tpl/js/counter_admin.js b/modules/counter/tpl/js/counter_admin.js index 5ae0adfd1..ee8a5fd8e 100644 --- a/modules/counter/tpl/js/counter_admin.js +++ b/modules/counter/tpl/js/counter_admin.js @@ -1,6 +1,6 @@ // 관리자 페이지에서 날짜 이동 function changeSelectedDate(selected_date) { - var fo_obj = xGetElementById('fo_counter'); + var fo_obj = jQuery('#fo_counter').get(0); fo_obj.selected_date.value = selected_date; fo_obj.submit(); } diff --git a/modules/document/schemas/document_categories.xml b/modules/document/schemas/document_categories.xml index e98fbe1e9..cf6249d3a 100644 --- a/modules/document/schemas/document_categories.xml +++ b/modules/document/schemas/document_categories.xml @@ -9,4 +9,5 @@ +
            {$lang->editor_skin}
            {$lang->colorset}
            diff --git a/modules/document/tpl/checked_list.html b/modules/document/tpl/checked_list.html index a851af496..3d3699b4c 100644 --- a/modules/document/tpl/checked_list.html +++ b/modules/document/tpl/checked_list.html @@ -74,7 +74,7 @@ diff --git a/modules/document/tpl/declared_list.html b/modules/document/tpl/declared_list.html index a932424f6..cb2518f01 100644 --- a/modules/document/tpl/declared_list.html +++ b/modules/document/tpl/declared_list.html @@ -27,7 +27,7 @@ - + {$no} isCarted())-->checked="checked"/> @@ -48,7 +48,7 @@ {$oDocument->getRegdate("Y-m-d")} - + {$lang->cmd_cancel_declare} {$lang->cmd_manage_document} diff --git a/modules/document/tpl/document_config.html b/modules/document/tpl/document_config.html index 216323389..3b9fbe2ed 100644 --- a/modules/document/tpl/document_config.html +++ b/modules/document/tpl/document_config.html @@ -3,7 +3,7 @@
            - + @@ -12,13 +12,13 @@ thumbnail_type == 'ratio')-->checked="checked"/> {$lang->thumbnail_ratio} - +
            {$lang->thumbnail_type}
            - +
            diff --git a/modules/document/tpl/document_list.html b/modules/document/tpl/document_list.html index 420bbef4f..97284813d 100644 --- a/modules/document/tpl/document_list.html +++ b/modules/document/tpl/document_list.html @@ -36,7 +36,7 @@ - + {$no} {htmlspecialchars($module_list[$oDocument->get('module_srl')]->browser_title)}- {$oDocument->getNickName()} diff --git a/modules/document/tpl/js/document_admin.js b/modules/document/tpl/js/document_admin.js index 55006658e..442f0a5ce 100644 --- a/modules/document/tpl/js/document_admin.js +++ b/modules/document/tpl/js/document_admin.js @@ -1,12 +1,3 @@ -function doCheckAll(bToggle) { - var fo_obj = xGetElementById('fo_list'); - if(typeof(bToggle) == "undefined") bToggle = false; - for(var i=0;i \ No newline at end of file diff --git a/modules/editor/components/multimedia_link/multimedia_link.class.php b/modules/editor/components/multimedia_link/multimedia_link.class.php index b211cc73a..4b6ef0b25 100644 --- a/modules/editor/components/multimedia_link/multimedia_link.class.php +++ b/modules/editor/components/multimedia_link/multimedia_link.class.php @@ -56,6 +56,7 @@ $caption = $xml_obj->body; $src = str_replace(array('&','"'), array('&','&qout;'), $src); + $src = str_replace('&amp;', '&', $src); return sprintf("
            ", $src, $width, $height, $auto_start); } diff --git a/modules/editor/components/naver_map/naver_map.class.php b/modules/editor/components/naver_map/naver_map.class.php index 5c1150839..007209851 100644 --- a/modules/editor/components/naver_map/naver_map.class.php +++ b/modules/editor/components/naver_map/naver_map.class.php @@ -99,7 +99,7 @@ function transHTML($xml_obj) { $x = $xml_obj->attrs->x; $y = $xml_obj->attrs->y; - $marker = $xml_obj->attrs->marker; + $marker = urlencode($xml_obj->attrs->marker); $style = $xml_obj->attrs->style; preg_match_all('/(width|height)([^[:digit:]]+)([0-9]+)/i',$style,$matches); @@ -108,7 +108,7 @@ if(!$width) $width = 400; if(!$height) $height = 400; - $body_code = sprintf('
            ', $width, $height, Context::getRequestUri(), $width, $height, $x, $y, $marker, $width, $height); + $body_code = sprintf('
            ', $width, $height, Context::getRequestUri(), $width, $height, $x, $y, $marker, $width, $height); return $body_code; } @@ -117,15 +117,19 @@ $width = Context::get('width'); if(!$width) $width = 640; + settype($width,"float"); $height = Context::get('height'); if(!$height) $height = 480; + settype($height,"float"); $x = Context::get('x'); if(!$x) $x = 321198; + settype($x,"int"); $y = Context::get('y'); if(!$y) $y = 529730; + settype($y,"int"); $marker = Context::get('marker'); @@ -160,6 +164,10 @@ $marker_list = explode('|@|', $marker); $icon_no = 0; for($i=0;$imsg_component_is_inserted = 'Selected component is already inserted'; $lang->msg_component_is_first_order = 'Selected component is located at the first position'; $lang->msg_component_is_last_order = 'Selected component is located at the last position'; - $lang->msg_load_saved_doc = 'There is an automatically saved article. Do you wish to recover it?\nThe auto-saved draft will be discarded after saving current article'; + $lang->msg_load_saved_doc = "There is an automatically saved article. Do you wish to recover it?\nThe auto-saved draft will be discarded after saving current article"; $lang->msg_auto_saved = 'Automatically Saved'; $lang->cmd_disable = 'Inactive'; @@ -85,6 +85,8 @@ $lang->edit->help_italic = 'Make italic font'; $lang->edit->help_underline = 'Underline font'; $lang->edit->help_strike = 'Strike font'; + $lang->edit->help_sup = 'Sup'; + $lang->edit->help_sub = 'Sub'; $lang->edit->help_redo = 'Redo'; $lang->edit->help_undo = 'Undo'; $lang->edit->help_align_left = 'Align left'; diff --git a/modules/editor/lang/es.lang.php b/modules/editor/lang/es.lang.php index 1ae4c4bfc..f3d575ec2 100644 --- a/modules/editor/lang/es.lang.php +++ b/modules/editor/lang/es.lang.php @@ -81,6 +81,8 @@ $lang->edit->help_italic = 'Letra cursiva'; $lang->edit->help_underline = 'Letra subrayada'; $lang->edit->help_strike = 'Letra con linea'; + $lang->edit->help_sup = 'Sup'; + $lang->edit->help_sub = 'Sub'; $lang->edit->help_redo = 'Rehacer'; $lang->edit->help_undo = 'Deshacer'; $lang->edit->help_align_left = 'Margen izquierdo'; diff --git a/modules/editor/lang/fr.lang.php b/modules/editor/lang/fr.lang.php index 73c9e4973..d0a009d26 100644 --- a/modules/editor/lang/fr.lang.php +++ b/modules/editor/lang/fr.lang.php @@ -85,6 +85,8 @@ $lang->edit->help_italic = 'Caractère italique'; $lang->edit->help_underline = 'Caractère souligné'; $lang->edit->help_strike = 'Caractère biffé'; + $lang->edit->help_sup = 'Sup'; + $lang->edit->help_sub = 'Sub'; $lang->edit->help_redo = 'Réfaire'; $lang->edit->help_undo = 'Annuler'; $lang->edit->help_align_left = 'Aligner à gauche'; diff --git a/modules/editor/lang/jp.lang.php b/modules/editor/lang/jp.lang.php index 2c82da296..637903bd1 100644 --- a/modules/editor/lang/jp.lang.php +++ b/modules/editor/lang/jp.lang.php @@ -88,6 +88,8 @@ $lang->edit->help_italic = 'テキストを斜体にします。'; $lang->edit->help_underline = 'テキストに下線(アンダーライン)を引きます。'; $lang->edit->help_strike = '取り消し線を引きます。'; + $lang->edit->help_sup = 'Sup'; + $lang->edit->help_sub = 'Sub'; $lang->edit->help_redo = '繰り返し'; $lang->edit->help_undo = '元に戻す'; $lang->edit->help_align_left = 'テキストを左揃えで表示します。'; diff --git a/modules/editor/lang/ko.lang.php b/modules/editor/lang/ko.lang.php index dd86cf8c9..4022e5119 100644 --- a/modules/editor/lang/ko.lang.php +++ b/modules/editor/lang/ko.lang.php @@ -88,6 +88,8 @@ $lang->edit->help_italic = '글자를 기울이게 합니다'; $lang->edit->help_underline = '밑줄을 긋습니다'; $lang->edit->help_strike = '취소선을 긋습니다'; + $lang->edit->help_sup = '윗첨자를 입력합니다.'; + $lang->edit->help_sub = '아랫첨자를 입력합니다.'; $lang->edit->help_redo = '다음 동작으로 돌아갑니다'; $lang->edit->help_undo = '이전 동작으로 돌아갑니다'; $lang->edit->help_align_left = '왼쪽 정렬을 합니다'; diff --git a/modules/editor/lang/ru.lang.php b/modules/editor/lang/ru.lang.php index 602fa2ac2..cf734574f 100644 --- a/modules/editor/lang/ru.lang.php +++ b/modules/editor/lang/ru.lang.php @@ -81,6 +81,8 @@ $lang->edit->help_italic = 'Сделать шрифт наклонным'; $lang->edit->help_underline = 'Сделать шрифт подчеркнутым'; $lang->edit->help_strike = 'Сделать шрифт зачеркнутым'; + $lang->edit->help_sup = 'Sup'; + $lang->edit->help_sub = 'Sub'; $lang->edit->help_redo = 'Восстановить отмененное'; $lang->edit->help_undo = 'Отмена'; $lang->edit->help_align_left = 'Выровнять по левому краю'; diff --git a/modules/editor/lang/zh-CN.lang.php b/modules/editor/lang/zh-CN.lang.php index d42260827..54c427b5e 100644 --- a/modules/editor/lang/zh-CN.lang.php +++ b/modules/editor/lang/zh-CN.lang.php @@ -85,6 +85,8 @@ $lang->edit->help_italic = '斜体'; $lang->edit->help_underline = '下划线'; $lang->edit->help_strike = '取消线'; + $lang->edit->help_sup = 'Sup'; + $lang->edit->help_sub = 'Sub'; $lang->edit->help_redo = '重新操作'; $lang->edit->help_undo = '返回操作'; $lang->edit->help_align_left = '左对齐'; diff --git a/modules/editor/lang/zh-TW.lang.php b/modules/editor/lang/zh-TW.lang.php index 94c98f0dd..d54676e75 100644 --- a/modules/editor/lang/zh-TW.lang.php +++ b/modules/editor/lang/zh-TW.lang.php @@ -88,6 +88,8 @@ $lang->edit->help_italic = '斜體'; $lang->edit->help_underline = '底線'; $lang->edit->help_strike = '虛線'; + $lang->edit->help_sup = 'Sup'; + $lang->edit->help_sub = 'Sub'; $lang->edit->help_redo = '重新操作'; $lang->edit->help_undo = '返回操作'; $lang->edit->help_align_left = '靠左對齊'; diff --git a/modules/editor/skins/default/editor.html b/modules/editor/skins/default/editor.html index 46d18c900..edc1741d9 100644 --- a/modules/editor/skins/default/editor.html +++ b/modules/editor/skins/default/editor.html @@ -102,8 +102,8 @@
          • -
          • -
          • +
          • +
          • diff --git a/modules/file/file.controller.php b/modules/file/file.controller.php index 5ee709220..f0fffde72 100644 --- a/modules/file/file.controller.php +++ b/modules/file/file.controller.php @@ -43,7 +43,7 @@ * @brief 첨부파일 다운로드 * 직접 요청을 받음 * file_srl : 파일의 sequence - * sid : db에 저장된 비교 값, 틀리면 다운로드 하지 낳음 + * sid : db에 저장된 비교 값, 틀리면 다운로드 하지 않음 **/ function procFileDownload() { $file_srl = Context::get('file_srl'); diff --git a/modules/homepage/lang/en.lang.php b/modules/homepage/lang/en.lang.php index 039ee54b9..7789ffe0b 100644 --- a/modules/homepage/lang/en.lang.php +++ b/modules/homepage/lang/en.lang.php @@ -26,7 +26,7 @@ 'community' => 'Community', 'freeboard' => 'Off-topics', 'humor' => 'Humor', - 'qa' => 'Question&Answer', + 'qa' => 'Q and A', ), 'second' => array( 'profile' => 'Introduction', diff --git a/modules/homepage/lang/ko.lang.php b/modules/homepage/lang/ko.lang.php index c65ddafd2..fded754af 100644 --- a/modules/homepage/lang/ko.lang.php +++ b/modules/homepage/lang/ko.lang.php @@ -26,7 +26,7 @@ 'community' => '커뮤니티', 'freeboard' => '자유게시판', 'humor' => '재밌는 이야기', - 'qa' => '질문&답변', + 'qa' => '질문/답변', ), 'second' => array( 'profile' => '홈페이지 소개', diff --git a/modules/homepage/lang/zh-CN.lang.php b/modules/homepage/lang/zh-CN.lang.php index 12f12d839..8be0ce69b 100644 --- a/modules/homepage/lang/zh-CN.lang.php +++ b/modules/homepage/lang/zh-CN.lang.php @@ -26,7 +26,7 @@ 'community' => '社区', 'freeboard' => '自由交流区', 'humor' => '幽默/休闲', - 'qa' => 'Q&A', + 'qa' => 'Q and A', ), 'second' => array( 'profile' => '关于我们', diff --git a/modules/homepage/lang/zh-TW.lang.php b/modules/homepage/lang/zh-TW.lang.php index 804ba34cd..acf2dbd42 100644 --- a/modules/homepage/lang/zh-TW.lang.php +++ b/modules/homepage/lang/zh-TW.lang.php @@ -26,7 +26,7 @@ 'community' => '討論', 'freeboard' => '自由討論', 'humor' => '新鮮趣事', - 'qa' => 'Q & A', + 'qa' => 'Q and A', ), 'second' => array( 'profile' => '網站介紹', diff --git a/modules/homepage/skins/xe_official/js/homepage.js b/modules/homepage/skins/xe_official/js/homepage.js index c831a2eeb..92afd1868 100644 --- a/modules/homepage/skins/xe_official/js/homepage.js +++ b/modules/homepage/skins/xe_official/js/homepage.js @@ -258,3 +258,20 @@ function doReloadTreeMenu(){ function closeTreeMenuInfo(){ jQuery('#menuItem').css("visibility",'hidden'); } + + +/* 모듈 생성 후 */ +function completeInsertBoard(ret_obj) { + var error = ret_obj['error']; + var message = ret_obj['message']; + + var page = ret_obj['page']; + var module_srl = ret_obj['module_srl']; + + alert(message); + + var url = current_url.setQuery('act','dispHomepageBoardInfo'); + if(module_srl) url = url.setQuery('module_srl',module_srl); + if(page) url.setQuery('page',page); + location.href = url; +} \ No newline at end of file diff --git a/modules/homepage/skins/xe_official/member_list.html b/modules/homepage/skins/xe_official/member_list.html index eed687d1b..43f028047 100644 --- a/modules/homepage/skins/xe_official/member_list.html +++ b/modules/homepage/skins/xe_official/member_list.html @@ -56,7 +56,7 @@ {$page_no} - {$page_no} + {$page} {$lang->last_page} diff --git a/modules/install/install.controller.php b/modules/install/install.controller.php index e4ccd1423..9899c324a 100644 --- a/modules/install/install.controller.php +++ b/modules/install/install.controller.php @@ -216,9 +216,16 @@ // 모듈을 category에 의거 설치 순서를 정함 $install_step = array('base','utility','manager','accessory','service','package'); + // module 모듈은 미리 설치 + $this->installModule('module','./modules/module'); + $oModule = &getClass('module'); + if($oModule->checkUpdate()) $oModule->moduleUpdate(); + + // 나머지 모든 모듈 설치 foreach($install_step as $category) { if(count($modules[$category])) { foreach($modules[$category] as $module) { + if($module == 'module') continue; $this->installModule($module, sprintf('./modules/%s', $module)); $oModule = &getClass($module); diff --git a/modules/issuetracker/classes/svn.class.php b/modules/issuetracker/classes/svn.class.php index adba14c52..ec370b10e 100644 --- a/modules/issuetracker/classes/svn.class.php +++ b/modules/issuetracker/classes/svn.class.php @@ -14,25 +14,43 @@ var $tmp_dir = '/tmp'; var $oXml = null; + var $userid = null; + var $passwd = null; - function Svn($url, $svn_cmd='/usr/bin/svn', $diff_cmd='/usr/bin/diff') { + function Svn($url, $svn_cmd='/usr/bin/svn', $diff_cmd='/usr/bin/diff', $userid=null, $passwd=null) { if(substr($url,-1)!='/') $url .= '/'; $this->url = $url; - $this->svn_cmd = $svn_cmd; + if(strstr($svn_cmd, " ") != FALSE) $this->svn_cmd = '"'.$svn_cmd.'"' ; + else $this->svn_cmd = $svn_cmd; $this->diff_cmd = $diff_cmd; $this->tmp_dir = _XE_PATH_.'files/cache/tmp'; if(!is_dir($this->tmp_dir)) FileHandler::makeDir($this->tmp_dir); + $this->userid = $userid; + $this->passwd = $passwd; + $this->oXml = new XmlParser(); } + function _getAuthInfo() + { + if($this->userid && $this->passwd) + { + return sprintf("--username %s --password %s", $this->userid, $this->passwd); + } + else + { + return ''; + } + } + function getStatus($path = '/') { if(substr($path,0,1)=='/') $path = substr($path,1); if(strpos($path,'..')!==false) return; - $command = sprintf("%s --non-interactive --config-dir %s log --xml --limit 1 '%s%s'", $this->svn_cmd, $this->tmp_dir, $this->url, $path); + $command = sprintf("%s --non-interactive --config-dir %s log --xml --limit 1 %s %s%s", $this->svn_cmd, $this->tmp_dir, $this->_getAuthInfo(), $this->url, $path); $buff = $this->execCmd($command, $error); $xmlDoc = $this->oXml->parse($buff); @@ -52,8 +70,9 @@ if(strpos($path,'..')!==false) return; $command = sprintf( - "%s --non-interactive --config-dir %s list '%s%s'%s", + '%s --non-interactive %s --config-dir %s list %s%s%s', $this->svn_cmd, + $this->_getAuthInfo(), $this->tmp_dir, $this->url, $path, @@ -94,8 +113,9 @@ if(strpos($path,'..')!==false) return; $command = sprintf( - "%s --non-interactive --config-dir %s cat '%s%s'%s", + '%s --non-interactive %s --config-dir %s cat %s%s%s', $this->svn_cmd, + $this->_getAuthInfo(), $this->tmp_dir, $this->url, $path, @@ -178,15 +198,16 @@ function getComp($path, $brev, $erev) { if(!$brev) { - $command = sprintf("%s --non-interactive --config-dir %s log --xml --limit 2 '%s%s@%d'", $this->svn_cmd, $this->tmp_dir, $this->url, $path, $erev); + $command = sprintf('%s --non-interactive %s --config-dir %s log --xml --limit 2 %s%s@%d', $this->svn_cmd, $this->_getAuthInfo(), $this->tmp_dir, $this->url, $path, $erev); $buff = $this->execCmd($command, $error); $xmlDoc = $this->oXml->parse($buff); $brev = $xmlDoc->log->logentry[1]->attrs->revision; if(!$brev) return; } - $command = sprintf("%s --non-interactive --config-dir %s diff '%s%s@%d' '%s%s@%d'", + $command = sprintf('%s --non-interactive %s --config-dir %s diff %s%s@%d %s%s@%d', $this->svn_cmd, + $this->_getAuthInfo(), $this->tmp_dir, $this->url, $path, @@ -245,12 +266,13 @@ return $output; } - function getLog($path, $erev=null, $brev=null, $quiet = false, $limit = 2) { + function getLog($path, $erev=null, $brev=null, $quiet = false, $limit = 2, $link = true) { if(strpos($path,'..')!==false) return; $command = sprintf( - "%s --non-interactive --config-dir %s log --xml %s %s %s '%s%s'", + '%s --non-interactive %s --config-dir %s log --xml %s %s %s %s%s', $this->svn_cmd, + $this->_getAuthInfo(), $this->tmp_dir, $quiet?'--quiet':'--verbose', $limit?'--limit '.$limit:'', @@ -287,7 +309,7 @@ $obj->paths[] = $tmp_obj; } - $obj->msg = $this->linkXE($tmp->msg->body); + $obj->msg = $link?$this->linkXE($tmp->msg->body):$tmp->msg->body; $output[] = $obj; } return $output; diff --git a/modules/issuetracker/issuetracker.controller.php b/modules/issuetracker/issuetracker.controller.php index c2e083ba0..b8685ada2 100644 --- a/modules/issuetracker/issuetracker.controller.php +++ b/modules/issuetracker/issuetracker.controller.php @@ -388,15 +388,18 @@ function syncChangeset($module_info) { require_once($this->module_path.'classes/svn.class.php'); - $oSvn = new Svn($module_info->svn_url, $module_info->svn_cmd, $module_info->diff_cmd); + $oSvn = new Svn($module_info->svn_url, $module_info->svn_cmd, $module_info->diff_cmd, $module_info->svn_userid, $module_info->svn_passwd); $oModel = &getModel('issuetracker'); $status = $oSvn->getStatus(); + if(!$status || !$status->revision) return; $latestRevision = $oModel->getLatestRevision($module_info->module_srl); $oController = &getController('issuetracker'); - if($latestRevision < $status->revision) + while($latestRevision < $status->revision) { - $logs = $oSvn->getLog("/", $latestRevision+1, $status->revision, false, $status->revision-$latestRevision); + $gap = $status->revision-$latestRevision; + if($gap > 500) $gap = 500; + $logs = $oSvn->getLog("/", $latestRevision+1, $status->revision, false, $gap, false); foreach($logs as $log) { $obj = null; @@ -407,6 +410,7 @@ $obj->module_srl = $module_info->module_srl; executeQuery("issuetracker.insertChangeset", $obj); } + $latestRevision = $oModel->getLatestRevision($module_info->module_srl); } } diff --git a/modules/issuetracker/issuetracker.model.php b/modules/issuetracker/issuetracker.model.php index 0139f803f..5c46fd151 100644 --- a/modules/issuetracker/issuetracker.model.php +++ b/modules/issuetracker/issuetracker.model.php @@ -190,6 +190,10 @@ for($k=0;$kcontent = str_replace('r'.$mat[1][$k], sprintf('%s',getUrl('','mid',Context::get('mid'),'act','dispIssuetrackerViewSource','type','compare','erev',$mat[1][$k],'brev',''), 'r'.$mat[1][$k]), $histories[$i]->content); } + preg_match_all('/\[([0-9]+)\]/',$histories[$i]->content, $mat); + for($k=0;$kcontent = str_replace('['.$mat[1][$k].']', sprintf('%s',getUrl('','mid',Context::get('mid'),'act','dispIssuetrackerViewSource','type','compare','erev',$mat[1][$k],'brev',''), '['.$mat[1][$k].']'), $histories[$i]->content); + } } return $histories; } @@ -368,6 +372,16 @@ else return 0; } + function _linkDocument($matches) { + $document_srl = $matches[1]; + return sprintf('#%d', getUrl('','document_srl',$document_srl), $document_srl); + } + + function _linkXE($message) + { + return preg_replace_callback('/^\#?([0-9]+)( |\:)/', array($this, '_linkDocument'), $message); + } + function getChangesets($module_srl, $enddate = null, $limit = 10) { @@ -379,11 +393,19 @@ $args->startdate = date("Ymd", ztime($enddate)-24*60*60*$limit); $args->module_srl = $module_srl; $output = executeQueryArray("issuetracker.getChangesets", $args); - if(!$output->toBool() || !$output->data) + if(!$output->toBool()) { debugPrint($output); return array(); } + if(!$output->data) + { + $output->data = array(); + } + foreach($output->data as $key => $changeset) + { + $changeset->message = $this->_linkXE($changeset->message); + } $solvedHistory = array(); $output2 = executeQueryArray("issuetracker.getHistories", $args); @@ -407,13 +429,27 @@ } $obj = null; $obj->date = $history->regdate; - $obj->type = "i"; + $obj->type = "changed"; $obj->message = $res; $obj->target_srl = $history->target_srl; $obj->author = $history->nick_name; $output->data[] = $obj; } } + + $output2 = executeQueryArray("issuetracker.getDocumentListForChangeset", $args); + if(count($output2->data)) { + foreach($output2->data as $history) + { + $obj = null; + $obj->date = $history->regdate; + $obj->type = "created"; + $obj->author = $history->nick_name; + $obj->target_srl = $history->document_srl; + $output->data[] = $obj; + } + } + usort($output->data, _compare); return $output->data; diff --git a/modules/issuetracker/issuetracker.view.php b/modules/issuetracker/issuetracker.view.php index 30fd7d65d..03ae8d529 100644 --- a/modules/issuetracker/issuetracker.view.php +++ b/modules/issuetracker/issuetracker.view.php @@ -128,6 +128,7 @@ $issues['reopen'] = $oIssuetrackerModel->getIssuesCount($this->module_srl,'milestone_srl', $milestone->milestone_srl,'reopen'); $issues['postponed'] = $oIssuetrackerModel->getIssuesCount($this->module_srl,'milestone_srl', $milestone->milestone_srl,'postponed'); $issues['invalid'] = $oIssuetrackerModel->getIssuesCount($this->module_srl,'milestone_srl', $milestone->milestone_srl,'invalid'); + $issues['duplicated'] = $oIssuetrackerModel->getIssuesCount($this->module_srl,'milestone_srl', $milestone->milestone_srl,'duplicated'); $issues['total'] = $issues['new']+$issues['assign']+$issues['resolve']+$issues['reopen']+$issues['reviewing']; $milestone->issues = $issues; $milestones[$milestone->milestone_srl] = $milestone; diff --git a/modules/issuetracker/lang/en.lang.php b/modules/issuetracker/lang/en.lang.php index 4ab07c8d3..89bb2f534 100644 --- a/modules/issuetracker/lang/en.lang.php +++ b/modules/issuetracker/lang/en.lang.php @@ -27,6 +27,10 @@ $lang->about_svn_cmd = 'Please input the location of svn client to link with SVN. (ex: /usr/bin/svn)'; $lang->diff_cmd = 'DIFF Command Location'; $lang->about_diff_cmd = 'Please input the location of diff to compare SVN revisions. (ex: /usr/bin/diff)'; + $lang->svn_userid = 'SVN ID'; + $lang->about_svn_userid = 'If authentication is necessary, input userid for accessing the SVN repository'; + $lang->svn_passwd = 'SVN password'; + $lang->about_svn_passwd = 'If authentication is necessary, input password for accessing the SVN repository'; $lang->issue = 'Issue'; $lang->total_issue = 'All Issues'; @@ -77,6 +81,7 @@ 'dispIssuetrackerViewIssue' => 'View Issue', 'dispIssuetrackerNewIssue' => 'New Issue', 'dispIssuetrackerViewMilestone' => 'Milestone', + 'dispIssuetrackerTimeline' => 'Timeline', 'dispIssuetrackerViewSource' => 'View Source', 'dispIssuetrackerDownload' => 'Download', 'dispIssuetrackerAdminProjectSetting' => 'Settings', @@ -89,4 +94,8 @@ $lang->cmd_document_do = 'You would...'; $lang->not_assigned = 'Unassigned'; $lang->not_assigned_description = 'List of unassigned issues.'; + $lang->timeline_msg = array( + 'changed' => 'changed', + 'created' => 'created' + ); ?> diff --git a/modules/issuetracker/lang/jp.lang.php b/modules/issuetracker/lang/jp.lang.php index ef9c3e578..72b570827 100644 --- a/modules/issuetracker/lang/jp.lang.php +++ b/modules/issuetracker/lang/jp.lang.php @@ -27,6 +27,10 @@ $lang->about_svn_cmd = 'SVN連動のためのsvn clientファイルのロケーションを入力して下さい。 (ex: /usr/bin/svn)'; $lang->diff_cmd = 'DIFFファイルのロケーション'; $lang->about_diff_cmd = 'SVN revision間の比較のためのdiffファイルのロケーションを入力して下さい。(ex: /usr/bin/diff)'; + $lang->svn_userid = 'SVN ID'; + $lang->about_svn_userid = 'If authentication is necessary, input userid for accessing the SVN repository'; + $lang->svn_passwd = 'SVN password'; + $lang->about_svn_passwd = 'If authentication is necessary, input password for accessing the SVN repository'; $lang->issue = 'イシュー'; $lang->total_issue = 'イシュー全体'; @@ -90,4 +94,8 @@ $lang->cmd_document_do = 'このイシューを・・・ '; $lang->not_assigned = 'アサイン無し'; $lang->not_assigned_description = 'アサインされてないイシューのリストです。'; + $lang->timeline_msg = array( + 'changed' => '変更', + 'created' => '作成' + ); ?> diff --git a/modules/issuetracker/lang/ko.lang.php b/modules/issuetracker/lang/ko.lang.php index 5b6fb0eef..fbb2ce06f 100644 --- a/modules/issuetracker/lang/ko.lang.php +++ b/modules/issuetracker/lang/ko.lang.php @@ -27,6 +27,10 @@ $lang->about_svn_cmd = 'SVN 연동을 위해 svn client 실행파일의 위치를 입력해주세요. (ex: /usr/bin/svn)'; $lang->diff_cmd = 'DIFF 실행파일 위치'; $lang->about_diff_cmd = 'SVN revision들의 비교를 위한 diff 실행파일의 위치를 입력해주세요. (ex: /usr/bin/diff)'; + $lang->svn_userid = 'SVN 인증 아이디'; + $lang->about_svn_userid = '인증이 필요한 경우 아이디를 입력해주세요'; + $lang->svn_passwd = 'SVN 인증 패스워드'; + $lang->about_svn_passwd = '인증이 필요한 경우 패스워드를 입력해주세요'; $lang->issue = '문제'; $lang->total_issue = '전체 문제'; @@ -90,4 +94,8 @@ $lang->cmd_document_do = '이 문제를.. '; $lang->not_assigned = '할당 안됨'; $lang->not_assigned_description = '할당 안된 문제들의 목록입니다.'; + $lang->timeline_msg = array( + 'changed' => '변경', + 'created' => '생성' + ); ?> diff --git a/modules/issuetracker/lang/zh-CN.lang.php b/modules/issuetracker/lang/zh-CN.lang.php index 9d0d81174..717a04459 100644 --- a/modules/issuetracker/lang/zh-CN.lang.php +++ b/modules/issuetracker/lang/zh-CN.lang.php @@ -27,6 +27,10 @@ $lang->about_svn_cmd = '请输入svn clien应用程序位置。(ex: /usr/bin/svn)'; $lang->diff_cmd = 'DIF应用程序位置'; $lang->about_diff_cmd = '为比较SVN revision,请输入diff应用程序位置。 (ex: /usr/bin/diff)'; + $lang->svn_userid = 'SVN ID'; + $lang->about_svn_userid = 'If authentication is necessary, input userid for accessing the SVN repository'; + $lang->svn_passwd = 'SVN password'; + $lang->about_svn_passwd = 'If authentication is necessary, input password for accessing the SVN repository'; $lang->issue = '问题'; $lang->total_issue = '全部问题'; diff --git a/modules/issuetracker/lang/zh-TW.lang.php b/modules/issuetracker/lang/zh-TW.lang.php index d767dc65d..0384bcfe8 100644 --- a/modules/issuetracker/lang/zh-TW.lang.php +++ b/modules/issuetracker/lang/zh-TW.lang.php @@ -22,11 +22,15 @@ $lang->cmd_accept = '接受'; $lang->svn_url = 'SVN位址'; - $lang->about_svn_url = '請輸入專案的 SVN位址。'; + $lang->about_svn_url = '請輸入專案的 SVN 位址。'; $lang->svn_cmd = 'SVN應用程式位置'; - $lang->about_svn_cmd = '請輸入 SVN Client應用程式位置。(ex: /usr/bin/svn)'; + $lang->about_svn_cmd = '請輸入 SVN Client 應用程式位置。(ex: /usr/bin/svn)'; $lang->diff_cmd = 'DIFF應用程式位置'; - $lang->about_diff_cmd = '為了比較 SVN revisions,請輸入diff應用程式位置。 (ex: /usr/bin/diff)'; + $lang->about_diff_cmd = '為了比較 SVN 版本,請輸入 diff 應用程式位置。 (ex: /usr/bin/diff)'; + $lang->svn_userid = 'SVN帳號'; + $lang->about_svn_userid = '必須要驗證時,請輸入帳號來登入 SVN 檔案庫'; + $lang->svn_passwd = 'SVN密碼'; + $lang->about_svn_passwd = '必須要驗證時,請輸入密碼來登入 SVN 檔案庫'; $lang->issue = '問題'; $lang->total_issue = '所有問題'; diff --git a/modules/issuetracker/queries/getDocumentListForChangeset.xml b/modules/issuetracker/queries/getDocumentListForChangeset.xml new file mode 100644 index 000000000..a43c3efa3 --- /dev/null +++ b/modules/issuetracker/queries/getDocumentListForChangeset.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/modules/issuetracker/skins/xe_issuetracker/css/common.css b/modules/issuetracker/skins/xe_issuetracker/css/common.css index 495956b10..3ada2b3ea 100644 --- a/modules/issuetracker/skins/xe_issuetracker/css/common.css +++ b/modules/issuetracker/skins/xe_issuetracker/css/common.css @@ -129,6 +129,7 @@ div.editor table { width:95%; } .viewIssue table { border-spacing:0; overflow:hidden; width:100%; border:1px solid #AAAAAA; background-color:#FFFFF6; table-layout:fixed;} .viewIssue table tr th { text-align:right; border-bottom:1px solid #EEEEEE; padding:8px 10px 5px 10px; vertical-align:top; color:#898700; font-weight:normal;} .viewIssue table tr th.title { color:#444444; font-size:13pt; text-align:left; font-weight:bold; } +.viewIssue table tr th.title a { text-decoration: none; color:#444444; font-size:13pt; text-align:left; font-weight:bold; } .viewIssue table tr th.title span { font-size:9pt; color:#4F86B0;} .viewIssue table tr td { border-bottom:1px solid #EEEEEE; padding:5px 0 5px 0; color:#3B3A00; } .viewIssue table tr td.description { color:#444444; text-align:left; padding:20px; overflow:hidden;} diff --git a/modules/issuetracker/skins/xe_issuetracker/timeline.html b/modules/issuetracker/skins/xe_issuetracker/timeline.html index 5911bf58c..753a81fe2 100644 --- a/modules/issuetracker/skins/xe_issuetracker/timeline.html +++ b/modules/issuetracker/skins/xe_issuetracker/timeline.html @@ -13,14 +13,14 @@
            {zdate($changeset->date,"H:i")} - + {@ $oIssue = $issues[$changeset->target_srl]; } - Issue #{$changeset->target_srl} ({htmlspecialchars($issues[$changeset->target_srl]->getTitleText(30))}) by {$changeset->author} + Issue #{$changeset->target_srl} ({htmlspecialchars($issues[$changeset->target_srl]->getTitleText(30))}) {$lang->timeline_msg[$changeset->type]} by {$changeset->author} Changeset [{$changeset->revision}] by {$changeset->author}
            -

            {$changeset->message}
            {$issues[$changeset->target_srl]->getContentText(80)}{$changeset->message}

            +

            {$changeset->message}
            {$issues[$changeset->target_srl]->getContentText(80)}{$changeset->message}

            diff --git a/modules/issuetracker/skins/xe_issuetracker/view_issue.html b/modules/issuetracker/skins/xe_issuetracker/view_issue.html index 2fa2e9e32..7e9f566ed 100644 --- a/modules/issuetracker/skins/xe_issuetracker/view_issue.html +++ b/modules/issuetracker/skins/xe_issuetracker/view_issue.html @@ -6,7 +6,7 @@ - + diff --git a/modules/issuetracker/tpl/filter/insert_project.xml b/modules/issuetracker/tpl/filter/insert_project.xml index e935038b2..757c44bbd 100644 --- a/modules/issuetracker/tpl/filter/insert_project.xml +++ b/modules/issuetracker/tpl/filter/insert_project.xml @@ -16,6 +16,8 @@ + + diff --git a/modules/issuetracker/tpl/project_info.html b/modules/issuetracker/tpl/project_info.html index 5b4a15675..74571a9e3 100644 --- a/modules/issuetracker/tpl/project_info.html +++ b/modules/issuetracker/tpl/project_info.html @@ -42,11 +42,15 @@ - + + + + + - - + + diff --git a/modules/issuetracker/tpl/project_insert.html b/modules/issuetracker/tpl/project_insert.html index 6a0bf4c6b..f90eff367 100644 --- a/modules/issuetracker/tpl/project_insert.html +++ b/modules/issuetracker/tpl/project_insert.html @@ -96,6 +96,20 @@

            {$lang->about_diff_cmd}

            + + + + + + + +
            {$oIssue->getTitle()} - {$oIssue->getStatus()}{$oIssue->getTitle()}- {$oIssue->getStatus()} {$oIssue->getNickName()}
            {$module_info->diff_cmd} 
            {$lang->description}
            {$lang->svn_userid}
            {$module_info->svn_userid} 
            {$lang->description}
            {nl2br(htmlspecialchars($module_info->description))} 
            {$lang->admin_id}
            {$lang->admin_id}
            {implode(",",$module_info->admin_id)} 
            {$lang->svn_userid}
            + +

            {$lang->about_svn_userid}

            +
            {$lang->svn_passwd}
            + +

            {$lang->about_svn_passwd}

            +
            {$lang->description}
            diff --git a/modules/ldap/lang/en.lang.php b/modules/ldap/lang/en.lang.php index d3abf931d..9e902a189 100644 --- a/modules/ldap/lang/en.lang.php +++ b/modules/ldap/lang/en.lang.php @@ -9,6 +9,7 @@ $lang->use_ldap = 'Use LDAP'; $lang->ldap_server = 'LDAP Server Address'; $lang->ldap_port = 'LDAP Server Port'; + $lang->ldap_userdn_prefix = 'UserDN prefix'; $lang->ldap_userdn_suffix = 'UserDN Suffix'; $lang->ldap_basedn = 'base DN'; @@ -20,6 +21,7 @@ $lang->about_use_ldap = 'Please input all necessary information first and then check this'; $lang->about_ldap_server = 'Please input LDAP server information for authirization and data request'; $lang->about_ldap_port = 'Please input port of LDAP server'; + $lang->about_ldap_userdn_prefix = 'Please input userdn prefux for authorization. ex) cn='; $lang->about_ldap_userdn_suffix = 'Please input userdn suffux for authorization. ex) @abc.com'; $lang->about_ldap_basedn = 'Please input base DN of directory. ex) dc=abc,dc=com'; diff --git a/modules/ldap/lang/jp.lang.php b/modules/ldap/lang/jp.lang.php index d6537456f..d00152296 100644 --- a/modules/ldap/lang/jp.lang.php +++ b/modules/ldap/lang/jp.lang.php @@ -9,6 +9,7 @@ $lang->use_ldap = 'LDAP認証連動を使用する'; $lang->ldap_server = 'LDAPサーバーアドレス'; $lang->ldap_port = 'LDAPサーバーポート番号'; + $lang->ldap_userdn_prefix = 'UserDN prefix'; $lang->ldap_userdn_suffix = 'ユーザーサフィックス'; $lang->ldap_basedn = 'ベースDN(suffix)'; @@ -20,8 +21,9 @@ $lang->about_use_ldap = 'LDAP認証連動のためには、下記のサーバー情報とともに上にチェックして下さい。'; $lang->about_ldap_server = 'LDAPサーバー情報を入力してください。'; $lang->about_ldap_port = 'LDAPサーバーのポート(port)番号情報を入力してください。'; + $lang->about_ldap_userdn_prefix = 'Please input userdn prefux for authorization. ex) cn='; $lang->about_ldap_userdn_suffix = '認証のためのユーザーサフィックスを入力してください。 (例: @abc.com)'; - $lang->about_ldap_basedn = 'ディレクトリの ベースDN(suffix)をログインして下さい。 (例: dc=abc,dc=com)'; + $lang->about_ldap_basedn = 'ディレクトリの ベースDN をログインして下さい。 (例: dc=abc,dc=com)'; $lang->about_ldap_email_entry = 'LDAP情報中、会員のメールアカウント情報として使うカラム名を入力してください。 (重複不可)'; $lang->about_ldap_username_entry = 'LDAP情報中、会員名情報として使うカラム名を入力してください。 (重複可能)'; diff --git a/modules/ldap/lang/ko.lang.php b/modules/ldap/lang/ko.lang.php index 862db2bf7..48194dbf6 100644 --- a/modules/ldap/lang/ko.lang.php +++ b/modules/ldap/lang/ko.lang.php @@ -9,6 +9,7 @@ $lang->use_ldap = 'LDAP 인증 사용'; $lang->ldap_server = 'LDAP 서버 주소'; $lang->ldap_port = 'LDAP 서버 포트번호'; + $lang->ldap_userdn_prefix = '사용자 접두사'; $lang->ldap_userdn_suffix = '사용자 접미사'; $lang->ldap_basedn = 'base DN'; @@ -20,6 +21,7 @@ $lang->about_use_ldap = 'LDAP 인증 연동을 위해서는 서버 정보등을 입력 후 사용에 체크를 하셔야 합니다'; $lang->about_ldap_server = '인증과 정보를 요청할 수 있는 LDAP 서버 정보를 입력해주세요'; $lang->about_ldap_port = 'LDAP 서버의 port 정보를 입력해주세요'; + $lang->about_ldap_userdn_prefix = '인증을 위한 사용자 접두사를 입력해주세요 (예: cn= )'; $lang->about_ldap_userdn_suffix = '인증을 위한 사용자 접미사를 입력해주세요. (예: @abc.com)'; $lang->about_ldap_basedn = '디렉토리의 base DN을 입력해주세요. (예: dc=abc,dc=com)'; diff --git a/modules/ldap/lang/zh-TW.lang.php b/modules/ldap/lang/zh-TW.lang.php index 9fc63d793..4a480df9d 100644 --- a/modules/ldap/lang/zh-TW.lang.php +++ b/modules/ldap/lang/zh-TW.lang.php @@ -7,8 +7,9 @@ $lang->ldap = 'LDAP'; $lang->use_ldap = '使用 LDAP'; - $lang->ldap_server = 'LDAP主機位置'; - $lang->ldap_port = 'LDAP主機端口'; + $lang->ldap_server = 'LDAP 主機位置'; + $lang->ldap_port = 'LDAP 主機埠口'; + $lang->ldap_userdn_prefix = '前置字元'; $lang->ldap_userdn_suffix = '後綴'; $lang->ldap_basedn = 'base DN'; @@ -18,14 +19,15 @@ $lang->ldap_group_entry = '請輸入群組'; $lang->about_use_ldap = '請輸入並檢查所有必填的資料。'; - $lang->about_ldap_server = '請輸入已授權的 LDAP主機資料。'; - $lang->about_ldap_port = '請輸入 LDAP主機端口。'; - $lang->about_ldap_userdn_suffix = '請輸入已授權的 userdn後綴。例) @abc.com'; - $lang->about_ldap_basedn = '請輸入 base DN資料夾。 例) dc=abc,dc=com'; + $lang->about_ldap_server = '請輸入已授權的 LDAP 主機資料。'; + $lang->about_ldap_port = '請輸入 LDAP 主機埠口。'; + $lang->about_ldap_userdn_prefix = '請輸入已授權的 userdn 前置字元。 例) cn='; + $lang->about_ldap_userdn_suffix = '請輸入已授權的 userdn 後綴。例) @abc.com'; + $lang->about_ldap_basedn = '請輸入 base DN 資料夾。 例) dc=abc,dc=com'; - $lang->about_ldap_email_entry = '請輸入 LDAP電子郵件資料。(禁止重複)'; - $lang->about_ldap_username_entry = '請輸入 LDAP使用者名稱。(允許重複)'; - $lang->about_ldap_nickname_entry = '請輸入 LDAP暱稱。(禁止重複)'; - $lang->about_ldap_group_entry = '請輸入 LDAP群組資料。'; + $lang->about_ldap_email_entry = '請輸入 LDAP 電子郵件資料。(禁止重複)'; + $lang->about_ldap_username_entry = '請輸入 LDAP 使用者名稱。(允許重複)'; + $lang->about_ldap_nickname_entry = '請輸入 LDAP 暱稱。(禁止重複)'; + $lang->about_ldap_group_entry = '請輸入 LDAP 群組資料。'; ?> diff --git a/modules/ldap/ldap.admin.controller.php b/modules/ldap/ldap.admin.controller.php index 121f3037e..b3c600306 100644 --- a/modules/ldap/ldap.admin.controller.php +++ b/modules/ldap/ldap.admin.controller.php @@ -18,7 +18,7 @@ **/ function procLdapAdminInsertConfig() { // 기본 정보를 받음 - $args = Context::gets('use_ldap','ldap_server','ldap_port','ldap_userdn_suffix','ldap_basedn','ldap_email_entry','ldap_nickname_entry','ldap_username_entry','ldap_group_entry'); + $args = Context::gets('use_ldap','ldap_server','ldap_port','ldap_userdn_prefix', 'ldap_userdn_suffix','ldap_basedn','ldap_email_entry','ldap_nickname_entry','ldap_username_entry','ldap_group_entry'); if($args->use_ldap !='Y') $args->use_ldap = 'N'; if(!$args->ldap_port) $args->ldap_port = 389; diff --git a/modules/ldap/ldap.controller.php b/modules/ldap/ldap.controller.php index 10e50b779..1e9cb42aa 100644 --- a/modules/ldap/ldap.controller.php +++ b/modules/ldap/ldap.controller.php @@ -28,7 +28,7 @@ $password = $obj->password; // 인증 시도 - $output = $oLdapModel->ldap_conn($user_id, $password, $config->ldap_userdn_suffix, $config->ldap_basedn, $config->ldap_server, $config->ldap_port); + $output = $oLdapModel->ldap_conn($user_id, $password, $config->ldap_userdn_prefix, $config->ldap_userdn_suffix, $config->ldap_basedn, $config->ldap_server, $config->ldap_port); // 인증 실패시 아무 event없이 그냥 return하여 기존 인증을 계속 유지 if(!$output->toBool()) return new Object(); @@ -48,11 +48,11 @@ $oMemberModel = &getModel('member'); $member = $oMemberModel->getMemberInfoByUserID($info->user_id); - // 이미 존재하면 메일주소/닉네임/사용자이름/그룹중에 변경된 것이 있는지 확인 + // 이미 존재하면 메일주소/그룹중에 변경된 것이 있는지 확인 if($member->user_id == $info->user_id) { $info->member_srl = $member->member_srl; - if($info->password != $member->password || $info->email_address != $member->email_address || $info->nick_name != $member->nick_name || $info->user_name != $member->user_name) { + if($info->password != $member->password || $info->email_address != $member->email_address) { $output = executeQuery('member.updateMember', $info); } else $output = new Object(); diff --git a/modules/ldap/ldap.model.php b/modules/ldap/ldap.model.php index 648ffdeec..40c14633c 100644 --- a/modules/ldap/ldap.model.php +++ b/modules/ldap/ldap.model.php @@ -31,8 +31,7 @@ /** * @brief LDAP 연동하여 정보를 return하는 method **/ - function ldap_conn($user_id, $password, $ldap_userdn_suffix, $base_dn, $ldap_server, $ldap_port = 389) { - + function ldap_conn($user_id, $password, $ldap_userdn_prefix, $ldap_userdn_suffix, $base_dn, $ldap_server, $ldap_port = 389) { if(!function_exists('ldap_connect')) return new Object(-1,'ldap module is not exists'); $ds = @ldap_connect($ldap_server, $ldap_port); @@ -40,8 +39,7 @@ if(!ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3)) return new Object(-1,'fail to set option'); - $userdn = $user_id.$ldap_userdn_suffix; - + $userdn = $ldap_userdn_prefix.$user_id.$ldap_userdn_suffix; if(!@ldap_bind($ds, $userdn, $password)) return new Object(-1,'fail to bind'); $ldap_sr = @ldap_search($ds, $base_dn, '(cn='.$user_id.')', array ('*')); diff --git a/modules/ldap/tpl/index.html b/modules/ldap/tpl/index.html index 2297d8f77..1e2af02dc 100644 --- a/modules/ldap/tpl/index.html +++ b/modules/ldap/tpl/index.html @@ -5,27 +5,34 @@ - + - + - + + + + + - - - - diff --git a/modules/message/skins/default/css/message.css b/modules/message/skins/default/css/message.css index c6e533347..b1da19c2a 100644 --- a/modules/message/skins/default/css/message.css +++ b/modules/message/skins/default/css/message.css @@ -1,16 +1,38 @@ @charset "utf-8"; - -.system_message { - color:#666666; - text-align:center; - padding:1em 0 1em 0; +.system_message_box { + position:relative; + *zoom:1; } -.system_button { - margin-top:1em; +.system_message_box blockquote { + text-align:center; + margin:30px 0 20px 0; + font-size:1.3em; + font-weight:bold; + text-decoration:underline; +} + +.system_message_box ul { + padding:0; + margin:0; + overflow:hidden; + *zoom:1; + text-align:center; +} + +.system_message_box ul li { + padding:0; + margin:0 10px 0 0; + display:inline; + list-style:none; } .system_message a { margin-top:1em; } + +.loginForm { + width:200px; + margin:30px auto 0 auto; +} diff --git a/modules/message/skins/default/system_message.html b/modules/message/skins/default/system_message.html index f4451ba0b..8b0dd22c5 100644 --- a/modules/message/skins/default/system_message.html +++ b/modules/message/skins/default/system_message.html @@ -1,14 +1,21 @@ -
            - {$system_message} - + +
            + +
            + + diff --git a/modules/module/module.model.php b/modules/module/module.model.php index 218942e01..044fd62ca 100644 --- a/modules/module/module.model.php +++ b/modules/module/module.model.php @@ -129,6 +129,7 @@ * @brief mid 목록에 대응하는 module_srl을 배열로 return **/ function getModuleSrlByMid($mid) { + if($mid && !is_array($mid)) $mid = explode(',',$mid); if(is_array($mid)) $mid = "'".implode("','",$mid)."'"; $site_module_info = Context::get('site_module_info'); diff --git a/modules/opage/conf/info.xml b/modules/opage/conf/info.xml index d3b6e4dc6..3a13e5d77 100644 --- a/modules/opage/conf/info.xml +++ b/modules/opage/conf/info.xml @@ -13,7 +13,7 @@ Module for inserting external pages into inside of Zeroboard XE. 외부페이지를 XE내부로 삽입시키는 모듈 Модуль для вставки внешних страниц внутрь Zeroboard XE. - 可將外部頁面插入到 Zeroboard XE裡面的模組。 + 可將外部頁面插入至XE裡面的模組。 0.1 2007-09-17 service diff --git a/modules/page/tpl/css/page.css b/modules/page/tpl/css/page.css index 3e654f17a..796373da4 100644 --- a/modules/page/tpl/css/page.css +++ b/modules/page/tpl/css/page.css @@ -1,7 +1,7 @@ @charset "utf-8"; h3 { margin:0 10px 0 10px; } -.adminLayer { margin-top:30px; } +.adminLayer { margin-top:30px; background-color:#eee; border:1px solid #888;} .buttonBox { border:2px solid #EEEEEE; padding:5px; overflow:hidden; *zoom:1;} .buttonBox .fr { height:28px; } diff --git a/modules/planet/planet.admin.controller.php b/modules/planet/planet.admin.controller.php index b0c6ef926..41190c14b 100644 --- a/modules/planet/planet.admin.controller.php +++ b/modules/planet/planet.admin.controller.php @@ -31,6 +31,7 @@ $args->browser_title = Context::get('browser_title'); $args->is_default = Context::get('is_default'); $args->skin = Context::get('planet_default_skin'); + $args->layout_srl = Context::get('layout_srl'); $args->module = 'planet'; $args->module_srl = $is_registed?$config->module_srl:getNextSequence(); diff --git a/modules/planet/planet.admin.view.php b/modules/planet/planet.admin.view.php index b41aa6c64..0c96a05c8 100644 --- a/modules/planet/planet.admin.view.php +++ b/modules/planet/planet.admin.view.php @@ -37,6 +37,11 @@ if(is_array($this->config->tagtab_after)) Context::set('tagtab_after', join(',',$this->config->tagtab_after)); if(is_array($this->config->smstag)) Context::set('smstag', join(',',$this->config->smstag)); + // 레이아웃 목록을 구해옴 + $oLayoutMode = &getModel('layout'); + $layout_list = $oLayoutMode->getLayoutList(); + Context::set('layout_list', $layout_list); + $this->setTemplateFile('setup'); } diff --git a/modules/planet/planet.info.php b/modules/planet/planet.info.php index f7c4ac44e..81a9f4639 100644 --- a/modules/planet/planet.info.php +++ b/modules/planet/planet.info.php @@ -67,10 +67,10 @@ return $this->get('planet_title'); } - function getPhotoSrc() { + function getPhotoSrc($width=96,$height=96) { if(!$this->isExists()) return; $oPlanetModel = &getModel('planet'); - return $oPlanetModel->getPlanetPhotoSrc($this->planet_srl); + return $oPlanetModel->getPlanetPhotoSrc($this->planet_srl, $width, $height); } function getMid() { diff --git a/modules/planet/planet.item.php b/modules/planet/planet.item.php index 85875be21..5e0950435 100644 --- a/modules/planet/planet.item.php +++ b/modules/planet/planet.item.php @@ -40,9 +40,9 @@ } } - function getPlanetPhotoSrc() { + function getPlanetPhotoSrc($width=96,$height=96) { $oPlanetModel = &getModel('planet'); - return $oPlanetModel->getPlanetPhotoSrc($this->get('module_srl')); + return $oPlanetModel->getPlanetPhotoSrc($this->get('module_srl'), $width, $height); } function getPlanetMid() { diff --git a/modules/planet/planet.model.php b/modules/planet/planet.model.php index 15cf1099d..28a2c2a46 100644 --- a/modules/planet/planet.model.php +++ b/modules/planet/planet.model.php @@ -29,6 +29,7 @@ $config->is_default = $dummy->is_default; $config->module_srl = $dummy->module_srl; $config->browser_title = $dummy->browser_title; + $config->layout_srl = $dummy->layout_srl; if($config->logo_image) $config->logo_image = context::getFixUrl($config->logo_image); } return $config; @@ -153,7 +154,7 @@ /** * @brief 플래닛 개별 정보 return **/ - function getPlanet($module_srl) { + function getPlanet($module_srl=0) { return new PlanetInfo($module_srl); } @@ -501,13 +502,21 @@ /** * @brief 플래닛 이미지 유무 체크후 경로 return **/ - function getPlanetPhotoSrc($module_srl) { + function getPlanetPhotoSrc($module_srl, $width=96,$height=96) { $path = $this->getPlanetPhotoPath($module_srl); - if(!is_dir($path)) return sprintf("%s%s%s", Context::getRequestUri(), $this->module_path, 'tpl/images/blank_photo.gif'); - $filename = sprintf('%s/%d.jpg', $path, $module_srl); - if(!file_exists($filename)) return sprintf("%s%s%s", Context::getRequestUri(), $this->module_path, 'tpl/images/blank_photo.gif'); - $src = Context::getRequestUri().$filename."?rnd=".filemtime($filename); - return $src; + $source_filename = sprintf('%s/%d.jpg', $path, $module_srl); + + if(!is_dir($path) || !file_exists($source_filename)) return sprintf("%s%s%s", Context::getRequestUri(), $this->module_path, 'tpl/images/blank_photo.gif'); + + if($width!=96&&$height!=96) { + $filename = sprintf('%s%d.%d.%d.jpg', $path, $module_srl, $width, $height); + if(!file_exists($filename) && FileHandler::createImageFile($source_filename, $filename, $width, $height)) { + $source_filename = $filename; + } + } else { + $filename = $source_filename; + } + return Context::getRequestUri().$filename."?rnd=".filemtime($filename); } /** diff --git a/modules/planet/planet.view.php b/modules/planet/planet.view.php index aa642687e..cdfa77069 100644 --- a/modules/planet/planet.view.php +++ b/modules/planet/planet.view.php @@ -11,11 +11,14 @@ * @brief 초기화 **/ function init() { + + if(!preg_match('/planet/i', $this->act)) return; /** * @brief 플래닛 모듈의 기본 설정은 view에서는 언제든지 사용하도록 load하여 Context setting **/ $oPlanetModel = &getModel('planet'); Context::set('config',$this->config = $oPlanetModel->getPlanetConfig()); + $this->module_info->layout_srl = $this->config->layout_srl; /** * 스킨이 없으면 플래닛 기본 설정의 스킨으로 설정 @@ -42,7 +45,7 @@ $this->grant->create = $oPlanetModel->isCreateGranted(); // 플래닛은 별도 레이아웃 동작하지 않도록 변경 - Context::set('layout', 'none'); + //Context::set('layout', 'none'); if(!Context::get('mid')) Context::set('mid', $this->config->mid, true); } @@ -176,10 +179,20 @@ $oPlanetModel = &getModel('planet'); + // 글 고유 링크가 있으면 처리 + if(Context::get('document_srl')) { + $oDocumentModel = &getModel('document'); + $oDocument = $oDocumentModel->getDocument(Context::get('document_srl')); + } + // 플래닛의 기본 단위인 날짜를 미리 계산 (지정된 일자의 이전/다음날도 미리 계산하여 세팅) - $last_date = $this->planet->getContentLastDay(); - $date = Context::get('date'); - if(!$date || $date > $last_date) $date = $last_date; + if($oDocument && $oDocument->isExists()) { + $date = $oDocument->getRegdate('Ymd'); + } else { + $last_date = $this->planet->getContentLastDay(); + $date = Context::get('date'); + if(!$date || $date > $last_date) $date = $last_date; + } Context::set('date', $date); Context::set('prev_date', $this->planet->getPrevDate($date)); Context::set('next_date', $this->planet->getNextDate($date)); diff --git a/modules/planet/queries/getNextDate.xml b/modules/planet/queries/getNextDate.xml index ea9b89b68..ea95fa355 100644 --- a/modules/planet/queries/getNextDate.xml +++ b/modules/planet/queries/getNextDate.xml @@ -1,12 +1,15 @@ -
            {$lang->use_ldap}
            use_ldap == 'Y')-->checked="checked" />

            {$lang->about_use_ldap}

            {$lang->ldap_server}

            {$lang->about_ldap_server}

            {$lang->ldap_port}

            {$lang->about_ldap_port}

            {$lang->ldap_userdn_prefix}
            + +

            {$lang->about_ldap_userdn_prefix}

            +
            {$lang->ldap_userdn_suffix}
            diff --git a/modules/member/member.controller.php b/modules/member/member.controller.php index 6b017974e..5c7ffaddf 100644 --- a/modules/member/member.controller.php +++ b/modules/member/member.controller.php @@ -1167,7 +1167,7 @@ /** * @brief member 테이블에 사용자 추가 **/ - function insertMember($args, $password_is_hashed = false) { + function insertMember(&$args, $password_is_hashed = false) { // trigger 호출 (before) $output = ModuleHandler::triggerCall('member.insertMember', 'before', $args); if(!$output->toBool()) return $output; diff --git a/modules/member/skins/default/member_info.html b/modules/member/skins/default/member_info.html index f4b210d50..b7b0ec101 100644 --- a/modules/member/skins/default/member_info.html +++ b/modules/member/skins/default/member_info.html @@ -5,15 +5,6 @@
            {$lang->member_default_info}
            {$lang->user_id} - {$member_info->user_id} - - ({$lang->denied}) - -
            {$lang->user_name} {htmlspecialchars($member_info->user_name)}
            +
            +
            - + - - + + + + diff --git a/modules/planet/queries/getPrevDate.xml b/modules/planet/queries/getPrevDate.xml index 39ad4dcff..b676452eb 100644 --- a/modules/planet/queries/getPrevDate.xml +++ b/modules/planet/queries/getPrevDate.xml @@ -1,12 +1,15 @@ -
            +
            +
            - + - - + + + + diff --git a/modules/planet/skins/xe_planet/content_list.html b/modules/planet/skins/xe_planet/content_list.html index 7a4f173d9..03e3aec1f 100644 --- a/modules/planet/skins/xe_planet/content_list.html +++ b/modules/planet/skins/xe_planet/content_list.html @@ -11,6 +11,7 @@ +
            @@ -100,3 +101,9 @@
            + + + + diff --git a/modules/planet/tpl/filter/insert_config.xml b/modules/planet/tpl/filter/insert_config.xml index e477e1a97..0c997fa5a 100644 --- a/modules/planet/tpl/filter/insert_config.xml +++ b/modules/planet/tpl/filter/insert_config.xml @@ -11,6 +11,7 @@ + diff --git a/modules/planet/tpl/setup.html b/modules/planet/tpl/setup.html index 5a5b2c587..977e3d7f7 100644 --- a/modules/planet/tpl/setup.html +++ b/modules/planet/tpl/setup.html @@ -17,13 +17,25 @@ -
            + + + + +
            {$lang->browser_title}

            {$lang->browser_title}

            {$lang->layout}
            + +

            {$lang->about_layout}

            +
            {$lang->planet_default_skin}
            diff --git a/modules/tccommentnotify/tccommentnotify.controller.php b/modules/tccommentnotify/tccommentnotify.controller.php index a4a919fb4..582380839 100644 --- a/modules/tccommentnotify/tccommentnotify.controller.php +++ b/modules/tccommentnotify/tccommentnotify.controller.php @@ -97,8 +97,10 @@ { foreach($output->data as $data) { + debugPrint("start"); $this->deleteFromQueue($data->comment_srl); $this->sendCommentNotify($data->comment_srl); + debugPrint("end"); } } FileHandler::removeFile($lockFilePath); @@ -177,7 +179,6 @@ return; } - $parentHomepage = $oParent->getHomepageUrl(); $oMemberModel = &getModel('member'); if(!$parentHomepage) @@ -191,7 +192,6 @@ return; } - $childHomepage = $oChild->getHomepageUrl(); if(!$childHomepage) { @@ -262,8 +262,11 @@ $oReq->addPostData('r2_body', strip_tags($oChild->get('content'))); + debugPrint($target); $oReq->sendRequest(false); + debugPrint("ok"); $code = $oReq->getResponseCode(); + debugPrint($code); return $code; } diff --git a/modules/widget/tpl/js/widget.js b/modules/widget/tpl/js/widget.js index 754290313..ca42e4092 100644 --- a/modules/widget/tpl/js/widget.js +++ b/modules/widget/tpl/js/widget.js @@ -126,6 +126,7 @@ function getContentWidgetCode(childObj, widget) { if(cobj.nodeName == "DIV" && cobj.className == "widgetContent") { var body = xInnerHtml(cobj); var document_srl = childObj.getAttribute('document_srl'); + if(document_srl>0) body = ''; return ''; } cobj = cobj.nextSibling; diff --git a/widgets/login_info/skins/default/login_form.html b/widgets/login_info/skins/default/login_form.html index 10c59e8be..b55bbca3e 100644 --- a/widgets/login_info/skins/default/login_form.html +++ b/widgets/login_info/skins/default/login_form.html @@ -1,63 +1,63 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + diff --git a/widgets/newest_comment/conf/info.xml b/widgets/newest_comment/conf/info.xml index ee3bd837c..6ee41af73 100644 --- a/widgets/newest_comment/conf/info.xml +++ b/widgets/newest_comment/conf/info.xml @@ -80,6 +80,34 @@ Длина темы может быть присвоена. (0 или пустое значение не будут ограничивать длину) 可設置標題的字數。(0或留白為不限制) + + select + 작성일 표시 + 作成日表示 + 显示发表日期 + Display Registered Date + Display Registered Date + 顯示發表日期 + + Y + 출력 + display + 表示 + 显示 + display + 顯示 + + + N + 출력하지 않음 + not display + 非表示 + 不显示 + not display + 隱藏 + + + mid_list 대상 모듈 @@ -98,4 +126,4 @@ 將所選擇的模組作為目標。 - \ No newline at end of file + diff --git a/widgets/newest_comment/newest_comment.class.php b/widgets/newest_comment/newest_comment.class.php index cba7a30e6..7893c5c58 100644 --- a/widgets/newest_comment/newest_comment.class.php +++ b/widgets/newest_comment/newest_comment.class.php @@ -55,6 +55,7 @@ $widget_info->title = $title; $widget_info->comment_list = $output; $widget_info->subject_cut_size = $subject_cut_size; + $widget_info->display_regdate = $args->display_regdate=='N'?'N':'Y'; Context::set('widget_info', $widget_info); diff --git a/widgets/newest_comment/skins/xe_official/css/black.css b/widgets/newest_comment/skins/xe_official/css/black.css new file mode 100644 index 000000000..8bacfe7f2 --- /dev/null +++ b/widgets/newest_comment/skins/xe_official/css/black.css @@ -0,0 +1,16 @@ +.latest_comment_black { width:100%; padding-bottom:15px; overflow:hidden; position:relative;} +.latest_comment_black h2 { margin:0; display:block; height:21px; padding:9px 0 0 9px; margin-bottom:12px; color:#ffffff; background:url(../images/black/lineNotice.gif) no-repeat left bottom; font-size:1em;} + +.latest_comment_black ul { margin:0; padding:0; } +.latest_comment_black ul li { height:20px; background:url(../images/black/bulletD0.gif) no-repeat left 5px; padding-left:10px; overflow:hidden; list-style:none; white-space:nowrap;} + +.latest_comment_black ul li .title a { color:#818181; text-decoration:none; } +.latest_comment_black ul li .title a:hover { text-decoration:underline; } +.latest_comment_black ul li .title span.comment { color:#FE6700; font:.9em Tahoma; } +.latest_comment_black ul li .title span.comment a { color:#FE6700; font:.9em Tahoma; } + +.latest_comment_black ul li .date { color:#999999; font:.8em Tahoma; white-space:nowrap; margin-right:5px;} + +.latest_comment_black .more { position:absolute; top:12px; right:11px; color:#54564b; font:.8em Tahoma;} +.latest_comment_black a.more { text-decoration:none;} +.latest_comment_black a.more:hover { text-decoration:underline;} diff --git a/widgets/newest_comment/skins/xe_official/css/white.css b/widgets/newest_comment/skins/xe_official/css/white.css new file mode 100644 index 000000000..c814ff014 --- /dev/null +++ b/widgets/newest_comment/skins/xe_official/css/white.css @@ -0,0 +1,16 @@ +.latest_comment_white { width:100%; padding-bottom:15px; overflow:hidden; position:relative;} +.latest_comment_white h2 { margin:0; display:block; height:21px; padding:9px 0 0 9px; margin-bottom:12px; color:#000000; background:url(../images/white/lineNotice.gif) no-repeat left bottom; font-size:1em;} + +.latest_comment_white ul { margin:0; padding:0; } +.latest_comment_white ul li { height:20px; background:url(../images/white/bulletD0.gif) no-repeat left 5px; padding-left:10px; overflow:hidden; list-style:none; white-space:nowrap;} + +.latest_comment_white ul li .title a { color:#555555; text-decoration:none; } +.latest_comment_white ul li .title a:hover { text-decoration:underline; } +.latest_comment_white ul li .title span.comment { color:#FE6700; font:.9em Tahoma; } +.latest_comment_white ul li .title span.comment a { color:#FE6700; font:.9em Tahoma; } + +.latest_comment_white ul li .date { color:#999999; font:.8em Tahoma; white-space:nowrap; margin-right:5px;} + +.latest_comment_white .more { position:absolute; top:12px; right:11px; color:#54564b; font:.8em Tahoma;} +.latest_comment_white a.more { text-decoration:none;} +.latest_comment_white a.more:hover { text-decoration:underline;} diff --git a/widgets/newest_comment/skins/xe_official/images/black/bulletD0.gif b/widgets/newest_comment/skins/xe_official/images/black/bulletD0.gif new file mode 100644 index 000000000..e8e17d4c6 Binary files /dev/null and b/widgets/newest_comment/skins/xe_official/images/black/bulletD0.gif differ diff --git a/widgets/newest_comment/skins/xe_official/images/black/lineNotice.gif b/widgets/newest_comment/skins/xe_official/images/black/lineNotice.gif new file mode 100644 index 000000000..dbf2c8220 Binary files /dev/null and b/widgets/newest_comment/skins/xe_official/images/black/lineNotice.gif differ diff --git a/widgets/newest_comment/skins/xe_official/images/white/bulletD0.gif b/widgets/newest_comment/skins/xe_official/images/white/bulletD0.gif new file mode 100644 index 000000000..e8e17d4c6 Binary files /dev/null and b/widgets/newest_comment/skins/xe_official/images/white/bulletD0.gif differ diff --git a/widgets/newest_comment/skins/xe_official/images/white/lineNotice.gif b/widgets/newest_comment/skins/xe_official/images/white/lineNotice.gif new file mode 100644 index 000000000..dbf2c8220 Binary files /dev/null and b/widgets/newest_comment/skins/xe_official/images/white/lineNotice.gif differ diff --git a/widgets/newest_comment/skins/xe_official/list.html b/widgets/newest_comment/skins/xe_official/list.html new file mode 100644 index 000000000..a9abff741 --- /dev/null +++ b/widgets/newest_comment/skins/xe_official/list.html @@ -0,0 +1,28 @@ + + + + + + {@ $colorset = "white" } + + +
            + +

            {$widget_info->title}

            + + + + more + +
            diff --git a/widgets/newest_comment/skins/xe_official/skin.xml b/widgets/newest_comment/skins/xe_official/skin.xml new file mode 100644 index 000000000..4e9d6abe4 --- /dev/null +++ b/widgets/newest_comment/skins/xe_official/skin.xml @@ -0,0 +1,42 @@ + + + XE 공식 레이아웃용 최신 댓글 스킨 + XE 공식 레이아웃용 최신 댓글 스킨 + XE 공식 레이아웃용 최신 댓글 스킨 + XE 공식 레이아웃용 최신 댓글 스킨 + XE 공식 레이아웃용 최신 댓글 스킨 + 댓글을 출력합니다 + 댓글을 출력합니다 + 댓글을 출력합니다 + 댓글을 출력합니다 + 댓글을 출력합니다 + 0.1 + 2007-02-28 + http://www.zeroboard.com + + + 제로 + Zero + zero + zero + zero + + + + + 흰색 바탕용 + 白い背景用 + 白色背景 + White Background + 白色背景 + + + 어두운 바탕용 + 暗い背景用 + 暗色背景 + Dark Background + 暗色背景 + + + + diff --git a/widgets/newest_document/conf/info.xml b/widgets/newest_document/conf/info.xml index 48e3fe3a6..c37a789af 100644 --- a/widgets/newest_document/conf/info.xml +++ b/widgets/newest_document/conf/info.xml @@ -168,6 +168,34 @@ Длина темы может быть присвоена. (0 или пустое значение не будут ограничивать длину) 可設置標題的字數。(0或留白為不限制) + + select + 작성일 표시 + 作成日表示 + 显示发表日期 + Display Registered Date + Display Registered Date + 顯示發表日期 + + Y + 출력 + display + 表示 + 显示 + display + 顯示 + + + N + 출력하지 않음 + not display + 非表示 + 不显示 + not display + 隱藏 + + + mid_list 대상 모듈 @@ -186,4 +214,4 @@ 把所選擇的模組作為目標。 - \ No newline at end of file + diff --git a/widgets/newest_document/newest_document.class.php b/widgets/newest_document/newest_document.class.php index faf7b6eed..e7d48d0f6 100644 --- a/widgets/newest_document/newest_document.class.php +++ b/widgets/newest_document/newest_document.class.php @@ -96,6 +96,7 @@ $widget_info->document_list = $document_list; $widget_info->subject_cut_size = $subject_cut_size; $widget_info->duration_new = $duration_new * 60*60; + $widget_info->display_regdate = $args->display_regdate=='N'?'N':'Y'; Context::set('widget_info', $widget_info); diff --git a/widgets/newest_document/skins/xe_official/list.html b/widgets/newest_document/skins/xe_official/list.html index 55026623c..7ab25d6f7 100644 --- a/widgets/newest_document/skins/xe_official/list.html +++ b/widgets/newest_document/skins/xe_official/list.html @@ -12,7 +12,9 @@
            • + {$oDocument->getRegdate("Y-m-d")} + {$oDocument->getTitle($widget_info->subject_cut_size)} diff --git a/widgets/newest_document/skins/xe_official/skin.xml b/widgets/newest_document/skins/xe_official/skin.xml index e6b4a507b..b6820dbb5 100644 --- a/widgets/newest_document/skins/xe_official/skin.xml +++ b/widgets/newest_document/skins/xe_official/skin.xml @@ -63,4 +63,4 @@ 暗色背景 - \ No newline at end of file + diff --git a/widgets/newest_images/conf/info.xml b/widgets/newest_images/conf/info.xml index cf467f2fc..86c8b097a 100644 --- a/widgets/newest_images/conf/info.xml +++ b/widgets/newest_images/conf/info.xml @@ -45,23 +45,6 @@ Это будет заголовком последних статей. 顯示最新主題列表的標題。 - - mid_list - 대상 모듈 - モジュール - 对象模块 - Target Module - Objetivo Módulo - Модуль назначения - 目標模組 - 선택하신 모듈에 등록된 글을 대상으로 합니다. - チェックされたコンテンツを対象とします。 - 把被选模块中的主题作为对象。 - Articles on chosen module will be the target. - Objetivo de los documentos será los del módulo seleccionado. - Статьи на выбранных модулях будут назначением. - 將所選擇的模組作為目標。 - text 글 제목 길이 @@ -302,5 +285,22 @@ 隱藏 + + mid_list + 대상 모듈 + モジュール + 对象模块 + Target Module + Objetivo Módulo + Модуль назначения + 目標模組 + 선택하신 모듈에 등록된 글을 대상으로 합니다. + チェックされたコンテンツを対象とします。 + 把被选模块中的主题作为对象。 + Articles on chosen module will be the target. + Objetivo de los documentos será los del módulo seleccionado. + Статьи на выбранных модулях будут назначением. + 將所選擇的模組作為目標。 + diff --git a/widgets/planet_document/conf/info.xml b/widgets/planet_document/conf/info.xml new file mode 100644 index 000000000..1405ba0aa --- /dev/null +++ b/widgets/planet_document/conf/info.xml @@ -0,0 +1,116 @@ + + + 플래닛 최근 글 출력 + 微型部落格主題輸出 + 플래닛의 글들만 출력하는 위젯입니다 . + 微型部落格主題輸出控件。 + 0.1 + 2008-12-24 + + + zero + zero + + + + + text + 제목 + 栏目名 + タイトル + Title + Título + Заголовок + 標題 + 최근 게시물의 제목으로 출력됩니다. + 显示为最新主题列表的标题。 + 最新の書き込みのタイトルとして表示されます。 + It will be the title of the newest articles. + Este será el título de los documentos recientes. + Это будет заголовком последних статей. + 顯示最新主題列表的標題。 + + + text + 목록수 + 目录数 + リスト数 + The number of list + Número de la lista + Число списка + 目錄數 + 출력될 목록의 수를 정하실 수 있습니다. (기본 5개) + 可设置要显示的目录数。 (默认为5个) + 出力されるリストの数を指定することができます。(デフォルト5個) + You can set the number of articles to be displayed. (default is 5) + Usted puede definir el número de los documentos a mostrar. (predefinido: 5) + Вы можете выбрать число списка статей для отображения. (стандарт: 5) + 設置要顯示的目錄數。(預設是5個) + + + text + 이미지 가로크기 + イメージ横幅 + 宽度 + Width of Image + Ancho de la imagen + Ширина изображения + 圖片寬度 + 출력될 이미지의 가로크기를 정하실 수 있습니다. (기본 50) + 表示されるイメージの横幅のサイズを指定することができます(デフォルト50)。 + 可以指定要显示的图片宽度。(默认为50) + You can set the width of image. (50 as default) + Usted puede definir el ancho de la imagen. (predefinido:50px) + Вы можете установить ширину изображения. (стандарт: 50px) + 指定顯示的圖片寬度。(預設是50) + + + text + 이미지 세로크기 + イメージ縦幅 + 高度 + Height of Image + Высота изображения + 圖片高度 + 이미지의 세로 크기를 지정할 수 있습니다. (기본 50px) + イメージの縦幅サイズを指定します(デフォルト 50px) + 可以指定图片高度。(默认为50px) + You can set the height of image. (50 as default) + Вы можете установить вытсоту изображения. (стандарт: 50px) + 指定圖片高度。(預設是50px) + + + select + 중복 허용 + 중복 허용 + 중복 허용 + 중복 허용 + 중복 허용 + 중복 허용 + Y로 하시면 플래닛 멤버들의 중복을 검사하지 않고 무조건 최신순으로 글을 추출하여 출력합니다 + Y로 하시면 플래닛 멤버들의 중복을 검사하지 않고 무조건 최신순으로 글을 추출하여 출력합니다 + Y로 하시면 플래닛 멤버들의 중복을 검사하지 않고 무조건 최신순으로 글을 추출하여 출력합니다 + Y로 하시면 플래닛 멤버들의 중복을 검사하지 않고 무조건 최신순으로 글을 추출하여 출력합니다 + Y로 하시면 플래닛 멤버들의 중복을 검사하지 않고 무조건 최신순으로 글을 추출하여 출력합니다 + Y로 하시면 플래닛 멤버들의 중복을 검사하지 않고 무조건 최신순으로 글을 추출하여 출력합니다 + + N + 중복하지 않음 + 중복하지 않음 + 중복하지 않음 + 중복하지 않음 + 중복하지 않음 + 중복하지 않음 + + + Y + 중복 허용 + 중복 허용 + 중복 허용 + 중복 허용 + 중복 허용 + 중복 허용 + + + + diff --git a/widgets/planet_document/planet_document.class.php b/widgets/planet_document/planet_document.class.php new file mode 100644 index 000000000..305336d2f --- /dev/null +++ b/widgets/planet_document/planet_document.class.php @@ -0,0 +1,65 @@ +title; + + // 출력된 목록 수 + $list_count = (int)$args->list_count; + if(!$list_count) $list_count = 5; + $args->list_count = $list_count; + + // 중복 허용/ 비허용 체크 + if($args->allow_repetition != 'Y') { + $output = executeQueryArray('widgets.planet_document.getUniqueNewestDocuments', $args); + } else { + $output = executeQueryArray('widgets.planet_document.getNewestDocuments', $args); + } + + // 플래닛 글 목록 구함 + $oPlanetModel = &getModel('planet'); + Context::set('planet', $planet = $oPlanetModel->getPlanet()); + + foreach($output->data as $key => $val) { + $document_srl = $val->document_srl; + $oPlanet = null; + $oPlanet = new PlanetItem(); + $oPlanet->setAttribute($val); + $planet_list[] = $oPlanet; + } + Context::set('planet_list', $planet_list); + + // 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정) + $tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin); + Context::set('colorset', $args->colorset); + + // 템플릿 파일을 지정 + $tpl_file = 'list'; + + if(!$args->thumbnail_width) $args->thumbnail_width = 50; + if(!$args->thumbnail_height) $args->thumbnail_height = 50; + $widget_info->thumbnail_width = $args->thumbnail_width; + $widget_info->thumbnail_height = $args->thumbnail_height; + Context::set('widget_info', $widget_info); + + // 템플릿 컴파일 + $oTemplate = &TemplateHandler::getInstance(); + $output = $oTemplate->compile($tpl_path, $tpl_file); + return $output; + } + } +?> diff --git a/widgets/planet_document/queries/getNewestDocuments.xml b/widgets/planet_document/queries/getNewestDocuments.xml new file mode 100644 index 000000000..8a18737b4 --- /dev/null +++ b/widgets/planet_document/queries/getNewestDocuments.xml @@ -0,0 +1,35 @@ + + + +
              +
              +
              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/widgets/planet_document/queries/getUniqueNewestDocuments.xml b/widgets/planet_document/queries/getUniqueNewestDocuments.xml new file mode 100644 index 000000000..324ee36c7 --- /dev/null +++ b/widgets/planet_document/queries/getUniqueNewestDocuments.xml @@ -0,0 +1,35 @@ + + +
              +
              +
              +
              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/widgets/planet_document/skins/xe_official/list.html b/widgets/planet_document/skins/xe_official/list.html new file mode 100644 index 000000000..f3774e496 --- /dev/null +++ b/widgets/planet_document/skins/xe_official/list.html @@ -0,0 +1,17 @@ + + + +
              + +

              {htmlspecialchars($item->nick_name)}

              + +
              + + + + + + {$item->getContent()} +
              +
              + diff --git a/widgets/planet_document/skins/xe_official/skin.xml b/widgets/planet_document/skins/xe_official/skin.xml new file mode 100644 index 000000000..7093c9129 --- /dev/null +++ b/widgets/planet_document/skins/xe_official/skin.xml @@ -0,0 +1,35 @@ + + + XE 공식 레이아웃용 플래닛 글 스킨 + XE 微型部落格版面 + + 플래닛 글들을 출력하는 위젯 스킨입니다. + + + 微型部落格主題輸出面板。 + + 0.1 + 2008-12-24 + http://www.zeroboard.com + + + zero + zero + + + + 흰색 바탕용 + 白い背景用 + 白色背景 + White Background + 白色背景 + + + 어두운 바탕용 + 暗い背景用 + 暗色背景 + Dark Background + 暗色背景 + + + diff --git a/widgets/planet_document/skins/xe_official/style.css b/widgets/planet_document/skins/xe_official/style.css new file mode 100644 index 000000000..7977fb80b --- /dev/null +++ b/widgets/planet_document/skins/xe_official/style.css @@ -0,0 +1,31 @@ +@charset "utf-8"; + +.planetDocument { overflow:hidden; margin-bottom:5px; *zoom:1;} +.planetDocument .identity { padding:0; float:left; margin:3px 10px 3px 3px; background:none; *zoom:1; overflow:hidden;} +.planetDocument .identity a img{ display:block; border:1px solid #545554;} + +.planetDocument .article { position:relative; overflow:hidden; *zoom:1; margin:3px 0 0 0; padding:0; } +.planetDocument .article .tooltipLT, +.planetDocument .article .tooltipRT, +.planetDocument .article .tooltipLB, +.planetDocument .article .tooltipRB { position:absolute; background:url("./tooltip.gif") no-repeat; display:block; width:10px; height:10px; z-index:10; background-color:#FFFFFF; overflow:hidden; padding:0; margin:0;} +.planetDocument .article .tooltipArrow { position:absolute; background:url("./tooltip.gif") no-repeat left -20px; width:7px; height:4px; left:0; top:10px; z-index:10; overflow:hidden; } +.planetDocument .article .tooltipLT { left:4px; top:0px; background-position:0 0; } +.planetDocument .article .tooltipRT { right:0px; top:0px; _right:-1px; background-position:-10px 0; } +.planetDocument .article .tooltipLB { left:4px; bottom:0px; background-position:0 -10px; } +.planetDocument .article .tooltipRB { right:0px; bottom:0px; _right:-1px; background-position:-10px -10px; } +.planetDocument .article .content { border:1px solid #545554; z-index:1; display:block; padding:10px; margin-left:4px; line-height:100%;} +.planetDocument .article .content div { line-height:1.3; } + +.planetDocument.black .article .tooltipLT, +.planetDocument.black .article .tooltipRT, +.planetDocument.black .article .tooltipLB, +.planetDocument.black .article .tooltipRB { background-color:#000; } +.planetDocument.black .article .tooltipLT { background-position:0 -25px; } +.planetDocument.black .article .tooltipRT { top:0px; background-position:-10px -25px; } +.planetDocument.black .article .tooltipLB { background-position:0 -35px; } +.planetDocument.black .article .tooltipRB { bottom:0px; background-position:-10px -35px; } +.planetDocument.black .article .tooltipArrow { background-position:left -45px; } +.planetDocument.black .article .content { border:1px solid #ABAAAB; } +.planetDocument.black .article .content div { color:#aaa;} +.planetDocument.black .article .content div a { color:#aaa;} diff --git a/widgets/planet_document/skins/xe_official/tooltip.gif b/widgets/planet_document/skins/xe_official/tooltip.gif new file mode 100755 index 000000000..1692e4740 Binary files /dev/null and b/widgets/planet_document/skins/xe_official/tooltip.gif differ diff --git a/widgets/rss_reader/conf/info.xml b/widgets/rss_reader/conf/info.xml index 201daf9ac..bb48dcbec 100644 --- a/widgets/rss_reader/conf/info.xml +++ b/widgets/rss_reader/conf/info.xml @@ -39,6 +39,23 @@ Это будет заголовком виджета.顯示標題名稱。 + + text + 제목 글자수 + タイトルの文字数 + 标题字数 + Length of Subject + Número de letras del título + Длина темы + 標題字數 + 제목 글자수를 지정할 수 있습니다. (0또는 비워주시면 자르지 않습니다) + タイトルの文字数が指定できます(「0」または空欄の場合は、文字数を制限しません)。 + 可以设置标题的字数。(0或留空为不限) + Length of Subject can be assigned. (0 or blank value will not restrict the length) + El largo del título puede ser asignado. (valor 0 o en blanco no restringe el largo) + Длина темы может быть присвоена. (0 или пустое значение не будут ограничивать длину) + 可設置標題的字數。(0或留白為不限制) + text RSS URL @@ -100,4 +117,4 @@ 選擇面板時的高度。(預設是200px) - \ No newline at end of file + diff --git a/widgets/rss_reader/rss_reader.class.php b/widgets/rss_reader/rss_reader.class.php index 81e4aa0ca..539e49d59 100644 --- a/widgets/rss_reader/rss_reader.class.php +++ b/widgets/rss_reader/rss_reader.class.php @@ -90,6 +90,7 @@ $widget_info->rss_list = $rss_list; $widget_info->title = $title; $widget_info->rss_height = $args->rss_height ? $args->rss_height : 200; + $widget_info->subject_cut_size = $args->subject_cut_size; Context::set('widget_info', $widget_info); diff --git a/widgets/rss_reader/skins/xe_official/list.html b/widgets/rss_reader/skins/xe_official/list.html index 4c967bf77..381240b0e 100644 --- a/widgets/rss_reader/skins/xe_official/list.html +++ b/widgets/rss_reader/skins/xe_official/list.html @@ -13,7 +13,7 @@
            • {$item->date} - {htmlspecialchars($item->title)} + {htmlspecialchars(cut_str($item->title, $widget_info->subject_cut_size))}
            • diff --git a/widgets/tag_list/conf/info.xml b/widgets/tag_list/conf/info.xml index 3b5afe22e..a9975b96f 100644 --- a/widgets/tag_list/conf/info.xml +++ b/widgets/tag_list/conf/info.xml @@ -62,22 +62,22 @@ Вы можете сконфигурировать число тегов для показа. (стандарт: 20)可設置要顯示的標籤數。(預設是 20個) - - mid - 대상 모듈 - 模块对象 - モジュール - Target Module - Módulo Objetivo - Модуль назначения - 目標模組 - 선택하신 모듈에 등록된 꼬리표를 대상으로 합니다. - 将把被选模块当中的标签作为对象。 - チェックされたモジュールに登録されたタグを対象とします。 - Tag list will be shown based on this target module. - Objetivo de la lista de etiquetas será la del módulo seleccionado. - Список тегов будет показан на основании этого модуля назначения. - 把所選擇的模組作為目標。 - + + mid_list + 대상 모듈 + 模块对象 + モジュール + Target Module + Módulo objetivo + Модуль назначения + 目標模組 + 선택하신 모듈에 등록된 글을 대상으로 합니다. + 将把被选模块当中的主题作为对象。 + チェックされたモジュールに登録されたコンテンツ(書き込み)を対象とします。 + The target articles for the newest comments will be the ones submitted in the selected module. + El objetivo de los comentarios recientes serán los comentarios agragados en el módulo selccionado. + Статьи назначения для последних комментариев будут теми, что были размещены в выбранном модуле. + 將所選擇的模組作為目標。 + - \ No newline at end of file + diff --git a/widgets/tag_list/skins/blog_tag_list/common.css b/widgets/tag_list/skins/blog_tag_list/common.css new file mode 100644 index 000000000..e045e8e1c --- /dev/null +++ b/widgets/tag_list/skins/blog_tag_list/common.css @@ -0,0 +1,8 @@ +.tag_list .items span a { text-decoration:none; color:#000; display:inline-block; margin:0 10px 5px 0; } +.tag_list .items span a:hover { text-decoration:underline;} +.tag_list .items .type1 a { font-weight:bold; font-size:18px; } +.tag_list .items .type2 a { font-size:18px; } +.tag_list .items .type3 a { font-weight:bold; font-size:14px; } +.tag_list .items .type4 a { } + +.blog_widget_black .tag_list .items span a { color:#fff; } diff --git a/widgets/tag_list/skins/blog_tag_list/css/common.css b/widgets/tag_list/skins/blog_tag_list/css/common.css deleted file mode 100644 index d7f60a786..000000000 --- a/widgets/tag_list/skins/blog_tag_list/css/common.css +++ /dev/null @@ -1,6 +0,0 @@ -.tag_list .items span a { color:#a4a4a4; line-height:120%;} -.tag_list .items .typeA a { color:#fe3614; font-weight:bold; font-size:12pt; background-color:#EFEFEF; margin:0;} -.tag_list .items .typeB a { color:#fe3614; font-size:11pt; margin:0;} -.tag_list .items .typeC a { font-weight:bold; font-size:11pt; margin:0; background-color:#EFEFEF;} -.tag_list .items .typeD a { font-weight:bold; margin:0; background-color:#EFEFEF;} -.tag_list .items .typeE a { font-weight:normal; margin:0;} diff --git a/widgets/tag_list/skins/blog_tag_list/css/cyan.css b/widgets/tag_list/skins/blog_tag_list/css/cyan.css deleted file mode 100644 index 1ebc30a46..000000000 --- a/widgets/tag_list/skins/blog_tag_list/css/cyan.css +++ /dev/null @@ -1,5 +0,0 @@ -.blog_widget_cyan .tag_list { border:1px solid #e0e1db; background:url(../images/cyan/bgBoxTypeB.gif) repeat-x left top; margin-bottom:.7em; } -.blog_widget_cyan .tag_list h2 { padding:0; margin:0; border-left:1px solid #ffffff; border-right:1px solid #ffffff; padding:7px 0 0 12px; height:21px; _height:20px; font-size:1em; color:#54564b; } -.blog_widget_cyan .tag_list .items { margin:0; padding:10px; overflow:hidden;} -.blog_widget_cyan .tag_list .items li { font-size:.9em; display:block; color:#a4a4a4; margin-right:.1em; overflow:hidden; white-space:nowrap; list-style:none; width:100%;} -.blog_widget_cyan .tag_list .items li a { color:#a4a4a4; line-height:1.5em; text-decoration:none; } diff --git a/widgets/tag_list/skins/blog_tag_list/css/green.css b/widgets/tag_list/skins/blog_tag_list/css/green.css deleted file mode 100644 index 2ef58b653..000000000 --- a/widgets/tag_list/skins/blog_tag_list/css/green.css +++ /dev/null @@ -1,5 +0,0 @@ -.blog_widget_green .tag_list { border:1px solid #e0e1db; background:url(../images/green/bgBoxTypeB.gif) repeat-x left top; margin-bottom:.7em; } -.blog_widget_green .tag_list h2 { margin:0; padding:0; border-left:1px solid #ffffff; border-right:1px solid #ffffff; padding:7px 0 0 12px; height:21px; _height:20px; font-size:1em; color:#54564b; } -.blog_widget_green .tag_list .items { margin:0; padding:10px; overflow:hidden;} -.blog_widget_green .tag_list .items li { font-size:.9em; display:block; color:#a4a4a4; margin-right:.1em; overflow:hidden; white-space:nowrap; list-style:none; width:100%;} -.blog_widget_green .tag_list .items li a { color:#a4a4a4; line-height:1.5em; text-decoration:none; } diff --git a/widgets/tag_list/skins/blog_tag_list/css/normal.css b/widgets/tag_list/skins/blog_tag_list/css/normal.css deleted file mode 100644 index d010e7fc6..000000000 --- a/widgets/tag_list/skins/blog_tag_list/css/normal.css +++ /dev/null @@ -1,5 +0,0 @@ -.blog_widget_normal .tag_list { border:1px solid #e0e1db; background:url(../images/normal/bgBoxTypeB.gif) repeat-x left top; margin-bottom:.7em; } -.blog_widget_normal .tag_list h2 { margin:0; padding:0; border-left:1px solid #ffffff; border-right:1px solid #ffffff; padding:7px 0 0 12px; height:21px; _height:20px; font-size:1em; color:#54564b; } -.blog_widget_normal .tag_list .items { margin:0; padding:10px; overflow:hidden;} -.blog_widget_normal .tag_list .items li { font-size:.9em; display:block; color:#a4a4a4; margin-right:.1em; overflow:hidden; white-space:nowrap; list-style:none; width:100%;} -.blog_widget_normal .tag_list .items li a { color:#a4a4a4; line-height:1.5em; text-decoration:none; text-decoration:none; } diff --git a/widgets/tag_list/skins/blog_tag_list/css/purple.css b/widgets/tag_list/skins/blog_tag_list/css/purple.css deleted file mode 100644 index 974396551..000000000 --- a/widgets/tag_list/skins/blog_tag_list/css/purple.css +++ /dev/null @@ -1,5 +0,0 @@ -.blog_widget_purple .tag_list { border:1px solid #e0e1db; background:url(../images/purple/bgBoxTypeB.gif) repeat-x left top; margin-bottom:.7em; } -.blog_widget_purple .tag_list h2 { margin:0; padding:0; border-left:1px solid #ffffff; border-right:1px solid #ffffff; padding:7px 0 0 12px; height:21px; _height:20px; font-size:1em; color:#54564b; } -.blog_widget_purple .tag_list .items { margin:0; padding:10px; overflow:hidden;} -.blog_widget_purple .tag_list .items li { font-size:.9em; display:block; color:#a4a4a4; margin-right:.1em; overflow:hidden; white-space:nowrap; list-style:none; width:100%;} -.blog_widget_purple .tag_list .items li a { color:#a4a4a4; line-height:1.5em; text-decoration:none; } diff --git a/widgets/tag_list/skins/blog_tag_list/css/red.css b/widgets/tag_list/skins/blog_tag_list/css/red.css deleted file mode 100644 index 6bcd4df77..000000000 --- a/widgets/tag_list/skins/blog_tag_list/css/red.css +++ /dev/null @@ -1,5 +0,0 @@ -.blog_widget_red .tag_list { border:1px solid #e0e1db; background:url(../images/red/bgBoxTypeB.gif) repeat-x left top; margin-bottom:.7em; } -.blog_widget_red .tag_list h2 { margin:0; padding:0; border-left:1px solid #ffffff; border-right:1px solid #ffffff; padding:7px 0 0 12px; height:21px; _height:20px; font-size:1em; color:#54564b; } -.blog_widget_red .tag_list .items { margin:0; padding:10px; overflow:hidden;} -.blog_widget_red .tag_list .items li { font-size:.9em; display:block; color:#a4a4a4; margin-right:.1em; overflow:hidden; white-space:nowrap; list-style:none; width:100%;} -.blog_widget_red .tag_list .items li a { color:#a4a4a4; line-height:1.5em; text-decoration:none; } diff --git a/widgets/tag_list/skins/blog_tag_list/images/cyan/bgBoxTypeB.gif b/widgets/tag_list/skins/blog_tag_list/images/cyan/bgBoxTypeB.gif deleted file mode 100644 index 99a877045..000000000 Binary files a/widgets/tag_list/skins/blog_tag_list/images/cyan/bgBoxTypeB.gif and /dev/null differ diff --git a/widgets/tag_list/skins/blog_tag_list/images/green/bgBoxTypeB.gif b/widgets/tag_list/skins/blog_tag_list/images/green/bgBoxTypeB.gif deleted file mode 100644 index 1cdca75c2..000000000 Binary files a/widgets/tag_list/skins/blog_tag_list/images/green/bgBoxTypeB.gif and /dev/null differ diff --git a/widgets/tag_list/skins/blog_tag_list/images/normal/bgBoxTypeB.gif b/widgets/tag_list/skins/blog_tag_list/images/normal/bgBoxTypeB.gif deleted file mode 100644 index 09f7dd59c..000000000 Binary files a/widgets/tag_list/skins/blog_tag_list/images/normal/bgBoxTypeB.gif and /dev/null differ diff --git a/widgets/tag_list/skins/blog_tag_list/images/purple/bgBoxTypeB.gif b/widgets/tag_list/skins/blog_tag_list/images/purple/bgBoxTypeB.gif deleted file mode 100644 index 9e130ae44..000000000 Binary files a/widgets/tag_list/skins/blog_tag_list/images/purple/bgBoxTypeB.gif and /dev/null differ diff --git a/widgets/tag_list/skins/blog_tag_list/images/red/bgBoxTypeB.gif b/widgets/tag_list/skins/blog_tag_list/images/red/bgBoxTypeB.gif deleted file mode 100644 index 01406b48a..000000000 Binary files a/widgets/tag_list/skins/blog_tag_list/images/red/bgBoxTypeB.gif and /dev/null differ diff --git a/widgets/tag_list/skins/blog_tag_list/skin.xml b/widgets/tag_list/skins/blog_tag_list/skin.xml index d06292276..4c6a75e3c 100644 --- a/widgets/tag_list/skins/blog_tag_list/skin.xml +++ b/widgets/tag_list/skins/blog_tag_list/skin.xml @@ -30,40 +30,14 @@ 레이아웃에 맞춤隨版面 - - 기본 컬러 - デフォルトカラー - 默认颜色 - Default color - 預設顏色 - - - 청록색 - 青緑 - 青绿色 - cyan - 青綠色 - - - 초록색 - - 绿色 - green - 綠色 - - - 빨간색 - - 红色 - red - 紅色 - - - 보라색 - - 紫色 - purple - 紫色 - + + 검은색 + + Black + Черного + Negro + 黑色 + 黑色 + - \ No newline at end of file + diff --git a/widgets/tag_list/skins/blog_tag_list/tags.html b/widgets/tag_list/skins/blog_tag_list/tags.html index dea9cd609..e5ecb9f92 100644 --- a/widgets/tag_list/skins/blog_tag_list/tags.html +++ b/widgets/tag_list/skins/blog_tag_list/tags.html @@ -1,51 +1,32 @@ - + - - - - - - - - - - + + {@ $colorset="black" } {@ $colorset="" }
              +
              -

              {$widget_info->title}

              - -

              tags

              -
              +
              - - - {@ $tag_class = "typeA" } - - {@ $tag_class = "typeB" } - - {@ $tag_class = "typeC" } - - {@ $tag_class = "typeD" } - - {@ $tag_class = "typeE" } - - - class="{$tag_class}" > - - {htmlspecialchars($val->tag)} + + + {htmlspecialchars($val->tag)} - {htmlspecialchars($val->tag)} + + {htmlspecialchars($val->tag)} + + {htmlspecialchars($val->tag)} + diff --git a/widgets/tag_list/tag_list.class.php b/widgets/tag_list/tag_list.class.php index a06b5d0f7..939184d23 100644 --- a/widgets/tag_list/tag_list.class.php +++ b/widgets/tag_list/tag_list.class.php @@ -19,15 +19,9 @@ $title = $args->title; $list_count = (int)$args->list_count; if(!$list_count) $list_count = 20; - if($args->mid_list) { - $tmp_mid = explode(",",$args->mid_list); - $mid = $tmp_mid[0]; - } else { - $mid = $args->mid; - } // TagModel::getTagList()를 이용하기 위한 변수 정리 - $obj->mid = $mid; + $obj->mid = $args->mid_list; $obj->list_count = $list_count; // tag 모듈의 model 객체를 받아서 getTagList() method를 실행 @@ -35,21 +29,37 @@ $output = $oTagModel->getTagList($obj); // 템플릿 파일에서 사용할 변수들을 세팅 - $widget_info->module_name = $mid; - + if(preg_match('/^([0-9a-z\_]+)$/i', $args->mid_list)) $widget_info->mid = $widget_info->module_name = $args->mid_list; $widget_info->title = $title; - $widget_info->mid = $mid; if(count($output->data)) { - - // 내용을 랜던으로 정렬 - $numbers = array_keys($output->data); - shuffle($numbers); - foreach($numbers as $k => $v) { - $widget_info->tag_list[] = $output->data[$v]; + $tags = array(); + $max = 0; + $min = 99999999; + foreach($output->data as $key => $val) { + $tag = trim($val->tag); + if(!$tag) continue; + $count = $val->count; + if($max < $count) $max = $count; + if($min > $count) $min = $count; + $tags[] = $val; } + + $mid2 = $min+(int)(($max-$min)/2); + $mid1 = $mid2+(int)(($max-$mid2)/2); + $mid3 = $min+(int)(($mid2-$min)/2); + + foreach($tags as $key => $item) { + if($item->count > $mid1) $rank = 1; + elseif($item->count > $mid2) $rank = 2; + elseif($item->count > $mid3) $rank = 3; + else $rank= 4; + $tags[$key]->rank = $rank; + } + shuffle($tags); } + $widget_info->tag_list = $tags; Context::set('widget_info', $widget_info);