2011 xe camp 모듈제작가이드
DESCRIPTION
TRANSCRIPT
XpressEngine����������� ������������������ Module����������� ������������������ 제작����������� ������������������ 가이드����������� ������������������
작성자:����������� ������������������ 오봉근,����������� ������������������ 김예솔����������� ������������������
소속팀����������� ������������������ /����������� ������������������ 상위부서:����������� ������������������ XE개발팀����������� ������������������ ����������� ������������������ ����������� ������������������
작성년월일:����������� ������������������ 2011.11.26����������� ������������������
ⓒ 2010����������� ������������������ NHN����������� ������������������ CORPORATION ⓒ 2010����������� ������������������ NHN����������� ������������������ CORPORATION
1.����������� ������������������ XE����������� ������������������ 동작����������� ������������������ 구조����������� ������������������
index.php����������� ������������������
Context����������� ������������������
Module����������� ������������������ Handler����������� ������������������
ProcModule����������� ������������������
Display����������� ������������������ Handler����������� ������������������
HTML����������� ������������������ Response����������� ������������������
Context����������� ������������������
Module����������� ������������������ Handler����������� ������������������
ProcModule����������� ������������������
Display����������� ������������������ Handler����������� ������������������
HTML����������� ������������������ Response����������� ������������������
2.����������� ������������������ Memo����������� ������������������ 모듈����������� ������������������
Memo����������� ������������������ 모듈����������� ������������������ 기능����������� ������������������
����������� ������������������
1. 메모����������� ������������������ 쓰기����������� ������������������
2. 메모����������� ������������������ 리스트����������� ������������������ 보기����������� ������������������
3. 메모����������� ������������������ 내용����������� ������������������ 보기����������� ������������������
����������� ������������������
기능을����������� ������������������ Action����������� ������������������ 으로!����������� ������������������
����������� ������������������
1. 메모����������� ������������������ 쓰기����������� ������������������ (화면)����������� ������������������ :����������� ������������������ dispMemoWrite����������� ������������������
2. 메모����������� ������������������ 쓰기����������� ������������������ (DB삽입)����������� ������������������ :����������� ������������������ procMemoInsert����������� ������������������
3. 메모����������� ������������������ 리스트����������� ������������������ 보기����������� ������������������ (화면)����������� ������������������ :����������� ������������������ dispMemoList����������� ������������������
4. 메모����������� ������������������ 내용����������� ������������������ 보기����������� ������������������ (화면)����������� ������������������ :����������� ������������������ dispMemoView����������� ������������������
����������� ������������������ ����������� ������������������
����������� ������������������
3.����������� ������������������ Memo����������� ������������������ 모듈����������� ������������������ ����������� ������������������ 구조����������� ������������������
conf����������� ������������������ lang����������� ������������������ queries����������� ������������������ rulesets����������� ������������������ schemas����������� ������������������ skins����������� ������������������ tpl����������� ������������������ ����������� ������������������
memo.class.php����������� ������������������ memo.controller.php����������� ������������������ memo.model.php����������� ������������������ memo.view.php����������� ������������������ ����������� ������������������
XE설치����������� ������������������ 디렉토리����������� ������������������ /����������� ������������������ modules����������� ������������������ /����������� ������������������ memo����������� ������������������ /����������� ������������������
memo.class.php����������� ������������������ ����������� ������������������ ����������� ������������������ =>����������� ������������������ memo����������� ������������������ 모듈의����������� ������������������ 최상위����������� ������������������ class����������� ������������������ ����������� ������������������ 모듈����������� ������������������ 설치시,����������� ������������������ 모듈����������� ������������������ 업데이트시����������� ������������������
memo.controller.php����������� ������������������ ����������� ������������������ =>����������� ������������������ memoController����������� ������������������ Class����������� ������������������ ����������� ������������������ DB/File에����������� ������������������ 데이터����������� ������������������ 저장,����������� ������������������ 수정,����������� ������������������ 삭제����������� ������������������
memo.model.php����������� ������������������ ����������� ������������������ =>����������� ������������������ memoModel����������� ������������������ Class����������� ������������������ ����������� ������������������ DB/File����������� ������������������ 에서����������� ������������������ 데이터����������� ������������������ 읽기����������� ������������������ ����������� ������������������
memo.view.php����������� ������������������ ����������� ������������������ =>����������� ������������������ memoView����������� ������������������ Class����������� ������������������ ����������� ������������������ 템플릿과����������� ������������������ 연결하여����������� ������������������ 화면����������� ������������������ 출력����������� ������������������ ����������� ������������������
4.����������� ������������������ 기본����������� ������������������ 파일����������� ������������������ 생성����������� ������������������
./conf/info.xml����������� ������������������ ����������� ������������������
����������� ������������������ ����������� ������������������ <module����������� ������������������ version="0.2">����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <title����������� ������������������ xml:lang="ko">메모</title>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <description����������� ������������������ xml:lang="ko">메모����������� ������������������ 모듈입니다.</description>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <version>0.1</version>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <date>2011-10-14</date>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <category>content</category>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <author����������� ������������������ [email protected]����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ link="http://xpressengine.com/">����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <name����������� ������������������ xml:lang="ko">NHN</name>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <name����������� ������������������ xml:lang="jp">NHN</name>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <name����������� ������������������ xml:lang="en">NHN</name>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ </author>����������� ������������������ </module>����������� ������������������
./conf/module.xml����������� ������������������ ����������� ������������������ ����������� ������������������
����������� ������������������
<module>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <grants����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <permissions����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <actions����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <menus����������� ������������������ />����������� ������������������ </module>����������� ������������������
http://code.google.com/p/xe-core/wiki/module_xml����������� ������������������
memo.class.php����������� ������������������ ����������� ������������������
����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ class����������� ������������������ memo����������� ������������������ extends����������� ������������������ ModuleObject����������� ������������������ {����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ function����������� ������������������ moduleInstall()����������� ������������������ {}����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ function����������� ������������������ moduleUninstall()����������� ������������������ {}����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ function����������� ������������������ checkUpdate()����������� ������������������ {}����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ function����������� ������������������ moduleUpdate()����������� ������������������ {}����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ function����������� ������������������ recompileCache()����������� ������������������ {}����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ }����������� ������������������
5.����������� ������������������ 본격적인����������� ������������������ 개발����������� ������������������
5-1.����������� ������������������ Memo����������� ������������������ 쓰기����������� ������������������ 화면����������� ������������������
/index.php?module=memo&act=dispMemoWrite����������� ������������������
Context����������� ������������������
ModuleHandler����������� ������������������
memo.view.php����������� ������������������
dispMemoWrite()����������� ������������������
memo_view.html����������� ������������������
/index.php?module=memo&act=dispMemoWrite����������� ������������������
Context����������� ������������������
ModuleHandler����������� ������������������
memo.view.php����������� ������������������
dispMemoWrite()����������� ������������������
memo_view.html����������� ������������������
module.xml����������� ������������������
./conf/module.xml����������� ������������������ ����������� ������������������ ����������� ������������������
<module>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <grants����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <permissions����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <actions>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <action����������� ������������������ name="dispMemoWrite"����������� ������������������ type="view"����������� ������������������ standalone="true"����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ </actions>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <menus����������� ������������������ />����������� ������������������ </module>����������� ������������������
/index.php?module=memo&act=dispMemoWrite����������� ������������������
Context����������� ������������������
ModuleHandler����������� ������������������
memo.view.php����������� ������������������
dispMemoWrite()����������� ������������������
memo_write.html����������� ������������������
memo.view.php����������� ������������������ ����������� ������������������ class����������� ������������������ MemoView����������� ������������������ extends����������� ������������������ memo����������� ������������������ {����������� ������������������
function����������� ������������������ init()����������� ������������������ {����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $template_path����������� ������������������ =����������� ������������������ sprintf("%sskins/%s/",$this->module_path,����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $this->module_info->skin);����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ if(!is_dir($template_path)||!$this->module_info->skin)����������� ������������������ {����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $this->module_info->skin����������� ������������������ =����������� ������������������ ‘xe_default';����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $template_path����������� ������������������ =����������� ������������������ sprintf("%sskins/%s/",$this->module_path,����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $this->module_info->skin);����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ }����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $this->setTemplatePath($template_path);����������� ������������������ }����������� ������������������
}����������� ������������������
memo.view.php����������� ������������������ ����������� ������������������ ����������� ������������������
class����������� ������������������ MemoView����������� ������������������ extends����������� ������������������ memo����������� ������������������ {����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ …⋯����������� ������������������ ����������� ������������������
function����������� ������������������ dispMemoWrite()����������� ������������������ {����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ if(!Context::get('is_logged'))����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ return����������� ������������������ new����������� ������������������ Object(-1,����������� ������������������ 'msg_invalid_request');����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $logged_info����������� ������������������ =����������� ������������������ Context::get('logged_info');����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $this->setTemplateFile('memo_write');����������� ������������������ }����������� ������������������
}����������� ������������������
/index.php?module=memo&act=dispMemoWrite����������� ������������������
Context����������� ������������������
ModuleHandler����������� ������������������
memo.view.php����������� ������������������
dispMemoWrite()����������� ������������������
memo_write.html����������� ������������������ Template����������� ������������������
./skins/xe_default/memo_write.html����������� ������������������ ����������� ������������������
����������� ������������������ ����������� ������������������ ����������� ������������������ <form����������� ������������������ ruleset="insertMemo"����������� ������������������ name="memo_write"����������� ������������������ method="post"����������� ������������������ action="./">����������� ������������������
<input����������� ������������������ type="hidden"����������� ������������������ name="module"����������� ������������������ value="memo"����������� ������������������ />����������� ������������������ <input����������� ������������������ type="hidden"����������� ������������������ name="act"����������� ������������������ value="procMemoInsert"����������� ������������������ />����������� ������������������ ����������� ������������������ <textarea����������� ������������������ name="content"����������� ������������������ cols="100"����������� ������������������ rows="15"></textarea>����������� ������������������ ����������� ������������������ <input����������� ������������������ type="submit"����������� ������������������ value="등록">����������� ������������������
</form>����������� ������������������
c����������� ������������������
c����������� ������������������
/index.php?module=memo&act=dispMemoWrite����������� ������������������
Context����������� ������������������
ModuleHandler����������� ������������������
memo.view.php����������� ������������������
dispMemoWrite()����������� ������������������
memo_write.html����������� ������������������
ruleset����������� ������������������ insertMemo.xml����������� ������������������
./rulesets/insertMemo.xml����������� ������������������ ����������� ������������������
����������� ������������������ <ruleset����������� ������������������ version="1.5.0">����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <customrules����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <fields>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <field����������� ������������������ name="content"����������� ������������������ required="true"����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ </fields>����������� ������������������ </ruleset>����������� ������������������
http://code.google.com/p/xe-core/wiki/ValidateFormInput����������� ������������������
./skins/xe_default/memo_write.html����������� ������������������ ����������� ������������������
����������� ������������������ <div����������� ������������������ cond="$XE_VALIDATOR_MESSAGE"����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ class="message����������� ������������������ {$XE_VALIDATOR_MESSAGE_TYPE}">����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <p>{$XE_VALIDATOR_MESSAGE}</p>����������� ������������������ </div>����������� ������������������ ����������� ������������������ ����������� ������������������ <form����������� ������������������ ruleset="insertMemo"����������� ������������������ name="memo_write"����������� ������������������ method="post"����������� ������������������ action="./">����������� ������������������
<input����������� ������������������ type="hidden"����������� ������������������ name="module"����������� ������������������ value="memo"����������� ������������������ />����������� ������������������ <input����������� ������������������ type="hidden"����������� ������������������ name="act"����������� ������������������ value="procMemoInsert"����������� ������������������ />����������� ������������������ ����������� ������������������ <textarea����������� ������������������ name="content"����������� ������������������ cols="100"����������� ������������������ rows="15"></textarea>����������� ������������������ <input����������� ������������������ type="submit"����������� ������������������ value="등록">����������� ������������������
</form>����������� ������������������
./skins/xe_default/memo_write.html����������� ������������������ ����������� ������������������
����������� ������������������ <div����������� ������������������ cond="$XE_VALIDATOR_MESSAGE"����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ class="message����������� ������������������ {$XE_VALIDATOR_MESSAGE_TYPE}">����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <p>{$XE_VALIDATOR_MESSAGE}</p>����������� ������������������ </div>����������� ������������������ ����������� ������������������ ����������� ������������������ <form����������� ������������������ ruleset="insertMemo"����������� ������������������ name="memo_write"����������� ������������������ method="post"����������� ������������������ action="./">����������� ������������������
<input����������� ������������������ type="hidden"����������� ������������������ name="module"����������� ������������������ value="memo"����������� ������������������ />����������� ������������������ <input����������� ������������������ type="hidden"����������� ������������������ name="act"����������� ������������������ value="procMemoInsert"����������� ������������������ />����������� ������������������ ����������� ������������������ <textarea����������� ������������������ name="content"����������� ������������������ cols="100"����������� ������������������ rows="15"></textarea>����������� ������������������ <input����������� ������������������ type="submit"����������� ������������������ value="등록">����������� ������������������
</form>����������� ������������������
5-2.����������� ������������������ Memo����������� ������������������ DB����������� ������������������ 저장����������� ������������������
메모����������� ������������������ 등록!!����������� ������������������
Context����������� ������������������
ModuleHandler����������� ������������������
memo.controller.php����������� ������������������
procMemoInsert()����������� ������������������
insertMemo.xml����������� ������������������ (xml����������� ������������������ query)����������� ������������������
memo����������� ������������������
./conf/module.xml����������� ������������������ ����������� ������������������
����������� ������������������
<module>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <grants����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <permissions����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <actions>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <action����������� ������������������ name="dispMemoWrite"����������� ������������������ type="view"����������� ������������������ standalone="true"����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <action����������� ������������������ name="procMemoInsert"����������� ������������������ type="controller"����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ standalone="true"����������� ������������������ ruleset="insertMemo"����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ </actions>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <menus����������� ������������������ />����������� ������������������ </module>����������� ������������������
메모����������� ������������������ 등록!!����������� ������������������
Context����������� ������������������
ModuleHandler����������� ������������������
memo.controller.php����������� ������������������
procMemoInsert()����������� ������������������
insertMemo.xml����������� ������������������ (xml����������� ������������������ query)����������� ������������������
memo����������� ������������������
insertMemo.xml����������� ������������������ (XML����������� ������������������ Query)����������� ������������������ ����������� ������������������ ����������� ������������������
<query����������� ������������������ id="insertMemo"����������� ������������������ action="insert">����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <tables>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <table����������� ������������������ name="memo"����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ </tables>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <columns>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <column����������� ������������������ name="memo_srl"����������� ������������������ var="memoSrl“����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ notnull="notnull"����������� ������������������ filter="number"����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <column����������� ������������������ name="member_srl"����������� ������������������ var="memberSrl“����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ notnull="notnull"����������� ������������������ filter="number"����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <column����������� ������������������ name="content"����������� ������������������ var="content"����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <column����������� ������������������ name="regdate"����������� ������������������ var="regdate"����������� ������������������ default="curdate()"����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <column����������� ������������������ name="last_update"����������� ������������������ var="lastUpdate"����������� ������������������ default="curdate()"����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <column����������� ������������������ name="ipaddress"����������� ������������������ var="ipaddress"����������� ������������������ default="ipaddress()"����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ </columns>����������� ������������������ </query>����������� ������������������
메모����������� ������������������ 등록!!����������� ������������������
Context����������� ������������������
ModuleHandler����������� ������������������
memo.controller.php����������� ������������������
procMemoInsert()����������� ������������������
insertMemo.xml����������� ������������������ (xml����������� ������������������ query)����������� ������������������
memo����������� ������������������
memo.����������� ������������������ controller.php����������� ������������������ ����������� ������������������ Class����������� ������������������ memoController����������� ������������������ extends����������� ������������������ memo����������� ������������������ {����������� ������������������ ����������� ������������������
function����������� ������������������ procMemoInsert()����������� ������������������ {����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ if(!Context::get('is_logged'))����������� ������������������ return����������� ������������������ new����������� ������������������ Object(-1,����������� ������������������ 'msg_invalid_request');����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $logged_info����������� ������������������ =����������� ������������������ Context::get('logged_info');����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $vars����������� ������������������ =����������� ������������������ Context::getRequestVars();����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $args->memoSrl����������� ������������������ =����������� ������������������ getNextSequence();����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $args->memberSrl����������� ������������������ =����������� ������������������ $logged_info->member_srl;����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $args->content����������� ������������������ =����������� ������������������ htmlspecialchars($vars->content);����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $output����������� ������������������ =����������� ������������������ executeQuery('memo.insertMemo',����������� ������������������ $args);����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ if(!$output->toBool())����������� ������������������ return����������� ������������������ new����������� ������������������ Object(-1,����������� ������������������ 'msg_error');����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON')))����������� ������������������ {����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $returnUrl����������� ������������������ =����������� ������������������ Context::get('success_return_url')����������� ������������������ ?����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ Context::get('success_return_url')����������� ������������������ :����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ getNotEncodedUrl('',����������� ������������������ 'module',����������� ������������������ 'memo',����������� ������������������ 'act',����������� ������������������ 'dispMemoList');����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $this->setRedirectUrl($returnUrl);����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ return;����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ }����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ return����������� ������������������ $output;����������� ������������������ }����������� ������������������ ����������� ������������������ ����������� ������������������
memo.����������� ������������������ controller.php����������� ������������������ ����������� ������������������ function����������� ������������������ procMemoInsert()����������� ������������������ {����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ if(!Context::get('is_logged'))����������� ������������������ return����������� ������������������ new����������� ������������������ Object(-1,����������� ������������������ 'msg_invalid_request');����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $logged_info����������� ������������������ =����������� ������������������ Context::get('logged_info');����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $vars����������� ������������������ =����������� ������������������ Context::getRequestVars();����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $args->memoSrl����������� ������������������ =����������� ������������������ getNextSequence();����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $args->memberSrl����������� ������������������ =����������� ������������������ $logged_info->member_srl;����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $args->content����������� ������������������ =����������� ������������������ htmlspecialchars($vars->content);����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $output����������� ������������������ =����������� ������������������ executeQuery('memo.insertMemo',����������� ������������������ $args);����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ if(!$output->toBool())����������� ������������������ return����������� ������������������ new����������� ������������������ Object(-1,����������� ������������������ 'msg_error');����������� ������������������ ����������� ������������������
memo.controller.php����������� ������������������ ����������� ������������������
����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ …⋯����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON')))����������� ������������������ {����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $returnUrl����������� ������������������ =����������� ������������������ Context::get('success_return_url')����������� ������������������ ?����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ Context::get('success_return_url')����������� ������������������ :����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ getNotEncodedUrl('',����������� ������������������ 'module',����������� ������������������ 'memo',����������� ������������������ 'act',����������� ������������������ 'dispMemoList');����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $this->setRedirectUrl($returnUrl);����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ return;����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ }����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ return����������� ������������������ $output;����������� ������������������ }����������� ������������������
5-3.����������� ������������������ Memo����������� ������������������ 목록����������� ������������������ 화면����������� ������������������
/index.php?module=memo&act=dispMemoList����������� ������������������
Context����������� ������������������
ModuleHandler����������� ������������������
memo.view.php����������� ������������������
dispMemoList()����������� ������������������
memo_list.html����������� ������������������
./conf/module.xml����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������
<module>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <grants����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <permissions����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <actions>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <action����������� ������������������ name="dispMemoWrite"����������� ������������������ type="view"����������� ������������������ standalone="true"����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <action����������� ������������������ name="procMemoInsert"����������� ������������������ type="controller“����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ standalone="true"����������� ������������������ ruleset="insertMemo"����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <action����������� ������������������ name="dispMemoList"����������� ������������������ type="view"����������� ������������������ standalone="true"����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ </actions>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <menus����������� ������������������ />����������� ������������������ </module>����������� ������������������
memo.view.php����������� ������������������
dispMemoList()����������� ������������������
memo_list.html����������� ������������������
memo.model.php����������� ������������������
getMemoList()����������� ������������������
getMemoList.xml����������� ������������������
memo����������� ������������������
memo.model.php����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������
class����������� ������������������ memoModel����������� ������������������ extends����������� ������������������ memo����������� ������������������ {����������� ������������������
����������� ������������������ function����������� ������������������ getMemoList($member_srl,����������� ������������������ $page����������� ������������������ =����������� ������������������ 1)����������� ������������������ {����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $args->memberSrl����������� ������������������ =����������� ������������������ $member_srl;����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $args->page����������� ������������������ =����������� ������������������ $page;����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $output����������� ������������������ =����������� ������������������ executeQuery('memo.getMemoList',����������� ������������������ $args);����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ if(!$output->toBool())����������� ������������������ return����������� ������������������ new����������� ������������������ Object(-1,����������� ������������������ 'msg_error');����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ return����������� ������������������ $output;����������� ������������������ }����������� ������������������
./queries/getMemoList.xml����������� ������������������ ����������� ������������������ <query����������� ������������������ id="getMemoList"����������� ������������������ action="select">����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <tables>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <table����������� ������������������ name="memo"����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ </tables>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <columns>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <column����������� ������������������ name="*"����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ </columns>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <conditions>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <condition����������� ������������������ operation="equal"����������� ������������������ column="member_srl“����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ var="memberSrl"����������� ������������������ filter="number"����������� ������������������ notnull="notnull"����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ </conditions>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <navigation>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <index����������� ������������������ var="list_order"����������� ������������������ default="memo_srl"����������� ������������������ order="desc"����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <list_count����������� ������������������ var="list_count"����������� ������������������ default="5"����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <page_count����������� ������������������ var="page_count"����������� ������������������ default="5"����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <page����������� ������������������ var="page"����������� ������������������ default="1"����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ </navigation>����������� ������������������ </query>����������� ������������������
memo.view.php����������� ������������������
dispMemoList()����������� ������������������
memo_list.html����������� ������������������
memo.model.php����������� ������������������
getMemoList()����������� ������������������
getMemoList.xml����������� ������������������
memo����������� ������������������
memo.view.php����������� ������������������ ����������� ������������������ class����������� ������������������ memoView����������� ������������������ extends����������� ������������������ memo����������� ������������������ {����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ …⋯����������� ������������������
function����������� ������������������ dispMemoList()����������� ������������������ {����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ if(!Context::get('is_logged'))����������� ������������������ return����������� ������������������ new����������� ������������������ Object(-1,����������� ������������������ 'msg_invalid_request');����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $logged_info����������� ������������������ =����������� ������������������ Context::get('logged_info');����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $oMemoModel����������� ������������������ =����������� ������������������ &getModel('memo');����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $output����������� ������������������ =����������� ������������������ $oMemoModel->getMemoList(����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $logged_info->member_srl,����������� ������������������ Context::get('page'));����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ Context::set('memo_list',����������� ������������������ $output->data);����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ Context::set('total_count',����������� ������������������ $output->total_count);����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ Context::set('total_page',����������� ������������������ $output->total_page);����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ Context::set('page',����������� ������������������ $output->page);����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ Context::set('page_navigation',����������� ������������������ $output->page_navigation);����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $this->setTemplateFile('memo_list');����������� ������������������ }����������� ������������������
memo.view.php����������� ������������������ ����������� ������������������ class����������� ������������������ memoView����������� ������������������ extends����������� ������������������ memo����������� ������������������ {����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ …⋯����������� ������������������
function����������� ������������������ dispMemoList()����������� ������������������ {����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ if(!Context::get('is_logged'))����������� ������������������ return����������� ������������������ new����������� ������������������ Object(-1,����������� ������������������ 'msg_invalid_request');����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $logged_info����������� ������������������ =����������� ������������������ Context::get('logged_info');����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $oMemoModel����������� ������������������ =����������� ������������������ &getModel('memo');����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $output����������� ������������������ =����������� ������������������ $oMemoModel->getMemoList(����������� ������������������
����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $logged_info->member_srl,����������� ������������������ Context::get('page'));����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ Context::set('memo_list',����������� ������������������ $output->data);����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ Context::set('total_count',����������� ������������������ $output->total_count);����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ Context::set('total_page',����������� ������������������ $output->total_page);����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ Context::set('page',����������� ������������������ $output->page);����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ Context::set('page_navigation',����������� ������������������ $output->page_navigation);����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $this->setTemplateFile('memo_list');����������� ������������������ }����������� ������������������
memo.view.php����������� ������������������
dispMemoList()����������� ������������������
memo_list.html����������� ������������������
memo.model.php����������� ������������������
getMemoList()����������� ������������������
getMemoList.xml����������� ������������������
memo����������� ������������������
memo_list.html����������� ������������������ ����������� ������������������ ����������� ������������������ <tbody>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <tr����������� ������������������ loop="$memo_list=>$key,$value">����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <td>{$value->memo_srl}</td>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <td>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <a����������� ������������������ href="{getUrl('',����������� ������������������ 'module',����������� ������������������ 'memo',����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ 'act',����������� ������������������ 'dispMemoView',����������� ������������������ 'memo_srl',����������� ������������������ $value->memo_srl)}">����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ {$value->content}</a></td>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <td>{date('Y-m-d����������� ������������������ H:i:s',����������� ������������������ strtotime($value->regdate))}</td>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <td>{date('Y-m-d����������� ������������������ H:i:s',����������� ������������������ strtotime($value->last_update))}</td>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <td>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <a����������� ������������������ href="{getUrl('',����������� ������������������ 'module',����������� ������������������ 'memo',����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ 'act',����������� ������������������ 'procMemoDelete',����������� ������������������ 'memo_srl',����������� ������������������ $value->memo_srl)}">����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ Delete</a></td>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ </tr>����������� ������������������ </tbody>����������� ������������������
5-4.����������� ������������������ Memo����������� ������������������ 보기����������� ������������������
./conf/module.xml����������� ������������������ ����������� ������������������ ����������� ������������������
<module>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <grants����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <permissions����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <actions>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <action����������� ������������������ name="dispMemoWrite"����������� ������������������ type="view"����������� ������������������ standalone="true"����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <action����������� ������������������ name="procMemoInsert"����������� ������������������ type="controller“����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ standalone="true"����������� ������������������ ruleset="insertMemo"����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <action����������� ������������������ name="dispMemoList"����������� ������������������ type="view"����������� ������������������ standalone="true"����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <action����������� ������������������ name="dispMemoView"����������� ������������������ type="view"����������� ������������������ standalone="true"����������� ������������������ />����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ </actions>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <menus����������� ������������������ />����������� ������������������ </module>����������� ������������������
memo.view.php����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������
class����������� ������������������ memoView����������� ������������������ extends����������� ������������������ memo����������� ������������������ {����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ …⋯����������� ������������������
function����������� ������������������ dispMemoView()����������� ������������������ {����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $memo_srl����������� ������������������ =����������� ������������������ Context::get('memo_srl');����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $oMemoModel����������� ������������������ =����������� ������������������ &getModel('memo');����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $output����������� ������������������ =����������� ������������������ $oMemoModel->getMemo($memo_srl);����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ Context::set('memo',����������� ������������������ $output->data);����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $this->setTemplateFile('memo_view');����������� ������������������ }����������� ������������������
memo.model.php����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������
class����������� ������������������ memoModel����������� ������������������ extends����������� ������������������ memo����������� ������������������ {����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ …⋯����������� ������������������
function����������� ������������������ getMemo($memo_srl)����������� ������������������ {����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $args->memoSrl����������� ������������������ =����������� ������������������ $memo_srl;����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ $output����������� ������������������ =����������� ������������������ executeQuery('memo.getMemo',����������� ������������������ $args);����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ if(!$output->toBool())����������� ������������������ return����������� ������������������ new����������� ������������������ Object(-1,����������� ������������������ 'msg_error');����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ return����������� ������������������ $output;����������� ������������������ }����������� ������������������
./skins/xe_default/memo_view.html����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������
<ul>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <li>memo_srl����������� ������������������ :����������� ������������������ {$memo->memo_srl}</li>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <li>member_srl����������� ������������������ :����������� ������������������ {$memo->member_srl}</li>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <li>content����������� ������������������ :����������� ������������������ {$memo->content}</li>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <li>regdate����������� ������������������ :����������� ������������������ {$memo->regdate}</li>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <li>last_update����������� ������������������ :����������� ������������������ {$memo->last_update}</li>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <li>ipaddress����������� ������������������ :����������� ������������������ {$memo->ipaddress}</li>����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ <li>other_column����������� ������������������ :����������� ������������������ {$memo->other_column}</li>����������� ������������������ </ul>����������� ������������������ <br����������� ������������������ />����������� ������������������ <a����������� ������������������ href="{getUrl('',����������� ������������������ 'module',����������� ������������������ 'memo',����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ 'act',����������� ������������������ 'dispMemoModify',����������� ������������������ 'memo_srl',����������� ������������������ $memo_srl)}">수정</a>����������� ������������������
6.����������� ������������������ memo����������� ������������������ 모듈����������� ������������������ 정리����������� ������������������
memo.view.php����������� ������������������
memo.controller.php����������� ������������������
memo.model.php����������� ������������������
./conf/info.xml����������� ������������������
./conf/module.xml����������� ������������������
./ruleset/insertMemo.xml����������� ������������������
./queries/insertMemo.xml����������� ������������������
memo.class.php����������� ������������������
./skins/xe_default/*.html����������� ������������������
Thank����������� ������������������ you.����������� ������������������