mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-01 16:22:41 +09:00
css 및 js 호출순서 조정기능 추가
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5785 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
4f380d9c48
commit
61851f1dfe
2149 changed files with 109090 additions and 18689 deletions
|
|
@ -3,7 +3,7 @@
|
|||
<title xml:lang="ko">문서</title>
|
||||
<title xml:lang="en">Document</title>
|
||||
<title xml:lang="es">Documento</title>
|
||||
<title xml:lang="zh-CN">主题</title>
|
||||
<title xml:lang="zh-CN">主题管理</title>
|
||||
<title xml:lang="jp">ドキュメント</title>
|
||||
<title xml:lang="ru">Документы</title>
|
||||
<title xml:lang="zh-TW">主題</title>
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
<description xml:lang="zh-TW">管理討論板,部落格等主題的模組。 </description>
|
||||
<version>0.1</version>
|
||||
<date>2007-02-28</date>
|
||||
<category>utility</category>
|
||||
<category>content</category>
|
||||
|
||||
<author email_address="zero@zeroboard.com" link="http://blog.nzeo.com">
|
||||
<name xml:lang="ko">zero</name>
|
||||
|
|
|
|||
|
|
@ -2,31 +2,43 @@
|
|||
<module>
|
||||
<grants />
|
||||
<permissions>
|
||||
<permission action="dispDocumentAdminManageDocument" target="manager" />
|
||||
<permission action="getDocumentCategories" target="manager" />
|
||||
<permission action="procDocumentAdminAddCart" target="manager" />
|
||||
<permission action="procDocumentAdminManageCheckedDocument" target="manager" />
|
||||
<permission action="dispDocumentManageDocument" target="member" />
|
||||
<permission action="getDocumentCategories" target="member" />
|
||||
<permission action="procDocumentAddCart" target="member" />
|
||||
<permission action="procDocumentManageCheckedDocument" target="member" />
|
||||
</permissions>
|
||||
<actions>
|
||||
<action name="dispDocumentPrint" type="view" standalone="true" />
|
||||
<action name="dispDocumentPreview" type="view" standalone="true" />
|
||||
|
||||
<action name="dispDocumentAdminList" type="view" admin_index="true" standalone="true" />
|
||||
<action name="dispDocumentAdminConfig" type="view" standalone="true" />
|
||||
<action name="dispDocumentAdminDeclared" type="view" standalone="true" />
|
||||
|
||||
<action name="dispDocumentAdminManageDocument" type="view" standalone="true"/>
|
||||
|
||||
<action name="procDocumentVoteUp" type="controller" standalone="true" />
|
||||
<action name="procDocumentVoteDown" type="controller" standalone="true" />
|
||||
<action name="procDocumentDeclare" type="controller" standalone="true" />
|
||||
<action name="dispDocumentManageDocument" type="view" standalone="true"/>
|
||||
|
||||
<action name="getDocumentCategories" type="model" standalone="true"/>
|
||||
<action name="getDocumentMenu" type="model" standalone="true"/>
|
||||
|
||||
<action name="procDocumentAdminAddCart" type="controller" standalone="true" />
|
||||
<action name="procDocumentAdminManageCheckedDocument" type="controller" standalone="true" />
|
||||
<action name="procDocumentVoteUp" type="controller" standalone="true" />
|
||||
<action name="procDocumentVoteDown" type="controller" standalone="true" />
|
||||
<action name="procDocumentDeclare" type="controller" standalone="true" />
|
||||
<action name="procDocumentAddCart" type="controller" standalone="true" />
|
||||
<action name="procDocumentManageCheckedDocument" type="controller" standalone="true" />
|
||||
<action name="procDocumentInsertModuleConfig" type="controller" standalone="true" />
|
||||
|
||||
<action name="dispDocumentAdminList" type="view" admin_index="true" standalone="true" />
|
||||
<action name="dispDocumentAdminConfig" type="view" standalone="true" />
|
||||
<action name="dispDocumentAdminAlias" type="view" standalone="true" />
|
||||
<action name="dispDocumentAdminDeclared" type="view" standalone="true" />
|
||||
|
||||
<action name="getDocumentAdminCategoryTplInfo" type="model" standalone="true"/>
|
||||
|
||||
<action name="procDocumentAdminInsertCategory" type="controller" standalone="true"/>
|
||||
<action name="procDocumentAdminDeleteCategory" type="controller" standalone="true"/>
|
||||
<action name="procDocumentAdminMoveCategory" type="controller" standalone="true"/>
|
||||
<action name="procDocumentAdminMakeXmlFile" type="controller" standalone="true"/>
|
||||
<action name="procDocumentAdminInsertAlias" type="controller" standalone="true"/>
|
||||
<action name="procDocumentAdminDeleteAlias" type="controller" standalone="true"/>
|
||||
<action name="procAdminMoveExtraVar" type="controller" standalone="true"/>
|
||||
|
||||
<action name="procDocumentAdminInsertExtraVar" type="controller" standalone="true" />
|
||||
<action name="procDocumentAdminDeleteExtraVar" type="controller" standalone="true" />
|
||||
<action name="procDocumentAdminDeleteChecked" type="controller" standalone="true" />
|
||||
<action name="procDocumentAdminInsertConfig" type="controller" standalone="true" />
|
||||
<action name="procDocumentAdminDeleteAllThumbnail" type="controller" standalone="true" />
|
||||
|
|
|
|||
|
|
@ -36,98 +36,6 @@
|
|||
$this->setMessage( sprintf(Context::getLang('msg_checked_document_is_deleted'), $document_count) );
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 관리자가 글 선택시 세션에 담음
|
||||
**/
|
||||
function procDocumentAdminAddCart() {
|
||||
$document_srls = explode(',',Context::get('srls'));
|
||||
$cnt = count($document_srls);
|
||||
for($i=0;$i<$cnt;$i++) {
|
||||
$document_srl = (int)trim($document_srls[$i]);
|
||||
if(!$document_srls) continue;
|
||||
if($_SESSION['document_management'][$document_srl]) unset($_SESSION['document_management'][$document_srl]);
|
||||
else $_SESSION['document_management'][$document_srl] = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 세션에 담긴 선택글의 이동/ 삭제
|
||||
**/
|
||||
function procDocumentAdminManageCheckedDocument() {
|
||||
$type = Context::get('type');
|
||||
$module_srl = Context::get('target_module');
|
||||
$category_srl = Context::get('target_category');
|
||||
$message_content = Context::get('message_content');
|
||||
if($message_content) $message_content = nl2br($message_content);
|
||||
|
||||
$cart = Context::get('cart');
|
||||
if($cart) $document_srl_list = explode('|@|', $cart);
|
||||
else $document_srl_list = array();
|
||||
|
||||
$document_srl_count = count($document_srl_list);
|
||||
|
||||
// 쪽지 발송
|
||||
if($message_content) {
|
||||
|
||||
$oCommunicationController = &getController('communication');
|
||||
$oDocumentModel = &getModel('document');
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
$title = cut_str($message_content,10,'...');
|
||||
$sender_member_srl = $logged_info->member_srl;
|
||||
|
||||
for($i=0;$i<$document_srl_count;$i++) {
|
||||
$document_srl = $document_srl_list[$i];
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||
if(!$oDocument->get('member_srl') || $oDocument->get('member_srl')==$sender_member_srl) continue;
|
||||
|
||||
if($type=='move') $purl = sprintf("<a href=\"%s\" onclick=\"window.open(this.href);return false;\">%s</a>", $oDocument->getPermanentUrl(), $oDocument->getPermanentUrl());
|
||||
else $purl = "";
|
||||
$content .= sprintf("<div>%s</div><hr />%s<div style=\"font-weight:bold\">%s</div>%s",$message_content, $purl, $oDocument->getTitleText(), $oDocument->getContent(false, false, false));
|
||||
|
||||
$oCommunicationController->sendMessage($sender_member_srl, $oDocument->get('member_srl'), $title, $content, false);
|
||||
}
|
||||
}
|
||||
|
||||
// 스팸 처리가 되지 않도록 스팸필터 설정
|
||||
$oSpamController = &getController('spamfilter');
|
||||
$oSpamController->setAvoidLog();
|
||||
|
||||
if($type == 'move') {
|
||||
if(!$module_srl) return new Object(-1, 'fail_to_move');
|
||||
|
||||
$output = $this->moveDocumentModule($document_srl_list, $module_srl, $category_srl);
|
||||
if(!$output->toBool()) return new Object(-1, 'fail_to_move');
|
||||
|
||||
$msg_code = 'success_moved';
|
||||
|
||||
} elseif($type == 'copy') {
|
||||
if(!$module_srl) return new Object(-1, 'fail_to_move');
|
||||
|
||||
$output = $this->copyDocumentModule($document_srl_list, $module_srl, $category_srl);
|
||||
if(!$output->toBool()) return new Object(-1, 'fail_to_move');
|
||||
|
||||
$msg_code = 'success_registed';
|
||||
|
||||
} elseif($type =='delete') {
|
||||
$oDB = &DB::getInstance();
|
||||
$oDB->begin();
|
||||
$oDocumentController = &getController('document');
|
||||
for($i=0;$i<$document_srl_count;$i++) {
|
||||
$document_srl = $document_srl_list[$i];
|
||||
$output = $oDocumentController->deleteDocument($document_srl, true);
|
||||
if(!$output->toBool()) return new Object(-1, 'fail_to_delete');
|
||||
}
|
||||
$oDB->commit();
|
||||
$msg_code = 'success_deleted';
|
||||
}
|
||||
|
||||
$_SESSION['document_management'] = array();
|
||||
|
||||
$this->setMessage($msg_code);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 특정 게시물들의 소속 모듈 변경 (게시글 이동시에 사용)
|
||||
**/
|
||||
|
|
@ -182,6 +90,11 @@
|
|||
$oFileController->setFilesValid($obj->document_srl);
|
||||
}
|
||||
|
||||
if($module_srl != $obj->module_srl)
|
||||
{
|
||||
$oDocumentController->deleteDocumentAliasByDocument($obj->document_srl);
|
||||
}
|
||||
|
||||
// 게시물의 모듈 이동
|
||||
$obj->module_srl = $module_srl;
|
||||
$obj->category_srl = $category_srl;
|
||||
|
|
@ -411,6 +324,303 @@
|
|||
}
|
||||
$directory->close();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 모듈의 확장 변수 추가 또는 수정
|
||||
**/
|
||||
function procDocumentAdminInsertExtraVar() {
|
||||
$module_srl = Context::get('module_srl');
|
||||
$var_idx = Context::get('var_idx');
|
||||
$name = Context::get('name');
|
||||
$type = Context::get('type');
|
||||
$is_required = Context::get('is_required');
|
||||
$default = Context::get('default');
|
||||
$desc = Context::get('desc');
|
||||
$search = Context::get('search');
|
||||
|
||||
if(!$module_srl || !$name) return new Object(-1,'msg_invalid_request');
|
||||
|
||||
// idx가 지정되어 있지 않으면 최고 값을 지정
|
||||
if(!$var_idx) {
|
||||
$obj->module_srl = $module_srl;
|
||||
$output = executeQuery('document.getDocumentMaxExtraKeyIdx', $obj);
|
||||
$var_idx = $output->data->var_idx+1;
|
||||
}
|
||||
|
||||
// insert or update
|
||||
$oDocumentController = &getController('document');
|
||||
$output = $oDocumentController->insertDocumentExtraKey($module_srl, $var_idx, $name, $type, $is_required, $search, $default, $desc);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage('success_registed');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 모듈의 확장 변수 삭제
|
||||
**/
|
||||
function procDocumentAdminDeleteExtraVar() {
|
||||
$module_srl = Context::get('module_srl');
|
||||
$var_idx = Context::get('var_idx');
|
||||
if(!$module_srl || !$var_idx) return new Object(-1,'msg_invalid_request');
|
||||
|
||||
$oDocumentController = &getController('document');
|
||||
$output = $oDocumentController->deleteDocumentExtraKeys($module_srl, $var_idx);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage('success_deleted');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 카테고리 추가
|
||||
**/
|
||||
function procDocumentAdminInsertCategory($args = null) {
|
||||
// 입력할 변수 정리
|
||||
if(!$args) $args = Context::gets('module_srl','category_srl','parent_srl','title','expand','group_srls','color');
|
||||
|
||||
if($args->expand !="Y") $args->expand = "N";
|
||||
$args->group_srls = str_replace('|@|',',',$args->group_srls);
|
||||
$args->parent_srl = (int)$args->parent_srl;
|
||||
|
||||
$oDocumentController = &getController('document');
|
||||
$oDocumentModel = &getModel('document');
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
$oDB->begin();
|
||||
|
||||
// 이미 존재하는지를 확인
|
||||
if($args->category_srl) {
|
||||
$category_info = $oDocumentModel->getCategory($args->category_srl);
|
||||
if($category_info->category_srl != $args->category_srl) $args->category_srl = null;
|
||||
}
|
||||
|
||||
// 존재하게 되면 update를 해준다
|
||||
if($args->category_srl) {
|
||||
$output = $oDocumentController->updateCategory($args);
|
||||
if(!$output->toBool()) {
|
||||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
|
||||
// 존재하지 않으면 insert를 해준다
|
||||
} else {
|
||||
$output = $oDocumentController->insertCategory($args);
|
||||
if(!$output->toBool()) {
|
||||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
||||
// XML 파일을 갱신하고 위치을 넘겨 받음
|
||||
$xml_file = $oDocumentController->makeCategoryFile($args->module_srl);
|
||||
|
||||
$oDB->commit();
|
||||
|
||||
$this->add('xml_file', $xml_file);
|
||||
$this->add('module_srl', $args->module_srl);
|
||||
$this->add('category_srl', $args->category_srl);
|
||||
$this->add('parent_srl', $args->parent_srl);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief 카테고리 삭제
|
||||
**/
|
||||
function procDocumentAdminDeleteCategory() {
|
||||
// 변수 정리
|
||||
$args = Context::gets('module_srl','category_srl');
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
$oDB->begin();
|
||||
|
||||
$oDocumentModel = &getModel('document');
|
||||
|
||||
// 원정보를 가져옴
|
||||
$category_info = $oDocumentModel->getCategory($args->category_srl);
|
||||
if($category_info->parent_srl) $parent_srl = $category_info->parent_srl;
|
||||
|
||||
// 자식 노드가 있는지 체크하여 있으면 삭제 못한다는 에러 출력
|
||||
if($oDocumentModel->getCategoryChlidCount($args->category_srl)) return new Object(-1, 'msg_cannot_delete_for_child');
|
||||
|
||||
// DB에서 삭제
|
||||
$oDocumentController = &getController('document');
|
||||
$output = $oDocumentController->deleteCategory($args->category_srl);
|
||||
if(!$output->toBool()) {
|
||||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
|
||||
// XML 파일을 갱신하고 위치을 넘겨 받음
|
||||
$xml_file = $oDocumentController->makeCategoryFile($args->module_srl);
|
||||
|
||||
$oDB->commit();
|
||||
|
||||
$this->add('xml_file', $xml_file);
|
||||
$this->add('category_srl', $parent_srl);
|
||||
$this->setMessage('success_deleted');
|
||||
}
|
||||
|
||||
function procDocumentAdminMoveCategory() {
|
||||
$source_category_srl = Context::get('source_srl');
|
||||
|
||||
// parent_srl 이 있으면 첫 자식으로 들어간다
|
||||
$parent_category_srl = Context::get('parent_srl');
|
||||
|
||||
// target_srl 이 있으면 target_srl 아래로 형제로 들어간다
|
||||
$target_category_srl = Context::get('target_srl');
|
||||
|
||||
$oDocumentModel = &getModel('document');
|
||||
$oDocumentController = &getController('document');
|
||||
$source_category = $oDocumentModel->getCategory($source_category_srl);
|
||||
|
||||
|
||||
//parent_category_srl 의 첫 자식으로 넣자
|
||||
if($parent_category_srl > 0 || ($parent_category_srl == 0 && $target_category_srl == 0)){
|
||||
$parent_category = $oDocumentModel->getCategory($parent_category_srl);
|
||||
|
||||
$args->module_srl = $source_category->module_srl;
|
||||
$args->parent_srl = $parent_category_srl;
|
||||
$output = executeQuery('document.getChildCategoryMinListOrder', $args);
|
||||
|
||||
if(!$output->toBool()) return $output;
|
||||
$args->list_order = (int)$output->data->list_order;
|
||||
if(!$args->list_order) $args->list_order = 0;
|
||||
$args->list_order--;
|
||||
|
||||
|
||||
$source_args->category_srl = $source_category_srl;
|
||||
$source_args->parent_srl = $parent_category_srl;
|
||||
$source_args->list_order = $args->list_order;
|
||||
$output = $oDocumentController->updateCategory($source_args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
|
||||
// $target_category_srl의 아래동생으로
|
||||
}else if($target_category_srl > 0){
|
||||
$target_category = $oDocumentModel->getCategory($target_category_srl);
|
||||
|
||||
//$target_category의 아래 동생을 모두 내린다
|
||||
$output = $oDocumentController->updateCategoryListOrder($target_category->module_srl, $target_category->list_order+1);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
|
||||
$source_args->category_srl = $source_category_srl;
|
||||
$source_args->parent_srl = $target_category->parent_srl;
|
||||
$source_args->list_order = $target_category->list_order+1;
|
||||
$output = $oDocumentController->updateCategory($source_args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
}
|
||||
|
||||
|
||||
// xml파일 재생성
|
||||
$xml_file = $oDocumentController->makeCategoryFile($source_category->module_srl);
|
||||
|
||||
// return 변수 설정
|
||||
$this->add('xml_file', $xml_file);
|
||||
$this->add('source_category_srl', $source_category_srl);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief xml 파일을 갱신
|
||||
* 관리자페이지에서 메뉴 구성 후 간혹 xml파일이 재생성 안되는 경우가 있는데\n
|
||||
* 이럴 경우 관리자의 수동 갱신 기능을 구현해줌\n
|
||||
* 개발 중간의 문제인 것 같고 현재는 문제가 생기지 않으나 굳이 없앨 필요 없는 기능
|
||||
**/
|
||||
function procDocumentAdminMakeXmlFile() {
|
||||
// 입력값을 체크
|
||||
$module_srl = Context::get('module_srl');
|
||||
|
||||
// xml파일 재생성
|
||||
$oDocumentController = &getController('document');
|
||||
$xml_file = $oDocumentController->makeCategoryFile($module_srl);
|
||||
|
||||
// return 값 설정
|
||||
$this->add('xml_file',$xml_file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 확장변수 순서 조절
|
||||
**/
|
||||
function procAdminMoveExtraVar() {
|
||||
$type = Context::get('type');
|
||||
$module_srl = Context::get('module_srl');
|
||||
$var_idx = Context::get('var_idx');
|
||||
|
||||
if(!$type || !$module_srl || !$var_idx) return new Object(-1,'msg_invalid_request');
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
|
||||
if(!$module_info->module_srl) return new Object(-1,'msg_invalid_request');
|
||||
|
||||
$oDocumentModel = &getModel('document');
|
||||
$extra_keys = $oDocumentModel->getExtraKeys($module_srl);
|
||||
if(!$extra_keys[$var_idx]) return new Object(-1,'msg_invalid_request');
|
||||
|
||||
if($type == 'up') $new_idx = $var_idx-1;
|
||||
else $new_idx = $var_idx+1;
|
||||
if($new_idx<1) return new Object(-1,'msg_invalid_request');
|
||||
|
||||
// 바꿀 idx가 없으면 바로 업데이트
|
||||
if(!$extra_keys[$new_idx]) {
|
||||
$args->module_srl = $module_srl;
|
||||
$args->var_idx = $var_idx;
|
||||
$args->new_idx = $new_idx;
|
||||
$output = executeQuery('document.updateDocumentExtraKeyIdx', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
$output = executeQuery('document.updateDocumentExtraVarIdx', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
// 있으면 기존의 꺼랑 교체
|
||||
} else {
|
||||
$args->module_srl = $module_srl;
|
||||
$args->var_idx = $new_idx;
|
||||
$args->new_idx = -1;
|
||||
$output = executeQuery('document.updateDocumentExtraKeyIdx', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
$output = executeQuery('document.updateDocumentExtraVarIdx', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$args->var_idx = $var_idx;
|
||||
$args->new_idx = $new_idx;
|
||||
$output = executeQuery('document.updateDocumentExtraKeyIdx', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
$output = executeQuery('document.updateDocumentExtraVarIdx', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$args->var_idx = -1;
|
||||
$args->new_idx = $var_idx;
|
||||
$output = executeQuery('document.updateDocumentExtraKeyIdx', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
$output = executeQuery('document.updateDocumentExtraVarIdx', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
}
|
||||
}
|
||||
|
||||
function procDocumentAdminInsertAlias() {
|
||||
$args = Context::gets('module_srl','document_srl', 'alias_title');
|
||||
$alias_srl = Context::get('alias_srl');
|
||||
if(!$alias_srl)
|
||||
{
|
||||
$args->alias_srl = getNextSequence();
|
||||
$query = "document.insertAlias";
|
||||
}
|
||||
else
|
||||
{
|
||||
$args->alias_srl = $alias_srl;
|
||||
$query = "document.updateAlias";
|
||||
}
|
||||
$output = executeQuery($query, $args);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
||||
function procDocumentAdminDeleteAlias() {
|
||||
$alias_srl = Context::get('alias_srl');
|
||||
$args->alias_srl = $alias_srl;
|
||||
$output = executeQuery("document.deleteAlias", $args);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
79
modules/document/document.admin.model.php
Normal file
79
modules/document/document.admin.model.php
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
<?php
|
||||
/**
|
||||
* @class documentAdminModel
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @version 0.1
|
||||
* @brief document 모듈의 admin model class
|
||||
**/
|
||||
|
||||
class documentAdminModel extends document {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 특정 카테고리의 정보를 이용하여 템플릿을 구한후 return
|
||||
* 관리자 페이지에서 특정 메뉴의 정보를 추가하기 위해 서버에서 tpl을 컴파일 한후 컴파일 된 html을 직접 return
|
||||
**/
|
||||
function getDocumentAdminCategoryTplInfo() {
|
||||
// 해당 메뉴의 정보를 가져오기 위한 변수 설정
|
||||
$module_srl = Context::get('module_srl');
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
|
||||
|
||||
$category_srl = Context::get('category_srl');
|
||||
$parent_srl = Context::get('parent_srl');
|
||||
|
||||
// 회원 그룹의 목록을 가져옴
|
||||
$oMemberModel = &getModel('member');
|
||||
$group_list = $oMemberModel->getGroups($module_info->site_srl);
|
||||
Context::set('group_list', $group_list);
|
||||
|
||||
$oDocumentModel = &getModel('document');
|
||||
|
||||
// parent_srl이 있고 category_srl 이 없으면 하부 메뉴 추가임
|
||||
if(!$category_srl && $parent_srl) {
|
||||
// 상위 메뉴의 정보를 가져옴
|
||||
$parent_info = $oDocumentModel->getCategory($parent_srl);
|
||||
|
||||
// 추가하려는 메뉴의 기본 변수 설정
|
||||
$category_info->category_srl = getNextSequence();
|
||||
$category_info->parent_srl = $parent_srl;
|
||||
$category_info->parent_category_title = $parent_info->title;
|
||||
|
||||
// root에 메뉴 추가하거나 기존 메뉴의 수정일 경우
|
||||
} else {
|
||||
// category_srl 이 있으면 해당 메뉴의 정보를 가져온다
|
||||
if($category_srl) $category_info = $oDocumentModel->getCategory($category_srl);
|
||||
|
||||
// 찾아진 값이 없다면 신규 메뉴 추가로 보고 category_srl값만 구해줌
|
||||
if(!$category_info->category_srl) {
|
||||
$category_info->category_srl = getNextSequence();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$category_info->title = htmlspecialchars($category_info->title);
|
||||
Context::set('category_info', $category_info);
|
||||
|
||||
// template 파일을 직접 컴파일한후 tpl변수에 담아서 return한다.
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
$tpl = $oTemplate->compile('./modules/document/tpl', 'category_info');
|
||||
$tpl = str_replace("\n",'',$tpl);
|
||||
|
||||
// 사용자 정의 언어 변경
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController->replaceDefinedLangCode($tpl);
|
||||
|
||||
|
||||
|
||||
// return 할 변수 설정
|
||||
$this->add('tpl', $tpl);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
function dispDocumentAdminList() {
|
||||
// 목록을 구하기 위한 옵션
|
||||
$args->page = Context::get('page'); ///< 페이지
|
||||
$args->list_count = 50; ///< 한페이지에 보여줄 글 수
|
||||
$args->list_count = 30; ///< 한페이지에 보여줄 글 수
|
||||
$args->page_count = 10; ///< 페이지 네비게이션에 나타날 페이지의 수
|
||||
|
||||
$args->search_target = Context::get('search_target'); ///< 검색 대상 (title, contents...)
|
||||
|
|
@ -29,41 +29,16 @@
|
|||
|
||||
$args->module_srl = Context::get('module_srl');
|
||||
|
||||
// mid목록을 구함
|
||||
$oModuleModel = &getModel('module');
|
||||
$mid_list = $oModuleModel->getMidList();
|
||||
Context::set('mid_list', $mid_list);
|
||||
|
||||
// 목록 구함, document->getDocumentList 에서 걍 알아서 다 해버리는 구조이다... (아.. 이거 나쁜 버릇인데.. ㅡ.ㅜ 어쩔수 없다)
|
||||
$oDocumentModel = &getModel('document');
|
||||
$output = $oDocumentModel->getDocumentList($args);
|
||||
|
||||
// 목록의 loop를 돌면서 mid를 구하기 위한 module_srl값을 구함
|
||||
$document_count = count($output->data);
|
||||
$module_srl_list = array();
|
||||
if($document_count) {
|
||||
foreach($output->data as $key => $val) {
|
||||
$module_srl = $val->module_srl;
|
||||
if(!in_array($module_srl, $module_srl_list)) $module_srl_list[] = $module_srl;
|
||||
}
|
||||
if(count($module_srl_list)) {
|
||||
$args->module_srls = implode(',',$module_srl_list);
|
||||
$mid_output = executeQuery('module.getModuleInfoByModuleSrl', $args);
|
||||
if($mid_output->data && !is_array($mid_output->data)) $mid_output->data = array($mid_output->data);
|
||||
for($i=0;$i<count($mid_output->data);$i++) {
|
||||
$mid_info = $mid_output->data[$i];
|
||||
$module_list[$mid_info->module_srl] = $mid_info;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 템플릿에 쓰기 위해서 document_model::getDocumentList() 의 return object에 있는 값들을 세팅
|
||||
Context::set('total_count', $output->total_count);
|
||||
Context::set('total_page', $output->total_page);
|
||||
Context::set('page', $output->page);
|
||||
Context::set('document_list', $output->data);
|
||||
Context::set('page_navigation', $output->page_navigation);
|
||||
Context::set('module_list', $module_list);
|
||||
|
||||
// 템플릿에서 사용할 검색옵션 세팅
|
||||
$count_search_option = count($this->search_option);
|
||||
|
|
@ -90,46 +65,13 @@
|
|||
$this->setTemplateFile('document_config');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 관리자가 선택한 문서에 대한 관리
|
||||
**/
|
||||
function dispDocumentAdminManageDocument() {
|
||||
// 선택한 목록을 세션에서 가져옴
|
||||
$flag_list = $_SESSION['document_management'];
|
||||
if(count($flag_list)) {
|
||||
foreach($flag_list as $key => $val) {
|
||||
if(!is_bool($val)) continue;
|
||||
$document_srl_list[] = $key;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(count($document_srl_list)) {
|
||||
$oDocumentModel = &getModel('document');
|
||||
$document_list = $oDocumentModel->getDocuments($document_srl_list, $this->grant->is_admin);
|
||||
Context::set('document_list', $document_list);
|
||||
}
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
// 모듈 카테고리 목록과 모듈 목록의 조합
|
||||
if(count($module_list)>1) Context::set('module_list', $module_categories);
|
||||
|
||||
// 팝업 레이아웃 선택
|
||||
$this->setLayoutPath('./common/tpl');
|
||||
$this->setLayoutFile('popup_layout');
|
||||
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('checked_list');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 관리자 페이지의 신고 목록 보기
|
||||
**/
|
||||
function dispDocumentAdminDeclared() {
|
||||
// 목록을 구하기 위한 옵션
|
||||
$args->page = Context::get('page'); ///< 페이지
|
||||
$args->list_count = 50; ///< 한페이지에 보여줄 글 수
|
||||
$args->list_count = 30; ///< 한페이지에 보여줄 글 수
|
||||
$args->page_count = 10; ///< 페이지 네비게이션에 나타날 페이지의 수
|
||||
|
||||
$args->sort_index = 'document_declared.declared_count'; ///< 소팅 값
|
||||
|
|
@ -160,5 +102,31 @@
|
|||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('declared_list');
|
||||
}
|
||||
|
||||
function dispDocumentAdminAlias() {
|
||||
$args->document_srl = Context::get('document_srl');
|
||||
if(!$args->document_srl) return $this->dispDocumentAdminList();
|
||||
|
||||
$oModel = &getModel('document');
|
||||
$oDocument = $oModel->getDocument($args->document_srl);
|
||||
if(!$oDocument->isExists()) return $this->dispDocumentAdminList();
|
||||
Context::set('oDocument', $oDocument);
|
||||
|
||||
$output = executeQueryArray('document.getAliases', $args);
|
||||
if(!$output->data)
|
||||
{
|
||||
$aliases = array();
|
||||
}
|
||||
else
|
||||
{
|
||||
$aliases = $output->data;
|
||||
}
|
||||
|
||||
|
||||
Context::set('aliases', $aliases);
|
||||
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('document_alias');
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -18,11 +18,6 @@
|
|||
function moduleInstall() {
|
||||
// action forward에 등록 (관리자 모드에서 사용하기 위함)
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController->insertActionForward('document', 'view', 'dispDocumentAdminList');
|
||||
$oModuleController->insertActionForward('document', 'view', 'dispDocumentPrint');
|
||||
$oModuleController->insertActionForward('document', 'view', 'dispDocumentAdminConfig');
|
||||
$oModuleController->insertActionForward('document', 'view', 'dispDocumentAdminManageDocument');
|
||||
$oModuleController->insertActionForward('document', 'view', 'dispDocumentAdminDeclared');
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
$oDB->addIndex("documents","idx_module_list_order", array("module_srl","list_order"));
|
||||
|
|
@ -32,10 +27,14 @@
|
|||
$oDB->addIndex("documents","idx_module_notice", array("module_srl","is_notice"));
|
||||
$oDB->addIndex("documents","idx_module_document_srl", array("module_srl","document_srl"));
|
||||
$oDB->addIndex("documents","idx_module_blamed_count", array("module_srl","blamed_count"));
|
||||
$oDB->addIndex("document_aliases", "idx_module_title", array("module_srl","alias_title"), true);
|
||||
|
||||
// 2007. 10. 17 모듈이 삭제될때 등록된 글도 모두 삭제하는 트리거 추가
|
||||
$oModuleController->insertTrigger('module.deleteModule', 'document', 'controller', 'triggerDeleteModuleDocuments', 'after');
|
||||
|
||||
// 2009. 01. 29 Added a trigger for additional setup
|
||||
$oModuleController->insertTrigger('module.dispAdditionSetup', 'document', 'view', 'triggerDispDocumentAdditionSetup', 'before');
|
||||
|
||||
return new Object();
|
||||
}
|
||||
|
||||
|
|
@ -46,11 +45,6 @@
|
|||
$oDB = &DB::getInstance();
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
/**
|
||||
* 2007. 7. 23 : 확장변수(extra_vars1~20까지 추가)
|
||||
**/
|
||||
if(!$oDB->isColumnExists("documents","extra_vars20")) return true;
|
||||
|
||||
/**
|
||||
* 2007. 7. 25 : 알림 필드(notify_message) 추가
|
||||
**/
|
||||
|
|
@ -64,20 +58,9 @@
|
|||
if(!$oDB->isIndexExists("documents","idx_module_readed_count")) return true;
|
||||
if(!$oDB->isIndexExists("documents","idx_module_voted_count")) return true;
|
||||
|
||||
/**
|
||||
* 2007. 10. 11 : 관리자 페이지의 기본 설정 Action 추가, 게시글 관리 action 추가
|
||||
**/
|
||||
if(!$oModuleModel->getActionForward('dispDocumentAdminConfig')) return true;
|
||||
if(!$oModuleModel->getActionForward('dispDocumentAdminManageDocument')) return true;
|
||||
|
||||
// 2007. 10. 17 모듈이 삭제될때 등록된 글도 모두 삭제하는 트리거 추가
|
||||
if(!$oModuleModel->getTrigger('module.deleteModule', 'document', 'controller', 'triggerDeleteModuleDocuments', 'after')) return true;
|
||||
|
||||
/**
|
||||
* 2007. 10. 18 : 관리자 페이지의 신고된 목록 보기 action 추가
|
||||
**/
|
||||
if(!$oModuleModel->getActionForward('dispDocumentAdminDeclared')) return true;
|
||||
|
||||
// 2007. 10. 25 문서 분류에 parent_srl, expand를 추가
|
||||
if(!$oDB->isColumnExists("document_categories","parent_srl")) return true;
|
||||
if(!$oDB->isColumnExists("document_categories","expand")) return true;
|
||||
|
|
@ -99,10 +82,16 @@
|
|||
if(!$oDB->isIndexExists("documents","idx_module_blamed_count")) return true;
|
||||
if(!$oDB->isColumnExists("document_voted_log", "point")) return true;
|
||||
|
||||
|
||||
// 2008-12-15 문서 분류에 color를 추가
|
||||
if(!$oDB->isColumnExists("document_categories", "color")) return true;
|
||||
|
||||
/**
|
||||
* 2009. 01. 29 : 확장변수 값 테이블에 lang_code가 없을 경우 추가
|
||||
**/
|
||||
if(!$oDB->isColumnExists("document_extra_vars","lang_code")) return true;
|
||||
|
||||
if(!$oModuleModel->getTrigger('module.dispAdditionSetup', 'document', 'view', 'triggerDispDocumentAdditionSetup', 'before')) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -114,16 +103,6 @@
|
|||
$oModuleModel = &getModel('module');
|
||||
$oModuleController = &getController('module');
|
||||
|
||||
/**
|
||||
* 2007. 7. 23 : 확장변수(extra_vars1~20까지 추가)
|
||||
**/
|
||||
if(!$oDB->isColumnExists("documents","extra_vars20")) {
|
||||
for($i=1;$i<=20;$i++) {
|
||||
$column_name = "extra_vars".$i;
|
||||
$oDB->addColumn('documents',$column_name,'text');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 2007. 7. 25 : 알림 필드(notify_message) 추가
|
||||
**/
|
||||
|
|
@ -150,24 +129,10 @@
|
|||
$oDB->addIndex("documents","idx_module_voted_count", array("module_srl","voted_count"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 2007. 10. 11 : 관리자 페이지의 기본 설정 Action 추가, 게시글 관리 action 추가
|
||||
**/
|
||||
if(!$oModuleModel->getActionForward('dispDocumentAdminConfig'))
|
||||
$oModuleController->insertActionForward('document', 'view', 'dispDocumentAdminConfig');
|
||||
if(!$oModuleModel->getActionForward('dispDocumentAdminManageDocument'))
|
||||
$oModuleController->insertActionForward('document', 'view', 'dispDocumentAdminManageDocument');
|
||||
|
||||
// 2007. 10. 17 모듈이 삭제될때 등록된 글도 모두 삭제하는 트리거 추가
|
||||
if(!$oModuleModel->getTrigger('module.deleteModule', 'document', 'controller', 'triggerDeleteModuleDocuments', 'after'))
|
||||
$oModuleController->insertTrigger('module.deleteModule', 'document', 'controller', 'triggerDeleteModuleDocuments', 'after');
|
||||
|
||||
/**
|
||||
* 2007. 10. 18 : 관리자 페이지의 신고된 목록 보기 action 추가
|
||||
**/
|
||||
if(!$oModuleModel->getActionForward('dispDocumentAdminDeclared'))
|
||||
$oModuleController->insertActionForward('document', 'view', 'dispDocumentAdminDeclared');
|
||||
|
||||
// 2007. 10. 25 문서 분류에 parent_srl, expand를 추가
|
||||
if(!$oDB->isColumnExists("document_categories","parent_srl")) $oDB->addColumn('document_categories',"parent_srl","number",12,0);
|
||||
if(!$oDB->isColumnExists("document_categories","expand")) $oDB->addColumn('document_categories',"expand","char",1,"N");
|
||||
|
|
@ -202,6 +167,16 @@
|
|||
|
||||
if(!$oDB->isColumnExists("document_categories","color")) $oDB->addColumn('document_categories',"color","char",7);
|
||||
|
||||
/**
|
||||
* 2009. 01. 29 : 확장변수 값 테이블에 lang_code가 없을 경우 추가
|
||||
**/
|
||||
if(!$oDB->isColumnExists("document_extra_vars","lang_code")) $oDB->addColumn('document_extra_vars',"lang_code","varchar",10);
|
||||
|
||||
// 2009. 01. 29 Added a trigger for additional setup
|
||||
if(!$oModuleModel->getTrigger('module.dispAdditionSetup', 'document', 'view', 'triggerDispDocumentAdditionSetup', 'before'))
|
||||
$oModuleController->insertTrigger('module.dispAdditionSetup', 'document', 'view', 'triggerDispDocumentAdditionSetup', 'before');
|
||||
|
||||
|
||||
return new Object(0,'success_updated');
|
||||
|
||||
}
|
||||
|
|
@ -214,92 +189,5 @@
|
|||
FileHandler::removeFilesInDir(_XE_PATH_."files/cache/document_category");
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Action중 Admin이 들어갔을 경우 권한 체크
|
||||
**/
|
||||
function checkAdminActionGrant() {
|
||||
if(!Context::get('is_logged')) return false;
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
if($logged_info->is_admin=='Y') return true;
|
||||
|
||||
$actions = array('procDocumentAdminAddCart','dispDocumentAdminManageDocument','procDocumentAdminManageCheckedDocument');
|
||||
if(in_array($this->act, $actions)) return true;
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
if($oModuleModel->isSiteAdmin()) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 권한 체크를 실행하는 method
|
||||
* 모듈 객체가 생성된 경우는 직접 권한을 체크하지만 기능성 모듈등 스스로 객체를 생성하지 않는 모듈들의 경우에는
|
||||
* ModuleObject에서 직접 method를 호출하여 권한을 확인함
|
||||
*
|
||||
* isAdminGrant는 관리권한 이양시에만 사용되도록 하고 기본은 false로 return 되도록 하여 잘못된 권한 취약점이 생기지 않도록 주의하여야 함
|
||||
**/
|
||||
function isAdmin() {
|
||||
// 로그인이 되어 있지 않으면 무조건 return false
|
||||
$is_logged = Context::get('is_logged');
|
||||
if(!$is_logged) return false;
|
||||
|
||||
// 사용자 아이디를 구함
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
// 모듈 요청에 사용된 변수들을 가져옴
|
||||
$args = Context::getRequestVars();
|
||||
|
||||
// act의 값에 따라서 관리 권한 체크
|
||||
switch($args->act) {
|
||||
// 게시글 목록에서 글을 체크하는 경우 해당 글의 모듈 정보를 구해서 관리자 여부를 체크
|
||||
case 'procDocumentAdminAddCart' :
|
||||
if(!$args->srls) return false;
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
list($srl) = explode(',',$args->srls);
|
||||
if(!$srl) return false;
|
||||
$module_info = $oModuleModel->getModuleInfoByDocumentSrl($srl);
|
||||
if(!$module_info) return false;
|
||||
|
||||
if($oModuleModel->isModuleAdmin($module_info, $logged_info)) return true;
|
||||
break;
|
||||
|
||||
// 체크된 게시글을 관리하는 action
|
||||
case 'dispDocumentAdminManageDocument' :
|
||||
// 세션 정보에 게시글이 담겨 있으면 return true 해줌
|
||||
$flag_list = $_SESSION['document_management'];
|
||||
if(count($flag_list)) return true;
|
||||
break;
|
||||
|
||||
// 체크된 게시글을 다른 모듈로 이동 또는 복사, 삭제 할때
|
||||
case 'procDocumentAdminManageCheckedDocument' :
|
||||
switch($args->type) {
|
||||
// 이동과 복사의 경우에는 대상 모듈의 정보를 체크
|
||||
case 'move' :
|
||||
case 'copy' :
|
||||
if($args->target_module) {
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($args->target_module);
|
||||
if(!$module_info) return false;
|
||||
|
||||
if($oModuleModel->isModuleAdmin($module_info, $logged_info)) return true;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
// 삭제일 경우는 세션에 저장된 글이 있으면 return true
|
||||
case 'delete' :
|
||||
$flag_list = $_SESSION['document_management'];
|
||||
if(count($flag_list)) return true;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -26,6 +26,16 @@
|
|||
return $this->updateVotedCount($document_srl, $point);
|
||||
}
|
||||
|
||||
function insertAlias($module_srl, $document_srl, $alias_title) {
|
||||
$args->alias_srl = getNextSequence();
|
||||
$args->module_srl = $module_srl;
|
||||
$args->document_srl = $document_srl;
|
||||
$args->alias_title = $alias_title;
|
||||
$query = "document.insertAlias";
|
||||
$output = executeQuery($query, $args);
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @breif 게시글의 추천을 처리하는 action (Down)
|
||||
**/
|
||||
|
|
@ -51,6 +61,27 @@
|
|||
return $this->declaredDocument($document_srl);
|
||||
}
|
||||
|
||||
function deleteDocumentAliasByModule($module_srl)
|
||||
{
|
||||
$args->module_srl = $module_srl;
|
||||
executeQuery("document.deleteAlias", $args);
|
||||
}
|
||||
|
||||
function deleteDocumentAliasByDocument($document_srl)
|
||||
{
|
||||
$args->document_srl = $document_srl;
|
||||
executeQuery("document.deleteAlias", $args);
|
||||
}
|
||||
|
||||
function deleteDocumentHistory($history_srl, $document_srl, $module_srl)
|
||||
{
|
||||
$args->history_srl = $history_srl;
|
||||
$args->module_srl = $module_srl;
|
||||
$args->document_srl = $document_srl;
|
||||
if(!$args->history_srl && !$args->module_srl && !$args->document_srl) return;
|
||||
executeQuery("document.deleteHistory", $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 모듈이 삭제될때 등록된 모든 글을 삭제하는 trigger
|
||||
**/
|
||||
|
|
@ -68,6 +99,15 @@
|
|||
$output = $oDocumentController->deleteModuleCategory($module_srl);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// 확장변수 삭제
|
||||
$this->deleteDocumentExtraVars($module_srl);
|
||||
|
||||
// remove aliases
|
||||
$this->deleteDocumentAliasByModule($module_srl);
|
||||
|
||||
// remove histories
|
||||
$this->deleteDocumentHistory(null, null, $module_srl);
|
||||
|
||||
return new Object();
|
||||
}
|
||||
|
||||
|
|
@ -83,10 +123,6 @@
|
|||
* @brief 문서 입력
|
||||
**/
|
||||
function insertDocument($obj, $manual_inserted = false) {
|
||||
// trigger 호출 (before)
|
||||
$output = ModuleHandler::triggerCall('document.insertDocument', 'before', $obj);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// begin transaction
|
||||
$oDB = &DB::getInstance();
|
||||
$oDB->begin();
|
||||
|
|
@ -111,9 +147,14 @@
|
|||
// 주어진 문서 번호가 없으면 문서 번호 등록
|
||||
if(!$obj->document_srl) $obj->document_srl = getNextSequence();
|
||||
|
||||
// trigger 호출 (before)
|
||||
$output = ModuleHandler::triggerCall('document.insertDocument', 'before', $obj);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$oDocumentModel = &getModel('document');
|
||||
|
||||
// 카테고리가 있나 검사하여 없는 카테고리면 0으로 세팅
|
||||
if($obj->category_srl) {
|
||||
$oDocumentModel = &getModel('document');
|
||||
$category_list = $oDocumentModel->getCategoryList($obj->module_srl);
|
||||
if(!$category_list[$obj->category_srl]) $obj->category_srl = 0;
|
||||
}
|
||||
|
|
@ -139,6 +180,8 @@
|
|||
// 제목이 없으면 내용에서 추출
|
||||
settype($obj->title, "string");
|
||||
if($obj->title == '') $obj->title = cut_str(strip_tags($obj->content),20,'...');
|
||||
//그래도 없으면 Untitled
|
||||
if($obj->title == '') $obj->title = 'Untitled';
|
||||
|
||||
// 내용에서 XE만의 태그를 삭제
|
||||
$obj->content = preg_replace('!<\!--(Before|After)(Document|Comment)\(([0-9]+),([0-9]+)\)-->!is', '', $obj->content);
|
||||
|
|
@ -146,6 +189,9 @@
|
|||
// 세션에서 최고 관리자가 아니면 iframe, script 제거
|
||||
if($logged_info->is_admin != 'Y') $obj->content = removeHackTag($obj->content);
|
||||
|
||||
// 로그인정보가 없고 사용자 이름이 없으면 오류 표시
|
||||
if(!$logged_info->member_srl && !$obj->nick_name) return new Object(-1,'msg_invalid_request');
|
||||
|
||||
// DB에 입력
|
||||
$output = executeQuery('document.insertDocument', $obj);
|
||||
if(!$output->toBool()) {
|
||||
|
|
@ -153,9 +199,24 @@
|
|||
return $output;
|
||||
}
|
||||
|
||||
// 등록 성공시 확장 변수 등록
|
||||
$extra_keys = $oDocumentModel->getExtraKeys($obj->module_srl);
|
||||
if(count($extra_keys)) {
|
||||
foreach($extra_keys as $idx => $extra_item) {
|
||||
$value = '';
|
||||
if(isset($obj->{'extra_vars'.$idx})) $value = trim($obj->{'extra_vars'.$idx});
|
||||
elseif(isset($obj->{$extra_item->name})) $value = trim($obj->{$extra_item->name});
|
||||
if(!isset($value)) continue;
|
||||
$this->insertDocumentExtraVar($obj->module_srl, $obj->document_srl, $idx, $value);
|
||||
}
|
||||
}
|
||||
|
||||
// 성공하였을 경우 category_srl이 있으면 카테고리 update
|
||||
if($obj->category_srl) $this->updateCategoryCount($obj->module_srl, $obj->category_srl);
|
||||
|
||||
// 공지사항 글이면 공지사항 캐시 업데이트
|
||||
if($obj->is_notice == 'Y') $this->updateDocumentNoticeCache($obj->module_srl);
|
||||
|
||||
// trigger 호출 (after)
|
||||
if($output->toBool()) {
|
||||
$trigger_output = ModuleHandler::triggerCall('document.insertDocument', 'after', $obj);
|
||||
|
|
@ -187,6 +248,26 @@
|
|||
$oDB = &DB::getInstance();
|
||||
$oDB->begin();
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$module_srl = $source_obj->get('module_srl');
|
||||
$document_config = $oModuleModel->getModulePartConfig('document', $module_srl);
|
||||
if(!isset($document_config->use_history)) $document_config->use_history = 'N';
|
||||
$bUseHistory = $document_config->use_history == 'Y' || $document_config->use_history == 'Trace';
|
||||
|
||||
if($bUseHistory)
|
||||
{
|
||||
$args->history_srl = getNextSequence();
|
||||
$args->document_srl = $obj->document_srl;
|
||||
$args->module_srl = $module_srl;
|
||||
if($document_config->use_history == 'Y')
|
||||
$args->content = $source_obj->get('content');
|
||||
$args->nick_name = $source_obj->get('nick_name');
|
||||
$args->member_srl = $source_obj->get('member_srl');
|
||||
$args->regdate = $source_obj->get('last_update');
|
||||
$args->ipaddress = $source_obj->get('ipaddress');
|
||||
$output = executeQuery("document.insertHistory", $args);
|
||||
}
|
||||
|
||||
// 기본 변수들 정리
|
||||
if($obj->is_secret!='Y') $obj->is_secret = 'N';
|
||||
if($obj->allow_comment!='Y') $obj->allow_comment = 'N';
|
||||
|
|
@ -204,9 +285,10 @@
|
|||
unset($obj->_saved_doc_content);
|
||||
unset($obj->_saved_doc_message);
|
||||
|
||||
$oDocumentModel = &getModel('document');
|
||||
|
||||
// 카테고리가 변경되었으면 검사후 없는 카테고리면 0으로 세팅
|
||||
if($source_obj->get('category_srl')!=$obj->category_srl) {
|
||||
$oDocumentModel = &getModel('document');
|
||||
$category_list = $oDocumentModel->getCategoryList($obj->module_srl);
|
||||
if(!$category_list[$obj->category_srl]) $obj->category_srl = 0;
|
||||
}
|
||||
|
|
@ -217,10 +299,10 @@
|
|||
// 비밀번호가 있으면 md5 hash
|
||||
if($obj->password) $obj->password = md5($obj->password);
|
||||
|
||||
// 원본 작성인과 수정하려는 수정인이 동일할 시에 로그인 회원의 정보를 입력
|
||||
// 원본 작성인과 수정하려는 수정인이 동일할 시에 또는 History를 사용하면 로그인된 사용자 정보를 입력
|
||||
if(Context::get('is_logged')) {
|
||||
$logged_info = Context::get('logged_info');
|
||||
if($source_obj->get('member_srl')==$logged_info->member_srl) {
|
||||
if($source_obj->get('member_srl')==$logged_info->member_srl || $bUseHistory) {
|
||||
$obj->member_srl = $logged_info->member_srl;
|
||||
$obj->user_name = $logged_info->user_name;
|
||||
$obj->nick_name = $logged_info->nick_name;
|
||||
|
|
@ -241,6 +323,8 @@
|
|||
// 제목이 없으면 내용에서 추출
|
||||
settype($obj->title, "string");
|
||||
if($obj->title == '') $obj->title = cut_str(strip_tags($obj->content),20,'...');
|
||||
//그래도 없으면 Untitled
|
||||
if($obj->title == '') $obj->title = 'Untitled';
|
||||
|
||||
// 내용에서 XE만의 태그를 삭제
|
||||
$obj->content = preg_replace('!<\!--(Before|After)(Document|Comment)\(([0-9]+),([0-9]+)\)-->!is', '', $obj->content);
|
||||
|
|
@ -255,12 +339,28 @@
|
|||
return $output;
|
||||
}
|
||||
|
||||
// 등록 성공시 확장 변수 등록
|
||||
$extra_keys = $oDocumentModel->getExtraKeys($obj->module_srl);
|
||||
if(count($extra_keys)) {
|
||||
$this->deleteDocumentExtraVars($obj->module_srl, $obj->document_srl);
|
||||
foreach($extra_keys as $idx => $extra_item) {
|
||||
$value = '';
|
||||
if(isset($obj->{'extra_vars'.$idx})) $value = trim($obj->{'extra_vars'.$idx});
|
||||
elseif(isset($obj->{$extra_item->name})) $value = trim($obj->{$extra_item->name});
|
||||
if(!isset($value)) continue;
|
||||
$this->insertDocumentExtraVar($obj->module_srl, $obj->document_srl, $idx, $value);
|
||||
}
|
||||
}
|
||||
|
||||
// 성공하였을 경우 category_srl이 있으면 카테고리 update
|
||||
if($source_obj->get('category_srl')!=$obj->category_srl) {
|
||||
if($source_obj->get('category_srl')) $this->updateCategoryCount($obj->module_srl, $source_obj->get('category_srl'));
|
||||
if($obj->category_srl) $this->updateCategoryCount($obj->module_srl, $obj->category_srl);
|
||||
}
|
||||
|
||||
// 공지사항 글이면 공지사항 캐시 업데이트
|
||||
if($source_obj->is_notice == 'Y' || $obj->is_notice == 'Y') $this->updateDocumentNoticeCache($obj->module_srl);
|
||||
|
||||
// trigger 호출 (after)
|
||||
if($output->toBool()) {
|
||||
$trigger_output = ModuleHandler::triggerCall('document.updateDocument', 'after', $obj);
|
||||
|
|
@ -311,12 +411,22 @@
|
|||
return $output;
|
||||
}
|
||||
|
||||
$this->deleteDocumentAliasByDocument($document_srl);
|
||||
|
||||
$this->deleteDocumentHistory(null, $document_srl, null);
|
||||
|
||||
// 카테고리가 있으면 카테고리 정보 변경
|
||||
if($oDocument->get('category_srl')) $this->updateCategoryCount($oDocument->get('module_srl'),$oDocument->get('category_srl'));
|
||||
|
||||
// 신고 삭제
|
||||
executeQuery('document.deleteDeclared', $args);
|
||||
|
||||
// 확장 변수 삭제
|
||||
$this->deleteDocumentExtraVars($oDocument->get('module_srl'), $oDocument->document_srl);
|
||||
|
||||
// 공지사항 글이면 공지사항 캐시 업데이트
|
||||
if($oDocument->get('is_notice') == 'Y') $this->updateDocumentNoticeCache($oDocument->get('module_srl'));
|
||||
|
||||
// trigger 호출 (after)
|
||||
if($output->toBool()) {
|
||||
$trigger_obj = $oDocument->getObjectVars();
|
||||
|
|
@ -336,6 +446,22 @@
|
|||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 특정 모듈의 공지사항 글에 대해 캐시
|
||||
**/
|
||||
function updateDocumentNoticeCache($module_srl) {
|
||||
$cache_file = _XE_PATH_.'files/cache/document_notice/'.getNumberingPath($module_srl,4).$module_srl.'.txt';
|
||||
FileHandler::removeFile($cache_file);
|
||||
$args->module_srl = $module_srl;
|
||||
$output = executeQueryArray('document.getNoticeList', $args);
|
||||
if(!$output->toBool()|| !$output->data) return;
|
||||
|
||||
foreach($output->data as $key => $val) {
|
||||
$document_srls[] = $val->document_srl;
|
||||
}
|
||||
FileHandler::writeFile($cache_file, implode(',',$document_srls));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 해당 document의 조회수 증가
|
||||
**/
|
||||
|
|
@ -370,6 +496,67 @@
|
|||
$_SESSION['readed_document'][$document_srl] = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @breif documents 테이블의 확장 변수 등록
|
||||
**/
|
||||
function insertDocumentExtraKey($module_srl, $var_idx, $var_name, $var_type, $var_is_required = 'N', $var_search = 'N', $var_default = '', $var_desc = '') {
|
||||
if(!$module_srl || !$var_idx || !$var_name || !$var_type) return new Object(-1,'msg_invalid_request');
|
||||
|
||||
$obj->module_srl = $module_srl;
|
||||
$obj->var_idx = $var_idx;
|
||||
$obj->var_name = $var_name;
|
||||
$obj->var_type = $var_type;
|
||||
$obj->var_is_required = $var_is_required=='Y'?'Y':'N';
|
||||
$obj->var_search = $var_search=='Y'?'Y':'N';
|
||||
$obj->var_default = $var_default;
|
||||
$obj->var_desc = $var_desc;
|
||||
|
||||
$output = executeQuery('document.getDocumentExtraKeys', $obj);
|
||||
if(!$output->data) return executeQuery('document.insertDocumentExtraKey', $obj);
|
||||
$output = executeQuery('document.updateDocumentExtraKey', $obj);
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief documents 확장변수 제거
|
||||
**/
|
||||
function deleteDocumentExtraKeys($module_srl, $var_idx = null) {
|
||||
if(!$module_srl) return new Object(-1,'msg_invalid_request');
|
||||
$obj->module_srl = $module_srl;
|
||||
if(!is_null($var_idx)) $obj->var_idx = $var_idx;
|
||||
$output = executeQuery('document.deleteDocumentExtraKeys', $obj);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
return executeQuery('document.deleteDocumentExtraVars', $obj);
|
||||
}
|
||||
|
||||
/**
|
||||
* @breif documents 테이블의 확장 변수 값 등록
|
||||
**/
|
||||
function insertDocumentExtraVar($module_srl, $document_srl, $var_idx, $value, $lang_code = '') {
|
||||
if(!$module_srl || !$document_srl || !$var_idx || !isset($value)) return new Object(-1,'msg_invalid_request');
|
||||
if(!$lang_code) $lang_code = Context::getLangType();
|
||||
|
||||
$obj->module_srl = $module_srl;
|
||||
$obj->document_srl = $document_srl;
|
||||
$obj->var_idx = $var_idx;
|
||||
$obj->value = $value;
|
||||
$obj->lang_code = $lang_code ;
|
||||
|
||||
executeQuery('document.insertDocumentExtraVar', $obj);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief documents 확장변수 값 제거
|
||||
**/
|
||||
function deleteDocumentExtraVars($module_srl, $document_srl = null, $var_idx = null) {
|
||||
$obj->module_srl = $module_srl;
|
||||
if(!is_null($document_srl)) $obj->document_srl = $document_srl;
|
||||
if(!is_null($var_idx)) $obj->var_idx = $var_idx;
|
||||
return executeQuery('document.deleteDocumentExtraVars', $obj);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief 해당 document의 추천수 증가
|
||||
**/
|
||||
|
|
@ -730,20 +917,22 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief document의 20개 확장변수를 xml js filter 적용을 위해 직접 적용
|
||||
* 모듈정보를 받아서 20개의 확장변수를 체크하여 type, required등의 값을 체크하여 header에 javascript 코드 추가
|
||||
* @brief 특정 module_srl에 해당하는 document_extra_keys type, required등의 값을 체크하여 header에 javascript 코드 추가
|
||||
**/
|
||||
function addXmlJsFilter($module_info) {
|
||||
$extra_vars = $module_info->extra_vars;
|
||||
if(!$extra_vars) return;
|
||||
function addXmlJsFilter($module_srl) {
|
||||
$oDocumentModel = &getModel('document');
|
||||
$extra_keys = $oDocumentModel->getExtraKeys($module_srl);
|
||||
if(!count($extra_keys)) return;
|
||||
|
||||
$js_code = "";
|
||||
|
||||
foreach($extra_vars as $key => $val) {
|
||||
$js_code .= sprintf('alertMsg["extra_vars%d"] = "%s";', $key, $val->name);
|
||||
$js_code .= sprintf('extra_vars[extra_vars.length] = "extra_vars%d";', $key);
|
||||
$js_code .= sprintf('target_type_list["extra_vars%d"] = "%s";', $key, $val->type);
|
||||
if($val->is_required == 'Y') $js_code .= sprintf('notnull_list[notnull_list.length] = "extra_vars%s";',$key);
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
foreach($extra_keys as $idx => $val) {
|
||||
$js_code .= sprintf('alertMsg["extra_vars%s"] = "%s";', $val->idx, $val->name);
|
||||
$js_code .= sprintf('target_type_list["extra_vars%s"] = "%s";', $val->idx, $val->type);
|
||||
$js_code .= sprintf('extra_vars[extra_vars.length] = "extra_vars%s";', $val->idx);
|
||||
if($val->is_required == 'Y' && $logged_info->is_admin != 'Y') $js_code .= sprintf('notnull_list[notnull_list.length] = "extra_vars%s";',$val->idx);
|
||||
}
|
||||
|
||||
$js_code = "<script type=\"text/javascript\">//<![CDATA[\n".$js_code."\n//]]></script>";
|
||||
|
|
@ -819,9 +1008,11 @@
|
|||
'} else { '.
|
||||
'$is_admin = false; '.
|
||||
'$group_srsl = array(); '.
|
||||
'} ';
|
||||
'} '."\n";
|
||||
|
||||
// xml 캐시 파일 생성 (xml캐시는 따로 동작하기에 session 지정을 해주어야 함)
|
||||
$xml_header_buff = '';
|
||||
$xml_body_buff = $this->getXmlTree($tree[0], $tree, $module_info->site_srl, $xml_header_buff);
|
||||
$xml_buff = sprintf(
|
||||
'<?php '.
|
||||
'define(\'__ZBXE__\', true); '.
|
||||
|
|
@ -835,14 +1026,16 @@
|
|||
'header("Cache-Control: post-check=0, pre-check=0", false); '.
|
||||
'header("Pragma: no-cache"); '.
|
||||
'%s'.
|
||||
'%s'.
|
||||
'?>'.
|
||||
'<root>%s</root>',
|
||||
$header_script,
|
||||
$this->getXmlTree($tree[0], $tree)
|
||||
$xml_header_buff,
|
||||
$xml_body_buff
|
||||
);
|
||||
|
||||
// php 캐시 파일 생성
|
||||
$php_output = $this->getPhpCacheCode($tree[0], $tree, 0);
|
||||
$php_output = $this->getPhpCacheCode($tree[0], $tree, $module_info->site_srl, $php_header_buff);
|
||||
$php_buff = sprintf(
|
||||
'<?php '.
|
||||
'if(!defined("__ZBXE__")) exit(); '.
|
||||
|
|
@ -851,7 +1044,7 @@
|
|||
'$menu->list = array(%s); '.
|
||||
'?>',
|
||||
$header_script,
|
||||
$php_output['category_title_str'],
|
||||
$php_header_buff,
|
||||
$php_output['buff']
|
||||
);
|
||||
|
||||
|
|
@ -866,17 +1059,16 @@
|
|||
* 메뉴 xml파일은 node라는 tag가 중첩으로 사용되며 이 xml doc으로 관리자 페이지에서 메뉴를 구성해줌\n
|
||||
* (tree_menu.js 에서 xml파일을 바로 읽고 tree menu를 구현)
|
||||
**/
|
||||
function getXmlTree($source_node, $tree) {
|
||||
function getXmlTree($source_node, $tree, $site_srl, &$xml_header_buff) {
|
||||
if(!$source_node) return;
|
||||
|
||||
|
||||
foreach($source_node as $category_srl => $node) {
|
||||
$child_buff = "";
|
||||
|
||||
// 자식 노드의 데이터 가져옴
|
||||
if($category_srl && $tree[$category_srl]) $child_buff = $this->getXmlTree($tree[$category_srl], $tree);
|
||||
if($category_srl && $tree[$category_srl]) $child_buff = $this->getXmlTree($tree[$category_srl], $tree, $site_srl, $xml_header_buff);
|
||||
|
||||
// 변수 정리
|
||||
$title = str_replace(array('&','"','<','>'),array('&','"','<','>'),$node->title);
|
||||
$expand = $node->expand;
|
||||
$group_srls = $node->group_srls;
|
||||
$mid = $node->mid;
|
||||
|
|
@ -887,15 +1079,20 @@
|
|||
if($group_srls) $group_check_code = sprintf('($is_admin==true||(is_array($group_srls)&&count(array_intersect($group_srls, array(%s)))))',$group_srls);
|
||||
else $group_check_code = "true";
|
||||
|
||||
$title = $node->title;
|
||||
$oModuleAdminModel = &getAdminModel('module');
|
||||
$langs = $oModuleAdminModel->getLangCode($site_srl, $title);
|
||||
if(count($langs)) foreach($langs as $key => $val) $xml_header_buff .= sprintf('$_titles[%d]["%s"] = "%s"; ', $category_srl, $key, str_replace('"','\\"',$val));
|
||||
|
||||
$attribute = sprintf(
|
||||
'mid="%s" module_srl="%d" node_srl="%d" parent_srl="%d" category_srl="%d" text="<?php echo (%s?"%s":"")?>" url="%s" expand="%s" color="%s" document_count="%d" ',
|
||||
'mid="%s" module_srl="%d" node_srl="%d" parent_srl="%d" category_srl="%d" text="<?php echo (%s?($_titles[%d][$lang_type]):"")?>" url="%s" expand="%s" color="%s" document_count="%d" ',
|
||||
$mid,
|
||||
$module_srl,
|
||||
$category_srl,
|
||||
$parent_srl,
|
||||
$category_srl,
|
||||
$group_check_code,
|
||||
$title,
|
||||
$category_srl,
|
||||
getUrl('','mid',$node->mid,'category',$category_srl),
|
||||
$expand,
|
||||
$color,
|
||||
|
|
@ -914,7 +1111,7 @@
|
|||
* php로 된 캐시파일을 만들어서 db이용없이 바로 메뉴 정보를 구할 수 있도록 한다
|
||||
* 이 캐시는 ModuleHandler::displayContent() 에서 include하여 Context::set() 한다
|
||||
**/
|
||||
function getPhpCacheCode($source_node, $tree) {
|
||||
function getPhpCacheCode($source_node, $tree, $site_srl, &$php_header_buff) {
|
||||
$output = array("buff"=>"", "category_srl_list"=>array());
|
||||
if(!$source_node) return $output;
|
||||
|
||||
|
|
@ -922,12 +1119,9 @@
|
|||
foreach($source_node as $category_srl => $node) {
|
||||
|
||||
// 자식 노드가 있으면 자식 노드의 데이터를 먼저 얻어옴
|
||||
if($category_srl&&$tree[$category_srl]) $child_output = $this->getPhpCacheCode($tree[$category_srl], $tree);
|
||||
if($category_srl&&$tree[$category_srl]) $child_output = $this->getPhpCacheCode($tree[$category_srl], $tree, $site_srl, $php_header_buff);
|
||||
else $child_output = array("buff"=>"", "category_srl_list"=>array());
|
||||
|
||||
// 변수 정리
|
||||
$category_title_str = sprintf('$_category_title[%d] = "%s"; %s', $node->category_srl, $node->title, $child_output['category_title_str']);
|
||||
|
||||
// 현재 노드의 url값이 공란이 아니라면 category_srl_list 배열값에 입력
|
||||
$child_output['category_srl_list'][] = $node->category_srl;
|
||||
$output['category_srl_list'] = array_merge($output['category_srl_list'], $child_output['category_srl_list']);
|
||||
|
|
@ -941,9 +1135,14 @@
|
|||
$child_buff = $child_output['buff'];
|
||||
$expand = $node->expand;
|
||||
|
||||
$title = $node->title;
|
||||
$oModuleAdminModel = &getAdminModel('module');
|
||||
$langs = $oModuleAdminModel->getLangCode($site_srl, $title);
|
||||
if(count($langs)) foreach($langs as $key => $val) $php_header_buff .= sprintf('$_titles[%d]["%s"] = "%s"; ', $category_srl, $key, str_replace('"','\\"',$val));
|
||||
|
||||
// 속성을 생성한다 ( category_srl_list를 이용해서 선택된 메뉴의 노드에 속하는지를 검사한다. 꽁수지만 빠르고 강력하다고 생각;;)
|
||||
$attribute = sprintf(
|
||||
'"mid" => "%s", "module_srl" => "%d","node_srl"=>"%s","category_srl"=>"%s","parent_srl"=>"%s","text"=>$_category_title[%d],"selected"=>(in_array(Context::get("category"),array(%s))?1:0),"expand"=>"%s","color"=>"%s", "list"=>array(%s),"document_count"=>"%d","grant"=>%s?true:false',
|
||||
'"mid" => "%s", "module_srl" => "%d","node_srl"=>"%s","category_srl"=>"%s","parent_srl"=>"%s","text"=>$_titles[%d][$lang_type],"selected"=>(in_array(Context::get("category"),array(%s))?1:0),"expand"=>"%s","color"=>"%s", "list"=>array(%s),"document_count"=>"%d","grant"=>%s?true:false',
|
||||
$node->mid,
|
||||
$node->module_srl,
|
||||
$node->category_srl,
|
||||
|
|
@ -960,7 +1159,6 @@
|
|||
|
||||
// buff 데이터를 생성한다
|
||||
$output['buff'] .= sprintf('%s=>array(%s),', $node->category_srl, $attribute);
|
||||
$output['category_title_str'] .= $category_title_str;
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
|
@ -981,6 +1179,163 @@
|
|||
Context::set('document_popup_menu_list', $document_popup_menu_list);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 관리자가 글 선택시 세션에 담음
|
||||
**/
|
||||
function procDocumentAddCart() {
|
||||
if(!Context::get('is_logged')) return new Object(-1, 'msg_not_permitted');
|
||||
|
||||
// 게시글 번호 구함
|
||||
$srls = explode(',',Context::get('srls'));
|
||||
for($i=0;$i<count($srls);$i++) {
|
||||
$srl = trim($srls[$i]);
|
||||
if(!$srl) continue;
|
||||
$document_srls[] = $srl;
|
||||
}
|
||||
if(!count($document_srls)) return;
|
||||
|
||||
// 게시글들의 모듈 번호를 구함
|
||||
$args->list_count = count($document_srls);
|
||||
$args->document_srls = implode(',',$document_srls);
|
||||
$args->order_type = 'asc';
|
||||
$output = executeQueryArray('document.getDocuments', $args);
|
||||
if(!$output->data) return new Object();
|
||||
|
||||
unset($document_srls);
|
||||
foreach($output->data as $key => $val) {
|
||||
$document_srls[$val->module_srl][] = $val->document_srl;
|
||||
}
|
||||
if(!$document_srls || !count($document_srls)) return new Object();
|
||||
|
||||
// 각 문서들의 모듈 관리자 여부 확인
|
||||
$oModuleModel = &getModel('module');
|
||||
$module_srls = array_keys($document_srls);
|
||||
for($i=0;$i<count($module_srls);$i++) {
|
||||
$module_srl = $module_srls[$i];
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
|
||||
if(!$module_info) {
|
||||
unset($document_srls[$module_srl]);
|
||||
continue;
|
||||
}
|
||||
$grant = $oModuleModel->getGrant($module_info, Context::get('logged_info'));
|
||||
if(!$grant->manager) {
|
||||
unset($document_srls[$module_srl]);
|
||||
continue;
|
||||
}
|
||||
|
||||
}
|
||||
if(!count($document_srls)) return new Object();
|
||||
|
||||
foreach($document_srls as $module_srl => $documents) {
|
||||
$cnt = count($documents);
|
||||
for($i=0;$i<$cnt;$i++) {
|
||||
$document_srl = (int)trim($documents[$i]);
|
||||
if(!$document_srls) continue;
|
||||
if($_SESSION['document_management'][$document_srl]) unset($_SESSION['document_management'][$document_srl]);
|
||||
else $_SESSION['document_management'][$document_srl] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 세션에 담긴 선택글의 이동/ 삭제
|
||||
**/
|
||||
function procDocumentManageCheckedDocument() {
|
||||
if(!Context::get('is_logged')) return new Object(-1,'msg_not_permitted');
|
||||
|
||||
$type = Context::get('type');
|
||||
$module_srl = Context::get('target_module');
|
||||
$category_srl = Context::get('target_category');
|
||||
$message_content = Context::get('message_content');
|
||||
if($message_content) $message_content = nl2br($message_content);
|
||||
|
||||
$cart = Context::get('cart');
|
||||
if($cart) $document_srl_list = explode('|@|', $cart);
|
||||
else $document_srl_list = array();
|
||||
|
||||
$document_srl_count = count($document_srl_list);
|
||||
|
||||
// 쪽지 발송
|
||||
if($message_content) {
|
||||
|
||||
$oCommunicationController = &getController('communication');
|
||||
$oDocumentModel = &getModel('document');
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
$title = cut_str($message_content,10,'...');
|
||||
$sender_member_srl = $logged_info->member_srl;
|
||||
|
||||
for($i=0;$i<$document_srl_count;$i++) {
|
||||
$document_srl = $document_srl_list[$i];
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||
if(!$oDocument->get('member_srl') || $oDocument->get('member_srl')==$sender_member_srl) continue;
|
||||
|
||||
if($type=='move') $purl = sprintf("<a href=\"%s\" onclick=\"window.open(this.href);return false;\">%s</a>", $oDocument->getPermanentUrl(), $oDocument->getPermanentUrl());
|
||||
else $purl = "";
|
||||
$content .= sprintf("<div>%s</div><hr />%s<div style=\"font-weight:bold\">%s</div>%s",$message_content, $purl, $oDocument->getTitleText(), $oDocument->getContent(false, false, false));
|
||||
|
||||
$oCommunicationController->sendMessage($sender_member_srl, $oDocument->get('member_srl'), $title, $content, false);
|
||||
}
|
||||
}
|
||||
|
||||
// 스팸 처리가 되지 않도록 스팸필터 설정
|
||||
$oSpamController = &getController('spamfilter');
|
||||
$oSpamController->setAvoidLog();
|
||||
$oDocumentAdminController = &getAdminController('document');
|
||||
|
||||
if($type == 'move') {
|
||||
if(!$module_srl) return new Object(-1, 'fail_to_move');
|
||||
|
||||
$output = $oDocumentAdminController->moveDocumentModule($document_srl_list, $module_srl, $category_srl);
|
||||
if(!$output->toBool()) return new Object(-1, 'fail_to_move');
|
||||
|
||||
$msg_code = 'success_moved';
|
||||
|
||||
} elseif($type == 'copy') {
|
||||
if(!$module_srl) return new Object(-1, 'fail_to_move');
|
||||
|
||||
$output = $oDocumentAdminController->copyDocumentModule($document_srl_list, $module_srl, $category_srl);
|
||||
if(!$output->toBool()) return new Object(-1, 'fail_to_move');
|
||||
|
||||
$msg_code = 'success_registed';
|
||||
|
||||
} elseif($type =='delete') {
|
||||
$oDB = &DB::getInstance();
|
||||
$oDB->begin();
|
||||
for($i=0;$i<$document_srl_count;$i++) {
|
||||
$document_srl = $document_srl_list[$i];
|
||||
$output = $this->deleteDocument($document_srl, true);
|
||||
if(!$output->toBool()) return new Object(-1, 'fail_to_delete');
|
||||
}
|
||||
$oDB->commit();
|
||||
$msg_code = 'success_deleted';
|
||||
}
|
||||
|
||||
$_SESSION['document_management'] = array();
|
||||
|
||||
$this->setMessage($msg_code);
|
||||
}
|
||||
|
||||
function procDocumentInsertModuleConfig()
|
||||
{
|
||||
$module_srl = Context::get('target_module_srl');
|
||||
if(preg_match('/^([0-9,]+)$/',$module_srl)) $module_srl = explode(',',$module_srl);
|
||||
else $module_srl = array($module_srl);
|
||||
|
||||
$document_config = null;
|
||||
$document_config->use_history = Context::get('use_history');
|
||||
if(!$document_config->use_history) $document_config->user_history = 'N';
|
||||
|
||||
$oModuleController = &getController('module');
|
||||
for($i=0;$i<count($module_srl);$i++) {
|
||||
$srl = trim($module_srl[$i]);
|
||||
if(!$srl) continue;
|
||||
$output = $oModuleController->insertModulePartConfig('document',$srl,$document_config);
|
||||
}
|
||||
$this->setError(-1);
|
||||
$this->setMessage('success_updated');
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -370,16 +370,31 @@
|
|||
}
|
||||
|
||||
function isExtraVarsExists() {
|
||||
for($i=1;$i<=20;$i++) {
|
||||
if($this->get('extra_vars'.$i)) return true;
|
||||
}
|
||||
return false;
|
||||
if(!$this->get('module_srl')) return false;
|
||||
$oDocumentModel = &getModel('document');
|
||||
$extra_keys = $oDocumentModel->getExtraKeys($this->get('module_srl'));
|
||||
return count($extra_keys)?true:false;
|
||||
}
|
||||
|
||||
function getExtraValue($key) {
|
||||
$val = $this->get('extra_vars'.$key);
|
||||
if(strpos($val,'|@|')!==false) $val = explode('|@|', $val);
|
||||
return $val;
|
||||
function getExtraVars() {
|
||||
if(!$this->get('module_srl') || !$this->document_srl) return null;
|
||||
$oDocumentModel = &getModel('document');
|
||||
return $oDocumentModel->getExtraVars($this->get('module_srl'), $this->document_srl);
|
||||
}
|
||||
|
||||
function getExtraValue($idx) {
|
||||
$extra_vars = $this->getExtraVars();
|
||||
return $extra_vars[$idx]->value;
|
||||
}
|
||||
|
||||
function getExtraValueHTML($idx) {
|
||||
$extra_vars = $this->getExtraVars();
|
||||
if(array_key_exists($idx,$extra_vars)){
|
||||
return $extra_vars[$idx]->getValueHTML();
|
||||
}else{
|
||||
return '';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function getExtraVarsValue($key) {
|
||||
|
|
|
|||
|
|
@ -24,16 +24,59 @@
|
|||
* @brief 문서 가져오기
|
||||
**/
|
||||
function getDocument($document_srl=0, $is_admin = false) {
|
||||
static $document_list = array();
|
||||
if(!$document_srl) return new documentItem();
|
||||
|
||||
if(!$GLOBALS['__DocumentItem__'][$document_srl]) {
|
||||
if(!isset($document_list[$document_srl])) {
|
||||
$oDocument = new documentItem($document_srl);
|
||||
if($is_admin) $oDocument->setGrant();
|
||||
$GLOBALS['__DocumentItem__'][$document_srl] = $oDocument;
|
||||
}
|
||||
$document_list[$document_srl] = &$oDocument;
|
||||
} else $oDocument = $document_list[$document_srl];
|
||||
if($is_admin) $oDocument->setGrant();
|
||||
|
||||
return $GLOBALS['__DocumentItem__'][$document_srl];
|
||||
}
|
||||
return $oDocument;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief document의 확장 변수 키값을 가져오는 함수
|
||||
* $form_include : 글 작성시에 필요한 확장변수의 input form 추가 여부
|
||||
**/
|
||||
function getExtraKeys($module_srl) {
|
||||
$oExtraVar = &ExtraVar::getInstance($module_srl);
|
||||
if(!$oExtraVar->isSettedExtraVars()) {
|
||||
$obj->module_srl = $module_srl;
|
||||
$obj->sort_index = 'var_idx';
|
||||
$obj->order = 'asc';
|
||||
$output = executeQueryArray('document.getDocumentExtraKeys', $obj);
|
||||
$oExtraVar->setExtraVarKeys($output->data);
|
||||
}
|
||||
return $oExtraVar->getExtraVars();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 특정 document의 확장 변수 값을 가져오는 함수
|
||||
**/
|
||||
function getExtraVars($module_srl, $document_srl) {
|
||||
static $extra_vars = array();
|
||||
|
||||
if(!isset($extra_vars[$module_srl][$document_srl])) {
|
||||
$obj->module_srl = $module_srl;
|
||||
$obj->document_srl = $document_srl;
|
||||
$obj->sort_index = 'extra_keys.var_idx';
|
||||
$obj->order = 'asc';
|
||||
$obj->lang_code = Context::getLangType();
|
||||
$output = executeQueryArray('document.getDocumentExtraVars', $obj);
|
||||
|
||||
if($output->data) {
|
||||
foreach($output->data as $key => $val) {
|
||||
$obj = new ExtraItem($val->module_srl, $val->idx, $val->name, $val->type, $val->default, $val->desc, $val->is_required, $val->search, $val->value);
|
||||
$extra_vars[$module_srl][$document_srl][$obj->idx] = $obj;
|
||||
}
|
||||
} else {
|
||||
$extra_vars[$module_srl][$document_srl] = array();
|
||||
}
|
||||
}
|
||||
return $extra_vars[$module_srl][$document_srl];
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 선택된 게시물의 팝업메뉴 표시
|
||||
|
|
@ -244,10 +287,11 @@
|
|||
$query_id = 'document.getDocumentListWithinTag';
|
||||
break;
|
||||
default :
|
||||
preg_match('/^extra_vars([0-9]+)$/',$search_target,$matches);
|
||||
if($matches[1]) {
|
||||
$args->{"s_extra_vars".$matches[1]} = $search_keyword;
|
||||
$use_division = true;
|
||||
if(strpos($search_target,'extra_vars')!==false) {
|
||||
$args->var_idx = substr($search_target, strlen('extra_vars'));
|
||||
$args->var_value = str_replace(' ','%',$search_keyword);
|
||||
$args->sort_index = 'documents.'.$args->sort_index;
|
||||
$query_id = 'document.getDocumentListWithExtraVars';
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -381,27 +425,30 @@
|
|||
* @brief module_srl값을 가지는 문서의 공지사항만 가져옴
|
||||
**/
|
||||
function getNoticeList($obj) {
|
||||
$args->module_srl = $obj->module_srl;
|
||||
$args->category_srl = $obj->category_srl;
|
||||
$args->sort_index = 'list_order';
|
||||
$cache_file = _XE_PATH_.'files/cache/document_notice/'.getNumberingPath($obj->module_srl,4).$obj->module_srl.'.txt';
|
||||
if(!file_exists($cache_file)) {
|
||||
$oDocumentController = &getController('document');
|
||||
$oDocumentController->updateDocumentNoticeCache($obj->module_srl);
|
||||
}
|
||||
|
||||
$document_srls = FileHandler::readFile($cache_file);
|
||||
if(!$document_srls) return;
|
||||
|
||||
$list_count = count(explode(',',$document_srls));
|
||||
$args->document_srls = $document_srls;
|
||||
$args->list_count = $list_count;
|
||||
$args->list_order = 'list_order';
|
||||
$args->order_type = 'asc';
|
||||
|
||||
$output = executeQueryArray('document.getNoticeList', $args);
|
||||
|
||||
// 결과가 없거나 오류 발생시 그냥 return
|
||||
if(!$output->toBool()||!count($output->data)) return $output;
|
||||
|
||||
foreach($output->data as $key => $attribute) {
|
||||
$document_srl = $attribute->document_srl;
|
||||
|
||||
$output = executeQueryArray('document.getDocuments', $args);
|
||||
if(!$output->toBool()||!$output->data) return;
|
||||
foreach($output->data as $key => $val) {
|
||||
if(!$val->document_srl) continue;
|
||||
$oDocument = null;
|
||||
$oDocument = new documentItem();
|
||||
$oDocument->setAttribute($attribute);
|
||||
|
||||
$output->data[$key] = $oDocument;
|
||||
|
||||
$oDocument->setAttribute($val);
|
||||
$result->data[$val->document_srl] = $oDocument;
|
||||
}
|
||||
return $output;
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -496,26 +543,21 @@
|
|||
* 속도나 여러가지 상황을 고려해서 카테고리 목록은 php로 생성된 script를 include하여 사용하는 것을 원칙으로 함
|
||||
**/
|
||||
function getCategoryList($module_srl) {
|
||||
// 한 페이지에서 여러번 호출될 경우를 대비해서 static var로 보관 (php4때문에 다른 방법으로 구현)
|
||||
if(!isset($this->category_list[$module_srl])) {
|
||||
// 대상 모듈의 카테고리 파일을 불러옴
|
||||
$filename = sprintf("./files/cache/document_category/%s.php", $module_srl);
|
||||
|
||||
// 대상 모듈의 카테고리 파일을 불러옴
|
||||
$filename = sprintf("./files/cache/document_category/%s.php", $module_srl);
|
||||
|
||||
// 대상 파일이 없으면 카테고리 캐시 파일을 재생성
|
||||
if(!file_exists($filename)) {
|
||||
$oDocumentController = &getController('document');
|
||||
if(!$oDocumentController->makeCategoryFile($module_srl)) return array();
|
||||
}
|
||||
|
||||
@include($filename);
|
||||
|
||||
// 카테고리의 정리
|
||||
$document_category = array();
|
||||
$this->_arrangeCategory($document_category, $menu->list, 0);
|
||||
$this->category_list[$module_srl] = $document_category;
|
||||
// 대상 파일이 없으면 카테고리 캐시 파일을 재생성
|
||||
if(!file_exists($filename)) {
|
||||
$oDocumentController = &getController('document');
|
||||
if(!$oDocumentController->makeCategoryFile($module_srl)) return array();
|
||||
}
|
||||
return $this->category_list[$module_srl];
|
||||
|
||||
@include($filename);
|
||||
|
||||
// 카테고리의 정리
|
||||
$document_category = array();
|
||||
$this->_arrangeCategory($document_category, $menu->list, 0);
|
||||
return $document_category;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -655,6 +697,7 @@
|
|||
* @brief 특정 모듈의 분류를 구함
|
||||
**/
|
||||
function getDocumentCategories() {
|
||||
if(!Context::get('is_logged')) return new Object(-1,'msg_not_permitted');
|
||||
$module_srl = Context::get('module_srl');
|
||||
$categories= $this->getCategoryList($module_srl);
|
||||
$lang = Context::get('lang');
|
||||
|
|
@ -681,5 +724,50 @@
|
|||
}
|
||||
return $GLOBLAS['__document_config__'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 공통 :: 모듈의 확장 변수 관리
|
||||
* 모듈의 확장변수 관리는 모든 모듈에서 document module instance를 이용할때 사용할 수 있음
|
||||
**/
|
||||
function getExtraVarsHTML($module_srl) {
|
||||
// 기존의 extra_keys 가져옴
|
||||
$extra_keys = $this->getExtraKeys($module_srl);
|
||||
Context::set('extra_keys', $extra_keys);
|
||||
|
||||
// grant 정보를 추출
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
return $oTemplate->compile($this->module_path.'tpl', 'extra_keys');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 공통 :: 모듈의 카테고리 변수 관리
|
||||
**/
|
||||
function getCategoryHTML($module_srl) {
|
||||
$category_xml_file = $this->getCategoryXmlFile($module_srl);
|
||||
|
||||
Context::set('category_xml_file', $category_xml_file);
|
||||
Context::addJsFile('./common/js/tree_menu.js');
|
||||
|
||||
// grant 정보를 추출
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
return $oTemplate->compile($this->module_path.'tpl', 'category_list');
|
||||
}
|
||||
|
||||
function getDocumentSrlByAlias($mid, $alias)
|
||||
{
|
||||
if(!$mid || !$alias) return null;
|
||||
$args->mid = $mid;
|
||||
$args->alias_title = $alias;
|
||||
$output = executeQuery('document.getDocumentSrlByAlias', $args);
|
||||
if(!$output->data) return null;
|
||||
else return $output->data->document_srl;
|
||||
}
|
||||
|
||||
function getHistories($document_srl)
|
||||
{
|
||||
$args->document_srl = $document_srl;
|
||||
$output = executeQueryArray('document.getHistories', $args);
|
||||
return $output->data;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -31,18 +31,6 @@
|
|||
// 권한 체크
|
||||
if(!$oDocument->isAccessible()) return new Object(-1,'msg_not_permitted');
|
||||
|
||||
|
||||
// 설정된 확장 변수를 찾는다.
|
||||
$oModuleModel = &getModel('module');
|
||||
$module_info = $oModuleModel->getModuleInfoByDocumentSrl($document_srl);
|
||||
$extra_vars = array();
|
||||
foreach($module_info->extra_vars as $key => $extra_var){
|
||||
$extra_vars[$key]->name = $extra_var->name;
|
||||
$extra_vars[$key]->value = $oDocument->getExtraValue($key);
|
||||
if(is_array($extra_vars[$key]->value)) $extra_vars[$key]->value = join("",$extra_vars[$key]->value);
|
||||
}
|
||||
Context::set('extra_vars', $extra_vars);
|
||||
|
||||
// 브라우저 타이틀 설정
|
||||
Context::setBrowserTitle($oDocument->getTitleText());
|
||||
Context::set('oDocument', $oDocument);
|
||||
|
|
@ -63,5 +51,62 @@
|
|||
$this->setTemplateFile('preview_page');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 관리자가 선택한 문서에 대한 관리
|
||||
**/
|
||||
function dispDocumentManageDocument() {
|
||||
if(!Context::get('is_logged')) return new Object(-1,'msg_not_permitted');
|
||||
|
||||
// 선택한 목록을 세션에서 가져옴
|
||||
$flag_list = $_SESSION['document_management'];
|
||||
if(count($flag_list)) {
|
||||
foreach($flag_list as $key => $val) {
|
||||
if(!is_bool($val)) continue;
|
||||
$document_srl_list[] = $key;
|
||||
}
|
||||
}
|
||||
|
||||
if(count($document_srl_list)) {
|
||||
$oDocumentModel = &getModel('document');
|
||||
$document_list = $oDocumentModel->getDocuments($document_srl_list, $this->grant->is_admin);
|
||||
Context::set('document_list', $document_list);
|
||||
}
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
// 모듈 카테고리 목록과 모듈 목록의 조합
|
||||
if(count($module_list)>1) Context::set('module_list', $module_categories);
|
||||
|
||||
// 팝업 레이아웃 선택
|
||||
$this->setLayoutPath('./common/tpl');
|
||||
$this->setLayoutFile('popup_layout');
|
||||
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('checked_list');
|
||||
}
|
||||
|
||||
function triggerDispDocumentAdditionSetup(&$obj) {
|
||||
$current_module_srl = Context::get('module_srl');
|
||||
$current_module_srls = Context::get('module_srls');
|
||||
|
||||
if(!$current_module_srl && !$current_module_srls) {
|
||||
// 선택된 모듈의 정보를 가져옴
|
||||
$current_module_info = Context::get('current_module_info');
|
||||
$current_module_srl = $current_module_info->module_srl;
|
||||
if(!$current_module_srl) return new Object();
|
||||
}
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$document_config = $oModuleModel->getModulePartConfig('document', $module_srl);
|
||||
if(!isset($document_config->use_history)) $document_config->use_history = 'N';
|
||||
Context::set('document_config', $document_config);
|
||||
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
$tpl = $oTemplate->compile($this->module_path.'tpl', 'document_module_config');
|
||||
$obj .= $tpl;
|
||||
|
||||
return new Object();
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -13,6 +13,21 @@
|
|||
$lang->move_target_module = "Target module ";
|
||||
$lang->title_bold = 'Bold';
|
||||
$lang->title_color = 'Color';
|
||||
$lang->new_document_count = '새글';
|
||||
|
||||
$lang->parent_category_title = 'Parent Category';
|
||||
$lang->category_title = 'Category';
|
||||
$lang->category_color = 'Category Font Color';
|
||||
$lang->expand = 'Expand';
|
||||
$lang->category_group_srls = 'Accessable Group';
|
||||
|
||||
$lang->cmd_make_child = 'Add Child Category';
|
||||
$lang->cmd_enable_move_category = "Change Category Position (Drag the top menu after selection)";
|
||||
|
||||
$lang->about_category_title = 'Please input category name';
|
||||
$lang->about_expand = 'By selecting this option, it will be always expanded';
|
||||
$lang->about_category_group_srls = 'Only selected group will be able to use current category';
|
||||
$lang->about_category_color = 'You can set font color of category.';
|
||||
|
||||
$lang->cmd_search_next = 'Search Next';
|
||||
|
||||
|
|
@ -49,4 +64,9 @@
|
|||
'last_update' => 'Last Modified Date',
|
||||
'ipaddress' => 'IP Address',
|
||||
);
|
||||
|
||||
$lang->alias = "Alias";
|
||||
$lang->history = "History";
|
||||
$lang->about_use_history = "Determine whether to enable history feature, if it is enabled, update history would be stored and possible to restore old revisions.";
|
||||
$lang->trace_only = "Trace only";
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -13,6 +13,19 @@
|
|||
$lang->move_target_module = "Módulo para cambiar de posición";
|
||||
$lang->title_bold = 'Bold';
|
||||
$lang->title_color = 'Color';
|
||||
$lang->new_document_count = '새글';
|
||||
|
||||
$lang->parent_category_title = 'Categoría Superior';
|
||||
$lang->category_title = 'Nombre de la categoría';
|
||||
$lang->category_color = '분류 폰트색깔';
|
||||
$lang->expand = 'Expandir';
|
||||
$lang->category_group_srls = 'Limitar el grupo';
|
||||
$lang->cmd_make_child = 'Agregar sub categoría';
|
||||
$lang->cmd_enable_move_category = "Cambiar la posición de la categoría. (arrastrar y soltar luego de haber selecionado)";
|
||||
$lang->about_category_title = 'Ingresar el nombre de la categoría.';
|
||||
$lang->about_expand = 'Si seleccionas esta opción, siempre estará expandido.';
|
||||
$lang->about_category_group_srls = '선택하신 그룹만 현재 카테고리를 지정할 수 있도록 합니다';
|
||||
$lang->about_category_color = '분류 폰트색깔을 지정합니다.';
|
||||
|
||||
$lang->cmd_search_next = 'Buscar siguiente';
|
||||
|
||||
|
|
@ -49,4 +62,8 @@
|
|||
'last_update' => 'Día de la última actualización',
|
||||
'ipaddress' => 'Dirección IP',
|
||||
);
|
||||
$lang->alias = "Alias";
|
||||
$lang->history = "히스토리";
|
||||
$lang->about_use_history = "히스토리 기능의 사용여부를 지정합니다. 히스토리 기능을 사용할 경우 문서 수정시 이전 리비전을 기록하고 복원할 수 있습니다.";
|
||||
$lang->trace_only = "흔적만 남김";
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -12,6 +12,19 @@
|
|||
$lang->cmd_delete_all_thumbnail = 'Supprimer toutes les vignettes';
|
||||
$lang->title_bold = 'Gras';
|
||||
$lang->title_color = 'Couleur';
|
||||
$lang->new_document_count = '새글';
|
||||
|
||||
$lang->parent_category_title = 'catégorie supérieure';
|
||||
$lang->category_title = 'Catégorie';
|
||||
$lang->category_color = '분류 폰트색깔';
|
||||
$lang->expand = 'Etendre';
|
||||
$lang->category_group_srls = 'Groupe Accessible';
|
||||
$lang->cmd_make_child = 'Ajouter une catégorie inférieure';
|
||||
$lang->cmd_enable_move_category = "Bouger la position de la catégorie (Cochez la case et puis glisser la catégorie que vous voulez déplacer)";
|
||||
$lang->about_category_title = 'Entrez le nom de la catégorie, S.V.P.';
|
||||
$lang->about_expand = 'Si vous cochez la case à cocher, ce sera toujours tendu';
|
||||
$lang->about_category_group_srls = 'Le groupe choisi seulement pourra utiliser la catégorie courante';
|
||||
$lang->about_category_color = 'You can set font color of category.';
|
||||
|
||||
$lang->cmd_search_next = 'Recherche Suivante';
|
||||
|
||||
|
|
@ -50,4 +63,8 @@
|
|||
'last_update' => 'La Dernière Mise à Jour',
|
||||
'ipaddress' => 'Adresse IP',
|
||||
);
|
||||
$lang->alias = "Alias";
|
||||
$lang->history = "히스토리";
|
||||
$lang->about_use_history = "히스토리 기능의 사용여부를 지정합니다. 히스토리 기능을 사용할 경우 문서 수정시 이전 리비전을 기록하고 복원할 수 있습니다.";
|
||||
$lang->trace_only = "흔적만 남김";
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -12,6 +12,19 @@
|
|||
$lang->cmd_delete_all_thumbnail = 'すべてのサムネール削除';
|
||||
$lang->title_bold = 'タイトル太字';
|
||||
$lang->title_color = 'タイトルの色';
|
||||
$lang->new_document_count = '새글';
|
||||
|
||||
$lang->parent_category_title = '上位カテゴリ名';
|
||||
$lang->category_title = 'カテゴリ名';
|
||||
$lang->category_color = 'カテゴリフォント色';
|
||||
$lang->expand = '拡張表示';
|
||||
$lang->category_group_srls = 'グループ制限';
|
||||
$lang->cmd_make_child = '下位カテゴリ追加';
|
||||
$lang->cmd_enable_move_category = "カテゴリ位置変更(選択後上のメニューをドラッグして下さい)";
|
||||
$lang->about_category_title = 'カテゴリ名を入力して下さい。';
|
||||
$lang->about_expand = 'チェックすると常に展開された状態になります。';
|
||||
$lang->about_category_group_srls = '選択したグループのみ、現在のカテゴリの指定が出来ます。';
|
||||
$lang->about_category_color = 'カテゴリのフォント色を設定します。';
|
||||
|
||||
$lang->cmd_search_next = '継続検索';
|
||||
|
||||
|
|
@ -50,4 +63,8 @@
|
|||
'last_update' => '最近修正日',
|
||||
'ipaddress' => 'IPアドレス',
|
||||
);
|
||||
$lang->alias = "Alias";
|
||||
$lang->history = "히스토리";
|
||||
$lang->about_use_history = "히스토리 기능의 사용여부를 지정합니다. 히스토리 기능을 사용할 경우 문서 수정시 이전 리비전을 기록하고 복원할 수 있습니다.";
|
||||
$lang->trace_only = "흔적만 남김";
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -12,6 +12,21 @@
|
|||
$lang->cmd_delete_all_thumbnail = '썸네일 모두 삭제';
|
||||
$lang->title_bold = '제목 굵게';
|
||||
$lang->title_color = '제목 색깔';
|
||||
$lang->new_document_count = '새글';
|
||||
|
||||
$lang->parent_category_title = '상위 카테고리명';
|
||||
$lang->category_title = '분류명';
|
||||
$lang->category_color = '분류 폰트색깔';
|
||||
$lang->expand = '펼침';
|
||||
$lang->category_group_srls = '그룹제한';
|
||||
|
||||
$lang->cmd_make_child = '하위 카테고리 추가';
|
||||
$lang->cmd_enable_move_category = '카테고리 위치 변경 (선택후 위 메뉴를 드래그하세요)';
|
||||
|
||||
$lang->about_category_title = '카테고리 이름을 입력해주세요';
|
||||
$lang->about_expand = '선택하시면 늘 펼쳐진 상태로 있게 합니다';
|
||||
$lang->about_category_group_srls = '선택하신 그룹만 현재 카테고리를 지정할 수 있도록 합니다';
|
||||
$lang->about_category_color = '분류 폰트색깔을 지정합니다.';
|
||||
|
||||
$lang->cmd_search_next = '계속 검색';
|
||||
|
||||
|
|
@ -26,7 +41,7 @@
|
|||
$lang->msg_is_secret = '비밀글입니다';
|
||||
$lang->msg_checked_document_is_deleted = '%d개의 글이 삭제되었습니다';
|
||||
|
||||
$lang->move_target_module = "대상 모듈";
|
||||
$lang->move_target_module = '대상 모듈';
|
||||
|
||||
// 관리자 페이지에서 검색할 대상
|
||||
$lang->search_target_list = array(
|
||||
|
|
@ -50,4 +65,9 @@
|
|||
'last_update' => '최근수정일',
|
||||
'ipaddress' => 'IP 주소',
|
||||
);
|
||||
|
||||
$lang->alias = 'Alias';
|
||||
$lang->history = '히스토리';
|
||||
$lang->about_use_history = '히스토리 기능의 사용여부를 지정합니다. 히스토리 기능을 사용할 경우 문서 수정시 이전 리비전을 기록하고 복원할 수 있습니다.';
|
||||
$lang->trace_only = '흔적만 남김';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,18 @@
|
|||
$lang->move_target_module = "Переместить в";
|
||||
$lang->title_bold = 'Жирное название';
|
||||
$lang->title_color = 'Цвет названия';
|
||||
$lang->new_document_count = '새글';
|
||||
|
||||
$lang->parent_category_title = 'Родительская категория';
|
||||
$lang->category_title = 'Категория';
|
||||
$lang->category_color = '분류 폰트색깔';
|
||||
$lang->expand = 'Расширить';
|
||||
$lang->category_group_srls = 'Доступные группы';
|
||||
$lang->about_category_title = 'Пожалуйста, введите название категории';
|
||||
$lang->about_expand = 'Если эта опция выбрана, расширение будут применено всегда';
|
||||
$lang->about_category_group_srls = '선택하신 그룹만 현재 카테고리를 지정할 수 있도록 합니다';
|
||||
|
||||
$lang->about_category_color = '분류 폰트색깔을 지정합니다.';
|
||||
$lang->cmd_temp_save = 'Сохранить временно';
|
||||
|
||||
$lang->cmd_toggle_checked_document = 'Перевернуть выбранные объекты';
|
||||
|
|
@ -47,4 +58,8 @@
|
|||
'last_update' => 'Последнее Обновление',
|
||||
'ipaddress' => 'IP-Адрес',
|
||||
);
|
||||
$lang->alias = "Alias";
|
||||
$lang->history = "히스토리";
|
||||
$lang->about_use_history = "히스토리 기능의 사용여부를 지정합니다. 히스토리 기능을 사용할 경우 문서 수정시 이전 리비전을 기록하고 복원할 수 있습니다.";
|
||||
$lang->trace_only = "흔적만 남김";
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -13,6 +13,19 @@
|
|||
$lang->move_target_module = "移动目标模块";
|
||||
$lang->title_bold = '粗标题';
|
||||
$lang->title_color = '标题颜色';
|
||||
$lang->new_document_count = '新帖';
|
||||
|
||||
$lang->parent_category_title = '上级分类名';
|
||||
$lang->category_title = '分类名';
|
||||
$lang->category_color = '分类颜色';
|
||||
$lang->expand = '展开';
|
||||
$lang->category_group_srls = '用户组';
|
||||
$lang->cmd_make_child = '添加下级分类';
|
||||
$lang->cmd_enable_move_category = "分类顺序(勾选后用鼠标拖动分类项)";
|
||||
$lang->about_category_title = '请输入分类名。';
|
||||
$lang->about_expand = '选择此项将维持展开状态。';
|
||||
$lang->about_category_group_srls = '所选用户组才可以查看此分类。';
|
||||
$lang->about_category_color = '请指定分类颜色(必须带#符号)。ex)#ff0000';
|
||||
|
||||
$lang->cmd_search_next = '继续搜索';
|
||||
|
||||
|
|
@ -49,4 +62,8 @@
|
|||
'last_update' => '最近更新日期',
|
||||
'ipaddress' => 'IP 地址',
|
||||
);
|
||||
$lang->alias = "Alias";
|
||||
$lang->history = "编辑记录";
|
||||
$lang->about_use_history = "设置启用编辑记录与否。启用将记录修改主题版本,并可以复原。";
|
||||
$lang->trace_only = "只留痕迹";
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -10,9 +10,23 @@
|
|||
$lang->thumbnail_crop = '裁減';
|
||||
$lang->thumbnail_ratio = '比例';
|
||||
$lang->cmd_delete_all_thumbnail = '刪除全部縮圖';
|
||||
$lang->move_target_module = "移到";
|
||||
$lang->title_bold = '粗體';
|
||||
$lang->title_color = '標題顏色';
|
||||
$lang->new_document_count = 'N';
|
||||
|
||||
$lang->parent_category_title = '主分類';
|
||||
$lang->category_title = '分類名稱';
|
||||
$lang->category_color = '分類顏色';
|
||||
$lang->expand = '展開';
|
||||
$lang->category_group_srls = '群組';
|
||||
|
||||
$lang->cmd_make_child = '新增子分類';
|
||||
$lang->cmd_enable_move_category = '分類順序(勾選後用滑鼠拖曳分類項目)';
|
||||
|
||||
$lang->about_category_title = '請輸入分類名稱。';
|
||||
$lang->about_expand = '選擇此項將維持展開狀態。';
|
||||
$lang->about_category_group_srls = '被選擇的群組才可以檢視此分類。';
|
||||
$lang->about_category_color = '設定分類顏色。例)#ff0000';
|
||||
|
||||
$lang->cmd_search_next = '繼續搜尋';
|
||||
|
||||
|
|
@ -27,7 +41,9 @@
|
|||
$lang->msg_is_secret = '秘密!';
|
||||
$lang->msg_checked_document_is_deleted = '刪除了%d個文章。';
|
||||
|
||||
// 管理頁面尋找的對象
|
||||
$lang->move_target_module = '移到';
|
||||
|
||||
// 管理頁面搜尋的目標
|
||||
$lang->search_target_list = array(
|
||||
'title' => '標題',
|
||||
'content' => '內容',
|
||||
|
|
@ -47,6 +63,11 @@
|
|||
'uploaded_count ' => '上傳檔案數(以上)',
|
||||
'regdate' => '登錄日期',
|
||||
'last_update' => '最近更新日期',
|
||||
'ipaddress' => 'IP 位址',
|
||||
'ipaddress' => 'IP位址',
|
||||
);
|
||||
|
||||
$lang->alias = "別名";
|
||||
$lang->history = "歷史紀錄";
|
||||
$lang->about_use_history = "選擇是否使用歷史記錄功能。選擇使用,將能夠編輯歷史紀錄並還原。";
|
||||
$lang->trace_only = "追蹤";
|
||||
?>
|
||||
|
|
|
|||
10
modules/document/queries/deleteAlias.xml
Normal file
10
modules/document/queries/deleteAlias.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<query id="deleteAlias" action="delete">
|
||||
<tables>
|
||||
<table name="document_aliases" />
|
||||
</tables>
|
||||
<conditions>
|
||||
<condition operation="equal" column="alias_srl" var="alias_srl" filter="number" />
|
||||
<condition operation="equal" column="document_srl" var="document_srl" filter="number" pipe="and" />
|
||||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
10
modules/document/queries/deleteDocumentExtraKeys.xml
Normal file
10
modules/document/queries/deleteDocumentExtraKeys.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<query id="deleteDocumentExtraKeys" action="delete">
|
||||
<tables>
|
||||
<table name="document_extra_keys" />
|
||||
</tables>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" notnull="notnull" />
|
||||
<condition operation="equal" column="document_srl" var="document_srl" filter="number" pipe="and" />
|
||||
<condition operation="equal" column="var_idx" var="var_idx" filter="number" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
10
modules/document/queries/deleteDocumentExtraVars.xml
Normal file
10
modules/document/queries/deleteDocumentExtraVars.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<query id="deleteDocumentExtraVars" action="delete">
|
||||
<tables>
|
||||
<table name="document_extra_vars" />
|
||||
</tables>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" notnull="notnull" />
|
||||
<condition operation="equal" column="document_srl" var="document_srl" filter="number" pipe="and" />
|
||||
<condition operation="equal" column="var_idx" var="var_idx" filter="number" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
10
modules/document/queries/deleteHistory.xml
Normal file
10
modules/document/queries/deleteHistory.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<query id="deleteHistory" action="delete">
|
||||
<tables>
|
||||
<table name="document_histories" />
|
||||
</tables>
|
||||
<conditions>
|
||||
<condition operation="equal" column="history_srl" var="history_srl" filter="number" />
|
||||
<condition operation="equal" column="document_srl" var="document_srl" filter="number" pipe="and" />
|
||||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
11
modules/document/queries/getAliases.xml
Normal file
11
modules/document/queries/getAliases.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="getAliases" action="select">
|
||||
<tables>
|
||||
<table name="document_aliases" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="document_srl" var="document_srl" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
22
modules/document/queries/getDocumentExtraKeys.xml
Normal file
22
modules/document/queries/getDocumentExtraKeys.xml
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<query id="getDocumentExtraKeys" action="select">
|
||||
<tables>
|
||||
<table name="document_extra_keys" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="module_srl" alias="module_srl" />
|
||||
<column name="var_idx" alias="idx" />
|
||||
<column name="var_name" alias="name" />
|
||||
<column name="var_type" alias="type" />
|
||||
<column name="var_is_required" alias="is_required" />
|
||||
<column name="var_search" alias="search" />
|
||||
<column name="var_default" alias="default" />
|
||||
<column name="var_desc" alias="desc" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" notnull="notnull" />
|
||||
<condition operation="equal" column="var_idx" var="var_idx" filter="number" pipe="and" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="var_idx" order="asc" />
|
||||
</navigation>
|
||||
</query>
|
||||
33
modules/document/queries/getDocumentExtraVars.xml
Normal file
33
modules/document/queries/getDocumentExtraVars.xml
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<query id="getDocumentExtraVars" action="select">
|
||||
<tables>
|
||||
<table name="document_extra_keys" alias="extra_keys" />
|
||||
<table name="document_extra_vars" alias="extra_vars" type="left join">
|
||||
<conditions>
|
||||
<condition operation="equal" column="extra_vars.module_srl" default="extra_keys.module_srl" />
|
||||
<condition operation="equal" column="extra_vars.document_srl" var="document_srl" pipe="and" notnull="notnull" />
|
||||
<condition operation="equal" column="extra_vars.var_idx" default="extra_keys.var_idx" pipe="and" />
|
||||
<condition operation="equal" column="extra_vars.lang_code" var="lang_code" pipe="and" />
|
||||
</conditions>
|
||||
</table>
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="extra_keys.module_srl" alias="module_srl" />
|
||||
<column name="extra_keys.var_idx" alias="idx" />
|
||||
<column name="extra_keys.var_name" alias="name" />
|
||||
<column name="extra_keys.var_type" alias="type" />
|
||||
<column name="extra_keys.var_is_required" alias="is_required" />
|
||||
<column name="extra_keys.var_search" alias="search" />
|
||||
<column name="extra_keys.var_default" alias="default" />
|
||||
<column name="extra_keys.var_desc" alias="desc" />
|
||||
<column name="extra_vars.document_srl" alias="document_srl" />
|
||||
<column name="extra_vars.lang_code" alias="lang_code" />
|
||||
<column name="extra_vars.value" alias="value" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="extra_keys.module_srl" var="module_srl" pipe="and" notnull="notnull" />
|
||||
<condition operation="equal" column="extra_keys.var_idx" var="var_idx" pipe="and" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="extra_keys.var_idx" order="asc" />
|
||||
</navigation>
|
||||
</query>
|
||||
|
|
@ -33,26 +33,6 @@
|
|||
<condition operation="like_prefix" column="regdate" var="s_regdate" pipe="or" />
|
||||
<condition operation="like_prefix" column="last_update" var="s_last_update" pipe="or" />
|
||||
<condition operation="like_prefix" column="ipaddress" var="s_ipaddress" pipe="or" />
|
||||
<condition operation="like" column="extra_vars1" var="s_extra_vars1" pipe="or" />
|
||||
<condition operation="like" column="extra_vars2" var="s_extra_vars2" pipe="or" />
|
||||
<condition operation="like" column="extra_vars3" var="s_extra_vars3" pipe="or" />
|
||||
<condition operation="like" column="extra_vars4" var="s_extra_vars4" pipe="or" />
|
||||
<condition operation="like" column="extra_vars5" var="s_extra_vars5" pipe="or" />
|
||||
<condition operation="like" column="extra_vars6" var="s_extra_vars6" pipe="or" />
|
||||
<condition operation="like" column="extra_vars7" var="s_extra_vars7" pipe="or" />
|
||||
<condition operation="like" column="extra_vars8" var="s_extra_vars8" pipe="or" />
|
||||
<condition operation="like" column="extra_vars9" var="s_extra_vars9" pipe="or" />
|
||||
<condition operation="like" column="extra_vars10" var="s_extra_vars10" pipe="or" />
|
||||
<condition operation="like" column="extra_vars11" var="s_extra_vars11" pipe="or" />
|
||||
<condition operation="like" column="extra_vars12" var="s_extra_vars12" pipe="or" />
|
||||
<condition operation="like" column="extra_vars13" var="s_extra_vars13" pipe="or" />
|
||||
<condition operation="like" column="extra_vars14" var="s_extra_vars14" pipe="or" />
|
||||
<condition operation="like" column="extra_vars15" var="s_extra_vars15" pipe="or" />
|
||||
<condition operation="like" column="extra_vars16" var="s_extra_vars16" pipe="or" />
|
||||
<condition operation="like" column="extra_vars17" var="s_extra_vars17" pipe="or" />
|
||||
<condition operation="like" column="extra_vars18" var="s_extra_vars18" pipe="or" />
|
||||
<condition operation="like" column="extra_vars19" var="s_extra_vars19" pipe="or" />
|
||||
<condition operation="like" column="extra_vars20" var="s_extra_vars20" pipe="or" />
|
||||
</group>
|
||||
<group pipe="and">
|
||||
<condition operation="more" column="last_update" var="start_date" pipe="and" />
|
||||
|
|
|
|||
23
modules/document/queries/getDocumentListWithExtraVars.xml
Normal file
23
modules/document/queries/getDocumentListWithExtraVars.xml
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<query id="getDocumentListWithExtraVars" action="select">
|
||||
<tables>
|
||||
<table name="documents" />
|
||||
<table name="document_extra_vars" alias="extra_vars" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="documents.*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="in" column="documents.module_srl" var="module_srl" filter="number" />
|
||||
<condition operation="in" column="documents.category_srl" var="category_srl" filter="number" pipe="and" />
|
||||
<condition operation="equal" column="extra_vars.module_srl" default="documents.module_srl" pipe="and" />
|
||||
<condition operation="equal" column="extra_vars.document_srl" default="documents.document_srl" pipe="and" />
|
||||
<condition operation="equal" column="extra_vars.var_idx" var="var_idx" notnull="notnull" pipe="and" />
|
||||
<condition operation="like" column="extra_vars.value" var="var_value" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="documents.list_order" order="order_type" />
|
||||
<list_count var="list_count" default="20" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
</navigation>
|
||||
</query>
|
||||
11
modules/document/queries/getDocumentMaxExtraKeyIdx.xml
Normal file
11
modules/document/queries/getDocumentMaxExtraKeyIdx.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="getDocumentMaxExtraKeyIdx" action="select">
|
||||
<tables>
|
||||
<table name="document_extra_keys" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="max(var_idx)" alias="var_idx" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
14
modules/document/queries/getDocumentSrlByAlias.xml
Normal file
14
modules/document/queries/getDocumentSrlByAlias.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<query id="getDocumentSrlByAlias" action="select">
|
||||
<tables>
|
||||
<table name="document_aliases" />
|
||||
<table name="modules" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="document_srl" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="alias_title" var="alias_title" filter="number" notnull="notnull" />
|
||||
<condition operation="equal" column="modules.mid" var="mid" filter="number" notnull="notnull" pipe="and" />
|
||||
<condition operation="equal" column="modules.module_srl" var="document_aliases.module_srl" filter="number" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
15
modules/document/queries/getHistories.xml
Normal file
15
modules/document/queries/getHistories.xml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<query id="getHistories" action="select">
|
||||
<tables>
|
||||
<table name="document_histories" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="history_srl" />
|
||||
<column name="nick_name" />
|
||||
<column name="member_srl" />
|
||||
<column name="regdate" />
|
||||
<column name="ipaddress" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="document_srl" var="document_srl" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
11
modules/document/queries/insertAlias.xml
Normal file
11
modules/document/queries/insertAlias.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="insertAlias" action="insert">
|
||||
<tables>
|
||||
<table name="document_aliases" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="module_srl" var="module_srl" filter="number" default="0" notnull="notnull" />
|
||||
<column name="document_srl" var="document_srl" filter="number" default="0" notnull="notnull" />
|
||||
<column name="alias_title" var="alias_title" notnull="notnull" minlength="1" maxlength="250" />
|
||||
<column name="alias_srl" var="alias_srl" filter="number" default="0" notnull="notnull" />
|
||||
</columns>
|
||||
</query>
|
||||
|
|
@ -36,25 +36,5 @@
|
|||
<column name="lock_comment" var="lock_comment" default="N" />
|
||||
<column name="allow_trackback" var="allow_trackback" default="Y" />
|
||||
<column name="notify_message" var="notify_message" default="N" />
|
||||
<column name="extra_vars1" var="extra_vars1" />
|
||||
<column name="extra_vars2" var="extra_vars2" />
|
||||
<column name="extra_vars3" var="extra_vars3" />
|
||||
<column name="extra_vars4" var="extra_vars4" />
|
||||
<column name="extra_vars5" var="extra_vars5" />
|
||||
<column name="extra_vars6" var="extra_vars6" />
|
||||
<column name="extra_vars7" var="extra_vars7" />
|
||||
<column name="extra_vars8" var="extra_vars8" />
|
||||
<column name="extra_vars9" var="extra_vars9" />
|
||||
<column name="extra_vars10" var="extra_vars10" />
|
||||
<column name="extra_vars11" var="extra_vars11" />
|
||||
<column name="extra_vars12" var="extra_vars12" />
|
||||
<column name="extra_vars13" var="extra_vars13" />
|
||||
<column name="extra_vars14" var="extra_vars14" />
|
||||
<column name="extra_vars15" var="extra_vars15" />
|
||||
<column name="extra_vars16" var="extra_vars16" />
|
||||
<column name="extra_vars17" var="extra_vars17" />
|
||||
<column name="extra_vars18" var="extra_vars18" />
|
||||
<column name="extra_vars19" var="extra_vars19" />
|
||||
<column name="extra_vars20" var="extra_vars20" />
|
||||
</columns>
|
||||
</query>
|
||||
|
|
|
|||
15
modules/document/queries/insertDocumentExtraKey.xml
Normal file
15
modules/document/queries/insertDocumentExtraKey.xml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<query id="insertDocumentExtraKeys" action="insert">
|
||||
<tables>
|
||||
<table name="document_extra_keys" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="module_srl" var="module_srl" filter="number" notnull="notnull" />
|
||||
<column name="var_idx" var="var_idx" filter="number" notnull="notnull" />
|
||||
<column name="var_name" var="var_name" notnull="notnull" />
|
||||
<column name="var_type" var="var_type" notnull="notnull" />
|
||||
<column name="var_is_required" var="var_is_required" default="N" notnull="notnull" />
|
||||
<column name="var_search" var="var_search" default="N" notnull="notnull" />
|
||||
<column name="var_default" var="var_default" notnull="notnull" />
|
||||
<column name="var_desc" var="var_desc" notnull="notnull" />
|
||||
</columns>
|
||||
</query>
|
||||
12
modules/document/queries/insertDocumentExtraVar.xml
Normal file
12
modules/document/queries/insertDocumentExtraVar.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<query id="insertDocumentExtraVar" action="insert">
|
||||
<tables>
|
||||
<table name="document_extra_vars" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="module_srl" var="module_srl" filter="number" notnull="notnull" />
|
||||
<column name="document_srl" var="document_srl" filter="number" notnull="notnull" />
|
||||
<column name="var_idx" var="var_idx" filter="number" notnull="notnull" />
|
||||
<column name="value" var="value" notnull="notnull" />
|
||||
<column name="lang_code" var="lang_code" />
|
||||
</columns>
|
||||
</query>
|
||||
15
modules/document/queries/insertHistory.xml
Normal file
15
modules/document/queries/insertHistory.xml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<query id="insertHistory" action="insert">
|
||||
<tables>
|
||||
<table name="document_histories" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="history_srl" var="history_srl" filter="number" notnull="notnull" />
|
||||
<column name="module_srl" var="module_srl" filter="number" notnull="notnull" />
|
||||
<column name="document_srl" var="document_srl" filter="number" notnull="notnull" />
|
||||
<column name="content" var="content" />
|
||||
<column name="nick_name" var="nick_name" notnull="notnull" minlength="1" maxlength="40" />
|
||||
<column name="member_srl" var="member_srl" filter="number" notnull="notnull" />
|
||||
<column name="regdate" var="regdate" notnull="notnull" />
|
||||
<column name="ipaddress" var="ipaddress" notnull="notnull" />
|
||||
</columns>
|
||||
</query>
|
||||
|
|
@ -28,26 +28,6 @@
|
|||
<column name="lock_comment" var="lock_comment" default="N" />
|
||||
<column name="allow_trackback" var="allow_trackback" default="Y" />
|
||||
<column name="notify_message" var="notify_message" default="N" />
|
||||
<column name="extra_vars1" var="extra_vars1" />
|
||||
<column name="extra_vars2" var="extra_vars2" />
|
||||
<column name="extra_vars3" var="extra_vars3" />
|
||||
<column name="extra_vars4" var="extra_vars4" />
|
||||
<column name="extra_vars5" var="extra_vars5" />
|
||||
<column name="extra_vars6" var="extra_vars6" />
|
||||
<column name="extra_vars7" var="extra_vars7" />
|
||||
<column name="extra_vars8" var="extra_vars8" />
|
||||
<column name="extra_vars9" var="extra_vars9" />
|
||||
<column name="extra_vars10" var="extra_vars10" />
|
||||
<column name="extra_vars11" var="extra_vars11" />
|
||||
<column name="extra_vars12" var="extra_vars12" />
|
||||
<column name="extra_vars13" var="extra_vars13" />
|
||||
<column name="extra_vars14" var="extra_vars14" />
|
||||
<column name="extra_vars15" var="extra_vars15" />
|
||||
<column name="extra_vars16" var="extra_vars16" />
|
||||
<column name="extra_vars17" var="extra_vars17" />
|
||||
<column name="extra_vars18" var="extra_vars18" />
|
||||
<column name="extra_vars19" var="extra_vars19" />
|
||||
<column name="extra_vars20" var="extra_vars20" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="document_srl" var="document_srl" filter="number" notnull="notnull" />
|
||||
|
|
|
|||
17
modules/document/queries/updateDocumentExtraKey.xml
Normal file
17
modules/document/queries/updateDocumentExtraKey.xml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<query id="updateDocumentExtraKey" action="update">
|
||||
<tables>
|
||||
<table name="document_extra_keys" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="var_name" var="var_name" notnull="notnull" />
|
||||
<column name="var_type" var="var_type" notnull="notnull" />
|
||||
<column name="var_is_required" var="var_is_required" default="N" notnull="notnull" />
|
||||
<column name="var_search" var="var_search" default="N" notnull="notnull" />
|
||||
<column name="var_default" var="var_default" notnull="notnull" />
|
||||
<column name="var_desc" var="var_desc" notnull="notnull" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" notnull="notnull" />
|
||||
<condition operation="equal" column="var_idx" var="var_idx" filter="number" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
12
modules/document/queries/updateDocumentExtraKeyIdx.xml
Normal file
12
modules/document/queries/updateDocumentExtraKeyIdx.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<query id="updateDocumentExtraKeyIdx" action="update">
|
||||
<tables>
|
||||
<table name="document_extra_keys" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="var_idx" var="new_idx" notnull="notnull" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" notnull="notnull" />
|
||||
<condition operation="equal" column="var_idx" var="var_idx" filter="number" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
14
modules/document/queries/updateDocumentExtraVar.xml
Normal file
14
modules/document/queries/updateDocumentExtraVar.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<query id="updateDocumentExtraVar" action="update">
|
||||
<tables>
|
||||
<table name="document_extra_vars" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="value" var="value" notnull="notnull" />
|
||||
<column name="lang_code" var="lang_code" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" notnull="notnull" />
|
||||
<condition operation="equal" column="document_srl" var="document_srl" filter="number" notnull="notnull" pipe="and" />
|
||||
<condition operation="equal" column="var_idx" var="var_idx" filter="number" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
12
modules/document/queries/updateDocumentExtraVarIdx.xml
Normal file
12
modules/document/queries/updateDocumentExtraVarIdx.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<query id="updateDocumentExtraVarIdx" action="update">
|
||||
<tables>
|
||||
<table name="document_extra_vars" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="var_idx" var="new_idx" notnull="notnull" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" notnull="notnull" />
|
||||
<condition operation="equal" column="var_idx" var="var_idx" filter="number" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
6
modules/document/schemas/document_aliases.xml
Normal file
6
modules/document/schemas/document_aliases.xml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<table name="document_aliases">
|
||||
<column name="alias_srl" type="number" size="11" default="0" notnull="notnull" primary_key="primary_key" />
|
||||
<column name="module_srl" type="number" size="11" default="0" notnull="notnull" index="idx_module_srl" />
|
||||
<column name="document_srl" type="number" size="11" default="0" notnull="notnull" index="idx_document_srl" />
|
||||
<column name="alias_title" type="varchar" size="250" notnull="notnull" index="idx_alias_title" />
|
||||
</table>
|
||||
10
modules/document/schemas/document_extra_keys.xml
Normal file
10
modules/document/schemas/document_extra_keys.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<table name="document_extra_keys">
|
||||
<column name="module_srl" type="number" size="11" notnull="notnull" unique="unique_module_keys" />
|
||||
<column name="var_idx" type="number" size="11" notnull="notnull" unique="unique_module_keys" />
|
||||
<column name="var_name" type="varchar" size="250" notnull="notnull" />
|
||||
<column name="var_type" type="varchar" size="50" notnull="notnull" />
|
||||
<column name="var_is_required" type="char" size="1" default="N" notnull="notnull" />
|
||||
<column name="var_search" type="char" size="1" default="N" notnull="notnull" />
|
||||
<column name="var_default" type="text" />
|
||||
<column name="var_desc" type="text" />
|
||||
</table>
|
||||
7
modules/document/schemas/document_extra_vars.xml
Normal file
7
modules/document/schemas/document_extra_vars.xml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<table name="document_extra_vars">
|
||||
<column name="module_srl" type="number" size="11" notnull="notnull" unique="unique_module_vars" />
|
||||
<column name="document_srl" type="number" size="11" notnull="notnull" unique="unique_module_vars" />
|
||||
<column name="var_idx" type="number" size="11" notnull="notnull" unique="unique_module_vars" />
|
||||
<column name="lang_code" type="varchar" size="10" notnull="notnull" unique="unique_module_vars" />
|
||||
<column name="value" type="bigtext" />
|
||||
</table>
|
||||
10
modules/document/schemas/document_histories.xml
Normal file
10
modules/document/schemas/document_histories.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<table name="document_histories">
|
||||
<column name="history_srl" type="number" size="11" default="0" notnull="notnull" primary_key="primary_key" />
|
||||
<column name="module_srl" type="number" size="11" default="0" notnull="notnull" index="idx_module_srl" />
|
||||
<column name="document_srl" type="number" size="11" default="0" notnull="notnull" index="idx_document_srl" />
|
||||
<column name="content" type="bigtext" />
|
||||
<column name="nick_name" type="varchar" size="80" notnull="notnull" />
|
||||
<column name="member_srl" type="number" size="11" />
|
||||
<column name="regdate" type="date" index="idx_regdate" />
|
||||
<column name="ipaddress" type="varchar" size="128" notnull="notnull" index="idx_ipaddress"/>
|
||||
</table>
|
||||
|
|
@ -33,24 +33,4 @@
|
|||
<column name="lock_comment" type="char" size="1" default="N" notnull="notnull" />
|
||||
<column name="allow_trackback" type="char" size="1" default="Y" notnull="notnull" />
|
||||
<column name="notify_message" type="char" size="1" default="N" notnull="notnull" />
|
||||
<column name="extra_vars1" type="text" />
|
||||
<column name="extra_vars2" type="text" />
|
||||
<column name="extra_vars3" type="text" />
|
||||
<column name="extra_vars4" type="text" />
|
||||
<column name="extra_vars5" type="text" />
|
||||
<column name="extra_vars6" type="text" />
|
||||
<column name="extra_vars7" type="text" />
|
||||
<column name="extra_vars8" type="text" />
|
||||
<column name="extra_vars9" type="text" />
|
||||
<column name="extra_vars10" type="text" />
|
||||
<column name="extra_vars11" type="text" />
|
||||
<column name="extra_vars12" type="text" />
|
||||
<column name="extra_vars13" type="text" />
|
||||
<column name="extra_vars14" type="text" />
|
||||
<column name="extra_vars15" type="text" />
|
||||
<column name="extra_vars16" type="text" />
|
||||
<column name="extra_vars17" type="text" />
|
||||
<column name="extra_vars18" type="text" />
|
||||
<column name="extra_vars19" type="text" />
|
||||
<column name="extra_vars20" type="text" />
|
||||
</table>
|
||||
|
|
|
|||
56
modules/document/tpl/category_info.html
Normal file
56
modules/document/tpl/category_info.html
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<input type="hidden" name="category_srl" value="{$category_info->category_srl}" />
|
||||
<input type="hidden" name="parent_srl" value="{$category_info->parent_srl}" />
|
||||
|
||||
<div class="layer boxModelController" style="display:block">
|
||||
|
||||
<h4 class="xeAdmin">{$lang->category}</h4>
|
||||
<button class="xButton" type="button" onclick="hideCategoryInfo();return false" ><span>{$lang->cmd_close}</span></button>
|
||||
|
||||
<div class="layerBody">
|
||||
|
||||
<table cellspacing="0" class="rowTable">
|
||||
<!--@if($category_info->parent_category_title)-->
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->parent_category_title}</div></th>
|
||||
<td class="wide">{$category_info->parent_category_title}</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->category_title}</div></th>
|
||||
<td>
|
||||
<input type="text" name="category_title" id="category_name" value="{$category_info->title}" class="inputTypeText" />
|
||||
<a href="{getUrl('','module','module','act','dispModuleAdminLangcode','target','category_name')}" onclick="popopen(this.href);return false;" class="buttonSet buttonSetting"><span>{$lang->cmd_find_langcode}</span></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->category_color}</div></th>
|
||||
<td>
|
||||
<input type="text" name="category_color" value="{htmlspecialchars($category_info->color)}" class="inputTypeText" />
|
||||
<p>{$lang->about_category_color}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->expand}</div></th>
|
||||
<td>
|
||||
<input type="checkbox" name="expand" value="Y" <!--@if($category_info->expand=="Y")-->checked="checked"<!--@end--> class="checkbox" />
|
||||
<p>{$lang->about_expand}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr >
|
||||
<th scope="row2"><div>{$lang->category_group_srls} <input type="checkbox" onclick="XE.checkboxToggleAll('group_srls'); return false;" /></div></th>
|
||||
<td>
|
||||
<!--@foreach($group_list as $key=>$val)-->
|
||||
<div><input type="checkbox" name="group_srls" value="{$key}" id="group_{$key}" <!--@if(is_array($category_info->group_srls)&&in_array($key, $category_info->group_srls))-->checked="checked"<!--@end--> class="checkbox" /> <label for="group_{$key}">{$val->title}</label></div>
|
||||
<!--@end-->
|
||||
<p>{$lang->about_category_group_srls}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" colspan="2" class="button">
|
||||
<span class="button black strong"><input type="submit" value="{$lang->cmd_save}" /></span>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
38
modules/document/tpl/category_list.html
Normal file
38
modules/document/tpl/category_list.html
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<!--%import("filter/insert_category.xml")-->
|
||||
<!--%import("filter/delete_category.xml")-->
|
||||
<!--%import("filter/move_category.xml")-->
|
||||
|
||||
<!--// tree javascript plugin load -->
|
||||
<!--%load_js_plugin("ui.tree")-->
|
||||
|
||||
<!--%import("js/document_category.js")-->
|
||||
<!--%import("css/document.css")-->
|
||||
|
||||
<script type="text/javascript">
|
||||
var category_title = "{$lang->category}";
|
||||
</script>
|
||||
|
||||
<span style="float:right"><a href="#" onclick="doReloadTreeCategory('{$module_info->module_srl}');return false;" class="button black"><span>{$lang->cmd_remake_cache}</span></a></span>
|
||||
|
||||
<div class="gap1">
|
||||
<form id="fo_category" action="./" method="get" onsubmit="return procFilter(this, insert_category)">
|
||||
<input type="hidden" name="module_srl" value="{$module_info->module_srl}" />
|
||||
<input type="hidden" name="xml_file" value="{$category_xml_file}" />
|
||||
<div id="category_info"></div>
|
||||
</form>
|
||||
<div id="menu">
|
||||
<ul class="simpleTree">
|
||||
<li class="root" id='tree_0'><span>{$lang->category}</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var simpleTreeCollection;
|
||||
var max_menu_depth = 999;
|
||||
var lang_confirm_delete = "{$lang->confirm_delete}";
|
||||
var xml_url = "{$category_xml_file}";
|
||||
doCategoryFormMove();
|
||||
Tree(xml_url);
|
||||
</script>
|
||||
|
|
@ -1,15 +1,15 @@
|
|||
<!--%import("filter/manage_checked_document.xml")-->
|
||||
<!--%import("js/document_admin.js")-->
|
||||
<!--%import("css/document.css")-->
|
||||
<div id="popHeadder">
|
||||
<h3>{$lang->cmd_manage_document}</h3>
|
||||
<div id="popHeader" class="wide">
|
||||
<h3 class="xeAdmin">{$lang->cmd_manage_document}</h3>
|
||||
</div>
|
||||
|
||||
<form action="./" method="get" id="fo_management">
|
||||
<input type="hidden" name="type" value="" />
|
||||
|
||||
<div id="popBody">
|
||||
<table cellspacing="0" class="adminTable">
|
||||
<table cellspacing="0" class="rowTable">
|
||||
<tr>
|
||||
<th scope="row"><div><label for="textfield1">{$lang->checked_count} ({count($document_list)})</label></div></th>
|
||||
<td>
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
<th scope="row"><div>{$lang->move_target_module}</div></th>
|
||||
<td>
|
||||
<input type="hidden" name="target_module" id="target_module" value="" />
|
||||
<input type="text" name="_target_module" id="_target_module" class="inputTypeText w300" value="" /><a href="{getUrl('','module','module','act','dispModuleAdminSelectList','id','target_module','type','single')}" onclick="popopen(this.href,'ModuleSelect');return false;" class="button green"><span>{$lang->cmd_select}</span></a>
|
||||
<input type="text" name="_target_module" id="_target_module" class="inputTypeText w300" value="" readonly="readonly" /><a href="{getUrl('','module','module','act','dispModuleSelectList','id','target_module','type','single')}" onclick="popopen(this.href,'ModuleSelect');return false;" class="button green"><span>{$lang->cmd_select}</span></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
@ -50,18 +50,13 @@
|
|||
</table>
|
||||
</div>
|
||||
|
||||
<!--@if(count($document_list))-->
|
||||
<div id="popFooter">
|
||||
<div class="tRight gap1">
|
||||
<!--@if(count($document_list))-->
|
||||
|
||||
<a href="#" onclick="doManageDocument('move');return false;" class="button blue"><span>{$lang->cmd_move}</span></a>
|
||||
<a href="#" onclick="doManageDocument('copy');return false;" class="button green"><span>{$lang->cmd_copy}</span></a>
|
||||
|
||||
<a href="#" onclick="doManageDocument('delete');return false;" class="button red"><span>{$lang->cmd_delete}</span></a>
|
||||
<!--@end-->
|
||||
<a href="#" onclick="window.close(); return false;" class="button black"><span>{$lang->cmd_close}</span></a>
|
||||
</div>
|
||||
<a href="#" onclick="doManageDocument('delete');return false;" class="button black strong"><span>{$lang->cmd_delete}</span></a>
|
||||
<a href="#" onclick="doManageDocument('move');return false;" class="button blue"><span>{$lang->cmd_move}</span></a>
|
||||
<a href="#" onclick="doManageDocument('copy');return false;" class="button green"><span>{$lang->cmd_copy}</span></a>
|
||||
</div>
|
||||
<!--@end-->
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function() { doGetCategoryFromModule(jQuery('#target_module').get(0)); } );
|
||||
|
|
|
|||
|
|
@ -1,8 +1,20 @@
|
|||
@charset "utf-8";
|
||||
|
||||
ul.document_list_box { margin:0; padding:0; list-style:none; }
|
||||
.document_list_box { height:230px; overflow-y:scroll; overflow-x:hidden;}
|
||||
.document_list_box { height:160px; overflow-y:scroll; overflow-x:hidden;}
|
||||
.document_list { margin-top:.5em; overflow:hidden; white-space:nowrap; clear:both;}
|
||||
.document_list input { float:left; margin-right:10px; }
|
||||
.document_list address { float:left; width:100px; margin-right:10px; overflow:hidden; white-space:nowrap;}
|
||||
.document_list .document_title { }
|
||||
|
||||
div.printContent { padding:20px; }
|
||||
input.btnSubmit { background:url("../images/buttonInsert.gif") no-repeat 3px 2px; line-height:150%; height:23px; padding:2px 3px 2px 18px; border:1px solid; border-color:#d8d8d8 #a6a6a6 #a6a6a6 #d8d8d8; }
|
||||
|
||||
#menu {margin:10px; }
|
||||
|
||||
.menuListZone { table-layout:fixed; }
|
||||
.menuListZone td { vertical-align:top; }
|
||||
.menuListZone td.category_zone { padding-right:10px; }
|
||||
|
||||
#category_list { padding:.5em 0 .5em 0; margin-bottom:2em; width:250px; overflow:hidden; float:left; position:absolute; left:10px;}
|
||||
#category_info { width:560px; position:absolute; margin:0 auto; left:0; right:0; z-index:9999;}
|
||||
|
|
|
|||
|
|
@ -2,17 +2,12 @@
|
|||
<!--%import("filter/manage_checked_document.xml")-->
|
||||
<!--#include("header.html")-->
|
||||
|
||||
|
||||
<!-- 정보 -->
|
||||
<div class="summary">
|
||||
<strong>Total</strong> <em>{number_format($total_count)}</em>, Page <strong>{number_format($page)}</strong>/{number_format($total_page)}
|
||||
</div>
|
||||
|
||||
<form id="fo_list" action="./" method="get" onsubmit="return procFilter(this, delete_checked)">
|
||||
<input type="hidden" name="page" value="{$page}" />
|
||||
|
||||
<!-- 목록 -->
|
||||
<table cellspacing="0" class="adminTable">
|
||||
<table cellspacing="0" class="rowTable">
|
||||
<caption>Total {number_format($total_count)}, Page {number_format($page)}/{number_format($total_page)}</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><div>{$lang->no}</div></th>
|
||||
|
|
@ -28,8 +23,8 @@
|
|||
<tbody>
|
||||
<!--@foreach($document_list as $no => $oDocument)-->
|
||||
<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>{$no}</td>
|
||||
<td><input type="checkbox" name="cart" value="{$oDocument->document_srl}" onclick="doAddDocumentCart(this)" <!--@if($oDocument->isCarted())-->checked="checked"<!--@end-->/></td>
|
||||
<td>
|
||||
<a href="{getUrl('','document_srl',$oDocument->document_srl)}" onclick="window.open(this.href);return false">{$oDocument->getTitleText()}</a>
|
||||
|
||||
|
|
@ -42,17 +37,17 @@
|
|||
<!--@end-->
|
||||
</td>
|
||||
<td><span class="member_{$oDocument->get('member_srl')}">{$oDocument->getNickName()}</span></td>
|
||||
<td class="alert number center"><strong>{$oDocument->get('declared_count')}</strong></td>
|
||||
<td class="number center alert">{$oDocument->get('readed_count')}</td>
|
||||
<td class="number center">{$oDocument->get('voted_count')}</td>
|
||||
<td class="date center nowrap">{$oDocument->getRegdate("Y-m-d")}</td>
|
||||
<td><strong>{$oDocument->get('declared_count')}</strong></td>
|
||||
<td>{$oDocument->get('readed_count')}</td>
|
||||
<td>{$oDocument->get('voted_count')}</td>
|
||||
<td>{$oDocument->getRegdate("Y-m-d")}</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
<tr>
|
||||
<td colspan="8" class="right">
|
||||
<th colspan="8" class="button">
|
||||
<a href="{getUrl('','module','document','act','dispDocumentManageDocument')}" onclick="popopen(this.href,'manageDocument'); return false;" class="button black strong"><span>{$lang->cmd_manage_document}</span></a>
|
||||
<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>
|
||||
</td>
|
||||
</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
|||
49
modules/document/tpl/document_alias.html
Normal file
49
modules/document/tpl/document_alias.html
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
<!--#include("header.html")-->
|
||||
<!--%import("css/document.css")-->
|
||||
<!--%import("filter/insert_alias.xml")-->
|
||||
<!--%import("filter/delete_alias.xml")-->
|
||||
|
||||
<form id="deleteForm" action="./" method="POST">
|
||||
<input type="hidden" id="target_srl" name="target_srl" value="" />
|
||||
</form>
|
||||
|
||||
<form action="{Context::getRequestUri()}" method="post" onsubmit="return procFilter(this, insert_alias)">
|
||||
<input type="hidden" name="document_srl" value="{$document_srl}" />
|
||||
<input type="hidden" name="module_srl" value="{$oDocument->get('module_srl')}" />
|
||||
|
||||
<h4 class="xeAdmin">{$lang->alias}</h4>
|
||||
|
||||
<table cellspacing="0" class="crossTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="half_wide"><div>{$lang->title}</div></th>
|
||||
<th scope="col" class="half_wide"><div>{$lang->alias}</div></th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td rowspan="{count($aliases)+1}">{$oDocument->getTitle()}</td>
|
||||
{@ $bFirst = true; }
|
||||
<!--@foreach($aliases as $val)-->
|
||||
<!--@if(!$bFirst)-->
|
||||
<tr>
|
||||
{@ $bFirst = false; }
|
||||
<!--@end-->
|
||||
<td>{$val->alias_title}</td>
|
||||
<td><a href="#" onclick="deleteByFilter('{$val->alias_srl}', delete_alias);"><img src="images/buttonDeleteX.gif" alt="" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
<!--@if(!$bFirst)-->
|
||||
<tr>
|
||||
<!--@end-->
|
||||
<td>
|
||||
<input type="text" class="inputTypeText fixWidth" name="alias_title" />
|
||||
</td>
|
||||
<td><span class="button black strong"><input type="submit" value="{$lang->cmd_registration}" accesskey="s"class="btnSubmit" /></span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
<!--%import("filter/insert_config.xml")-->
|
||||
|
||||
<form action="./" method="get" onsubmit="return procFilter(this, insert_config)">
|
||||
<table cellspacing="0" class="adminTable">
|
||||
<table cellspacing="0" class="rowTable">
|
||||
<tr>
|
||||
<th scope="col"><div>{$lang->thumbnail_type}</div></th>
|
||||
</tr>
|
||||
|
|
@ -13,13 +13,13 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="right"><span class="button"><input type="submit" value="{$lang->cmd_registration}" accesskey="s" /></span></td>
|
||||
<th class="button"><span class="button black strong"><input type="submit" value="{$lang->cmd_registration}" accesskey="s" /></span></th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table cellspacing="0" class="adminTable">
|
||||
<table cellspacing="0" class="rowTable">
|
||||
<tr>
|
||||
<td class="right"><span class="button"><input type="button" value="{$lang->cmd_delete_all_thumbnail}" onclick="doDeleteAllThumbnail(); return false;"/></span></td>
|
||||
<th class="button"><span class="button black strong"><input type="button" value="{$lang->cmd_delete_all_thumbnail}" onclick="doDeleteAllThumbnail(); return false;"/></span></th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,50 +3,58 @@
|
|||
<!--#include("header.html")-->
|
||||
|
||||
|
||||
<!-- 정보 -->
|
||||
<div class="summary">
|
||||
<strong>Total</strong> <em>{number_format($total_count)}</em>, Page <strong>{number_format($page)}</strong>/{number_format($total_page)}
|
||||
<!-- 검색 -->
|
||||
<div class="fl">
|
||||
<form action="./" method="get" class="adminSearch">
|
||||
<input type="hidden" name="module" value="{$module}" />
|
||||
<input type="hidden" name="act" value="{$act}" />
|
||||
<input type="hidden" name="module_srl" value="{$module_srl}" />
|
||||
|
||||
<fieldset>
|
||||
<select name="search_target">
|
||||
<option value="">{$lang->search_target}</option>
|
||||
<!--@foreach($lang->search_target_list as $key => $val)-->
|
||||
<option value="{$key}" <!--@if($search_target==$key)-->selected="selected"<!--@end-->>{$val}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
<input type="text" name="search_keyword" value="{htmlspecialchars($search_keyword)}" class="inputTypeText" />
|
||||
<span class="button blue"><input type="submit" value="{$lang->cmd_search}" /></span>
|
||||
<a href="{getUrl('','module',$module,'act',$act)}" class="button black"><span>{$lang->cmd_cancel}</span></a>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<form id="fo_list" action="./" method="get" onsubmit="return procFilter(this, delete_checked)">
|
||||
<input type="hidden" name="page" value="{$page}" />
|
||||
|
||||
<!-- 모듈 선택 -->
|
||||
<div class="fr">
|
||||
<a href="{getUrl('','module','module','act','dispModuleSelectList','id','target_module','type','single')}" onclick="popopen(this.href,'ModuleSelect');return false;" class="button green"><span>{$lang->cmd_find_module}</span></a>
|
||||
<a href="{getUrl('','module','document','act','dispDocumentManageDocument')}" onclick="popopen(this.href,'manageDocument'); return false;" class="button blue"><span>{$lang->cmd_manage_document}</span></a>
|
||||
</div>
|
||||
|
||||
<!-- 목록 -->
|
||||
<table cellspacing="0" class="adminTable">
|
||||
<table cellspacing="0" class="rowTable clear">
|
||||
<caption>Total {number_format($total_count)}, Page {number_format($page)}/{number_format($total_page)}</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><div>{$lang->no}</div></th>
|
||||
<th scope="col"><div><input type="checkbox" onclick="XE.checkboxToggleAll({ doClick:true }); return false;" /></div></th>
|
||||
<th scope="col" class="wide">
|
||||
<div>
|
||||
<select name="module_srl" id="module_srl">
|
||||
<option value="">{$lang->module}</option>
|
||||
<!--@foreach($mid_list as $key => $val)-->
|
||||
<option value="{$val->module_srl}" <!--@if($module_srl == $val->module_srl)-->selected="selected"<!--@end-->>{$val->browser_title}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
<input type="button" name="go_button" id="go_button" value="GO" class="buttonTypeGo" onclick="location.href=current_url.setQuery('module_srl',xGetElementById('module_srl').options[xGetElementById('module_srl').selectedIndex].value);return false;"/>
|
||||
</div>
|
||||
</th>
|
||||
<th scope="col" class="wide"><div>{$lang->document}</div></th>
|
||||
<th scope="col"><div>{$lang->nick_name}</div></th>
|
||||
<th scope="col"><div>{$lang->readed_count}</div></th>
|
||||
<th scope="col"><div>{$lang->voted_count}</div></th>
|
||||
<th scope="col"><div>{$lang->date}</div></th>
|
||||
<th scope="col"><div>{$lang->ipaddress}</div></th>
|
||||
<th scope="col"><div>{$lang->alias}</div></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!--@foreach($document_list as $no => $oDocument)-->
|
||||
<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>
|
||||
<td class="number center">{$oDocument->get('readed_count')}</td>
|
||||
<td class="number center">{$oDocument->get('voted_count')} / {$oDocument->get('blamed_count')}</td>
|
||||
<td class="date center nowrap">{$oDocument->getRegdate("Y-m-d H:i:s")}</td>
|
||||
</tr>
|
||||
<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 class="left subject" colspan="5">
|
||||
<td class="left subject">
|
||||
<!--@if($oDocument->get('module_srl')==$oDocument->get('member_srl'))-->
|
||||
{$lang->cmd_save}
|
||||
<!--@else-->
|
||||
|
|
@ -61,16 +69,17 @@
|
|||
[{$oDocument->getTrackbackCount()}]
|
||||
<!--@end-->
|
||||
</td>
|
||||
<td class="nowrap"><span class="member_{$oDocument->get('member_srl')}">{$oDocument->getNickName()}</span></td>
|
||||
<td class="number center">{$oDocument->get('readed_count')}</td>
|
||||
<td class="number center">{$oDocument->get('voted_count')} / {$oDocument->get('blamed_count')}</td>
|
||||
<td class="date center nowrap">{$oDocument->getRegdate("Y-m-d H:i:s")}</td>
|
||||
<td class="number center nowrap"><a href="{getUrl('search_target','ipaddress','search_keyword',$oDocument->get('ipaddress'))}">{$oDocument->get('ipaddress')}</a></td>
|
||||
<td class="center"><a href="{getUrl('act','dispDocumentAdminAlias','document_srl',$oDocument->document_srl)}">{$lang->alias}</a>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- 버튼 -->
|
||||
<div class="fr gap1">
|
||||
<a href="{getUrl('','module','document','act','dispDocumentAdminManageDocument')}" onclick="popopen(this.href,'manageDocument'); return false;" class="button"><span>{$lang->cmd_manage_document}</span></a>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<!-- 페이지 네비게이션 -->
|
||||
|
|
@ -85,22 +94,3 @@
|
|||
<!--@end-->
|
||||
<a href="{getUrl('page',$page_navigation->last_page,'module_srl',$module_srl)}" class="nextEnd">{$lang->last_page}</a>
|
||||
</div>
|
||||
|
||||
<!-- 검색 -->
|
||||
<form action="./" method="get" class="adminSearch">
|
||||
<input type="hidden" name="module" value="{$module}" />
|
||||
<input type="hidden" name="act" value="{$act}" />
|
||||
<input type="hidden" name="module_srl" value="{$module_srl}" />
|
||||
|
||||
<fieldset>
|
||||
<select name="search_target">
|
||||
<option value="">{$lang->search_target}</option>
|
||||
<!--@foreach($lang->search_target_list as $key => $val)-->
|
||||
<option value="{$key}" <!--@if($search_target==$key)-->selected="selected"<!--@end-->>{$val}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
<input type="text" name="search_keyword" value="{htmlspecialchars($search_keyword)}" class="inputTypeText" />
|
||||
<span class="button"><input type="submit" value="{$lang->cmd_search}" /></span>
|
||||
<a href="{getUrl('','module',$module,'act',$act)}" class="button"><span>{$lang->cmd_cancel}</span></a>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
|
|
|||
26
modules/document/tpl/document_module_config.html
Normal file
26
modules/document/tpl/document_module_config.html
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<!--%import("filter/insert_document_module_config.xml")-->
|
||||
|
||||
<form action="./" method="post" onsubmit="return procFilter(this, insert_document_module_config)">
|
||||
<input type="hidden" name="target_module_srl" value="{$module_info->module_srl?$module_info->module_srl:$module_srls}" />
|
||||
|
||||
<h4 class="xeAdmin">{$lang->document}</h4>
|
||||
<p class="summary">{$lang->about_use_history}</p>
|
||||
<table cellspacing="0" class="rowTable">
|
||||
<tr>
|
||||
<th><div>{$lang->history}</div></th>
|
||||
<td class="wide">
|
||||
<select name="use_history" class="w100">
|
||||
<option value="N" <!--@if($document_config->use_history=='N')-->selected<!--@end-->>{$lang->notuse}</option>
|
||||
<option value="Y" <!--@if($document_config->use_history=='Y')-->selected<!--@end-->>{$lang->use}</option>
|
||||
<option value="Trace" <!--@if($document_config->use_history=='Trace')-->selected<!--@end-->>{$lang->trace_only}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="button" colspan="2">
|
||||
<span class="button strong black"><input type="submit" value="{$lang->cmd_save}"/></span>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
112
modules/document/tpl/extra_keys.html
Normal file
112
modules/document/tpl/extra_keys.html
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
<!--%import("js/document_admin.js")-->
|
||||
<!--%import("filter/insert_extra_var.xml")-->
|
||||
<!--%import("filter/delete_extra_var.xml")-->
|
||||
<!--%import("js/module_admin.js")-->
|
||||
|
||||
<!--@if($selected_var_idx && $extra_keys[$selected_var_idx])-->
|
||||
{@ $selected_var = $extra_keys[$selected_var_idx] }
|
||||
<!--@end-->
|
||||
|
||||
<!--@if($type == 'insertExtraForm' || $selected_var_idx)-->
|
||||
<form action="./" method="post" onsubmit="return procFilter(this, insert_extra_var)">
|
||||
<input type="hidden" name="module_srl" value="{$module_srl}" />
|
||||
<input type="hidden" name="var_idx" value="{$selected_var_idx}" />
|
||||
|
||||
<h4 class="xeAdmin">{$lang->extra_vars} {$selected_var_idx}</h4>
|
||||
<table cellspacing="0" class="crossTable ">
|
||||
<tr>
|
||||
<th><div>{$lang->column_name}</div></th>
|
||||
<td class="wide"><input type="text" name="name" value="{$selected_var->name}" class="inputTypeText w200" id="name" /><a href="{getUrl('','module','module','act','dispModuleAdminLangcode','target','name')}" onclick="popopen(this.href);return false;" class="buttonSet buttonSetting"><span>{$lang->cmd_find_langcode}</span></a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><div>{$lang->column_type}</div></th>
|
||||
<td>
|
||||
<select name="type">
|
||||
<!--@foreach($lang->column_type_list as $k => $v)-->
|
||||
<!--@if($key != 'kr_zip')-->
|
||||
<option value="{$k}" <!--@if($selected_var->type==$k)-->selected="selected"<!--@end-->>{$lang->column_type_list[$k]}</option>
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><div>{$lang->is_required}</div></th>
|
||||
<td><input type="checkbox" name="is_required" value="Y" <!--@if($selected_var->is_required=='Y')-->checked="checked"<!--@end--> /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><div>{$lang->default_value}</div></th>
|
||||
<td><input type="text" name="default" value="{$selected_var->default}" class="inputTypeText w400" /><p>{$lang->about_extra_vars_default_value}</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><div>{$lang->description}</div></th>
|
||||
<td><input type="text" name="desc" value="{$selected_var->desc}" id="desc" class="inputTypeText w400" /><a href="{getUrl('','module','module','act','dispModuleAdminLangcode','target','desc')}" onclick="popopen(this.href);return false;" class="buttonSet buttonSetting"><span>{$lang->cmd_find_langcode}</span></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><div>{$lang->cmd_search}</div></th>
|
||||
<td><input type="checkbox" name="search" value="Y" <!--@if($selected_var->search=='Y')-->checked="checked"<!--@end--> /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2" class="button">
|
||||
<!--@if($selected_var)-->
|
||||
<span class="button strong black"><input type="submit" value="{$lang->cmd_modify}" accesskey="s" /></span>
|
||||
<!--@else-->
|
||||
<span class="button strong black"><input type="submit" value="{$lang->cmd_insert}" accesskey="s" /></span>
|
||||
<!--@end-->
|
||||
<a href="{getUrl('type','','selected_var_idx','')}" class="button"><span>{$lang->cmd_back}</span></a>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
<!--@else-->
|
||||
|
||||
<h4 class="xeAdmin">{$lang->extra_vars}</h4>
|
||||
<table cellspacing="0" class="crossTable ">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><div>{$lang->no}</div></th>
|
||||
<th><div>{$lang->column_name}</div></th>
|
||||
<th><div>{$lang->column_type}</div></th>
|
||||
<th><div>{$lang->is_required}</div></th>
|
||||
<th><div>{$lang->cmd_search}</div></th>
|
||||
<th><div> </div></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!--@foreach($extra_keys as $key => $val)-->
|
||||
<tr>
|
||||
<td rowspan="3">{$val->idx}</td>
|
||||
<td class="nowrap"><b>{$val->name}</b></td>
|
||||
<td class="nowrap">{$lang->column_type_list[$val->type]}</td>
|
||||
<td rowspan="3"><!--@if($val->is_required=='Y')--><b>{$lang->is_required}</b><!--@else-->N<!--@end--></td>
|
||||
<td rowspan="3"><!--@if($val->search=='Y')--><b>{$lang->search_target}</b><!--@else-->N<!--@end--></td>
|
||||
<td rowspan="3" class="nowrap">
|
||||
<!--@if($val->idx>1)--><a href="#" onclick="moveVar('up','{$module_srl}','{$val->idx}'); return false;" class="buttonSet buttonUp"><span>{$lang->cmd_modify}</span></a><!--@end-->
|
||||
<a href="#" onclick="moveVar('down','{$module_srl}','{$val->idx}');return false;" class="buttonSet buttonDown"><span>{$lang->cmd_modify}</a></span>
|
||||
<a href="{getUrl('selected_var_idx',$val->idx)}" class="buttonSet buttonSetting"><span>{$lang->cmd_modify}</span></a>
|
||||
<a href="#" onclick="return doDeleteExtraKey('{$module_srl}','{$val->idx}');" class="buttonSet buttonDelete"><span>{$lang->cmd_delete}</span></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lang->default_value}</td>
|
||||
<td class="wide">{$val->default} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lang->description}</td>
|
||||
<td class="wide">{$val->desc} </td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
<tr>
|
||||
<th colspan="9" class="button">
|
||||
<a href="{getUrl('type','insertExtraForm','selected_var_idx','')}" class="button black strong"><span>{$lang->cmd_insert}</span></a>
|
||||
</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<!--@end-->
|
||||
|
||||
<form id="fo_delete" name="fo_delete" method="post" action="./">
|
||||
<input type="hidden" name="module_srl" value="" />
|
||||
<input type="hidden" name="var_idx" value="" />
|
||||
<form>
|
||||
12
modules/document/tpl/filter/delete_alias.xml
Normal file
12
modules/document/tpl/filter/delete_alias.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<filter name="delete_alias" module="document" act="procDocumentAdminDeleteAlias" confirm_msg_code="confirm_delete">
|
||||
<form>
|
||||
<node target="target_srl" required="true" />
|
||||
</form>
|
||||
<parameter>
|
||||
<param name="alias_srl" target="target_srl" />
|
||||
</parameter>
|
||||
<response callback_func="completeInsertAlias">
|
||||
<tag name="error" />
|
||||
<tag name="message" />
|
||||
</response>
|
||||
</filter>
|
||||
11
modules/document/tpl/filter/delete_category.xml
Normal file
11
modules/document/tpl/filter/delete_category.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<filter name="delete_category" module="document" act="procDocumentAdminDeleteCategory" confirm_msg_code="confirm_delete">
|
||||
<form>
|
||||
<node target="category_srl" required="true" />
|
||||
</form>
|
||||
<response callback_func="completeDeleteCategory">
|
||||
<tag name="error" />
|
||||
<tag name="message" />
|
||||
<tag name="xml_file" />
|
||||
<tag name="category_srl" />
|
||||
</response>
|
||||
</filter>
|
||||
11
modules/document/tpl/filter/delete_extra_var.xml
Normal file
11
modules/document/tpl/filter/delete_extra_var.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<filter name="delete_extra_var" module="document" act="procDocumentAdminDeleteExtraVar" confirm_msg_code="confirm_delete">
|
||||
<form>
|
||||
<node target="module_srl" required="true" />
|
||||
<node target="var_idx" required="true" />
|
||||
</form>
|
||||
<parameter />
|
||||
<response callback_func="completeInsertExtraVar">
|
||||
<tag name="error" />
|
||||
<tag name="message" />
|
||||
</response>
|
||||
</filter>
|
||||
14
modules/document/tpl/filter/insert_alias.xml
Normal file
14
modules/document/tpl/filter/insert_alias.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<filter name="insert_alias" module="document" act="procDocumentAdminInsertAlias" confirm_msg_code="confirm_submit">
|
||||
<form>
|
||||
<node target="module_srl" required="true" />
|
||||
<node target="document_srl" required="true" />
|
||||
<node target="alias_title" required="true" />
|
||||
</form>
|
||||
<parameter>
|
||||
</parameter>
|
||||
<response callback_func="completeInsertAlias">
|
||||
<tag name="error" />
|
||||
<tag name="message" />
|
||||
</response>
|
||||
</filter>
|
||||
|
||||
24
modules/document/tpl/filter/insert_category.xml
Normal file
24
modules/document/tpl/filter/insert_category.xml
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<filter name="insert_category" module="document" act="procDocumentAdminInsertCategory" confirm_msg_code="confirm_submit">
|
||||
<form>
|
||||
<node target="module_srl" required="true" />
|
||||
<node target="category_srl" required="true" />
|
||||
<node target="category_title" required="true" />
|
||||
</form>
|
||||
<parameter>
|
||||
<param name="module_srl" target="module_srl" />
|
||||
<param name="category_srl" target="category_srl" />
|
||||
<param name="parent_srl" target="parent_srl" />
|
||||
<param name="title" target="category_title" />
|
||||
<param name="color" target="category_color" />
|
||||
<param name="expand" target="expand" />
|
||||
<param name="group_srls" target="group_srls" />
|
||||
</parameter>
|
||||
<response callback_func="completeInsertCategory">
|
||||
<tag name="error" />
|
||||
<tag name="message" />
|
||||
<tag name="module_srl" />
|
||||
<tag name="category_srl" />
|
||||
<tag name="parent_srl" />
|
||||
<tag name="xml_file" />
|
||||
</response>
|
||||
</filter>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<filter name="insert_document_module_config" module="document" act="procDocumentInsertModuleConfig" confirm_msg_code="confirm_submit">
|
||||
<form />
|
||||
<response>
|
||||
<tag name="error" />
|
||||
<tag name="message" />
|
||||
</response>
|
||||
</filter>
|
||||
11
modules/document/tpl/filter/insert_extra_var.xml
Normal file
11
modules/document/tpl/filter/insert_extra_var.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<filter name="insert_extra_var" module="document" act="procDocumentAdminInsertExtraVar" confirm_msg_code="confirm_insert">
|
||||
<form>
|
||||
<node target="name" required="true" />
|
||||
<node target="module_srl" required="true" />
|
||||
</form>
|
||||
<parameter />
|
||||
<response callback_func="completeInsertExtraVar">
|
||||
<tag name="error" />
|
||||
<tag name="message" />
|
||||
</response>
|
||||
</filter>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<filter name="manage_checked_document" module="document" act="procDocumentAdminManageCheckedDocument">
|
||||
<filter name="manage_checked_document" module="document" act="procDocumentManageCheckedDocument">
|
||||
<form />
|
||||
<response callback_func="completeManageDocument">
|
||||
<tag name="error" />
|
||||
|
|
|
|||
10
modules/document/tpl/filter/move_category.xml
Normal file
10
modules/document/tpl/filter/move_category.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<filter name="move_category" module="document" act="procDocumentAdminMoveCategory" confirm_msg_code="confirm_move">
|
||||
<form />
|
||||
<parameter />
|
||||
<response callback_func="completeMoveCategory">
|
||||
<tag name="error" />
|
||||
<tag name="message" />
|
||||
<tag name="xml_file" />
|
||||
<tag name="source_category_srl" />
|
||||
</response>
|
||||
</filter>
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<!--%import("js/document_admin.js")-->
|
||||
|
||||
<h3>{$lang->document} <span class="gray">{$lang->cmd_management}</span></h3>
|
||||
<h3 class="xeAdmin">{$lang->document} <span class="gray">{$lang->cmd_management}</span></h3>
|
||||
|
||||
<div class="header4 gap1">
|
||||
<ul class="localNavigation">
|
||||
|
|
|
|||
BIN
modules/document/tpl/images/btnDelete.gif
Normal file
BIN
modules/document/tpl/images/btnDelete.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 61 B |
BIN
modules/document/tpl/images/buttonDeleteX.gif
Normal file
BIN
modules/document/tpl/images/buttonDeleteX.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 337 B |
BIN
modules/document/tpl/images/buttonInsert.gif
Normal file
BIN
modules/document/tpl/images/buttonInsert.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 322 B |
BIN
modules/document/tpl/images/buttonModify.gif
Normal file
BIN
modules/document/tpl/images/buttonModify.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 336 B |
|
|
@ -90,3 +90,49 @@ function insertSelectedModule(id, module_srl, mid, browser_title) {
|
|||
obj.value = browser_title+' ('+mid+')';
|
||||
doGetCategoryFromModule(module_srl);
|
||||
}
|
||||
|
||||
function completeInsertExtraVar(ret_obj) {
|
||||
alert(ret_obj['message']);
|
||||
location.href = current_url.setQuery('type','').setQuery('selected_var_idx','');
|
||||
}
|
||||
|
||||
function completeInsertAlias(ret_obj) {
|
||||
alert(ret_obj['message']);
|
||||
location.href = current_url;
|
||||
}
|
||||
|
||||
function insertSelectedModule(id, module_srl, mid, browser_title) {
|
||||
if(current_url.getQuery('act')=='dispDocumentManageDocument') {
|
||||
var obj= xGetElementById('_'+id);
|
||||
var sObj = xGetElementById(id);
|
||||
sObj.value = module_srl;
|
||||
obj.value = browser_title+' ('+mid+')';
|
||||
doGetCategoryFromModule(module_srl);
|
||||
} else {
|
||||
location.href = current_url.setQuery('module_srl',module_srl);
|
||||
}
|
||||
}
|
||||
|
||||
function deleteByFilter(target_srl, filter)
|
||||
{
|
||||
var e = xGetElementById('target_srl');
|
||||
e.value= target_srl;
|
||||
var hF = xGetElementById("deleteForm");
|
||||
procFilter(hF, filter);
|
||||
}
|
||||
|
||||
function doDeleteExtraKey(module_srl, var_idx) {
|
||||
var fo_obj = xGetElementById('fo_delete');
|
||||
fo_obj.module_srl.value = module_srl;
|
||||
fo_obj.var_idx.value = var_idx;
|
||||
return procFilter(fo_obj, delete_extra_var);
|
||||
}
|
||||
|
||||
function moveVar(type, module_srl, var_idx) {
|
||||
var params = new Array();
|
||||
params['type'] = type;
|
||||
params['module_srl'] = module_srl;
|
||||
params['var_idx'] = var_idx;
|
||||
var response_tags = new Array('error','message');
|
||||
exec_xml('document','procAdminMoveExtraVar', params, function() { location.reload(); });
|
||||
}
|
||||
|
|
|
|||
190
modules/document/tpl/js/document_category.js
Normal file
190
modules/document/tpl/js/document_category.js
Normal file
|
|
@ -0,0 +1,190 @@
|
|||
/**
|
||||
* @file modules/document/tpl/js/document_category.js
|
||||
* @author sol (sol@ngleader.com)
|
||||
* @brief document 모듈의 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.procDocumentAdminMoveCategory",{ "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('document.getDocumentAdminCategoryTplInfo', params, function(data){
|
||||
jQuery('#category_info').html(data.tpl).css('left',e.pageX).css('top',e.pageY);
|
||||
});
|
||||
}
|
||||
|
||||
function modifyNode(node,e){
|
||||
var params ={
|
||||
"category_srl":node
|
||||
,"parent_srl":0
|
||||
,"module_srl":jQuery("#fo_category [name=module_srl]").val()
|
||||
};
|
||||
|
||||
jQuery.exec_json('document.getDocumentAdminCategoryTplInfo', params, function(data){
|
||||
jQuery('#category_info').html(data.tpl).css('left',e.pageX).css('top',e.pageY);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
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('document.procDocumentAdminDeleteCategory', 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('document', 'procDocumentAdminMakeXmlFile', params, completeInsertCategory, response_tags, params);
|
||||
}
|
||||
|
||||
function doCategoryFormMove() {
|
||||
xAddEventListener(window,'load',function() { window.document.body.appendChild(xGetElementById('fo_category')); xGetElementById('category_info').style.width = "550px"; } );
|
||||
}
|
||||
|
|
@ -3,21 +3,23 @@
|
|||
|
||||
<div class="printContent">
|
||||
|
||||
<div><h3>{$oDocument->getTitleText()}</h3></div>
|
||||
<div><h3 class="xeAdmin">{$oDocument->getTitleText()}</h3></div>
|
||||
|
||||
<div class="member_{$oDocument->get('member_srl')} gap1 fl">{$oDocument->get('nick_name')}</div>
|
||||
<div class="gap1 fr">{$oDocument->getRegdate()}</div>
|
||||
<div class="clear"></div>
|
||||
|
||||
|
||||
<!--@foreach($extra_vars as $key => $extra_var)-->
|
||||
<div class="gap1">{$extra_var->name} : {$extra_var->value}</div>
|
||||
<!--@if($oDocument->isExtraVarsExists() && (!$oDocument->isSecret() || $oDocument->isGranted()) )-->
|
||||
<!--@foreach($oDocument->getExtraVars() as $key => $val)-->
|
||||
<div class="gap1">{$val->name} : {$val->getValueHtml()}</div>
|
||||
<div class="clear"></div>
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
<div class="gap1">{$oDocument->getContent(false, false)}</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
jQuery(window).load(function() { window.print(); } );
|
||||
//]]></script>
|
||||
//]]></script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue