mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1106 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
4f1d02cda0
commit
ea50fbbaa6
43 changed files with 235 additions and 101 deletions
|
|
@ -235,6 +235,25 @@
|
|||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 이름, 값, operation, type으로 값을 변경
|
||||
**/
|
||||
function getConditionValue($name, $value, $operation, $type) {
|
||||
if($type == 'number') return (int)$value;
|
||||
|
||||
switch($operation) {
|
||||
case 'like_prefix' :
|
||||
$value = '%'.$value;
|
||||
break;
|
||||
case 'like' :
|
||||
$value = '%'.$value.'%';
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
return "'".$this->addQuotes($value)."'";
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 이름, 값, operation으로 조건절 작성
|
||||
**/
|
||||
|
|
@ -260,6 +279,15 @@
|
|||
if(!$value) return;
|
||||
return $name.' < '.$value;
|
||||
break;
|
||||
case 'like_prefix' :
|
||||
case 'like' :
|
||||
if(!$value) return;
|
||||
return $name.' like '.$value;
|
||||
break;
|
||||
case 'in' :
|
||||
if(!$value) return;
|
||||
return $name.' in ('.$value.')';
|
||||
break;
|
||||
case 'notequal' :
|
||||
if(!$value) return;
|
||||
return $name.' != '.$value;
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@
|
|||
$this->is_connected = true;
|
||||
|
||||
// mysql의 경우 utf8임을 지정
|
||||
$this->_query("SET NAMES 'utf8'");
|
||||
$this->_query("set names 'utf8'");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -291,15 +291,18 @@
|
|||
|
||||
foreach($output->conditions as $key => $val) {
|
||||
$sub_condition = '';
|
||||
foreach($val as $k =>$v) {
|
||||
if(!$v->value) continue;
|
||||
$name = $v->column;
|
||||
if($output->column_type[$name]!='number') $value = "'".$this->addQuotes($v->value)."'";
|
||||
else $value = $v->value;
|
||||
$operation = $v->operation;
|
||||
foreach($val['condition'] as $k =>$v) {
|
||||
if(!$v['value']) continue;
|
||||
|
||||
$name = $v['column'];
|
||||
$operation = $v['operation'];
|
||||
$value = $v['value'];
|
||||
$type = $output->column_type[$name];
|
||||
$pipe = $v['pipe'];
|
||||
|
||||
$value = $this->getConditionValue($name, $value, $operation, $type);
|
||||
$str = $this->getConditionPart($name, $value, $operation);
|
||||
if($sub_condition) $sub_condition .= ' '.$v->pipe.' ';
|
||||
if($sub_condition) $sub_condition .= ' '.$pipe.' ';
|
||||
$sub_condition .= $str;
|
||||
}
|
||||
if($sub_condition) {
|
||||
|
|
@ -309,8 +312,7 @@
|
|||
}
|
||||
|
||||
if($condition) $condition = ' where '.$condition;
|
||||
|
||||
return "";
|
||||
return $condition;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -326,8 +328,12 @@
|
|||
foreach($output->columns as $key => $val) {
|
||||
$name = $val['name'];
|
||||
$value = $val['value'];
|
||||
if($output->column_type[$name]!='number') $value = "'".$this->addQuotes($value)."'";
|
||||
if(!$value) $value = 'null';
|
||||
if($output->column_type[$name]!='number') {
|
||||
$value = "'".$this->addQuotes($value)."'";
|
||||
if(!$value) $value = 'null';
|
||||
} else {
|
||||
if(!$value) $value = 0;
|
||||
}
|
||||
|
||||
$column_list[] = '`'.$name.'`';
|
||||
$value_list[] = $value;
|
||||
|
|
@ -393,24 +399,35 @@
|
|||
$table_list[] = '`'.$this->prefix.$key.'` as '.$val;
|
||||
}
|
||||
|
||||
if(!$column) $columns = '*';
|
||||
else {
|
||||
foreach($invert_columns as $key => $val) {
|
||||
if($val) $column_list[] = sprintf('%s as %s',$val, $key);
|
||||
else $column_list[] = sprintf('%s',$val);
|
||||
if(!$output->columns) {
|
||||
$columns = '*';
|
||||
} else {
|
||||
$column_list = array();
|
||||
foreach($output->columns as $key => $val) {
|
||||
$name = $val['name'];
|
||||
$alias = $val['alias'];
|
||||
if($name == '*') {
|
||||
$column_list[] = '*';
|
||||
} elseif(strpos($name,'.')===false && strpos($name,'(')===false) {
|
||||
if($alias) $column_list[] = sprintf('`%s` as `%s`', $name, $alias);
|
||||
else $column_list[] = sprintf('`%s`',$name);
|
||||
} else {
|
||||
if($alias) $column_list[] = sprintf('%s as `%s`', $name, $alias);
|
||||
else $column_list[] = sprintf('%s',$name);
|
||||
}
|
||||
}
|
||||
$columns = implode(',', $column_list);
|
||||
$columns = implode(',',$column_list);
|
||||
}
|
||||
|
||||
$condition = $this->getCondition($output);
|
||||
|
||||
$query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition);
|
||||
|
||||
if($output->list_count) return $this->_getNavigationData($table_list, $columns, $condition, $output);
|
||||
|
||||
$query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition);
|
||||
|
||||
if($output->order) {
|
||||
foreach($output->order as $key => $val) {
|
||||
$index_list[] = sprintf('%s %s', $key, $val);
|
||||
$index_list[] = sprintf('%s %s', $val[0], $val[1]);
|
||||
}
|
||||
if(count($index_list)) $query .= ' order by '.implode(',',$index_list);
|
||||
}
|
||||
|
|
@ -438,24 +455,30 @@
|
|||
$count_output = $this->_fetch($result);
|
||||
$total_count = (int)$count_output->count;
|
||||
|
||||
$list_count = $output->list_count['value'];
|
||||
if(!$list_count) $list_count = 20;
|
||||
$page_count = $output->page_count['value'];
|
||||
if(!$page_count) $page_count = 10;
|
||||
$page = $output->page->value;
|
||||
if(!$page) $page = 1;
|
||||
|
||||
// 전체 페이지를 구함
|
||||
$total_page = (int)(($total_count-1)/$navigation->list_count) +1;
|
||||
$total_page = (int)(($total_count-1)/$list_count) +1;
|
||||
|
||||
// 페이지 변수를 체크
|
||||
if($navigation->page > $total_page) $page = $navigation->page;
|
||||
else $page = $navigation->page;
|
||||
$start_count = ($page-1)*$navigation->list_count;
|
||||
if($page > $total_page) $page = $total_page;
|
||||
$start_count = ($page-1)*$list_count;
|
||||
|
||||
$query = sprintf("select %s from %s %s", implode(',',$columns), implode(',',$table_list), $condition);
|
||||
$query = sprintf("select %s from %s %s", $columns, implode(',',$table_list), $condition);
|
||||
|
||||
if($output->order) {
|
||||
foreach($output->order as $key => $val) {
|
||||
$index_list[] = sprintf('%s %s', $index_obj[0], $index_obj[1]);
|
||||
$index_list[] = sprintf('%s %s', $val[0], $val[1]);
|
||||
}
|
||||
if(count($index_list)) $query .= ' order by '.implode(',',$index_list);
|
||||
}
|
||||
|
||||
$query .= sprintf('%s limit %d, %d', $query, $start_count, $output->list_count['value']);
|
||||
$query = sprintf('%s limit %d, %d', $query, $start_count, $list_count);
|
||||
|
||||
$result = $this->_query($query);
|
||||
if($this->isError()) {
|
||||
|
|
@ -465,11 +488,11 @@
|
|||
$buff->page = 1;
|
||||
$buff->data = array();
|
||||
|
||||
$buff->page_navigation = new PageHandler($total_count, $total_page, $page, $navigation->page_count);
|
||||
$buff->page_navigation = new PageHandler($total_count, $total_page, $page, $page_count);
|
||||
return $buff;
|
||||
}
|
||||
|
||||
$virtual_no = $total_count - ($page-1)*$navigation->list_count;
|
||||
$virtual_no = $total_count - ($page-1)*$list_count;
|
||||
while($tmp = mysql_fetch_object($result)) {
|
||||
$data[$virtual_no--] = $tmp;
|
||||
}
|
||||
|
|
@ -480,7 +503,7 @@
|
|||
$buff->page = $page;
|
||||
$buff->data = $data;
|
||||
|
||||
$buff->page_navigation = new PageHandler($total_count, $total_page, $page, $navigation->page_count);
|
||||
$buff->page_navigation = new PageHandler($total_count, $total_page, $page, $page_count);
|
||||
return $buff;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -165,13 +165,14 @@
|
|||
$buff .= '$output->columns = array ( ';
|
||||
foreach($output->columns as $key => $val) {
|
||||
$val['default'] = $this->getDefault($val['name'], $val['default']);
|
||||
if($val['var']) {
|
||||
$buff .= sprintf('array("name"=>"%s", "value"=>$args->%s?$args->%s:%s),%s', $val['name'], $val['var'], $val['var'], $val['default'] ,"\n");
|
||||
if($val['var'] && strpos($val['var'],'.')===false) {
|
||||
$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");
|
||||
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 {
|
||||
$buff .= sprintf('array("name"=>"%s", "value"=>%s),%s', $val['name'], $val['default'] ,"\n");
|
||||
$buff .= sprintf('array("name"=>"%s", "alias"=>"%s", "value"=>%s),%s', $val['name'], $val['alias'], $val['default'] ,"\n");
|
||||
}
|
||||
}
|
||||
$buff .= ' );'."\n";
|
||||
|
|
@ -186,13 +187,14 @@
|
|||
$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;
|
||||
$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"=>"%s","pipe"=>"%s","operation"=>"%s",),%s', $v->column, $v->var, $v->pipe, $v->operation, "\n");
|
||||
}
|
||||
} else {
|
||||
$buff .= sprintf('array("name"=>"%s", "value"=>%s,"pipe"=>"%s","operation"=>"%s",),%s', $v->name, $v->default ,$v->pipe, $v->operation,"\n");
|
||||
$buff .= sprintf('array("column"=>"%s", "value"=>%s,"pipe"=>"%s","operation"=>"%s",),%s', $v->column, $v->default ,$v->pipe, $v->operation,"\n");
|
||||
}
|
||||
}
|
||||
$buff .= ')),'."\n";
|
||||
|
|
@ -205,7 +207,7 @@
|
|||
if($output->order) {
|
||||
$buff .= '$output->order = array(';
|
||||
foreach($output->order as $key => $val) {
|
||||
$buff .= sprintf('"%s"=>"%s",', $val->var, $val->order);
|
||||
$buff .= sprintf('array($args->%s?$args->%s:"%s","%s"),', $val->var, $val->var, $val->default, $val->order);
|
||||
}
|
||||
$buff .= ');'."\n";
|
||||
}
|
||||
|
|
@ -225,31 +227,38 @@
|
|||
$buff .= sprintf('$output->page = array("var"=>"%s", "value"=>$args->%s?$args->%s:"%s");%s', $output->page->var, $output->page->var, $output->page->var, $output->list->default,"\n");
|
||||
}
|
||||
|
||||
// default check
|
||||
if(count($default_list)) {
|
||||
foreach($default_list as $key => $val) {
|
||||
$pre_buff .= 'if(!isset($args->'.$key.')) $args->'.$key.' = '.$val.';'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
// not null check
|
||||
if(count($notnull_list)) {
|
||||
foreach($notnull_list as $key => $val) {
|
||||
$pre_buff .= 'if(!$args->'.$val.') return new Object(-1, sprintf($lang->filter->isnull, $lang->'.$val.'?$lang->'.$val.':\''.$val.'\'));'."\n";
|
||||
$pre_buff .= 'if(!isset($args->'.$val.')) return new Object(-1, sprintf($lang->filter->isnull, $lang->'.$val.'?$lang->'.$val.':\''.$val.'\'));'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
// minlength check
|
||||
if(count($minlength_list)) {
|
||||
foreach($minlength_list as $key => $val) {
|
||||
$pre_buff .= 'if(strlen($args->'.$key.')<'.$val.') return new Object(-1, sprintf($lang->filter->outofrange, $lang->'.$key.'?$lang->'.$key.':\''.$key.'\'));'."\n";
|
||||
$pre_buff .= 'if($args->'.$key.'&&strlen($args->'.$key.')<'.$val.') return new Object(-1, sprintf($lang->filter->outofrange, $lang->'.$key.'?$lang->'.$key.':\''.$key.'\'));'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
// maxlength check
|
||||
if(count($maxlength_list)) {
|
||||
foreach($maxlength_list as $key => $val) {
|
||||
$pre_buff .= 'if(strlen($args->'.$key.')>'.$val.') return new Object(-1, sprintf($lang->filter->outofrange, $lang->'.$key.'?$lang->'.$key.':\''.$key.'\'));'."\n";
|
||||
$pre_buff .= 'if($args->'.$key.'&&strlen($args->'.$key.')>'.$val.') return new Object(-1, sprintf($lang->filter->outofrange, $lang->'.$key.'?$lang->'.$key.':\''.$key.'\'));'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
// filter check
|
||||
if(count($filter_list)) {
|
||||
foreach($filter_list as $key => $val) {
|
||||
$pre_buff .= sprintf('unset($output); $output = $this->_checkFilter("%s",$args->%s,"%s"); if(!$output->toBool()) return $output;%s',$val->var,$val->var,$val->filter,"\n");
|
||||
$pre_buff .= sprintf('unset($_output); $_output = $this->_checkFilter("%s",$args->%s,"%s"); if(!$_output->toBool()) return $_output;%s',$val->var,$val->var,$val->filter,"\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -276,7 +285,7 @@
|
|||
|
||||
switch($func_name) {
|
||||
case 'ipaddress' :
|
||||
$val = '"$_SERVER[\'REMOTE_ADDR\']"';
|
||||
$val = '$_SERVER[\'REMOTE_ADDR\']';
|
||||
break;
|
||||
case 'unixtime' :
|
||||
$val = 'time()';
|
||||
|
|
|
|||
|
|
@ -20,9 +20,9 @@ function exec_xml(module, act, params, callback_func, response_tags, callback_fu
|
|||
|
||||
if(show_waiting_message) {
|
||||
var waiting_obj = xGetElementById("waitingforserverresponse");
|
||||
waiting_obj.style.visibility = "visible";
|
||||
xTop(waiting_obj, xScrollTop()+20);
|
||||
xLeft(waiting_obj, xScrollLeft()+20);
|
||||
waiting_obj.style.visibility = "visible";
|
||||
}
|
||||
oXml.request(xml_response_filter, oXml, callback_func, response_tags, callback_func_arg, fo_obj);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<query id="deleteAddon" action="delete">
|
||||
<tables>
|
||||
<table name="addons" />
|
||||
</tables>
|
||||
<conditions>
|
||||
<condition operation="equal" column="addon" var="addon" notnull="notnull" />
|
||||
</conditions>
|
||||
<tables>
|
||||
<table name="addons" />
|
||||
</tables>
|
||||
<conditions>
|
||||
<condition operation="equal" column="addon" var="addon" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
<query id="getAddonIsActivated" action="select">
|
||||
<tables>
|
||||
<table name="addons" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="count(*)" alias="count" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="addon" var="addon" notnull="notnull" />
|
||||
</conditions>
|
||||
<tables>
|
||||
<table name="addons" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="count(*)" alias="count" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="addon" var="addon" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<query id="getAddons" action="select">
|
||||
<tables>
|
||||
<table name="addons" />
|
||||
</tables>
|
||||
<navigation>
|
||||
<index var="list_order" default="addon" order="asc" />
|
||||
</navigation>
|
||||
<tables>
|
||||
<table name="addons" />
|
||||
</tables>
|
||||
<navigation>
|
||||
<index var="list_order" default="addon" order="asc" />
|
||||
</navigation>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<query id="insertAddon" action="insert">
|
||||
<tables>
|
||||
<table name="addons" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="addon" var="addon" notnull="notnull" />
|
||||
<column name="regdate" var="regdate" default="curdate()" />
|
||||
</columns>
|
||||
<tables>
|
||||
<table name="addons" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="addon" var="addon" notnull="notnull" />
|
||||
<column name="regdate" var="regdate" default="curdate()" />
|
||||
</columns>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
</group>
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" order="desc" />
|
||||
<index var="sort_index" default="module_srl" order="desc" />
|
||||
<list_count var="list_count" default="20" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
|
|
|
|||
|
|
@ -9,6 +9,6 @@
|
|||
<condition operation="equal" column="document_srl" var="document_srl" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="list_order" order="asc" />
|
||||
<index var="list_order" default="list_order" order="asc" />
|
||||
</navigation>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
<condition operation="like_prefix" column="ipaddress" var="s_ipaddress" pipe="or" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" order="asc" />
|
||||
<index var="sort_index" default="list_order" order="asc" />
|
||||
<list_count var="list_count" default="20" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
</group>
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" order="asc" />
|
||||
<index var="sort_index" default="comments.list_order" order="asc" />
|
||||
<list_count var="list_count" default="20" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<column name="module_srl" var="module_srl" filter="number" notnull="notnull" />
|
||||
<column name="parent_srl" var="parent_srl" filter="number" default="0" />
|
||||
<column name="document_srl" var="document_srl" filter="number" notnull="notnull" />
|
||||
<column name="content" var="content" notnull="notnull" minlength="2" maxlength="250" />
|
||||
<column name="content" var="content" notnull="notnull" />
|
||||
<column name="password" var="password" minlength="2" maxlength="60" />
|
||||
<column name="nick_name" var="nick_name" notnull="notnull" minlength="1" maxlength="40" />
|
||||
<column name="user_name" var="user_name" default="" />
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<columns>
|
||||
<column name="module_srl" var="module_srl" filter="number" default="0" />
|
||||
<column name="parent_srl" var="parent_srl" filter="number" default="0" />
|
||||
<column name="content" var="content" notnull="notnull" minlength="2" maxlength="250" />
|
||||
<column name="content" var="content" notnull="notnull" />
|
||||
<column name="password" var="password" minlength="2" maxlength="60" />
|
||||
<column name="user_name" var="user_name" default="" />
|
||||
<column name="nick_name" var="nick_name" notnull="notnull" minlength="1" maxlength="40" />
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" order="asc" />
|
||||
<index var="sort_index" default="list_order" order="asc" />
|
||||
</navigation>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
</group>
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" order="asc" />
|
||||
<index var="sort_index" default="list_order" order="asc" />
|
||||
<list_count var="list_count" default="20" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
</group>
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" order="asc" />
|
||||
<index var="sort_index" default="documents.list_order" order="asc" />
|
||||
<list_count var="list_count" default="20" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<table name="documents" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="comment_count" var="comment_count" />
|
||||
<column name="comment_count" var="comment_count" notnull="notnull" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="document_srl" var="document_srl" filter="number" notnull="notnull" />
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
</group>
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" order="desc" />
|
||||
<index var="sort_index" default="file_srl" order="desc" />
|
||||
<list_count var="list_count" default="20" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
<condition operation="equal" column="upload_target_srl" var="upload_target_srl" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" order="asc" />
|
||||
<index var="sort_index" defualt="file_srl" order="asc" />
|
||||
</navigation>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<column name="uploaded_filename" type="varchar" size="250" />
|
||||
<column name="file_size" type="number" size="11" default="0" notnull="notnull" index="idx_file_size" />
|
||||
<column name="comment" type="varchar" size="250" />
|
||||
<column name="isvalid" type="char" size="1" default="N" index="idx_upload_target_srl" />
|
||||
<column name="isvalid" type="char" size="1" default="N" index="idx_is_valid" />
|
||||
<column name="regdate" type="date" index="idx_regdate" />
|
||||
<column name="ipaddress" type="varchar" size="128" notnull="notnull" index="idx_ipaddress"/>
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="layout_srl" var="layout_srl" filter="number" notnull="notnull" />
|
||||
<condition operation="equal" column="menu_id" var="menu_id" filter="number" notnull="notnull" pipe="and" />
|
||||
<condition operation="equal" column="menu_id" var="menu_id" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="listorder" order="desc" />
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<table name="layout_menu" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="parent_srl" var="parent_srl" />
|
||||
<column name="parent_srl" var="parent_srl" default="0" />
|
||||
<column name="listorder" var="listorder" notnull="notnull" />
|
||||
</columns>
|
||||
<conditions>
|
||||
|
|
|
|||
|
|
@ -3,6 +3,6 @@
|
|||
<table name="member_denied_user_id" />
|
||||
</tables>
|
||||
<conditions>
|
||||
<condition operation="equal" column="user_id" var="user_id" notnull="notnull" filter="number" />
|
||||
<condition operation="equal" column="user_id" var="user_id" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<condition operation="equal" column="member.member_srl" var="friend.target_srl" pipe="and" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" order="asc" />
|
||||
<index var="sort_index" default="friend.list_order" order="asc" />
|
||||
<list_count var="list_count" default="10" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
</group>
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" order="desc" />
|
||||
<index var="sort_index" default="member_srl" order="desc" />
|
||||
<list_count var="list_count" default="20" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
</group>
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" order="desc" />
|
||||
<index var="sort_index" default="member.list_order" order="desc" />
|
||||
<list_count var="list_count" default="20" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<condition operation="equal" column="message.sender_srl" var="member.member_srl" pipe="and"/>
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" order="asc" />
|
||||
<index var="sort_index" default="message.list_order" order="asc" />
|
||||
<list_count var="list_count" default="10" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<condition operation="equal" column="message.receiver_srl" var="member.member_srl" pipe="and"/>
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" order="asc" />
|
||||
<index var="sort_index" default="message.list_order" order="asc" />
|
||||
<list_count var="list_count" default="10" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<condition operation="equal" column="message.sender_srl" var="member.member_srl" pipe="and"/>
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" order="asc" />
|
||||
<index var="sort_index" default="message.list_order" order="asc" />
|
||||
<list_count var="list_count" default="10" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
<!--%import("filter/delete_image_mark.xml")-->
|
||||
<!--@end-->
|
||||
<!--%import("js/member.js")-->
|
||||
<!--%import("../../tpl/js/krzip_search.js")-->
|
||||
<div>
|
||||
{$lang->msg_update_member}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<!--%import("filter/signup.xml")-->
|
||||
<!--%import("js/member.js")-->
|
||||
<!--%import("../../tpl/js/krzip_search.js")-->
|
||||
|
||||
<div>
|
||||
{$lang->msg_new_member}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<!--%import("js/member_admin.js")-->
|
||||
<!--%import("js/krzip_search.js")-->
|
||||
|
||||
<div style="margin-bottom:20px;">
|
||||
<span <!--@if($act=='dispMemberAdminList')-->style="font-weight:bold"<!--@end-->>[<a href="{getUrl('act','dispMemberAdminList','member_srl','')}">{$lang->cmd_member_list}</a>]</span>
|
||||
|
|
|
|||
71
modules/member/tpl/js/krzip_search.js
Normal file
71
modules/member/tpl/js/krzip_search.js
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
/* 한국 우편 번호 관련 */
|
||||
function doHideKrZipList(column_name) {
|
||||
var zone_list_obj = xGetElementById('zone_address_list_'+column_name);
|
||||
var zone_search_obj = xGetElementById('zone_address_search_'+column_name);
|
||||
var zone_addr1_obj = xGetElementById('zone_address_1_'+column_name);
|
||||
var addr1_obj = xGetElementById('fo_insert_member')[column_name][0];
|
||||
var field_obj = xGetElementById('fo_insert_member')['_tmp_address_search_'+column_name];
|
||||
|
||||
zone_addr1_obj.style.display = 'none';
|
||||
zone_list_obj.style.display = 'none';
|
||||
zone_search_obj.style.display = 'inline';
|
||||
addr1_obj.value = '';
|
||||
field_obj.focus();
|
||||
}
|
||||
|
||||
function doSelectKrZip(column_name) {
|
||||
var zone_list_obj = xGetElementById('zone_address_list_'+column_name);
|
||||
var zone_search_obj = xGetElementById('zone_address_search_'+column_name);
|
||||
var zone_addr1_obj = xGetElementById('zone_address_1_'+column_name);
|
||||
var sel_obj = xGetElementById('fo_insert_member')['_tmp_address_list_'+column_name];
|
||||
var value = sel_obj.options[sel_obj.selectedIndex].value;
|
||||
var addr1_obj = xGetElementById('fo_insert_member')[column_name][0];
|
||||
var addr2_obj = xGetElementById('fo_insert_member')[column_name][1];
|
||||
addr1_obj.value = value;
|
||||
zone_search_obj.style.display = 'none';
|
||||
zone_list_obj.style.display = 'none';
|
||||
zone_addr1_obj.style.display = 'inline';
|
||||
addr2_obj.focus();
|
||||
}
|
||||
|
||||
function doSearchKrZip(column_name) {
|
||||
var field_obj = xGetElementById('fo_insert_member')['_tmp_address_search_'+column_name];
|
||||
var addr = field_obj.value;
|
||||
if(!addr) return;
|
||||
|
||||
var params = new Array();
|
||||
params['addr'] = addr;
|
||||
params['column_name'] = column_name;
|
||||
|
||||
var response_tags = new Array('error','message','address_list');
|
||||
exec_xml('krzip', 'getKrzipCodeList', params, completeSearchKrZip, response_tags, params);
|
||||
}
|
||||
|
||||
function completeSearchKrZip(ret_obj, response_tags, callback_args) {
|
||||
if(!ret_obj['address_list']) {
|
||||
alert(alert_msg['address']);
|
||||
return;
|
||||
}
|
||||
var address_list = ret_obj['address_list'].split("\n");
|
||||
var column_name = callback_args['column_name'];
|
||||
|
||||
var zone_list_obj = xGetElementById('zone_address_list_'+column_name);
|
||||
var zone_search_obj = xGetElementById('zone_address_search_'+column_name);
|
||||
var zone_addr1_obj = xGetElementById('zone_address_1_'+column_name);
|
||||
var sel_obj = xGetElementById('fo_insert_member')['_tmp_address_list_'+column_name];
|
||||
|
||||
for(var i=0;i<address_list.length;i++) {
|
||||
var opt = new Option(address_list[i],address_list[i],false,false);
|
||||
sel_obj.options[i] = opt;
|
||||
}
|
||||
|
||||
for(var i=address_list.length-1;i<sel_obj.options.length;i++) {
|
||||
sel_obj.remove(i);
|
||||
}
|
||||
|
||||
sel_obj.selectedIndex = 0;
|
||||
|
||||
zone_search_obj.style.display = 'none';
|
||||
zone_addr1_obj.style.display = 'none';
|
||||
zone_list_obj.style.display = 'inline';
|
||||
}
|
||||
|
|
@ -6,6 +6,6 @@
|
|||
<column name="*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="act" default="act" />
|
||||
<condition operation="equal" column="act" var="act" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<table name="module_config" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="module" default="module" notnull="notnull" />
|
||||
<column name="module" var="module" notnull="notnull" />
|
||||
<column name="config" var="config" />
|
||||
<column name="regdate" default="curdate()" />
|
||||
</columns>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<column name="module_srl" type="number" size="11" notnull="notnull" primary_key="primary_key" />
|
||||
<column name="module" type="varchar" size="80" notnull="notnull" index="idx_module" />
|
||||
<column name="module_category_srl" type="number" size="11" default="0" index="idx_module_category" />
|
||||
<column name="layout_srl" type="number" size="11" notnull="notnull" default="0" />
|
||||
<column name="layout_srl" type="number" size="11" default="0" />
|
||||
<column name="mid" type="varchar" size="40" notnull="notnull" unique="unique_mid"/>
|
||||
<column name="skin" type="varchar" size="250" />
|
||||
<column name="browser_title" type="varchar" size="250" notnull="notnull"/>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
</group>
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" order="desc" />
|
||||
<index var="sort_index" default="module_srl" order="desc" />
|
||||
<list_count var="list_count" default="20" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
|
|
|
|||
|
|
@ -8,6 +8,6 @@
|
|||
<conditions>
|
||||
<condition operation="equal" column="poll_srl" var="poll_srl" />
|
||||
<condition operation="equal" column="member_srl" default="0" var="memer_srl" pipe="and" />
|
||||
<condition operation="equal" column="ipaddress" var="ipaddress" default="ipaddress" pipe="and" />
|
||||
<condition operation="equal" column="ipaddress" var="ipaddress" default="ipaddress()" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
<column name="*" />
|
||||
</columns>
|
||||
<navigation>
|
||||
<index var="sort_index" order="desc" />
|
||||
<index var="sort_index" default="regdate" order="desc" />
|
||||
</navigation>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
<column name="*" />
|
||||
</columns>
|
||||
<navigation>
|
||||
<index var="sort_index" order="desc" />
|
||||
<index var="sort_index" default="regdate" order="desc" />
|
||||
</navigation>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
<condition operation="like_prefix" column="ipaddress" var="s_ipaddress" pipe="or" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" order="asc" />
|
||||
<index var="sort_index" default="list_order" order="asc" />
|
||||
<list_count var="list_count" default="20" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
|
|
|
|||
|
|
@ -9,6 +9,6 @@
|
|||
<condition operation="equal" column="document_srl" var="document_srl" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="list_order" order="asc" />
|
||||
<index var="list_order" default="list_order" order="asc" />
|
||||
</navigation>
|
||||
</query>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue