version update 1.1.4
git-svn-id: http://xe-core.googlecode.com/svn/trunk@5237 201d5d3c-b55e-5fd7-737f-ddc643e51545
|
|
@ -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, '<a href="$1" onclick="window.open(this.href); return false;">$1</a>');
|
||||
$(obj).replaceWith(html);
|
||||
delete(html);
|
||||
var content = obj.nodeValue;
|
||||
if(!url_regx.test(content)) continue;
|
||||
|
||||
content = content.replace(/</g, '<');
|
||||
content = content.replace(/>/g, '>');
|
||||
content = content.replace(url_regx, '<a href="$1" onclick="window.open(this.href); return false;">$1</a>');
|
||||
|
||||
$(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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<addon version="0.2">
|
||||
<title xml:lang="ko">키워드 링크 애드온</title>
|
||||
<title xml:lang="zh-TW">關鍵字連結</title>
|
||||
<description xml:lang="ko">
|
||||
게시글과 댓글의 내용중 등록된 키워드에 링크를 걸어주는 애드온입니다.
|
||||
키워드는 콤마(,)로 구분하여 여러개 등록할 수 있습니다.
|
||||
먼저 등록된 키워드가 우선순위를 갖습니다.
|
||||
</description>
|
||||
<description xml:lang="zh-TW">
|
||||
게시글과 댓글의 내용중 등록된 키워드에 링크를 걸어주는 애드온입니다.
|
||||
可用逗號(,)區隔多個關鍵字。
|
||||
以第一關鍵字為主。
|
||||
</description>
|
||||
<version>0.1</version>
|
||||
<date>2008-12-20</date>
|
||||
<author email_address="sol@ngleader.com" link="http://ngleader.tistory.com">
|
||||
|
|
@ -21,51 +27,69 @@
|
|||
<extra_vars>
|
||||
<var name="cssquery">
|
||||
<title xml:lang="ko">cssquery</title>
|
||||
<title xml:lang="zh-TW">cssquery</title>
|
||||
<description xml:lang="ko">치환할 부분의 jQuery cssquery입니다.
|
||||
xe_board 게시판 스킨이면 공백으로 두면 됩니다.</description>
|
||||
<description xml:lang="zh-TW">치환할 부분의 jQuery cssquery입니다.
|
||||
xe_board 게시판 스킨이면 공백으로 두면 됩니다.</description>
|
||||
</var>
|
||||
|
||||
<var name="reg_type" type="select">
|
||||
<title xml:lang="ko">링크 방법</title>
|
||||
<title xml:lang="zh-TW">連結方式</title>
|
||||
<description xml:lang="ko"> 키워드가 여러개 있을때 "첫번째 키워드"에만 링크를 걸 것인지 "모든 키워드"에 걸 것인지 선택합니다.
|
||||
</description>
|
||||
<description xml:lang="zh-TW"> 키워드가 여러개 있을때 "첫번째 키워드"에만 링크를 걸 것인지 "모든 키워드"에 걸 것인지 선택합니다.
|
||||
</description>
|
||||
<options value="">
|
||||
<title xml:lang="ko">첫번째 키워드</title>
|
||||
<title xml:lang="zh-TW">第一關鍵字</title>
|
||||
</options>
|
||||
<options value="g">
|
||||
<title xml:lang="ko">모든 키워드</title>
|
||||
<title xml:lang="zh-TW">所有關鍵字</title>
|
||||
</options>
|
||||
</var>
|
||||
|
||||
<var name="keyword01">
|
||||
<title xml:lang="ko">키워드</title>
|
||||
<title xml:lang="zh-TW">關鍵字</title>
|
||||
</var>
|
||||
<var name="url01">
|
||||
<title xml:lang="ko">링크</title>
|
||||
<title xml:lang="zh-TW">連結</title>
|
||||
</var>
|
||||
<var name="keyword02">
|
||||
<title xml:lang="ko">키워드</title>
|
||||
<title xml:lang="zh-TW">關鍵字</title>
|
||||
</var>
|
||||
<var name="url02">
|
||||
<title xml:lang="ko">링크</title>
|
||||
<title xml:lang="zh-TW">連結</title>
|
||||
</var>
|
||||
<var name="keyword03">
|
||||
<title xml:lang="ko">키워드</title>
|
||||
<title xml:lang="zh-TW">關鍵字</title>
|
||||
</var>
|
||||
<var name="url03">
|
||||
<title xml:lang="ko">링크</title>
|
||||
<title xml:lang="zh-TW">連結</title>
|
||||
</var>
|
||||
<var name="keyword04">
|
||||
<title xml:lang="ko">키워드</title>
|
||||
<title xml:lang="zh-TW">關鍵字</title>
|
||||
</var>
|
||||
<var name="url04">
|
||||
<title xml:lang="ko">링크</title>
|
||||
<title xml:lang="zh-TW">連結</title>
|
||||
</var>
|
||||
<var name="keyword05">
|
||||
<title xml:lang="ko">키워드</title>
|
||||
<title xml:lang="zh-TW">關鍵字</title>
|
||||
</var>
|
||||
<var name="url05">
|
||||
<title xml:lang="ko">링크</title>
|
||||
<title xml:lang="zh-TW">連結</title>
|
||||
</var>
|
||||
</extra_vars>
|
||||
</addon>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;i<c;i++){
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 로그 남김
|
||||
* @brief 로그 남김
|
||||
**/
|
||||
function actStart($query) {
|
||||
$this->setError(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<?php\n/*\n====================================\n".$buff."------------------------------------\n*/\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_time<filemtime($xml_file) || $cache_time < filemtime(_XE_PATH_.'classes/db/DB.class.php')) {
|
||||
require_once(_XE_PATH_.'classes/xml/XmlQueryParser.class.php');
|
||||
require_once(_XE_PATH_.'classes/xml/XmlQueryParser.class.php');
|
||||
$oParser = new XmlQueryParser();
|
||||
$oParser->parse($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;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -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 = "<div style='text-align: left;'>\n";
|
||||
$output .= "<b>Backtrace:</b><br />\n";
|
||||
$backtrace = debug_backtrace();
|
||||
|
||||
|
||||
foreach ($backtrace as $bt) {
|
||||
$args = '';
|
||||
foreach ($bt['args'] as $a) {
|
||||
|
|
@ -672,18 +687,18 @@
|
|||
$output .= "</div>\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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
||||
|
|
|
|||
|
|
@ -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 "<!--\r\n".$buff."\r\n-->";
|
||||
}
|
||||
|
||||
// 전체 실행 시간 작성
|
||||
$buff .= sprintf("\tTotal elapsed time \t\t: %0.5f sec", $end-__StartTime__);
|
||||
|
||||
if(__DEBUG_OUTPUT__==1 && Context::getResponseMethod()=='HTML') return "<!--\r\n".$buff."\r\n-->";
|
||||
|
||||
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
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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;$i<count($group_list);$i++) {
|
||||
$group = $group_list[$i];
|
||||
$column = trim($group->attrs->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;$i<count($group_list);$i++) {
|
||||
$group = $group_list[$i];
|
||||
$column = trim($group->attrs->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()';
|
||||
|
|
|
|||
3561
common/js/jquery.js
vendored
|
|
@ -14,7 +14,7 @@
|
|||
* 이 내용은 XE의 버전을 관리자 페이지에 표시하기 위한 용도이며
|
||||
* config.inc.php의 수정이 없더라도 공식 릴리즈시에 수정되어 함께 배포되어야 함
|
||||
**/
|
||||
define('__ZBXE_VERSION__', '1.1.3');
|
||||
define('__ZBXE_VERSION__', '1.1.4');
|
||||
|
||||
/**
|
||||
* @brief 디버깅 메세지 출력
|
||||
|
|
@ -28,10 +28,19 @@
|
|||
/**
|
||||
* @brief 디버그 메세지의 출력 장소
|
||||
* 0 : files/_debug_message.php 에 연결하여 출력
|
||||
* 1 : Response Method 가 XML 형식이 아닐 경우 브라우저에 최상단에 주석으로 표시
|
||||
* 1 : Response Method 가 XML 형식이 아닐 경우 브라우저에 최하단에 주석으로 표시
|
||||
* 2 : Firebug 콘솔에 출력 (PHP 5.2 이상. firebug / firephp 플러그인 필요)
|
||||
**/
|
||||
define('__DEBUG_OUTPUT__', 0);
|
||||
|
||||
/**
|
||||
* @brief FirePHP 콘솔 및 브라우저 주석 출력 보안
|
||||
* 0 : 제한 없음 (권장하지 않음)
|
||||
* 1 : 지정한 IP 주소에만 허용
|
||||
**/
|
||||
define('__DEBUG_PROTECT__', 1);
|
||||
define('__DEBUG_PROTECT_IP__', '127.0.0.1');
|
||||
|
||||
/**
|
||||
* @brief DB 오류 메세지 출력 정의
|
||||
* 0 : 출력하지 않음
|
||||
|
|
@ -60,10 +69,17 @@
|
|||
**/
|
||||
define('_XE_PATH_', str_replace('config/config.inc.php', '', str_replace('\\', '/', __FILE__)));
|
||||
|
||||
/**
|
||||
* @brief Firebug 콘솔 출력 사용시 관련 파일 require
|
||||
**/
|
||||
if(__DEBUG_OUTPUT__ == 2 && version_compare(phpversion(), '5.2', '>') == 1) {
|
||||
require_once _XE_PATH_.'libs/FirePHPCore/FirePHP.class.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 간단하게 사용하기 위한 함수 정의한 파일 require
|
||||
**/
|
||||
require_once(_XE_PATH_.'config/func.inc.php');
|
||||
require_once(_XE_PATH_.'config/func.inc.php');
|
||||
|
||||
|
||||
if(__DEBUG__) define('__StartTime__', getMicroTime());
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@
|
|||
$g_min = $t_min - $c_min;
|
||||
$g_hour = $t_hour - $c_hour;
|
||||
|
||||
$gap = $g_min*60 + $g_hour*60*60; //TODO : 연산 우선순위에 따라 코드를 묶어줄 필요가 있음
|
||||
$gap = $g_min*60 + $g_hour*60*60;
|
||||
return $gap;
|
||||
}
|
||||
|
||||
|
|
@ -386,17 +386,38 @@
|
|||
* ./files/_debug_message.php 파일에 $buff 내용을 출력한다.
|
||||
* tail -f ./files/_debug_message.php 하여 계속 살펴 볼 수 있다
|
||||
**/
|
||||
function debugPrint($buff = null, $display_line = true) {
|
||||
$debug_file = _XE_PATH_."files/_debug_message.php";
|
||||
function debugPrint($buff = null, $display_option = true) {
|
||||
static $firephp;
|
||||
$bt = debug_backtrace();
|
||||
if(is_array($bt)) $first = array_shift($bt);
|
||||
$buff = sprintf("[%s %s:%d]\n%s\n", date("Y-m-d H:i:s"), array_pop(explode(DIRECTORY_SEPARATOR, $first["file"])), $first["line"], print_r($buff,true));
|
||||
$file_name = array_pop(explode(DIRECTORY_SEPARATOR, $first['file']));
|
||||
$line_num = $first['line'];
|
||||
|
||||
if($display_line) $buff = "\n====================================\n".$buff."------------------------------------\n";
|
||||
if(__DEBUG_OUTPUT__ == 0 || (__DEBUG_OUTPUT__ == 2 && version_compare(phpversion(), '5.2', '>') != 1) ) {
|
||||
$debug_file = _XE_PATH_.'files/_debug_message.php';
|
||||
$buff = sprintf("[%s %s:%d]\n%s\n", date('Y-m-d H:i:s'), $file_name, $line_num, print_r($buff, true));
|
||||
|
||||
if(@!$fp = fopen($debug_file,"a")) return;
|
||||
fwrite($fp, $buff);
|
||||
fclose($fp);
|
||||
if($display_option === true) $buff = "\n====================================\n".$buff."------------------------------------\n";
|
||||
$buff = "\n<?php\n/*".$buff."*/\n?>\n";
|
||||
if(@!$fp = fopen($debug_file, 'a')) return;
|
||||
fwrite($fp, $buff);
|
||||
fclose($fp);
|
||||
|
||||
} elseif(__DEBUG_OUTPUT__ == 2 && version_compare(phpversion(), '5.2', '>') == 1) {
|
||||
if(!isset($firephp)) $firephp = FirePHP::getInstance(true);
|
||||
$label = sprintf('%s:%d', $file_name, $line_num);
|
||||
// FirePHP 옵션
|
||||
if($display_option === 'TABLE') {
|
||||
$label = $display_option;
|
||||
}
|
||||
|
||||
if(__DEBUG_PROTECT__ == 1 && __DEBUG_PROTECT_IP__ != $_SERVER['REMOTE_ADDR']) {
|
||||
$buff = '허용되지 않은 IP 입니다. config/config.inc.php 파일의 __DEBUG_PROTECT_IP__ 상수 값을 자신의 IP로 변경하세요.';
|
||||
$label = null;
|
||||
}
|
||||
|
||||
$firephp->fb($buff, $label);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
1375
libs/FirePHPCore/FirePHP.class.php
Normal file
58
libs/FirePHPCore/LICENSE
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
Software License Agreement (New BSD License)
|
||||
|
||||
Copyright (c) 2006-2008, Christoph Dorn
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of Christoph Dorn nor the names of its
|
||||
contributors may be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
Software License Agreement (New BSD License)
|
||||
|
||||
Copyright (c) 2006-2008, Christoph Dorn
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of Christoph Dorn nor the names of its
|
||||
contributors may be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
<div id="popBody">
|
||||
|
||||
<table cellspacing="0" class="adminTable">
|
||||
<tr class="row2">
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->title}</div></th>
|
||||
<td>{$addon_info->title} ver. {$addon_info->version}</td>
|
||||
</tr>
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
<!--@endforeach-->
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row2">
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->homepage}</div></th>
|
||||
<td><a href="{$addon_info->homepage}" onclick="window.open(this.href);return false;">{$addon_info->homepage}</a></td>
|
||||
</tr>
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
<th scope="row"><div>{$lang->regdate}</div></th>
|
||||
<td>{zdate($addon_info->date, 'Y-m-d')}</td>
|
||||
</tr>
|
||||
<tr class="row2">
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->addon_license}</div></th>
|
||||
<td>
|
||||
{nl2br(trim($addon_info->license))}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
<tbody>
|
||||
<!--@foreach($addon_list as $key => $val)-->
|
||||
<tr class="row{$cycle_idx}">
|
||||
<tr>
|
||||
<th scope="row" rowspan="2">
|
||||
<div>
|
||||
<a href="{getUrl('','module','addon','act','dispAddonAdminInfo','selected_addon',$val->addon)}" onclick="popopen(this.href,'addon_info');return false">{$val->title}</a> <br />
|
||||
|
|
|
|||
|
|
@ -3,15 +3,7 @@
|
|||
* fo_addon이라는 id를 가지는 form에 인자로 주어진 addon값을 세팅후 실행
|
||||
**/
|
||||
function doToggleAddon(addon) {
|
||||
var fo_obj = xGetElementById('fo_addon');
|
||||
var fo_obj = jQuery('#fo_addon').get(0);
|
||||
fo_obj.addon.value = addon;
|
||||
procFilter(fo_obj, toggle_activate_addon);
|
||||
}
|
||||
|
||||
function toggleSectionCheckBox(obj, id) {
|
||||
var box_list = xGetElementsByTagName('input', xGetElementById(id));
|
||||
if(typeof(box_list.length)=='undefined') return;
|
||||
for(var i in box_list) {
|
||||
box_list[i].checked = obj.checked;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
<div id="popBody">
|
||||
<table cellspacing="0" class="adminTable">
|
||||
<tr class="row2">
|
||||
<tr>
|
||||
<th scope="row"><div><label for="textfield1">{$lang->title}</label></div></th>
|
||||
<td>{$addon_info->title} ver. {$addon_info->version} ({zdate($addon_info->date, 'Y-m-d')})</td>
|
||||
</tr>
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
<!--@endforeach-->
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row2">
|
||||
<tr>
|
||||
<th scope="row"><div><label for="textfield2">{$lang->homepage}</label></div></th>
|
||||
<td class="blue"><a href="{$addon_info->homepage}" onclick="window.open(this.href);return false;">{$addon_info->homepage}</a> </td>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -19,6 +19,12 @@
|
|||
$oModuleModel = &getModel('module');
|
||||
$module_list = $oModuleModel->getModuleList();
|
||||
|
||||
// 개발 디버그 파일들 제거
|
||||
FileHandler::removeFile(_XE_PATH_.'files/_debug_message.php');
|
||||
FileHandler::removeFile(_XE_PATH_.'files/_debug_db_query.php');
|
||||
FileHandler::removeFile(_XE_PATH_.'files/_db_slow_query.php');
|
||||
|
||||
// 각 모듈마다 돌면서 캐시 파일 제거
|
||||
foreach($module_list as $module) {
|
||||
$oModule = null;
|
||||
$oModule = &getClass($module->module);
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@
|
|||
**/
|
||||
function dispAdminConfig() {
|
||||
$db_info = Context::getDBInfo();
|
||||
debugPrint($db_info);
|
||||
|
||||
Context::set('selected_lang', $db_info->lang_type);
|
||||
|
||||
Context::set('lang_supported', Context::loadLangSupported());
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
<p>{$lang->about_rewrite}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row2">
|
||||
<tr>
|
||||
<th><div>{$lang->use_optimizer}</div></th>
|
||||
<td>
|
||||
<input type="checkbox" name="use_optimizer" value="Y" <!--@if($use_optimizer!='N')-->checked="checked"<!--@end--> />
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
<p>{$lang->about_lang_env}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row2">
|
||||
<tr>
|
||||
<th><div>{$lang->time_zone}</div></th>
|
||||
<td>
|
||||
<select name="time_zone" class="fixWidth">
|
||||
|
|
@ -53,7 +53,7 @@
|
|||
<p>{$lang->about_qmail_compatibility}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row2">
|
||||
<tr>
|
||||
<th><div>{$lang->use_ssl}</div></th>
|
||||
<td>
|
||||
<select name="use_ssl">
|
||||
|
|
@ -72,7 +72,7 @@
|
|||
<p>{$lang->about_server_ports}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row2">
|
||||
<tr>
|
||||
<td colspan="2" class="right">
|
||||
<span class="button"><input type="submit" value="{$lang->cmd_save}" /></span>
|
||||
</td>
|
||||
|
|
@ -121,7 +121,7 @@
|
|||
<p>{$lang->about_cmd_lang_select}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row2">
|
||||
<tr>
|
||||
<td class="right">
|
||||
<span class="button"><input type="submit" value="{$lang->cmd_save}" /></span>
|
||||
</td>
|
||||
|
|
@ -136,7 +136,7 @@
|
|||
<p>{$lang->about_recompile_cache}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row2">
|
||||
<tr>
|
||||
<td class="right">
|
||||
<span class="button"><input type="button" value="{$lang->cmd_remake_cache}" onclick="doRecompileCacheFile(); return false;"/></span>
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<table cellspacing="0" class="adminTable">
|
||||
<caption>{$lang->env_information}</caption>
|
||||
<tbody>
|
||||
<tr class="row2">
|
||||
<tr>
|
||||
<th><div>{$lang->current_version}</div></th>
|
||||
<td><strong>{$current_version}</strong></td>
|
||||
</tr>
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
<th><div>{$lang->current_path}</div></th>
|
||||
<td>{$installed_path}/</td>
|
||||
</tr>
|
||||
<tr class="row2">
|
||||
<tr>
|
||||
<th><div>{$lang->time_zone}</div></th>
|
||||
<td><!--@foreach($time_zone_list as $key => $val)--><!--@if($time_zone==$key)-->{$val}<!--@end--><!--@endforeach--></td>
|
||||
</tr>
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
<th><div>{$lang->use_rewrite}</div></th>
|
||||
<td><!--@if($use_rewrite=='Y')-->{$lang->use}<!--@else-->{$lang->notuse}<!--@end--></td>
|
||||
</tr>
|
||||
<tr class="row2">
|
||||
<tr>
|
||||
<th><div>{$lang->use_optimizer}</div></th>
|
||||
<td><!--@if($use_optimizer=='Y')-->{$lang->use}<!--@else-->{$lang->notuse}<!--@end--></td>
|
||||
</tr>
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
<th><div>Language</div></th>
|
||||
<td><!--@foreach($lang_supported as $key => $val)--><!--@if($key == $selected_lang)-->{$val}<!--@endif--><!--@endforeach--></td>
|
||||
</tr>
|
||||
<tr class="row2">
|
||||
<tr>
|
||||
<th><div>{$lang->qmail_compatibility}</div></th>
|
||||
<td><!--@if($qmail_compatibility=='Y')-->{$lang->use}<!--@else-->{$lang->notuse}<!--@end--></td>
|
||||
</tr>
|
||||
|
|
@ -53,8 +53,8 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<!--@foreach($module_list as $key => $val)-->
|
||||
<tr class="row{$cycle_idx}">
|
||||
<td class="circle"><a href="{getUrl('','module','admin','act',$val->admin_index_act)}" title="{trim($val->description)}">{$val->title}</a> ({$val->module})</td>
|
||||
<tr>
|
||||
<td class="circle"><a href="{getUrl('','module','admin','act',$val->admin_index_act)}" title="{trim(htmlspecialchars($val->description))}">{$val->title}</a> ({$val->module})</td>
|
||||
<td class="view">
|
||||
<a href="{getUrl('','module','module','act','dispModuleAdminInfo','selected_module',$val->module)}" onclick="popopen(this.href,'module_info');return false">{$lang->module_info}</a>
|
||||
</td>
|
||||
|
|
@ -102,7 +102,7 @@
|
|||
<caption>{$lang->newest_news}</caption>
|
||||
<tbody>
|
||||
<!--@foreach($news as $key => $val)-->
|
||||
<tr class="row{$cycle_idx}">
|
||||
<tr>
|
||||
<td class="paper">
|
||||
<a href="{$val->url}" onclick="window.open(this.href);return false;" class="fl">{$val->title}</a>
|
||||
<span class="date fr">{zdate($val->date,"Y-m-d")}</span>
|
||||
|
|
@ -124,7 +124,7 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row2">
|
||||
<tr>
|
||||
<td class="circle"><a href="{getUrl('act','dispMemberAdminList')}">{$lang->member}</a></td>
|
||||
<td class="number center">{number_format($status->member->yesterday)}</td>
|
||||
<td class="number center">{number_format($status->member->today)}</td>
|
||||
|
|
@ -136,7 +136,7 @@
|
|||
<td class="number center">{number_format($status->document->today)}</td>
|
||||
<td class="number center">{number_format($status->document->total)}</td>
|
||||
</tr>
|
||||
<tr class="row2">
|
||||
<tr>
|
||||
<td class="circle"><a href="{getUrl('act','dispCommentAdminList')}">{$lang->comment}</a></td>
|
||||
<td class="number center">{number_format($status->comment->yesterday)}</td>
|
||||
<td class="number center">{number_format($status->comment->today)}</td>
|
||||
|
|
@ -148,7 +148,7 @@
|
|||
<td class="number center">{number_format($status->trackback->today)}</td>
|
||||
<td class="number center">{number_format($status->trackback->total)}</td>
|
||||
</tr>
|
||||
<tr class="row2">
|
||||
<tr>
|
||||
<td class="circle"><a href="{getUrl('act','dispFileAdminList')}">{$lang->file}</a></td>
|
||||
<td class="number center">{number_format($status->file->yesterday)}</td>
|
||||
<td class="number center">{number_format($status->file->today)}</td>
|
||||
|
|
@ -160,7 +160,7 @@
|
|||
<td class="number center">{number_format($status->documentDeclared->today)}</td>
|
||||
<td class="number center">{number_format($status->documentDeclared->total)}</td>
|
||||
</tr>
|
||||
<tr class="row2">
|
||||
<tr>
|
||||
<td class="circle"><a href="{getUrl('act','dispCommentAdminDeclared')}">{$lang->comment.' '.$lang->cmd_declare}</a></td>
|
||||
<td class="number center">{number_format($status->commentDeclared->yesterday)}</td>
|
||||
<td class="number center">{number_format($status->commentDeclared->today)}</td>
|
||||
|
|
@ -179,7 +179,7 @@
|
|||
<col width="25" />
|
||||
<tbody>
|
||||
<!--@foreach($addon_list as $key => $val)-->
|
||||
<tr class="row{$cycle_idx}">
|
||||
<tr>
|
||||
<td class="circle">
|
||||
<a href="{getUrl('','module','addon','act','dispAddonAdminInfo','selected_addon',$val->addon)}" onclick="popopen(this.href,'addon_info');return false">{$val->title}</a>
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -4,13 +4,13 @@
|
|||
* @brief admin 모듈의 javascript
|
||||
**/
|
||||
|
||||
xAddEventListener(document,'click',showXESubMenu);
|
||||
jQuery(document).click(showXESubMenu);
|
||||
var openedSubMenus = null;
|
||||
|
||||
function showXESubMenu(evt) {
|
||||
var e = new xEvent(evt);
|
||||
if(e.target && /^adminMainMenu/.test(e.target.id)) {
|
||||
var key = e.target.id.split('_')[1];
|
||||
var obj = xGetElementById('adminSubMenu'+key);
|
||||
if(evt.target && /^adminMainMenu/.test(evt.target.id)) {
|
||||
var key = evt.target.id.split('_')[1];
|
||||
var obj = jQuery('#adminSubMenu'+key).get(0);
|
||||
if(!obj) return;
|
||||
if(openedSubMenus) openedSubMenus.style.visibility = 'hidden';
|
||||
if(openedSubMenus == obj) {
|
||||
|
|
@ -31,8 +31,8 @@ function showXESubMenu(evt) {
|
|||
|
||||
// open/close Main Navigator
|
||||
function toggleXEMainNavigator() {
|
||||
var obj = xGetElementsByClassName('xeAdmin')[0];
|
||||
var btnObj = xGetElementById('btnFolder');
|
||||
var obj = jQuery('.xeAdmin').get(0);
|
||||
var btnObj = jQuery('#btnFolder').get(0);
|
||||
if(!obj) return;
|
||||
if(obj.style.display == 'none') {
|
||||
obj.style.display = 'block';
|
||||
|
|
|
|||
87
modules/board/board.api.php
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
<?php
|
||||
/**
|
||||
* @class boardAPI
|
||||
* @author sol(sol@ngleader.com)
|
||||
* @brief board 모듈의 View Action에 대한 API 처리
|
||||
**/
|
||||
|
||||
class boardAPI extends board {
|
||||
|
||||
/* dispBoardContent 는 사용하지 않는다..
|
||||
function dispBoardContent(&$oModule) {
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief 공지사항 목록
|
||||
**/
|
||||
function dispBoardNoticeList(&$oModule) {
|
||||
$oModule->add('notice_list',$this->arrangeContentList(Context::get('notice_list')));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief 컨텐츠 목록
|
||||
**/
|
||||
function dispBoardContentList(&$oModule) {
|
||||
$oModule->add('document_list',$this->arrangeContentList(Context::get('document_list')));
|
||||
$oModule->add('page_navigation',Context::get('page_navigation'));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief 카테고리(분류) 목록
|
||||
**/
|
||||
function dispBoardCatogoryList(&$oModule) {
|
||||
$oModule->add('category_list',Context::get('category_list'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 게시물 보기
|
||||
**/
|
||||
function dispBoardContentView(&$oModule) {
|
||||
$oModule->add('oDocument',$this->arrangeContent(Context::get('oDocument')));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 태그 목록
|
||||
**/
|
||||
function dispBoardTagList(&$oModule) {
|
||||
$oModule->add('tag_list',Context::get('tag_list'));
|
||||
}
|
||||
|
||||
|
||||
function dispBoardConentCommentList(&$oModule) {
|
||||
$oModule->add('comment_list',$this->arrangeComment(Context::get('comment_list')));
|
||||
}
|
||||
|
||||
function arrangeContentList($content_list) {
|
||||
$output = array();
|
||||
if(count($content_list)) {
|
||||
foreach($content_list as $key => $val) $output[] = $this->arrangeContent($val);
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
function arrangeContent($content) {
|
||||
$output = null;
|
||||
if($content){
|
||||
$output= $content->gets('document_srl','category_srl','is_secret','nick_name','user_id','user_name','title','content','tags','voted_count','blamed_count','comment_count','regdate','last_update','extra_vars1','extra_vars2','extra_vars3','extra_vars4','extra_vars5','extra_vars6','extra_vars7','extra_vars8','extra_vars9','extra_vars10','extra_vars11','extra_vars12','extra_vars13','extra_vars14','extra_vars15','extra_vars16','extra_vars17','extra_vars18','extra_vars19','extra_vars20');
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
function arrangeComment($comment_list) {
|
||||
$output = array();
|
||||
if(count($comment_list)) {
|
||||
foreach($comment_list as $key => $val){
|
||||
$item = null;
|
||||
$item = $val->gets('comment_srl','parent_srl','depth','is_secret','content','voted_count','blamed_count','user_id','user_name','nick_name','email_address','homepage','regdate','last_update');
|
||||
$output[] = $item;
|
||||
}
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -67,10 +67,8 @@
|
|||
/**
|
||||
* 카테고리를 사용하는지 확인후 사용시 카테고리 목록을 구해와서 Context에 세팅
|
||||
**/
|
||||
if($this->module_info->use_category=='Y') {
|
||||
$oDocumentModel = &getModel('document');
|
||||
Context::set('category_list', $oDocumentModel->getCategoryList($this->module_srl));
|
||||
}
|
||||
$this->dispBoardCatogoryList();
|
||||
|
||||
|
||||
/**
|
||||
* 목록이 노출될때 같이 나오는 검색 옵션을 정리하여 스킨에서 쓸 수 있도록 context set
|
||||
|
|
@ -82,14 +80,34 @@
|
|||
for($i=1;$i<=20;$i++) {
|
||||
$ex_name = trim($this->module_info->extra_vars[$i]->name);
|
||||
if(!$ex_name) continue;
|
||||
|
||||
if($this->module_info->extra_vars[$i]->search == 'Y') $search_option['extra_vars'.$i] = $ex_name;
|
||||
}
|
||||
Context::set('search_option', $search_option);
|
||||
|
||||
/**
|
||||
* 게시글 목록을 추출함
|
||||
**/
|
||||
|
||||
// 게시글을 가져옴
|
||||
$this->dispBoardContentView();
|
||||
|
||||
// 공지사항 목록을 구해서 context set (공지사항을 매페이지 제일 상단에 위치하기 위해서)
|
||||
$this->dispBoardNoticeList();
|
||||
|
||||
// 목록
|
||||
$this->dispBoardContentList();
|
||||
|
||||
// template_file을 list.html로 지정
|
||||
$this->setTemplateFile('list');
|
||||
}
|
||||
|
||||
function dispBoardCatogoryList(){
|
||||
if($this->module_info->use_category=='Y') {
|
||||
$oDocumentModel = &getModel('document');
|
||||
Context::set('category_list', $oDocumentModel->getCategoryList($this->module_srl));
|
||||
}
|
||||
}
|
||||
|
||||
function dispBoardContentView(){
|
||||
$oDocumentModel = &getModel('document');
|
||||
$args->module_srl = $this->module_srl; ///< 현재 모듈의 module_srl
|
||||
|
||||
// 목록 구현에 필요한 변수들을 가져온다
|
||||
$document_srl = Context::get('document_srl');
|
||||
|
|
@ -135,9 +153,7 @@
|
|||
if(!$this->grant->view && !$oDocument->isGranted()) {
|
||||
$oDocument = null;
|
||||
$oDocument = $oDocumentModel->getDocument(0);
|
||||
|
||||
Context::set('document_srl','',true);
|
||||
|
||||
$this->alertMessage('msg_not_permitted');
|
||||
} else {
|
||||
// 브라우저 타이틀에 글의 제목을 추가
|
||||
|
|
@ -145,21 +161,49 @@
|
|||
|
||||
// 조회수 증가 (비밀글일 경우 권한 체크)
|
||||
if(!$oDocument->isSecret() || $oDocument->isGranted()) $oDocument->updateReadedCount();
|
||||
|
||||
// 비밀글일때 컨텐츠를 보여주지 말자.
|
||||
if($oDocument->isSecret() && !$oDocument->isGranted()){
|
||||
$oDocument->add('content',Context::getLang('thisissecret'));
|
||||
$obj = null;
|
||||
for($i=1;$i<=20;$i++) $obj->{"extra_vars".$i} = '';
|
||||
$oDocument->adds($obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 스킨에서 사용하기 위해 context set
|
||||
Context::set('oDocument', $oDocument);
|
||||
}
|
||||
|
||||
// 공지사항 목록을 구해서 context set (공지사항을 매페이지 제일 상단에 위치하기 위해서)
|
||||
function dispBoardContentCommentList(){
|
||||
$oDocumentModel = &getModel('document');
|
||||
$document_srl = Context::get('document_srl');
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||
$comment_list = $oDocument->getComments();
|
||||
|
||||
// 비밀글일때 컨텐츠를 보여주지 말자.
|
||||
foreach($comment_list as $key => $val){
|
||||
if(!$val->isAccessible()){
|
||||
$val->add('content',Context::getLang('thisissecret'));
|
||||
}
|
||||
}
|
||||
Context::set('comment_list',$comment_list);
|
||||
}
|
||||
|
||||
function dispBoardNoticeList(){
|
||||
$oDocumentModel = &getModel('document');
|
||||
$args->module_srl = $this->module_srl; ///< 현재 모듈의 module_srl
|
||||
|
||||
$notice_output = $oDocumentModel->getNoticeList($args);
|
||||
Context::set('notice_list', $notice_output->data);
|
||||
}
|
||||
|
||||
function dispBoardContentList(){
|
||||
$oDocumentModel = &getModel('document');
|
||||
$args->module_srl = $this->module_srl; ///< 현재 모듈의 module_srl
|
||||
// 목록을 구하기 위한 대상 모듈/ 페이지 수/ 목록 수/ 페이지 목록 수에 대한 옵션 설정
|
||||
$args->page = $page; ///< 페이지
|
||||
$args->page = Context::get('page');; ///< 페이지
|
||||
$args->list_count = $this->list_count; ///< 한페이지에 보여줄 글 수
|
||||
$args->page_count = $this->page_count; ///< 페이지 네비게이션에 나타날 페이지의 수
|
||||
|
||||
|
|
@ -176,6 +220,8 @@
|
|||
if(!in_array($args->sort_index, $this->order_target)) $args->sort_index = $this->module_info->order_target?$this->module_info->order_target:'list_order';
|
||||
if(!in_array($args->order_type, array('asc','desc'))) $args->order_type = $this->module_info->order_type?$this->module_info->order_type:'asc';
|
||||
|
||||
$oDocument = $oDocumentModel->getDocument(Context::get('document_srl'));
|
||||
|
||||
// 특정 문서의 permalink로 직접 접속할 경우 page값을 직접 구함
|
||||
if(count($_GET)==1 && isset($_GET['document_srl']) && $oDocument->isExists() && !$oDocument->isNotice()) {
|
||||
$page = $oDocumentModel->getDocumentPage($oDocument, $args);
|
||||
|
|
@ -199,11 +245,9 @@
|
|||
Context::set('total_page', $output->total_page);
|
||||
Context::set('page', $output->page);
|
||||
Context::set('page_navigation', $output->page_navigation);
|
||||
|
||||
// template_file을 list.html로 지정
|
||||
$this->setTemplateFile('list');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief 태그 목록 모두 보기
|
||||
**/
|
||||
|
|
@ -284,6 +328,25 @@
|
|||
|
||||
// 글을 수정하려고 할 경우 권한이 없는 경우 비밀번호 입력화면으로
|
||||
if($oDocument->isExists()&&!$oDocument->isGranted()) return $this->setTemplateFile('input_password_form');
|
||||
if(!$oDocument->isExists())
|
||||
{
|
||||
$oModuleModel = &getModel('module');
|
||||
$point_config = $oModuleModel->getModulePartConfig('point',$this->module_srl);
|
||||
$logged_info = Context::get('logged_info');
|
||||
$oPointModel = &getModel('point');
|
||||
$pointForInsert = $point_config["insert_document"];
|
||||
if($pointForInsert < 0)
|
||||
{
|
||||
if( !$logged_info )
|
||||
{
|
||||
return $this->dispBoardMessage('msg_not_permitted');
|
||||
}
|
||||
else if (($oPointModel->getPoint($logged_info->member_srl) + $pointForInsert )< 0 )
|
||||
{
|
||||
return $this->dispBoardMessage('msg_not_enough_point');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Context::set('document_srl',$document_srl);
|
||||
Context::set('oDocument', $oDocument);
|
||||
|
|
|
|||
|
|
@ -3,43 +3,43 @@
|
|||
<grants>
|
||||
<grant name="list" default="guest">
|
||||
<title xml:lang="ko">목록</title>
|
||||
<title xml:lang="zh-CN">目录</title>
|
||||
<title xml:lang="zh-CN">目录</title>
|
||||
<title xml:lang="jp">リスト</title>
|
||||
<title xml:lang="en">list</title>
|
||||
<title xml:lang="es">Lista</title>
|
||||
<title xml:lang="zh-TW">列表</title>
|
||||
<title xml:lang="es">Lista</title>
|
||||
<title xml:lang="zh-TW">列表</title>
|
||||
</grant>
|
||||
<grant name="view" default="guest">
|
||||
<title xml:lang="ko">열람</title>
|
||||
<title xml:lang="zh-CN">查看</title>
|
||||
<title xml:lang="zh-CN">查看</title>
|
||||
<title xml:lang="jp">閲覧</title>
|
||||
<title xml:lang="en">view</title>
|
||||
<title xml:lang="es">Opinión</title>
|
||||
<title xml:lang="zh-TW">檢視</title>
|
||||
<title xml:lang="es">Opinión</title>
|
||||
<title xml:lang="zh-TW">檢視</title>
|
||||
</grant>
|
||||
<grant name="write_document" default="guest">
|
||||
<title xml:lang="ko">글 작성</title>
|
||||
<title xml:lang="zh-CN">发表新主题</title>
|
||||
<title xml:lang="zh-CN">发表新主题</title>
|
||||
<title xml:lang="jp">書き込み作成</title>
|
||||
<title xml:lang="en">write document</title>
|
||||
<title xml:lang="es">Escribir el documento</title>
|
||||
<title xml:lang="zh-TW">發表主題</title>
|
||||
<title xml:lang="es">Escribir el documento</title>
|
||||
<title xml:lang="zh-TW">發表主題</title>
|
||||
</grant>
|
||||
<grant name="write_comment" default="guest">
|
||||
<title xml:lang="ko">댓글 작성</title>
|
||||
<title xml:lang="zh-CN">发表评论</title>
|
||||
<title xml:lang="zh-CN">发表评论</title>
|
||||
<title xml:lang="jp">コメント作成</title>
|
||||
<title xml:lang="en">write comment</title>
|
||||
<title xml:lang="es">Escribir comentario</title>
|
||||
<title xml:lang="zh-TW">發表評論</title>
|
||||
<title xml:lang="es">Escribir comentario</title>
|
||||
<title xml:lang="zh-TW">發表評論</title>
|
||||
</grant>
|
||||
<grant name="manager" default="root">
|
||||
<title xml:lang="ko">관리</title>
|
||||
<title xml:lang="zh-CN">管理</title>
|
||||
<title xml:lang="zh-CN">管理</title>
|
||||
<title xml:lang="jp">管理</title>
|
||||
<title xml:lang="en">manager</title>
|
||||
<title xml:lang="es">Administrador</title>
|
||||
<title xml:lang="zh-TW">管理</title>
|
||||
<title xml:lang="es">Administrador</title>
|
||||
<title xml:lang="zh-TW">管理</title>
|
||||
</grant>
|
||||
</grants>
|
||||
<permissions>
|
||||
|
|
@ -81,6 +81,13 @@
|
|||
</permissions>
|
||||
<actions>
|
||||
<action name="dispBoardContent" type="view" index="true" />
|
||||
<action name="dispBoardNoticeList" type="view" />
|
||||
<action name="dispBoardContentList" type="view" />
|
||||
<action name="dispBoardContentView" type="view" />
|
||||
<action name="dispBoardCatogoryList" type="view" />
|
||||
<action name="dispBoardContentCommentList" type="view" />
|
||||
|
||||
|
||||
<action name="dispBoardTagList" type="view" />
|
||||
<action name="dispBoardWrite" type="view" />
|
||||
<action name="dispBoardDelete" type="view" />
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
$lang->search_result = 'Search Result';
|
||||
$lang->consultation = 'Consultation';
|
||||
$lang->secret = 'Secret';
|
||||
$lang->thisissecret = '비밀글입니다.';
|
||||
$lang->admin_mail = "Administrator's Mail";
|
||||
|
||||
// words used in button
|
||||
|
|
@ -42,4 +43,6 @@
|
|||
$lang->about_admin_mail = 'A mail will be sent when an article or comment is submitted.<br />Multiple mails can be sent with commas(,).';
|
||||
|
||||
$lang->about_category_color = 'You can set font color of category.';
|
||||
?>
|
||||
|
||||
$lang->msg_not_enough_point = 'Your point is not enough to write an article in this board.';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
$lang->search_result = 'Resultado de la búsqueda';
|
||||
$lang->consultation = '상담 기능';
|
||||
$lang->secret = '비밀글 기능';
|
||||
$lang->thisissecret = '비밀글입니다.';
|
||||
$lang->admin_mail = '관리자 메일';
|
||||
|
||||
// Palabras utilizadas en los botones
|
||||
|
|
@ -44,5 +45,5 @@
|
|||
$lang->about_admin_mail = '글이나 댓글이 등록될때 등록된 메일주소로 메일이 발송됩니다<br /> ,(콤마)로 연결시 다수의 메일주소로 발송할 수 있습니다.';
|
||||
|
||||
$lang->about_category_color = '분류 폰트색깔을 지정합니다.';
|
||||
|
||||
?>
|
||||
$lang->msg_not_enough_point = 'Your point is not enough to write an article in this board.';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
$lang->search_result = 'Résultat de la Recherche';
|
||||
$lang->consultation = 'Consultation';
|
||||
$lang->secret = '비밀글 기능';
|
||||
$lang->thisissecret = '비밀글입니다.';
|
||||
$lang->admin_mail = 'Mél de l\'administrateur';
|
||||
|
||||
// Mots utilisés en bouton
|
||||
|
|
@ -39,4 +40,7 @@
|
|||
$lang->about_consultation = "Les membres non-administratifs verront seulement les ariticles d\'eux-même.\nNon-membres ne pourraient pas écrire des articles quand la Consultation est appliqué.";
|
||||
$lang->about_secret = '게시판 및 댓글의 비밀글 사용할 수 있도록 합니다.';
|
||||
$lang->about_admin_mail = 'Un message éléctronique sera envoyé à l\'adresse inscrite quand un article ou commentaire se soumet. <br />On peut inscrire multiple adresses délimité par les virgules.';
|
||||
?>
|
||||
|
||||
$lang->about_category_color = 'You can set font color of category.';
|
||||
$lang->msg_not_enough_point = 'Your point is not enough to write an article in this board.';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
$lang->search_result = '検索結果';
|
||||
$lang->consultation = '相談機能';
|
||||
$lang->secret = '秘密文機能';
|
||||
$lang->thisissecret = '秘密文です。';
|
||||
$lang->admin_mail = '管理者メールアドレス';
|
||||
|
||||
|
||||
|
|
@ -45,4 +46,6 @@
|
|||
$lang->about_admin_mail = '書き込みやコメントが掲載される時、登録メールアドレス宛にメールが送信されます。<br /> 複数のメールアドレスへ送信する場合は「,」(半額コンマ)区切りで登録して下さい。';
|
||||
|
||||
$lang->about_category_color = 'カテゴリのフォント色を設定します。';
|
||||
?>
|
||||
|
||||
$lang->msg_not_enough_point = '書き込みするためのポイントが足りません。';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
$lang->search_result = '검색결과';
|
||||
$lang->consultation = '상담 기능';
|
||||
$lang->secret = '비밀글 기능';
|
||||
$lang->thisissecret = '비밀글입니다.';
|
||||
$lang->admin_mail = '관리자 메일';
|
||||
|
||||
|
||||
|
|
@ -45,4 +46,6 @@
|
|||
$lang->about_admin_mail = '글이나 댓글이 등록될때 등록된 메일주소로 메일이 발송됩니다<br /> ,(콤마)로 연결시 다수의 메일주소로 발송할 수 있습니다.';
|
||||
|
||||
$lang->about_category_color = '분류 폰트색깔을 지정합니다.';
|
||||
?>
|
||||
|
||||
$lang->msg_not_enough_point = '포인트가 부족합니다';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
$lang->search_result = 'Результат поиска';
|
||||
$lang->consultation = '상담 기능';
|
||||
$lang->secret = '비밀글 기능';
|
||||
$lang->thisissecret = '비밀글입니다.';
|
||||
$lang->admin_mail = '관리자 메일';
|
||||
|
||||
// слова, использованные в кнопке
|
||||
|
|
@ -46,5 +47,5 @@
|
|||
$lang->about_admin_mail = '글이나 댓글이 등록될때 등록된 메일주소로 메일이 발송됩니다<br /> ,(콤마)로 연결시 다수의 메일주소로 발송할 수 있습니다.';
|
||||
|
||||
$lang->about_category_color = '분류 폰트색깔을 지정합니다.';
|
||||
|
||||
?>
|
||||
$lang->msg_not_enough_point = 'Your point is not enough to write an article in this board.';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
$lang->search_result = '搜索结果';
|
||||
$lang->consultation = '咨询功能';
|
||||
$lang->secret = '密帖';
|
||||
$lang->thisissecret = '비밀글입니다.';
|
||||
$lang->admin_mail = '管理员电子邮件';
|
||||
|
||||
// 按钮语言
|
||||
|
|
@ -45,4 +46,5 @@
|
|||
$lang->about_secret = '设置主题及评论当中使用密帖与否。';
|
||||
$lang->about_admin_mail = '有新的主题或评论时,将自动发电子邮件来通知管理员。<br />多数电子邮件由逗号(,)来分隔。';
|
||||
$lang->about_category_color = '请指定分类颜色(必须带#符号)。ex)#ff0000';
|
||||
?>
|
||||
$lang->msg_not_enough_point = 'Your point is not enough to write an article in this board.';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
$lang->search_result = '搜尋結果';
|
||||
$lang->consultation = '咨詢功能';
|
||||
$lang->secret = '秘密';
|
||||
$lang->thisissecret = '비밀글입니다.';
|
||||
$lang->admin_mail = '管理員電子郵件';
|
||||
|
||||
// 按鈕語言
|
||||
|
|
@ -41,4 +42,5 @@
|
|||
$lang->about_secret = '可用於討論板或回覆時選擇是否使用。';
|
||||
$lang->about_admin_mail = '有新的主題或評論時,將自動發電子郵件來通知管理員。<br />多數電子郵件由逗號(,)區隔。';
|
||||
$lang->about_category_color = '設定分類顏色。';
|
||||
?>
|
||||
$lang->msg_not_enough_point = '你的點數不夠在此討論板發表主題。';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -104,9 +104,7 @@ function completeDeleteTrackback(ret_obj) {
|
|||
|
||||
/* 카테고리 이동 */
|
||||
function doChangeCategory() {
|
||||
var sel_obj = xGetElementById("board_category");
|
||||
var sel_idx = sel_obj.selectedIndex;
|
||||
var category_srl = sel_obj.options[sel_idx].value;
|
||||
var category_srl = jQuery('#board_category option:selected').val();
|
||||
location.href = decodeURI(current_url).setQuery('category',category_srl);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -104,9 +104,7 @@ function completeDeleteTrackback(ret_obj) {
|
|||
|
||||
/* 카테고리 이동 */
|
||||
function doChangeCategory() {
|
||||
var sel_obj = xGetElementById("board_category");
|
||||
var sel_idx = sel_obj.selectedIndex;
|
||||
var category_srl = sel_obj.options[sel_idx].value;
|
||||
var category_srl = jQuery('#board_category option:selected').val();
|
||||
location.href = decodeURI(current_url).setQuery('category',category_srl);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -104,9 +104,7 @@ function completeDeleteTrackback(ret_obj) {
|
|||
|
||||
/* 카테고리 이동 */
|
||||
function doChangeCategory() {
|
||||
var sel_obj = xGetElementById("board_category");
|
||||
var sel_idx = sel_obj.selectedIndex;
|
||||
var category_srl = sel_obj.options[sel_idx].value;
|
||||
var category_srl = jQuery('#board_category option:selected').val();
|
||||
location.href = decodeURI(current_url).setQuery('category',category_srl);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -245,4 +245,4 @@
|
|||
<!--@end-->
|
||||
|
||||
|
||||
</form>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
<table cellspacing="0" class="adminTable">
|
||||
<!--@if($category_info->parent_category_title)-->
|
||||
<tr class="row2">
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->parent_category_title}</div></th>
|
||||
<td class="wide">{$category_info->parent_category_title}</td>
|
||||
</tr>
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
<p>{$lang->about_category_group_srls}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row2">
|
||||
<tr>
|
||||
<td scope="row" colspan="2" class="right">
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
<!--%load_js_plugin("ui.tree")-->
|
||||
|
||||
<!--%import("js/board_admin.js")-->
|
||||
<!--%import("js/board_category.js")-->
|
||||
<script type="text/javascript">
|
||||
var category_title = "{$lang->category}";
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<!--@foreach($board_list as $no => $val)-->
|
||||
<tr class="row{$cycle_idx}">
|
||||
<tr>
|
||||
<td class="center number">{$no}</td>
|
||||
<td class="center"><input type="checkbox" name="cart" value="{$val->module_srl}" /></td>
|
||||
<td>
|
||||
|
|
|
|||
|
|
@ -5,191 +5,6 @@
|
|||
**/
|
||||
|
||||
|
||||
function Tree(url){
|
||||
// clear tree;
|
||||
jQuery('#menu > ul > li > ul').remove();
|
||||
if(jQuery("ul.simpleTree > li > a").size() ==0)jQuery('<a href="#" class="add"><img src="./common/js/plugins/ui.tree/images/iconAdd.gif" /></a>').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('<li id="tree_'+node_srl+'"><span style="color:'+color+';">'+text+'</span></li>');
|
||||
}else{
|
||||
node = jQuery('<li id="tree_'+node_srl+'"><span>'+text+'</span></li>');
|
||||
}
|
||||
|
||||
|
||||
|
||||
// button
|
||||
jQuery('<a href="#" class="add"><img src="./common/js/plugins/ui.tree/images/iconAdd.gif" /></a>').bind("click",function(e){
|
||||
jQuery("#tree_"+node_srl+" > span").click();
|
||||
addNode(node_srl,e);
|
||||
return false;
|
||||
}).appendTo(node);
|
||||
|
||||
jQuery('<a href="#" class="modify"><img src="./common/js/plugins/ui.tree/images/iconModify.gif" /></a>').bind("click",function(e){
|
||||
jQuery("#tree_"+node_srl+" > span").click();
|
||||
modifyNode(node_srl,e);
|
||||
return false;
|
||||
}).appendTo(node);
|
||||
|
||||
jQuery('<a href="#" class="delete"><img src="./common/js/plugins/ui.tree/images/iconDel.gif" /></a>').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('<ul>'));
|
||||
jQuery('#tree_'+parent_srl+'> ul').append(node);
|
||||
}else{
|
||||
if(jQuery('#menu ul.simpleTree > li > ul').length==0) jQuery("<ul>").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;i<fo_obj.cart.length;i++) {
|
||||
if(fo_obj.cart[i].checked) module_srl[module_srl.length] = fo_obj.cart[i].value;
|
||||
}
|
||||
}
|
||||
jQuery('#fo_list input[name=cart]:checked').each(function() {
|
||||
module_srl[module_srl.length] = jQuery(this).val();
|
||||
});
|
||||
|
||||
if(module_srl.length<1) return;
|
||||
|
||||
var url = current_url.setQuery('act',act_type).setQuery('module_srl','').setQuery('module_srls',module_srl.join(','));
|
||||
location.href = url;
|
||||
}
|
||||
|
||||
/**
|
||||
* 카테고리 관리
|
||||
**/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* 서버로부터 받아온 카테고리 정보를 출력 */
|
||||
xAddEventListener(document,'mousedown',checkMousePosition);
|
||||
var _xPos = 0;
|
||||
var _yPos = 0;
|
||||
function checkMousePosition(e) {
|
||||
var evt = new xEvent(e);
|
||||
_xPos = evt.pageX;
|
||||
_yPos = evt.pageY;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function completeGetCategoryTplInfo(ret_obj, response_tags) {
|
||||
var obj = xGetElementById('category_info');
|
||||
if(xScrollTop()>200) {
|
||||
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';
|
||||
}
|
||||
|
||||
}
|
||||
186
modules/board/tpl/js/board_category.js
Normal file
|
|
@ -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('<a href="#" class="add"><img src="./common/js/plugins/ui.tree/images/iconAdd.gif" /></a>').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('<li id="tree_'+node_srl+'"><span style="color:'+color+';">'+text+'</span></li>');
|
||||
}else{
|
||||
node = jQuery('<li id="tree_'+node_srl+'"><span>'+text+'</span></li>');
|
||||
}
|
||||
|
||||
// button
|
||||
jQuery('<a href="#" class="add"><img src="./common/js/plugins/ui.tree/images/iconAdd.gif" /></a>').bind("click",function(e){
|
||||
jQuery("#tree_"+node_srl+" > span").click();
|
||||
addNode(node_srl,e);
|
||||
return false;
|
||||
}).appendTo(node);
|
||||
|
||||
jQuery('<a href="#" class="modify"><img src="./common/js/plugins/ui.tree/images/iconModify.gif" /></a>').bind("click",function(e){
|
||||
jQuery("#tree_"+node_srl+" > span").click();
|
||||
modifyNode(node_srl,e);
|
||||
return false;
|
||||
}).appendTo(node);
|
||||
|
||||
jQuery('<a href="#" class="delete"><img src="./common/js/plugins/ui.tree/images/iconDel.gif" /></a>').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('<ul>'));
|
||||
jQuery('#tree_'+parent_srl+'> ul').append(node);
|
||||
}else{
|
||||
if(jQuery('#menu ul.simpleTree > li > ul').length==0) jQuery("<ul>").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);
|
||||
}
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
<th scope="row"><div>{$lang->skin}</div></th>
|
||||
<td class="wide" >{$skin_info->title}</td>
|
||||
</tr>
|
||||
<tr class="row2">
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->skin_author}</div></th>
|
||||
<td>
|
||||
<!--@foreach($skin_info->author as $author)-->
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
<th scope="row"><div>{$lang->homepage}</div></th>
|
||||
<td><a href="{$skin_info->homepage}" onclick="window.open(this.href);return false;">{$skin_info->homepage}</a></td>
|
||||
</tr>
|
||||
<tr class="row2">
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->date}</div></th>
|
||||
<td>{zdate($skin_info->date, 'Y-m-d')} </td>
|
||||
</tr>
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row2">
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->description}</div></th>
|
||||
<td>{nl2br(trim($skin_info->description))}</td>
|
||||
</tr>
|
||||
|
|
@ -79,7 +79,7 @@
|
|||
<caption>{$group}</caption>
|
||||
<!--@end-->
|
||||
|
||||
<tr class="row{$cycle_idx}">
|
||||
<tr>
|
||||
<th scope="row"><div>{$val->title}</div></th>
|
||||
<td class="wide">
|
||||
<!--@if($val->type=="text")-->
|
||||
|
|
@ -135,7 +135,7 @@
|
|||
<table cellspacing="0" class="adminTable">
|
||||
<!--@end-->
|
||||
|
||||
<tr class="row2">
|
||||
<tr>
|
||||
<td colspan="2" class="right">
|
||||
<span class="button"><input type="submit" value="{$lang->cmd_registration}" accesskey="s" /></span>
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<!--@foreach($comment_list as $no => $val)-->
|
||||
<tr class="row{$cycle_idx}">
|
||||
<tr>
|
||||
<td rowspan="2" class="number center">{$no}</td>
|
||||
<td colspan="2"><a href="./?mid={$module_list[$val->module_srl]->mid}" onclick="window.open(this.href);return false">{htmlspecialchars($module_list[$val->module_srl]->browser_title)}</a> </td>
|
||||
<td class="nowrap"><span class="member_{$val->member_srl}">{htmlspecialchars($val->nick_name)}</span></td>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<p>{$lang->about_comment_count}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row2">
|
||||
<tr>
|
||||
<td class="right" colspan="2">
|
||||
<span class="button"><input type="submit" value="{$lang->cmd_save}"/></span>
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<!--@foreach($comment_list as $no => $oComment)-->
|
||||
<tr class="row{$cycle_idx}">
|
||||
<tr>
|
||||
<td class="number center">{$no}</td>
|
||||
<td><input type="checkbox" name="cart" value="{$oComment->get('comment_srl')}" /> {$oComment->getSummary(100)}</td>
|
||||
<td><span class="member_{$oComment->getMemberSrl()}">{$oComment->getNickName()}</span></td>
|
||||
|
|
|
|||
|
|
@ -1,31 +1,14 @@
|
|||
function doCheckAll(bToggle) {
|
||||
var fo_obj = xGetElementById('fo_list');
|
||||
if(typeof(bToggle) == "undefined") bToggle = false;
|
||||
for(var i=0;i<fo_obj.length;i++) {
|
||||
if(fo_obj[i].name == 'cart'){
|
||||
if( !fo_obj[i].checked || !bToggle) fo_obj[i].checked = true; else fo_obj[i].checked = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function doCancelDeclare() {
|
||||
var fo_obj = xGetElementById('fo_list');
|
||||
var comment_srl = new Array();
|
||||
if(fo_obj.cart.length) {
|
||||
for(var i=0;i<fo_obj.cart.length;i++) {
|
||||
if(fo_obj.cart[i].checked) comment_srl[comment_srl.length] = fo_obj.cart[i].value;
|
||||
}
|
||||
} else {
|
||||
if(fo_obj.cart.checked) comment_srl[comment_srl.length] = fo_obj.cart.value;
|
||||
}
|
||||
jQuery('#fo_list input[name=cart]:checked').each(function() {
|
||||
comment_srl[comment_srl.length] = jQuery(this).val();
|
||||
});
|
||||
|
||||
if(comment_srl.length<1) return;
|
||||
|
||||
var params = new Array();
|
||||
params['comment_srl'] = comment_srl.join(',');
|
||||
|
||||
exec_xml('comment','procCommentAdminCancelDeclare', params, completeCancelDeclare);
|
||||
}
|
||||
|
||||
function completeCancelDeclare(ret_obj) {
|
||||
location.reload();
|
||||
exec_xml('comment','procCommentAdminCancelDeclare', params, function() { location.reload(); });
|
||||
}
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 46 B |
|
After Width: | Height: | Size: 51 B |
|
After Width: | Height: | Size: 152 B |
|
After Width: | Height: | Size: 52 B |
|
After Width: | Height: | Size: 47 B |
|
After Width: | Height: | Size: 51 B |
|
After Width: | Height: | Size: 151 B |
|
After Width: | Height: | Size: 51 B |
|
|
@ -10,14 +10,6 @@ function doSendMessage(member_srl, message_srl) {
|
|||
popopen(url, 'sendMessage');
|
||||
}
|
||||
|
||||
/* 쪽지 모두 선택 */
|
||||
function doCheckAll(obj, fo_id) {
|
||||
var fo_obj = xGetElementById(fo_id);
|
||||
for(var i=0; i<fo_obj.length; i++) {
|
||||
if(fo_obj[i].type == "checkbox" && fo_obj[i] != obj) fo_obj[i].checked = obj.checked;
|
||||
}
|
||||
}
|
||||
|
||||
/* 개별 쪽지 삭제 */
|
||||
function doDeleteMessage(message_srl) {
|
||||
if(!message_srl) return;
|
||||
|
|
@ -65,11 +57,12 @@ function completeAddFriendGroup(ret_obj) {
|
|||
|
||||
/* 친구 그룹 삭제 */
|
||||
function doDeleteFriendGroup() {
|
||||
var obj = xGetElementById('friend_group_list');
|
||||
if(obj.options.length<1) return;
|
||||
var friend_group_srl = obj.options[obj.selectedIndex].value;
|
||||
var fo_obj = xGetElementById('for_delete_group');
|
||||
var friend_group_srl = jQuery('#friend_group_list option:selected').val();
|
||||
if(!friend_group_srl) return;
|
||||
|
||||
var fo_obj = jQuery('#for_delete_group').get(0);
|
||||
fo_obj.friend_group_srl.value = friend_group_srl;
|
||||
|
||||
procFilter(fo_obj, delete_friend_group);
|
||||
}
|
||||
|
||||
|
|
@ -80,22 +73,20 @@ function completeDeleteFriendGroup(ret_obj) {
|
|||
|
||||
/* 친구 그룹의 이름 변경 */
|
||||
function doRenameFriendGroup() {
|
||||
var obj = xGetElementById('friend_group_list');
|
||||
if(obj.options.length<1) return;
|
||||
var friend_group_srl = obj.options[obj.selectedIndex].value;
|
||||
var friend_group_srl = jQuery('#friend_group_list option:selected').val();
|
||||
if(!friend_group_srl) return;
|
||||
|
||||
popopen("./?module=communication&act=dispCommunicationAddFriendGroup&friend_group_srl="+friend_group_srl);
|
||||
}
|
||||
|
||||
/* 친구 그룹 이동 */
|
||||
function doMoveFriend() {
|
||||
var fo_obj = xGetElementById('fo_friend_list');
|
||||
var fo_obj = jQuery('#fo_friend_list').get(0);
|
||||
procFilter(fo_obj, move_friend);
|
||||
}
|
||||
|
||||
/* 친구 그룹 선택 */
|
||||
function doJumpFriendGroup() {
|
||||
var sel_obj = xGetElementById('jumpMenu');
|
||||
var sel_idx = sel_obj.selectedIndex;
|
||||
var sel_val = sel_obj.options[sel_idx].value;
|
||||
var sel_val = jQuery('#jumpMenu option:selected').val();
|
||||
location.href = current_url.setQuery('friend_group_srl', sel_val);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<form action="./" method="get" onsubmit="return procFilter(this, insert_config)">
|
||||
|
||||
<table cellspacing="0" class="adminTable">
|
||||
<tr class="row2">
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->editor_skin}</div></th>
|
||||
<td>
|
||||
<select name="editor_skin" onchange="getEditorSkinColorList(this.value)">
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row2">
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->colorset}</div></th>
|
||||
<td><div id="communication_colorset"></div></td>
|
||||
</tr>
|
||||
|
|
@ -50,5 +50,5 @@
|
|||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
xAddEventListener(window,'load', function() { doGetSkinColorset("{$communication_config->skin}"); });
|
||||
jQuery(function() { doGetSkinColorset("{$communication_config->skin}"); });
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,4 +9,5 @@
|
|||
<column name="last_update" type="date" />
|
||||
<column name="list_order" type="number" size="11" notnull="notnull" />
|
||||
<column name="group_srls" type="text" />
|
||||
<column name="color" type="char" size="7" />
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@
|
|||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
xAddEventListener(window,'load',function() { doGetCategoryFromModule(xGetElementById('target_module')); } );
|
||||
jQuery(function() { doGetCategoryFromModule(jQuery('#target_module').get(0)); } );
|
||||
</script>
|
||||
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<!--@foreach($document_list as $no => $oDocument)-->
|
||||
<tr class="row{$cycle_idx}">
|
||||
<tr>
|
||||
<td class="number center">{$no}</td>
|
||||
<td class="center"><input type="checkbox" name="cart" value="{$oDocument->document_srl}" onclick="doAddDocumentCart(this)" <!--@if($oDocument->isCarted())-->checked="checked"<!--@end-->/></td>
|
||||
<td>
|
||||
|
|
@ -48,7 +48,7 @@
|
|||
<td class="date center nowrap">{$oDocument->getRegdate("Y-m-d")}</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
<tr class="row2">
|
||||
<tr>
|
||||
<td colspan="8" class="right">
|
||||
<a href="#" onclick="doCancelDeclare();return false;" class="button"><span>{$lang->cmd_cancel_declare}</span></a>
|
||||
<a href="{getUrl('','module','document','act','dispDocumentAdminManageDocument')}" onclick="popopen(this.href,'manageDocument'); return false;" class="button"><span>{$lang->cmd_manage_document}</span></a>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
<form action="./" method="get" onsubmit="return procFilter(this, insert_config)">
|
||||
<table cellspacing="0" class="adminTable">
|
||||
<tr class="row2">
|
||||
<tr>
|
||||
<th scope="col"><div>{$lang->thumbnail_type}</div></th>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
@ -12,13 +12,13 @@
|
|||
<input type="radio" name="thumbnail_type" value="ratio" <!--@if($config->thumbnail_type == 'ratio')-->checked="checked"<!--@end-->/> {$lang->thumbnail_ratio}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row2">
|
||||
<tr>
|
||||
<td class="right"><span class="button"><input type="submit" value="{$lang->cmd_registration}" accesskey="s" /></span></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table cellspacing="0" class="adminTable">
|
||||
<tr class="row2">
|
||||
<tr>
|
||||
<td class="right"><span class="button"><input type="button" value="{$lang->cmd_delete_all_thumbnail}" onclick="doDeleteAllThumbnail(); return false;"/></span></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<!--@foreach($document_list as $no => $oDocument)-->
|
||||
<tr class="row{$cycle_idx}">
|
||||
<tr>
|
||||
<td class="number center" rowspan="2">{$no}</td>
|
||||
<td colspan="2"><!--@if($oDocument->get('module_srl')!=$oDocument->get('member_srl'))--><a href="{getUrl('','mid',$module_list[$oDocument->get('module_srl')]->mid)}" onclick="window.open(this.href);return false">{htmlspecialchars($module_list[$oDocument->get('module_srl')]->browser_title)}</a><!--@else-->-<!--@end--></td>
|
||||
<td class="nowrap"><span class="member_{$oDocument->get('member_srl')}">{$oDocument->getNickName()}</span></td>
|
||||
|
|
|
|||
|
|
@ -1,12 +1,3 @@
|
|||
function doCheckAll(bToggle) {
|
||||
var fo_obj = xGetElementById('fo_list');
|
||||
if(typeof(bToggle) == "undefined") bToggle = false;
|
||||
for(var i=0;i<fo_obj.length;i++) {
|
||||
if(fo_obj[i].name == 'cart'){
|
||||
if( !fo_obj[i].checked || !bToggle) fo_obj[i].checked = true; else fo_obj[i].checked = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 모든 생성된 썸네일 삭제하는 액션 호출
|
||||
|
|
@ -22,7 +13,7 @@ function completeDeleteAllThumbnail(ret_obj) {
|
|||
|
||||
/* 선택된 글의 삭제 또는 이동 */
|
||||
function doManageDocument(type) {
|
||||
var fo_obj = xGetElementById("fo_management");
|
||||
var fo_obj = jQuery("#fo_management").get(0);
|
||||
fo_obj.type.value = type;
|
||||
|
||||
procFilter(fo_obj, manage_checked_document);
|
||||
|
|
@ -50,7 +41,7 @@ function doGetCategoryFromModule(obj) {
|
|||
}
|
||||
|
||||
function completeGetCategoryFromModules(ret_obj, response_tags) {
|
||||
var obj = xGetElementById('target_category');
|
||||
var obj = jQuery('#target_category').get(0);
|
||||
var length = obj.options.length;
|
||||
for(var i=0;i<length;i++) obj.remove(0);
|
||||
|
||||
|
|
@ -78,15 +69,11 @@ function completeGetCategoryFromModules(ret_obj, response_tags) {
|
|||
}
|
||||
|
||||
function doCancelDeclare() {
|
||||
var fo_obj = xGetElementById('fo_list');
|
||||
var document_srl = new Array();
|
||||
if(fo_obj.cart.length) {
|
||||
for(var i=0;i<fo_obj.cart.length;i++) {
|
||||
if(fo_obj.cart[i].checked) document_srl[document_srl.length] = fo_obj.cart[i].value;
|
||||
}
|
||||
} else {
|
||||
if(fo_obj.cart.checked) document_srl[document_srl.length] = fo_obj.cart.value;
|
||||
}
|
||||
jQuery('#fo_list input[name=cart]:checked').each(function() {
|
||||
document_srl[document_srl.length] = jQuery(this).val();
|
||||
});
|
||||
|
||||
if(document_srl.length<1) return;
|
||||
|
||||
var params = new Array();
|
||||
|
|
|
|||
|
|
@ -19,5 +19,5 @@
|
|||
</div>
|
||||
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
xAddEventListener(window,'load',function() { window.print(); } );
|
||||
jQuery(window).load(function() { window.print(); } );
|
||||
//]]></script>
|
||||
|
|
@ -56,6 +56,7 @@
|
|||
$caption = $xml_obj->body;
|
||||
|
||||
$src = str_replace(array('&','"'), array('&','&qout;'), $src);
|
||||
$src = str_replace('&amp;', '&', $src);
|
||||
|
||||
return sprintf("<div><script type=\"text/javascript\">displayMultimedia(\"%s\", \"%s\",\"%s\", { autostart : %s });</script></div>", $src, $width, $height, $auto_start);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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('<div style="width:%dpx;height:%dpx;margin-bottom:5px;"><iframe src="%s?module=editor&act=procEditorCall&method=displayMap&component=naver_map&width=%s&height=%s&x=%s&y=%s&marker=%s" frameBorder="0" style="padding:1px; border:1px solid #AAAAAA;width:%dpx;height:%dpx;margin:0px;"></iframe></div>', $width, $height, Context::getRequestUri(), $width, $height, $x, $y, $marker, $width, $height);
|
||||
$body_code = sprintf('<div style="width:%dpx;height:%dpx;margin-bottom:5px;"><iframe src="%s?module=editor&act=procEditorCall&method=displayMap&component=naver_map&width=%d&height=%d&x=%f&y=%f&marker=%s" frameBorder="0" style="padding:1px; border:1px solid #AAAAAA;width:%dpx;height:%dpx;margin:0px;"></iframe></div>', $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;$i<count($marker_list);$i++) {
|
||||
$marker_list[$i] = explode(',', $marker_list[$i]);
|
||||
settype($marker_list[$i][0],"int");
|
||||
settype($marker_list[$i][1],"int");
|
||||
$marker_list[$i] = $marker_list[$i][0].','.$marker_list[$i][1];
|
||||
$pos = trim($marker_list[$i]);
|
||||
if(!$pos) continue;
|
||||
$icon_url = 'http://static.naver.com/local/map_img/set/icos_free_'.chr(ord('a')+$icon_no).'.gif';
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
$lang->msg_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';
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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 = 'テキストを左揃えで表示します。';
|
||||
|
|
|
|||
|
|
@ -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 = '왼쪽 정렬을 합니다';
|
||||
|
|
|
|||
|
|
@ -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 = 'Выровнять по левому краю';
|
||||
|
|
|
|||
|
|
@ -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 = '左对齐';
|
||||
|
|
|
|||
|
|
@ -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 = '靠左對齊';
|
||||
|
|
|
|||
|
|
@ -102,8 +102,8 @@
|
|||
<li class="underline"><button type="button" title="Ctrl+U:{$lang->edit->help_underline}" id="component_{$editor_sequence}_Underline"><span>Underline</span></button></li>
|
||||
<li class="italic"><button type="button" title="Ctrl+I:{$lang->edit->help_italic}" id="component_{$editor_sequence}_Italic"><span>Italic</span></button></li>
|
||||
<li class="strike"><button type="button" title="{$lang->edit->help_strike_through}" id="component_{$editor_sequence}_StrikeThrough"><span>Strike</span></button></li>
|
||||
<li class="sup"><button type="button" title="Sup" id="component_{$editor_sequence}_Superscript"><span>Sup</span></button></li>
|
||||
<li class="sub"><button type="button" title="Sub" id="component_{$editor_sequence}_Subscript"><span>Sub</span></button></li>
|
||||
<li class="sup"><button type="button" title="{$lang->edit->help_sup}" id="component_{$editor_sequence}_Superscript"><span>Sup</span></button></li>
|
||||
<li class="sub"><button type="button" title="{$lang->edit->help_sub}" id="component_{$editor_sequence}_Subscript"><span>Sub</span></button></li>
|
||||
<li class="txColor"><button type="button" title="{$lang->edit->help_fontcolor}" id="component_{$editor_sequence}_colorpicker_text"><span>Text Color</span></button></li>
|
||||
<li class="bgColor"><button type="button" title="{$lang->edit->help_fontbgcolor}" id="component_{$editor_sequence}_colorpicker_bg"><span>Background Color</span></button></li>
|
||||
<li class="styleRemover"><button type="button" title="Ctrl+D:{$lang->edit->help_remove_format}" id="component_{$editor_sequence}_RemoveFormat"><span>Style Remover</span></button></li>
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
* @brief 첨부파일 다운로드
|
||||
* 직접 요청을 받음
|
||||
* file_srl : 파일의 sequence
|
||||
* sid : db에 저장된 비교 값, 틀리면 다운로드 하지 낳음
|
||||
* sid : db에 저장된 비교 값, 틀리면 다운로드 하지 않음
|
||||
**/
|
||||
function procFileDownload() {
|
||||
$file_srl = Context::get('file_srl');
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
'community' => 'Community',
|
||||
'freeboard' => 'Off-topics',
|
||||
'humor' => 'Humor',
|
||||
'qa' => 'Question&Answer',
|
||||
'qa' => 'Q and A',
|
||||
),
|
||||
'second' => array(
|
||||
'profile' => 'Introduction',
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
'community' => '커뮤니티',
|
||||
'freeboard' => '자유게시판',
|
||||
'humor' => '재밌는 이야기',
|
||||
'qa' => '질문&답변',
|
||||
'qa' => '질문/답변',
|
||||
),
|
||||
'second' => array(
|
||||
'profile' => '홈페이지 소개',
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
'community' => '社区',
|
||||
'freeboard' => '自由交流区',
|
||||
'humor' => '幽默/休闲',
|
||||
'qa' => 'Q&A',
|
||||
'qa' => 'Q and A',
|
||||
),
|
||||
'second' => array(
|
||||
'profile' => '关于我们',
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
'community' => '討論',
|
||||
'freeboard' => '自由討論',
|
||||
'humor' => '新鮮趣事',
|
||||
'qa' => 'Q & A',
|
||||
'qa' => 'Q and A',
|
||||
),
|
||||
'second' => array(
|
||||
'profile' => '網站介紹',
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -56,7 +56,7 @@
|
|||
<!--@if($page == $page_no)-->
|
||||
<strong>{$page_no}</strong>
|
||||
<!--@else-->
|
||||
<a href="{getUrl('page',$page_no,'module_srl','')}">{$page_no}</a>
|
||||
<a href="{getUrl('page',$page,'module_srl','')}">{$page}</a>
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
<a href="{getUrl('page',$page_navigation->last_page,'module_srl','')}" class="nextEnd">{$lang->last_page}</a>
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -190,6 +190,10 @@
|
|||
for($k=0;$k<count($mat[1]);$k++) {
|
||||
$histories[$i]->content = str_replace('r'.$mat[1][$k], sprintf('<a href="%s" onclick="window.open(this.href); return false;">%s</a>',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;$k<count($mat[1]);$k++) {
|
||||
$histories[$i]->content = str_replace('['.$mat[1][$k].']', sprintf('<a href="%s" onclick="window.open(this.href); return false;">%s</a>',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('<a href="%s" onclick="window.open(this.href); return false;">#%d</a>', 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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
);
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -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' => '作成'
|
||||
);
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -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' => '생성'
|
||||
);
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -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 = '全部问题';
|
||||
|
|
|
|||