mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-28 15:49:57 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@4309 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
commit
9b07000f69
309 changed files with 4552 additions and 2998 deletions
|
|
@ -48,6 +48,12 @@ RewriteRule ^([a-zA-Z0-9_]+)/page/([[:digit:]]+)$ ./index.php?mid=$1&page=$2 [L]
|
|||
# mid + category link
|
||||
RewriteRule ^([a-zA-Z0-9_]+)/category/([[:digit:]]+)$ ./index.php?mid=$1&category=$2 [L]
|
||||
|
||||
# mid + act + document_Srl
|
||||
RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([[:digit:]]+)$ ./index.php?mid=$1&document_srl=$3&act=$2 [L]
|
||||
|
||||
# mid + document_Srl + page
|
||||
RewriteRule ^([a-zA-Z0-9_]+)/([[:digit:]]+)/page/([[:digit:]]+)$ ./index.php?mid=$1&document_srl=$2&page=$3 [L]
|
||||
|
||||
# mid + category + page
|
||||
RewriteRule ^([a-zA-Z0-9_]+)/category/([[:digit:]]+)/page/([[:digit:]]+)$ ./index.php?mid=$1&category=$2&page=$3 [L]
|
||||
|
||||
|
|
@ -63,5 +69,8 @@ RewriteRule ^([a-zA-Z0-9_]+)/tag/(.*)$ ./index.php?mid=$1&search_target=tag&sear
|
|||
# mid + search target writer
|
||||
RewriteRule ^([a-zA-Z0-9_]+)/writer/(.*)$ ./index.php?mid=$1&search_target=nick_name&search_keyword=$2 [L]
|
||||
|
||||
# mid + document_Srl + page + act
|
||||
RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([[:digit:]]+)/page/([[:digit:]]+)$ ./index.php?mid=$1&document_srl=$3&page=$4&act=$2 [L]
|
||||
|
||||
# module link
|
||||
RewriteRule ^([a-zA-Z0-9_]+)(/){0,1}$ ./index.php?mid=$1 [L]
|
||||
|
|
|
|||
|
|
@ -7,15 +7,11 @@
|
|||
* @brief 자동 링크 애드온
|
||||
**/
|
||||
if($called_position == 'after_module_proc' && Context::getResponseMethod()!="XMLRPC") {
|
||||
Context::loadLang("./addons/autolink/lang");
|
||||
$open_cur_window = Context::getLang('open_cur_window');
|
||||
$open_new_window = Context::getLang('open_new_window');
|
||||
|
||||
$script_code = <<<EndOfScript
|
||||
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
var url_regx = new RegExp("(http|https|ftp|news)://([-/.a-zA-Z0-9_~#%$?&=:200-377()]+)","gi"); function replaceHrefLink(obj) { while(obj) { if(obj.nodeType == 3) { var text = obj.data; if(url_regx.test(text)) { var html = text.replace(url_regx,"<a href=\"$1://$2\" onclick=\"window.open(this.href); return false;\">$1://$2</a>"); var dummy = xCreateElement('span'); xInnerHtml(dummy, html); obj.parentNode.insertBefore(dummy, obj); obj.parentNode.removeChild(obj); } } if(obj.firstChild) replaceHrefLink(obj.firstChild); obj = obj.nextSibling; } } function addUrlLink() { var objs = xGetElementsByClassName('xe_content'); if(objs.length<1) return; for(var i=0;i<objs.length;i++) { replaceHrefLink(objs[i].firstChild); xAddEventListener(objs[i], 'mouseover', showUrlOpener); } } function showUrlOpener(e) { var evt = new xEvent(e); var obj = evt.target; var layer = xGetElementById('zbXEUrlOpener'); if(!layer) { layer = xCreateElement('div'); layer.style.position = 'absolute'; layer.style.border = '3px solid #DDDDDD'; layer.style.backgroundColor = '#FFFFFF'; layer.style.padding = '5px'; layer.style.visibility = 'hidden'; layer.style.lineHeight = '1.6'; layer.setAttribute('id','zbXEUrlOpener'); document.body.appendChild(layer); } if(obj && obj.nodeName == 'A' && obj.getAttribute('href') && !/#/.test(obj.getAttribute('href'))) { var href = obj.getAttribute('href'); if(href.length>40) href = href.substr(0,40)+'...'; var html = ''+ '<a href="'+obj.getAttribute('href')+'" onclick="window.open(this.href); return false;" style="text-decoration:none; color:#555555;">'+href+'</a> [{$open_new_window}]<br />'+ '<a href="'+obj.getAttribute('href')+'" style="text-decoration:none; color:#555555;">'+href+'</a> [{$open_cur_window}]'+ ''; xInnerHtml(layer, html); xLeft(layer, evt.pageX-20); xTop(layer, evt.pageY-10); layer.style.visibility = 'visible'; } else { layer.style.visibility = 'hidden'; } } xAddEventListener(window,'load', addUrlLink);
|
||||
var url_regx = new RegExp("(http|https|ftp|news)://([^ \\r\\n]*)","i"); function replaceHrefLink(target_obj) { var obj_list = new Array(); var obj = target_obj; while(obj) { obj_list[obj_list.length] = obj; obj = obj.nextSibling; } for(var i=0;i<obj_list.length;i++) { var obj = obj_list[i]; var pObj = obj.parentNode; if(!pObj) continue; var pN = pObj.nodeName.toLowerCase(); if(pN == 'a' || pN == 'pre' || pN == 'xml' || pN == 'textarea' || pN == 'input') continue; if(obj.nodeType == 3 && obj.data && url_regx.test(obj.data) ) { var html = obj.nodeValue.replace(url_regx,"<a href=\"$1://$2\" onclick=\"window.open(this.href); return false;\">$1://$2</a>"); var dummy = xCreateElement('span'); xInnerHtml(dummy, html); pObj.insertBefore(dummy, obj); pObj.removeChild(obj); } else if(obj.nodeType == 1 && obj.firstChild) { replaceHrefLink(obj.firstChild); } } } function addUrlLink() { var objs = xGetElementsByClassName('xe_content'); if(objs.length<1) return; for(var i=0;i<objs.length;i++) { if(url_regx.test(xInnerHtml(objs[i]))) replaceHrefLink(objs[i].firstChild); } } xAddEventListener(window,'load', addUrlLink);
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,18 +1,23 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<addon version="0.1">
|
||||
<title xml:lang="ko">자동 링크 애드온</title>
|
||||
<title xml:lang="en">Auto Link</title>
|
||||
<title xml:lang="zh-CN">自动链接插件</title>
|
||||
<title xml:lang="es">auto vínculo addon</title>
|
||||
<title xml:lang="ru">авто ссылка аддон</title>
|
||||
<title xml:lang="ge">Auto-Link Addon</title>
|
||||
<author email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2008. 4. 22">
|
||||
<name xml:lang="ko">zero</name>
|
||||
<name xml:lang="en">zero</name>
|
||||
<name xml:lang="zh-CN">zero</name>
|
||||
<name xml:lang="es">zero</name>
|
||||
<name xml:lang="ru">zero</name>
|
||||
<name xml:lang="ge">zero</name>
|
||||
<description xml:lang="ko">
|
||||
게시글과 댓글의 내용중 http로 시작되는 일반 문자열에 자동으로 링크를 걸고 각 링크에 마우스 오버시 새창과 현재창 메뉴가 나타나도록 꾸미는 애드온입니다.
|
||||
</description>
|
||||
<description xml:lang="en">
|
||||
This addon makes a link to a string that starts with http.
|
||||
</description>
|
||||
<description xml:lang="zh-CN">
|
||||
主题及评论中以http开始的字符串,自动转换为链接。并且鼠标移到链接上方时,将出现可选(新窗/本页面)提示框。
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* @file addons/autolink/lang/es.lang.php
|
||||
* @author zero (zero@zeroboard.com)
|
||||
* @brief 한국어 언어팩 (기본적인 내용만 수록)
|
||||
**/
|
||||
$lang->open_cur_window = "ventana actual";
|
||||
$lang->open_new_window = "una nueva ventana";
|
||||
?>
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* @file addons/autolink/lang/ge.lang.php
|
||||
* @author zero (zero@zeroboard.com)
|
||||
* @brief 한국어 언어팩 (기본적인 내용만 수록)
|
||||
**/
|
||||
$lang->open_cur_window = "aktuelle Fenster";
|
||||
$lang->open_new_window = "neues Fenster";
|
||||
?>
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* @file addons/autolink/lang/ko.lang.php
|
||||
* @author zero (zero@zeroboard.com)
|
||||
* @brief 한국어 언어팩 (기본적인 내용만 수록)
|
||||
**/
|
||||
$lang->open_cur_window = "현재창";
|
||||
$lang->open_new_window = "새창";
|
||||
?>
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* @file addons/autolink/lang/ru.lang.php
|
||||
* @author zero (zero@zeroboard.com)
|
||||
* @brief 한국어 언어팩 (기본적인 내용만 수록)
|
||||
**/
|
||||
$lang->open_cur_window = "текущем окне";
|
||||
$lang->open_new_window = "Новое окно";
|
||||
?>
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* @file addons/autolink/lang/ko.lang.php
|
||||
* @author zero (zero@zeroboard.com)
|
||||
* @brief 中文语言包
|
||||
**/
|
||||
$lang->open_cur_window = "本页面";
|
||||
$lang->open_new_window = "新窗口";
|
||||
?>
|
||||
|
|
@ -263,7 +263,8 @@
|
|||
$obj->uploaded_count = $file_count;
|
||||
}
|
||||
}
|
||||
$obj->content = str_replace($uploaded_target_path,sprintf('/files/attach/images/%s/%s/%s', $this->module_srl, $document_srl, $filename), $obj->content);
|
||||
|
||||
$obj->content = str_replace($uploaded_target_path,sprintf('/files/attach/images/%s/%s%s', $this->module_srl, getNumberingPath($document_srl,3), $filename), $obj->content);
|
||||
|
||||
$oDocumentController = &getController('document');
|
||||
$obj->allow_comment = 'Y';
|
||||
|
|
@ -354,7 +355,7 @@
|
|||
$obj->uploaded_count += $file_count;
|
||||
}
|
||||
}
|
||||
$obj->content = str_replace($uploaded_target_path,sprintf('/files/attach/images/%s/%s/%s', $this->module_srl, $document_srl, $filename), $obj->content);
|
||||
$obj->content = str_replace($uploaded_target_path,sprintf('/files/attach/images/%s/%s%s', $this->module_srl, getNumberingPath($document_srl,3), $filename), $obj->content);
|
||||
|
||||
$oDocumentController = &getController('document');
|
||||
$output = $oDocumentController->updateDocument($oDocument,$obj);
|
||||
|
|
|
|||
46
addons/member_communication/conf/info.xml
Normal file
46
addons/member_communication/conf/info.xml
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<addon version="0.1">
|
||||
<title xml:lang="ko">커뮤니케이션</title>
|
||||
<title xml:lang="jp">커뮤니케이션</title>
|
||||
<title xml:lang="zh-CN">会员交流</title>
|
||||
<title xml:lang="en">Communication</title>
|
||||
<title xml:lang="ge">커뮤니케이션</title>
|
||||
<title xml:lang="es">커뮤니케이션</title>
|
||||
<title xml:lang="ru">커뮤니케이션</title>
|
||||
<author email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2008. 5. 28">
|
||||
<name xml:lang="ko">제로</name>
|
||||
<name xml:lang="jp">Zero</name>
|
||||
<name xml:lang="zh-CN">zero</name>
|
||||
<name xml:lang="en">zero</name>
|
||||
<name xml:lang="ge">zero</name>
|
||||
<name xml:lang="es">zero</name>
|
||||
<name xml:lang="ru">zero</name>
|
||||
<description xml:lang="ko">
|
||||
커뮤니케이션 모듈의 기능을 활성화 시켜 쪽지나 친구기능을 사용할 수 있도록 해줍니다.
|
||||
쪽지, 친구기능등을 사용하기 위해서는 이 애드온을 사용으로 해주시면 됩니다.
|
||||
</description>
|
||||
<description xml:lang="jp">
|
||||
커뮤니케이션 모듈의 기능을 활성화 시켜 쪽지나 친구기능을 사용할 수 있도록 해줍니다.
|
||||
쪽지, 친구기능등을 사용하기 위해서는 이 애드온을 사용으로 해주시면 됩니다.
|
||||
</description>
|
||||
<description xml:lang="zh-CN">
|
||||
此插件可激活短信箱及添加好友功能。
|
||||
</description>
|
||||
<description xml:lang="en">
|
||||
This addon enables communication module in order to use message or friend function.
|
||||
Please enable this addon in case you want to use those functions.
|
||||
</description>
|
||||
<description xml:lang="ge">
|
||||
커뮤니케이션 모듈의 기능을 활성화 시켜 쪽지나 친구기능을 사용할 수 있도록 해줍니다.
|
||||
쪽지, 친구기능등을 사용하기 위해서는 이 애드온을 사용으로 해주시면 됩니다.
|
||||
</description>
|
||||
<description xml:lang="es">
|
||||
커뮤니케이션 모듈의 기능을 활성화 시켜 쪽지나 친구기능을 사용할 수 있도록 해줍니다.
|
||||
쪽지, 친구기능등을 사용하기 위해서는 이 애드온을 사용으로 해주시면 됩니다.
|
||||
</description>
|
||||
<description xml:lang="ru">
|
||||
커뮤니케이션 모듈의 기능을 활성화 시켜 쪽지나 친구기능을 사용할 수 있도록 해줍니다.
|
||||
쪽지, 친구기능등을 사용하기 위해서는 이 애드온을 사용으로 해주시면 됩니다.
|
||||
</description>
|
||||
</author>
|
||||
</addon>
|
||||
89
addons/member_communication/member_communication.addon.php
Normal file
89
addons/member_communication/member_communication.addon.php
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
<?php
|
||||
if(!defined("__ZBXE__")) exit();
|
||||
|
||||
/**
|
||||
* @file member_communication.addon.php
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief 사용자의 커뮤니케이션 기능을 활성화
|
||||
*
|
||||
* - 새로운 쪽지가 왔을 경우 팝업으로 띄움
|
||||
* - MemberModel::getMemberMenu 호출시 대상이 회원일 경우 쪽지 보내기 기능 추가합니다.
|
||||
* - MemberModel::getMemberMenu 호출시 친구 등록 메뉴를 추가합니다.
|
||||
**/
|
||||
|
||||
/**
|
||||
* 기능 수행 : 팝업 및 회원정보 보기에서 쪽지/친구 메뉴 추가. 시작할때 새쪽지가 왔는지 검사
|
||||
* 조건 : called_position = 'before_module_init', module = 'member'
|
||||
**/
|
||||
if($called_position == 'before_module_init' && $this->module != 'member' && Context::get('is_logged') ) {
|
||||
|
||||
// 로그인된 사용자 정보를 구함
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
// 커뮤니케이션 모듈의 언어파일을 읽음
|
||||
Context::loadLang('./modules/communication/lang');
|
||||
|
||||
// 회원 로그인 정보중에서 쪽지등의 메뉴를 추가
|
||||
$oMemberController = &getController('member');
|
||||
$oMemberController->addMemberMenu('dispCommunicationFriend', 'cmd_view_friend');
|
||||
$oMemberController->addMemberMenu('dispCommunicationMessages', 'cmd_view_message_box');
|
||||
|
||||
// 새로운 쪽지에 대한 플래그가 있으면 쪽지 보기 팝업 띄움
|
||||
$flag_path = './files/member_extra_info/new_message_flags/'.getNumberingPath($logged_info->member_srl);
|
||||
$flag_file = sprintf('%s%s', $flag_path, $logged_info->member_srl);
|
||||
|
||||
if(file_exists($flag_file)) {
|
||||
@unlink($flag_file);
|
||||
Context::loadLang('./addons/member_communication/lang');
|
||||
|
||||
$script = sprintf('<script type="text/javascript"> xAddEventListener(window,"load", function() {if(confirm("%s")) { popopen("%s"); }}); </script>', Context::getLang('alert_new_message_arrived'), Context::getRequestUri().'?module=communication&act=dispCommunicationNewMessage');
|
||||
|
||||
Context::addHtmlHeader( $script );
|
||||
}
|
||||
|
||||
/**
|
||||
* 기능 수행 : 사용자 이름을 클릭시 요청되는 팝업메뉴의 메뉴에 쪽지 발송, 친구추가등의 링크 추가
|
||||
* 조건 : called_position == 'after_module_proc', module = 'member', act = 'getMemberMenu'
|
||||
**/
|
||||
} elseif($called_position == 'before_module_proc' && $this->module == 'member' && $this->act == 'getMemberMenu') {
|
||||
// 비로그인 사용자라면 패스
|
||||
if(!Context::get('is_logged')) return;
|
||||
|
||||
$oMemberController = &getController('member');
|
||||
|
||||
// 로그인된 사용자 정보를 구함
|
||||
$logged_info = Context::get('logged_info');
|
||||
$member_srl = Context::get('target_srl');
|
||||
$mid = Context::get('cur_mid');
|
||||
|
||||
// communication 모델 객체 생성
|
||||
$oCommunicationModel = &getModel('communication');
|
||||
|
||||
// 자신이라면 쪽지함 보기 기능 추가
|
||||
if($logged_info->member_srl == $member_srl) {
|
||||
|
||||
// 자신의 쪽지함 보기 기능 추가
|
||||
$oMemberController->addMemberPopupMenu(getUrl('','mid',$mid,'act','dispCommunicationMessages'), 'cmd_view_message_box', './modules/communication/tpl/images/icon_message_box.gif', 'self');
|
||||
|
||||
// 친구 목록 보기
|
||||
$oMemberController->addMemberPopupMenu(getUrl('','mid',$mid,'act','dispCommunicationFriend'), 'cmd_view_friend', './modules/communication/tpl/images/icon_friend_box.gif', 'self');
|
||||
|
||||
// 아니라면 쪽지 발송, 친구 등록 추가
|
||||
} else {
|
||||
// 대상 회원의 정보를 가져옴
|
||||
$target_member_info = $this->getMemberInfoByMemberSrl($member_srl);
|
||||
if(!$target_member_info->member_srl) return;
|
||||
|
||||
// 로그인된 사용자 정보를 구함
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
// 쪽지 발송 메뉴를 만듬
|
||||
if( $logged_info->is_admin == 'Y' || $target_member_info->allow_message =='Y' || ($target_member_info->allow_message == 'F' && $oCommunicationModel->isFriend($member_srl)))
|
||||
$oMemberController->addMemberPopupMenu(getUrl('','module','communication','act','dispCommunicationSendMessage','receiver_srl',$member_srl), 'cmd_send_message', './modules/communication/tpl/images/icon_write_message.gif', 'popup');
|
||||
|
||||
// 친구 등록 메뉴를 만듬 (이미 등록된 친구가 아닐 경우)
|
||||
if(!$oCommunicationModel->isAddedFriend($member_srl))
|
||||
$oMemberController->addMemberPopupMenu(getUrl('','module','communication','act','dispCommunicationAddFriend','target_srl',$member_srl), 'cmd_add_friend', './modules/communication/tpl/images/icon_add_friend.gif', 'popup');
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<addon version="0.1">
|
||||
<title xml:lang="ko">사용자 추가 정보 및 커뮤니케이션 기능 활성화</title>
|
||||
<title xml:lang="jp">会員情報・コミュニティアドオン</title>
|
||||
<addon version="0.2">
|
||||
<title xml:lang="ko">회원 확장 정보 출력</title>
|
||||
<title xml:lang="jp">회원 확장 정보 출력</title>
|
||||
<title xml:lang="zh-CN">用户扩展信息</title>
|
||||
<title xml:lang="en">Activation of Member's Additional Information and Communication Function.</title>
|
||||
<title xml:lang="ge">Die Aktivierung der Mitglied's weitere Informations-und Kommunikations-Funktion.</title>
|
||||
<title xml:lang="es">Addon para activar la función de la Información addcional del usuario y de la comunicación.</title>
|
||||
<title xml:lang="ru">Аддон для предоставления дополнительной информации о пользователях и коммуникации</title>
|
||||
<title xml:lang="en">Extra Member Info</title>
|
||||
<title xml:lang="ge">회원 확장 정보 출력</title>
|
||||
<title xml:lang="es">회원 확장 정보 출력</title>
|
||||
<title xml:lang="ru">회원 확장 정보 출력</title>
|
||||
<author email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2007. 2. 28">
|
||||
<name xml:lang="ko">제로</name>
|
||||
<name xml:lang="jp">Zero</name>
|
||||
|
|
@ -16,74 +16,25 @@
|
|||
<name xml:lang="es">zero</name>
|
||||
<name xml:lang="ru">zero</name>
|
||||
<description xml:lang="ko">
|
||||
사용자의 정보중 이미지이름, 이미지마크, 서명등을 화면에 출력해주는 애드온입니다.
|
||||
이런 정보들을 사용하지 않을 경우를 대비하여 별도의 애드온으로 빼어서 실행시간을 줄여줍니다.
|
||||
이미지이름, 이미지마크, 서명등을 노출하고 싶다면 이 애드온을 활성화 시키세요.
|
||||
1. 출력되기 직전 &lt;div class="member_회원번호"&gt;....&lt;/div&gt; 로 정의가 된 부분을 찾아 회원번호를 구해서 이미지이름, 이미지마크가 있는지를 확인하여 있으면 내용을 변경해버립니다.
|
||||
2. 출력되기 직전 &lt;div class="document_번호"&gt;...&lt;/div&gt;로 정의된 곳을 찾아 글의 내용이라 판단, 하단에 서명을 추가합니다.
|
||||
3. 새로운 쪽지가 왔을 경우 팝업으로 띄움
|
||||
4. MemberModel::getMemberMenu 호출시 대상이 회원일 경우 쪽지 보내기 기능 추가합니다.
|
||||
5. MemberModel::getMemberMenu 호출시 친구 등록 메뉴를 추가합니다.
|
||||
회원이 등록한 이미지이름, 이미지마크를 사용하기 위해서는 이 애드온을 활성화 시키세요.
|
||||
</description>
|
||||
<description xml:lang="jp">
|
||||
会員情報のイメージ名、イメージマーク、署名などを画面に表示するアドオンです。
|
||||
このような情報を使用しない場合、アドオンを「使用」に設定すれば、実行時間を少なくします。
|
||||
イメージ名、イメージマーク、署名などを表示させたい時は、このアドオンを「使用」に設定して下さい。
|
||||
1. 出力の直前 <div class="member_会員番号">....</div> に定義された部分を探し、会員番号をチェックしてイメージ名、イメージマークがあるかを確認します。あった場合は内容を変更します。
|
||||
2. 出力の直前 <div class="document_番号">...</div>に定義された部分を探し、書込みの内容だと判断して、下段に署名を追加します。
|
||||
3. 新しいメッセージが来た場合ポップアップで表示します。
|
||||
4. MemberModel::getMemberMenu を呼出す時、相手が会員の場合はメッセージ送信の機能を追加します。
|
||||
5. MemberModel::getMemberMenu を呼出す時、友達登録メニュを追加します。
|
||||
회원이 등록한 이미지이름, 이미지마크를 사용하기 위해서는 이 애드온을 활성화 시키세요.
|
||||
</description>
|
||||
<description xml:lang="zh-CN">
|
||||
此插件将把用户信息中的昵称图片,用户图标,签名等信息显示到页面当中。
|
||||
因部分用户不使用此项功能或为了考虑页面载入速度,以插件形式提供此项功能。
|
||||
要想使用会员扩展信息请激活此插件。
|
||||
1. 显示之前先查找定义为 &lt;div class="member_会员编号"&gt;....&lt;/div&gt; 的部分获得会员编号后,再以会员编号确认有没有昵称图片/用户图标,有的话即可更新相关内容。
|
||||
2. 显示之前先查找定义为 &lt;div class="document_编号"&gt;...&lt;/div&gt;的部分判断此处为主题内容后,在此处下方添加个人签名。
|
||||
3. 收到新消息时,用弹出窗口显示。
|
||||
4. 呼出MemberModel::getMemberMenu时,如对方是会员,就添加[发送短消息]功能。
|
||||
5. 呼出MemberModel::getMemberMenu时,添加[加为好友]菜单。
|
||||
</description>
|
||||
<description xml:lang="en">
|
||||
Among other information about users, this addon displays image name, image mark, and signature.
|
||||
This addon is normally turned off to reduce loading time.
|
||||
To display image name, image mark, and the signature, please turn on this addon.
|
||||
1. Right before displaying, this addon will seek for the unique key of the member from &lt;div class="member_{unique key of member}"&gt;....&lt;/div&gt; and will replace the content with the image name and/or image mark if they exist.
|
||||
2. Right before displaying, this addon will search for &lt;div class="document_{unique key of document}"&gt;...&lt;/div&gt; and will display the signature in the bottom of the article.
|
||||
3. When a new msessage is arrived, this will display the message in the popup window.
|
||||
4. This makes available to send a message if the target is a member when MemberModel::getMemberMenu is called.
|
||||
5. This adds a menu for registering as a friend when MemberModel::getMemberMenu is called.
|
||||
This addon displays a member's image name, image mark.
|
||||
</description>
|
||||
<description xml:lang="ge">
|
||||
Unter anderem Informationen über Benutzer, dieses Addon zeigt Bild Name, Bild-Marke, und Unterschrift.
|
||||
Dieses Addon ist normalerweise ausgeschaltet zu verringern Ladezeit.
|
||||
So zeigen Sie Image-Namen-, Bild-Marke, und die Unterschrift, wenden Sie sich bitte in diesem Addon.
|
||||
1. Recht vor Anzeigen, dieses Addon wird sich für den eindeutigen Schlüssel des Mitglieds aus < div class = "member_ (eindeutigen Schlüssel zu den Mitgliedern)" > ....< / div > und ersetzen wird der Inhalt mit den Image-Namen und / oder Bild-Marke, wenn sie vorhanden sind.
|
||||
2. Recht vor Anzeigen, dieses Addon wird nach < div class = "document_ (eindeutigen Schlüssel des Dokuments)" ... > < / div > und die Anzeige der Signatur in der unteren der Artikel.
|
||||
3. Wenn eine neue msessage ist angekommen, dieser wird die Nachricht in einem Popup-Fenster.
|
||||
4. Dies stellt eine Nachricht zu senden, wenn das Ziel ist Mitglied bei MemberModel:: getMemberMenu aufgerufen.
|
||||
5. Dadurch wird ein Menü für die Eintragung als Freund, wenn MemberModel:: getMemberMenu aufgerufen.
|
||||
회원이 등록한 이미지이름, 이미지마크를 사용하기 위해서는 이 애드온을 활성화 시키세요.
|
||||
</description>
|
||||
<description xml:lang="es">
|
||||
Addon que permite mostrar en la pantalla las informaciones del usuario, la imagen del nombre, Imagen de marca y la firma .
|
||||
En caso de no usar estas informaciones, esta forma de usar separadamente en addon permite reducir el tiempo de ejecución.
|
||||
Deberá activar este addon si desea mostrar informaciones adicionales.
|
||||
1. Justo antes de mostrar la información del usuario, este addon buscará la definición "<div class="member_Número del usuario">....</div>", si la encuentra, reemplazará la imagen del nombre y/o la imagen de marca.
|
||||
2. Justo antes de mostrar, este addon va a localizar la definición "<div class="document_Número de documento">...</div> e insertará la firma en la parte final del documento.
|
||||
3. Si ha llegado un nuevo mensaje, aprarecerá una ventana popup.
|
||||
4. Se activa la función "Enviar Mensajes" si la persona que envió la nota es usuario al comprobar en MemberModel::getMemberMenu.
|
||||
5. Agrega el menú "Ägregar Amigo" al llamar MemberModel::getMemberMenu.
|
||||
회원이 등록한 이미지이름, 이미지마크를 사용하기 위해서는 이 애드온을 활성화 시키세요.
|
||||
</description>
|
||||
<description xml:lang="ru">
|
||||
Среди другой информации о пользователях, этот аддон показывает имя изображения, марку изображения и подпись.
|
||||
В случае, если Вы не используете эту информацию, это стоит в стороне от базовой информации, так что время выполнения будет снижено.
|
||||
Чтобы отображать имя изображения, марку изображения и подпись, пожалуйста, включите этот аддон.
|
||||
1. Прямо перед отображением информации пользователя, это создаст уникальный ключ члена из определения "&lt;div class="член_{уникальный ключ члена}"&gt;....&lt;/div&gt;" и заменит имя изображения и/или марку изображения, если они существуют.
|
||||
2. Прямо перед отображением, это должно найти определение "&lt;div class="документ_{уникальный ключ документа}"&gt;...&lt;/div&gt;" и вставить подпись внизу.
|
||||
3. Когда будет получено новое сообщение, оно всплывет.
|
||||
4. Это позволяет отправить сообщение, если назначение является членом, когда MemberModel::getMemberMenu вызывается.
|
||||
5. Это добавляет меню для регистрации как друга, когда MemberModel::getMemberMenu вызывается.
|
||||
회원이 등록한 이미지이름, 이미지마크를 사용하기 위해서는 이 애드온을 활성화 시키세요.
|
||||
</description>
|
||||
</author>
|
||||
</addon>
|
||||
|
|
|
|||
|
|
@ -4,22 +4,14 @@
|
|||
/**
|
||||
* @file image_name.addon.php
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief 사용자의 이미지이름/ 이미지마크나 커뮤니케이션 기능을 추가시킴
|
||||
*
|
||||
* 1. 출력되기 직전 <div class="member_회원번호">....</div> 로 정의가 된 부분을 찾아 회원번호를 구해서
|
||||
* 이미지이름, 이미지마크가 있는지를 확인하여 있으면 내용을 변경해버립니다.
|
||||
*
|
||||
* 3. 새로운 쪽지가 왔을 경우 팝업으로 띄움
|
||||
*
|
||||
* 4. MemberModel::getMemberMenu 호출시 대상이 회원일 경우 쪽지 보내기 기능 추가합니다.
|
||||
*
|
||||
* 5. MemberModel::getMemberMenu 호출시 친구 등록 메뉴를 추가합니다.
|
||||
* @brief 사용자의 이미지이름/ 이미지마크등을 출력
|
||||
*
|
||||
* <div class="member_회원번호">....</div> 로 정의가 된 부분을 찾아 회원번호를 구해서
|
||||
* 이미지이름, 이미지마크가 있는지를 확인하여 있으면 내용을 변경해버립니다.
|
||||
**/
|
||||
|
||||
/**
|
||||
* 1,2 기능 수행 : 출력되기 바로 직전일 경우에 이미지이름/이미지마크등을 변경
|
||||
* 조건 : called_position == 'before_display_content'
|
||||
* 출력되기 바로 직전일 경우에 이미지이름/이미지마크등을 변경
|
||||
**/
|
||||
if($called_position == "before_display_content") {
|
||||
|
||||
|
|
@ -29,88 +21,5 @@
|
|||
// 1. 출력문서중에서 <div class="member_번호">content</div>를 찾아 MemberController::transImageName() 를 이용하여 이미지이름/마크로 변경
|
||||
$output = preg_replace_callback('!<(div|span)([^\>]*)member_([0-9]+)([^\>]*)>(.*?)\<\/(div|span)\>!is', 'memberTransImageName', $output);
|
||||
|
||||
|
||||
/**
|
||||
* 3 기능 수행 : 시작할때 새쪽지가 왔는지 검사
|
||||
* 조건 : called_position = 'before_module_init', module != 'member'
|
||||
**/
|
||||
} elseif($called_position == 'before_module_init' && $this->module != 'member' && Context::get('is_logged') ) {
|
||||
|
||||
// 로그인된 사용자 정보를 구함
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
// 회원 로그인 정보중에서 쪽지등의 메뉴를 추가
|
||||
$logged_info->menu_list['dispMemberFriend'] = 'cmd_view_friend';
|
||||
$logged_info->menu_list['dispMemberMessages'] = 'cmd_view_message_box';
|
||||
Context::set('logged_info', $logged_info);
|
||||
$_SESSION['logged_info'] = $logged_info;
|
||||
|
||||
$flag_path = './files/member_extra_info/new_message_flags/'.getNumberingPath($logged_info->member_srl);
|
||||
$flag_file = sprintf('%s%s', $flag_path, $logged_info->member_srl);
|
||||
|
||||
// 새로운 쪽지에 대한 플래그가 있으면 쪽지 보기 팝업 띄움
|
||||
if(file_exists($flag_file)) {
|
||||
@unlink($flag_file);
|
||||
Context::loadLang('./addons/member_extra_info/lang');
|
||||
$script = sprintf('<script type="text/javascript"> xAddEventListener(window,"load", function() {if(confirm("%s")) { popopen("%s"); }}); </script>', Context::getLang('alert_new_message_arrived'), Context::getRequestUri().'?module=member&act=dispMemberNewMessage');
|
||||
Context::addHtmlHeader( $script );
|
||||
}
|
||||
|
||||
/**
|
||||
* 4,5 기능 수행 : 사용자 이름을 클릭시 요청되는 MemberModel::getMemberMenu 후에 $menu_list에 쪽지 발송, 친구추가등의 링크 추가
|
||||
* 조건 : called_position == 'after_module_proc', module = 'member', act = 'getMemberMenu'
|
||||
**/
|
||||
} elseif($called_position == 'after_module_proc' && $this->module == 'member' && $this->act == 'getMemberMenu') {
|
||||
// 비로그인 사용자라면 패스
|
||||
if(!Context::get('is_logged')) return;
|
||||
|
||||
// 로그인된 사용자 정보를 구함
|
||||
$logged_info = Context::get('logged_info');
|
||||
$member_srl = Context::get('target_srl');
|
||||
|
||||
// 템플릿에서 사용되기 전의 menu_list를 가져옴
|
||||
$menu_list = $this->get('menu_list');
|
||||
|
||||
// 자신이라면 쪽지함 보기 기능 추가
|
||||
if($logged_info->member_srl == $member_srl) {
|
||||
|
||||
// 4. 자신의 쪽지함 보기 기능 추가
|
||||
$menu_str = Context::getLang('cmd_view_message_box');
|
||||
$menu_link = "current_url.setQuery('act','dispMemberMessages').setQuery('message_type','')";
|
||||
$menu_list .= sprintf("\n%s,%s,move_url(%s,'Y')", Context::getRequestUri().'/modules/member/tpl/images/icon_message_box.gif', $menu_str, $menu_link);
|
||||
|
||||
// 5. 친구 목록 보기
|
||||
$menu_str = Context::getLang('cmd_view_friend');
|
||||
$menu_link = "current_url.setQuery('act','dispMemberFriend')";
|
||||
$menu_list .= sprintf("\n%s,%s,move_url(%s,'Y')", Context::getRequestUri().'/modules/member/tpl/images/icon_friend_box.gif',$menu_str, $menu_link);
|
||||
|
||||
|
||||
// 아니라면 쪽지 발송, 친구 등록 추가
|
||||
} else {
|
||||
|
||||
// 대상 회원의 정보를 가져옴
|
||||
$target_member_info = $this->getMemberInfoByMemberSrl($member_srl);
|
||||
if(!$target_member_info->member_srl) return;
|
||||
|
||||
// 로그인된 사용자 정보를 구함
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
// 4. 쪽지 발송 메뉴를 만듬
|
||||
if( $logged_info->is_admin == 'Y' || $target_member_info->allow_message =='Y' || ($target_member_info->allow_message == 'F' && $this->isFriend($member_srl))) {
|
||||
$menu_str = Context::getLang('cmd_send_message');
|
||||
$menu_link = sprintf('%s?module=member&act=dispMemberSendMessage&receiver_srl=%s',Context::getRequestUri(),$member_srl);
|
||||
$menu_list .= sprintf("\n%s,%s,popopen('%s','sendMessage')", Context::getRequestUri().'/modules/member/tpl/images/icon_write_message.gif', $menu_str, $menu_link);
|
||||
}
|
||||
|
||||
// 5. 친구 등록 메뉴를 만듬 (이미 등록된 친구가 아닐 경우)
|
||||
if(!$this->isAddedFriend($member_srl)) {
|
||||
$menu_str = Context::getLang('cmd_add_friend');
|
||||
$menu_link = sprintf('%s?module=member&act=dispMemberAddFriend&target_srl=%s',Context::getRequestUri(),$member_srl);
|
||||
$menu_list .= sprintf("\n%s,%s,popopen('%s','addFriend')", Context::getRequestUri().'/modules/member/tpl/images/icon_add_friend.gif', $menu_str, $menu_link);
|
||||
}
|
||||
}
|
||||
|
||||
// 템플릿에 적용되게 하기 위해 module의 variables에 재등록
|
||||
$this->add('menu_list', $menu_list);
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
<addon version="0.1">
|
||||
<title xml:lang="ko">본문내 이미지 조절 애드온</title>
|
||||
<title xml:lang="zh-CN">内容区图片缩放插件</title>
|
||||
<title xml:lang="en">Image Resizer</title>
|
||||
<title xml:lang="es">Imagen de control add-on bonmunnae</title>
|
||||
<title xml:lang="ru">Image контроля добавить-на bonmunnae</title>
|
||||
<title xml:lang="ge">Image-Add-on bonmunnae</title>
|
||||
|
|
@ -20,13 +21,16 @@
|
|||
<description xml:lang="zh-CN">
|
||||
自动调整主题内容区内的图片大小,点击将显示原始大小的插件。
|
||||
</description>
|
||||
<description xml:lang="es">
|
||||
<description xml:lang="en">
|
||||
This addon resizes images inserted in the article, and shows original image when you click on them.
|
||||
</description>
|
||||
<description xml:lang="es">
|
||||
La imagen corporal se inserta dentro del cuerpo para que se adapte al tamaño de la muestra original cuando hago clic en los add-ons.
|
||||
</description>
|
||||
<description xml:lang="ru">
|
||||
<description xml:lang="ru">
|
||||
Орган изображение вставляется внутрь тела с учетом размера первоначального шоу, когда я нажимаю на надстройки.
|
||||
</description>
|
||||
<description xml:lang="ge">
|
||||
<description xml:lang="ge">
|
||||
Body Bild eingefügt im Inneren des Körpers zu passen die Größe des Originals zeigen, wenn ich darauf klicke auf das Add-ons.
|
||||
</description>
|
||||
</author>
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
@charset "utf-8";
|
||||
|
||||
#forOriginalImageAreaBackground { z-index:1001; background-color:#AAAAAA; top:0px; left:0px; position:relative; padding:0; border:8px solid #444444; white-space:nowrap; }
|
||||
#forOriginalImageArea { visibility:hidden; padding:0px; margin:0px; width:100%; height:100%; top:0px; left:0px; position:absolute; z-index:1000; text-align:left; overflow:hidden; background-color:#000000;}
|
||||
#fororiginalimage { z-index:1002; margin:0; padding:0; }
|
||||
BIN
addons/resize_image/iconClose.png
Executable file
BIN
addons/resize_image/iconClose.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
BIN
addons/resize_image/iconLeft.png
Executable file
BIN
addons/resize_image/iconLeft.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
BIN
addons/resize_image/iconRight.png
Executable file
BIN
addons/resize_image/iconRight.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
|
|
@ -1,52 +1,64 @@
|
|||
/**
|
||||
* @brief 화면내에서 상위 영역보다 이미지가 크면 리사이즈를 하고 클릭시 원본을 보여줄수 있도록 변경
|
||||
**/
|
||||
var imageGalleryIndex = new Array();
|
||||
function resizeImageContents() {
|
||||
// 일단 모든 이미지에 대한 체크를 시작
|
||||
var objs = xGetElementsByTagName("IMG");
|
||||
for(var i in objs) {
|
||||
var obj = objs[i];
|
||||
if(!obj.parentNode) continue;
|
||||
// 이미지 태그 정규 표현식
|
||||
var img_regx = new RegExp("<img","im");
|
||||
var site_regx = new RegExp("^"+request_uri,"im");
|
||||
|
||||
// xe_content 내의 이미지 요소들에 대한 체크
|
||||
var xe_objs = xGetElementsByClassName("xe_content");
|
||||
for(var j=0;j<xe_objs.length;j++) {
|
||||
|
||||
if(/\/modules\//i.test(obj.src)) continue;
|
||||
if(/\/layouts\//i.test(obj.src)) continue;
|
||||
if(/\/widgets\//i.test(obj.src)) continue;
|
||||
if(/\/classes\//i.test(obj.src)) continue;
|
||||
if(/\/common\/tpl\//i.test(obj.src)) continue;
|
||||
if(/\/member_extra_info\//i.test(obj.src)) continue;
|
||||
imageGalleryIndex[j] = new Array();
|
||||
|
||||
// 상위 node의 className이 document_ 또는 comment_ 로 시작하지 않으면 패스
|
||||
var parent = obj.parentNode;
|
||||
while(parent) {
|
||||
if(parent.className && parent.className.search(/xe_content|document_|comment_/i) != -1) break;
|
||||
parent = parent.parentNode;
|
||||
}
|
||||
if (!parent || parent.className.search(/xe_content|document_|comment_/i) < 0) continue;
|
||||
var html = xInnerHtml(xe_objs[j]);
|
||||
if(!img_regx.test(html)) continue;
|
||||
|
||||
if(parent.parentNode) xWidth(parent, xWidth(parent.parentNode));
|
||||
parent.style.width = '100%';
|
||||
parent.style.overflow = 'hidden';
|
||||
// 모든 이미지에 대한 체크를 시작
|
||||
var objs = xGetElementsByTagName("IMG", xe_objs[j]);
|
||||
|
||||
var parent_width = xWidth(parent);
|
||||
if(parent.parentNode && xWidth(parent.parentNode)<parent_width) parent_width = xWidth(parent.parentNode);
|
||||
var obj_width = xWidth(obj);
|
||||
var obj_height = xHeight(obj);
|
||||
for(var i=0;i<objs.length;i++) {
|
||||
var obj = objs[i];
|
||||
|
||||
// zbXE내부 프로그램 또는 스킨의 이미지라면 이미지 리사이즈를 하지 않음
|
||||
if(!/\/(modules|addons|classes|common|layouts|libs|widgets)\//i.test(obj.src)) {
|
||||
var parent = obj.parentNode;
|
||||
while(parent) {
|
||||
if(/(document|comment)_([0-9]*)_([0-9]*)/i.test(parent.className) ) break;
|
||||
parent = parent.parentNode;
|
||||
}
|
||||
if(!parent) continue;
|
||||
|
||||
var dummy = xCreateElement("div");
|
||||
dummy.style.visibility = "hidden";
|
||||
dummy.style.border = "1px solid red";
|
||||
parent.parentNode.insertBefore(dummy, parent);
|
||||
|
||||
var parent_width = xWidth(dummy);
|
||||
parent.parentNode.removeChild(dummy);
|
||||
dummy = null;
|
||||
|
||||
var obj_width = xWidth(obj);
|
||||
var obj_height = xHeight(obj);
|
||||
|
||||
// 만약 선택된 이미지의 가로 크기가 부모의 가로크기보다 크면 리사이즈 (이때 부모의 가로크기 - 2 정도로 지정해줌)
|
||||
if(obj_width > parent_width - 2) {
|
||||
obj.style.cursor = "pointer";
|
||||
var new_w = parent_width - 2;
|
||||
var new_h = Math.round(obj_height * new_w/obj_width);
|
||||
xWidth(obj, new_w);
|
||||
xHeight(obj, new_h);
|
||||
}
|
||||
|
||||
// 만약 선택된 이미지의 가로 크기가 부모의 가로크기보다 크면 리사이즈 (이때 부모의 가로크기 - 2 정도로 지정해줌)
|
||||
if(obj_width > parent_width - 2) {
|
||||
obj.style.cursor = "pointer";
|
||||
var new_w = parent_width - 2;
|
||||
var new_h = Math.round(obj_height * new_w/obj_width);
|
||||
xWidth(obj, new_w);
|
||||
xHeight(obj, new_h);
|
||||
xAddEventListener(obj,"click", showOriginalImage);
|
||||
// 선택된 이미지가 부모보다 작을 경우 일단 원본 이미지를 불러와서 비교
|
||||
} else {
|
||||
var orig_img = new Image();
|
||||
orig_img.src = obj.src;
|
||||
if(orig_img.width > parent_width - 2 || orig_img.width != obj_width) {
|
||||
obj.style.cursor = "pointer";
|
||||
xAddEventListener(obj,"click", showOriginalImage);
|
||||
|
||||
// 만약 대상 이미지에 링크가 설정되어 있거나 onclick 이벤트가 부여되어 있으면 원본 보기를 하지 않음
|
||||
if(obj.parentNode.nodeName.toLowerCase()!='a' && !obj.getAttribute('onclick')) xAddEventListener(obj,"click", showOriginalImage);
|
||||
|
||||
imageGalleryIndex[j][i] = obj.src;
|
||||
obj.setAttribute("rel", j+','+i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -60,73 +72,198 @@ function showOriginalImage(evt) {
|
|||
var e = new xEvent(evt);
|
||||
var obj = e.target;
|
||||
var src = obj.src;
|
||||
var rel = obj.getAttribute('rel');
|
||||
displayOriginalImage(src, rel);
|
||||
}
|
||||
|
||||
function displayOriginalImage(src, rel) {
|
||||
// 투명 배경을 지정
|
||||
var bgObj = xGetElementById("forOriginalImageBGArea");
|
||||
if(!bgObj) {
|
||||
bgObj = xCreateElement("div");
|
||||
bgObj.id = "forOriginalImageBGArea";
|
||||
bgObj.style.visibility = "hidden";
|
||||
bgObj.style.backgroundColor = "#000000";
|
||||
bgObj.style.zIndex = 500;
|
||||
bgObj.style.position = "absolute";
|
||||
document.body.appendChild(bgObj);
|
||||
}
|
||||
xWidth(bgObj, xClientWidth());
|
||||
xHeight(bgObj, xClientHeight());
|
||||
xLeft(bgObj, xScrollLeft());
|
||||
xTop(bgObj, xScrollTop());
|
||||
bgObj.style.opacity = .5;
|
||||
bgObj.style.filter = "alpha(opacity=50);";
|
||||
bgObj.style.visibility = "visible";
|
||||
|
||||
// 원본 이미지 노출을 위한 준비
|
||||
var foreObj = xGetElementById("forOriginalImageArea");
|
||||
if(!foreObj) {
|
||||
foreObj = xCreateElement("div");
|
||||
foreObj.id = "forOriginalImageArea";
|
||||
foreObj.style.visibility = "hidden";
|
||||
foreObj.style.overflow = "hidden";
|
||||
foreObj.style.position = "absolute";
|
||||
foreObj.style.zIndex = 510;
|
||||
document.body.appendChild(foreObj);
|
||||
}
|
||||
xWidth(foreObj, xClientWidth());
|
||||
xHeight(foreObj, xClientHeight());
|
||||
xLeft(foreObj, xScrollLeft());
|
||||
xTop(foreObj, xScrollTop());
|
||||
foreObj.style.visibility = "visible";
|
||||
|
||||
var foreWidth = xWidth(foreObj);
|
||||
var foreHeight = xHeight(foreObj);
|
||||
|
||||
// 버튼
|
||||
var iconClose = xGetElementById("forOriginalImageIconClose");
|
||||
if(!iconClose) {
|
||||
iconClose = xCreateElement("img");
|
||||
iconClose.id = "forOriginalImageIconClose";
|
||||
iconClose.style.position = "absolute";
|
||||
iconClose.src = request_uri+"addons/resize_image/iconClose.png";
|
||||
iconClose.style.width = iconClose.style.height = "60px";
|
||||
iconClose.className = 'iePngFix';
|
||||
iconClose.style.zIndex = 530;
|
||||
iconClose.style.cursor = "pointer";
|
||||
foreObj.appendChild(iconClose);
|
||||
}
|
||||
iconClose.style.visibility = 'visible';
|
||||
xLeft(iconClose, (foreWidth-60)/2);
|
||||
xTop(iconClose, 10);
|
||||
|
||||
var iconLeft = xGetElementById("forOriginalImageIconLeft");
|
||||
if(!iconLeft) {
|
||||
iconLeft = xCreateElement("img");
|
||||
iconLeft.id = "forOriginalImageIconLeft";
|
||||
iconLeft.style.position = "absolute";
|
||||
iconLeft.src = request_uri+"addons/resize_image/iconLeft.png";
|
||||
iconLeft.style.width = iconLeft.style.height = "60px";
|
||||
iconLeft.style.zIndex = 530;
|
||||
iconLeft.className = 'iePngFix';
|
||||
iconLeft.style.cursor = "pointer";
|
||||
foreObj.appendChild(iconLeft);
|
||||
}
|
||||
iconLeft.onclick = null;
|
||||
xLeft(iconLeft, 10);
|
||||
xTop(iconLeft, (foreHeight-60)/2);
|
||||
iconLeft.style.visibility = 'hidden';
|
||||
|
||||
var iconRight = xGetElementById("forOriginalImageIconRight");
|
||||
if(!iconRight) {
|
||||
iconRight = xCreateElement("img");
|
||||
iconRight.id = "forOriginalImageIconRight";
|
||||
iconRight.style.position = "absolute";
|
||||
iconRight.src = request_uri+"addons/resize_image/iconRight.png";
|
||||
iconRight.style.width = iconRight.style.height = "60px";
|
||||
iconRight.className = 'iePngFix';
|
||||
iconRight.style.zIndex = 530;
|
||||
iconRight.style.cursor = "pointer";
|
||||
foreObj.appendChild(iconRight);
|
||||
}
|
||||
iconRight.onclick = null;
|
||||
xLeft(iconRight, foreWidth - 10 - 60);
|
||||
xTop(iconRight, (foreHeight-60)/2);
|
||||
iconRight.style.visibility = 'hidden';
|
||||
|
||||
|
||||
if(rel) {
|
||||
var tmp = rel.split(',');
|
||||
var j = parseInt(tmp[0],10);
|
||||
var i = parseInt(tmp[1],10);
|
||||
var length = imageGalleryIndex[j].length;
|
||||
|
||||
if(length>1) {
|
||||
|
||||
var prev = i-1;
|
||||
var next = i+1;
|
||||
if(prev>=0) {
|
||||
iconLeft.style.visibility = 'visible';
|
||||
iconLeft.onclick = function() { displayOriginalImage(imageGalleryIndex[j][prev], j+','+prev); }
|
||||
} else {
|
||||
iconLeft.style.visibility = 'hidden';
|
||||
}
|
||||
|
||||
if(next<length) {
|
||||
iconRight.style.visibility = 'visible';
|
||||
iconRight.onclick = function() { displayOriginalImage(imageGalleryIndex[j][next], j+','+next); }
|
||||
} else {
|
||||
iconRight.style.visibility = 'hidden';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(!xGetElementById("forOriginalImageArea")) {
|
||||
var dummy = xCreateElement("div");
|
||||
dummy.id = "forOriginalImageArea";
|
||||
dummy.style.visibility = "hidden";
|
||||
xInnerHtml(dummy, "<div id=\"forOriginalImageAreaBackground\"><img src=\""+request_uri+"common/tpl/images/blank.gif\" alt=\"original image\" border=\"0\" id=\"fororiginalimage\" /></div>");
|
||||
document.body.appendChild(dummy);
|
||||
}
|
||||
|
||||
var orig_image = xGetElementById("fororiginalimage");
|
||||
var tmp_image = new Image();
|
||||
tmp_image.src = src;
|
||||
var image_width = tmp_image.width;
|
||||
var image_height = tmp_image.height;
|
||||
// 원본 이미지를 추가
|
||||
var origObj = xGetElementById("forOriginalImage");
|
||||
if(origObj) foreObj.removeChild(origObj);
|
||||
|
||||
orig_image.style.margin = "0px 0px 0px 0px";
|
||||
orig_image.style.cursor = "move";
|
||||
orig_image.src = src;
|
||||
origObj = null;
|
||||
origObj = xCreateElement("img");
|
||||
origObj.id = "forOriginalImage";
|
||||
origObj.style.border = "7px solid #ffffff";
|
||||
origObj.style.visibility = "hidden";
|
||||
origObj.style.cursor = "move";
|
||||
origObj.style.zIndex = 520;
|
||||
foreObj.appendChild(origObj);
|
||||
|
||||
var areabg = xGetElementById("forOriginalImageAreaBackground");
|
||||
xWidth(areabg, image_width+16);
|
||||
xHeight(areabg, image_height+16);
|
||||
origObj.style.position = "relative";
|
||||
origObj.src = src;
|
||||
|
||||
var area = xGetElementById("forOriginalImageArea");
|
||||
xLeft(area, xScrollLeft());
|
||||
xTop(area, xScrollTop());
|
||||
xWidth(area, xWidth(document));
|
||||
xHeight(area, xHeight(document));
|
||||
area.style.visibility = "visible";
|
||||
var area_width = xWidth(area);
|
||||
var area_height = xHeight(area);
|
||||
var objWidth = xWidth(origObj);
|
||||
var objHeight = xHeight(origObj);
|
||||
|
||||
var x = parseInt((area_width-image_width)/2,10);
|
||||
var y = parseInt((area_height-image_height)/2,10);
|
||||
if(x<0) x = 0;
|
||||
if(y<0) y = 0;
|
||||
xLeft(areabg, x);
|
||||
xTop(areabg, y);
|
||||
var posX = 0;
|
||||
var posY = 0;
|
||||
|
||||
if(objWidth < foreWidth) posX = parseInt( (foreWidth - objWidth) / 2, 10);
|
||||
if(objHeight < foreHeight) posY = parseInt( (foreHeight - objHeight) / 2, 10);
|
||||
|
||||
xLeft(origObj, posX);
|
||||
xTop(origObj, posY);
|
||||
|
||||
origObj.style.visibility = "visible";
|
||||
|
||||
var sel_list = xGetElementsByTagName("select");
|
||||
for (var i = 0; i < sel_list.length; ++i) sel_list[i].style.visibility = "hidden";
|
||||
|
||||
xAddEventListener(orig_image, "mousedown", origImageDragEnable);
|
||||
xAddEventListener(orig_image, "dblclick", closeOriginalImage);
|
||||
xAddEventListener(origObj, "mousedown", origImageDragEnable);
|
||||
xAddEventListener(origObj, "dblclick", closeOriginalImage);
|
||||
xAddEventListener(iconClose, "mousedown", closeOriginalImage);
|
||||
xAddEventListener(window, "scroll", closeOriginalImage);
|
||||
xAddEventListener(window, "resize", closeOriginalImage);
|
||||
xAddEventListener(document, 'keydown',closeOriginalImage);
|
||||
|
||||
areabg.style.visibility = 'visible';
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 원본 이미지 보여준 후 닫는 함수
|
||||
**/
|
||||
function closeOriginalImage(evt) {
|
||||
var area = xGetElementById("forOriginalImageArea");
|
||||
if(area.style.visibility != "visible") return;
|
||||
area.style.visibility = "hidden";
|
||||
xGetElementById("forOriginalImageAreaBackground").style.visibility = "hidden";
|
||||
var bgObj = xGetElementById("forOriginalImageBGArea");
|
||||
var foreObj = xGetElementById("forOriginalImageArea");
|
||||
var origObj = xGetElementById("forOriginalImage");
|
||||
var iconClose = xGetElementById("forOriginalImageIconClose");
|
||||
var iconLeft = xGetElementById("forOriginalImageIconLeft");
|
||||
var iconRight = xGetElementById("forOriginalImageIconRight");
|
||||
|
||||
var sel_list = xGetElementsByTagName("select");
|
||||
for (var i = 0; i < sel_list.length; ++i) sel_list[i].style.visibility = "visible";
|
||||
|
||||
xRemoveEventListener(area, "mousedown", closeOriginalImage);
|
||||
xRemoveEventListener(origObj, "mousedown", origImageDragEnable);
|
||||
xRemoveEventListener(origObj, "dblclick", closeOriginalImage);
|
||||
xRemoveEventListener(iconClose, "mousedown", closeOriginalImage);
|
||||
xRemoveEventListener(window, "scroll", closeOriginalImage);
|
||||
xRemoveEventListener(window, "resize", closeOriginalImage);
|
||||
xRemoveEventListener(document, 'keydown',closeOriginalImage);
|
||||
|
||||
bgObj.style.visibility = "hidden";
|
||||
foreObj.style.visibility = "hidden";
|
||||
origObj.style.visibility = "hidden";
|
||||
iconClose.style.visibility = 'hidden';
|
||||
iconLeft.style.visibility = 'hidden';
|
||||
iconRight.style.visibility = 'hidden';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -136,7 +273,7 @@ var origDragManager = {obj:null, isDrag:false}
|
|||
function origImageDragEnable(evt) {
|
||||
var e = new xEvent(evt);
|
||||
var obj = e.target;
|
||||
if(obj.id != "fororiginalimage") return;
|
||||
if(obj.id != "forOriginalImage") return;
|
||||
|
||||
obj.draggable = true;
|
||||
obj.startX = e.pageX;
|
||||
|
|
@ -154,9 +291,9 @@ function origImageDrag(obj, px, py) {
|
|||
var x = px - obj.startX;
|
||||
var y = py - obj.startY;
|
||||
|
||||
var areabg = xGetElementById("forOriginalImageAreaBackground");
|
||||
xLeft(areabg, xLeft(areabg)+x);
|
||||
xTop(areabg, xTop(areabg)+y);
|
||||
var origObj = xGetElementById("forOriginalImage");
|
||||
xLeft(origObj, xLeft(origObj)+x);
|
||||
xTop(origObj, xTop(origObj)+y);
|
||||
|
||||
obj.startX = px;
|
||||
obj.startY = py;
|
||||
|
|
@ -165,7 +302,7 @@ function origImageDrag(obj, px, py) {
|
|||
function origImageDragMouseDown(evt) {
|
||||
var e = new xEvent(evt);
|
||||
var obj = e.target;
|
||||
if(obj.id != "fororiginalimage" || !obj.draggable) return;
|
||||
if(obj.id != "forOriginalImage" || !obj.draggable) return;
|
||||
|
||||
if(obj) {
|
||||
xPreventDefault(evt);
|
||||
|
|
@ -193,7 +330,7 @@ function origImageDragMouseMove(evt) {
|
|||
var e = new xEvent(evt);
|
||||
var obj = e.target;
|
||||
if(!obj) return;
|
||||
if(obj.id != "fororiginalimage") {
|
||||
if(obj.id != "forOriginalImage") {
|
||||
xPreventDefault(evt);
|
||||
xRemoveEventListener(document, 'mouseup', origImageDragMouseUp, false);
|
||||
xRemoveEventListener(document, 'mousemove', origImageDragMouseMove, false);
|
||||
|
|
|
|||
|
|
@ -9,6 +9,5 @@
|
|||
|
||||
if($called_position == 'after_module_proc' && Context::getResponseMethod()!="XMLRPC") {
|
||||
Context::addJsFile('./addons/resize_image/js/resize_image.js');
|
||||
Context::addCSSFile('./addons/resize_image/css/resize_image.css');
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -48,14 +48,14 @@
|
|||
var $is_uploaded = false; ///< @brief 첨부파일이 업로드 된 요청이였는지에 대한 체크 플래그
|
||||
|
||||
/**
|
||||
* @brief Context 객체를 GLOBALS 변수에 생성
|
||||
* @brief 유일한 Context 객체를 반환 (Singleton)
|
||||
*
|
||||
* Context는 어디서든 객체 선언없이 사용하기 위해서 static 하게 사용\n
|
||||
* php5라면 GLOBALS가 아닌 static으로 처리 가능
|
||||
* Context는 어디서든 객체 선언없이 사용하기 위해서 static 하게 사용
|
||||
**/
|
||||
function &getInstance() {
|
||||
if(!$GLOBALS['__ContextInstance__']) $GLOBALS['__ContextInstance__'] = new Context();
|
||||
return $GLOBALS['__ContextInstance__'];
|
||||
static $theInstance;
|
||||
if(!isset($theInstance)) $theInstance = new Context();
|
||||
return $theInstance;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -73,12 +73,25 @@
|
|||
// 기본적인 DB정보 세팅
|
||||
$this->_loadDBInfo();
|
||||
|
||||
// 세션 핸들러 지정
|
||||
$oSessionModel = &getModel('session');
|
||||
$oSessionController = &getController('session');
|
||||
session_set_save_handler(
|
||||
array(&$oSessionController,"open"),
|
||||
array(&$oSessionController,"close"),
|
||||
array(&$oSessionModel,"read"),
|
||||
array(&$oSessionController,"write"),
|
||||
array(&$oSessionController,"destroy"),
|
||||
array(&$oSessionController,"gc")
|
||||
);
|
||||
session_start();
|
||||
|
||||
// 쿠키로 설정된 언어타입 가져오기
|
||||
if($_COOKIE['lang_type']) $this->lang_type = $_COOKIE['lang_type'];
|
||||
else $this->lang_type = $this->db_info->lang_type;
|
||||
|
||||
// 등록된 기본 언어파일 찾기
|
||||
$langs = file('./common/lang/lang.info');
|
||||
$langs = file(_XE_PATH_.'common/lang/lang.info');
|
||||
$accept_lang = strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
||||
foreach($langs as $val) {
|
||||
list($lang_prefix, $lang_text) = explode(',',$val);
|
||||
|
|
@ -99,7 +112,7 @@
|
|||
|
||||
// 기본 언어파일 로드
|
||||
$this->lang = &$GLOBALS['lang'];
|
||||
$this->_loadLang("./common/lang/");
|
||||
$this->_loadLang(_XE_PATH_."common/lang/");
|
||||
|
||||
// Request Method 설정
|
||||
$this->_setRequestMethod();
|
||||
|
|
@ -129,7 +142,7 @@
|
|||
}
|
||||
|
||||
// rewrite 모듈사용 상태 체크
|
||||
if(file_exists('./.htaccess')&&$this->db_info->use_rewrite == 'Y') $this->allow_rewrite = true;
|
||||
if(file_exists(_XE_PATH_.'.htaccess')&&$this->db_info->use_rewrite == 'Y') $this->allow_rewrite = true;
|
||||
else $this->allow_rewrite = false;
|
||||
|
||||
// 기본 JS/CSS 등록
|
||||
|
|
@ -139,7 +152,9 @@
|
|||
$this->addJsFile("./common/js/xml_js_filter.js");
|
||||
$this->addCSSFile("./common/css/default.css");
|
||||
$this->addCSSFile("./common/css/button.css");
|
||||
if(Context::get('module')=='admin' || strpos(Context::get('act'),'Admin')>0) $this->addCssFile("./modules/admin/tpl/css/admin.css");
|
||||
|
||||
// 관리자 페이지일 경우 관리자 공용 CSS 추가
|
||||
if(Context::get('module')=='admin' || strpos(Context::get('act'),'Admin')>0) $this->addCssFile("./modules/admin/tpl/css/admin.css", false);
|
||||
|
||||
// rewrite module때문에 javascript에서 location.href 문제 해결을 위해 직접 실제 경로 설정
|
||||
if($_SERVER['REQUEST_METHOD'] == 'GET') {
|
||||
|
|
@ -162,6 +177,9 @@
|
|||
* @brief DB및 기타 자원들의 close
|
||||
**/
|
||||
function close() {
|
||||
// Session Close
|
||||
if(function_exists('session_write_close')) session_write_close();
|
||||
|
||||
// DB close
|
||||
$oDB = &DB::getInstance();
|
||||
if(is_object($oDB)&&method_exists($oDB, 'close')) $oDB->close();
|
||||
|
|
@ -177,15 +195,15 @@
|
|||
$db_config_file = $this->getConfigFile();
|
||||
if(file_exists($db_config_file)) @include($db_config_file);
|
||||
|
||||
if(!$db_info->time_zone) $db_info->time_zone = date("O");
|
||||
if(!$db_info->use_optimizer || $db_info->use_optimizer != 'N') $db_info->use_optimizer = 'Y';
|
||||
else $db_info->use_optimizer = 'N';
|
||||
if(!$db_info->qmail_compatibility || $db_info->qmail_compatibility != 'Y') $db_info->qmail_compatibility = 'N';
|
||||
if(!$db_info->time_zone) $db_info->time_zone = date("O");
|
||||
if(!$db_info->use_optimizer || $db_info->use_optimizer != 'N') $db_info->use_optimizer = 'Y';
|
||||
else $db_info->use_optimizer = 'N';
|
||||
if(!$db_info->qmail_compatibility || $db_info->qmail_compatibility != 'Y') $db_info->qmail_compatibility = 'N';
|
||||
else $db_info->qmail_compatibility = 'Y';
|
||||
|
||||
$this->_setDBInfo($db_info);
|
||||
|
||||
$GLOBALS['_time_zone'] = $db_info->time_zone;
|
||||
|
||||
$GLOBALS['_time_zone'] = $db_info->time_zone;
|
||||
$GLOBALS['_qmail_compatibility'] = $db_info->qmail_compatibility;
|
||||
}
|
||||
|
||||
|
|
@ -576,40 +594,60 @@
|
|||
$get_vars[$key] = $val;
|
||||
}
|
||||
|
||||
/* member module중의 쪽지함/친구 관리 기능이 communication 모듈로 이전하여 하위 호환성을 위한 act값 변경 */
|
||||
if($get_vars['act'] == 'dispMemberFriend') $get_vars['act'] = 'dispCommunicationFriend';
|
||||
elseif($get_vars['act'] == 'dispMemberMessages') $get_vars['act'] = 'dispCommunicationMessages';
|
||||
|
||||
$var_count = count($get_vars);
|
||||
if(!$var_count) return '';
|
||||
|
||||
if($get_vars['act'] && $this->isExistsSSLAction($get_vars['act'])) $path = $this->getRequestUri(ENFORCE_SSL);
|
||||
else $path = $this->getRequestUri(RELEASE_SSL);
|
||||
|
||||
// rewrite모듈을 사용하고 인자의 값이 4개 이하일 경우
|
||||
if($this->allow_rewrite && $var_count < 4) {
|
||||
$var_keys = array_keys($get_vars);
|
||||
// rewrite모듈을 사용할때 getUrl()을 이용한 url 생성
|
||||
if($this->allow_rewrite) {
|
||||
if(count($get_vars)) foreach($get_vars as $key => $value) if($value !== 0 && !$value) unset($get_vars[$key]);
|
||||
|
||||
if($var_count == 1) {
|
||||
if($var_keys[0]=='mid') return $path.$get_vars['mid'];
|
||||
elseif($var_keys[0]=='document_srl') return $path.$get_vars['document_srl'];
|
||||
} elseif($var_count == 2) {
|
||||
asort($var_keys);
|
||||
$target = implode('.',$var_keys);
|
||||
if($target=='act.mid' && !preg_match('/([A-Z]+)/',$get_vars['act'])) return sprintf('%s%s/%s',$path,$get_vars['mid'],$get_vars['act']);
|
||||
elseif($target=='document_srl.mid') return sprintf('%s%s/%s',$path,$get_vars['mid'],$get_vars['document_srl']);
|
||||
elseif($target=='act.document_srl') return sprintf('%s%s/%s',$path,$get_vars['document_srl'],$get_vars['act']);
|
||||
elseif($target=='mid.page') return sprintf('%s%s/page/%s',$path,$get_vars['mid'],$get_vars['page']);
|
||||
elseif($target=='category.mid') return sprintf('%s%s/category/%s',$path,$get_vars['mid'],$get_vars['category']);
|
||||
} elseif($var_count == 3) {
|
||||
asort($var_keys);
|
||||
$target = implode('.',$var_keys);
|
||||
if($target=='act.document_srl.key') {
|
||||
$var_keys = array_keys($get_vars);
|
||||
asort($var_keys);
|
||||
$target = implode('.',$var_keys);
|
||||
|
||||
switch($target) {
|
||||
case 'mid' :
|
||||
return $path.$get_vars['mid'];
|
||||
case 'document_srl' :
|
||||
return $path.$get_vars['document_srl'];
|
||||
case 'act.mid' :
|
||||
return sprintf('%s%s/%s',$path,$get_vars['mid'],$get_vars['act']);
|
||||
case 'document_srl.mid' :
|
||||
return sprintf('%s%s/%s',$path,$get_vars['mid'],$get_vars['document_srl']);
|
||||
case 'act.document_srl' :
|
||||
return sprintf('%s%s/%s',$path,$get_vars['document_srl'],$get_vars['act']);
|
||||
case 'mid.page' :
|
||||
return sprintf('%s%s/page/%s',$path,$get_vars['mid'],$get_vars['page']);
|
||||
case 'category.mid' :
|
||||
return sprintf('%s%s/category/%s',$path,$get_vars['mid'],$get_vars['category']);
|
||||
case 'act.document_srl.key' :
|
||||
return sprintf('%s%s/%s/%s',$path,$get_vars['document_srl'],$get_vars['key'],$get_vars['act']);
|
||||
} elseif($target=='category.mid.page') {
|
||||
case 'document_srl.mid.page' :
|
||||
return sprintf('%s%s/%s/page/%s',$path,$get_vars['mid'],$get_vars['document_srl'],$get_vars['page']);
|
||||
case 'category.mid.page' :
|
||||
return sprintf('%s%s/category/%s/page/%s',$path,$get_vars['mid'],$get_vars['category'],$get_vars['page']);
|
||||
} elseif($target=='mid.search_keyword.search_target' && $get_vars['search_target']=='tag') {
|
||||
return sprintf('%s%s/tag/%s',$path,$get_vars['mid'],str_replace(' ','-',$get_vars['search_keyword']));
|
||||
} elseif($target=='mid.search_keyword.search_target' && $get_vars['search_target']=='regdate') {
|
||||
if(strlen($get_vars['search_keyword'])==8) return sprintf('%s%s/%04d/%02d/%02d',$path,$get_vars['mid'],substr($get_vars['search_keyword'],0,4),substr($get_vars['search_keyword'],4,2),substr($get_vars['search_keyword'],6,2));
|
||||
elseif(strlen($get_vars['search_keyword'])==6) return sprintf('%s%s/%04d/%02d',$path,$get_vars['mid'],substr($get_vars['search_keyword'],0,4),substr($get_vars['search_keyword'],4,2));
|
||||
}
|
||||
case 'mid.search_keyword.search_target' :
|
||||
switch($get_vars['search_target']) {
|
||||
case 'tag' :
|
||||
return sprintf('%s%s/tag/%s',$path,$get_vars['mid'],str_replace(' ','-',$get_vars['search_keyword']));
|
||||
case 'nick_name' :
|
||||
return sprintf('%s%s/writer/%s',$path,$get_vars['mid'],str_replace(' ','-',$get_vars['search_keyword']));
|
||||
case 'regdate' :
|
||||
if(strlen($get_vars['search_keyword'])==8) return sprintf('%s%s/%04d/%02d/%02d',$path,$get_vars['mid'],substr($get_vars['search_keyword'],0,4),substr($get_vars['search_keyword'],4,2),substr($get_vars['search_keyword'],6,2));
|
||||
elseif(strlen($get_vars['search_keyword'])==6) return sprintf('%s%s/%04d/%02d',$path,$get_vars['mid'],substr($get_vars['search_keyword'],0,4),substr($get_vars['search_keyword'],4,2));
|
||||
}
|
||||
break;
|
||||
case 'act.document_srl.mid' :
|
||||
return sprintf('%s%s/%s/%s',$path,$get_vars['mid'], $get_vars['act'],$get_vars['document_srl']);
|
||||
case 'act.document_srl.mid.page' :
|
||||
return sprintf('%s%s/%s/%s/page/%s',$path,$get_vars['mid'], $get_vars['act'], $get_vars['document_srl'],$get_vars['page']);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -638,6 +676,7 @@
|
|||
$use_ssl = false;
|
||||
break;
|
||||
}
|
||||
|
||||
return sprintf("%s://%s%s",$use_ssl?'https':'http',$_SERVER['HTTP_HOST'], getScriptPath());
|
||||
}
|
||||
|
||||
|
|
@ -805,7 +844,7 @@
|
|||
* @brief js file 목록을 return
|
||||
**/
|
||||
function _getJsFile() {
|
||||
require_once("./classes/optimizer/Optimizer.class.php");
|
||||
require_once(_XE_PATH_."classes/optimizer/Optimizer.class.php");
|
||||
$oOptimizer = new Optimizer();
|
||||
return $oOptimizer->getOptimizedFiles($this->_getUniqueFileList($this->js_files), "js");
|
||||
}
|
||||
|
|
@ -840,7 +879,7 @@
|
|||
* @brief CSS file 목록 return
|
||||
**/
|
||||
function _getCSSFile() {
|
||||
require_once("./classes/optimizer/Optimizer.class.php");
|
||||
require_once(_XE_PATH_."classes/optimizer/Optimizer.class.php");
|
||||
$oOptimizer = new Optimizer();
|
||||
return $oOptimizer->getOptimizedFiles($this->_getUniqueFileList($this->css_files), "css");
|
||||
}
|
||||
|
|
@ -909,7 +948,7 @@
|
|||
* @brief db설정내용이 저장되어 있는 config file의 path를 return
|
||||
**/
|
||||
function getConfigFile() {
|
||||
return "./files/config/db.config.php";
|
||||
return _XE_PATH_."files/config/db.config.php";
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
class DB {
|
||||
|
||||
var $count_cache_path = './files/cache/db';
|
||||
var $count_cache_path = 'files/cache/db';
|
||||
|
||||
var $cond_operation = array( ///< 조건문에서 조건을 등호로 표시하는 변수
|
||||
'equal' => '=',
|
||||
|
|
@ -35,6 +35,7 @@
|
|||
var $errno = 0; ///< 에러 발생시 에러 코드 (0이면 에러가 없다고 정의)
|
||||
var $errstr = ''; ///< 에러 발생시 에러 메세지
|
||||
var $query = ''; ///< 가장 최근에 수행된 query string
|
||||
var $elapsed_time = 0; ///< 가장 최근에 수행된 query 의 실행시간
|
||||
|
||||
var $transaction_started = false; ///< 트랙잭션 처리 flag
|
||||
|
||||
|
|
@ -42,7 +43,7 @@
|
|||
|
||||
var $supported_list = array(); ///< 지원하는 DB의 종류, classes/DB/DB***.class.php 를 이용하여 동적으로 작성됨
|
||||
|
||||
var $cache_file = './files/cache/queries/'; ///< query cache파일의 위치
|
||||
var $cache_file = 'files/cache/queries/'; ///< query cache파일의 위치
|
||||
|
||||
/**
|
||||
* @brief DB를 상속받는 특정 db type의 instance를 생성 후 return
|
||||
|
|
@ -53,15 +54,23 @@
|
|||
|
||||
if(!$GLOBALS['__DB__']) {
|
||||
$class_name = sprintf("DB%s%s", strtoupper(substr($db_type,0,1)), strtolower(substr($db_type,1)));
|
||||
$class_file = sprintf("./classes/db/%s.class.php", $class_name);
|
||||
$class_file = sprintf("%sclasses/db/%s.class.php", _XE_PATH_, $class_name);
|
||||
if(!file_exists($class_file)) new Object(-1, 'msg_db_not_setted');
|
||||
|
||||
require_once($class_file);
|
||||
$eval_str = sprintf('$GLOBALS[\'__DB__\'] = new %s();', $class_name);
|
||||
$eval_str = sprintf('$GLOBALS[\'__DB__\'][\''.$db_type.'\'] = new %s();', $class_name);
|
||||
eval($eval_str);
|
||||
}
|
||||
|
||||
return $GLOBALS['__DB__'];
|
||||
return $GLOBALS['__DB__'][$db_type];
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief constructor
|
||||
**/
|
||||
function DB() {
|
||||
$this->count_cache_path = _XE_PATH_.$this->count_cache_path;
|
||||
$this->cache_file = _XE_PATH_.$this->cache_file;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -76,7 +85,7 @@
|
|||
* @brief 지원 가능한 DB 목록을 return
|
||||
**/
|
||||
function _getSupportedList() {
|
||||
$db_classes_path = "./classes/db/";
|
||||
$db_classes_path = _XE_PATH_."classes/db/";
|
||||
$filter = "/^DB([^\.]+)\.class\.php/i";
|
||||
$supported_list = FileHandler::readDir($db_classes_path, $filter, true);
|
||||
sort($supported_list);
|
||||
|
|
@ -88,7 +97,7 @@
|
|||
if(version_compare(phpversion(), '5.0') < 0 && preg_match('/pdo/i',$db_type)) continue;
|
||||
|
||||
$class_name = sprintf("DB%s%s", strtoupper(substr($db_type,0,1)), strtolower(substr($db_type,1)));
|
||||
$class_file = sprintf("./classes/db/%s.class.php", $class_name);
|
||||
$class_file = sprintf(_XE_PATH_."classes/db/%s.class.php", $class_name);
|
||||
if(!file_exists($class_file)) continue;
|
||||
|
||||
unset($oDB);
|
||||
|
|
@ -126,12 +135,14 @@
|
|||
$this->setError(0,'success');
|
||||
$this->query = $query;
|
||||
$this->act_start = getMicroTime();
|
||||
$this->elapsed_time = 0;
|
||||
}
|
||||
|
||||
function actFinish() {
|
||||
if(!$this->query ) return;
|
||||
$this->act_finish = getMicroTime();
|
||||
$elapsed_time = $this->act_finish - $this->act_start;
|
||||
$this->elapsed_time = $elapsed_time;
|
||||
$GLOBALS['__db_elapsed_time__'] += $elapsed_time;
|
||||
|
||||
$str = sprintf("\t%02d. %s (%0.6f sec)\n", ++$GLOBALS['__dbcnt'], $this->query, $elapsed_time);
|
||||
|
|
@ -141,7 +152,7 @@
|
|||
$str .= sprintf("\t Query Failed : %d\n\t\t\t %s\n", $this->errno, $this->errstr);
|
||||
|
||||
if(__DEBUG_DB_OUTPUT__==1) {
|
||||
$debug_file = "./files/_debug_db_query.php";
|
||||
$debug_file = _XE_PATH_."files/_debug_db_query.php";
|
||||
$buff = sprintf("%s\n",print_r($str,true));
|
||||
|
||||
if($display_line) $buff = "\n====================================\n".$buff."------------------------------------\n";
|
||||
|
|
@ -158,7 +169,7 @@
|
|||
// __LOG_SLOW_QUERY__ 가 정해져 있다면 시간 체크후 쿼리 로그 남김
|
||||
if(__LOG_SLOW_QUERY__>0 && $elapsed_time > __LOG_SLOW_QUERY__) {
|
||||
$buff = '';
|
||||
$log_file = './files/_db_slow_query.php';
|
||||
$log_file = _XE_PATH_.'files/_db_slow_query.php';
|
||||
if(!file_exists($log_file)) {
|
||||
$buff = '<?php exit();?>'."\n";
|
||||
}
|
||||
|
|
@ -169,8 +180,6 @@
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
$this->query = null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -217,17 +226,17 @@
|
|||
}
|
||||
if(!$target || !$module || !$id) return new Object(-1, 'msg_invalid_queryid');
|
||||
|
||||
$xml_file = sprintf('./%s/%s/queries/%s.xml', $target, $module, $id);
|
||||
$xml_file = sprintf('%s%s/%s/queries/%s.xml', _XE_PATH_, $target, $module, $id);
|
||||
if(!file_exists($xml_file)) return new Object(-1, 'msg_invalid_queryid');
|
||||
|
||||
// 일단 cache 파일을 찾아본다
|
||||
$cache_file = sprintf('%s%s.cache.php', $this->cache_file, $query_id);
|
||||
$cache_file = sprintf('%s%s%s.cache.php', _XE_PATH_, $this->cache_file, $query_id);
|
||||
if(file_exists($cache_file)) $cache_time = filemtime($cache_file);
|
||||
else $cache_time = -1;
|
||||
|
||||
// 캐시 파일이 없거나 시간 비교하여 최근것이 아니면 원본 쿼리 xml파일을 찾아서 파싱을 한다
|
||||
if($cache_time<filemtime($xml_file) || $cache_time < filemtime('./classes/db/DB.class.php')) {
|
||||
require_once('./classes/xml/XmlQueryParser.class.php');
|
||||
if($cache_time<filemtime($xml_file) || $cache_time < filemtime(_XE_PATH_.'classes/db/DB.class.php')) {
|
||||
require_once(_XE_PATH_.'classes/xml/XmlQueryParser.class.php');
|
||||
$oParser = new XmlQueryParser();
|
||||
$oParser->parse($query_id, $xml_file, $cache_file);
|
||||
}
|
||||
|
|
@ -270,9 +279,11 @@
|
|||
break;
|
||||
}
|
||||
|
||||
if($this->errno !=0 ) return new Object($this->errno, $this->errstr);
|
||||
if(is_a($output, 'Object') || is_subclass_of($output, 'Object')) return $output;
|
||||
return new Object();
|
||||
if($this->errno != 0 ) $output = new Object($this->errno, $this->errstr);
|
||||
else if(!is_a($output, 'Object') && !is_subclass_of($output, 'Object')) $output = new Object();
|
||||
$output->add('_query', $this->query);
|
||||
$output->add('_elapsed_time', sprintf("%0.5f",$this->elapsed_time));
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -668,7 +668,7 @@
|
|||
* 그닥 좋지는 않은 구조이지만 편리하다.. -_-;
|
||||
**/
|
||||
function _getNavigationData($table_list, $columns, $condition, $output) {
|
||||
require_once('./classes/page/PageHandler.class.php');
|
||||
require_once(_XE_PATH_.'classes/page/PageHandler.class.php');
|
||||
|
||||
// 전체 개수를 구함
|
||||
$count_query = sprintf('select count(*) as "count" from %s %s', implode(',',$table_list), $condition);
|
||||
|
|
|
|||
|
|
@ -814,7 +814,7 @@
|
|||
* 그닥 좋지는 않은 구조이지만 편리하다.. -_-;
|
||||
**/
|
||||
function _getNavigationData($table_list, $columns, $condition, $output) {
|
||||
require_once('./classes/page/PageHandler.class.php');
|
||||
require_once(_XE_PATH_.'classes/page/PageHandler.class.php');
|
||||
|
||||
// 전체 개수를 구함
|
||||
$count_query = sprintf('select count(*) as "count" from %s %s;', implode(',',$table_list), $condition);
|
||||
|
|
|
|||
|
|
@ -546,7 +546,7 @@
|
|||
* 그닥 좋지는 않은 구조이지만 편리하다.. -_-;
|
||||
**/
|
||||
function _getNavigationData($table_list, $columns, $condition, $output) {
|
||||
require_once('./classes/page/PageHandler.class.php');
|
||||
require_once(_XE_PATH_.'classes/page/PageHandler.class.php');
|
||||
|
||||
// 전체 개수를 구함
|
||||
$count_query = sprintf("select count(*) as count from %s %s", implode(',',$table_list), $condition);
|
||||
|
|
|
|||
|
|
@ -556,7 +556,7 @@
|
|||
* 그닥 좋지는 않은 구조이지만 편리하다.. -_-;
|
||||
**/
|
||||
function _getNavigationData($table_list, $columns, $condition, $output) {
|
||||
require_once('./classes/page/PageHandler.class.php');
|
||||
require_once(_XE_PATH_.'classes/page/PageHandler.class.php');
|
||||
|
||||
// 전체 개수를 구함
|
||||
$count_query = sprintf("select count(*) as count from %s %s", implode(',',$table_list), $condition);
|
||||
|
|
|
|||
|
|
@ -545,7 +545,7 @@
|
|||
* 그닥 좋지는 않은 구조이지만 편리하다.. -_-;
|
||||
**/
|
||||
function _getNavigationData($table_list, $columns, $condition, $output) {
|
||||
require_once('./classes/page/PageHandler.class.php');
|
||||
require_once(_XE_PATH_.'classes/page/PageHandler.class.php');
|
||||
|
||||
// 전체 개수를 구함
|
||||
$count_query = sprintf("select count(*) as count from %s %s", implode(',',$table_list), $condition);
|
||||
|
|
|
|||
|
|
@ -564,7 +564,7 @@
|
|||
* 그닥 좋지는 않은 구조이지만 편리하다.. -_-;
|
||||
**/
|
||||
function _getNavigationData($table_list, $columns, $condition, $output) {
|
||||
require_once('./classes/page/PageHandler.class.php');
|
||||
require_once(_XE_PATH_.'classes/page/PageHandler.class.php');
|
||||
|
||||
// 전체 개수를 구함
|
||||
$count_query = sprintf("select count(*) as count from %s %s", implode(',',$table_list), $condition);
|
||||
|
|
|
|||
|
|
@ -605,7 +605,7 @@
|
|||
* 그닥 좋지는 않은 구조이지만 편리하다.. -_-;
|
||||
**/
|
||||
function _getNavigationData($table_list, $columns, $condition, $output) {
|
||||
require_once('./classes/page/PageHandler.class.php');
|
||||
require_once(_XE_PATH_.'classes/page/PageHandler.class.php');
|
||||
|
||||
// 전체 개수를 구함
|
||||
$count_query = sprintf("select count(*) as count from %s %s", implode(',',$table_list), $condition);
|
||||
|
|
|
|||
|
|
@ -97,24 +97,35 @@
|
|||
* @brief RequestMethod가 XML이면 XML 데이터로 컨텐츠 생성
|
||||
**/
|
||||
function _toXmlDoc(&$oModule) {
|
||||
$variables = $oModule->getVariables();
|
||||
|
||||
$xmlDoc = "<response>\n";
|
||||
$xmlDoc .= sprintf("<error>%s</error>\n",$oModule->getError());
|
||||
$xmlDoc .= sprintf("<message>%s</message>\n",str_replace(array('<','>','&'),array('<','>','&'),$oModule->getMessage()));
|
||||
|
||||
$variables = $oModule->getVariables();
|
||||
|
||||
if(count($variables)) {
|
||||
foreach($variables as $key => $val) {
|
||||
if(is_string($val)) $val = '<![CDATA['.$val.']]>';
|
||||
$xmlDoc .= "<{$key}>{$val}</{$key}>\n";
|
||||
}
|
||||
}
|
||||
$xmlDoc .= $this->_makeXmlDoc($variables);
|
||||
|
||||
$xmlDoc .= "</response>";
|
||||
|
||||
return $xmlDoc;
|
||||
}
|
||||
|
||||
function _makeXmlDoc($obj) {
|
||||
if(!count($obj)) return;
|
||||
|
||||
$xmlDoc = '';
|
||||
|
||||
foreach($obj as $key => $val) {
|
||||
if(is_numeric($key)) $key = 'item';
|
||||
|
||||
if(is_string($val)) $xmlDoc .= sprintf('<%s><![CDATA[%s]]></%s>%s', $key, $val, $key,"\n");
|
||||
else if(!is_array($val) && !is_object($val)) $xmlDoc .= sprintf('<%s>%s</%s>%s', $key, $val, $key,"\n");
|
||||
else $xmlDoc .= sprintf('<%s>%s%s</%s>%s',$key, "\n", $this->_makeXmlDoc($val), $key, "\n");
|
||||
}
|
||||
|
||||
return $xmlDoc;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief RequestMethod가 XML이 아니면 html 컨텐츠 생성
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -88,8 +88,10 @@
|
|||
* 주어진 경로를 단계별로 접근하여 recursive하게 디렉토리 생성
|
||||
**/
|
||||
function makeDir($path_string) {
|
||||
$path_string = str_replace(_XE_PATH_,'',$path_string);
|
||||
$path_list = explode('/', $path_string);
|
||||
|
||||
$path = _XE_PATH_;
|
||||
for($i=0;$i<count($path_list);$i++) {
|
||||
if(!$path_list[$i]) continue;
|
||||
$path .= $path_list[$i].'/';
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@
|
|||
|
||||
// 애드온 실행 (모듈 실행 전)
|
||||
$called_position = 'before_module_init';
|
||||
@include("./files/cache/activated_addons.cache.php");
|
||||
@include(_XE_PATH_."files/cache/activated_addons.cache.php");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -104,7 +104,7 @@
|
|||
|
||||
// 모듈정보에 module과 mid를 강제로 지정
|
||||
$this->module_info->module = $this->module;
|
||||
$this->mid = $this->mid;
|
||||
$this->module_info->mid = $this->mid;
|
||||
|
||||
// 여기까지도 모듈 정보를 찾지 못했다면 깔끔하게 시스템 오류 표시
|
||||
if(!$this->module) $this->error = 'msg_module_is_not_exists';
|
||||
|
|
@ -251,10 +251,7 @@
|
|||
* @brief module의 위치를 찾아서 return
|
||||
**/
|
||||
function getModulePath($module) {
|
||||
$class_path = sprintf('./modules/%s/', $module);
|
||||
if(is_dir($class_path)) return $class_path;
|
||||
|
||||
return "";
|
||||
return sprintf('./modules/%s/', $module);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -262,7 +259,7 @@
|
|||
**/
|
||||
function &getModuleInstance($module, $type = 'view', $kind = '') {
|
||||
$class_path = ModuleHandler::getModulePath($module);
|
||||
if(!$class_path) return NULL;
|
||||
if(!is_dir(_XE_PATH_.$class_path)) return NULL;
|
||||
|
||||
if(__DEBUG__==3) $start_time = getMicroTime();
|
||||
|
||||
|
|
@ -277,7 +274,7 @@
|
|||
|
||||
// 상위 클래스명 구함
|
||||
if(!class_exists($module)) {
|
||||
$high_class_file = sprintf('%s%s.class.php', $class_path, $module);
|
||||
$high_class_file = sprintf('%s%s%s.class.php', _XE_PATH_,$class_path, $module);
|
||||
if(!file_exists($high_class_file)) return NULL;
|
||||
require_once($high_class_file);
|
||||
}
|
||||
|
|
@ -287,33 +284,33 @@
|
|||
case 'controller' :
|
||||
if($kind == 'admin') {
|
||||
$instance_name = sprintf("%sAdmin%s",$module,"Controller");
|
||||
$class_file = sprintf('%s%s.admin.%s.php', $class_path, $module, $type);
|
||||
$class_file = sprintf('%s%s%s.admin.%s.php', _XE_PATH_, $class_path, $module, $type);
|
||||
} else {
|
||||
$instance_name = sprintf("%s%s",$module,"Controller");
|
||||
$class_file = sprintf('%s%s.%s.php', $class_path, $module, $type);
|
||||
$class_file = sprintf('%s%s%s.%s.php', _XE_PATH_, $class_path, $module, $type);
|
||||
}
|
||||
break;
|
||||
case 'model' :
|
||||
if($kind == 'admin') {
|
||||
$instance_name = sprintf("%sAdmin%s",$module,"Model");
|
||||
$class_file = sprintf('%s%s.admin.%s.php', $class_path, $module, $type);
|
||||
$class_file = sprintf('%s%s%s.admin.%s.php', _XE_PATH_, $class_path, $module, $type);
|
||||
} else {
|
||||
$instance_name = sprintf("%s%s",$module,"Model");
|
||||
$class_file = sprintf('%s%s.%s.php', $class_path, $module, $type);
|
||||
$class_file = sprintf('%s%s%s.%s.php', _XE_PATH_, $class_path, $module, $type);
|
||||
}
|
||||
break;
|
||||
case 'class' :
|
||||
$instance_name = $module;
|
||||
$class_file = sprintf('%s%s.class.php', $class_path, $module);
|
||||
$class_file = sprintf('%s%s%s.class.php', _XE_PATH_, $class_path, $module);
|
||||
break;
|
||||
default :
|
||||
$type = 'view';
|
||||
if($kind == 'admin') {
|
||||
$instance_name = sprintf("%sAdmin%s",$module,"View");
|
||||
$class_file = sprintf('%s%s.admin.view.php', $class_path, $module, $type);
|
||||
$class_file = sprintf('%s%s%s.admin.view.php', _XE_PATH_, $class_path, $module, $type);
|
||||
} else {
|
||||
$instance_name = sprintf("%s%s",$module,"View");
|
||||
$class_file = sprintf('%s%s.view.php', $class_path, $module, $type);
|
||||
$class_file = sprintf('%s%s%s.view.php', _XE_PATH_, $class_path, $module, $type);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -361,7 +358,7 @@
|
|||
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
$cache_dir = sprintf("./files/cache/triggers/");
|
||||
$cache_dir = sprintf("%sfiles/cache/triggers/",_XE_PATH_);
|
||||
if(!is_dir($cache_dir)) FileHandler::makeDir($cache_dir);
|
||||
|
||||
$cache_file = sprintf("%s%s.%s", $cache_dir, $trigger_name, $called_position);
|
||||
|
|
|
|||
|
|
@ -228,7 +228,7 @@
|
|||
* @brief template 경로 지정
|
||||
**/
|
||||
function setTemplatePath($path) {
|
||||
if(substr($path,0,2)!='./') $path = './'.$path;
|
||||
if(substr($path,0,1)!='/' && substr($path,0,2)!='./') $path = './'.$path;
|
||||
if(substr($path,-1)!='/') $path .= '/';
|
||||
$this->template_path = $path;
|
||||
}
|
||||
|
|
@ -274,8 +274,8 @@
|
|||
* @brief layout 경로 지정
|
||||
**/
|
||||
function setLayoutPath($path) {
|
||||
if(substr($path,0,1)!='/' && substr($path,0,2)!='./') $path = './'.$path;
|
||||
if(substr($path,-1)!='/') $path .= '/';
|
||||
if(substr($path,0,2)!='./') $path = './'.$path;
|
||||
$this->layout_path = $path;
|
||||
}
|
||||
|
||||
|
|
@ -297,7 +297,7 @@
|
|||
|
||||
// addon 실행(called_position 를 before_module_proc로 하여 호출)
|
||||
$called_position = 'before_module_proc';
|
||||
@include("./files/cache/activated_addons.cache.php");
|
||||
@include(_XE_PATH_."files/cache/activated_addons.cache.php");
|
||||
|
||||
// 지금까지 이상이 없었다면 action 실행
|
||||
if(!$this->stop_proc) {
|
||||
|
|
@ -347,7 +347,7 @@
|
|||
|
||||
// addon 실행(called_position 를 after_module_proc로 하여 호출)
|
||||
$called_position = 'after_module_proc';
|
||||
@include("./files/cache/activated_addons.cache.php");
|
||||
@include(_XE_PATH_."files/cache/activated_addons.cache.php");
|
||||
|
||||
if(is_a($output, 'Object') || is_subclass_of($output, 'Object')) {
|
||||
$this->setError($output->getError());
|
||||
|
|
|
|||
|
|
@ -12,7 +12,9 @@
|
|||
/**
|
||||
* @brief 위젯 캐시 처리
|
||||
**/
|
||||
function getCache($widget, $args) {
|
||||
function getCache($widget, $args, $lang_type = null, $ignore_cache = false) {
|
||||
// 지정된 언어가 없으면 현재 언어 지정
|
||||
if(!$lang_type) $lang_type = Context::getLangType();
|
||||
|
||||
// widget, 캐시 번호와 캐시값이 설정되어 있는지 확인
|
||||
$widget_sequence = $args->widget_sequence;
|
||||
|
|
@ -21,7 +23,7 @@
|
|||
/**
|
||||
* 캐시 번호와 캐시 값이 아예 없으면 바로 데이터를 추출해서 리턴
|
||||
**/
|
||||
if(!$widget_cache || !$widget_sequence) {
|
||||
if(!$ignore_cache && (!$widget_cache || !$widget_sequence)) {
|
||||
$oWidget = WidgetHandler::getObject($widget);
|
||||
if(!$oWidget) return;
|
||||
|
||||
|
|
@ -37,39 +39,39 @@
|
|||
if(!is_dir($cache_path)) FileHandler::makeDir($cache_path);
|
||||
|
||||
// 캐시파일명을 구함
|
||||
$cache_file = sprintf('%s%d.%s.cache', $cache_path, $widget_sequence, Context::getLangType());
|
||||
$cache_file = sprintf('%s%d.%s.cache', $cache_path, $widget_sequence, $lang_type);
|
||||
|
||||
// 캐시 파일이 존재하면 해당 파일의 유효성 검사
|
||||
if(file_exists($cache_file)) {
|
||||
// 캐시 Lock 파일을 구함
|
||||
$lock_file = sprintf('%s%d.%s.lock', $cache_path, $widget_sequence, $lang_type);
|
||||
|
||||
// 캐시 파일이 존재하면 해당 파일의 유효성 검사 (lock파일이 있을 경우 유효성 검사하지 않음)
|
||||
if(!$ignore_cache && file_exists($cache_file)) {
|
||||
$filemtime = filemtime($cache_file);
|
||||
|
||||
// 수정 시간을 비교해서 캐싱중이어야 하거나 WidgetHandler.class.php 파일보다 나중에 만들어 졌다면 캐시값을 return
|
||||
if($filemtime + $widget_cache*60 > time() && $filemtime > filemtime('./classes/widget/WidgetHandler.class.php')) {
|
||||
if(file_exists($lock_file) || ($filemtime + $widget_cache*60 > time() && $filemtime > filemtime('./classes/widget/WidgetHandler.class.php'))) {
|
||||
return FileHandler::readFile($cache_file);
|
||||
}
|
||||
}
|
||||
|
||||
// 캐시를 새로 해야 할 경우임
|
||||
// lock 파일 생성
|
||||
FileHandler::writeFile($lock_file, '');
|
||||
|
||||
// 캐시 파일을 갱신하여야 할 경우 lock파일을 만들고 캐시 생성
|
||||
$oWidget = WidgetHandler::getObject($widget);
|
||||
if(!$oWidget) return;
|
||||
|
||||
$widget_content = $oWidget->proc($args);
|
||||
WidgetHandler::writeCache($widget_sequence, $widget_content);
|
||||
FileHandler::writeFile($cache_file, $widget_content);
|
||||
|
||||
// lock 파일 제거
|
||||
@unlink($lock_file);
|
||||
|
||||
return $widget_content;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 캐시 파일 생성
|
||||
**/
|
||||
function writeCache($widget_sequence, $output) {
|
||||
$cache_path = './files/cache/widget_cache/';
|
||||
$cache_file = sprintf('%s%d.%s.cache', $cache_path, $widget_sequence, Context::getLangType());
|
||||
FileHandler::writeFile($cache_file, $output);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 위젯을 찾아서 실행하고 결과를 출력
|
||||
* @brief 위젯이름과 인자를 받아서 결과를 생성하고 결과 리턴
|
||||
* 태그 사용 templateHandler에서 WidgetHandler::execute()를 실행하는 코드로 대체하게 된다
|
||||
*
|
||||
* $include_info가 true일 경우 페이지 수정시 위젯 핸들링을 위한 코드까지 포함함
|
||||
|
|
|
|||
|
|
@ -49,12 +49,12 @@
|
|||
$output->tables[$alias] = $table_name;
|
||||
|
||||
// 테이블을 찾아서 컬럼의 속성을 구함
|
||||
$table_file = sprintf('./%s/%s/schemas/%s.xml', 'modules', $module, $table_name);
|
||||
$table_file = sprintf('%s%s/%s/schemas/%s.xml', _XE_PATH_, 'modules', $module, $table_name);
|
||||
if(!file_exists($table_file)) {
|
||||
$searched_list = FileHandler::readDir('./modules');
|
||||
$searched_list = FileHandler::readDir(_XE_PATH_.'modules');
|
||||
$searched_count = count($searched_list);
|
||||
for($i=0;$i<$searched_count;$i++) {
|
||||
$table_file = sprintf('./%s/%s/schemas/%s.xml', 'modules', $searched_list[$i], $table_name);
|
||||
$table_file = sprintf('%s%s/%s/schemas/%s.xml', _XE_PATH_, 'modules', $searched_list[$i], $table_name);
|
||||
if(file_exists($table_file)) break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// ** I18N
|
||||
|
||||
// DyCalendar KO language
|
||||
// DyCalendar ES language
|
||||
// Author: Mihai Bazon, <mihai_bazon@yahoo.com>
|
||||
// Translation: Bradly1, <bradly1@paran.com>
|
||||
// Encoding: UTF-8
|
||||
|
|
@ -87,21 +87,18 @@ DyCalendar._TT["INFO"] = "Sobre el calendario";
|
|||
DyCalendar._TT["ABOUT"] =
|
||||
"DHTML Date/Time Selector\n" +
|
||||
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
|
||||
"\n"+
|
||||
"최신 버전을 받으시려면 http://www.dynarch.com/projects/calendar/ 에 방문하세요\n" +
|
||||
"\n"+
|
||||
"GNU LGPL 라이센스로 배포됩니다. \n"+
|
||||
"라이센스에 대한 자세한 내용은 http://gnu.org/licenses/lgpl.html 을 읽으세요." +
|
||||
"For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
|
||||
"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
|
||||
"\n\n" +
|
||||
"날짜 선택:\n" +
|
||||
"- 연도를 선택하려면 \xab, \xbb 버튼을 사용합니다\n" +
|
||||
"- 달을 선택하려면 " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " 버튼을 누르세요\n" +
|
||||
"- 계속 누르고 있으면 위 값들을 빠르게 선택하실 수 있습니다.";
|
||||
"Date selection:\n" +
|
||||
"- Use the \xab, \xbb buttons to select year\n" +
|
||||
"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" +
|
||||
"- Hold mouse button on any of the above buttons for faster selection.";
|
||||
DyCalendar._TT["ABOUT_TIME"] = "\n\n" +
|
||||
"시간 선택:\n" +
|
||||
"- 마우스로 누르면 시간이 증가합니다\n" +
|
||||
"- Shift 키와 함께 누르면 감소합니다\n" +
|
||||
"- 누른 상태에서 마우스를 움직이면 좀 더 빠르게 값이 변합니다.\n";
|
||||
"Time selection:\n" +
|
||||
"- Click on any of the time parts to increase it\n" +
|
||||
"- or Shift-click to decrease it\n" +
|
||||
"- or click and drag for faster selection.";
|
||||
|
||||
DyCalendar._TT["PREV_YEAR"] = "Prev. año (mantener para menu)";
|
||||
DyCalendar._TT["PREV_MONTH"] = "Prev. mes (mantener para menu)";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// ** I18N
|
||||
|
||||
// DyCalendar KO language
|
||||
// DyCalendar GE language
|
||||
// Author: Mihai Bazon, <mihai_bazon@yahoo.com>
|
||||
// Translation: bradly1, <bradly1@paran.com>
|
||||
// Encoding: UTF-8
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
// ** I18N
|
||||
|
||||
// DyCalendar EN language
|
||||
// DyCalendar RU language
|
||||
// Author: Mihai Bazon, <mihai_bazon@yahoo.com>
|
||||
// Encoding: any
|
||||
// Translation: bradly1, <bradly1@paran.com>
|
||||
// Encoding: UTF-8
|
||||
// lang : RU
|
||||
// Distributed under the same terms as the calendar itself.
|
||||
|
||||
// For translators: please use UTF-8 if possible. We strongly believe that
|
||||
|
|
@ -11,14 +13,14 @@
|
|||
|
||||
// full day names
|
||||
DyCalendar._DN = new Array
|
||||
("Sunday",
|
||||
"Monday",
|
||||
"Tuesday",
|
||||
"Wednesday",
|
||||
"Thursday",
|
||||
"Friday",
|
||||
"Saturday",
|
||||
"Sunday");
|
||||
("Воскресенье",
|
||||
"Понедельник",
|
||||
"Вторник",
|
||||
"Среда",
|
||||
"Четверг",
|
||||
"Пятница",
|
||||
"Суббота",
|
||||
"Воскресенье");
|
||||
|
||||
// Please note that the following array of short day names (and the same goes
|
||||
// for short month names, _SMN) isn't absolutely necessary. We give it here
|
||||
|
|
@ -34,14 +36,14 @@ DyCalendar._DN = new Array
|
|||
|
||||
// short day names
|
||||
DyCalendar._SDN = new Array
|
||||
("Sun",
|
||||
"Mon",
|
||||
"Tue",
|
||||
"Wed",
|
||||
"Thu",
|
||||
"Fri",
|
||||
"Sat",
|
||||
"Sun");
|
||||
("Sun",
|
||||
"ПН",
|
||||
"ВТ",
|
||||
"Wed",
|
||||
"Thu",
|
||||
"Пят",
|
||||
"СБ",
|
||||
"Солнце");
|
||||
|
||||
// First day of the week. "0" means display Sunday first, "1" means display
|
||||
// Monday first, etc.
|
||||
|
|
@ -49,37 +51,37 @@ DyCalendar._FD = 0;
|
|||
|
||||
// full month names
|
||||
DyCalendar._MN = new Array
|
||||
("January",
|
||||
"February",
|
||||
"March",
|
||||
"April",
|
||||
"May",
|
||||
"June",
|
||||
"July",
|
||||
"August",
|
||||
"September",
|
||||
"October",
|
||||
"November",
|
||||
"December");
|
||||
("Январь",
|
||||
"Февраль",
|
||||
"Марта",
|
||||
"Апрель",
|
||||
"Мая",
|
||||
"Июнь",
|
||||
"Июль",
|
||||
"Август",
|
||||
"Сентябрь",
|
||||
"Октябрь",
|
||||
"Ноябрь",
|
||||
"Декабрь");
|
||||
|
||||
// short month names
|
||||
DyCalendar._SMN = new Array
|
||||
("Jan",
|
||||
"Feb",
|
||||
"Mar",
|
||||
"Apr",
|
||||
"May",
|
||||
"Jun",
|
||||
"Jul",
|
||||
"Aug",
|
||||
"Sep",
|
||||
"Oct",
|
||||
"Nov",
|
||||
"Dec");
|
||||
("Январь",
|
||||
"Февраль",
|
||||
"Марта",
|
||||
"Апрель",
|
||||
"Мая",
|
||||
"Июнь",
|
||||
"Июль",
|
||||
"Август",
|
||||
"Сентябрь",
|
||||
"Октябрь",
|
||||
"Ноябрь",
|
||||
"Декабрь");
|
||||
|
||||
// tooltips
|
||||
DyCalendar._TT = {};
|
||||
DyCalendar._TT["INFO"] = "About the calendar";
|
||||
DyCalendar._TT["INFO"] = "О календаре";
|
||||
|
||||
DyCalendar._TT["ABOUT"] =
|
||||
"DHTML Date/Time Selector\n" +
|
||||
|
|
@ -97,31 +99,31 @@ DyCalendar._TT["ABOUT_TIME"] = "\n\n" +
|
|||
"- or Shift-click to decrease it\n" +
|
||||
"- or click and drag for faster selection.";
|
||||
|
||||
DyCalendar._TT["PREV_YEAR"] = "Prev. year (hold for menu)";
|
||||
DyCalendar._TT["PREV_MONTH"] = "Prev. month (hold for menu)";
|
||||
DyCalendar._TT["GO_TODAY"] = "Go Today";
|
||||
DyCalendar._TT["NEXT_MONTH"] = "Next month (hold for menu)";
|
||||
DyCalendar._TT["NEXT_YEAR"] = "Next year (hold for menu)";
|
||||
DyCalendar._TT["SEL_DATE"] = "Select date";
|
||||
DyCalendar._TT["DRAG_TO_MOVE"] = "Drag to move";
|
||||
DyCalendar._TT["PART_TODAY"] = " (today)";
|
||||
DyCalendar._TT [ "PREV_YEAR"] = "Пред. Год (удерживать для меню)";
|
||||
DyCalendar._TT [ "PREV_MONTH"] = "Пред. Месяце (удерживать для меню)";
|
||||
DyCalendar._TT [ "GO_TODAY"] = "Перейти Сегодня";
|
||||
DyCalendar._TT [ "NEXT_MONTH"] = "В следующем месяце (удерживать для меню)";
|
||||
DyCalendar._TT [ "NEXT_YEAR"] = "В следующем году (удерживать для меню)";
|
||||
DyCalendar._TT [ "SEL_DATE"] = "Выберите дату";
|
||||
DyCalendar._TT [ "DRAG_TO_MOVE"] = "Перетаскивайте двигаться";
|
||||
DyCalendar._TT [ "PART_TODAY"] = "(сегодня)";
|
||||
|
||||
// the following is to inform that "%s" is to be the first day of week
|
||||
// %s will be replaced with the day name.
|
||||
DyCalendar._TT["DAY_FIRST"] = "Display %s first";
|
||||
DyCalendar._TT [ "DAY_FIRST"] = "display% с первой";
|
||||
|
||||
// This may be locale-dependent. It specifies the week-end days, as an array
|
||||
// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
|
||||
// means Monday, etc.
|
||||
DyCalendar._TT["WEEKEND"] = "0,6";
|
||||
DyCalendar._TT [ "WEEKEND"] = "0,6";
|
||||
|
||||
DyCalendar._TT["CLOSE"] = "Close";
|
||||
DyCalendar._TT["TODAY"] = "Today";
|
||||
DyCalendar._TT["TIME_PART"] = "(Shift-)Click or drag to change value";
|
||||
DyCalendar._TT [ "CLOSE"] = "Закрыть";
|
||||
DyCalendar._TT [ "Today"] = "Сегодня";
|
||||
DyCalendar._TT [ "TIME_PART"] = "(Shift-) клик или перетащите для изменения стоимости";
|
||||
|
||||
// date formats
|
||||
DyCalendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
|
||||
DyCalendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
|
||||
DyCalendar._TT [ "DEF_DATE_FORMAT"] = "% Y-% м-% г";
|
||||
DyCalendar._TT [ "TT_DATE_FORMAT"] = "%,%% е б";
|
||||
|
||||
DyCalendar._TT["WK"] = "wk";
|
||||
DyCalendar._TT["TIME"] = "Time:";
|
||||
DyCalendar._TT [ "WK"] = "Нед";
|
||||
DyCalendar._TT [ "TIME"] = "Время:";
|
||||
|
|
|
|||
|
|
@ -309,18 +309,27 @@ function setFixedPopupSize() {
|
|||
/**
|
||||
* @brief 이름, 게시글등을 클릭하였을 경우 팝업 메뉴를 보여주는 함수
|
||||
**/
|
||||
xAddEventListener(window, 'load', createPopupMenu);
|
||||
xAddEventListener(document, 'click', chkPopupMenu);
|
||||
var loaded_popup_menu_list = new Array();
|
||||
|
||||
var loaded_popup_menus = new Array();
|
||||
|
||||
/* 멤버 팝업 메뉴 레이어를 생성하는 함수 (문서 출력이 완료되었을때 동작) */
|
||||
function createPopupMenu(evt) {
|
||||
var area = xGetElementById("popup_menu_area");
|
||||
if(area) return;
|
||||
area = xCreateElement("div");
|
||||
area.id = "popup_menu_area";
|
||||
area.style.visibility = 'hidden';
|
||||
document.body.appendChild(area);
|
||||
}
|
||||
|
||||
/* 클릭 이벤트 발생시 이벤트가 일어난 대상을 검사하여 적절한 규칙에 맞으면 처리 */
|
||||
function chkPopupMenu(evt) {
|
||||
// 이전에 호출되었을지 모르는 팝업메뉴 숨김
|
||||
var area = xGetElementById("popup_menu_area");
|
||||
if(!area) {
|
||||
area = xCreateElement("div");
|
||||
area.id = "popup_menu_area";
|
||||
document.body.appendChild(area);
|
||||
}
|
||||
if(!area) return;
|
||||
|
||||
if(area.style.visibility!="hidden") area.style.visibility="hidden";
|
||||
|
||||
// 이벤트 대상이 없으면 무시
|
||||
|
|
@ -332,9 +341,7 @@ function chkPopupMenu(evt) {
|
|||
if(!obj) return;
|
||||
|
||||
// obj의 nodeName이 div나 span이 아니면 나올대까지 상위를 찾음
|
||||
if(obj && obj.nodeName != 'DIV' && obj.nodeName != 'SPAN') {
|
||||
obj = obj.parentNode;
|
||||
}
|
||||
if(obj && obj.nodeName != 'DIV' && obj.nodeName != 'SPAN') obj = obj.parentNode;
|
||||
if(!obj || (obj.nodeName != 'DIV' && obj.nodeName != 'SPAN')) return;
|
||||
|
||||
// 객체의 className값을 구함
|
||||
|
|
@ -371,10 +378,9 @@ function chkPopupMenu(evt) {
|
|||
params["page_x"] = e.pageX;
|
||||
params["page_y"] = e.pageY;
|
||||
|
||||
var response_tags = new Array("error","message","menu_list");
|
||||
var response_tags = new Array("error","message","menus");
|
||||
|
||||
if(loaded_popup_menu_list[menu_id]) {
|
||||
params["menu_list"] = loaded_popup_menu_list[menu_id];
|
||||
if(loaded_popup_menus[menu_id]) {
|
||||
displayPopupMenu(params, response_tags, params);
|
||||
return;
|
||||
}
|
||||
|
|
@ -385,44 +391,53 @@ function chkPopupMenu(evt) {
|
|||
}
|
||||
|
||||
function displayPopupMenu(ret_obj, response_tags, params) {
|
||||
var area = xGetElementById("popup_menu_area");
|
||||
|
||||
var menu_list = ret_obj['menu_list'];
|
||||
|
||||
var target_srl = params["target_srl"];
|
||||
var menu_id = params["menu_id"];
|
||||
|
||||
var menus = ret_obj['menus'];
|
||||
var html = "";
|
||||
|
||||
if(loaded_popup_menu_list[menu_id]) {
|
||||
html = loaded_popup_menu_list[menu_id];
|
||||
if(loaded_popup_menus[menu_id]) {
|
||||
html = loaded_popup_menus[menu_id];
|
||||
} else {
|
||||
var infos = menu_list.split("\n");
|
||||
if(infos.length) {
|
||||
for(var i=0;i<infos.length;i++) {
|
||||
var info_str = infos[i];
|
||||
var pos = info_str.indexOf(",");
|
||||
var icon = info_str.substr(0,pos).trim();
|
||||
if(menus) {
|
||||
var item = menus['item'];
|
||||
if(item.length<1) item = new Array(item);
|
||||
if(item.length) {
|
||||
for(var i=0;i<item.length;i++) {
|
||||
var url = item[i].url;
|
||||
var str = item[i].str;
|
||||
var icon = item[i].icon;
|
||||
var target = item[i].target;
|
||||
|
||||
info_str = info_str.substr(pos+1, info_str.length).trim();
|
||||
var pos = info_str.indexOf(",");
|
||||
var str = info_str.substr(0,pos).trim();
|
||||
var func = info_str.substr(pos+1, info_str.length).trim();
|
||||
var styleText = "";
|
||||
|
||||
var className = "item";
|
||||
if(icon) styleText = " style=\"background:url('"+icon+"') no-repeat left center; padding-left:18px; \"";
|
||||
switch(target) {
|
||||
case "popup" :
|
||||
click_str = " onclick=\"popopen('"+url+"','"+target+"')\"; return false;";
|
||||
break;
|
||||
case "self" :
|
||||
click_str = " onclick=\"location.href='"+url+"'\"; return false;";
|
||||
break;
|
||||
case "javascript" :
|
||||
click_str = " onclick=\""+url+"\"; return false;";
|
||||
break;
|
||||
default :
|
||||
click_str = " onclick=\"window.open('"+url+"')\"; return false;";
|
||||
break;
|
||||
}
|
||||
|
||||
if(!str || !func) continue;
|
||||
|
||||
if(icon) html += "<div class=\""+className+"\" onmouseover=\"this.className='"+className+"_on'\" onmouseout=\"this.className='"+className+"'\" style=\"background:url("+icon+") no-repeat left center; padding-left:18px;\" onclick=\""+func+"\">"+str+"</div>";
|
||||
else html += "<div class=\""+className+"\" onmouseover=\"this.className='"+className+"_on'\" onmouseout=\"this.className='"+className+"'\" onclick=\""+func+"\">"+str+"</div>";
|
||||
html += '<div class="item" onmouseover="this.className=\'item_on\'" onmouseout="this.className=\'item\'"'+styleText+click_str+'>'+str+'</div> ';
|
||||
}
|
||||
}
|
||||
}
|
||||
loaded_popup_menu_list[menu_id] = html;
|
||||
}
|
||||
loaded_popup_menus[menu_id] = html;
|
||||
}
|
||||
|
||||
// 레이어 출력
|
||||
if(html) {
|
||||
// 레이어 출력
|
||||
xInnerHtml('popup_menu_area', "<div class=\"box\">"+html+"</div>");
|
||||
var area = xGetElementById("popup_menu_area");
|
||||
xInnerHtml(area, "<div class=\"box\">"+html+"</div>");
|
||||
xLeft(area, params["page_x"]);
|
||||
xTop(area, params["page_y"]);
|
||||
if(xWidth(area)+xLeft(area)>xClientWidth()+xScrollLeft()) xLeft(area, xClientWidth()-xWidth(area)+xScrollLeft());
|
||||
|
|
@ -780,7 +795,7 @@ if(xIE4Up) {
|
|||
else if(this.selectedIndex < this.options.length - 1) this.selectedIndex++;
|
||||
else this.selectedIndex--;
|
||||
} else {
|
||||
this.oldonchange();
|
||||
if(this.oldonchange) this.oldonchange();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -126,6 +126,9 @@ function drawTreeMenu(oXml, callback_func, resopnse_tags, null_func, param) {
|
|||
if(manual_select_node_srl) manualSelectNode(menu_id, manual_select_node_srl);
|
||||
}
|
||||
|
||||
var waiting_obj = xGetElementById("waitingforserverresponse");
|
||||
if(waiting_obj) waiting_obj.style.visibility = "hidden";
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ function xml_handler() {
|
|||
this.addParam = xml_handlerAddParam;
|
||||
this.getResponseXml = xml_handlerGetResponseXML;
|
||||
this.toZMsgObject = xml_handlerToZMsgObject;
|
||||
this.parseXMLDoc = xml_parseXmlDoc;
|
||||
|
||||
this.obj_xmlHttp = this.getXmlHttp();
|
||||
}
|
||||
|
|
@ -157,21 +158,58 @@ function xml_handlerGetResponseXML() {
|
|||
return null;
|
||||
}
|
||||
|
||||
function xml_parseXmlDoc(dom) {
|
||||
if(!dom) return;
|
||||
|
||||
var ret_obj = new Array();
|
||||
|
||||
var obj = dom.firstChild;
|
||||
if(!obj) return;
|
||||
|
||||
while(obj) {
|
||||
if(obj.nodeType == 1) {
|
||||
|
||||
var name = obj.nodeName;
|
||||
var value = null;
|
||||
|
||||
if(obj.childNodes.length==1 && obj.firstChild.nodeType != 1) {
|
||||
value = obj.firstChild.nodeValue;
|
||||
} else {
|
||||
value = this.parseXMLDoc(obj);
|
||||
}
|
||||
|
||||
if(typeof(ret_obj[name])=='undefined') {
|
||||
ret_obj[name] = value;
|
||||
} else {
|
||||
if(ret_obj[name].length>0) {
|
||||
ret_obj[name][ret_obj[name].length] = value;
|
||||
} else {
|
||||
var tmp_value = ret_obj[name];
|
||||
ret_obj[name] = new Array();
|
||||
ret_obj[name][ret_obj[name].length] = tmp_value;
|
||||
ret_obj[name][ret_obj[name].length] = value;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
obj = obj.nextSibling;
|
||||
}
|
||||
return ret_obj;
|
||||
}
|
||||
|
||||
function xml_handlerToZMsgObject(xmlDoc, tags) {
|
||||
if(!xmlDoc) return null;
|
||||
if(!tags) tags = new Array("error","message");
|
||||
tags[tags.length] = "redirect_url";
|
||||
tags[tags.length] = "act";
|
||||
|
||||
|
||||
var parsed_array = this.parseXMLDoc(xmlDoc.getElementsByTagName('response')[0]);
|
||||
|
||||
var obj_ret = new Array();
|
||||
for(var i=0; i<tags.length; i++) {
|
||||
var key = tags[i];
|
||||
if(obj_ret[key]) continue;
|
||||
try {
|
||||
obj_ret[key] = xmlDoc.getElementsByTagName(tags[i])[0].firstChild.nodeValue;
|
||||
} catch(e) {
|
||||
obj_ret[key] = "";
|
||||
}
|
||||
if(parsed_array[key]) obj_ret[key] = parsed_array[key];
|
||||
else obj_ret[key] = null;
|
||||
}
|
||||
return obj_ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@
|
|||
$lang->cmd_publish = "Publish";
|
||||
$lang->cmd_layout_setup = 'Configure layout';
|
||||
$lang->cmd_layout_edit = 'Edit layout';
|
||||
$lang->cmd_search_by_ipaddress = 'Search by IP Address';
|
||||
|
||||
$lang->enable = 'Enable';
|
||||
$lang->disable = 'Disable';
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@
|
|||
$lang->cmd_publish = "Publicar";
|
||||
$lang->cmd_layout_setup = 'Configuración del diseño';
|
||||
$lang->cmd_layout_edit = 'Editar el diseño';
|
||||
$lang->cmd_search_by_ipaddress = 'IP주소로 검색';
|
||||
|
||||
$lang->enable = 'Activar';
|
||||
$lang->disable = 'Desactivar';
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@
|
|||
$lang->cmd_publish = "Publier";
|
||||
$lang->cmd_layout_setup = 'Configurer la Mise en page';
|
||||
$lang->cmd_layout_edit = 'Editer la Mise en page';
|
||||
$lang->cmd_search_by_ipaddress = 'IP주소로 검색';
|
||||
|
||||
$lang->enable = 'Valide';
|
||||
$lang->disable = 'Invalide';
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<?php
|
||||
/**
|
||||
* @Datei common / lang / en.lang.php
|
||||
* @Datei common/lang/ge.lang.php
|
||||
* @Author zero (zero@nzeo.com)
|
||||
* @Kurzen English Language Pack (nur einfache Worte sind hier eingeschlossen)
|
||||
* @Kurzen german Language Pack (nur einfache Worte sind hier eingeschlossen)
|
||||
**/
|
||||
|
||||
// Worte für Aktion, die im Grunde verwendet
|
||||
$lang->cmd_write = 'Schreiben';
|
||||
$lang->cmd_reply = 'Antworten';
|
||||
$lang->cmd_delete = 'Löschen';
|
||||
$lang->cmd_modify = 'Change';
|
||||
$lang->cmd_modify = 'Ändern';
|
||||
$lang->cmd_edit = 'Bearbeiten';
|
||||
$lang->cmd_view = 'Anzeigen';
|
||||
$lang->cmd_view_all = 'Alle anzeigen';
|
||||
|
|
@ -41,11 +41,11 @@
|
|||
$lang->cmd_make = 'Erstellen';
|
||||
$lang->cmd_select = 'Select';
|
||||
$lang->cmd_select_all = 'Alle auswählen';
|
||||
$lang->cmd_unselect_all = "Alle abwählen";
|
||||
$lang->cmd_unselect_all = 'Alle abwählen';
|
||||
$lang->cmd_reverse_all = 'Reverse';
|
||||
$lang->cmd_close_all = 'Schließen Sie alle';
|
||||
$lang->cmd_open_all = 'Open All';
|
||||
$lang->cmd_reload = "Reload";
|
||||
$lang->cmd_reload = 'Reload';
|
||||
$lang->cmd_close = 'Schließen';
|
||||
$lang->cmd_open = 'Open';
|
||||
$lang->cmd_setup = 'Konfiguration';
|
||||
|
|
@ -58,18 +58,19 @@
|
|||
$lang->cmd_scrap = 'Schrott';
|
||||
$lang->cmd_preview = 'Vorschau';
|
||||
$lang->cmd_reset = 'Reset';
|
||||
$lang->cmd_remake_cache = "Re-Cache-Datei erstellen";
|
||||
$lang->cmd_publish = "Veröffentlichen";
|
||||
$lang->cmd_remake_cache = 'Re-Cache-Datei erstellen';
|
||||
$lang->cmd_publish = 'Veröffentlichen';
|
||||
$lang->cmd_layout_setup = 'Konfiguration Layout';
|
||||
$lang->cmd_layout_edit = 'Layout bearbeiten';
|
||||
$lang->cmd_search_by_ipaddress = 'IP주소로 검색';
|
||||
|
||||
$lang->enable = "Aktivieren";
|
||||
$lang->enable = 'Aktivieren';
|
||||
$lang->deaktivieren = 'Deaktivieren';
|
||||
|
||||
// Essential Words
|
||||
$lang->no = 'Nein';
|
||||
$lang->notice = 'Hinweis';
|
||||
$lang->secret = "Geheim";
|
||||
$lang->secret = 'Geheim';
|
||||
$lang->category = $lang->category_srl = 'Kategorie';
|
||||
$lang->none_category = '분류없음';
|
||||
$lang->document_srl = 'Doc. No ';
|
||||
|
|
@ -91,7 +92,7 @@
|
|||
$lang->title_content = 'Betreff + Inhalt';
|
||||
$lang->topic = 'Thema';
|
||||
$lang->replies = 'Antwort';
|
||||
$lang->content = "Inhalt";
|
||||
$lang->content = 'Inhalt';
|
||||
$lang->document = 'Artikel';
|
||||
$lang->comment = 'Kommentar';
|
||||
$lang->description = 'Beschreibung';
|
||||
|
|
@ -117,7 +118,7 @@
|
|||
|
||||
$lang->mid = 'Module Name';
|
||||
$lang->layout = 'Layout';
|
||||
$lang->widget = "Widget";
|
||||
$lang->widget = 'Widget';
|
||||
$lang->module = 'Modul';
|
||||
$lang->skin = 'Thema';
|
||||
$lang->colorset = 'Colorset';
|
||||
|
|
@ -141,7 +142,7 @@
|
|||
$lang->last_update = 'Letzte Aktualisierung';
|
||||
$lang->last_post = 'Letzter Beitrag';
|
||||
$lang->signup_date = 'Join Date';
|
||||
$lang->last_login = "Letzter Login";
|
||||
$lang->last_login = 'Letzter Login';
|
||||
$lang->first_page = 'Erste Seite';
|
||||
$lang->last_page = 'Letzte Seite';
|
||||
$lang->search_target = 'Target für die Google-Suche';
|
||||
|
|
@ -156,7 +157,7 @@
|
|||
|
||||
$lang->use = 'Use';
|
||||
$lang->notuse = 'nicht verwenden';
|
||||
$lang->not_exists = "nicht vorhanden";
|
||||
$lang->not_exists = 'nicht vorhanden';
|
||||
|
||||
$lang->public = 'öffentlich';
|
||||
$lang->private = 'private';
|
||||
|
|
@ -166,7 +167,7 @@
|
|||
$lang->unit_hour = 'h';
|
||||
$lang->unit_day = 'th';
|
||||
$lang->unit_week = 'Woche';
|
||||
$lang->unit_month = "Monat";
|
||||
$lang->unit_month = 'Monat';
|
||||
$lang->unit_year = 'Jahr';
|
||||
|
||||
// Beschreibungen
|
||||
|
|
@ -225,15 +226,15 @@
|
|||
$lang->column_type_list['tel'] = 'Telefonnummer';
|
||||
$lang->column_type_list['textarea'] = 'Multi-line textarea';
|
||||
$lang->column_type_list['checkbox'] = 'Checkbox (multiple Auswahl)';
|
||||
$lang->column_type_list['select'] = "select box (Einzel-Auswahl) ';
|
||||
$lang->column_type_list['kr_zip'] = 'Postleitzahl (Koreanisch) ";
|
||||
$lang->column_type_list['select'] = 'select box (Einzel-Auswahl) ';
|
||||
$lang->column_type_list['kr_zip'] = 'Postleitzahl (Koreanisch) ';
|
||||
$lang->column_type_list['date'] = 'Datum (jjjj / mm / dd)';
|
||||
// $lang->column_type_list [ 'jp_zip'] = 'Postleitzahl (Japanisch)';
|
||||
$lang->column_name = 'Spaltenname';
|
||||
$lang->column_title = 'Spaltentitel';
|
||||
$lang->default_value = 'Standardwert';
|
||||
$lang->is_active = 'Aktiv';
|
||||
$lang->is_required = "Pflichtfeld";
|
||||
$lang->is_required = 'Pflichtfeld';
|
||||
|
||||
// Alert Nachrichten für JavaScript unter Verwendung von XML-Filter
|
||||
$lang->filter->isnull = 'Bitte geben Sie einen Wert für% s';
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@
|
|||
$lang->cmd_publish = "発行";
|
||||
$lang->cmd_layout_setup = 'レイアウト設定';
|
||||
$lang->cmd_layout_edit = 'レイアウト編集';
|
||||
$lang->cmd_search_by_ipaddress = 'IP주소로 검색';
|
||||
|
||||
$lang->enable = '可能';
|
||||
$lang->disable = '不可';
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@
|
|||
$lang->cmd_publish = "발행";
|
||||
$lang->cmd_layout_setup = '레이아웃 설정';
|
||||
$lang->cmd_layout_edit = '레이아웃 편집';
|
||||
$lang->cmd_search_by_ipaddress = 'IP주소로 검색';
|
||||
|
||||
$lang->enable = '가능';
|
||||
$lang->disable = '불가능';
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@
|
|||
$lang->cmd_publish = "Опубликовать";
|
||||
$lang->cmd_layout_setup = 'Конфигурировать лейаут';
|
||||
$lang->cmd_layout_edit = 'Редактировать лейаут';
|
||||
$lang->cmd_search_by_ipaddress = 'IP주소로 검색';
|
||||
|
||||
$lang->enable = 'Включено';
|
||||
$lang->disable = 'Выключено';
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@
|
|||
$lang->cmd_publish = "发表";
|
||||
$lang->cmd_layout_setup = '布局设置';
|
||||
$lang->cmd_layout_edit = '编辑布局';
|
||||
$lang->cmd_search_by_ipaddress = '以IP地址搜索';
|
||||
|
||||
$lang->enable = '可用';
|
||||
$lang->disable = '禁用';
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
* 이 내용은 제로보드XE의 버전을 관리자 페이지에 표시하기 위한 용도이며
|
||||
* config.inc.php의 수정이 없더라도 공식 릴리즈시에 수정되어 함께 배포되어야 함
|
||||
**/
|
||||
define('__ZBXE_VERSION__', '1.0.3');
|
||||
define('__ZBXE_VERSION__', '1.0.4');
|
||||
|
||||
/**
|
||||
* @brief 디버깅 메세지 출력
|
||||
|
|
@ -55,10 +55,15 @@
|
|||
**/
|
||||
define('__OB_GZHANDLER_ENABLE__', 1);
|
||||
|
||||
/**
|
||||
* @brief zbXE가 설치된 장소의 base path를 구함
|
||||
**/
|
||||
define('_XE_PATH_', str_replace('config/config.inc.php', '', str_replace('\\', '/', __FILE__)));
|
||||
|
||||
/**
|
||||
* @brief 간단하게 사용하기 위한 함수 정의한 파일 require
|
||||
**/
|
||||
require_once('./config/func.inc.php');
|
||||
require_once(_XE_PATH_.'config/func.inc.php');
|
||||
|
||||
|
||||
if(__DEBUG__) define('__StartTime__', getMicroTime());
|
||||
|
|
@ -69,33 +74,18 @@
|
|||
* php5 기반으로 바꾸게 되면 _autoload를 이용할 수 있기에 제거 대상
|
||||
**/
|
||||
if(__DEBUG__) define('__ClassLoadStartTime__', getMicroTime());
|
||||
require_once('./classes/object/Object.class.php');
|
||||
require_once('./classes/handler/Handler.class.php');
|
||||
require_once('./classes/xml/XmlParser.class.php');
|
||||
require_once('./classes/context/Context.class.php');
|
||||
require_once('./classes/db/DB.class.php');
|
||||
require_once('./classes/file/FileHandler.class.php');
|
||||
require_once('./classes/widget/WidgetHandler.class.php');
|
||||
require_once('./classes/editor/EditorHandler.class.php');
|
||||
require_once('./classes/module/ModuleObject.class.php');
|
||||
require_once('./classes/module/ModuleHandler.class.php');
|
||||
require_once('./classes/display/DisplayHandler.class.php');
|
||||
require_once('./classes/template/TemplateHandler.class.php');
|
||||
require_once('./classes/mail/Mail.class.php');
|
||||
require_once(_XE_PATH_.'classes/object/Object.class.php');
|
||||
require_once(_XE_PATH_.'classes/handler/Handler.class.php');
|
||||
require_once(_XE_PATH_.'classes/xml/XmlParser.class.php');
|
||||
require_once(_XE_PATH_.'classes/context/Context.class.php');
|
||||
require_once(_XE_PATH_.'classes/db/DB.class.php');
|
||||
require_once(_XE_PATH_.'classes/file/FileHandler.class.php');
|
||||
require_once(_XE_PATH_.'classes/widget/WidgetHandler.class.php');
|
||||
require_once(_XE_PATH_.'classes/editor/EditorHandler.class.php');
|
||||
require_once(_XE_PATH_.'classes/module/ModuleObject.class.php');
|
||||
require_once(_XE_PATH_.'classes/module/ModuleHandler.class.php');
|
||||
require_once(_XE_PATH_.'classes/display/DisplayHandler.class.php');
|
||||
require_once(_XE_PATH_.'classes/template/TemplateHandler.class.php');
|
||||
require_once(_XE_PATH_.'classes/mail/Mail.class.php');
|
||||
if(__DEBUG__) $GLOBALS['__elapsed_class_load__'] = getMicroTime() - __ClassLoadStartTime__;
|
||||
|
||||
/**
|
||||
* @brief 세션 설정
|
||||
* 세션의 파기 시간을 5시간으로 하고 세션 저장 경로를 files/session 으로 변경
|
||||
**/
|
||||
if(!ini_get('session.auto_start')) {
|
||||
session_cache_limiter('no-cache, must-revalidate');
|
||||
ini_set('session.gc_maxlifetime', '18000');
|
||||
if(!is_dir('./files/sessions')) {
|
||||
FileHandler::makeDir('./files/sessions');
|
||||
@chmod('./files/sessions', 0777);
|
||||
}
|
||||
if(is_dir('./files/sessions')) session_save_path(realpath('.').'/files/sessions/');
|
||||
session_start();
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -313,7 +313,7 @@
|
|||
* tail -f ./files/_debug_message.php 하여 계속 살펴 볼 수 있다
|
||||
**/
|
||||
function debugPrint($buff = null, $display_line = true) {
|
||||
$debug_file = "./files/_debug_message.php";
|
||||
$debug_file = _XE_PATH_."files/_debug_message.php";
|
||||
$buff = sprintf("%s\n",print_r($buff,true));
|
||||
|
||||
if($display_line) $buff = "\n====================================\n".$buff."------------------------------------\n";
|
||||
|
|
@ -416,9 +416,18 @@
|
|||
// style 태그 제거
|
||||
$content = preg_replace("!<style(.*?)<\/style>!is", '', $content);
|
||||
|
||||
// XSS 사용을 위한 이벤트 제거
|
||||
$content = preg_replace_callback("!<([a-z]+)(.*?)>!is", removeJSEvent, $content);
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
function removeJSEvent($matches) {
|
||||
$tag = strtolower($matches[1]);
|
||||
if($tag == "a" && preg_match('/href=("|\'?)javascript:/i',$matches[2])) $matches[0] = preg_replace('/href=("|\'?)javascript:/i','href=$1_javascript:', $matches[0]);
|
||||
return preg_replace('/on([a-z]+)=/i','_on$1=',$matches[0]);
|
||||
}
|
||||
|
||||
// hexa값을 RGB로 변환
|
||||
if(!function_exists('hexrgb')) {
|
||||
function hexrgb($hexstr) {
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ body { background:#FFFFFF url(../images/default/bgBody.gif) repeat-x left top; }
|
|||
#lnb li.on a { color:#ffffff; background:#de4332; border:1px solid #de4332;}
|
||||
#lnb li.on a:hover,
|
||||
#lnb li.on a:focus { font-weight:bold;}
|
||||
#lnb li ul { display:block; position:relative; width:184px; padding:0 3px; position:relative; border-top:1px solid #ffffff; overflow:hidden;}
|
||||
#lnb li ul { display:block; position:relative; width:184px; padding:0 3px; border-top:1px solid #ffffff; overflow:hidden;}
|
||||
#lnb li.on ul { display:block;}
|
||||
#lnb li ul li { padding:0; border-top:1px solid #f2f2f2; position:relative; top:-1px;}
|
||||
#lnb li ul li a { padding:6px 5px 6px 10px; width:169px; color:#818181 !important; border:none; background:none !important; border:none !important;}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,4 @@
|
|||
|
||||
$lang->about_addon_mid = "On peut choisir des objets dans lesquels la Compagnon soit utilisé.<br />(Tout sera choisi quand rien n'est choisi.)";
|
||||
$lang->about_addon = 'La Compagnon, c\'est pour contrôler les actions plutôt d\'imprimer des résultats de HTML.<br/>Par la Touche à Bascule des compagnons que vous voulez faire marcher ou arrêter, vous pouvez appliquer les fonctions très utiles à administrer votre site web.';
|
||||
?>
|
||||
|
||||
|
||||
?>
|
||||
|
|
@ -12,60 +12,24 @@
|
|||
<!-- 애드온의 목록 -->
|
||||
<table cellspacing="0" class="adminTable">
|
||||
<!--@if($lang_type == 'ko')-->
|
||||
<col />
|
||||
<col width="45" />
|
||||
<col width="130" />
|
||||
<col width="70" />
|
||||
<col width="150" />
|
||||
<col width="45" />
|
||||
<col width="55" />
|
||||
|
||||
{@ $col_width = array(0,45,130,70,150,45,55)}
|
||||
<!--@else if($lang_type == 'en')-->
|
||||
<col />
|
||||
<col width="60" />
|
||||
<col width="130" />
|
||||
<col width="75" />
|
||||
<col width="150" />
|
||||
<col width="75" />
|
||||
<col width="65" />
|
||||
|
||||
{@ $col_width = array(0,60,130,75,150,75,65)}
|
||||
<!--@else if($lang_type == 'zh-CN')-->
|
||||
<col />
|
||||
<col width="50" />
|
||||
<col width="130" />
|
||||
<col width="70" />
|
||||
<col width="150" />
|
||||
<col width="45" />
|
||||
<col width="60" />
|
||||
|
||||
{@ $col_width = array(0,50,130,70,150,45,60)}
|
||||
<!--@else if($lang_type == 'jp')-->
|
||||
<col />
|
||||
<col width="80" />
|
||||
<col width="130" />
|
||||
<col width="70" />
|
||||
<col width="150" />
|
||||
<col width="45" />
|
||||
<col width="55" />
|
||||
|
||||
{@ $col_width = array(0,80,130,70,150,45,55)}
|
||||
<!--@else if($lang_type == 'es')-->
|
||||
<col />
|
||||
<col width="60" />
|
||||
<col width="130" />
|
||||
<col width="75" />
|
||||
<col width="150" />
|
||||
<col width="100" />
|
||||
<col width="65" />
|
||||
|
||||
{@ $col_width = array(0,60,130,75,150,100,65)}
|
||||
<!--@else if($lang_type == 'ru')-->
|
||||
<col />
|
||||
<col width="60" />
|
||||
<col width="130" />
|
||||
<col width="70" />
|
||||
<col width="150" />
|
||||
<col width="100" />
|
||||
<col width="115" />
|
||||
{@ $col_width = array(0,60,130,70,150,100,115)}
|
||||
<!--@else if($lang_type == 'fr')-->
|
||||
{@ $col_width = array(0,60,130,65,150,95,80)}
|
||||
<!--@end-->
|
||||
|
||||
<!--@foreach($col_width as $width)-->
|
||||
<col <!--@if($width)-->width="{$width}" <!--@end-->/>
|
||||
<!--@end-->
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">{$lang->addon_name}</th>
|
||||
|
|
|
|||
|
|
@ -27,16 +27,20 @@
|
|||
// 설치된 모듈 목록 가져오기
|
||||
$oModuleModel = &getModel('module');
|
||||
$installed_module_list = $oModuleModel->getModulesXmlInfo();
|
||||
foreach($installed_module_list as $key => $val) {
|
||||
$action_spec = $oModuleModel->getModuleActionXml($val->module);
|
||||
$actions = array();
|
||||
if($action_spec->default_index_act) $actions[] = $action_spec->default_index_act;
|
||||
if($action_spec->admin_index_act) $actions[] = $action_spec->admin_index_act;
|
||||
if($action_spec->action) foreach($action_spec->action as $k => $v) $actions[] = $k;
|
||||
$installed_module_list[$key]->actions = $actions;
|
||||
}
|
||||
Context::set('installed_module_list', $installed_module_list);
|
||||
|
||||
// 현재 실행중인 모듈을 구해 놓음
|
||||
$running_module = strtolower(preg_replace('/([a-z]+)([A-Z]+)([a-z0-9]+)(.*)/', '\\2\\3', $this->act));
|
||||
Context::set('running_module', $running_module);
|
||||
|
||||
$db_info = Context::getDBInfo();
|
||||
|
||||
Context::set('time_zone_list', $GLOBALS['time_zone']);
|
||||
Context::set('time_zone', $GLOBALS['_time_zone']);
|
||||
|
||||
Context::set('time_zone_list', $GLOBALS['time_zone']);
|
||||
Context::set('time_zone', $GLOBALS['_time_zone']);
|
||||
Context::set('use_rewrite', $db_info->use_rewrite=='Y'?'Y':'N');
|
||||
Context::set('use_optimizer', $db_info->use_optimizer!='N'?'Y':'N');
|
||||
Context::set('qmail_compatibility', $db_info->qmail_compatibility=='Y'?'Y':'N');
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
$lang->current_version = "Current Version";
|
||||
$lang->current_path = "Installed Path";
|
||||
$lang->released_version = "Latest Version";
|
||||
$lang->about_download_link = "New version of Zerboard XE is now available. To download the latest version, click the download link.";
|
||||
$lang->about_download_link = "New version of Zerboard XE is now available. Click the download link to get the latest version.";
|
||||
|
||||
$lang->item_module = "Module List";
|
||||
$lang->item_addon = "Addon List";
|
||||
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
$lang->welcome_to_zeroboard_xe = 'Welcome to the admin page of Zeroboard XE';
|
||||
$lang->about_admin_page = "Admin page is still being developing,\nWe will add essential contents by accepting many good suggestions during Closebeta.";
|
||||
$lang->about_lang_env = "To apply selected language set to users as default, click the [Save] button after changing it.";
|
||||
$lang->about_lang_env = "To apply selected language as default language, click the [Save] button.";
|
||||
|
||||
$lang->zeroboard_xe_user_links = 'Links for Users';
|
||||
$lang->zeroboard_xe_developer_links = 'Links for Developers';
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
<!--@foreach($installed_module_list as $k => $v)-->
|
||||
<!--@if($v->category == $key)-->
|
||||
<!--@if($v->admin_index_act)-->
|
||||
<li <!--@if($running_module==$v->module)-->class="on"<!--@end--> onclick="location.href='{getUrl('','module','admin','act',$v->admin_index_act)}'; return false;">
|
||||
<li <!--@if(in_array($act, $v->actions))-->class="on"<!--@end--> onclick="location.href='{getUrl('','module','admin','act',$v->admin_index_act)}'; return false;">
|
||||
<a href="{getUrl('','module','admin','act',$v->admin_index_act)}">{$v->title}</a>
|
||||
</li>
|
||||
<!--@end-->
|
||||
|
|
|
|||
|
|
@ -281,18 +281,19 @@
|
|||
if($cur_module_info->module != 'board') return new Object();
|
||||
|
||||
// 자신의 아이디를 클릭한 경우
|
||||
if($member_srl == $logged_info->member_srl) $member_info = $logged_info;
|
||||
else {
|
||||
if($member_srl == $logged_info->member_srl) {
|
||||
$member_info = $logged_info;
|
||||
} else {
|
||||
$oMemberModel = &getModel('member');
|
||||
$member_info = $oMemberModel->getMemberInfoByMemberSrl($member_srl);
|
||||
}
|
||||
|
||||
if(!$member_info->user_id) return new Object();
|
||||
|
||||
// 아이디로 검색
|
||||
$menu_str = Context::getLang('cmd_view_own_document');
|
||||
$menu_url = sprintf('./?mid=%s&search_target=user_id&search_keyword=%s', $mid, $member_info->user_id);
|
||||
$obj[] = sprintf('%s,%s,move_url(\'%s\')', Context::getRequestUri().'/modules/member/tpl/images/icon_view_written.gif',$menu_str, $menu_url);
|
||||
// 아이디로 검색기능 추가
|
||||
$url = getUrl('','mid',$mid,'search_target','user_id','search_keyword',$member_info->user_id);
|
||||
$oMemberController = &getController('member');
|
||||
$oMemberController->addMemberPopupMenu($url, 'cmd_view_own_document', './modules/member/tpl/images/icon_view_written.gif');
|
||||
|
||||
return new Object();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@
|
|||
|
||||
// 특정 문서의 permalink로 직접 접속할 경우 page값을 직접 구함
|
||||
if(count($_GET)==1 && isset($_GET['document_srl']) && $oDocument->isExists() && !$oDocument->isNotice()) {
|
||||
$page = $oDocumentModel->getDocumentPage($oDocument->document_srl, $this->module_srl, $this->list_count);
|
||||
$page = $oDocumentModel->getDocumentPage($oDocument, $args);
|
||||
Context::set('page', $page);
|
||||
$args->page = $page;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
$lang->about_layout_setup = '可直接编辑博客布局代码。可以把控件代码插入到您喜欢的位置。';
|
||||
$lang->about_board_category = '可以添加/删除分类项<br />分类有异常情况时,可以尝试重新生成缓冲文件。';
|
||||
$lang->about_except_notice = "设置公告目录项不再重复显示到普通目录当中。";
|
||||
$lang->about_board = "可生成/管理版面的模块。\n生成版面后点击模块名即可对其详细设置。";
|
||||
$lang->about_board = "可生成及管理版面的模块。\n生成版面后,点击模块名即可对其详细设置。";
|
||||
$lang->about_consultation = "咨询功能是指除有管理权限的会员以外,其他会员只能浏览自己发表的主题。\n使用咨询功能时系统将自动禁止非会员的发表主题权限。";
|
||||
$lang->about_admin_mail = '有新的主题或评论时,将自动发电子邮件来通知管理员。<br />多数电子邮件由逗号(,)来分隔。';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -22,10 +22,7 @@
|
|||
<div class="date">
|
||||
|
||||
<strong>{$comment->getRegdate('Y.m.d')}</strong> {$comment->getRegdate('H:i:s')}
|
||||
|
||||
<!--@if($grant->is_admin)-->
|
||||
({$comment->get('ipaddress')})
|
||||
<!--@end-->
|
||||
({$comment->getIpaddress()})
|
||||
</div>
|
||||
|
||||
<div class="author">
|
||||
|
|
|
|||
|
|
@ -58,7 +58,11 @@ Jeong, Chan Myeong 070601~070630
|
|||
.boardRead .titleAndUser .userInfo .author { color:#3074a5; }
|
||||
.boardRead .titleAndUser .userInfo .author a { font-size:.9em; color:#3074a5; text-decoration:none; }
|
||||
|
||||
.boardRead .dateAndCount { clear:both; white-space:nowrap; color:#444444; margin:5px 0 0 0; float:left; font-size:.9em; font-family:tahoma; line-height:17px; padding-bottom:10px; }
|
||||
.boardRead .dateAndCount { clear:both; white-space:nowrap; color:#444444; margin:5px 0 0 0; font-size:.9em; font-family:tahoma; line-height:17px; padding-bottom:10px; }
|
||||
|
||||
.boardRead .dateAndCount .uri { float:left; }
|
||||
.boardRead .dateAndCount .uri a { text-decoration:none; margin-left:4px; color:#BBBBBB; }
|
||||
|
||||
.boardRead .dateAndCount .date { float:right; background:url("../images/common/calendar.gif") no-repeat left top; padding-left:18px; margin-left:10px; }
|
||||
.boardRead .dateAndCount .readedCount { float:right; color:#AAAAAA; margin-left:10px; background:url("../images/common/read.gif") no-repeat left top; padding-left:18px; color:#4A3FD7;}
|
||||
.boardRead .dateAndCount .votedCount { float:right; color:#AAAAAA; margin-left:10px; background:url("../images/common/vote.gif") no-repeat left top; padding-left:18px; color:#D76A3F;}
|
||||
|
|
@ -70,8 +74,6 @@ Jeong, Chan Myeong 070601~070630
|
|||
.boardRead .dateAndCount .category { float:left; margin-right:10px; }
|
||||
.boardRead .dateAndCount .category a { color:#555555; text-decoration:none; background:url("../images/common/category.gif") no-repeat left -1px; padding-left:18px; font-weight:bold;}
|
||||
.boardRead .dateAndCount .category a:hover { text-decoration:underline; }
|
||||
.boardRead .dateAndCount .uri { float:left; }
|
||||
.boardRead .dateAndCount .uri a { text-decoration:none; margin-left:4px; color:#BBBBBB; }
|
||||
|
||||
/* extraVars list */
|
||||
.boardRead .extraVarsList { width:100%; border:1px solid #e0e1db; border-bottom:none; margin:0 0 30px 0; table-layout:fixed;}
|
||||
|
|
@ -80,7 +82,6 @@ Jeong, Chan Myeong 070601~070630
|
|||
.boardRead .extraVarsList td a { color:#555555; }
|
||||
|
||||
.boardRead .readBody { color:#555555; margin-top:20px; }
|
||||
.boardRead .readBody .contentBody .ipaddress { text-align:right; margin-top:10px; color:#bbbbbb; font-family:tahoma;}
|
||||
|
||||
|
||||
.boardRead .tag { background:#FFFFFF url(../images/common/iconTag.gif) no-repeat 3px 2px; padding-left:25px; margin:10px 0 0 0; }
|
||||
|
|
|
|||
|
|
@ -29,8 +29,10 @@
|
|||
</div>
|
||||
|
||||
<div class="dateAndCount">
|
||||
<div class="uri" title="{$lang->document_url}"><a href="{$oDocument->getPermanentUrl()}">{$oDocument->getPermanentUrl()}</a></div>
|
||||
|
||||
<div class="date" title="{$lang->regdate}">
|
||||
<strong>{$oDocument->getRegdate('Y.m.d')}</strong> {$oDocument->getRegdate('H:i:s')}
|
||||
<strong>{$oDocument->getRegdate('Y.m.d')}</strong> {$oDocument->getRegdate('H:i:s')} ({$oDocument->getIpaddress()})
|
||||
</div>
|
||||
|
||||
<div class="readedCount" title="{$lang->readed_count}">{$oDocument->get('readed_count')}</div>
|
||||
|
|
@ -54,8 +56,6 @@
|
|||
<div class="category" title="{$lang->category}"><a href="{getUrl('category',$oDocument->get('category_srl'), 'document_srl', '')}">{$category_list[$oDocument->get('category_srl')]->title}</a></div>
|
||||
<!--@end-->
|
||||
|
||||
<div class="uri" title="{$lang->document_url}"><a href="{$oDocument->getPermanentUrl()}">{$oDocument->getPermanentUrl()}</a></div>
|
||||
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
|
|
@ -102,10 +102,6 @@
|
|||
{$oDocument->getContent()}
|
||||
<!--@end-->
|
||||
|
||||
<!--@if($grant->is_admin)-->
|
||||
<div class="ipaddress">ipaddress : {$oDocument->get('ipaddress')}</div>
|
||||
<!--@end-->
|
||||
|
||||
<!-- 서명 / 프로필 이미지 출력 -->
|
||||
<!--@if($oDocument->getProfileImage() || $oDocument->getSignature())-->
|
||||
<div class="memberSignature">
|
||||
|
|
|
|||
|
|
@ -9,64 +9,23 @@
|
|||
<form action="./" method="get" onsubmit="return doChangeCategory(this);" id="fo_list">
|
||||
<table cellspacing="0" class="adminTable">
|
||||
<!--@if($lang_type == 'ko')-->
|
||||
<col width="50" />
|
||||
<col width="40" />
|
||||
<col width="130" />
|
||||
<col />
|
||||
<col width="65" />
|
||||
<col width="45" />
|
||||
<col width="45" />
|
||||
<col width="45" />
|
||||
|
||||
{@ $col_width = array(50,40,130,0,65,45,45,45)}
|
||||
<!--@else if($lang_type == 'en')-->
|
||||
<col width="50" />
|
||||
<col width="40" />
|
||||
<col width="130" />
|
||||
<col />
|
||||
<col width="80" />
|
||||
<col width="45" />
|
||||
<col width="50" />
|
||||
<col width="55" />
|
||||
|
||||
{@ $col_width = array(50,40,130,0,80,45,50,55)}
|
||||
<!--@else if($lang_type == 'zh-CN')-->
|
||||
<col width="50" />
|
||||
<col width="40" />
|
||||
<col width="130" />
|
||||
<col />
|
||||
<col width="65" />
|
||||
<col width="45" />
|
||||
<col width="45" />
|
||||
<col width="45" />
|
||||
|
||||
{@ $col_width = array(50,40,130,0,65,45,45,45)}
|
||||
<!--@else if($lang_type == 'jp')-->
|
||||
<col width="50" />
|
||||
<col width="40" />
|
||||
<col width="130" />
|
||||
<col />
|
||||
<col width="65" />
|
||||
<col width="45" />
|
||||
<col width="55" />
|
||||
<col width="45" />
|
||||
|
||||
{@ $col_width = array(50,40,130,0,65,45,55,45)}
|
||||
<!--@else if($lang_type == 'es')-->
|
||||
<col width="50" />
|
||||
<col width="40" />
|
||||
<col width="130" />
|
||||
<col />
|
||||
<col width="80" />
|
||||
<col width="40" />
|
||||
<col width="55" />
|
||||
<col width="70" />
|
||||
|
||||
{@ $col_width = array(50,40,130,0,80,40,55,70)}
|
||||
<!--@else if($lang_type == 'ru')-->
|
||||
<col width="50" />
|
||||
<col width="40" />
|
||||
<col width="130" />
|
||||
<col />
|
||||
<col width="90" />
|
||||
<col width="95" />
|
||||
<col width="85" />
|
||||
<col width="70" />
|
||||
{@ $col_width = array(50,40,130,0,90,95,85,70)}
|
||||
<!--@else if($lang_type == 'fr')-->
|
||||
{@ $col_width = array(50,40,130,0,75,40,55,55)}
|
||||
<!--@end-->
|
||||
|
||||
<!--@foreach($col_width as $width)-->
|
||||
<col <!--@if($width)-->width="{$width}" <!--@end-->/>
|
||||
<!--@end-->
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
|
|||
|
|
@ -159,11 +159,26 @@
|
|||
|
||||
$list_args->head = $parent->head;
|
||||
$list_args->depth = $parent->depth+1;
|
||||
if($list_args->depth<2) $list_args->arrange = $obj->comment_srl;
|
||||
else {
|
||||
$list_args->arrange = $parent->arrange;
|
||||
$output = executeQuery('comment.updateCommentListArrange', $list_args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// depth가 2단계 미만이면 별도의 update문 없이 insert만으로 쓰레드 정리
|
||||
if($list_args->depth<2) {
|
||||
$list_args->arrange = $obj->comment_srl;
|
||||
|
||||
// depth가 2단계 이상이면 반업데이트 실행
|
||||
} else {
|
||||
// 부모 댓글과 같은 head를 가지고 depth가 같거나 작은 댓글중 제일 위 댓글을 구함
|
||||
$p_args->head = $parent->head;
|
||||
$p_args->arrange = $parent->arrange;
|
||||
$p_args->depth = $parent->depth;
|
||||
$output = executeQuery('comment.getCommentParentNextSibling', $p_args);
|
||||
|
||||
if($output->data->arrange) {
|
||||
$list_args->arrange = $output->data->arrange;
|
||||
$output = executeQuery('comment.updateCommentListArrange', $list_args);
|
||||
} else {
|
||||
$list_args->arrange = $obj->comment_srl;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -532,5 +547,21 @@
|
|||
$this->setMessage('success_declared');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 댓글의 이 댓글을.. 클릭시 나타나는 팝업 메뉴를 추가하는 method
|
||||
**/
|
||||
function addCommentPopupMenu($url, $str, $icon = '', $target = 'self') {
|
||||
$comment_popup_menu_list = Context::get('comment_popup_menu_list');
|
||||
if(!is_array($comment_popup_menu_list)) $comment_popup_menu_list = array();
|
||||
|
||||
$obj->url = $url;
|
||||
$obj->str = $str;
|
||||
$obj->icon = $icon;
|
||||
$obj->target = $target;
|
||||
$comment_popup_menu_list[] = $obj;
|
||||
|
||||
Context::set('comment_popup_menu_list', $comment_popup_menu_list);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -121,8 +121,13 @@
|
|||
$sender_member_srl = $logged_info->member_srl;
|
||||
|
||||
// 쪽지 발송
|
||||
$oMemberController = &getController('member');
|
||||
$oMemberController->sendMessage($sender_member_srl, $receiver_srl, $title, $content, false);
|
||||
$oCommunicationController = &getController('communication');
|
||||
$oCommunicationController->sendMessage($sender_member_srl, $receiver_srl, $title, $content, false);
|
||||
}
|
||||
|
||||
function getIpaddress() {
|
||||
if($this->isGranted()) return $this->get('ipaddress');
|
||||
return preg_replace('/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/','*.$1.$2.$3', $this->get('ipaddress'));
|
||||
}
|
||||
|
||||
function isExistsHomepage() {
|
||||
|
|
|
|||
|
|
@ -32,31 +32,49 @@
|
|||
// trigger 호출
|
||||
ModuleHandler::triggerCall('comment.getCommentMenu', 'before', $menu_list);
|
||||
|
||||
$oCommentController = &getController('comment');
|
||||
|
||||
// 회원이어야만 가능한 기능
|
||||
if($logged_info->member_srl) {
|
||||
|
||||
// 추천 버튼 추가
|
||||
$menu_str = Context::getLang('cmd_vote');
|
||||
$menu_link = sprintf("doCallModuleAction('comment','procCommentVoteUp','%s')", $comment_srl);
|
||||
$menu_list[] = sprintf("\n%s,%s,%s", '', $menu_str, $menu_link);
|
||||
$url = sprintf("doCallModuleAction('comment','procCommentVoteUp','%s')", $comment_srl);
|
||||
$oCommentController->addCommentPopupMenu($url,'cmd_vote','./modules/document/tpl/icons/vote_up.gif','javascript');
|
||||
|
||||
// 비추천 버튼 추가
|
||||
$menu_str = Context::getLang('cmd_vote_down');
|
||||
$menu_link = sprintf("doCallModuleAction('comment','procCommentVoteDown','%s')", $comment_srl);
|
||||
$menu_list[] = sprintf("\n%s,%s,%s", '', $menu_str, $menu_link);
|
||||
$url = sprintf("doCallModuleAction('comment','procCommentVoteDown','%s')", $comment_srl);
|
||||
$oCommentController->addCommentPopupMenu($url,'cmd_vote_down','./modules/document/tpl/icons/vote_down.gif','javascript');
|
||||
|
||||
// 신고 기능 추가
|
||||
$menu_str = Context::getLang('cmd_declare');
|
||||
$menu_link = sprintf("doCallModuleAction('comment','procCommentDeclare','%s')", $comment_srl);
|
||||
$menu_list[] = sprintf("\n%s,%s,%s", '', $menu_str, $menu_link);
|
||||
|
||||
$url = sprintf("doCallModuleAction('comment','procCommentDeclare','%s')", $comment_srl);
|
||||
$oCommentController->addCommentPopupMenu($url,'cmd_declare','./modules/document/tpl/icons/declare.gif','javascript');
|
||||
}
|
||||
|
||||
// trigger 호출 (after)
|
||||
ModuleHandler::triggerCall('comment.getCommentMenu', 'after', $menu_list);
|
||||
|
||||
// 정보를 저장
|
||||
$this->add("menu_list", implode("\n",$menu_list));
|
||||
// 관리자일 경우 ip로 글 찾기
|
||||
if($logged_info->is_admin == 'Y') {
|
||||
$oCommentModel = &getModel('comment');
|
||||
$oComment = $oCommentModel->getComment($comment_srl);
|
||||
|
||||
if($oComment->isExists()) {
|
||||
// ip주소에 해당하는 글 찾기
|
||||
$url = getUrl('','module','admin','act','dispCommentAdminList','search_target','ipaddress','search_keyword',$oComment->get('ipaddress'));
|
||||
$icon_path = './modules/member/tpl/images/icon_management.gif';
|
||||
$oCommentController->addCommentPopupMenu($url,'cmd_search_by_ipaddress',$icon_path,'TraceByIpaddress');
|
||||
}
|
||||
}
|
||||
|
||||
// 팝업메뉴의 언어 변경
|
||||
$menus = Context::get('comment_popup_menu_list');
|
||||
$menus_count = count($menus);
|
||||
for($i=0;$i<$menus_count;$i++) {
|
||||
$menus[$i]->str = Context::getLang($menus[$i]->str);
|
||||
}
|
||||
|
||||
// 최종적으로 정리된 팝업메뉴 목록을 구함
|
||||
$this->add('menus', $menus);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -346,6 +364,9 @@
|
|||
case 'ipaddress' :
|
||||
$args->s_ipaddress= $search_keyword;
|
||||
break;
|
||||
case 'member_srl' :
|
||||
$args->{"s_".$search_target} = (int)$search_keyword;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* @brief comment module's basic language pack
|
||||
**/
|
||||
|
||||
$lang->cmd_comment_do = 'You would...';
|
||||
$lang->cmd_comment_do = 'I want to';
|
||||
|
||||
$lang->comment_list = 'Comments List';
|
||||
$lang->cmd_delete_checked_comment = 'Delete selected item';
|
||||
|
|
@ -21,6 +21,7 @@
|
|||
'user_id' => 'ID',
|
||||
'user_name' => 'Name',
|
||||
'nick_name' => 'Nickname',
|
||||
'member_srl' => 'Member Serial',
|
||||
'email_address' => 'Email',
|
||||
'homepage' => 'Homepage',
|
||||
'regdate' => 'Date',
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
'user_id' => 'ID',
|
||||
'user_name' => 'Nombre',
|
||||
'nick_name' => 'Apodo',
|
||||
'member_srl' => 'Member Serial',
|
||||
'email_address' => 'Correo Electrónico',
|
||||
'homepage' => 'Página web',
|
||||
'regdate' => 'Fecha del registro',
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
'user_id' => 'ID',
|
||||
'user_name' => 'Nom',
|
||||
'nick_name' => 'Surnom',
|
||||
'member_srl' => 'Member Serial',
|
||||
'email_address' => 'Courriel',
|
||||
'homepage' => 'Page d\'Accueil',
|
||||
'regdate' => 'Jour',
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
'user_id' => 'ユーザID',
|
||||
'user_name' => '名前',
|
||||
'nick_name' => 'ニックネーム',
|
||||
'member_srl' => 'Member Serial',
|
||||
'email_address' => 'メールアドレス',
|
||||
'homepage' => 'ホームページURL',
|
||||
'regdate' => '登録日',
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
'user_id' => '아이디',
|
||||
'user_name' => '이름',
|
||||
'nick_name' => '닉네임',
|
||||
'member_srl' => '회원번호',
|
||||
'email_address' => '이메일주소',
|
||||
'homepage' => '홈페이지',
|
||||
'regdate' => '등록일',
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
'user_id' => 'ID',
|
||||
'user_name' => 'Имя',
|
||||
'nick_name' => 'Ник',
|
||||
'member_srl' => 'Member Serial',
|
||||
'email_address' => 'Email',
|
||||
'homepage' => 'Домашняя страница',
|
||||
'regdate' => 'Дата',
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
'user_id' => 'I D',
|
||||
'user_name' => '姓名',
|
||||
'nick_name' => '昵称',
|
||||
'member_srl' => '会员编号',
|
||||
'email_address' => '电子信箱',
|
||||
'homepage' => '主页',
|
||||
'regdate' => '日期',
|
||||
|
|
|
|||
|
|
@ -1,11 +1,14 @@
|
|||
<query id="getCommentListItem" action="select">
|
||||
<tables>
|
||||
<table name="comments" />
|
||||
<table name="comments_list" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
<column name="comments.parent_srl" />
|
||||
<column name="comments_list.*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="comment_srl" var="comment_srl" notnull="notnull" />
|
||||
<condition operation="equal" column="comments.comment_srl" var="comment_srl" notnull="notnull" />
|
||||
<condition operation="equal" column="comments.comment_srl" default="comments_list.comment_srl" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -5,16 +5,15 @@
|
|||
</tables>
|
||||
<columns>
|
||||
<column name="comments.*" />
|
||||
<column name="depth" alias="depth" />
|
||||
<column name="comments_list.depth" alias="depth" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="comments_list.document_srl" var="document_srl" notnull="notnull" pipe="and" />
|
||||
<condition operation="equal" column="comments_list.comment_srl" var="comments.comment_srl" filter="number" pipe="and" />
|
||||
<condition operation="more" column="comments_list.head" default="0" pipe="and" />
|
||||
<condition operation="more" column="comments_list.arrange" default="0" pipe="and" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="head" order="asc" />
|
||||
<index var="sort_index" default="arrange" order="asc" />
|
||||
<index var="sort_index" default="comment_srl" order="asc" />
|
||||
<list_count var="list_count" default="list_count" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
|
|
|
|||
13
modules/comment/queries/getCommentParentNextSibling.xml
Normal file
13
modules/comment/queries/getCommentParentNextSibling.xml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<query id="getCommentParentNextSibling" action="select">
|
||||
<tables>
|
||||
<table name="comments_list" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="min(comments_list.arrange)" alias="arrange" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="comments_list.head" var="head" filter="number" notnull="notnull" />
|
||||
<condition operation="excess" column="comments_list.arrange" var="arrange" filter="number" notnull="notnull" pipe="and" />
|
||||
<condition operation="less" column="comments_list.depth" var="depth" filter="number" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
@ -13,6 +13,7 @@
|
|||
<condition operation="like" column="nick_name" var="s_nick_name" pipe="or" />
|
||||
<condition operation="like" column="email_address" var="s_email_address" pipe="or" />
|
||||
<condition operation="like" column="homepage" var="s_homepage" pipe="or" />
|
||||
<condition operation="equal" column="member_srl" var="s_member_srl" pipe="or" />
|
||||
<condition operation="like_prefix" column="regdate" var="s_regdate" pipe="or" />
|
||||
<condition operation="like_prefix" column="last_update" var="s_last_upate" pipe="or" />
|
||||
<condition operation="like_prefix" column="ipaddress" var="s_ipaddress" pipe="or" />
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
<column name="notify_message" var="notify_message" default="N" />
|
||||
<column name="content" var="content" notnull="notnull" />
|
||||
<column name="voted_count" var="voted_count" default="0" />
|
||||
<column name="blamed_count" var="blamed_count" default="0" />
|
||||
<column name="password" var="password" minlength="2" maxlength="60" />
|
||||
<column name="nick_name" var="nick_name" notnull="notnull" minlength="1" maxlength="40" />
|
||||
<column name="user_id" var="user_id" default="" />
|
||||
|
|
|
|||
|
|
@ -8,6 +8,6 @@
|
|||
<conditions>
|
||||
<condition operation="equal" column="document_srl" var="document_srl" filter="number" notnull="notnull" />
|
||||
<condition operation="equal" column="head" var="head" filter="number" notnull="notnull" pipe="and" />
|
||||
<condition operation="excess" column="arrange" var="arrange" filter="number" notnull="notnull" pipe="and" />
|
||||
<condition operation="more" column="arrange" var="arrange" filter="number" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -12,61 +12,27 @@
|
|||
<!-- 목록 -->
|
||||
<table cellspacing="0" class="adminTable">
|
||||
<!--@if($lang_type == 'ko')-->
|
||||
<col width="50" />
|
||||
<col />
|
||||
<col width="150" />
|
||||
<col width="65" />
|
||||
<col width="65" />
|
||||
<col width="90" />
|
||||
<col width="45" />
|
||||
|
||||
{@ $col_width = array(50,40,0,150,65,65,90,45)}
|
||||
<!--@else if($lang_type == 'en')-->
|
||||
<col width="50" />
|
||||
<col />
|
||||
<col width="150" />
|
||||
<col width="75" />
|
||||
<col width="75" />
|
||||
<col width="90" />
|
||||
<col width="45" />
|
||||
|
||||
{@ $col_width = array(50,40,0,150,75,75,90,45)}
|
||||
<!--@else if($lang_type == 'zh-CN')-->
|
||||
<col width="50" />
|
||||
<col />
|
||||
<col width="150" />
|
||||
<col width="70" />
|
||||
<col width="70" />
|
||||
<col width="90" />
|
||||
<col width="45" />
|
||||
|
||||
{@ $col_width = array(50,40,0,150,70,70,90,45)}
|
||||
<!--@else if($lang_type == 'jp')-->
|
||||
<col width="50" />
|
||||
<col />
|
||||
<col width="150" />
|
||||
<col width="75" />
|
||||
<col width="75" />
|
||||
<col width="90" />
|
||||
<col width="45" />
|
||||
|
||||
{@ $col_width = array(50,40,0,150,75,75,90,45)}
|
||||
<!--@else if($lang_type == 'es')-->
|
||||
<col width="50" />
|
||||
<col />
|
||||
<col width="150" />
|
||||
<col width="75" />
|
||||
<col width="75" />
|
||||
<col width="90" />
|
||||
<col width="50" />
|
||||
|
||||
{@ $col_width = array(50,40,0,150,75,75,90,50)}
|
||||
<!--@else if($lang_type == 'ru')-->
|
||||
<col width="50" />
|
||||
<col />
|
||||
<col width="150" />
|
||||
<col width="75" />
|
||||
<col width="75" />
|
||||
<col width="90" />
|
||||
<col width="95" />
|
||||
{@ $col_width = array(50,40,0,150,75,75,90,95)}
|
||||
<!--@else if($lang_type == 'fr')-->
|
||||
{@ $col_width = array(50,40,0,150,65,90,90,60)}
|
||||
<!--@end-->
|
||||
|
||||
<!--@foreach($col_width as $width)-->
|
||||
<col <!--@if($width)-->width="{$width}" <!--@end-->/>
|
||||
<!--@end-->
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">{$lang->no}</th>
|
||||
<th scope="col"><input type="checkbox" onclick="checkboxSelectAll(this.form, 'cart'); return false;" /></th>
|
||||
<th scope="col">
|
||||
<div class="nowrap">
|
||||
|
|
@ -90,6 +56,7 @@
|
|||
<!--@foreach($comment_list as $no => $val)-->
|
||||
<tr>
|
||||
<td rowspan="2" class="tahoma">{$no}</td>
|
||||
<td><input type="checkbox" name="cart" value="{$val->comment_srl}" /></td>
|
||||
<td class="blue"><a href="./?mid={$module_list[$val->module_srl]->mid}" onclick="window.open(this.href);return false">{htmlspecialchars($module_list[$val->module_srl]->browser_title)}</a></td>
|
||||
<td><div class="member_{$val->member_srl}">{htmlspecialchars($val->nick_name)}</div></td>
|
||||
<td class="tahoma">{nl2br(zdate($val->regdate,"Y-m-d\nH:i:s"))}</td>
|
||||
|
|
@ -98,8 +65,7 @@
|
|||
<td class="blue"><a href="{getUrl('','document_srl',$val->document_srl)}#comment_{$val->comment_srl}" onclick="window.open(this.href);return false;">{$lang->cmd_move}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6" class="left">
|
||||
<input type="checkbox" name="cart" value="{$val->comment_srl}" />
|
||||
<td colspan="7" class="left">
|
||||
{cut_str(htmlspecialchars(strip_tags($val->content)),100,'...')}
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -12,58 +12,23 @@
|
|||
<!-- 목록 -->
|
||||
<table cellspacing="0" class="adminTable">
|
||||
<!--@if($lang_type == 'ko')-->
|
||||
<col width="50" />
|
||||
<col />
|
||||
<col width="150" />
|
||||
<col width="65" />
|
||||
<col width="50" />
|
||||
<col width="90" />
|
||||
<col width="45" />
|
||||
|
||||
{@ $col_width = array(50,0,150,65,50,90,45)}
|
||||
<!--@else if($lang_type == 'en')-->
|
||||
<col width="50" />
|
||||
<col />
|
||||
<col width="150" />
|
||||
<col width="80" />
|
||||
<col width="60" />
|
||||
<col width="90" />
|
||||
<col width="50" />
|
||||
|
||||
{@ $col_width = array(50,0,150,80,60,90,50)}
|
||||
<!--@else if($lang_type == 'zh-CN')-->
|
||||
<col width="50" />
|
||||
<col />
|
||||
<col width="150" />
|
||||
<col width="65" />
|
||||
<col width="45" />
|
||||
<col width="90" />
|
||||
<col width="45" />
|
||||
|
||||
{@ $col_width = array(50,0,150,65,45,90,45)}
|
||||
<!--@else if($lang_type == 'jp')-->
|
||||
<col width="50" />
|
||||
<col />
|
||||
<col width="150" />
|
||||
<col width="80" />
|
||||
<col width="60" />
|
||||
<col width="90" />
|
||||
<col width="50" />
|
||||
|
||||
{@ $col_width = array(50,0,150,80,60,90,50)}
|
||||
<!--@else if($lang_type == 'es')-->
|
||||
<col width="50" />
|
||||
<col />
|
||||
<col width="150" />
|
||||
<col width="80" />
|
||||
<col width="60" />
|
||||
<col width="90" />
|
||||
<col width="50" />
|
||||
|
||||
{@ $col_width = array(80,0,150,80,60,90,50)}
|
||||
<!--@else if($lang_type == 'ru')-->
|
||||
<col width="50" />
|
||||
<col />
|
||||
<col width="150" />
|
||||
<col width="70" />
|
||||
<col width="75" />
|
||||
<col width="70" />
|
||||
<col width="95" />
|
||||
{@ $col_width = array(50,0,150,70,75,70,95)}
|
||||
<!--@else if($lang_type == 'fr')-->
|
||||
{@ $col_width = array(50,0,150,80,60,85,60)}
|
||||
<!--@end-->
|
||||
|
||||
<!--@foreach($col_width as $width)-->
|
||||
<col <!--@if($width)-->width="{$width}" <!--@end-->/>
|
||||
<!--@end-->
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
|
|||
35
modules/communication/communication.admin.controller.php
Normal file
35
modules/communication/communication.admin.controller.php
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
/**
|
||||
* @class communicationAdminController
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief communication module의 admin controller class
|
||||
**/
|
||||
|
||||
class communicationAdminController extends communication {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief communication 모듈 설정 저장
|
||||
**/
|
||||
function procCommunicationAdminInsertConfig() {
|
||||
// 기본 정보를 받음
|
||||
$args = Context::gets('skin','colorset','editor_skin');
|
||||
|
||||
if(!$args->skin) $args->skin = "default";
|
||||
if(!$args->colorset) $args->colorset = "white";
|
||||
if(!$args->editor_skin) $args->editor_skin = "default";
|
||||
|
||||
// module Controller 객체 생성하여 입력
|
||||
$oModuleController = &getController('module');
|
||||
$output = $oModuleController->insertModuleConfig('communication',$args);
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
40
modules/communication/communication.admin.model.php
Normal file
40
modules/communication/communication.admin.model.php
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
/**
|
||||
* @class communicationAdminModel
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief communication module의 admin model class
|
||||
**/
|
||||
|
||||
class communicationAdminModel extends communication {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 지정된 스킨의 컬러셋 선택을 위한 html을 return
|
||||
**/
|
||||
function getCommunicationAdminColorset() {
|
||||
$skin = Context::get('skin');
|
||||
if(!$skin) $tpl = "";
|
||||
else {
|
||||
$oModuleModel = &getModel('module');
|
||||
$skin_info = $oModuleModel->loadSkinInfo($this->module_path, $skin);
|
||||
Context::set('skin_info', $skin_info);
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$communication_config = $oModuleModel->getModuleConfig('communication');
|
||||
if(!$communication_config->colorset) $communication_config->colorset = "white";
|
||||
Context::set('communication_config', $communication_config);
|
||||
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
$tpl = $oTemplate->compile($this->module_path.'tpl', 'colorset_list');
|
||||
}
|
||||
|
||||
$this->add('tpl', $tpl);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
40
modules/communication/communication.admin.view.php
Normal file
40
modules/communication/communication.admin.view.php
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
/**
|
||||
* @class communicationAdminView
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief communication module의 admin view class
|
||||
**/
|
||||
|
||||
class communicationAdminView extends communication {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 쪽지 및 친구등의 관리를 위한 설정
|
||||
**/
|
||||
function dispCommunicationAdminConfig() {
|
||||
// 객체 생성
|
||||
$oEditorModel = &getModel('editor');
|
||||
$oModuleModel = &getModel('module');
|
||||
$oCommunicationModel = &getModel('communication');
|
||||
|
||||
// communication 모듈의 모듈설정 읽음
|
||||
Context::set('communication_config', $oCommunicationModel->getConfig() );
|
||||
|
||||
// 에디터 스킨 목록을 구함
|
||||
Context::set('editor_skin_list', $oEditorModel->getEditorSkinList() );
|
||||
|
||||
// 커뮤니케이션 스킨 목록을 구함
|
||||
Context::set('communication_skin_list', $oModuleModel->getSkins($this->module_path) );
|
||||
|
||||
// template 지정
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('index');
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
71
modules/communication/communication.class.php
Normal file
71
modules/communication/communication.class.php
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
<?php
|
||||
/**
|
||||
* @class communication
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief communication module의 high class
|
||||
**/
|
||||
|
||||
class communication extends ModuleObject {
|
||||
|
||||
/**
|
||||
* @brief 설치시 추가 작업이 필요할시 구현
|
||||
**/
|
||||
function moduleInstall() {
|
||||
// 새쪽지 알림을 위한 임시 파일 저장소 생성
|
||||
FileHandler::makeDir('./files/member_extra_info/new_message_flags');
|
||||
|
||||
// action forward에 등록 (관리자 모드에서 사용하기 위함)
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController->insertActionForward('communication', 'view', 'dispCommunicationAdminConfig');
|
||||
|
||||
$oModuleController->insertActionForward('communication', 'view', 'dispCommunicationMessages');
|
||||
$oModuleController->insertActionForward('communication', 'view', 'dispCommunicationFriend');
|
||||
|
||||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 설치가 이상이 없는지 체크하는 method
|
||||
**/
|
||||
function checkUpdate() {
|
||||
if(!is_dir("./files/member_extra_info/new_message_flags")) return true;
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
if(!$oModuleModel->getActionForward('dispCommunicationAdminConfig')) return true;
|
||||
|
||||
if(!$oModuleModel->getActionForward('dispCommunicationMessages')) return true;
|
||||
if(!$oModuleModel->getActionForward('dispCommunicationFriend')) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 업데이트 실행
|
||||
**/
|
||||
function moduleUpdate() {
|
||||
if(!is_dir("./files/member_extra_info/new_message_flags"))
|
||||
FileHandler::makeDir('./files/member_extra_info/new_message_flags');
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$oModuleController = &getController('module');
|
||||
|
||||
if(!$oModuleModel->getActionForward('dispCommunicationAdminConfig'))
|
||||
$oModuleController->insertActionForward('communication', 'view', 'dispCommunicationAdminConfig');
|
||||
|
||||
if(!$oModuleModel->getActionForward('dispCommunicationMessages'))
|
||||
$oModuleController->insertActionForward('communication', 'view', 'dispCommunicationMessages');
|
||||
|
||||
if(!$oModuleModel->getActionForward('dispCommunicationFriend'))
|
||||
$oModuleController->insertActionForward('communication', 'view', 'dispCommunicationFriend');
|
||||
|
||||
return new Object(0, 'success_updated');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 캐시 파일 재생성
|
||||
**/
|
||||
function recompileCache() {
|
||||
}
|
||||
}
|
||||
?>
|
||||
413
modules/communication/communication.controller.php
Normal file
413
modules/communication/communication.controller.php
Normal file
|
|
@ -0,0 +1,413 @@
|
|||
<?php
|
||||
/**
|
||||
* @class communicationController
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief communication module의 Controller class
|
||||
**/
|
||||
|
||||
class communicationController extends communication {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 쪽지함 설정 변경
|
||||
**/
|
||||
function procCommunicationUpdateAllowMessage() {
|
||||
if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged');
|
||||
|
||||
$args->allow_message = Context::get('allow_message');
|
||||
if(!in_array($args->allow_message, array('Y','N','F'))) $args->allow_message = 'Y';
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
|
||||
$output = executeQuery('communication.updateAllowMessage', $args);
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 쪽지 발송
|
||||
**/
|
||||
function procCommunicationSendMessage() {
|
||||
// 로그인 정보 체크
|
||||
if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged');
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
// 변수 검사
|
||||
$receiver_srl = Context::get('receiver_srl');
|
||||
if(!$receiver_srl) return new Object(-1, 'msg_not_exists_member');
|
||||
|
||||
$title = trim(Context::get('title'));
|
||||
if(!$title) return new Object(-1, 'msg_title_is_null');
|
||||
|
||||
$content = trim(Context::get('content'));
|
||||
if(!$content) return new Object(-1, 'msg_content_is_null');
|
||||
|
||||
$send_mail = Context::get('send_mail');
|
||||
if($send_mail != 'Y') $send_mail = 'N';
|
||||
|
||||
// 받을 회원이 있는지에 대한 검사
|
||||
$oMemberModel = &getModel('member');
|
||||
$receiver_member_info = $oMemberModel->getMemberInfoByMemberSrl($receiver_srl);
|
||||
if($receiver_member_info->member_srl != $receiver_srl) return new Object(-1, 'msg_not_exists_member');
|
||||
|
||||
// 받을 회원의 쪽지 수신여부 검사 (최고관리자이면 패스)
|
||||
if($logged_info->is_admin != 'Y') {
|
||||
if($receiver_member_info->allow_message == 'F') {
|
||||
if(!$oCommunicationModel->isFriend($receiver_member_info->member_srl)) return new object(-1, 'msg_allow_message_to_friend');
|
||||
} elseif($receiver_member_info->allow_messge == 'N') {
|
||||
return new object(-1, 'msg_disallow_message');
|
||||
}
|
||||
}
|
||||
|
||||
// 쪽지 발송
|
||||
$output = $this->sendMessage($logged_info->member_srl, $receiver_srl, $title, $content);
|
||||
|
||||
// 메일로도 발송
|
||||
if($output->toBool() && $send_mail == 'Y') {
|
||||
$view_url = Context::getRequestUri();
|
||||
$content = sprintf("%s<br /><br />From : <a href=\"%s\" target=\"_blank\">%s</a>",$content, $view_url, $view_url);
|
||||
$oMail = new Mail();
|
||||
$oMail->setTitle($title);
|
||||
$oMail->setContent($content);
|
||||
$oMail->setSender($logged_info->user_name, $logged_info->email_address);
|
||||
$oMail->setReceiptor($receiver_member_info->user_name, $receiver_member_info->email_address);
|
||||
$oMail->send();
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
function sendMessage($sender_srl, $receiver_srl, $title, $content, $sender_log = true) {
|
||||
$content = removeHackTag($content);
|
||||
|
||||
// 보내는 사용자의 쪽지함에 넣을 쪽지
|
||||
$sender_args->sender_srl = $sender_srl;
|
||||
$sender_args->receiver_srl = $receiver_srl;
|
||||
$sender_args->message_type = 'S';
|
||||
$sender_args->title = $title;
|
||||
$sender_args->content = $content;
|
||||
$sender_args->readed = 'N';
|
||||
$sender_args->regdate = date("YmdHis");
|
||||
$sender_args->related_srl = getNextSequence();
|
||||
$sender_args->message_srl = getNextSequence();
|
||||
$sender_args->list_order = getNextSequence()*-1;
|
||||
|
||||
// 받는 회원의 쪽지함에 넣을 쪽지
|
||||
$receiver_args->message_srl = $sender_args->related_srl;
|
||||
$receiver_args->related_srl = 0;
|
||||
$receiver_args->list_order = $sender_args->related_srl*-1;
|
||||
$receiver_args->sender_srl = $sender_srl;
|
||||
if(!$receiver_args->sender_srl) $receiver_args->sender_srl = $receiver_srl;
|
||||
$receiver_args->receiver_srl = $receiver_srl;
|
||||
$receiver_args->message_type = 'R';
|
||||
$receiver_args->title = $title;
|
||||
$receiver_args->content = $content;
|
||||
$receiver_args->readed = 'N';
|
||||
$receiver_args->regdate = date("YmdHis");
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
$oDB->begin();
|
||||
|
||||
// 발송하는 회원의 쪽지함에 넣을 쪽지
|
||||
if($sender_srl && $sender_log) {
|
||||
$output = executeQuery('communication.sendMessage', $sender_args);
|
||||
if(!$output->toBool()) {
|
||||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
||||
// 받을 회원의 쪽지함에 넣을 쪽지
|
||||
$output = executeQuery('communication.sendMessage', $receiver_args);
|
||||
if(!$output->toBool()) {
|
||||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
|
||||
// 받는 회원의 쪽지 발송 플래그 생성 (파일로 생성)
|
||||
$flag_path = './files/member_extra_info/new_message_flags/'.getNumberingPath($receiver_srl);
|
||||
FileHandler::makeDir($flag_path);
|
||||
$flag_file = sprintf('%s%s', $flag_path, $receiver_srl);
|
||||
FileHandler::writeFile($flag_file,'1');
|
||||
|
||||
$oDB->commit();
|
||||
|
||||
return new Object(0,'success_sended');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 특정 쪽지를 보관함으로 보냄
|
||||
**/
|
||||
function procCommunicationStoreMessage() {
|
||||
// 로그인 정보 체크
|
||||
if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged');
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
// 변수 체크
|
||||
$message_srl = Context::get('message_srl');
|
||||
if(!$message_srl) return new Object(-1,'msg_invalid_request');
|
||||
|
||||
// 쪽지를 가져옴
|
||||
$oCommunicationModel = &getModel('communication');
|
||||
$message = $oCommunicationModel->getSelectedMessage($message_srl);
|
||||
if(!$message || $message->message_type != 'R') return new Object(-1,'msg_invalid_request');
|
||||
|
||||
$args->message_srl = $message_srl;
|
||||
$args->receiver_srl = $logged_info->member_srl;
|
||||
$output = executeQuery('communication.setMessageStored', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage('success_registed');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 쪽지 삭제
|
||||
**/
|
||||
function procCommunicationDeleteMessage() {
|
||||
// 로그인 정보 체크
|
||||
if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged');
|
||||
$logged_info = Context::get('logged_info');
|
||||
$member_srl = $logged_info->member_srl;
|
||||
|
||||
// 변수 체크
|
||||
$message_srl = Context::get('message_srl');
|
||||
if(!$message_srl) return new Object(-1,'msg_invalid_request');
|
||||
|
||||
// 쪽지를 가져옴
|
||||
$oCommunicationModel = &getModel('communication');
|
||||
$message = $oCommunicationModel->getSelectedMessage($message_srl);
|
||||
if(!$message) return new Object(-1,'msg_invalid_request');
|
||||
|
||||
// 발송인+type=S or 수신인+type=R 검사
|
||||
if($message->sender_srl == $member_srl && $message->message_type == 'S') {
|
||||
if(!$message_srl) return new Object(-1, 'msg_invalid_request');
|
||||
} elseif($message->receiver_srl == $member_srl && $message->message_type == 'R') {
|
||||
if(!$message_srl) return new Object(-1, 'msg_invalid_request');
|
||||
}
|
||||
|
||||
// 삭제
|
||||
$args->message_srl = $message_srl;
|
||||
$output = executeQuery('communication.deleteMessage', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage('success_deleted');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 선택된 다수의 쪽지 삭제
|
||||
**/
|
||||
function procCommunicationDeleteMessages() {
|
||||
// 로그인 정보 체크
|
||||
if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged');
|
||||
$logged_info = Context::get('logged_info');
|
||||
$member_srl = $logged_info->member_srl;
|
||||
|
||||
// 변수 체크
|
||||
$message_srl_list = trim(Context::get('message_srl_list'));
|
||||
if(!$message_srl_list) return new Object(-1, 'msg_cart_is_null');
|
||||
|
||||
$message_srl_list = explode('|@|', $message_srl_list);
|
||||
if(!count($message_srl_list)) return new Object(-1, 'msg_cart_is_null');
|
||||
|
||||
$message_type = Context::get('message_type');
|
||||
if(!$message_type || !in_array($message_type, array('R','S','T'))) return new Object(-1, 'msg_invalid_request');
|
||||
|
||||
$message_count = count($message_srl_list);
|
||||
$target = array();
|
||||
for($i=0;$i<$message_count;$i++) {
|
||||
$message_srl = (int)trim($message_srl_list[$i]);
|
||||
if(!$message_srl) continue;
|
||||
$target[] = $message_srl;
|
||||
}
|
||||
if(!count($target)) return new Object(-1,'msg_cart_is_null');
|
||||
|
||||
// 삭제
|
||||
$args->message_srls = implode(',',$target);
|
||||
$args->message_type = $message_type;
|
||||
|
||||
if($message_type == 'S') $args->sender_srl = $member_srl;
|
||||
else $args->receiver_srl = $member_srl;
|
||||
|
||||
$output = executeQuery('communication.deleteMessages', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage('success_deleted');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 친구 추가
|
||||
**/
|
||||
function procCommunicationAddFriend() {
|
||||
// 로그인 정보 체크
|
||||
if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged');
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
$target_srl = (int)trim(Context::get('target_srl'));
|
||||
if(!$target_srl) return new Object(-1,'msg_invalid_request');
|
||||
|
||||
// 변수 정리
|
||||
$args->friend_srl = getNextSequence();
|
||||
$args->list_order = $args->friend_srl * -1;
|
||||
$args->friend_group_srl = Context::get('friend_group_srl');
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
$args->target_srl = $target_srl;
|
||||
$output = executeQuery('communication.addFriend', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->add('member_srl', $target_srl);
|
||||
$this->setMessage('success_registed');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 등록된 친구의 그룹 이동
|
||||
**/
|
||||
function procCommunicationMoveFriend() {
|
||||
// 로그인 정보 체크
|
||||
if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged');
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
// 변수 체크
|
||||
$friend_srl_list = trim(Context::get('friend_srl_list'));
|
||||
if(!$friend_srl_list) return new Object(-1, 'msg_cart_is_null');
|
||||
|
||||
$friend_srl_list = explode('|@|', $friend_srl_list);
|
||||
if(!count($friend_srl_list)) return new Object(-1, 'msg_cart_is_null');
|
||||
|
||||
$friend_count = count($friend_srl_list);
|
||||
$target = array();
|
||||
for($i=0;$i<$friend_count;$i++) {
|
||||
$friend_srl = (int)trim($friend_srl_list[$i]);
|
||||
if(!$friend_srl) continue;
|
||||
$target[] = $friend_srl;
|
||||
}
|
||||
if(!count($target)) return new Object(-1,'msg_cart_is_null');
|
||||
|
||||
// 변수 정리
|
||||
$args->friend_srls = implode(',',$target);
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
$args->friend_group_srl = Context::get('target_friend_group_srl');
|
||||
|
||||
$output = executeQuery('communication.moveFriend', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage('success_moved');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 친구 삭제
|
||||
**/
|
||||
function procCommunicationDeleteFriend() {
|
||||
// 로그인 정보 체크
|
||||
if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged');
|
||||
$logged_info = Context::get('logged_info');
|
||||
$member_srl = $logged_info->member_srl;
|
||||
|
||||
// 변수 체크
|
||||
$friend_srl_list = trim(Context::get('friend_srl_list'));
|
||||
if(!$friend_srl_list) return new Object(-1, 'msg_cart_is_null');
|
||||
|
||||
$friend_srl_list = explode('|@|', $friend_srl_list);
|
||||
if(!count($friend_srl_list)) return new Object(-1, 'msg_cart_is_null');
|
||||
|
||||
$friend_count = count($friend_srl_list);
|
||||
$target = array();
|
||||
for($i=0;$i<$friend_count;$i++) {
|
||||
$friend_srl = (int)trim($friend_srl_list[$i]);
|
||||
if(!$friend_srl) continue;
|
||||
$target[] = $friend_srl;
|
||||
}
|
||||
if(!count($target)) return new Object(-1,'msg_cart_is_null');
|
||||
|
||||
// 삭제
|
||||
$args->friend_srls = implode(',',$target);
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
$output = executeQuery('communication.deleteFriend', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage('success_deleted');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 친구 그룹 추가
|
||||
**/
|
||||
function procCommunicationAddFriendGroup() {
|
||||
// 로그인 정보 체크
|
||||
if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged');
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
// 변수 정리
|
||||
$args->friend_group_srl = trim(Context::get('friend_group_srl'));
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
$args->title = Context::get('title');
|
||||
if(!$args->title) return new Object(-1, 'msg_invalid_request');
|
||||
|
||||
// friend_group_srl이 있으면 수정
|
||||
if($args->friend_group_srl) {
|
||||
$output = executeQuery('communication.renameFriendGroup', $args);
|
||||
$msg_code = 'success_updated';
|
||||
|
||||
// 아니면 입력
|
||||
} else {
|
||||
$output = executeQuery('communication.addFriendGroup', $args);
|
||||
$msg_code = 'success_registed';
|
||||
}
|
||||
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage($msg_code);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 친구 그룹 이름 변경
|
||||
**/
|
||||
function procCommunicationRenameFriendGroup() {
|
||||
// 로그인 정보 체크
|
||||
if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged');
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
// 변수 정리
|
||||
$args->friend_group_srl= Context::get('friend_group_srl');
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
$args->title = Context::get('title');
|
||||
if(!$args->title) return new Object(-1, 'msg_invalid_request');
|
||||
|
||||
$output = executeQuery('communication.renameFriendGroup', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage('success_updated');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 친구 그룹 삭제
|
||||
**/
|
||||
function procCommunicationDeleteFriendGroup() {
|
||||
// 로그인 정보 체크
|
||||
if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged');
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
// 변수 정리
|
||||
$args->friend_group_srl = Context::get('friend_group_srl');
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
$output = executeQuery('communication.deleteFriendGroup', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage('success_deleted');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 특정 쪽지의 상태를 읽은 상태로 변경
|
||||
**/
|
||||
function setMessageReaded($message_srl) {
|
||||
$args->message_srl = $message_srl;
|
||||
$args->related_srl = $message_srl;
|
||||
return executeQuery('communication.setMessageReaded', $args);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
189
modules/communication/communication.model.php
Normal file
189
modules/communication/communication.model.php
Normal file
|
|
@ -0,0 +1,189 @@
|
|||
<?php
|
||||
/**
|
||||
* @class communicationModel
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief communication module의 Model class
|
||||
**/
|
||||
|
||||
class communicationModel extends communication {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 설정된 내용을 구함
|
||||
**/
|
||||
function getConfig() {
|
||||
$oModuleModel = &getModel('module');
|
||||
$communication_config = $oModuleModel->getModuleConfig('communication');
|
||||
|
||||
if(!$communication_config->skin) $communication_config->skin = 'default';
|
||||
if(!$communication_config->colorset) $communication_config->colorset = 'white';
|
||||
if(!$communication_config->editor_skin) $communication_config->editor_skin = 'default';
|
||||
|
||||
return $communication_config;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 쪽지 내용을 가져옴
|
||||
**/
|
||||
function getSelectedMessage($message_srl) {
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
$args->message_srl = $message_srl;
|
||||
$output = executeQuery('communication.getMessage',$args);
|
||||
$message = $output->data;
|
||||
if(!$message) return ;
|
||||
|
||||
// 보낸 쪽지일 경우 받는 사람 정보를 구함
|
||||
$oMemberModel = &getModel('member');
|
||||
if($message->sender_srl == $logged_info->member_srl && $message->message_type == 'S') $member_info = $oMemberModel->getMemberInfoByMemberSrl($message->receiver_srl);
|
||||
|
||||
// 보관/받은 쪽지일 경우 보낸 사람 정보를 구함
|
||||
else $member_info = $oMemberModel->getMemberInfoByMemberSrl($message->sender_srl);
|
||||
|
||||
if($member_info) {
|
||||
foreach($member_info as $key => $val) {
|
||||
if($key != 'regdate') $message->{$key} = $val;
|
||||
}
|
||||
}
|
||||
|
||||
// 받은 쪽지이고 아직 읽지 않았을 경우 읽은 상태로 변경
|
||||
if($message->message_type == 'R' && $message->readed != 'Y') {
|
||||
$oCommunicationController = &getController('communication');
|
||||
$oCommunicationController->setMessageReaded($message_srl);
|
||||
}
|
||||
|
||||
|
||||
return $message;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 새 쪽지를 가져옴
|
||||
**/
|
||||
function getNewMessage() {
|
||||
$logged_info = Context::get('logged_info');
|
||||
$args->receiver_srl = $logged_info->member_srl;
|
||||
$args->readed = 'N';
|
||||
|
||||
$output = executeQuery('communication.getNewMessage', $args);
|
||||
if(!count($output->data)) return;
|
||||
$message = array_pop($output->data);
|
||||
|
||||
$oCommunicationController = &getController('communication');
|
||||
$oCommunicationController->setMessageReaded($message->message_srl);
|
||||
|
||||
return $message;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 쪽지 목록 가져오기
|
||||
* type = R : 받은 쪽지
|
||||
* type = S : 보낸 쪽지
|
||||
* type = T : 보관함
|
||||
**/
|
||||
function getMessages($message_type = "R") {
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
switch($message_type) {
|
||||
case 'R' :
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
$args->message_type = 'R';
|
||||
$query_id = 'communication.getReceivedMessages';
|
||||
break;
|
||||
case 'T' :
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
$args->message_type = 'T';
|
||||
$query_id = 'communication.getStoredMessages';
|
||||
break;
|
||||
default :
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
$args->message_type = 'S';
|
||||
$query_id = 'communication.getSendedMessages';
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
// 기타 변수들 정리
|
||||
$args->sort_index = 'message.list_order';
|
||||
$args->page = Context::get('page');
|
||||
$args->list_count = 20;
|
||||
$args->page_count = 10;
|
||||
return executeQuery($query_id, $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 친구 목록 가져오기
|
||||
**/
|
||||
function getFriends($friend_group_srl = 0) {
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
$args->friend_group_srl = $friend_group_srl;
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
|
||||
// 기타 변수들 정리
|
||||
$args->page = Context::get('page');
|
||||
$args->sort_index = 'friend.list_order';
|
||||
$args->list_count = 10;
|
||||
$args->page_count = 10;
|
||||
$output = executeQuery('communication.getFriends', $args);
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 이미 친구로 등록되었는지 검사
|
||||
**/
|
||||
function isAddedFriend($member_srl) {
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
$args->target_srl = $member_srl;
|
||||
$output = executeQuery('communication.isAddedFriend', $args);
|
||||
return $output->data->count;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 특정 친구 그룹 가져오기
|
||||
**/
|
||||
function getFriendGroupInfo($friend_group_srl) {
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
$args->friend_group_srl = $friend_group_srl;
|
||||
|
||||
$output = executeQuery('communication.getFriendGroup', $args);
|
||||
return $output->data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 그룹 목록 가져오기
|
||||
**/
|
||||
function getFriendGroups() {
|
||||
$logged_info = Context::get('logged_info');
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
|
||||
$output = executeQuery('communication.getFriendGroups', $args);
|
||||
$group_list = $output->data;
|
||||
if(!$group_list) return;
|
||||
|
||||
if(!is_array($group_list)) $group_list = array($group_list);
|
||||
return $group_list;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 특정 회원의 친구 목록에 포함되어 있는지를 확인
|
||||
**/
|
||||
function isFriend($target_srl) {
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
$args->member_srl = $target_srl;
|
||||
$args->target_srl = $logged_info->member_srl;
|
||||
$output = executeQuery('communication.isAddedFriend', $args);
|
||||
if($output->data->count) return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
?>
|
||||
221
modules/communication/communication.view.php
Normal file
221
modules/communication/communication.view.php
Normal file
|
|
@ -0,0 +1,221 @@
|
|||
<?php
|
||||
/**
|
||||
* @class communicationView
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief communication module의 View class
|
||||
**/
|
||||
|
||||
class communicationView extends communication {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
$oCommunicationModel = &getModel('communication');
|
||||
|
||||
$this->communication_config = $oCommunicationModel->getConfig();
|
||||
$skin = $this->communication_config->skin;
|
||||
|
||||
Context::set('communication_config', $this->communication_config);
|
||||
|
||||
$tpl_path = sprintf('%sskins/%s', $this->module_path, $skin);
|
||||
$this->setTemplatePath($tpl_path);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 쪽지함 출력
|
||||
**/
|
||||
function dispCommunicationMessages() {
|
||||
// 로그인이 되어 있지 않으면 오류 표시
|
||||
if(!Context::get('is_logged')) return $this->stop('msg_not_logged');
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
// 변수 설정
|
||||
$message_srl = Context::get('message_srl');
|
||||
$message_type = Context::get('message_type');
|
||||
if(!in_array($message_type, array('R','S','T'))) {
|
||||
$message_type = 'R';
|
||||
Context::set('message_type', $message_type);
|
||||
}
|
||||
|
||||
$oCommunicationModel = &getModel('communication');
|
||||
|
||||
// message_srl이 있으면 내용 추출
|
||||
if($message_srl) {
|
||||
$message = $oCommunicationModel->getSelectedMessage($message_srl);
|
||||
if($message->message_srl == $message_srl && ($message->receiver_srl == $logged_info->member_srl || $message->sender_srl == $logged_info->member_srl) ) Context::set('message', $message);
|
||||
}
|
||||
|
||||
// 목록 추출
|
||||
$output = $oCommunicationModel->getMessages($message_type);
|
||||
|
||||
// 템플릿에 쓰기 위해서 context::set
|
||||
Context::set('total_count', $output->total_count);
|
||||
Context::set('total_page', $output->total_page);
|
||||
Context::set('page', $output->page);
|
||||
Context::set('message_list', $output->data);
|
||||
Context::set('page_navigation', $output->page_navigation);
|
||||
|
||||
$this->setTemplateFile('messages');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 새 쪽지 보여줌
|
||||
**/
|
||||
function dispCommunicationNewMessage() {
|
||||
$this->setLayoutFile('popup_layout');
|
||||
|
||||
// 로그인이 되어 있지 않으면 오류 표시
|
||||
if(!Context::get('is_logged')) return $this->stop('msg_not_logged');
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
$oCommunicationModel = &getModel('communication');
|
||||
|
||||
// 새 쪽지를 가져옴
|
||||
$message = $oCommunicationModel->getNewMessage();
|
||||
if($message) Context::set('message', $message);
|
||||
|
||||
// 플래그 삭제
|
||||
$flag_path = './files/communication_extra_info/new_message_flags/'.getNumberingPath($logged_info->member_srl);
|
||||
$flag_file = sprintf('%s%s', $flag_path, $logged_info->member_srl);
|
||||
@unlink($flag_file);
|
||||
|
||||
$this->setTemplateFile('new_message');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 쪽지 발송 출력
|
||||
**/
|
||||
function dispCommunicationSendMessage() {
|
||||
$this->setLayoutFile("popup_layout");
|
||||
$oCommunicationModel = &getModel('communication');
|
||||
$oMemberModel = &getModel('member');
|
||||
|
||||
// 로그인이 되어 있지 않으면 오류 표시
|
||||
if(!Context::get('is_logged')) return $this->stop('msg_not_logged');
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
// 쪽지 받을 사용자 정보 구함
|
||||
$receiver_srl = Context::get('receiver_srl');
|
||||
if(!$receiver_srl || $logged_info->member_srl == $receiver_srl) return $this->stop('msg_not_logged');
|
||||
|
||||
// 답글 쪽지일 경우 원본 메세지의 글번호를 구함
|
||||
$message_srl = Context::get('message_srl');
|
||||
if($message_srl) {
|
||||
$source_message = $oCommunicationModel->getSelectedMessage($message_srl);
|
||||
if($source_message->message_srl == $message_srl && $source_message->sender_srl == $receiver_srl) {
|
||||
$source_message->title = "[re] ".$source_message->title;
|
||||
$source_message->content = "\r\n<br />\r\n<br /><div style=\"padding-left:5px; border-left:5px solid #DDDDDD;\">".trim($source_message->content)."</div>";
|
||||
Context::set('source_message', $source_message);
|
||||
}
|
||||
}
|
||||
|
||||
$receiver_info = $oMemberModel->getMemberInfoByMemberSrl($receiver_srl);
|
||||
Context::set('receiver_info', $receiver_info);
|
||||
|
||||
// 에디터 모듈의 getEditor를 호출하여 서명용으로 세팅
|
||||
$oEditorModel = &getModel('editor');
|
||||
$option->primary_key_name = 'receiver_srl';
|
||||
$option->content_key_name = 'content';
|
||||
$option->allow_fileupload = false;
|
||||
$option->enable_autosave = false;
|
||||
$option->enable_default_component = false;
|
||||
$option->enable_component = false;
|
||||
$option->resizable = false;
|
||||
$option->disable_html = true;
|
||||
$option->height = 300;
|
||||
$option->skin = $this->communication_config->editor_skin;
|
||||
$editor = $oEditorModel->getEditor($logged_info->member_srl, $option);
|
||||
Context::set('editor', $editor);
|
||||
|
||||
$this->setTemplateFile('send_message');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 친구 목록 보기
|
||||
**/
|
||||
function dispCommunicationFriend() {
|
||||
// 로그인이 되어 있지 않으면 오류 표시
|
||||
if(!Context::get('is_logged')) return $this->stop('msg_not_logged');
|
||||
|
||||
$oCommunicationModel = &getModel('communication');
|
||||
|
||||
// 그룹 목록을 가져옴
|
||||
$tmp_group_list = $oCommunicationModel->getFriendGroups();
|
||||
$group_count = count($tmp_group_list);
|
||||
for($i=0;$i<$group_count;$i++) $friend_group_list[$tmp_group_list[$i]->friend_group_srl] = $tmp_group_list[$i];
|
||||
Context::set('friend_group_list', $friend_group_list);
|
||||
|
||||
// 친구 목록을 가져옴
|
||||
$friend_group_srl = Context::get('friend_group_srl');
|
||||
$output = $oCommunicationModel->getFriends($friend_group_srl);
|
||||
$friend_count = count($output->data);
|
||||
if($friend_count) {
|
||||
foreach($output->data as $key => $val) {
|
||||
$group_srl = $val->friend_group_srl;
|
||||
$group_title = $friend_group_list[$group_srl]->title;
|
||||
if(!$group_title) $group_title = Context::get('default_friend_group');
|
||||
$output->data[$key]->group_title = $group_title;
|
||||
}
|
||||
}
|
||||
|
||||
// 템플릿에 쓰기 위해서 context::set
|
||||
Context::set('total_count', $output->total_count);
|
||||
Context::set('total_page', $output->total_page);
|
||||
Context::set('page', $output->page);
|
||||
Context::set('friend_list', $output->data);
|
||||
Context::set('page_navigation', $output->page_navigation);
|
||||
|
||||
$this->setTemplateFile('friends');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 친구 추가
|
||||
**/
|
||||
function dispCommunicationAddFriend() {
|
||||
$this->setLayoutFile("popup_layout");
|
||||
|
||||
// 로그인이 되어 있지 않으면 오류 표시
|
||||
if(!Context::get('is_logged')) return $this->stop('msg_not_logged');
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
$target_srl = Context::get('target_srl');
|
||||
if(!$target_srl) return $this->stop('msg_invalid_request');
|
||||
|
||||
// 대상 회원의 정보를 구함
|
||||
$oMemberModel = &getModel('member');
|
||||
$oCommunicationModel = &getModel('communication');
|
||||
$communication_info = $oMemberModel->getMemberInfoByMemberSrl($target_srl);
|
||||
if($communication_info->member_srl != $target_srl) return $this->stop('msg_invalid_request');
|
||||
Context::set('target_info', $communication_info);
|
||||
|
||||
// 그룹의 목록을 구함
|
||||
$friend_group_list = $oCommunicationModel->getFriendGroups();
|
||||
Context::set('friend_group_list', $friend_group_list);
|
||||
|
||||
$this->setTemplateFile('add_friend');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 친구 그룹 추가
|
||||
**/
|
||||
function dispCommunicationAddFriendGroup() {
|
||||
$this->setLayoutFile("popup_layout");
|
||||
|
||||
// 로그인이 되어 있지 않으면 오류 표시
|
||||
if(!Context::get('is_logged')) return $this->stop('msg_not_logged');
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
// 그룹 번호가 넘어오면 수정모드로..
|
||||
$friend_group_srl = Context::get('friend_group_srl');
|
||||
if($friend_group_srl) {
|
||||
$oCommunicationModel = &getModel('communication');
|
||||
$friend_group = $oCommunicationModel->getFriendGroupInfo($friend_group_srl);
|
||||
if($friend_group->friend_group_srl == $friend_group_srl) Context::set('friend_group', $friend_group);
|
||||
}
|
||||
|
||||
$this->setTemplateFile('add_friend_group');
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
14
modules/communication/conf/info.xml
Normal file
14
modules/communication/conf/info.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<module version="0.1" category="utility">
|
||||
<title xml:lang="ko">커뮤니케이션</title>
|
||||
<title xml:lang="zh-CN">会员交流</title>
|
||||
<title xml:lang="en">Communication</title>
|
||||
<author email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2008. 5. 30">
|
||||
<name xml:lang="ko">제로</name>
|
||||
<name xml:lang="zh-CN">Zero</name>
|
||||
<name xml:lang="en">Zero</name>
|
||||
<description xml:lang="ko">회원들간의 쪽지, 친구기능을 담당하는 모듈입니다.</description>
|
||||
<description xml:lang="zh-CN">管理在线会员间短信息及好友功能的模块。</description>
|
||||
<description xml:lang="en">This module is for managing message, friend functions.</description>
|
||||
</author>
|
||||
</module>
|
||||
31
modules/communication/conf/module.xml
Normal file
31
modules/communication/conf/module.xml
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<module>
|
||||
<actions>
|
||||
|
||||
<action name="dispCommunicationMessages" type="view" standalone="true" />
|
||||
<action name="dispCommunicationSendMessage" type="view" standalone="true" />
|
||||
<action name="dispCommunicationNewMessage" type="view" standalone="true" />
|
||||
|
||||
<action name="dispCommunicationFriend" type="view" standalone="true" />
|
||||
<action name="dispCommunicationAddFriend" type="view" standalone="true" />
|
||||
<action name="dispCommunicationAddFriendGroup" type="view" standalone="true" />
|
||||
|
||||
<action name="procCommunicationUpdateAllowMessage" type="controller" standalone="true" />
|
||||
<action name="procCommunicationSendMessage" type="controller" standalone="true" />
|
||||
<action name="procCommunicationStoreMessage" type="controller" standalone="true" />
|
||||
<action name="procCommunicationDeleteMessage" type="controller" standalone="true" />
|
||||
<action name="procCommunicationDeleteMessages" type="controller" standalone="true" />
|
||||
|
||||
<action name="procCommunicationAddFriend" type="controller" standalone="true" />
|
||||
<action name="procCommunicationMoveFriend" type="controller" standalone="true" />
|
||||
<action name="procCommunicationDeleteFriend" type="controller" standalone="true" />
|
||||
|
||||
<action name="procCommunicationAddFriendGroup" type="controller" standalone="true" />
|
||||
<action name="procCommunicationRenameFriendGroup" type="controller" standalone="true" />
|
||||
<action name="procCommunicationDeleteFriendGroup" type="controller" standalone="true" />
|
||||
|
||||
<action name="getCommunicationAdminColorset" type="model" standalone="true" />
|
||||
<action name="procCommunicationAdminInsertConfig" type="controller" standalone="true" />
|
||||
<action name="dispCommunicationAdminConfig" type="view" standalone="true" admin_index="true" />
|
||||
</actions>
|
||||
</module>
|
||||
48
modules/communication/lang/en.lang.php
Normal file
48
modules/communication/lang/en.lang.php
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
/**
|
||||
* @file en.lang.php
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief English Language Pack (Only Basic Things)
|
||||
**/
|
||||
|
||||
$lang->communication = 'Communication';
|
||||
$lang->about_communication = 'This module performs communication functions such as messages or friends';
|
||||
|
||||
$lang->allow_message = 'Receive Messages';
|
||||
$lang->allow_message_type = array(
|
||||
'Y' => 'Receive All',
|
||||
'N' => 'Reject All',
|
||||
'F' => 'Only Friends',
|
||||
);
|
||||
|
||||
$lang->message_box = array(
|
||||
'R' => 'Received',
|
||||
'S' => 'Sent',
|
||||
'T' => 'Mailbox',
|
||||
);
|
||||
$lang->readed_date = "Read Date";
|
||||
|
||||
$lang->sender = 'Sender';
|
||||
$lang->receiver = 'Receiver';
|
||||
$lang->friend_group = 'Friend Group';
|
||||
$lang->default_friend_group = 'Unassigned Group';
|
||||
|
||||
$lang->cmd_send_message = 'Send Message';
|
||||
$lang->cmd_reply_message = 'Reply Message';
|
||||
$lang->cmd_view_friend = 'Friends';
|
||||
$lang->cmd_add_friend = 'Add Friend';
|
||||
$lang->cmd_view_message_box = 'Message Box';
|
||||
$lang->cmd_store = "Save";
|
||||
$lang->cmd_add_friend_group = 'Add Friend Group';
|
||||
$lang->cmd_rename_friend_group = 'Modify Friend Group Name';
|
||||
|
||||
$lang->msg_no_message = 'There is no message';
|
||||
$lang->message_received = 'You have a new message';
|
||||
|
||||
$lang->msg_title_is_null = 'Please input the title of message';
|
||||
$lang->msg_content_is_null = 'Please input the content';
|
||||
$lang->msg_allow_message_to_friend = "Failed to send because receiver only allows friends' messages";
|
||||
$lang->msg_disallow_message = 'Failed to send because receiver rejects message reception';
|
||||
|
||||
$lang->about_allow_message = 'You can decide message reception';
|
||||
?>
|
||||
49
modules/communication/lang/es.lang.php
Normal file
49
modules/communication/lang/es.lang.php
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
<?php
|
||||
/**
|
||||
* @file es.lang.php
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief Spanish Language Pack (Only Basic Things)
|
||||
**/
|
||||
|
||||
$lang->communication = 'Communication';
|
||||
$lang->about_communication = '회원간의 쪽지나 친구 관리등 커뮤니케이션 기능을 수행하는 모듈입니다';
|
||||
|
||||
$lang->allow_message = 'Permitir la recepción del mensaje';
|
||||
$lang->allow_message_type = array(
|
||||
'Y' => 'Recibir todo',
|
||||
'N' => 'Rechazar',
|
||||
'F' => 'Sólo amigos',
|
||||
);
|
||||
|
||||
$lang->message_box = array(
|
||||
'R' => 'Recibido',
|
||||
'S' => 'Enviado',
|
||||
'T' => 'Buzon de Email',
|
||||
);
|
||||
|
||||
$lang->readed_date = "Fecha Leído";
|
||||
|
||||
$lang->sender = 'Remitente';
|
||||
$lang->receiver = 'Receptor';
|
||||
$lang->friend_group = 'Grupo de amigos';
|
||||
$lang->default_friend_group = 'Grupo desasignado';
|
||||
|
||||
$lang->cmd_send_message = 'Enviar Mensaje';
|
||||
$lang->cmd_reply_message = 'Responder el mensaje';
|
||||
$lang->cmd_view_friend = 'Amigos';
|
||||
$lang->cmd_add_friend = 'Registrar como Amigo';
|
||||
$lang->cmd_view_message_box = 'Buzón de mensajes';
|
||||
$lang->cmd_store = "Guardar";
|
||||
$lang->cmd_add_friend_group = 'agregar grupo de amigos';
|
||||
$lang->cmd_rename_friend_group = 'Cambiar el nombre del grupo de amigos';
|
||||
|
||||
$lang->msg_no_message = 'No hay mensajes';
|
||||
$lang->message_received = 'Usted ha recibido un mensaje';
|
||||
|
||||
$lang->msg_title_is_null = 'Por favor ingresar el título de la nota';
|
||||
$lang->msg_content_is_null = 'Por favor ingresar el contenido';
|
||||
$lang->msg_allow_message_to_friend = "Falló el envío por permitir sólo mensajes de sus amigos";
|
||||
$lang->msg_disallow_message = 'Falló el envío por ser usuario rechazado para recibir mensajes';
|
||||
|
||||
$lang->about_allow_message = 'Usted puede decidir la recepción del mensaje';
|
||||
?>
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue