css 및 js 호출순서 조정기능 추가

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5785 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ngleader 2009-03-06 05:33:56 +00:00
parent 4f380d9c48
commit 61851f1dfe
2149 changed files with 109090 additions and 18689 deletions

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="0.2">
<title xml:lang="ko">모듈</title>
<title xml:lang="zh-CN">模块</title>
<title xml:lang="zh-CN">模块列表</title>
<title xml:lang="jp">モジュール</title>
<title xml:lang="en">Module</title>
<title xml:lang="es">Módulo</title>
@ -16,7 +16,7 @@
<description xml:lang="zh-TW">用於建立與管理其他模組。</description>
<version>0.1</version>
<date>2007-02-28</date>
<category>base</category>
<category>system</category>
<author email_address="zero@zeroboard.com" link="http://blog.nzeo.com">
<name xml:lang="ko">zero</name>

View file

@ -1,19 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<module>
<grants />
<permissions>
<permission action="dispModuleSelectList" target="member" />
</permissions>
<actions>
<action name="dispModuleSelectList" type="view" standalone="true" />
<action name="dispModuleSkinInfo" type="view" standalone="true" />
<action name="dispModuleAdminContent" type="view" standalone="true" admin_index="true" />
<action name="dispModuleAdminList" type="view" standalone="true" />
<action name="dispModuleAdminCategory" type="view" standalone="true" />
<action name="dispModuleAdminInfo" type="view" standalone="true" />
<action name="dispModuleAdminModuleSetup" type="view" standalone="true" />
<action name="dispModuleAdminModuleAdditionSetup" type="view" standalone="true" />
<action name="dispModuleAdminModuleGrantSetup" type="view" standalone="true" />
<action name="dispModuleAdminCopyModule" type="view" standalone="true" />
<action name="dispModuleAdminLangcode" type="view" standalone="true" />
<action name="dispModuleSkinInfo" type="view" standalone="true" />
<action name="dispModuleFileBox" type="view" standalone="true" />
<action name="dispModuleFileBoxAdd" type="view" standalone="true" />
<action name="procModuleFileBoxAdd" type="controller" standalone="true" />
<action name="procModuleFileBoxAdd" type="controller" standalone="true" />
<action name="procModuleFileBoxDelete" type="controller" standalone="true" />
<action name="getModuleAdminModuleList" type="model" standalone="true" />
<action name="getModuleAdminLangCode" type="model" standalone="true" />
<action name="dispModuleAdminSelectList" type="view" standalone="true" />
<action name="dispModuleAdminCopyModule" type="view" standalone="true" />
<action name="procModuleAdminInsertCategory" type="controller" standalone="true" />
<action name="procModuleAdminUpdateCategory" type="controller" standalone="true" />
<action name="procModuleAdminCopyModule" type="controller" standalone="true" />
<action name="procModuleAdminInsertGrant" type="controller" standalone="true" />
<action name="procModuleAdminUpdateSkinInfo" type="controller" standalone="true" />
<action name="procModuleAdminModuleSetup" type="controller" standalone="true" />
<action name="procModuleAdminModuleGrantSetup" type="controller" standalone="true" />
<action name="procModuleAdminInsertLang" type="controller" standalone="true" />
<action name="procModuleAdminDeleteLang" type="controller" standalone="true" />
</actions>
</module>

View file

@ -27,10 +27,24 @@
$lang->skin_history = 'Update history';
$lang->module_copy = "Duplicate Module";
$lang->module_selector = "Module Selector";
$lang->do_selected = "선택된 것들을...";
$lang->bundle_setup = "일괄 기본 설정";
$lang->bundle_addition_setup = "일괄 추가 설정";
$lang->bundle_grant_setup = "일괄 권한 설정";
$lang->lang_code = "언어 코드";
$lang->filebox = "파일박스";
$lang->header_script = "Header Script";
$lang->about_header_script = "You can input the html script between &lt;header&gt; and &lt;/header&gt; by yourself.<br />You can use &lt;script, &lt;style or &lt;meta tag";
$lang->grant_access = "Access";
$lang->grant_manager = "Management";
$lang->grant_to_all = "All users";
$lang->grant_to_login_user = "Logged users";
$lang->grant_to_site_user = "Joined users";
$lang->grant_to_group = "Specification group users";
$lang->cmd_add_shortcut = "Add Shortcut";
$lang->cmd_install = "Install";
$lang->cmd_update = "Update";
@ -38,6 +52,8 @@
$lang->cmd_manage_grant = 'Manage Permission';
$lang->cmd_manage_skin = 'Manage Skins';
$lang->cmd_manage_document = 'Manage Articles';
$lang->cmd_find_module = '모듈 찾기';
$lang->cmd_find_langcode = 'Find lang code';
$lang->msg_new_module = "Create new module";
$lang->msg_update_module = "Modify module";
@ -62,10 +78,13 @@
$lang->about_list_count = 'You can set the number of limit to show article in a page.(default is 20)';
$lang->about_search_list_count = 'You may set the number of articles to be exposed when you use search or category function. (default is 20)';
$lang->about_page_count = 'You can set the number of page link to move pages in a bottom of page.(default is 10)';
$lang->about_admin_id = 'You can grant a manager to have all permissions to the module.\n You can enter multiple IDs using <br />,(comma) \n(but the module manager cannot access the site admin page.)';
$lang->about_admin_id = 'You can grant a manager to have all permissions to the module.';
$lang->about_grant = 'If you disable all permissions for a specific object, members who has not logged in would get permission.';
$lang->about_grant_deatil = '가입한 사용자는 cafeXE등 분양형 가상 사이트에 가입을 한 로그인 사용자를 의미합니다';
$lang->about_module = "XE consists of modules except basic library.\n [Module Manage] module will show all installed modules and help you to manage them.";
$lang->about_extra_vars_default_value = 'If multiple default values are needed, you can link them with comma(,).';
$lang->about_search_virtual_site = "가상 사이트(카페XE등)의 도메인을 입력하신 후 검색하세요.<br/>가상 사이트이외의 모듈은 내용을 비우고 검색하시면 됩니다. (http:// 는 제외)";
$lang->about_langcode = "언어별로 다르게 설정하고 싶으시면 언어코드 찾기를 이용해주세요";
$lang->about_file_extension= "%s 파일만 가능합니다.";
?>

View file

@ -27,10 +27,24 @@
$lang->skin_history = 'Historia de actualización';
$lang->module_copy = "Copy Module";
$lang->module_selector = "Module Selector";
$lang->do_selected = "선택된 것들을...";
$lang->bundle_setup = "일괄 기본 설정";
$lang->bundle_addition_setup = "일괄 추가 설정";
$lang->bundle_grant_setup = "일괄 권한 설정";
$lang->lang_code = "언어 코드";
$lang->filebox = "파일박스";
$lang->header_script = "헤더 스크립트";
$lang->about_header_script = "html의 &lt;header&gt;와 &lt;/header&gt; 사이에 들어가는 코드를 직접 입력할 수 있습니다.<br />&lt;script, &lt;style 또는 &lt;meta 태그등을 이용하실 수 있습니다";
$lang->grant_access = "Access";
$lang->grant_manager = "Management";
$lang->grant_to_all = "All users";
$lang->grant_to_login_user = "Logged users";
$lang->grant_to_site_user = "Joined users";
$lang->grant_to_group = "Specification group users";
$lang->cmd_add_shortcut = "añadir acceso directo";
$lang->cmd_install = "Instalar";
$lang->cmd_update = "Actualizar";
@ -38,6 +52,8 @@
$lang->cmd_manage_grant = 'Manejo de atribuciones';
$lang->cmd_manage_skin = 'Manejo de temas';
$lang->cmd_manage_document = 'Manejo de documentos';
$lang->cmd_find_module = '모듈 찾기';
$lang->cmd_find_langcode = 'Find lang code';
$lang->msg_new_module = "Crear un nuevo módulo";
$lang->msg_update_module = "Modificar el módulo";
@ -61,10 +77,13 @@
$lang->about_list_count = 'Usted puede definir el número límite de los documentos a mostrar en una página.(Predefinido es 20)';
$lang->about_search_list_count = 'Usted puede configurar el número de artículos que se exponen cuando se utiliza la función de búsqueda o categoría. (Por defecto es 20)';
$lang->about_page_count = 'Usted puede definir el número de página enlazada para mover páginas en un botón de la página.(Predefinido es 10)';
$lang->about_admin_id = 'Usted puede definir el administrador de atribuciones superiores al módulo.\n Usted puede asignar múltiples IDs,<br />utilizando una ","(coma) \n(pero el administrador del módulo no puede acceder al sitio de la pógina del administrador.)';
$lang->about_admin_id = 'Usted puede definir el administrador de atribuciones superiores al módulo.\n Usted puede asignar múltiples IDs.';
$lang->about_grant = 'Si usted desea desactivar a todos los objetos teniendo atribuciones especificas, incluso el usuario no conectado pueden tener atribuciones.';
$lang->about_grant_deatil = '가입한 사용자는 cafeXE등 분양형 가상 사이트에 가입을 한 로그인 사용자를 의미합니다';
$lang->about_module = "XE consiste de módulos excepto la librería básica.\n Módulo del Manejo del Módulo muestra todos los módulos instalados y ayuda el manejo de ellos.";
$lang->about_extra_vars_default_value = 'Si múltiples valores predefinidos son requeridos, usted puede enlazar con la coma(,).';
$lang->about_search_virtual_site = "가상 사이트(카페XE등)의 도메인을 입력하신 후 검색하세요.<br/>가상 사이트이외의 모듈은 내용을 비우고 검색하시면 됩니다. (http:// 는 제외)";
$lang->about_langcode = "언어별로 다르게 설정하고 싶으시면 언어코드 찾기를 이용해주세요";
$lang->about_file_extension= "%s 파일만 가능합니다.";
?>

View file

@ -27,10 +27,24 @@
$lang->skin_history = 'Histoire des Mises à jour';
$lang->module_copy = "Copier un Module";
$lang->module_selector = "Module Selector";
$lang->do_selected = "선택된 것들을...";
$lang->bundle_setup = "일괄 기본 설정";
$lang->bundle_addition_setup = "일괄 추가 설정";
$lang->bundle_grant_setup = "일괄 권한 설정";
$lang->lang_code = "언어 코드";
$lang->filebox = "파일박스";
$lang->header_script = "Script en-tête";
$lang->about_header_script = "Vous pouvez entrer un script en html par vous-même entre &lt;header&gt; et &lt;/header&gt;.<br />Vous pouvez utiliser &lt;script, &lt;style ou &lt;meta tag";
$lang->grant_access = "Access";
$lang->grant_manager = "Management";
$lang->grant_to_all = "All users";
$lang->grant_to_login_user = "Logged users";
$lang->grant_to_site_user = "Joined users";
$lang->grant_to_group = "Specification group users";
$lang->cmd_add_shortcut = "Ajouter un raccourci";
$lang->cmd_install = "Installer";
$lang->cmd_update = "Mettre à Jour";
@ -38,6 +52,8 @@
$lang->cmd_manage_grant = 'Administrer des Permissions';
$lang->cmd_manage_skin = 'Administrer des Habillages';
$lang->cmd_manage_document = 'Administrer des Articles';
$lang->cmd_find_module = '모듈 찾기';
$lang->cmd_find_langcode = 'Find lang code';
$lang->msg_new_module = "Créer un module";
$lang->msg_update_module = "Modifier un module";
@ -61,10 +77,13 @@
$lang->about_list_count = 'Vous pouvez configurer combien d\'articles soient exposés dans une page.(20 par défaut)';
$lang->about_search_list_count = 'Vous pouvez configurer combien d\'articles soient exposés quand vous utilisez la fonction de recherche ou de catégorie. (20 par défaut)';
$lang->about_page_count = 'Vous pouvez configurer combien de liens pour les Pages à Bouger en bas de chaque page.(10 par défaut)';
$lang->about_admin_id = 'Vous pouvez désigner un directeur qui aura tous les permissions sur le module.\nVous pouvez entrer plusieurs compte en utilisant <br />,(virgule) \n(mais le directeur ne peut pas encore approcher de la page d\'administrer du site.)';
$lang->about_admin_id = 'Vous pouvez désigner un directeur qui aura tous les permissions sur le module.\nVous pouvez entrer plusieurs compte en utilisant.';
$lang->about_grant = 'Si vous ne donnez pas la permission à aucune personne, même les membres qui n\'a pas ouvert la connexion auront la permission. ';
$lang->about_grant_deatil = '가입한 사용자는 cafeXE등 분양형 가상 사이트에 가입을 한 로그인 사용자를 의미합니다';
$lang->about_module = "XE se compose des modules sauf la bibliothèque fondamental.\nLe module [Administration des Modules] montera tous les modules installés et vous aidera les administrer.";
$lang->about_extra_vars_default_value = 'Si plusieurs valeurs sont nécessaires, vous pouvez les connecter avec la virgule(,).';
$lang->about_search_virtual_site = "가상 사이트(카페XE등)의 도메인을 입력하신 후 검색하세요.<br/>가상 사이트이외의 모듈은 내용을 비우고 검색하시면 됩니다. (http:// 는 제외)";
$lang->about_langcode = "언어별로 다르게 설정하고 싶으시면 언어코드 찾기를 이용해주세요";
$lang->about_file_extension= "%s 파일만 가능합니다.";
?>

View file

@ -27,10 +27,24 @@
$lang->skin_history = '変更内容';
$lang->module_copy = "モジュールコピー";
$lang->module_selector = "Module Selector";
$lang->do_selected = "선택된 것들을...";
$lang->bundle_setup = "일괄 기본 설정";
$lang->bundle_addition_setup = "일괄 추가 설정";
$lang->bundle_grant_setup = "일괄 권한 설정";
$lang->lang_code = "언어 코드";
$lang->filebox = "파일박스";
$lang->header_script = "ヘッダースクリプト";
$lang->about_header_script = "HTMLの&lt;header&gt;と&lt;/header&gt;の間に入れるコードを直接入力できます。<br />&lt;script、&lt;styleまたは&lt;metaタグなどが利用できます";
$lang->grant_access = "Access";
$lang->grant_manager = "Management";
$lang->grant_to_all = "All users";
$lang->grant_to_login_user = "Logged users";
$lang->grant_to_site_user = "Joined users";
$lang->grant_to_group = "Specification group users";
$lang->cmd_add_shortcut = "ショットカット追加";
$lang->cmd_install = "インストール";
$lang->cmd_update = "アップデート";
@ -38,6 +52,8 @@
$lang->cmd_manage_grant = '権限管理';
$lang->cmd_manage_skin = 'スキン管理';
$lang->cmd_manage_document = '書き込み管理';
$lang->cmd_find_module = '모듈 찾기';
$lang->cmd_find_langcode = 'Find lang code';
$lang->msg_new_module = "モジュール作成";
$lang->msg_update_module = "モジュール修正";
@ -62,10 +78,13 @@
$lang->about_list_count = 'ページ当たりに表示される書き込みの数が指定できますデフォルト20個。';
$lang->about_search_list_count = 'お勧めの記事数を設定するにさらされるかのカテゴリ検索機能を使用する場合です。 デフォルトは20 ';
$lang->about_page_count = 'リストの下段に移動できるページのリンク数が指定できます(デフォルト10個)。';
$lang->about_admin_id = '該当するモジュールに対して最高権限を持つ管理者を指定することができます。「,(コンマ)」で区切って多数のIDが指定できます(管理者ページへのアクセスはできません)。';
$lang->about_admin_id = '該当するモジュールに対して最高権限を持つ管理者を指定することができます。';
$lang->about_grant = '特定権限の対象をすべて解除するとログインしていない会員ユーザまで権限が与えられます。';
$lang->about_grant_deatil = '가입한 사용자는 cafeXE등 분양형 가상 사이트에 가입을 한 로그인 사용자를 의미합니다';
$lang->about_module = "XEは、基本ライブラリの他は、すべてモジュールで構成されています。モジュール管理用のモジュールはインストールされたすべてを表示し、管理できるようにします。";
$lang->about_extra_vars_default_value = '多重・単一選択などのデフォルト値が、複数必要な場合は、「, (コンマ)」で区切って追加することができます。';
$lang->about_search_virtual_site = "가상 사이트(카페XE등)의 도메인을 입력하신 후 검색하세요.<br/>가상 사이트이외의 모듈은 내용을 비우고 검색하시면 됩니다. (http:// 는 제외)";
$lang->about_langcode = "언어별로 다르게 설정하고 싶으시면 언어코드 찾기를 이용해주세요";
$lang->about_file_extension= "%s 파일만 가능합니다.";
?>

View file

@ -5,17 +5,17 @@
* @brief 한국어 언어팩
**/
$lang->virtual_site = "가상 사이트";
$lang->module_list = "모듈 목록";
$lang->module_index = "모듈 목록";
$lang->module_category = "모듈 분류";
$lang->module_info = "모듈 정보";
$lang->add_shortcut = "관리자 메뉴에 추가";
$lang->module_action = "동작";
$lang->module_maker = "모듈 제작자";
$lang->virtual_site = '가상 사이트';
$lang->module_list = '모듈 목록';
$lang->module_index = '모듈 목록';
$lang->module_category = '모듈 분류';
$lang->module_info = '모듈 정보';
$lang->add_shortcut = '관리자 메뉴에 추가';
$lang->module_action = '동작';
$lang->module_maker = '모듈 제작자';
$lang->module_license = '라이선스';
$lang->module_history = '변경 이력 ';
$lang->category_title = "분류 이름";
$lang->category_title = '분류 이름';
$lang->header_text = '상단 내용';
$lang->footer_text = '하단 내용';
$lang->use_category = '분류 사용';
@ -25,33 +25,49 @@
$lang->skin_author = '스킨 제작자';
$lang->skin_license = '라이선스';
$lang->skin_history = '변경 이력';
$lang->module_copy = "모듈 복사";
$lang->module_selector = "모듈 선택기";
$lang->module_copy = '모듈 복사';
$lang->module_selector = '모듈 선택기';
$lang->do_selected = '선택된 것들을...';
$lang->bundle_setup = '일괄 기본 설정';
$lang->bundle_addition_setup = '일괄 추가 설정';
$lang->bundle_grant_setup = '일괄 권한 설정';
$lang->lang_code = '언어 코드';
$lang->filebox = '파일박스';
$lang->header_script = "헤더 스크립트";
$lang->about_header_script = "html의 &lt;head&gt;와 &lt;/head&gt; 사이에 들어가는 코드를 직접 입력할 수 있습니다.<br />&lt;script, &lt;style 또는 &lt;meta 태그등을 이용하실 수 있습니다";
$lang->header_script = '헤더 스크립트';
$lang->about_header_script = 'html의 &lt;head&gt;와 &lt;/head&gt; 사이에 들어가는 코드를 직접 입력할 수 있습니다.<br />&lt;script, &lt;style 또는 &lt;meta 태그등을 이용하실 수 있습니다';
$lang->cmd_add_shortcut = "바로가기 추가";
$lang->cmd_install = "설치";
$lang->cmd_update = "업데이트";
$lang->grant_access = '접근권한';
$lang->grant_manager = '관리권한';
$lang->grant_to_all = '모든 사용자';
$lang->grant_to_login_user = '로그인 사용자';
$lang->grant_to_site_user = '가입한 사용자';
$lang->grant_to_group = '특정 그룹 사용자';
$lang->cmd_add_shortcut = '바로가기 추가';
$lang->cmd_install = '설치';
$lang->cmd_update = '업데이트';
$lang->cmd_manage_category = '분류관리';
$lang->cmd_manage_grant = '권한관리';
$lang->cmd_manage_skin = '스킨관리';
$lang->cmd_manage_document = '게시글 관리';
$lang->cmd_find_module = '모듈 찾기';
$lang->cmd_find_langcode = '언어코드 찾기';
$lang->msg_new_module = "모듈 생성";
$lang->msg_update_module = "모듈 수정";
$lang->msg_module_name_exists = "이미 존재하는 모듈이름입니다. 다른 이름을 입력해주세요.";
$lang->msg_new_module = '모듈 생성';
$lang->msg_update_module = '모듈 수정';
$lang->msg_module_name_exists = '이미 존재하는 모듈이름입니다. 다른 이름을 입력해주세요.';
$lang->msg_category_is_null = '등록된 분류가 없습니다';
$lang->msg_grant_is_null = '등록된 권한 대상이 없습니다';
$lang->msg_no_checked_document = '선택된 게시물이 없습니다';
$lang->msg_move_failed = '이동 실패하였습니다';
$lang->msg_cannot_delete_for_child = '하부 분류가 있는 분류는 삭제하실 수 없습니다';
$lang->msg_limit_mid ="모듈이름은 영문+[영문+숫자+_] 만 가능합니다.";
$lang->msg_limit_mid ='모듈이름은 영문+[영문+숫자+_] 만 가능합니다.';
$lang->about_browser_title = "브라우저의 제목에 나타나는 값입니다. RSS/Trackback에서도 사용됩니다.";
$lang->about_mid = "모듈이름은 http://주소/?mid=모듈이름 처럼 직접 호출할 수 있는 값입니다. ( 영문+[영문+숫자+_] 만 가능)";
$lang->about_default = "선택하시면 사이트에 mid값 없이 접속하였을 경우 기본으로 보여줍니다";
$lang->about_browser_title = '브라우저의 제목에 나타나는 값입니다. RSS/Trackback에서도 사용됩니다.';
$lang->about_mid = '모듈이름은 http://주소/?mid=모듈이름 처럼 직접 호출할 수 있는 값입니다. ( 영문+[영문+숫자+_] 만 가능)';
$lang->about_default = '선택하시면 사이트에 mid값 없이 접속하였을 경우 기본으로 보여줍니다';
$lang->about_module_category = "분류를 통한 관리를 할 수 있도록 합니다. 모듈 분류의 관리는 <a href=\"./?module=admin&amp;act=dispModuleAdminCategory\">모듈관리 > 모듈분류 </a>에서 하실 수 있습니다.";
$lang->about_description= '관리용으로 사용되는 설명입니다';
$lang->about_default = '선택하시면 사이트에 mid값 없이 접속하였을 경우 기본으로 보여줍니다';
@ -62,9 +78,12 @@
$lang->about_list_count = '한페이지에 표시될 글의 수를 지정하실 수 있습니다. (기본 20개)';
$lang->about_search_list_count = '검색 또는 카테고리 선택등을 할 경우 표시될 글의 수를 지정하실 수 있습니다. 기본(20개)';
$lang->about_page_count = '목록 하단 페이지 이동 하는 링크의 수를 지정하실 수 있습니다. (기본 10개)';
$lang->about_admin_id = '해당 모듈에 대해 최고 권한을 가지는 관리자를 지정할 수 있습니다.<br />,(콤마)로 다수 아이디 지정이 가능합니다. (관리자페이지 접근은 불가능)';
$lang->about_admin_id = '해당 모듈에 대해 최고 권한을 가지는 관리자를 지정할 수 있습니다.';
$lang->about_grant = '특정 권한의 대상을 모두 해제하시면 로그인하지 않은 회원까지 권한을 가질 수 있습니다';
$lang->about_grant_deatil = '가입한 사용자는 cafeXE등 분양형 가상 사이트에 가입을 한 로그인 사용자를 의미합니다';
$lang->about_module = "XE는 기본 라이브러리를 제외한 나머지는 모두 모듈로 구성되어 있습니다.\n모듈관리 모듈은 설치된 모든 모듈을 보여주고 관리를 도와줍니다.";
$lang->about_extra_vars_default_value = '다중/단일 선택등 기본값이 여러개가 필요한 경우 , (콤마)로 연결하시면 됩니다';
$lang->about_search_virtual_site = "가상 사이트(카페XE등)의 도메인을 입력하신 후 검색하세요.<br/>가상 사이트이외의 모듈은 내용을 비우고 검색하시면 됩니다. (http:// 는 제외)";
$lang->about_search_virtual_site = '가상 사이트(카페XE등)의 도메인을 입력하신 후 검색하세요.<br/>가상 사이트이외의 모듈은 내용을 비우고 검색하시면 됩니다. (http:// 는 제외)';
$lang->about_langcode = '언어별로 다르게 설정하고 싶으시면 언어코드 찾기를 이용해주세요';
$lang->about_file_extension= "%s 파일만 가능합니다.";
?>

View file

@ -26,11 +26,26 @@
$lang->skin_license = 'License';
$lang->skin_history = 'История обновлений';
$lang->module_selector = "Module Selector";
$lang->do_selected = "선택된 것들을...";
$lang->bundle_setup = "일괄 기본 설정";
$lang->bundle_addition_setup = "일괄 추가 설정";
$lang->bundle_grant_setup = "일괄 권한 설정";
$lang->lang_code = "언어 코드";
$lang->filebox = "파일박스";
$lang->module_copy = "Копировать модуль";
$lang->header_script = "헤더 스크립트";
$lang->about_header_script = "html의 &lt;header&gt;와 &lt;/header&gt; 사이에 들어가는 코드를 직접 입력할 수 있습니다.<br />&lt;script, &lt;style 또는 &lt;meta 태그등을 이용하실 수 있습니다";
$lang->grant_access = "Access";
$lang->grant_manager = "Management";
$lang->grant_to_all = "All users";
$lang->grant_to_login_user = "Logged users";
$lang->grant_to_site_user = "Joined users";
$lang->grant_to_group = "Specification group users";
$lang->cmd_add_shortcut = "Добавить ярлык";
$lang->cmd_install = "Установить";
$lang->cmd_update = "Обновить";
@ -38,6 +53,8 @@
$lang->cmd_manage_grant = 'Управление правами доступа';
$lang->cmd_manage_skin = 'Управление скинами';
$lang->cmd_manage_document = 'Управление статьями';
$lang->cmd_find_module = '모듈 찾기';
$lang->cmd_find_langcode = 'Find lang code';
$lang->msg_new_module = "Создать новый модуль";
$lang->msg_update_module = "Изменить модуль";
@ -61,10 +78,13 @@
$lang->about_list_count = 'Вы можете установить лимит показа статей на страницу. (по умолчанию: 20)';
$lang->about_search_list_count = '검색 또는 카테고리 선택등을 할 경우 표시될 글의 수를 지정하실 수 있습니다. 기본(20개)';
$lang->about_page_count = 'Вы можете установить число страниц внизу. (по умолчанию: 10)';
$lang->about_admin_id = 'Вы можете разрешить менеджеру иметь полные права доступа к этому модулю.\nВы можете ввести несколько ID, используя <br />запятую \n(но менеджер модуля не имеет права доступа к странице администрирования сайта.)';
$lang->about_admin_id = 'Вы можете разрешить менеджеру иметь полные права доступа к этому модулю.\nВы можете ввести несколько ID, используя ';
$lang->about_grant = 'Если Вы отключите все права доступа для отдельного объекта, не прошедшие процедуру входа на сайт пользователи получат доступ.';
$lang->about_grant_deatil = '가입한 사용자는 cafeXE등 분양형 가상 사이트에 가입을 한 로그인 사용자를 의미합니다';
$lang->about_module = "XE состоит из модулей, за исключением базовой библиотеки.\n Управление модулем покажет все установленные модули и поможет управлять ими.";
$lang->about_extra_vars_default_value = 'Если нужно несколько значений по умолчанию, разделите их запятыми(,).';
$lang->about_search_virtual_site = "가상 사이트(카페XE등)의 도메인을 입력하신 후 검색하세요.<br/>가상 사이트이외의 모듈은 내용을 비우고 검색하시면 됩니다. (http:// 는 제외)";
$lang->about_langcode = "언어별로 다르게 설정하고 싶으시면 언어코드 찾기를 이용해주세요";
$lang->about_file_extension= "%s 파일만 가능합니다.";
?>

View file

@ -5,7 +5,7 @@
* @brief 简体中文语言包
**/
$lang->virtual_site = "Virtual Site";
$lang->virtual_site = "站点";
$lang->module_list = "模块目录";
$lang->module_index = "模块目录";
$lang->module_category = "模块分类";
@ -16,21 +16,35 @@
$lang->module_license = '版权';
$lang->module_history = "更新事项 ";
$lang->category_title = "分类名称";
$lang->header_text = '上端内容';
$lang->footer_text = '下端内容';
$lang->header_text = '头部修饰';
$lang->footer_text = '尾部修饰';
$lang->use_category = '使用分类';
$lang->category_title = '分类名';
$lang->checked_count = '被选择的主题数';
$lang->checked_count = '所选主题数';
$lang->skin_default_info = '皮肤默认信息';
$lang->skin_author = '皮肤作者';
$lang->skin_license = '版权';
$lang->skin_history = '更新日志';
$lang->module_copy = "Copy Module";
$lang->module_selector = "Module Selector";
$lang->module_copy = "模块复制";
$lang->module_selector = "模块选择器";
$lang->do_selected = "把所选模块...";
$lang->bundle_setup = "批量设置-常规选项";
$lang->bundle_addition_setup = "批量设置-高级选项";
$lang->bundle_grant_setup = "批量设置-权限";
$lang->lang_code = "语言变量";
$lang->filebox = "文件管理";
$lang->header_script = "文件头部脚本";
$lang->about_header_script = "可以直接输入插入到html中&lt;head&gt;区的代码。<br />可使用&lt;script, &lt;style 或 &lt;meta 等标签。";
$lang->grant_access = "访问权限";
$lang->grant_manager = "管理权限";
$lang->grant_to_all = "不限制";
$lang->grant_to_login_user = "已登录用户";
$lang->grant_to_site_user = "子站会员";
$lang->grant_to_group = "特定用户组";
$lang->cmd_add_shortcut = "添加到快捷菜单";
$lang->cmd_install = "安装";
$lang->cmd_update = "升级";
@ -38,6 +52,8 @@
$lang->cmd_manage_grant = '权限管理';
$lang->cmd_manage_skin = '皮肤管理';
$lang->cmd_manage_document = '主题管理';
$lang->cmd_find_module = '查找模块';
$lang->cmd_find_langcode = '选择语言变量';
$lang->msg_new_module = "模块生成";
$lang->msg_update_module = "模块修改";
@ -47,6 +63,7 @@
$lang->msg_no_checked_document = '没有被选择的主题';
$lang->msg_move_failed = '移动失败!';
$lang->msg_cannot_delete_for_child = '不能删除有下级分类的分类!';
$lang->msg_limit_mid ="模块名称只允许英文字母+[英文字母+数字]。";
$lang->about_browser_title = "显示在浏览器窗口的标题值。 在RSS/Trackback也可以使用。";
$lang->about_mid = "模块名称只允许使用英文,数字和下划线。";
@ -54,17 +71,19 @@
$lang->about_module_category = "可以分类管理模块。 模块分类可以在 <a href=\"./?module=admin&amp;act=dispModuleAdminCategory\">模块管理 > 模块分类 </a>中进行管理。";
$lang->about_description= '管理用使用说明。';
$lang->about_default = '用没有mid值的网址访问网站时将会显示默认。';
$lang->about_header_text = '显示在模块顶部的内容。(可以使用HTML)';
$lang->about_footer_text = '显示在模块底部的内容。(可以使用HTML)';
$lang->about_header_text = '模块头部修饰内容。(可以使用HTML)';
$lang->about_footer_text = '模块尾部修饰内容。(可以使用HTML)';
$lang->about_skin = '可以选择模块皮肤。';
$lang->about_use_category = '选择此项可以使用分类功能。';
$lang->about_list_count = '可以指定每页显示的主题数。(默认为20个)';
$lang->about_search_list_count = '可以指定搜索或选择分类时每页要显示的帖子数(默认为20个)。';
$lang->about_page_count = '可以指定显示在目录下方的页面数(默认为10个)。 ';
$lang->about_admin_id = '可以对该模块指定最高管理权限。<br />有多名管理员时,可以用,(逗号)来分隔(不能访问管理页面)。 ';
$lang->about_admin_id = '可以对该模块指定拥有最高管理权限的管理员。';
$lang->about_grant = '全部解除特定权限的对象时,没有登录的会员也将具有相关权限。';
$lang->about_grant_deatil = '子站会员是指注册到子站点已在线的用户.';
$lang->about_module = "除基本library以外XE全部由模块组成。\n模块管理中列出所有已安装的模块,因此易于管理。";
$lang->about_extra_vars_default_value = '复选/单选缺省值需要多个时,用,(逗号)来分隔。';
$lang->about_search_virtual_site = "가상 사이트(카페XE등)의 도메인을 입력하신 후 검색하세요.<br/>가상 사이트이외의 모듈은 내용을 비우고 검색하시면 됩니다. (http:// 는 제외)";
$lang->about_search_virtual_site = "请输入子站点域名后再进行搜索。<br/>子站点以外的模块可以留空搜索。(输入时http://除外)。";
$lang->about_langcode = "要想实现多国语言切换请点击[选择语言变量]按钮。";
$lang->about_file_extension= "只允许%s文件。";
?>

View file

@ -5,7 +5,7 @@
* @brief 正體中文語言
**/
$lang->virtual_site = "Virtual Site";
$lang->virtual_site = "虛擬網站";
$lang->module_list = "模組列表";
$lang->module_index = "模組列表";
$lang->module_category = "模組分類";
@ -26,11 +26,25 @@
$lang->skin_license = '版權';
$lang->skin_history = '更新事項';
$lang->module_copy = "複製模組";
$lang->module_selector = "Module Selector";
$lang->module_selector = "模組選擇器";
$lang->do_selected = "選擇項目...";
$lang->bundle_setup = "整體預設值";
$lang->bundle_addition_setup = "新增批次設定";
$lang->bundle_grant_setup = "整體權限設定";
$lang->lang_code = "語言代碼";
$lang->filebox = "Filebox";
$lang->header_script = "Header Script";
$lang->about_header_script = "可以直接輸入,並插入到 HTML的&lt;head&gt;之間。<br />可使用&lt;script&gt;, &lt;style&gt; 或 &lt;meta&gt; 等標籤。";
$lang->grant_access = "訪問";
$lang->grant_manager = "管理";
$lang->grant_to_all = "所有使用者";
$lang->grant_to_login_user = "已登入用戶";
$lang->grant_to_site_user = "網站用戶";
$lang->grant_to_group = "特定使用群組";
$lang->cmd_add_shortcut = "新增到快捷選單";
$lang->cmd_install = "安裝";
$lang->cmd_update = "升級";
@ -38,6 +52,8 @@
$lang->cmd_manage_grant = '權限管理';
$lang->cmd_manage_skin = '面板管理';
$lang->cmd_manage_document = '主題管理';
$lang->cmd_find_module = '搜尋模組';
$lang->cmd_find_langcode = '搜尋語言代碼';
$lang->msg_new_module = "建立模組";
$lang->msg_update_module = "修改模組";
@ -49,10 +65,10 @@
$lang->msg_cannot_delete_for_child = '無法刪除有子分類的分類!';
$lang->msg_limit_mid ="模組名稱可由英文+[英文+數字+_]等非常多種組合。";
$lang->about_browser_title = "顯示在瀏覽器視窗的標題。在 RSS/Trackback也可以使用。";
$lang->about_browser_title = "顯示在瀏覽器視窗的標題。在RSS/Trackback也可以使用。";
$lang->about_mid = "模組名稱只允許使用英文,數字和底線。";
$lang->about_default = "用沒有mid值的網址訪問網站時將會顯示預設。";
$lang->about_module_category = "可以分類管理模組。 模組分類可以在 <a href=\"./?module=admin&amp;act=dispModuleAdminCategory\">模組管理 > 模組分類 </a>中進行管理。";
$lang->about_module_category = "可以分類管理模組。模組分類可以在<a href=\"./?module=admin&amp;act=dispModuleAdminCategory\">模組管理 > 模組分類 </a>中進行管理。";
$lang->about_description= '管理使用說明。';
$lang->about_default = '用沒有mid值的網址訪問網站時將會顯示預設。';
$lang->about_header_text = '顯示在模組頂部的內容。(可使用 HTML)';
@ -62,10 +78,13 @@
$lang->about_list_count = '可以指定每頁顯示的主題數。(預設為20個)';
$lang->about_search_list_count = '可以指定搜尋或選擇分類時,每頁要顯示的文章數(預設為20個)。';
$lang->about_page_count = '可以指定顯示在清單下方的頁面數(預設為10個)。 ';
$lang->about_admin_id = '可以對該模組指定最高管理權限。<br />有多名管理員時,可以用 (.) 區隔(無法訪問管理頁面)。 ';
$lang->about_admin_id = '可以對該模組指定最高管理權限。';
$lang->about_grant = '全部解除特定權限的對象時,沒有登錄的會員也將具有相關權限。';
$lang->about_grant_deatil = '가입한 사용자는 cafeXE등 분양형 가상 사이트에 가입을 한 로그인 사용자를 의미합니다';
$lang->about_module = "除基本函式庫以外XE全部由模組組成。\n模組管理中列出所有已安裝的模組,因此易於管理。";
$lang->about_extra_vars_default_value = '當復選或單選的預設值需要很多個時,用 (,) 區隔。';
$lang->about_search_virtual_site = "가상 사이트(카페XE등)의 도메인을 입력하신 후 검색하세요.<br/>가상 사이트이외의 모듈은 내용을 비우고 검색하시면 됩니다. (http:// 는 제외)";
$lang->about_extra_vars_default_value = '當復選或單選的預設值需要很多個時,用逗號(,)區隔。';
$lang->about_search_virtual_site = "請輸入想要搜尋的虛擬網站(XE網咖等)的網域名稱。<br/>가상 사이트이외의 모듈은 내용을 비우고 검색하시면 됩니다. (http:// 不用輸入)";
$lang->about_langcode = "언어별로 다르게 설정하고 싶으시면 언어코드 찾기를 이용해주세요";
$lang->about_file_extension= "只允許%s檔案。";
?>

View file

@ -84,12 +84,20 @@
}
if(!count($clones)) return;
// 원 모듈의 정보를 직접 구해옴
$obj->module_srl = $module_srl;
$output = executeQuery("module.getMidInfo", $obj);
$module_info = $output->data;
unset($module_info->module_srl);
unset($module_info->regdate);
$oModuleModel = &getModel('module');
$oModuleController = &getController('module');
// 모듈 정보 가져옴
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
// 권한 정보 가져옴
$module_args->module_srl = $module_srl;
$output = executeQueryArray('module.getModuleGrants', $module_args);
$grant = array();
if($output->data) {
foreach($output->data as $key => $val) $grant[$val->name][] = $val->group_srl;
}
$oDB = &DB::getInstance();
$oDB->begin();
@ -98,16 +106,379 @@
foreach($clones as $mid => $browser_title) {
$clone_args = null;
$clone_args = clone($module_info);
$clone_args->module_srl = getNextSequence();
$clone_args->module_srl = null;
$clone_args->content = null;
$clone_args->mid = $mid;
$clone_args->browser_title = $browser_title;
$clone_args->is_default = 'N';
$output = executeQuery('module.insertModule', $clone_args);
// 모듈 생성
$output = $oModuleController->insertModule($clone_args);
$module_srl = $output->get('module_srl');
// 권한 정보 등록
if(count($grant)) $oModuleController->insertModuleGrants($module_srl, $grant);
}
$oDB->commit();
$this->setMessage('success_registed');
}
/**
* @brief 모듈 권한 저장
**/
function procModuleAdminInsertGrant() {
$oModuleController = &getController('module');
$oModuleModel = &getModel('module');
// 모듈 번호 구함
$module_srl = Context::get('module_srl');
// 해당 모듈의 정보를 구함
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
if(!$module_info) return new Object(-1,'msg_invalid_request');
// 관리자 아이디 등록
$oModuleController->deleteAdminId($module_srl);
$admin_member = Context::get('admin_member');
if($admin_member) {
$admin_members = explode(',',$admin_member);
for($i=0;$i<count($admin_members);$i++) {
$admin_id = trim($admin_members[$i]);
if(!$admin_id) continue;
$oModuleController->insertAdminId($module_srl, $admin_id);
}
}
// 권한 정리
$xml_info = $oModuleModel->getModuleActionXML($module_info->module);
$grant_list = $xml_info->grant;
$grant_list->access->default = 'guest';
$grant_list->manager->default = 'manager';
foreach($grant_list as $grant_name => $grant_info) {
// default값을 구함
$default = Context::get($grant_name.'_default');
// -1 = 로그인 사용자만, -2 = 사이트 가입자만, 0 = 모든 사용자
if(strlen($default)){
$grant->{$grant_name}[] = $default;
continue;
// 특정 그룹 사용자
} else {
$group_srls = Context::get($grant_name);
if($group_srls) {
if(strpos($group_srls,'|@|')!==false) $group_srls = explode('|@|',$group_srls);
elseif(strpos($group_srls,',')!==false) $group_srls = explode(',',$group_srls);
else $group_srls = array($group_srls);
$grant->{$grant_name} = $group_srls;
}
continue;
}
$grant->{$group_srls} = array();
}
// DB에 저장
$args->module_srl = $module_srl;
$output = executeQuery('module.deleteModuleGrants', $args);
if(!$output->toBool()) return $output;
// DB에 권한 저장
foreach($grant as $grant_name => $group_srls) {
foreach($group_srls as $key => $val) {
$args = null;
$args->module_srl = $module_srl;
$args->name = $grant_name;
$args->group_srl = $val;
$output = executeQuery('module.insertModuleGrant', $args);
if(!$output->toBool()) return $output;
}
}
$this->setMessage('success_registed');
}
/**
* @brief 스킨 정보 업데이트
**/
function procModuleAdminUpdateSkinInfo() {
// module_srl에 해당하는 정보들을 가져오기
$module_srl = Context::get('module_srl');
$oModuleModel = &getModel('module');
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
if($module_info->module_srl) {
$skin = $module_info->skin;
// 스킨의 정보를 구해옴 (extra_vars를 체크하기 위해서)
$module_path = './modules/'.$module_info->module;
$skin_info = $oModuleModel->loadSkinInfo($module_path, $skin);
// 입력받은 변수들을 체크 (mo, act, module_srl, page등 기본적인 변수들 없앰)
$obj = Context::getRequestVars();
unset($obj->act);
unset($obj->module_srl);
unset($obj->page);
unset($obj->mid);
unset($obj->module);
// 원 skin_info에서 extra_vars의 type이 image일 경우 별도 처리를 해줌
if($skin_info->extra_vars) {
foreach($skin_info->extra_vars as $vars) {
if($vars->type!='image') continue;
$image_obj = $obj->{$vars->name};
// 삭제 요청에 대한 변수를 구함
$del_var = $obj->{"del_".$vars->name};
unset($obj->{"del_".$vars->name});
if($del_var == 'Y') {
FileHandler::removeFile($module_info->{$vars->name});
continue;
}
// 업로드 되지 않았다면 이전 데이터를 그대로 사용
if(!$image_obj['tmp_name']) {
$obj->{$vars->name} = $module_info->{$vars->name};
continue;
}
// 정상적으로 업로드된 파일이 아니면 무시
if(!is_uploaded_file($image_obj['tmp_name'])) {
unset($obj->{$vars->name});
continue;
}
// 이미지 파일이 아니어도 무시
if(!preg_match("/\.(jpg|jpeg|gif|png)$/i", $image_obj['name'])) {
unset($obj->{$vars->name});
continue;
}
// 경로를 정해서 업로드
$path = sprintf("./files/attach/images/%s/", $module_srl);
// 디렉토리 생성
if(!FileHandler::makeDir($path)) return false;
$filename = $path.$image_obj['name'];
// 파일 이동
if(!move_uploaded_file($image_obj['tmp_name'], $filename)) {
unset($obj->{$vars->name});
continue;
}
// 변수를 바꿈
unset($obj->{$vars->name});
$obj->{$vars->name} = $filename;
}
}
// 해당 모듈의 전체 스킨 불러와서 이미지는 제거
$skin_vars = $oModuleModel->getModuleSkinVars($module_srl);
if($skin_info->extra_vars) {
foreach($skin_info->extra_vars as $vars) {
if($vars->type!='image') continue;
$value = $skin_vars[$vars->name];
if(file_exists($value)) @unlink($value);
}
}
$oModuleController = &getController('module');
$oModuleController->deleteModuleSkinVars($module_srl);
// 등록
$oModuleController->insertModuleSkinVars($module_srl, $obj);
}
$this->setLayoutPath('./common/tpl');
$this->setLayoutFile('default_layout.html');
$this->setTemplatePath('./modules/module/tpl');
$this->setTemplateFile("top_refresh.html");
}
/**
* @brief 모듈 일괄 정리
**/
function procModuleAdminModuleSetup() {
$vars = Context::getRequestVars();
if(!$vars->module_srls) return new Object(-1,'msg_invalid_request');
$module_srls = explode(',',$vars->module_srls);
if(!count($module_srls)) return new Object(-1,'msg_invalid_request');
$oModuleModel = &getModel('module');
$oModuleController= &getController('module');
foreach($module_srls as $module_srl) {
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
$module_info->module_category_srl = $vars->module_category_srl;
$module_info->layout_srl = $vars->layout_srl;
$module_info->skin = $vars->skin;
$module_info->description = $vars->description;
$module_info->header_text = $vars->header_text;
$module_info->footer_text = $vars->footer_text;
$oModuleController->updateModule($module_info);
}
$this->setMessage('success_registed');
}
/**
* @brief 모듈 권한 일괄 정리
**/
function procModuleAdminModuleGrantSetup() {
$module_srls = Context::get('module_srls');
if(!$module_srls) return new Object(-1,'msg_invalid_request');
$modules = explode(',',$module_srls);
if(!count($modules)) return new Object(-1,'msg_invalid_request');
$oModuleController = &getController('module');
$oModuleModel = &getModel('module');
$module_info = $oModuleModel->getModuleInfoByModuleSrl($modules[0]);
$xml_info = $oModuleModel->getModuleActionXml($module_info->module);
$grant_list = $xml_info->grant;
$grant_list->access->default = 'guest';
$grant_list->manager->default = 'manager';
foreach($grant_list as $grant_name => $grant_info) {
// default값을 구함
$default = Context::get($grant_name.'_default');
// -1 = 로그인 사용자만, 0 = 모든 사용자
if(strlen($default)){
$grant->{$grant_name}[] = $default;
continue;
// 특정 그룹 사용자
} else {
$group_srls = Context::get($grant_name);
if($group_srls) {
if(strpos($group_srls,'|@|')!==false) $group_srls = explode('|@|',$group_srls);
elseif(strpos($group_srls,',')!==false) $group_srls = explode(',',$group_srls);
else $group_srls = array($group_srls);
$grant->{$grant_name} = $group_srls;
}
continue;
}
$grant->{$group_srls} = array();
}
// DB에 저장
foreach($modules as $module_srl) {
$args = null;
$args->module_srl = $module_srl;
$output = executeQuery('module.deleteModuleGrants', $args);
if(!$output->toBool()) continue;
// DB에 권한 저장
foreach($grant as $grant_name => $group_srls) {
foreach($group_srls as $key => $val) {
$args = null;
$args->module_srl = $module_srl;
$args->name = $grant_name;
$args->group_srl = $val;
$output = executeQuery('module.insertModuleGrant', $args);
if(!$output->toBool()) return $output;
}
}
}
$this->setMessage('success_registed');
}
/**
* @brief 언어 추가/ 업데이트
**/
function procModuleAdminInsertLang() {
// 언어코드명 가져옴
$site_module_info = Context::get('site_module_info');
$args->site_srl = (int)$site_module_info->site_srl;
$args->name = str_replace(' ','_',Context::get('lang_code'));
if(!$args->name) return new Object(-1,'msg_invalid_request');
// 언어코드가 있는지 조사
$output = executeQueryArray('module.getLang', $args);
if(!$output->toBool()) return $output;
// 있으면 업데이트를 위해 기존 값들을 지움
if($output->data) $output = executeQuery('module.deleteLang', $args);
if(!$output->toBool()) return $output;
// 입력
$lang_supported = Context::get('lang_supported');
foreach($lang_supported as $key => $val) {
$args->lang_code = $key;
$args->value = trim(Context::get($key));
if(!$args->value) {
$args->value = Context::get(strtolower($key));
if(!$args->value) $args->value = $args->name;
}
$output = executeQuery('module.insertLang', $args);
if(!$output->toBool()) return $output;
}
$this->makeCacheDefinedLangCode($args->site_srl);
$this->add('name', $args->name);
}
/**
* @brief 언어 제거
**/
function procModuleAdminDeleteLang() {
// 언어코드명 가져옴
$site_module_info = Context::get('site_module_info');
$args->site_srl = (int)$site_module_info->site_srl;
$args->name = str_replace(' ','_',Context::get('name'));
if(!$args->name) return new Object(-1,'msg_invalid_request');
$output = executeQuery('module.deleteLang', $args);
if(!$output->toBool()) return $output;
$this->makeCacheDefinedLangCode($args->site_srl);
}
/**
* @brief 사용자 정이 언어코드 파일 저장
**/
function makeCacheDefinedLangCode($site_srl = 0) {
// 현재 사이트의 언어파일 가져오기
if(!$site_srl) {
$site_module_info = Context::get('site_module_info');
$args->site_srl = (int)$site_module_info->site_srl;
} else {
$args->site_srl = $site_srl;
}
$output = executeQueryArray('module.getLang', $args);
if(!$output->toBool() || !$output->data) return;
// 캐시 디렉토리 설정
$cache_path = _XE_PATH_.'files/cache/lang_defined/';
if(!is_dir($cache_path)) FileHandler::makeDir($cache_path);
$lang_supported = Context::get('lang_supported');
foreach($lang_supported as $key => $val) {
$fp[$key] = fopen( sprintf('%s/%d.%s.php', $cache_path, $args->site_srl, $key), 'w' );
if(!$fp[$key]) return;
fwrite($fp[$key],"<?php if(!defined('__ZBXE__')) exit(); \r\n");
}
foreach($output->data as $key => $val) {
if($fp[$val->lang_code]) fwrite($fp[$val->lang_code], sprintf('$lang["%s"] = "%s";'."\r\n", $val->name, str_replace('"','\\"',$val->value)));
}
foreach($lang_supported as $key => $val) {
if(!$fp[$key]) continue;
fwrite($fp[$key],"?>");
fclose($fp[$key]);
}
}
}
?>

View file

@ -15,7 +15,8 @@
}
/**
* @brief 위젯의 경로를 구함
* @brief module_srl (,콤마로 연결된) 대상 모듈들의 목록을 return)
* 모듈 선택기(ModuleSelector)에서 사용됨
**/
function getModuleAdminModuleList() {
$args->module_srls = Context::get('module_srls');
@ -33,5 +34,143 @@
$this->add('id', Context::get('id'));
$this->add('module_list', $module_list);
}
/**
* @brief 공통 :: 모듈의 모듈 권한 출력 페이지
* 모듈의 모듈 권한 출력은 모든 모듈에서 module instance를 이용할때 사용할 있음
**/
function getModuleGrantHTML($module_srl, $source_grant_list) {
$oModuleModel = &getModel('module');
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
// access, manager 권한은 가상 권한으로 설정
$grant_list->access->title = Context::getLang('grant_access');
$grant_list->access->default = 'guest';
if(count($source_grant_list)) {
foreach($source_grant_list as $key => $val) {
if(!$val->default) $val->default = 'guest';
if($val->default == 'root') $val->default = 'manager';
$grant_list->{$key} = $val;
}
}
$grant_list->manager->title = Context::getLang('grant_manager');
$grant_list->manager->default = 'manager';
Context::set('grant_list', $grant_list);
// 현재 모듈에 설정된 권한 그룹을 가져옴
$default_grant = array();
$args->module_srl = $module_srl;
$output = executeQueryArray('module.getModuleGrants', $args);
if($output->data) {
foreach($output->data as $val) {
if($val->group_srl == 0) $default_grant[$val->name] = 'all';
else if($val->group_srl == -1) $default_grant[$val->name] = 'member';
else if($val->group_srl == -2) $default_grant[$val->name] = 'site';
else {
$selected_group[$val->name][] = $val->group_srl;
$default_grant[$val->name] = 'group';
}
}
}
Context::set('selected_group', $selected_group);
Context::set('default_grant', $default_grant);
// 현재 모듈에 설정된 관리자 아이디를 추출
$admin_member = $oModuleModel->getAdminId($module_srl);
Context::set('admin_member', $admin_member);
// 그룹을 가져옴
$oMemberModel = &getModel('member');
$group_list = $oMemberModel->getGroups($module_info->site_srl);
Context::set('group_list', $group_list);
// grant 정보를 추출
$oTemplate = &TemplateHandler::getInstance();
return $oTemplate->compile($this->module_path.'tpl', 'module_grants');
}
/**
* @brief 공통 :: 모듈의 스킨 설정 출력 페이지
**/
function getModuleSkinHTML($module_srl) {
$oModuleModel = &getModel('module');
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
if(!$module_info) return;
$skin = $module_info->skin;
$module_path = './modules/'.$module_info->module;
// 스킨의 XML 정보를 구함
$skin_info = $oModuleModel->loadSkinInfo($module_path, $skin);
// DB에 설정된 스킨 정보를 구함
$skin_vars = $oModuleModel->getModuleSkinVars($module_srl);
if(count($skin_info->extra_vars)) {
foreach($skin_info->extra_vars as $key => $val) {
$group = $val->group;
$name = $val->name;
$type = $val->type;
if($skin_vars[$name]) $value = $skin_vars[$name]->value;
else $value = '';
if($type=="checkbox" && !$value) $value = array();
$skin_info->extra_vars[$key]->value= $value;
}
}
Context::set('module_info', $module_info);
Context::set('mid', $module_info->mid);
Context::set('skin_info', $skin_info);
Context::set('skin_vars', $skin_vars);
$oTemplate = &TemplateHandler::getInstance();
return $oTemplate->compile($this->module_path.'tpl', 'skin_config');
}
/**
* @brief 특정 언어 코드에 대한 값들을 가져오기
* lang_code를 직접 기입하면 해당 언어코드에 대해서만 가져오고 값이 없으면 $name을 그대로 return
**/
function getLangCode($site_srl, $name) {
$lang_supported = Context::get('lang_supported');
if(substr($name,0,12)=='$user_lang->') {
$args->site_srl = (int)$site_srl;
$args->name = substr($name,12);
$output = executeQueryArray('module.getLang', $args);
if($output->data) {
foreach($output->data as $key => $val) {
$selected_lang[$val->lang_code] = $val->value;
}
}
} else {
$tmp = unserialize($name);
if($tmp) {
$selected_lang = array();
$rand_name = $tmp[Context::getLangType()];
if(!$rand_name) $rand_name = array_shift(unserialize($name));
foreach($tmp as $key => $val) $selected_lang[$key] = $tmp[$key]?$tmp[$key]:$rand_name;
}
}
$output = array();
foreach($lang_supported as $key => $val) {
$output[$key] = $selected_lang[$key]?$selected_lang[$key]:$name;
}
return $output;
}
/**
* @brief 모듈 언어를 ajax로 요청시 return
**/
function getModuleAdminLangCode() {
$name = Context::get('name');
if(!$name) return new Object(-1,'msg_invalid_request');
$site_module_info = Context::get('site_module_info');
$this->add('name', $name);
$output = $this->getLangCode($site_module_info->site_srl, '$user_lang->'.$name);
$this->add('langs', $output);
}
}
?>

View file

@ -98,81 +98,126 @@
}
/**
* @brief 모듈 선택
* @brief 모듈 설정 일괄 적용
**/
function dispModuleAdminSelectList() {
function dispModuleAdminModuleSetup() {
$module_srls = Context::get('module_srls');
$modules = explode(',',$module_srls);
if(!count($modules)) if(!$module_srls) return new Object(-1,'msg_invalid_request');
$oModuleModel = &getModel('module');
$module_info = $oModuleModel->getModuleInfoByModuleSrl($modules[0]);
// virtual site의 개수를 추출
$output = executeQuery('module.getSiteCount');
$site_count = $output->data->count;
Context::set('site_count', $site_count);
// 모듈의 스킨 목록을 구함
$skin_list = $oModuleModel->getSkins('./modules/'.$module_info->module);
Context::set('skin_list',$skin_list);
// 사이트 검색어 변수 설정
$site_keyword = Context::get('site_keyword');
// 레이아웃 목록을 구해옴
$oLayoutMode = &getModel('layout');
$layout_list = $oLayoutMode->getLayoutList();
Context::set('layout_list', $layout_list);
// 사이트 검색어가 없으면 현재 가상 사이트의 정보를 설정
$args = null;
$logged_info = Context::get('logged_info');
if($logged_info->is_admin == 'Y') {
$query_id = 'module.getSiteModules';
$module_category_exists = false;
if(!$site_keyword) {
$site_module_info = Context::get('site_module_info');
if($site_module_info && $logged_info->is_admin != 'Y') {
$site_keyword = $site_module_info->domain;
$args->site_srl = (int)$site_module_info->site_srl;
Context::set('site_keyword', $site_keyword);
} else {
$query_id = 'module.getDefaultModules';
$args->site_srl = 0;
$module_category_exists = true;
}
// 사이트 검색어가 있으면 해당 사이트(들)의 정보를 추출
} else {
$args->site_keyword = $site_keyword;
}
} else {
$query_id = 'module.getSiteModules';
$site_module_info = Context::get('site_module_info');
$args->site_srl = (int)$site_module_info->site_srl;
}
// 지정된 사이트(혹은 전체)의 module 목록을 구함
$output = executeQueryArray($query_id, $args);
$category_list = $mid_list = array();
if(count($output->data)) {
foreach($output->data as $key => $val) {
$module = trim($val->module);
if(!$module) continue;
$category = $val->category;
$obj = null;
$obj->module_srl = $val->module_srl;
$obj->browser_title = $val->browser_title;
$mid_list[$module]->list[$category][$val->mid] = $obj;
}
}
$selected_module = Context::get('selected_module');
if(count($mid_list)) {
foreach($mid_list as $module => $val) {
if(!$selected_module) $selected_module = $module;
$xml_info = $oModuleModel->getModuleInfoXml($module);
$mid_list[$module]->title = $xml_info->title;
}
}
Context::set('mid_list', $mid_list);
Context::set('selected_module', $selected_module);
Context::set('selected_mids', $mid_list[$selected_module]->list);
Context::set('module_category_exists', $module_category_exists);
// 모듈 카테고리 목록을 구함
$module_category = $oModuleModel->getModuleCategories();
Context::set('module_category', $module_category);
// 레이아웃을 팝업으로 지정
$this->setLayoutFile('popup_layout');
// 템플릿 파일 지정
$this->setTemplateFile('module_selector');
$this->setTemplateFile('module_setup');
}
/**
* @brief 모듈 추가 설정 일괄 적용
**/
function dispModuleAdminModuleAdditionSetup() {
$module_srls = Context::get('module_srls');
$modules = explode(',',$module_srls);
if(!count($modules)) if(!$module_srls) return new Object(-1,'msg_invalid_request');
// content는 다른 모듈에서 call by reference로 받아오기에 미리 변수 선언만 해 놓음
$content = '';
// 추가 설정을 위한 트리거 호출
// 게시판 모듈이지만 차후 다른 모듈에서의 사용도 고려하여 trigger 이름을 공용으로 사용할 수 있도록 하였음
$output = ModuleHandler::triggerCall('module.dispAdditionSetup', 'before', $content);
$output = ModuleHandler::triggerCall('module.dispAdditionSetup', 'after', $content);
Context::set('setup_content', $content);
// 레이아웃을 팝업으로 지정
$this->setLayoutFile('popup_layout');
// 템플릿 파일 지정
$this->setTemplateFile('module_addition_setup');
}
/**
* @brief 모듈 권한 설정 일괄 적용
**/
function dispModuleAdminModuleGrantSetup() {
$module_srls = Context::get('module_srls');
$modules = explode(',',$module_srls);
if(!count($modules)) if(!$module_srls) return new Object(-1,'msg_invalid_request');
$oModuleModel = &getModel('module');
$module_info = $oModuleModel->getModuleInfoByModuleSrl($modules[0]);
$xml_info = $oModuleModel->getModuleActionXml($module_info->module);
$source_grant_list = $xml_info->grant;
// access, manager 권한은 가상 권한으로 설정
$grant_list->access->title = Context::getLang('grant_access');
$grant_list->access->default = 'guest';
if(count($source_grant_list)) {
foreach($source_grant_list as $key => $val) {
if(!$val->default) $val->default = 'guest';
if($val->default == 'root') $val->default = 'manager';
$grant_list->{$key} = $val;
}
}
$grant_list->manager->title = Context::getLang('grant_manager');
$grant_list->manager->default = 'manager';
Context::set('grant_list', $grant_list);
// 그룹을 가져옴
$oMemberModel = &getModel('member');
$group_list = $oMemberModel->getGroups($module_info->site_srl);
Context::set('group_list', $group_list);
// 레이아웃을 팝업으로 지정
$this->setLayoutFile('popup_layout');
// 템플릿 파일 지정
$this->setTemplateFile('module_grant_setup');
}
/**
* @brief 언어 코드
**/
function dispModuleAdminLangcode() {
// 현재 사이트의 언어파일 가져오기
$site_module_info = Context::get('site_module_info');
$args->site_srl = (int)$site_module_info->site_srl;
$args->sort_index = 'name';
$args->order_type = 'asc';
$output = executeQueryArray('module.getLangList', $args);
Context::set('lang_list', $output->data);
// 현재 선택된 언어 가져오기
$name = Context::get('name');
if($name) {
$oModuleAdminModel = &getAdminModel('module');
Context::set('selected_lang', $oModuleAdminModel->getLangCode($args->site_srl,'$user_lang->'.$name));
}
// 레이아웃을 팝업으로 지정
$this->setLayoutFile('popup_layout');
// 템플릿 파일 지정
$this->setTemplateFile('module_langcode');
}
}

View file

@ -13,10 +13,6 @@
function moduleInstall() {
// action forward에 등록 (관리자 모드에서 사용하기 위함)
$oModuleController = &getController('module');
$oModuleController->insertActionForward('module', 'view', 'dispModuleAdminContent');
$oModuleController->insertActionForward('module', 'view', 'dispModuleAdminList');
$oModuleController->insertActionForward('module', 'view', 'dispModuleAdminCategory');
$oModuleController->insertActionForward('module', 'view', 'dispModuleAdminInfo');
$oDB = &DB::getInstance();
@ -41,6 +37,17 @@
// 2008. 11. 13 modules 의 mid를 unique를 없애고 site_srl을 추가 후에 site_srl + mid unique index
if(!$oDB->isIndexExists('modules',"idx_site_mid")) return true;
// 모든 모듈의 권한/스킨정보를 grants 테이블로 이전시키는 업데이트
if($oDB->isColumnExists('modules', 'grants')) return true;
// 모든 모듈의 권한/스킨정보를 grants 테이블로 이전시키는 업데이트
if(!$oDB->isColumnExists('sites', 'default_language')) return true;
// extra_vars* 컬럼 제거
for($i=1;$i<=20;$i++) {
if($oDB->isColumnExists("documents","extra_vars".$i)) return true;
}
return false;
}
@ -109,25 +116,127 @@
$oDB->addColumn('modules','site_srl','number',11,0,true);
$oDB->addIndex("modules","idx_site_mid", array("site_srl","mid"),true);
}
// document 확장변수의 확장을 위한 처리
if(!$oDB->isTableExists('document_extra_vars')) $oDB->createTableByXmlFile('./modules/document/schemas/document_extra_vars.xml');
if(!$oDB->isTableExists('document_extra_keys')) $oDB->createTableByXmlFile('./modules/document/schemas/document_extra_keys.xml');
// 모든 모듈의 권한, 스킨정보, 확장정보, 관리자 아이디를 grants 테이블로 이전시키는 업데이트
if($oDB->isColumnExists('modules', 'grants')) {
$oModuleController = &getController('module');
$oDocumentController = &getController('document');
// 현재 시스템 언어 코드값을 가져옴
$lang_code = Context::getLangType();
// 모든 모듈의 module_info를 가져옴
$output = executeQueryArray('module.getModuleInfos');
if(count($output->data)) {
foreach($output->data as $module_info) {
// 모듈들의 권한/ 확장변수(게시글 확장 포함)/ 스킨 변수/ 최고관리권한 정보 분리
$module_srl = trim($module_info->module_srl);
// 권한 등록
$grants = unserialize($module_info->grants);
if($grants) $oModuleController->insertModuleGrants($module_srl, $grants);
// 스킨 변수 등록
$skin_vars = unserialize($module_info->skin_vars);
if($skin_vars) $oModuleController->insertModuleSkinVars($module_srl, $skin_vars);
// 최고 관리자 아이디 등록
$admin_id = trim($module_info->admin_id);
if($admin_id && $admin_id != 'Array') {
$admin_ids = explode(',',$admin_id);
if(count($admin_id)) {
foreach($admin_ids as $admin_id) {
$oModuleController->insertAdminId($module_srl, $admin_id);
}
}
}
// 모듈별 추가 설정 저장 (기본 modules에 없던 컬럼 데이터)
$extra_vars = unserialize($module_info->extra_vars);
$document_extra_keys = null;
if($extra_vars->extra_vars && count($extra_vars->extra_vars)) {
$document_extra_keys = $extra_vars->extra_vars;
unset($extra_vars->extra_vars);
}
if($extra_vars) $oModuleController->insertModuleExtraVars($module_srl, $extra_vars);
/**
* 게시글 확장변수 이동 (documents모듈에서 해야 하지만 modules 테이블의 추가 변수들이 정리되기에 여기서 )
**/
// 플래닛모듈의 경우 직접 추가 변수 입력
if($module_info->module == 'planet') {
if(!$document_extra_keys || !is_array($document_extra_keys)) $document_extra_keys = array();
$planet_extra_keys->name = 'postscript';
$planet_extra_keys->type = 'text';
$planet_extra_keys->is_required = 'N';
$planet_extra_keys->search = 'N';
$planet_extra_keys->default = '';
$planet_extra_keys->desc = '';
$document_extra_keys[20] = $planet_extra_keys;
}
// 게시글 확장변수 키 등록
if(count($document_extra_keys)) {
foreach($document_extra_keys as $var_idx => $val) {
$oDocumentController->insertDocumentExtraKey($module_srl, $var_idx, $val->name, $val->type, $val->is_required, $val->search, $val->default, $val->desc);
}
// 확장변수가 존재하면 확장변수 가져오기
$doc_args = null;
$doc_args->module_srl = $module_srl;
$doc_args->list_count = 100;
$doc_args->sort_index = 'list_order';
$doc_args->order_type = 'asc';
$doc_args->page = 1;
$output = executeQueryArray('document.getDocumentList', $doc_args);
if($output->toBool() && $output->data && count($output->data)) {
foreach($output->data as $document) {
if(!$document) continue;
foreach($document as $key => $var) {
if(strpos($key,'extra_vars')!==0 || !trim($var) || $var== 'N;') continue;
$var_idx = str_replace('extra_vars','',$key);
$oDocumentController->insertDocumentExtraVar($module_srl, $document->document_srl, $var_idx, $var, $lang_code);
}
}
$doc_args->page++;
}
}
// 해당 모듈들의 추가 변수들 제거
$module_info->grant = null;
$module_info->extra_vars = null;
$module_info->skin_vars = null;
$module_info->admin_id = null;
executeQuery('module.updateModule', $module_info);
}
}
// 각종 column drop
$oDB->dropColumn('modules','grants');
$oDB->dropColumn('modules','admin_id');
$oDB->dropColumn('modules','skin_vars');
$oDB->dropColumn('modules','extra_vars');
}
// 모든 모듈의 권한/스킨정보를 grants 테이블로 이전시키는 업데이트
if(!$oDB->isColumnExists('sites', 'default_language')) {
$oDB->addColumn('sites','default_language','varchar',255,0,false);
}
// extra_vars* 컬럼 제거
for($i=1;$i<=20;$i++) {
if(!$oDB->isColumnExists("documents","extra_vars".$i)) continue;
$oDB->dropColumn('documents','extra_vars'.$i);
}
return new Object(0, 'success_updated');
}
/**
* @brief Action중 Admin이 들어갔을 경우 권한 체크
**/
function checkAdminActionGrant() {
if(!Context::get('is_logged')) return false;
$logged_info = Context::get('logged_info');
if($logged_info->is_admin=='Y') return true;
$oModuleModel = &getModel('module');
if($oModuleModel->isSiteAdmin()) return true;
return false;
}
/**
* @brief 캐시 파일 재생성
**/
@ -142,7 +251,7 @@
FileHandler::removeFilesInDir("./files/cache/db");
// 기타 캐시 삭제
FileHandler::removeFilesInDir("./files/cache/tmp");
FileHandler::removeDir("./files/cache/tmp");
}
}
?>

View file

@ -129,11 +129,46 @@
return executeQuery('module.updateSite', $args);
}
/**
* @brief 모듈 정보 정리
**/
function arrangeModuleInfo(&$args, &$extra_vars) {
// 불필요한 내용 제거
unset($args->body);
unset($args->act);
unset($args->page);
// mid값 검사
if(!ereg("^[a-zA-Z][a-zA-Z0-9_]+", $args->mid)) return new Object(-1, 'msg_limit_mid');
// 변수를 검사 (modules의 기본 변수와 그렇지 않은 변수로 분리)
$extra_vars = clone($args);
unset($extra_vars->module_srl);
unset($extra_vars->module);
unset($extra_vars->module_category_srl);
unset($extra_vars->layout_srl);
unset($extra_vars->menu_srl);
unset($extra_vars->site_srl);
unset($extra_vars->mid);
unset($extra_vars->skin);
unset($extra_vars->browser_title);
unset($extra_vars->description);
unset($extra_vars->is_default);
unset($extra_vars->content);
unset($extra_vars->open_rss);
unset($extra_vars->header_text);
unset($extra_vars->footer_text);
$args = delObjectVars($args, $extra_vars);
return new Object();
}
/**
* @brief 모듈 입력
**/
function insertModule($args) {
if(!ereg("^[a-zA-Z][a-zA-Z0-9_]+", $args->mid)) return new Object(-1, 'msg_limit_mid');
$output = $this->arrangeModuleInfo($args, $extra_vars);
if(!$output->toBool()) return $output;
// begin transaction
$oDB = &DB::getInstance();
@ -147,23 +182,32 @@
return new Object(-1, 'msg_module_name_exists');
}
// module model 객체 생성
$oModuleModel = &getModel('module');
// is_default 의 값에 따라서 처리
if($args->site_srl!=0) $args->is_default = 'N';
else {
if($args->is_default!='Y') $args->is_default = 'N';
else $this->clearDefaultModule();
}
// 선택된 스킨정보에서 colorset을 구함
$oModuleModel = &getModel('module');
$module_path = ModuleHandler::getModulePath($args->module);
$skin_info = $oModuleModel->loadSkinInfo($module_path, $args->skin);
$skin_vars->colorset = $skin_info->colorset[0]->name;
// 변수 정리후 query 실행
if(!$args->module_srl) $args->module_srl = getNextSequence();
$args->skin_vars = serialize($skin_vars);
// 모듈 등록
$output = executeQuery('module.insertModule', $args);
if(!$output->toBool()) {
$oDB->rollback();
return $output;
}
// 모듈 추가 변수 등록
$this->insertModuleExtraVars($args->module_srl, $extra_vars);
// commit
$oDB->commit();
@ -175,6 +219,9 @@
* @brief 모듈의 정보를 수정
**/
function updateModule($args) {
$output = $this->arrangeModuleInfo($args, $extra_vars);
if(!$output->toBool()) return $output;
// begin transaction
$oDB = &DB::getInstance();
$oDB->begin();
@ -182,7 +229,7 @@
$oModuleModel = &getModel('module');
$module_info = $oModuleModel->getModuleInfoByModuleSrl($args->module_srl);
if(!$args->site_srl) $args->site_srl = (int)$module_info->site_srl;
$args->site_srl = (int)$module_info->site_srl;
if(!$args->browser_title) $args->browser_title = $module_info->browser_title;
$output = executeQuery('module.isExistsModuleName', $args);
@ -191,20 +238,25 @@
return new Object(-1, 'msg_module_name_exists');
}
// is_default 의 값에 따라서 처리
if($args->site_srl!=0) $args->is_default = 'N';
else {
if($args->is_default!='Y') $args->is_default = 'N';
else $this->clearDefaultModule();
}
$output = executeQuery('module.updateModule', $args);
if(!$output->toBool()) {
$oDB->rollback();
return $output;
}
$output->add('module_srl',$args->module_srl);
if(!$output->toBool()) {
$oDB->rollback();
return $output;
}
// 모듈 추가 변수 등록
$this->insertModuleExtraVars($args->module_srl, $extra_vars);
$oDB->commit();
$output->add('module_srl',$args->module_srl);
return $output;
}
@ -233,6 +285,18 @@
return $output;
}
// 권한 정보 삭제
$this->deleteModuleGrants($module_srl);
// 스킨 정보 삭제
$this->deleteModuleSkinVars($module_srl);
// 모듈 추가 변수 삭제
$this->deleteModuleExtraVars($module_srl);
// 모듈 관리자 제거
$this->deleteAdminId($module_srl);
// trigger 호출 (after)
if($output->toBool()) {
$trigger_output = ModuleHandler::triggerCall('module.deleteModule', 'after', $trigger_obj);
@ -261,18 +325,6 @@
return $output;
}
/**
* @brief 모듈의 권한 정보 변경
**/
function updateModuleGrant($module_srl, $grants) {
$args->module_srl = $module_srl;
$args->grants = $grants;
$output = executeQuery('module.updateModuleGrant', $args);
if(!$output->toBool()) return $output;
return $output;
}
/**
* @brief 모든 모듈의 is_default값을 N 으로 세팅 (기본 모듈 해제)
**/
@ -284,14 +336,14 @@
}
/**
* @brief 지정된 menu_srl에 속한 mid menu_srl 변경
* @brief 지정된 menu_srl에 속한 mid menu_srl 변경
**/
function updateModuleMenu($args) {
return executeQuery('module.updateModuleMenu', $args);
}
/**
* @brief 지정된 menu_srl에 속한 mid layout_srl을 변경
* @brief 지정된 menu_srl에 속한 mid layout_srl을 변경
**/
function updateModuleLayout($layout_srl, $menu_srl_list) {
if(!count($menu_srl_list)) return;
@ -332,5 +384,267 @@
}
return new Object();
}
/**
* @brief 특정 모듈에 관리자 아이디 지정
**/
function insertAdminId($module_srl, $admin_id) {
$oMemberModel = &getModel('member');
$member_info = $oMemberModel->getMemberInfoByUserID($admin_id);
if(!$member_info->member_srl) return;
$args->module_srl = $module_srl;
$args->member_srl = $member_info->member_srl;
return executeQuery('module.insertAdminId', $args);
}
/**
* @brief 특정 모듈의 관리자 아이디 제거
**/
function deleteAdminId($module_srl, $admin_id = '') {
$args->module_srl = $module_srl;
if($admin_id) {
$oMemberModel = &getModel('member');
$member_info = $oMemberModel->getMemberInfoByUserID($admin_id);
if($member_info->member_srl) $args->member_srl = $member_info->member_srl;
}
return executeQuery('module.deleteAdminId', $args);
}
/**
* @brief 특정 모듈에 스킨 변수 등록
**/
function insertModuleSkinVars($module_srl, $obj) {
$this->deleteModuleSkinVars($module_srl);
if(!$obj || !count($obj)) return;
$args->module_srl = $module_srl;
foreach($obj as $key => $val) {
$args->name = trim($key);
$args->value = trim($val);
if(!$args->name || !$args->value) continue;
executeQuery('module.insertModuleSkinVars', $args);
}
}
/**
* @brief 특정 모듈의 스킨 변수 제거
**/
function deleteModuleSkinVars($module_srl) {
$args->module_srl = $module_srl;
return executeQuery('module.deleteModuleSkinVars', $args);
}
/**
* @brief 특정 모듈에 확장 변수 등록
**/
function insertModuleExtraVars($module_srl, $obj) {
$this->deleteModuleExtraVars($module_srl);
if(!$obj || !count($obj)) return;
foreach($obj as $key => $val) {
$args = null;
$args->module_srl = $module_srl;
$args->name = trim($key);
$args->value = trim($val);
if(!$args->name || !$args->value) continue;
executeQuery('module.insertModuleExtraVars', $args);
}
}
/**
* @brief 특정 모듈의 확장 변수 제거
**/
function deleteModuleExtraVars($module_srl) {
$args->module_srl = $module_srl;
return executeQuery('module.deleteModuleExtraVars', $args);
}
/**
* @brief 특정 모듈에 권한 등록
**/
function insertModuleGrants($module_srl, $obj) {
$this->deleteModuleGrants($module_srl);
if(!$obj || !count($obj)) return;
foreach($obj as $name => $val) {
if(!$val || !count($val)) continue;
foreach($val as $group_srl) {
$args = null;
$args->module_srl = $module_srl;
$args->name = $name;
$args->group_srl = trim($group_srl);
if(!$args->name || !$args->group_srl) continue;
executeQuery('module.insertModuleGrant', $args);
}
}
}
/**
* @brief 특정 모듈의 권한 제거
**/
function deleteModuleGrants($module_srl) {
$args->module_srl = $module_srl;
return executeQuery('module.deleteModuleGrants', $args);
}
/**
* @brief 사용자 정의 언어 변경
**/
function replaceDefinedLangCode(&$output) {
$output = preg_replace_callback('!\$user_lang->([a-z0-9\_]+)!is', array($this,'_replaceLangCode'), $output);
}
function _replaceLangCode($matches) {
static $lang = null;
if(is_null($lang)) {
$site_module_info = Context::get('site_module_info');
$cache_file = sprintf('%sfiles/cache/lang_defined/%d.%s.php', _XE_PATH_, $site_module_info->site_srl, Context::getLangType());
if(!file_exists($cache_file)) {
$lang = array();
return;
}
require_once($cache_file);
}
if(!Context::get($matches[1]) && $lang[$matches[1]]) return $lang[$matches[1]];
return $matches[0];
}
/**
* @brief 파일박스에 파일 추가 업데이트
**/
function procModuleFileBoxAdd(){
$logged_info = Context::get('logged_info');
if($logged_info->is_admin !='Y' && !$logged_info->is_site_admin) return new Object(-1, 'msg_not_permitted');
$vars = Context::gets('comment','addfile','filter');
$module_filebox_srl = Context::get('module_filebox_srl');
$ext = strtolower(substr(strrchr($vars->addfile['name'],'.'),1));
$vars->ext = $ext;
if($vars->filter) $filter = explode(',',$vars->filter);
if(!in_array($ext,$filter)) return new Object(-1, 'msg_error_occured');
$vars->member_srl = $logged_info->member_srl;
// update
if($module_filebox_srl > 0){
$vars->module_filebox_srl = $module_filebox_srl;
$output = $this->updateModuleFileBox($vars);
// insert
}else{
if(!Context::isUploaded()) return new Object(-1, 'msg_error_occured');
$addfile = Context::get('addfile');
if(!is_uploaded_file($addfile['tmp_name'])) return new Object(-1, 'msg_error_occured');
if($vars->addfile['error'] != 0) return new Object(-1, 'msg_error_occured');
$output = $this->insertModuleFileBox($vars);
}
$url = getUrl('','module','module','act','dispModuleFileBox','input',Context::get('input'),'filter',$vars->filter);
$url = html_entity_decode($url);
$vars = Context::set('url',$url);
$this->setTemplatePath($this->module_path.'tpl');
$this->setTemplateFile('move_filebox_list');
}
/**
* @brief 파일박스에 파일 업데이트
**/
function updateModuleFileBox($vars){
// have file
if($vars->addfile['tmp_name'] && is_uploaded_file($vars->addfile['tmp_name'])){
$oModuleModel = &getModel('module');
$output = $oModuleModel->getModuleFileBox($vars->module_filebox_srl);
FileHandler::removeFile($output->data->filename);
$path = $oModuleModel->getModuleFileBoxPath($vars->module_filebox_srl);
FileHandler::makeDir($path);
$save_filename = sprintf('%s%s.%s',$path, $vars->module_filebox_srl, $ext);
$tmp = $vars->addfile['tmp_name'];
if(!@move_uploaded_file($tmp, $save_filename)) {
return false;
}
$args->fileextension = strtolower(substr(strrchr($vars->addfile['name'],'.'),1));
$args->filename = $save_filename;
$args->filesize = $vars->addfile['size'];
}
$args->module_filebox_srl = $vars->module_filebox_srl;
$args->comment = $vars->comment;
return executeQuery('module.updateModuleFileBox', $vars);
}
/**
* @brief 파일박스에 파일 추가
**/
function insertModuleFileBox($vars){
// set module_filebox_srl
$vars->module_filebox_srl = getNextSequence();
// get file path
$oModuleModel = &getModel('module');
$path = $oModuleModel->getModuleFileBoxPath($vars->module_filebox_srl);
FileHandler::makeDir($path);
$save_filename = sprintf('%s%s.%s',$path, $vars->module_filebox_srl, $vars->ext);
$tmp = $vars->addfile['tmp_name'];
// upload
if(!@move_uploaded_file($tmp, $save_filename)) {
return false;
}
// insert
$args->module_filebox_srl = $vars->module_filebox_srl;
$args->member_srl = $vars->member_srl;
$args->comment = $vars->comment;
$args->filename = $save_filename;
$args->fileextension = strtolower(substr(strrchr($vars->addfile['name'],'.'),1));
$args->filesize = $vars->addfile['size'];
$output = executeQuery('module.insertModuleFileBox', $args);
return $output;
}
/**
* @brief 파일박스에 파일 삭제
**/
function procModuleFileBoxDelete(){
$logged_info = Context::get('logged_info');
if($logged_info->is_admin !='Y' && !$logged_info->is_site_admin) return new Object(-1, 'msg_not_permitted');
$module_filebox_srl = Context::get('module_filebox_srl');
if(!$module_filebox_srl) return new Object(-1, 'msg_invalid_request');
$vars->module_filebox_srl = $module_filebox_srl;
$output = $this->deleteModuleFileBox($vars);
if(!$output->toBool()) return $output;
}
function deleteModuleFileBox($vars){
// delete real file
$oModuleModel = &getModel('module');
$output = $oModuleModel->getModuleFileBox($vars->module_filebox_srl);
FileHandler::removeFile($output->data->filename);
$args->module_filebox_srl = $vars->module_filebox_srl;
return executeQuery('module.deleteModuleFileBox', $args);
}
}
?>

View file

@ -13,33 +13,6 @@
function init() {
}
/**
* @brief document_srl로 모듈의 정보르 구함
* 경우는 캐시파일을 이용할 수가 없음
**/
function getModuleInfoByDocumentSrl($document_srl) {
$args->document_srl = $document_srl;
$output = executeQuery('module.getModuleInfoByDocument', $args);
return $this->arrangeModuleInfo($output->data);
}
/**
* @brief domain에 따른 기본 mid를 구함
**/
function getDefaultMid() {
// domain 으로 등록된 virtual site가 있는지 확인
$url_info = parse_url(Context::getRequestUri());
$hostname = $url_info['host'];
$path = preg_replace('/\/$/','',$url_info['path']);
$sites_args->domain = sprintf('%s%s%s', $hostname, $url_info['port']&&$url_info['port']!=80?':'.$url_info['port']:'',$path);
$output = executeQuery('module.getSiteDefaultInfo', $sites_args);
if(!$output->toBool() || !$output->data) $output = executeQuery('module.getDefaultMidInfo');
$module_info = $output->data;
if(!$module_info->module_srl && $module_info->data[0]) $module_info = $module_info->data[0];
return $this->arrangeModuleInfo($module_info);
}
/**
* @brief site 정보를 구함
**/
@ -55,6 +28,39 @@
return $output->data;
}
/**
* @brief document_srl로 모듈의 정보르 구함
* 경우는 캐시파일을 이용할 수가 없음
**/
function getModuleInfoByDocumentSrl($document_srl) {
$args->document_srl = $document_srl;
$output = executeQuery('module.getModuleInfoByDocument', $args);
return $this->addModuleExtraVars($output->data);
}
/**
* @brief domain에 따른 기본 mid를 구함
**/
function getDefaultMid() {
// domain 으로 등록된 virtual site가 있는지 확인
$url_info = parse_url(Context::getRequestUri());
$hostname = $url_info['host'];
$path = preg_replace('/\/$/','',$url_info['path']);
$sites_args->domain = sprintf('%s%s%s', $hostname, $url_info['port']&&$url_info['port']!=80?':'.$url_info['port']:'',$path);
$output = executeQuery('module.getSiteDefaultInfo', $sites_args);
// virtual site를 못 찾으면 가장 기본 모듈 추출
if(!$output->toBool() || !$output->data) {
$args->site_srl = 0;
$output = executeQuery('module.getDefaultMidInfo', $args);
}
$module_info = $output->data;
if(!$module_info->module_srl) return;
if(is_array($module_info) && $module_info->data[0]) $module_info = $module_info[0];
return $this->addModuleExtraVars($module_info);
}
/**
* @brief mid로 모듈의 정보를 구함
**/
@ -64,7 +70,7 @@
$output = executeQuery('module.getMidInfo', $args);
$module_info = $output->data;
if(!$module_info->module_srl && $module_info->data[0]) $module_info = $module_info->data[0];
return $this->arrangeModuleInfo($module_info);
return $this->addModuleExtraVars($module_info);
}
/**
@ -75,8 +81,8 @@
$args->module_srl = $module_srl;
$output = executeQuery('module.getMidInfo', $args);
if(!$output->data) return;
return $this->arrangeModuleInfo($output->data);
$module_info = $this->addModuleExtraVars($output->data);
return $module_info;
}
/**
@ -91,9 +97,9 @@
$modules = array();
for($i=0;$i<$count;$i++) {
$modules[] = $this->arrangeModuleInfo($output->data[$i]);
$modules[] = $output->data[$i];
}
return $modules;
return $this->addModuleExtraVars($modules);
}
/**
@ -104,7 +110,38 @@
$args->module_srls = $module_srls;
$output = executeQueryArray('module.getModulesInfo', $args);
if(!$output->toBool()) return;
return $output->data;
return $this->addModuleExtraVars($output->data);
}
/**
* @brief 모듈의 기본 정보에 추가 변수 구함
**/
function addModuleExtraVars($module_info) {
// 1개 이상의 모듈정보를 요청받아도 처리 가능하도록
if(!is_array($module_info)) $target_module_info = array($module_info);
else $target_module_info = $module_info;
// 모듈 번호를 구함
$module_srls = array();
foreach($target_module_info as $key => $val) {
$module_srl = $val->module_srl;
if(!$module_srl) continue;
$module_srls[] = $val->module_srl;
}
// 모듈의 추가정보/ 스킨 정보를 추출
$extra_vars = $this->getModuleExtraVars($module_srls);
if(!count($module_srls) || !count($extra_vars)) return $module_info;
foreach($target_module_info as $key => $val) {
if(!$extra_vars[$val->module_srl] || !count($extra_vars[$val->module_srl])) continue;
foreach($extra_vars[$val->module_srl] as $k => $v) {
if($target_module_info[$key]->{$k}) continue;
$target_module_info[$key]->{$k} = $v;
}
}
if(is_array($module_info)) return $target_module_info;
return $target_module_info[0];
}
/**
@ -150,47 +187,6 @@
return $module_srl_list;
}
/**
* @brief DB에서 가져온 모듈 정보에서 grant, extraVar등의 정리
**/
function arrangeModuleInfo($source_module_info) {
if(!$source_module_info || !is_object($source_module_info) ) return;
// serialize되어 있는 변수들 추출
$extra_vars = $source_module_info->extra_vars;
$skin_vars = $source_module_info->skin_vars;
$grants = $source_module_info->grants;
$admin_id = $source_module_info->admin_id;
unset($source_module_info->extra_vars);
unset($source_module_info->skin_vars);
unset($source_module_info->grants);
unset($source_module_info->admin_id);
$module_info = clone($source_module_info);
// extra_vars의 정리
if($extra_vars) {
$extra_vars = unserialize($extra_vars);
if(is_array($extra_vars) || is_object($extra_vars)) foreach($extra_vars as $key => $val) if(!$module_info->{$key}) $module_info->{$key} = $val;
}
// skin_vars의 정리
if($skin_vars) {
$skin_vars = unserialize($skin_vars);
foreach($skin_vars as $key => $val) if(!$module_info->{$key}) $module_info->{$key} = $val;
}
// 권한의 정리
if($grants) $module_info->grants = unserialize($grants);
// 관리자 아이디의 정리
if($admin_id) $module_info->admin_id = explode(',',$admin_id);
else $module_info->admin_id = array();
return $module_info;
}
/**
* @brief act 값에 의한 forward 값을 구함
**/
@ -223,6 +219,230 @@
return $output->data;
}
/**
* @brief 모듈의 conf/info.xml 읽어서 정보를 구함
**/
function getModuleInfoXml($module) {
// 요청된 모듈의 경로를 구한다. 없으면 return
$module_path = ModuleHandler::getModulePath($module);
if(!$module_path) return;
// 현재 선택된 모듈의 스킨의 정보 xml 파일을 읽음
$xml_file = sprintf("%s/conf/info.xml", $module_path);
if(!file_exists($xml_file)) return;
$oXmlParser = new XmlParser();
$tmp_xml_obj = $oXmlParser->loadXmlFile($xml_file);
$xml_obj = $tmp_xml_obj->module;
if(!$xml_obj) return;
// 모듈 정보
if($xml_obj->version && $xml_obj->attrs->version == '0.2') {
// module format 0.2
$module_info->title = $xml_obj->title->body;
$module_info->description = $xml_obj->description->body;
$module_info->version = $xml_obj->version->body;
$module_info->homepage = $xml_obj->link->body;
$module_info->category = $xml_obj->category->body;
if(!$module_info->category) $module_info->category = 'service';
sscanf($xml_obj->date->body, '%d-%d-%d', $date_obj->y, $date_obj->m, $date_obj->d);
$module_info->date = sprintf('%04d%02d%02d', $date_obj->y, $date_obj->m, $date_obj->d);
$module_info->license = $xml_obj->license->body;
$module_info->license_link = $xml_obj->license->attrs->link;
if(!is_array($xml_obj->author)) $author_list[] = $xml_obj->author;
else $author_list = $xml_obj->author;
foreach($author_list as $author) {
unset($author_obj);
$author_obj->name = $author->name->body;
$author_obj->email_address = $author->attrs->email_address;
$author_obj->homepage = $author->attrs->link;
$module_info->author[] = $author_obj;
}
// history
if($xml_obj->history) {
if(!is_array($xml_obj->history)) $history[] = $xml_obj->history;
else $history = $xml_obj->history;
foreach($history as $item) {
unset($obj);
if($item->author) {
(!is_array($item->author)) ? $obj->author_list[] = $item->author : $obj->author_list = $item->author;
foreach($obj->author_list as $author) {
unset($author_obj);
$author_obj->name = $author->name->body;
$author_obj->email_address = $author->attrs->email_address;
$author_obj->homepage = $author->attrs->link;
$obj->author[] = $author_obj;
}
}
$obj->name = $item->name->body;
$obj->email_address = $item->attrs->email_address;
$obj->homepage = $item->attrs->link;
$obj->version = $item->attrs->version;
$obj->date = $item->attrs->date;
$obj->description = $item->description->body;
if($item->log) {
(!is_array($item->log)) ? $obj->log[] = $item->log : $obj->log = $item->log;
foreach($obj->log as $log) {
unset($logs_obj);
$logs_obj->text = $log->body;
$logs_obj->link = $log->attrs->link;
$obj->logs[] = $logs_obj;
}
}
$module_info->history[] = $obj;
}
}
} else {
// module format 0.1
$module_info->title = $xml_obj->title->body;
$module_info->description = $xml_obj->author->description->body;
$module_info->version = $xml_obj->attrs->version;
$module_info->category = $xml_obj->attrs->category;
if(!$module_info->category) $module_info->category = 'service';
sscanf($xml_obj->author->attrs->date, '%d. %d. %d', $date_obj->y, $date_obj->m, $date_obj->d);
$module_info->date = sprintf('%04d%02d%02d', $date_obj->y, $date_obj->m, $date_obj->d);
$author_obj->name = $xml_obj->author->name->body;
$author_obj->email_address = $xml_obj->author->attrs->email_address;
$author_obj->homepage = $xml_obj->author->attrs->link;
$module_info->author[] = $author_obj;
}
// action 정보를 얻어서 admin_index를 추가
$action_info = $this->getModuleActionXml($module);
$module_info->admin_index_act = $action_info->admin_index_act;
return $module_info;
}
/**
* @brief module의 conf/module.xml 통해 grant(권한) action 데이터를 return
* module.xml 파일의 경우 파싱하는데 시간이 걸리기에 캐싱을 한다...
* 캐싱을 할때 바로 include 있도록 역시 코드까지 추가하여 캐싱을 한다.
* 이게 퍼포먼스 상으로는 좋은데 어떤 부정적인 결과를 유도할지는 모르겠...
**/
function getModuleActionXml($module) {
// 요청된 모듈의 경로를 구한다. 없으면 return
$class_path = ModuleHandler::getModulePath($module);
if(!$class_path) return;
// 해당 경로에 module.xml 파일이 있는지 체크한다. 없으면 return
$xml_file = sprintf("%sconf/module.xml", $class_path);
if(!file_exists($xml_file)) return;
// 캐시된 파일이 있는지 확인
$cache_file = sprintf("./files/cache/module_info/%s.%s.php", $module, Context::getLangType());
// 캐시 파일이 없거나 캐시 파일이 xml 파일보다 오래되었으면 내용 다시 갱신
if(!file_exists($cache_file) || filemtime($cache_file)<filemtime($xml_file)) {
$buff = ""; ///< 캐시 파일에 쓸 buff 변수 설정
$xml_obj = XmlParser::loadXmlFile($xml_file); ///< xml 파일을 읽어서 xml object로 변환
if(!count($xml_obj->module)) return; ///< xml 내용중에 module 태그가 없다면 오류;;
$grants = $xml_obj->module->grants->grant; ///< 권한 정보 (없는 경우도 있음)
$permissions = $xml_obj->module->permissions->permission; ///< 권한 대행 (없는 경우도 있음)
$actions = $xml_obj->module->actions->action; ///< action list (필수)
$default_index = $admin_index = '';
// 권한 정보의 정리
if($grants) {
if(is_array($grants)) $grant_list = $grants;
else $grant_list[] = $grants;
foreach($grant_list as $grant) {
$name = $grant->attrs->name;
$default = $grant->attrs->default?$grant->attrs->default:'guest';
$title = $grant->title->body;
$info->grant->{$name}->title = $title;
$info->grant->{$name}->default = $default;
$buff .= sprintf('$info->grant->%s->title=\'%s\';', $name, $title);
$buff .= sprintf('$info->grant->%s->default=\'%s\';', $name, $default);
}
}
// 권한 허용 정리
if($permissions) {
if(is_array($permissions)) $permission_list = $permissions;
else $permission_list[] = $permissions;
foreach($permission_list as $permission) {
$action = $permission->attrs->action;
$target = $permission->attrs->target;
$info->permission->{$action} = $target;
$buff .= sprintf('$info->permission->%s = \'%s\';', $action, $target);
}
}
// actions 정리
if($actions) {
if(is_array($actions)) $action_list = $actions;
else $action_list[] = $actions;
foreach($action_list as $action) {
$name = $action->attrs->name;
$type = $action->attrs->type;
$grant = $action->attrs->grant?$action->attrs->grant:'guest';
$standalone = $action->attrs->standalone=='true'?'true':'false';
$index = $action->attrs->index;
$admin_index = $action->attrs->admin_index;
$output->action->{$name}->type = $type;
$output->action->{$name}->grant = $grant;
$output->action->{$name}->standalone= $standalone;
$info->action->{$name}->type = $type;
$info->action->{$name}->grant = $grant;
$info->action->{$name}->standalone = $standalone=='true'?true:false;
$buff .= sprintf('$info->action->%s->type=\'%s\';', $name, $type);
$buff .= sprintf('$info->action->%s->grant=\'%s\';', $name, $grant);
$buff .= sprintf('$info->action->%s->standalone=%s;', $name, $standalone);
if($index=='true') {
$default_index_act = $name;
$info->default_index_act = $name;
}
if($admin_index=='true') {
$admin_index_act = $name;
$info->admin_index_act = $name;
}
}
}
$buff = sprintf('<?php if(!defined("__ZBXE__")) exit();$info->default_index_act = \'%s\';$info->admin_index_act = \'%s\';%s?>', $default_index_act, $admin_index_act, $buff);
FileHandler::writeFile($cache_file, $buff);
return $info;
}
@include($cache_file);
return $info;
}
/**
* @brief 주어진 곳의 스킨 목록을 구함
* 스킨과 skin.xml 파일을 분석 정리한 결과를 return
@ -243,13 +463,13 @@
return $skin_list;
}
/**
* @brief 특정 위치의 특정 스킨의 정보를 구해옴
**/
function loadSkinInfo($path, $skin) {
// 모듈의 스킨의 정보 xml 파일을 읽음
if(substr($path,-1)!='/') $path .= '/';
$skin_xml_file = sprintf("%sskins/%s/skin.xml", $path, $skin);
if(!file_exists($skin_xml_file)) return;
@ -320,8 +540,8 @@
$obj->options[$i]->value = $val->options[$i]->attrs->value;
}
} else {
$obj->options[0]->title = $val->options[0]->title->body;
$obj->options[0]->value = $val->options[0]->attrs->value;
$obj->options[0]->title = $val->options->title->body;
$obj->options[0]->value = $val->options->attrs->value;
}
$skin_info->extra_vars[] = $obj;
@ -487,120 +707,6 @@
return $skin_info;
}
/**
* @brief module의 conf/module.xml 통해 grant(권한) action 데이터를 return
* module.xml 파일의 경우 파싱하는데 시간이 걸리기에 캐싱을 한다...
* 캐싱을 할때 바로 include 있도록 역시 코드까지 추가하여 캐싱을 한다.
* 이게 퍼포먼스 상으로는 좋은데 어떤 부정적인 결과를 유도할지는 모르겠...
**/
function getModuleActionXml($module) {
// 요청된 모듈의 경로를 구한다. 없으면 return
$class_path = ModuleHandler::getModulePath($module);
if(!$class_path) return;
// 해당 경로에 module.xml 파일이 있는지 체크한다. 없으면 return
$xml_file = sprintf("%sconf/module.xml", $class_path);
if(!file_exists($xml_file)) return;
// 캐시된 파일이 있는지 확인
$cache_file = sprintf("./files/cache/module_info/%s.%s.php", $module, Context::getLangType());
// 캐시 파일이 없거나 캐시 파일이 xml 파일보다 오래되었으면 내용 다시 갱신
if(!file_exists($cache_file) || filemtime($cache_file)<filemtime($xml_file)) {
$buff = ""; ///< 캐시 파일에 쓸 buff 변수 설정
$xml_obj = XmlParser::loadXmlFile($xml_file); ///< xml 파일을 읽어서 xml object로 변환
if(!count($xml_obj->module)) return; ///< xml 내용중에 module 태그가 없다면 오류;;
$grants = $xml_obj->module->grants->grant; ///< 권한 정보 (없는 경우도 있음)
$permissions = $xml_obj->module->permissions->permission; ///< 권한 대행 (없는 경우도 있음)
$actions = $xml_obj->module->actions->action; ///< action list (필수)
$default_index = $admin_index = '';
// 권한 정보의 정리
if($grants) {
if(is_array($grants)) $grant_list = $grants;
else $grant_list[] = $grants;
foreach($grant_list as $grant) {
$name = $grant->attrs->name;
$default = $grant->attrs->default?$grant->attrs->default:'guest';
$title = $grant->title->body;
$info->grant->{$name}->title = $title;
$info->grant->{$name}->default = $default;
$buff .= sprintf('$info->grant->%s->title=\'%s\';', $name, $title);
$buff .= sprintf('$info->grant->%s->default=\'%s\';', $name, $default);
}
}
// 권한 허용 정리
if($permissions) {
if(is_array($permissions)) $permission_list = $permissions;
else $permission_list[] = $permissions;
foreach($permission_list as $permission) {
$action = $permission->attrs->action;
$target = $permission->attrs->target;
$info->permission->{$action} = $target;
$buff .= sprintf('$info->permission->%s = \'%s\';', $action, $target);
}
}
// actions 정리
if($actions) {
if(is_array($actions)) $action_list = $actions;
else $action_list[] = $actions;
foreach($action_list as $action) {
$name = $action->attrs->name;
$type = $action->attrs->type;
$grant = $action->attrs->grant?$action->attrs->grant:'guest';
$standalone = $action->attrs->standalone=='true'?'true':'false';
$index = $action->attrs->index;
$admin_index = $action->attrs->admin_index;
$output->action->{$name}->type = $type;
$output->action->{$name}->grant = $grant;
$output->action->{$name}->standalone= $standalone;
$info->action->{$name}->type = $type;
$info->action->{$name}->grant = $grant;
$info->action->{$name}->standalone = $standalone=='true'?true:false;
$buff .= sprintf('$info->action->%s->type=\'%s\';', $name, $type);
$buff .= sprintf('$info->action->%s->grant=\'%s\';', $name, $grant);
$buff .= sprintf('$info->action->%s->standalone=%s;', $name, $standalone);
if($index=='true') {
$default_index_act = $name;
$info->default_index_act = $name;
}
if($admin_index=='true') {
$admin_index_act = $name;
$info->admin_index_act = $name;
}
}
}
$buff = sprintf('<?php if(!defined("__ZBXE__")) exit();$info->default_index_act = \'%s\';$info->admin_index_act = \'%s\';%s?>', $default_index_act, $admin_index_act, $buff);
FileHandler::writeFile($cache_file, $buff);
return $info;
}
@include($cache_file);
return $info;
}
/**
* @brief 특정 모듈의 설정 return
@ -646,114 +752,6 @@
}
/**
* @brief 모듈의 conf/info.xml 읽어서 정보를 구함
**/
function getModuleInfoXml($module) {
// 요청된 모듈의 경로를 구한다. 없으면 return
$module_path = ModuleHandler::getModulePath($module);
if(!$module_path) return;
// 현재 선택된 모듈의 스킨의 정보 xml 파일을 읽음
$xml_file = sprintf("%s/conf/info.xml", $module_path);
if(!file_exists($xml_file)) return;
$oXmlParser = new XmlParser();
$tmp_xml_obj = $oXmlParser->loadXmlFile($xml_file);
$xml_obj = $tmp_xml_obj->module;
if(!$xml_obj) return;
// 모듈 정보
if($xml_obj->version && $xml_obj->attrs->version == '0.2') {
// module format 0.2
$module_info->title = $xml_obj->title->body;
$module_info->description = $xml_obj->description->body;
$module_info->version = $xml_obj->version->body;
$module_info->homepage = $xml_obj->link->body;
$module_info->category = $xml_obj->category->body;
if(!$module_info->category) $module_info->category = 'service';
sscanf($xml_obj->date->body, '%d-%d-%d', $date_obj->y, $date_obj->m, $date_obj->d);
$module_info->date = sprintf('%04d%02d%02d', $date_obj->y, $date_obj->m, $date_obj->d);
$module_info->license = $xml_obj->license->body;
$module_info->license_link = $xml_obj->license->attrs->link;
if(!is_array($xml_obj->author)) $author_list[] = $xml_obj->author;
else $author_list = $xml_obj->author;
foreach($author_list as $author) {
unset($author_obj);
$author_obj->name = $author->name->body;
$author_obj->email_address = $author->attrs->email_address;
$author_obj->homepage = $author->attrs->link;
$module_info->author[] = $author_obj;
}
// history
if($xml_obj->history) {
if(!is_array($xml_obj->history)) $history[] = $xml_obj->history;
else $history = $xml_obj->history;
foreach($history as $item) {
unset($obj);
if($item->author) {
(!is_array($item->author)) ? $obj->author_list[] = $item->author : $obj->author_list = $item->author;
foreach($obj->author_list as $author) {
unset($author_obj);
$author_obj->name = $author->name->body;
$author_obj->email_address = $author->attrs->email_address;
$author_obj->homepage = $author->attrs->link;
$obj->author[] = $author_obj;
}
}
$obj->name = $item->name->body;
$obj->email_address = $item->attrs->email_address;
$obj->homepage = $item->attrs->link;
$obj->version = $item->attrs->version;
$obj->date = $item->attrs->date;
$obj->description = $item->description->body;
if($item->log) {
(!is_array($item->log)) ? $obj->log[] = $item->log : $obj->log = $item->log;
foreach($obj->log as $log) {
unset($logs_obj);
$logs_obj->text = $log->body;
$logs_obj->link = $log->attrs->link;
$obj->logs[] = $logs_obj;
}
}
$module_info->history[] = $obj;
}
}
} else {
// module format 0.1
$module_info->title = $xml_obj->title->body;
$module_info->description = $xml_obj->author->description->body;
$module_info->version = $xml_obj->attrs->version;
$module_info->category = $xml_obj->attrs->category;
if(!$module_info->category) $module_info->category = 'service';
sscanf($xml_obj->author->attrs->date, '%d. %d. %d', $date_obj->y, $date_obj->m, $date_obj->d);
$module_info->date = sprintf('%04d%02d%02d', $date_obj->y, $date_obj->m, $date_obj->d);
$author_obj->name = $xml_obj->author->name->body;
$author_obj->email_address = $xml_obj->author->attrs->email_address;
$author_obj->homepage = $xml_obj->author->attrs->link;
$module_info->author[] = $author_obj;
}
// action 정보를 얻어서 admin_index를 추가
$action_info = $this->getModuleActionXml($module);
$module_info->admin_index_act = $action_info->admin_index_act;
return $module_info;
}
/**
* @brief 모듈 카테고리의 목록을 구함
**/
@ -901,37 +899,17 @@
}
}
/**
* @brief 특정 모듈의 정보와 회원의 정보를 받아서 관리 권한 유무를 판단
* 회원의 아이디가 해당 모듈의 admin_id에 있으면 true
* 회원이 속한 그룹이 해당 모듈의 manager 그룹에 있으면 true
* method는 모듈.class.php 에서 isAdmin method에서 사용됨
**/
function isModuleAdmin($module_info, $member_info) {
$user_id = $member_info->user_id;
$group_list = $member_info->group_list;
if(!$group_list || !is_array($group_list) || !count($group_list)) return false;
// 직접 관리자로 선택하였을 경우 확인
if(is_array($module_info->admin_id) && in_array($user_id, $module_info->admin_id)) return true;
// 관리자 그룹으로 등록되어 있을 경우 확인
$manager_group = $module_info->grants['manager'];
return count(array_intersect(array_keys($group_list), $manager_group));
}
/**
* @brief site_module_info의 관리자 인지 체크
**/
function isSiteAdmin() {
if(!Context::get('is_logged')) return false;
$logged_info = Context::get('logged_info');
if($logged_info->is_admin == 'Y') return true;
function isSiteAdmin($member_info) {
if(!$member_info->member_srl) return false;
if($member_info->is_admin == 'Y') return true;
$site_module_info = Context::get('site_module_info');
if(!$site_module_info) return;
$args->site_srl = $site_module_info->site_srl;
$args->member_srl = $logged_info->member_srl;
$args->member_srl = $member_info->member_srl;
$output = executeQuery('module.isSiteAdmin', $args);
if($output->data->member_srl == $args->member_srl) return true;
return false;
@ -947,5 +925,207 @@
return $output->data;
}
/**
* @brief 특정 모듈의 관리자 아이디 구함
**/
function getAdminId($module_srl) {
$obj->module_srl = $module_srl;
$output = executeQueryArray('module.getAdminID', $obj);
if(!$output->toBool() || !$output->data) return;
return $output->data;
}
/**
* @brief 특정 모듈의 추가 변수를 구함
* modules 테이블의 기본 정보 이외의
**/
function getModuleExtraVars($module_srl) {
if(is_array($module_srl)) $module_srl = implode(',',$module_srl);
$args->module_srl = $module_srl;
$output = executeQueryArray('module.getModuleExtraVars',$args);
if(!$output->toBool() || !$output->data) return;
$vars = array();
foreach($output->data as $key => $val) {
if(in_array($val->name, array('mid','module')) || $val->value == 'Array') continue;
$vars[$val->module_srl]->{$val->name} = $val->value;
}
return $vars;
}
/**
* @brief 특정 모듈의 스킨 정보를 구함
**/
function getModuleSkinVars($module_srl) {
$args->module_srl = $module_srl;
$output = executeQueryArray('module.getModuleSkinVars',$args);
if(!$output->toBool() || !$output->data) return;
$skin_vars = array();
foreach($output->data as $val) $skin_vars[$val->name] = $val;
return $skin_vars;
}
/**
* @brief 특정 모듈의 스킨 정보를 모듈 정보와 결합
**/
function syncSkinInfoToModuleInfo(&$module_info) {
if(!$module_info->module_srl) return;
$args->module_srl = $module_info->module_srl;
$output = executeQueryArray('module.getModuleSkinVars',$args);
if(!$output->toBool() || !$output->data) return;
foreach($output->data as $val) {
if(isset($module_info->{$val->name})) continue;
$module_info->{$val->name} = $val->value;
}
}
/**
* @brief 특정 모듈정보와 XML, 그리고 회원 정보로 권한을 return
**/
function getGrant($module_info, $member_info, $xml_info = '') {
if(!$xml_info) {
$module = $module_info->module;
$xml_info = $this->getModuleActionXml($module);
}
// 그룹 권한 설정에 필요한 변수를 세팅
$module_srl = $module_info->module_srl;
$grant_info = $xml_info->grant;
if($member_info->member_srl) {
if(is_array($member_info->group_list)) $group_list = array_keys($member_info->group_list);
else $group_list = array();
} else {
$group_list = array();
}
// module_srl이 없는 즉 별도의 권한 설정이 안되는 경우
if(!$module_srl) {
$grant->access = true;
if($this->isSiteAdmin($member_info)) $grant->access = $grant->is_admin = $grant->manager = true;
else $grant->is_admin = $grant->manager = $member_info->is_admin=='Y'?true:false;
// module_srl이 있는 경우
} else {
// grant 종류를 구함
$grant->access = $grant->is_admin = $grant->manager = ($member_info->is_admin=='Y'||$this->isSiteAdmin($member_info))?true:false;
// 관리자가 아니라 로그인 회원일 경우 이 모듈의 관리자인지 확인
if(!$grant->manager && $member_info->member_srl) {
$args->module_srl = $module_srl;
$args->member_srl = $member_info->member_srl;
$output = executeQuery('module.getModuleAdmin',$args);
if($output->data && $output->data->member_srl == $member_info->member_srl) $grant->manager = $grant->is_admin = true;
}
// 관리자가 아니면 직접 DB에서 정보를 구해서 권한 설정
if(!$grant->manager) {
$args = null;
$args->module_srl = $module_srl;
$output = executeQueryArray('module.getModuleGrants', $args);
$grant_exists = $granted = array();
if($output->data) {
// 1차적으로 권한 대상 이름과 그룹을 정리
foreach($output->data as $val) {
$grant_exists[$val->name] = true;
if($granted[$val->name]) continue;
// 로그인 회원만
if($val->group_srl == -1) {
$granted[$val->name] = true;
if($member_info->member_srl) $grant->{$val->name} = true;
// 사이트 가입한 회원만
} elseif($val->group_srl == -2) {
$granted[$val->name] = true;
// 비로그인 회원이면 권한 미부여
if(!$member_info->member_srl) $grant->{$val->name} = false;
// 로그인 회원
else {
$site_module_info = Context::get('site_module_info');
// 현재 접속된 사이트 정보가 없으면 권한 부여
if(!$site_module_info->site_srl) $grant->{$val->name} = true;
// 현재 접속된 사이트의 그룹 정보가 있 으면 권한 미부여
elseif(count($group_list)) $grant->{$val->name} = true;
}
// 비로그인 회원 모두
} elseif($val->group_srl == 0) {
$granted[$val->name] = true;
$grant->{$val->name} = true;
// 특정 그룹 대상일 경우
} else {
if($group_list && count($group_list) && in_array($val->group_srl, $group_list)) {
$grant->{$val->name} = true;
$granted[$val->name] = true;
}
}
}
}
// 가상 그룹인 access에 대해서 별도 처리
if(!$grant_exists['access']) $grant->access = true;
if(count($grant_info)) {
foreach($grant_info as $grant_name => $grant_item) {
if($grant_exists[$grant_name]) continue;
switch($grant_item->default) {
case 'guest' :
$grant->{$grant_name} = true;
break;
case 'member' :
if($member_info->member_srl) $grant->{$grant_name} = true;
else $grant->{$grant_name} = false;
break;
case 'site' :
$site_module_info = Context::get('site_module_info');
if($member_info->member_srl && (($site_module_info->site_srl && count($group_list)) || !$site_module_info->site_srl)) $grant->{$grant_name} = true;
else $grant->{$grant_name} = false;
break;
case 'manager' :
case 'root' :
if($member_info->is_admin == 'Y') $grant->{$grant_name} = true;
else $grant->{$grant_name} = false;
break;
}
}
}
}
// 관리자일 경우 모든 권한에 대해 true 지정
if($grant->manager) {
$grant->access = true;
if(count($grant_info)) {
foreach($grant_info as $key => $val) {
$grant->{$key} = true;
}
}
}
}
return $grant;
}
function getModuleFileBox($module_filebox_srl){
$args->module_filebox_srl = $module_filebox_srl;
return executeQuery('getModuleFileBox', $args);
}
function getModuleFileBoxList(){
$args->page = Context::get('page');
$args->list_count = 10;
$args->page_count = 10;
return executeQuery('module.getModuleFileBoxList', $args);
}
function getModuleFileBoxPath($module_filebox_srl){
return sprintf("./files/attach/filebox/%s",getNumberingPath($module_filebox_srl,3));
}
}
?>

View file

@ -37,5 +37,125 @@
$this->setTemplateFile("skin_info");
}
/**
* @brief 모듈 선택기
**/
function dispModuleSelectList() {
if(!Context::get('is_logged')) return new Object(-1, 'msg_not_permitted');
$oModuleModel = &getModel('module');
// virtual site의 개수를 추출
$output = executeQuery('module.getSiteCount');
$site_count = $output->data->count;
Context::set('site_count', $site_count);
// 사이트 검색어 변수 설정
$site_keyword = Context::get('site_keyword');
// 사이트 검색어가 없으면 현재 가상 사이트의 정보를 설정
$args = null;
$logged_info = Context::get('logged_info');
if($logged_info->is_admin == 'Y') {
$query_id = 'module.getSiteModules';
$module_category_exists = false;
if(!$site_keyword) {
$site_module_info = Context::get('site_module_info');
if($site_module_info && $logged_info->is_admin != 'Y') {
$site_keyword = $site_module_info->domain;
$args->site_srl = (int)$site_module_info->site_srl;
Context::set('site_keyword', $site_keyword);
} else {
$query_id = 'module.getDefaultModules';
$args->site_srl = 0;
$module_category_exists = true;
}
// 사이트 검색어가 있으면 해당 사이트(들)의 정보를 추출
} else {
$args->site_keyword = $site_keyword;
}
} else {
$query_id = 'module.getSiteModules';
$site_module_info = Context::get('site_module_info');
$args->site_srl = (int)$site_module_info->site_srl;
}
//if(is_null($args->site_srl)) $query_id = 'module.getDefaultModules';
// 지정된 사이트(혹은 전체)의 module 목록을 구함
$output = executeQueryArray($query_id, $args);
$category_list = $mid_list = array();
if(count($output->data)) {
foreach($output->data as $key => $val) {
$module = trim($val->module);
if(!$module) continue;
$category = $val->category;
$obj = null;
$obj->module_srl = $val->module_srl;
$obj->browser_title = $val->browser_title;
$mid_list[$module]->list[$category][$val->mid] = $obj;
}
}
$selected_module = Context::get('selected_module');
if(count($mid_list)) {
foreach($mid_list as $module => $val) {
if(!$selected_module) $selected_module = $module;
$xml_info = $oModuleModel->getModuleInfoXml($module);
$mid_list[$module]->title = $xml_info->title;
}
}
Context::set('mid_list', $mid_list);
Context::set('selected_module', $selected_module);
Context::set('selected_mids', $mid_list[$selected_module]->list);
Context::set('module_category_exists', $module_category_exists);
// 레이아웃을 팝업으로 지정
$this->setLayoutFile('popup_layout');
// 템플릿 파일 지정
$this->setTemplateFile('module_selector');
}
// 파일 박스 보기
function dispModuleFileBox(){
$logged_info = Context::get('logged_info');
if($logged_info->is_admin !='Y' && !$logged_info->is_site_admin) return new Object(-1, 'msg_not_permitted');
$input_name = Context::get('input');
if(!$input_name) return new Object(-1, 'msg_not_permitted');
$addscript = sprintf('<script type="text/javascript">//<![CDATA[
var selected_filebox_input_name = "%s";
//]]></script>',$input_name);
Context::addHtmlHeader($addscript);
$oModuleModel = &getModel('module');
$output = $oModuleModel->getModuleFileBoxList();
Context::set('filebox_list', $output->data);
$filter = Context::get('filter');
if($filter) Context::set('arrfilter',explode(',',$filter));
Context::set('page_navigation', $output->page_navigation);
$this->setLayoutFile('popup_layout');
$this->setTemplateFile('filebox_list');
}
// 파일 박스 등록화면
function dispModuleFileBoxAdd(){
$logged_info = Context::get('logged_info');
if($logged_info->is_admin !='Y' && !$logged_info->is_site_admin) return new Object(-1, 'msg_not_permitted');
$filter = Context::get('filter');
if($filter) Context::set('arrfilter',explode(',',$filter));
$this->setLayoutFile('popup_layout');
$this->setTemplateFile('filebox_add');
}
}
?>

View file

@ -0,0 +1,9 @@
<query id="deleteAdminId" action="delete">
<tables>
<table name="module_admins" />
</tables>
<conditions>
<condition operation="equal" column="module_srl" var="module_srl" filter="number" notnull="notnull" />
<condition operation="equal" column="member_srl" var="member_srl" filter="number" pipe="and"/>
</conditions>
</query>

View file

@ -0,0 +1,8 @@
<query id="deleteAdminIds" action="delete">
<tables>
<table name="module_admins" />
</tables>
<conditions>
<condition operation="equal" column="module_srl" var="module_srl" filter="number" notnull="notnull" />
</conditions>
</query>

View file

@ -0,0 +1,9 @@
<query id="deleteLang" action="delete">
<tables>
<table name="lang" />
</tables>
<conditions>
<condition operation="equal" column="site_srl" var="site_srl" notnull="notnull" filter="number" />
<condition operation="equal" column="name" var="name" notnull="notnull" filter="number" pipe="and" />
</conditions>
</query>

View file

@ -0,0 +1,8 @@
<query id="deleteModuleExtraVars" action="delete">
<tables>
<table name="module_extra_vars" />
</tables>
<conditions>
<condition operation="equal" column="module_srl" var="module_srl" filter="number" notnull="notnull" />
</conditions>
</query>

View file

@ -0,0 +1,8 @@
<query id="deleteModuleFileBox" action="delete">
<tables>
<table name="module_filebox" />
</tables>
<conditions>
<condition operation="equal" column="module_filebox_srl" var="module_filebox_srl" filter="number" notnull="notnull" />
</conditions>
</query>

View file

@ -0,0 +1,8 @@
<query id="deleteModuleGrants" action="delete">
<tables>
<table name="module_grants" />
</tables>
<conditions>
<condition operation="equal" column="module_srl" var="module_srl" filter="number" notnull="notnull" />
</conditions>
</query>

View file

@ -0,0 +1,8 @@
<query id="deleteModuleSkinVars" action="delete">
<tables>
<table name="module_skins" />
</tables>
<conditions>
<condition operation="equal" column="module_srl" var="module_srl" filter="number" notnull="notnull" />
</conditions>
</query>

View file

@ -0,0 +1,13 @@
<query id="getAdminID" action="select">
<tables>
<table name="module_admins" />
<table name="member" />
</tables>
<columns>
<column name="*" />
</columns>
<conditions>
<condition operation="equal" column="module_srl" var="module_srl" notnull="notnull" />
<condition operation="equal" column="member.member_srl" default="module_admins.member_srl" notnull="notnull" pipe="and"/>
</conditions>
</query>

View file

@ -6,6 +6,7 @@
<column name="*" />
</columns>
<conditions>
<condition operation="equal" column="is_default" default="Y" />
<condition operation="equal" column="site_srl" var="site_srl" default="0" notnull="notnull" />
<condition operation="equal" column="is_default" default="Y" pipe="and" />
</conditions>
</query>

View file

@ -0,0 +1,12 @@
<query id="getLang" action="select">
<tables>
<table name="lang" />
</tables>
<columns>
<column name="*" />
</columns>
<conditions>
<condition operation="equal" column="site_srl" var="site_srl" notnull="notnull" filter="number" />
<condition operation="equal" column="name" var="name" pipe="and" />
</conditions>
</query>

View file

@ -0,0 +1,17 @@
<query id="getLangList" action="select">
<tables>
<table name="lang" />
</tables>
<columns>
<column name="name" />
</columns>
<conditions>
<condition operation="equal" column="site_srl" var="site_srl" notnull="notnull" filter="number" />
</conditions>
<navigation>
<index var="sort_index" default="list_order" order="order_type" />
</navigation>
<groups>
<group column="name" />
</groups>
</query>

View file

@ -0,0 +1,9 @@
<query id="getModuleAdmin" action="select">
<tables>
<table name="module_admins" />
</tables>
<conditions>
<condition operation="equal" column="module_srl" var="module_srl" notnull="notnull" filter="number" />
<condition operation="equal" column="member_srl" var="member_srl" notnull="notnull" pipe="and" />
</conditions>
</query>

View file

@ -0,0 +1,11 @@
<query id="getModuleExtraVars" action="select">
<tables>
<table name="module_extra_vars" />
</tables>
<columns>
<column name="*" />
</columns>
<conditions>
<condition operation="in" column="module_srl" var="module_srl" notnull="notnull" />
</conditions>
</query>

View file

@ -0,0 +1,9 @@
<query id="getModuleFileBox" action="select">
<tables>
<table name="module_filebox" />
</tables>
<columns />
<conditions>
<condition operation="equal" column="module_filebox_srl" var="module_filebox_srl" filter="number" />
</conditions>
</query>

View file

@ -0,0 +1,15 @@
<query id="getModuleFileBoxList" action="select">
<tables>
<table name="module_filebox" />
</tables>
<columns />
<conditions>
<condition operation="in" column="fileextension" var="fileextension" />
</conditions>
<navigation>
<index var="sort_index" default="module_filebox_srl" order="desc" />
<list_count var="list_count" default="10" />
<page_count var="page_count" default="10" />
<page var="page" default="1" />
</navigation>
</query>

View file

@ -0,0 +1,11 @@
<query id="getModuleGrants" action="select">
<tables>
<table name="module_grants" />
</tables>
<conditions>
<condition operation="equal" column="module_srl" var="module_srl" notnull="notnull" filter="number" />
</conditions>
<navigation>
<index var="sort_index" default="group_srl" order="asc" />
</navigation>
</query>

View file

@ -0,0 +1,6 @@
<query id="getModuleInfos" action="select">
<tables>
<table name="modules" />
</tables>
<conditions />
</query>

View file

@ -0,0 +1,8 @@
<query id="getModuleSkinVars" action="select">
<tables>
<table name="module_skins" />
</tables>
<conditions>
<condition operation="in" column="module_srl" var="module_srl" notnull="notnull" filter="number" />
</conditions>
</query>

View file

@ -7,6 +7,7 @@
<column name="sites.site_srl" alias="site_srl" />
<column name="sites.domain" alias="domain" />
<column name="sites.index_module_srl" alias="index_module_srl" />
<column name="sites.default_language" alias="default_language" />
<column name="modules.*" />
</columns>
<conditions>

View file

@ -7,6 +7,7 @@
<column name="sites.site_srl" alias="site_srl" />
<column name="sites.domain" alias="domain" />
<column name="sites.index_module_srl" alias="index_module_srl" />
<column name="sites.default_language" alias="default_language" />
<column name="modules.*" />
</columns>
<conditions>

View file

@ -7,6 +7,7 @@
<column name="sites.site_srl" alias="site_srl" />
<column name="sites.domain" alias="domain" />
<column name="sites.index_module_srl" alias="index_module_srl" />
<column name="sites.default_language" alias="default_language" />
<column name="modules.*" />
</columns>
<conditions>

View file

@ -0,0 +1,10 @@
<query id="insertAdminId" action="insert">
<tables>
<table name="module_admins" />
</tables>
<columns>
<column name="module_srl" var="module_srl" notnull="notnull" />
<column name="member_srl" var="member_srl" notnull="notnull" />
<column name="regdate" default="curdate()" />
</columns>
</query>

View file

@ -0,0 +1,11 @@
<query id="insertLang" action="insert">
<tables>
<table name="lang" />
</tables>
<columns>
<column name="site_srl" var="site_srl" notnull="notnull" />
<column name="name" var="name" notnull="notnull" />
<column name="lang_code" var="lang_code" notnull="notnull" />
<column name="value" var="value" notnull="notnull" />
</columns>
</query>

View file

@ -12,13 +12,9 @@
<column name="layout_srl" var="layout_srl" />
<column name="description" var="description" />
<column name="content" var="content" />
<column name="grants" var="grants" />
<column name="module" var="module" notnull="notnull" maxlength="80"/>
<column name="is_default" var="is_default" default="N" notnull="notnull" />
<column name="menu_srl" var="menu_srl" filter="number" />
<column name="extra_vars" var="extra_vars" />
<column name="skin_vars" var="skin_vars" />
<column name="admin_id" var="admin_id" maxlength="80" />
<column name="open_rss" var="open_rss" default="Y" notnull="notnull" />
<column name="header_text" var="header_text" />
<column name="footer_text" var="footer_text" />

View file

@ -0,0 +1,10 @@
<query id="insertModuleExtraVars" action="insert">
<tables>
<table name="module_extra_vars" />
</tables>
<columns>
<column name="module_srl" var="module_srl" filter="number" notnull="notnull" />
<column name="name" var="name" notnull="notnull" />
<column name="value" var="value" notnull="notnull" />
</columns>
</query>

View file

@ -0,0 +1,14 @@
<query id="insertModuleFileBox" action="insert">
<tables>
<table name="module_filebox" />
</tables>
<columns>
<column name="module_filebox_srl" var="module_filebox_srl" notnull="notnull" />
<column name="member_srl" var="member_srl" notnull="notnull" />
<column name="filename" var="filename" />
<column name="fileextension" var="fileextension" />
<column name="filesize" var="filesize" />
<column name="comment" var="comment" />
<column name="regdate" default="curdate()" />
</columns>
</query>

View file

@ -0,0 +1,10 @@
<query id="insertModuleGrant" action="insert">
<tables>
<table name="module_grants" />
</tables>
<columns>
<column name="module_srl" var="module_srl" filter="number" notnull="notnull" />
<column name="name" var="name" notnull="notnull" />
<column name="group_srl" var="group_srl" notnull="notnull" />
</columns>
</query>

View file

@ -0,0 +1,10 @@
<query id="insertModuleSkinVars" action="insert">
<tables>
<table name="module_skins" />
</tables>
<columns>
<column name="module_srl" var="module_srl" filter="number" notnull="notnull" />
<column name="name" var="name" notnull="notnull" />
<column name="value" var="value" notnull="notnull" />
</columns>
</query>

View file

@ -6,6 +6,7 @@
<column name="site_srl" var="site_srl" notnull="notnull" />
<column name="domain" var="domain" notnull="notnull" />
<column name="index_module_srl" var="index_module_srl" default="0" filter="number" />
<column name="default_language" var="default_language" />
<column name="regdate" default="curdate()" />
</columns>
</query>

View file

@ -6,15 +6,13 @@
<column name="module" var="module" notnull="notnull" maxlength="80"/>
<column name="module_category_srl" var="module_category_srl" />
<column name="layout_srl" var="layout_srl" />
<column name="skin" var="skin" minlength="0" maxlength="250" />
<column name="menu_srl" var="menu_srl" filter="number" />
<column name="mid" var="mid" notnull="notnull" minlength="1" maxlength="40"/>
<column name="skin" var="skin" minlength="1" maxlength="250" />
<column name="browser_title" var="browser_title" notnull="notnull" minlength="1" maxlength="250" />
<column name="description" var="description" />
<column name="is_default" var="is_default" default="N" notnull="notnull" />
<column name="extra_vars" var="extra_vars" />
<column name="content" var="content" />
<column name="admin_id" var="admin_id" maxlength="80" />
<column name="open_rss" var="open_rss" default="Y" notnull="notnull" />
<column name="header_text" var="header_text" />
<column name="footer_text" var="footer_text" />

View file

@ -0,0 +1,15 @@
<query id="updateModuleFileBox" action="update">
<tables>
<table name="module_filebox" />
</tables>
<columns>
<column name="filename" var="filename" />
<column name="fileextension" var="fileextension" />
<column name="filesize" var="filesize" />
<column name="comment" var="comment" />
<column name="regdate" default="curdate()" />
</columns>
<conditions>
<condition operation="equal" column="module_filebox_srl" var="module_filebox_srl" notnull="notnull"/>
</conditions>
</query>

View file

@ -1,11 +0,0 @@
<query id="updateModuleGrant" action="update">
<tables>
<table name="modules" />
</tables>
<columns>
<column name="grants" var="grants" notnull="notnull" default="" />
</columns>
<conditions>
<condition operation="in" column="module_srl" var="module_srl" filter="number" notnull="notnull"/>
</conditions>
</query>

View file

@ -5,6 +5,7 @@
<columns>
<column name="index_module_srl" var="index_module_srl" />
<column name="domain" var="domain" />
<column name="default_language" var="default_language" />
</columns>
<conditions>
<condition operation="equal" column="site_srl" var="site_srl" filter="number" notnull="notnull" />

View file

@ -0,0 +1,6 @@
<table name="lang">
<column name="site_srl" type="number" size="11" notnull="notnull" index="idx_lang" />
<column name="name" type="varchar" size="255" notnull="notnull" index="idx_lang" />
<column name="lang_code" type="varchar" size="10" notnull="notnull" index="idx_lang" />
<column name="value" type="text" />
</table>

View file

@ -0,0 +1,5 @@
<table name="module_admins">
<column name="module_srl" type="number" size="11" notnull="notnull" unique="unique_module_admin" />
<column name="member_srl" type="number" size="11" notnull="notnull" unique="unique_module_admin" />
<column name="regdate" type="date" index="idx_regdate" />
</table>

View file

@ -0,0 +1,5 @@
<table name="module_extra_vars">
<column name="module_srl" type="number" size="11" notnull="notnull" unique="unique_module_vars" />
<column name="name" type="varchar" size="80" notnull="notnull" unique="unique_module_vars" />
<column name="value" type="text" />
</table>

View file

@ -0,0 +1,9 @@
<table name="module_filebox">
<column name="module_filebox_srl" type="number" size="11" notnull="notnull" primary_key="primary_key" />
<column name="member_srl" type="number" size="11" notnull="notnull" index="idx_member_srl" />
<column name="filename" type="varchar" size="250" notnull="notnull" />
<column name="fileextension" type="varchar" size="4" notnull="notnull" index="idx_fileextension" />
<column name="filesize" type="number" size="11" default="0" notnull="notnull" />
<column name="comment" type="varchar" size="250" />
<column name="regdate" type="date" />
</table>

View file

@ -0,0 +1,5 @@
<table name="module_grants">
<column name="module_srl" type="number" size="11" notnull="notnull" unique="unique_module" />
<column name="name" type="varchar" size="20" notnull="notnull" unique="unique_module" />
<column name="group_srl" type="number" size="11" notnull="notnull" unique="unique_module" />
</table>

View file

@ -0,0 +1,5 @@
<table name="module_skins">
<column name="module_srl" type="number" size="11" notnull="notnull" unique="unique_module_skins" />
<column name="name" type="varchar" size="80" notnull="notnull" unique="unique_module_skins" />
<column name="value" type="text" />
</table>

View file

@ -10,11 +10,7 @@
<column name="browser_title" type="varchar" size="250" notnull="notnull"/>
<column name="description" type="text" />
<column name="is_default" type="char" size="1" notnull="notnull" default="N" />
<column name="extra_vars" type="text" />
<column name="skin_vars" type="text" />
<column name="content" type="bigtext"/>
<column name="grants" type="text" />
<column name="admin_id" type="text" />
<column name="open_rss" type="char" size="1" notnull="notnull" default="Y" />
<column name="header_text" type="text" />
<column name="footer_text" type="text" />

View file

@ -2,5 +2,6 @@
<column name="site_srl" type="number" size="11" notnull="notnull" primary_key="primary_key" />
<column name="index_module_srl" type="number" size="11" default="0" />
<column name="domain" type="varchar" size="255" notnull="notnull" index="idx_domain" />
<column name="default_language" type="varchar" size="255" />
<column name="regdate" type="date" />
</table>

View file

@ -9,7 +9,7 @@
<input type="hidden" name="mode" value="" />
</form>
<table cellspacing="0" class="adminTable">
<table cellspacing="0" class="rowTable">
<thead>
<tr>
<th scope="col" class="wide"><div>{$lang->category_title}</div></th>
@ -25,10 +25,10 @@
<!--@end-->
<!--@foreach($category_list as $key => $val)-->
<tr>
<td>{$val->title}</td>
<td class="date nowrap">{zdate($val->regdate,"Y-m-d H:i:s")}</td>
<td class="center modify"><a href="{getUrl('module_category_srl',$val->module_category_srl)}">{$lang->cmd_modify}</a></td>
<td class="center delete"><a href="#" onclick="doUpdateCategory('{$val->module_category_srl}','delete','{$lang->confirm_delete}');return false;">{$lang->cmd_delete}</a></td>
<td class="wide">{$val->title}</td>
<td class="nowrap">{zdate($val->regdate,"Y-m-d H:i:s")}</td>
<td><a href="{getUrl('module_category_srl',$val->module_category_srl)}" class="buttonSet buttonSetting"><span>{$lang->cmd_modify}</span></a></td>
<td><a href="#" onclick="doUpdateCategory('{$val->module_category_srl}','delete','{$lang->confirm_delete}');return false;" class="buttonSet buttonDelete"><span>{$lang->cmd_delete}</span></a></td>
</tr>
<!--@end-->
</tbody>
@ -40,7 +40,7 @@
<input type="hidden" name="module_srl" value="{$module_srl}" />
<input type="hidden" name="module_category_srl" value="" />
<table cellspacing="0" class="adminTable">
<table cellspacing="0" class="rowTable">
<tr>
<th scope="row"><div>{$lang->category_title}</div></th>
<td>
@ -48,9 +48,9 @@
</td>
</tr>
<tr class="row2">
<td colspan="2" class="right">
<span class="button"><input type="submit" value="{$lang->cmd_registration}" accesskey="s" /></span>
</td>
<th colspan="2" class="button">
<span class="button strong black"><input type="submit" value="{$lang->cmd_registration}" accesskey="s" /></span>
</th>
</tr>
</table>
</form>

View file

@ -8,15 +8,15 @@
<input type="hidden" name="module_category_srl" value="{$selected_category->module_category_srl}" />
<input type="hidden" name="mode" value="update" />
<table cellspacing="0" class="adminTable">
<table cellspacing="0" class="rowTable">
<tr>
<th scope="row"><div>{$lang->category_title}</div></th>
<td><input type="text" name="title" value="{$selected_category->title}" class="inputTypeText w300" /></td>
</tr>
<tr class="row2">
<td colspan="2" class="right">
<span class="button"><input type="submit" value="{$lang->cmd_registration}" accesskey="s" /></span>
</td>
<th colspan="2" class="button">
<span class="button strong black"><input type="submit" value="{$lang->cmd_registration}" accesskey="s" /></span>
</th>
</tr>
</table>

View file

@ -1,8 +1,8 @@
<!--%import("js/module_admin.js")-->
<!--%import("filter/copy_module.xml")-->
<div id="popHeadder">
<h3>{$lang->module_copy}</h3>
<div id="popHeader" class="wide">
<h3 class="xeAdmin">{$lang->module_copy}</h3>
</div>
<form action="./" method="post" onsubmit="return procFilter(this, copy_module)" >
@ -10,10 +10,10 @@
<div id="popBody">
<table cellspacing="0" class="adminTable">
<table cellspacing="0" class="rowTable">
<tr>
<th scope="row"><div>{$lang->module}</div></th>
<td>{$module_info->module}</td>
<td class="wide">{$module_info->module}</td>
</tr>
<tr>
<th scope="row"><div>{$lang->mid}</div></th>
@ -26,7 +26,7 @@
</table>
<table cellspacing="0" class="adminTable">
<table cellspacing="0" class="rowTable">
<tr>
<th scope="col"><div>{$lang->mid}<div></th>
<th scope="col"><div>{$lang->browser_title}<div></th>
@ -75,9 +75,8 @@
</div>
<div id="popFooter" class="tCenter gap1">
<span class="button"><input type="submit" value="{$lang->cmd_save}" /></span>
<span class="button"><input type="button" value="{$lang->cmd_close}" onclick="window.close(); return false;"/></span>
<div id="popFooter">
<span class="button black strong"><input type="submit" value="{$lang->cmd_save}" /></span>
</div>
</form>

View file

@ -0,0 +1,36 @@
<!--%import("./js/module_admin.js")-->
<div id="popHeader" class="wide">
<h3 class="xeAdmin">{$lang->filebox}</h3>
</div>
<form action="{getUrl('')}" method="post" enctype="multipart/form-data">
<input type="hidden" name="module" value="module" />
<input type="hidden" name="act" value="procModuleFileBoxAdd" />
<input type="hidden" name="filter" value="{$filter}" />
<input type="hidden" name="input" value="{$input}" />
<div id="popBody">
<table class="rowTable" cellspacing="0">
<tbody>
<tr>
<th>{$lang->description}</th>
<td><input type="text" name="comment" /></td>
</tr>
<tr>
<th>{$lang->file}</th>
<td><input type="file" name="addfile" />
<p>
<!--@if($arrfilter && is_array($arrfilter))-->
{@sprintf($lang->about_file_extension,join(", ",$arrfilter ))}
<!--@end-->
</p>
</td>
</tr>
</tbody>
</table>
</div>
<div id="popFooter">
<span class="button black"><input type="submit" value="{$lang->cmd_submit}" /></span>
</div>
</form>

View file

@ -0,0 +1,65 @@
<!--%load_js_plugin("filebox")-->
<div id="popHeader" class="wide">
<h3 class="xeAdmin">{$lang->filebox}</h3>
</div>
<div id="popBody">
<table class="rowTable" cellspacing="0">
<thead>
<tr>
<th width="105">{$lang->file}</th>
<th>{$lang->description}</th>
<th width="105">{$lang->regdate}</th>
<th width="100"></th>
</tr>
</thead>
<tbody>
<!--@foreach($filebox_list as $key=>$val)-->
<tr>
<td>
<div id="filebox_preview_{$val->module_filebox_srl}" style="width:100px;height:100px;float:left;">
<!--@if($val->fileextension=='swf')-->
<object height="100%" width="100%" flashvars="" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" xmlns="http://www.w3.org/1999/xhtml">
<param value="{getUrl('')}{$val->filename}" name="movie" xmlns="http://www.w3.org/1999/xhtml" />
<param value="transparent" name="wmode" xmlns="http://www.w3.org/1999/xhtml" />
<param value="sameDomain" name="allowScriptAccess" xmlns="http://www.w3.org/1999/xhtml" />
<param value="high" name="quality" xmlns="http://www.w3.org/1999/xhtml" />
<embed height="100%" width="100%" wmode="transparent" flashvars="" autostart="false" src="{getUrl('')}{$val->filename}" xmlns="http://www.w3.org/1999/xhtml" />
</object>
<!--@elseif(in_array($val->fileextension,array('gif','png','jpg','jpeg')))-->
<img src="{getUrl('')}{$val->filename}" width="100%" height="100%" />
<!--@end-->
</div>
</td>
<td>{$val->comment}</td>
<td>{zdate($val->regdate,'Y-m-d H:i')}</td>
<td>
<!--@if(!$filter || (is_array($arrfilter) && in_array($val->fileextension,$arrfilter)))-->
<span class="small button black"><button type="button" onclick="XE.filebox.selectFile('{getUrl('')}{$val->filename}','{$val->module_filebox_srl}');">{$lang->cmd_select}</button></span>
<!--@end-->
<span class="small button"><button type="button" onclick="XE.filebox.deleteFile('{$val->module_filebox_srl}');">{$lang->cmd_delete}</button></span>
</td>
</tr>
<!--@end-->
</tbody>
</table>
<!-- 페이지 네비게이션 -->
<div class="pagination a1">
<a href="{getUrl('page','','module_srl','')}" class="prevEnd">{$lang->first_page}</a>
<!--@while($page_no = $page_navigation->getNextPage())-->
<!--@if($page == $page_no)-->
<strong>{$page_no}</strong>
<!--@else-->
<a href="{getUrl('page',$page_no,'module_srl','')}">{$page_no}</a>
<!--@end-->
<!--@end-->
<a href="{getUrl('page',$page_navigation->last_page,'module_srl','')}" class="nextEnd">{$lang->last_page}</a>
</div>
</div>
<div id="popFooter">
<a href="{getUrl('','module','module','act','dispModuleFileBoxAdd','filter',$filter,'input',$input)}" class="button black"><span>{$lang->cmd_registration}</span></a>
</div>

View file

@ -0,0 +1,9 @@
<filter name="insert_grant" module="module" act="procModuleAdminInsertGrant" confirm_msg_code="confirm_submit">
<form>
<node target="module_srl" required="true" filter="number" />
</form>
<response callback_func="completeInsertGrant">
<tag name="error" />
<tag name="message" />
</response>
</filter>

View file

@ -0,0 +1,10 @@
<filter name="insert_lang" module="module" act="procModuleAdminInsertLang" confirm_msg_code="confirm_submit">
<form>
<node target="lang_code" required="true" filter="alpha_number"/>
</form>
<response callback_func="completeInsertLang">
<tag name="error" />
<tag name="message" />
<tag name="name" />
</response>
</filter>

View file

@ -0,0 +1,15 @@
<filter name="insert_module_setup" module="module" act="procModuleAdminModuleSetup">
<form>
<node target="module_srls" required="true" />
<node target="module_category_srl" />
<node target="layout_srl" />
<node target="skin" required="true" />
<node target="description" />
<node target="header_text" />
<node target="footer_text" />
</form>
<response callback_func="completeModuleSetup">
<tag name="error" />
<tag name="message" />
</response>
</filter>

View file

@ -0,0 +1,9 @@
<filter name="insert_modules_grant" module="module" act="procModuleAdminModuleGrantSetup" confirm_msg_code="confirm_submit">
<form>
<node target="module_srls" required="true" />
</form>
<response callback_func="completeModuleSetup">
<tag name="error" />
<tag name="message" />
</response>
</filter>

View file

@ -1,6 +1,6 @@
<!--%import("js/module_admin.js")-->
<h3>{$lang->module} <span class="gray">{$lang->cmd_management}</span></h3>
<h3 class="xeAdmin">{$lang->module} <span class="gray">{$lang->cmd_management}</span></h3>
<!--@if($act == 'dispModuleAdminContent')-->
<div class="infoText">{nl2br($lang->about_module)}</div>

View file

@ -0,0 +1,44 @@
var selected_filebox = {};
// popup
function openFileBox(file_obj, filter){
selected_filebox[file_obj.name] = file_obj;
var url = request_uri.setQuery('module','module').setQuery('act','dispModuleFileBox').setQuery('input',file_obj.name).setQuery('filter',filter);
popopen(url, "filebox");
}
function selectFileBoxFile(file_url, module_filebox_srl){
if(!selected_filebox_input_name) return;
opener.selected_filebox[selected_filebox_input_name].value = file_url;
opener.document.getElementById('filebox_preview_'+selected_filebox_input_name).innerHTML = document.getElementById('filebox_preview_' + module_filebox_srl).innerHTML;
opener.document.getElementById('filebox_preview_'+selected_filebox_input_name).style.display='';
opener.document.getElementById('filebox_unselect_'+selected_filebox_input_name).style.display='';
window.close();
}
function deleteFileBoxFile(module_filebox_srl){
var params ={
"module_filebox_srl":module_filebox_srl
};
jQuery.exec_json('module.procModuleFileBoxDelete', params, function(data){
document.location.reload();
});
}
function unselectFileBox(id){
jQuery("[name="+id+"]").val('');
jQuery('#filebox_preview_'+id).html('').hide();
jQuery('#filebox_unselect_'+id).hide();
}
function initFileBox(id){
if(opener && opener.selectedWidget && opener.selectedWidget.getAttribute("widget")){
var file = opener.selectedWidget.getAttribute(id);
if(file){
var html = _displayMultimedia(file,"100%","100%");
jQuery('#filebox_preview_'+id).html(html).show();
jQuery('#filebox_unselect_'+id).show();
}
}
}

View file

@ -71,3 +71,118 @@ function insertModule(id, module_srl, mid, browser_title, multi_select) {
window.close();
}
}
/* 권한 선택용 */
function doShowGrantZone() {
jQuery(".grant_default").each( function() {
var id = "#zone_"+this.name.replace(/_default$/,'');
if(!jQuery(this).val()) jQuery(id).css("display","block");
else jQuery(id).css("display","none");
} );
}
/* 권한 등록 후 알림 메세지 */
function completeInsertGrant(ret_obj) {
alert(ret_obj['message']);
location.reload();
}
/* 관리자 아이디 등록/ 제거 */
function doInsertAdmin() {
var fo_obj = xGetElementById("fo_obj");
var sel_obj = fo_obj._admin_member;
var admin_id = fo_obj.admin_id.value;
if(!admin_id) return;
var opt = new Option(admin_id,admin_id,true,true);
sel_obj.options[sel_obj.options.length] = opt;
fo_obj.admin_id.value = '';
sel_obj.size = sel_obj.options.length;
sel_obj.selectedIndex = -1;
var members = new Array();
for(var i=0;i<sel_obj.options.length;i++) {
members[members.length] = sel_obj.options[i].value;
}
fo_obj.admin_member.value = members.join(',');
fo_obj.admin_id.focus();
}
function doDeleteAdmin() {
var fo_obj = xGetElementById("fo_obj");
var sel_obj = fo_obj._admin_member;
sel_obj.remove(sel_obj.selectedIndex);
sel_obj.size = sel_obj.options.length;
sel_obj.selectedIndex = -1;
var members = new Array();
for(var i=0;i<sel_obj.options.length;i++) {
members[members.length] = sel_obj.options[i].value;
}
fo_obj.admin_member.value = members.join(',');
}
function completeModuleSetup(ret_obj) {
alert(ret_obj['message']);
window.close();
}
/**
* 언어 관련
**/
function doInsertLangCode(name) {
var fo_obj = xGetElementById("menu_fo");
var target = fo_obj.target.value;
if(window.opener && target) {
var obj = window.opener.xGetElementById(target);
if(obj) obj.value = '$user_lang->'+name;
}
window.close();
}
function completeInsertLang(ret_obj) {
doInsertLangCode(ret_obj['name']);
}
function doDeleteLang(name) {
var params = new Array();
params['name'] = name;
var response_args = new Array('error','message');
exec_xml('module','procModuleAdminDeleteLang',params, completeDeleteLang);
}
function completeDeleteLang(ret_obj) {
location.href = current_url.setQuery('name','');
}
function doFillLangName() {
var fo_obj = xGetElementById("menu_fo");
var target = fo_obj.target.value;
if(window.opener && window.opener.xGetElementById(target)) {
var value = window.opener.xGetElementById(target).value;
if(/^\$user_lang->/.test(value)) {
var param = new Array();
param['name'] = value.replace(/^\$user_lang->/,'');
var response_tags = new Array('error','message','name','langs');
exec_xml('module','getModuleAdminLangCode',param,completeFillLangName, response_tags);
}
}
}
function completeFillLangName(ret_obj, response_tags) {
var name = ret_obj['name'];
var langs = ret_obj['langs'];
if(typeof(langs)=='undefined') return;
var fo_obj = xGetElementById("menu_fo");
fo_obj.lang_code.value = name;
for(var i in langs) {
fo_obj[i].value = langs[i];
}
}

View file

@ -0,0 +1,7 @@
<div id="popHeader" class="wide">
<h3 class="xeAdmin">{$lang->bundle_addition_setup}</h3>
</div>
<div id="popBody">
{$setup_content}
</div>

View file

@ -0,0 +1,58 @@
<!--%import("js/module_admin.js")-->
<!--%import("filter/insert_modules_grant.xml")-->
<script type="text/javascript">
jQuery( function() { jQuery('.grant_default').change( function(event) { doShowGrantZone(); } ); doShowGrantZone() } );
</script>
<div id="popHeader" class="wide">
<h3 class="xeAdmin">{$lang->bundle_grant_setup}</h3>
</div>
<form action="./" method="post" onsubmit="return procFilter(this, insert_modules_grant)" id="fo_obj">
<input type="hidden" name="module_srls" value="{$module_srls}" />
<div id="popBody">
<h4 class="xeAdmin">{$lang->about_grant}</h4>
<p class="summary">{$lang->about_grant_deatil}</p>
<table cellspacing="0" class="crossTable">
<thead>
<tr>
<th scope="col"><div>{$lang->grant}</div></th>
<th scope="col" colspan="3"><div>{$lang->target}</div></th>
</tr>
</thead>
<tbody>
<!--@foreach($grant_list as $grant_name => $grant_item)-->
<tr class="row{$cycle_idx}">
<th scope="row"><div>{$grant_item->title}</div></th>
<td class="wide">
<select name="{$grant_name}_default" class="grant_default">
<!--@if($grant_item->default == 'guest')--><option value="0">{$lang->grant_to_all}</option><!--@end-->
<!--@if($grant_item->default != 'manager')--><option value="-1">{$lang->grant_to_login_user}</option><!--@end-->
<!--@if($grant_item->default != 'manager')--><option value="-2" <!--@if($default_grant[$grant_name]=='site')-->selected="selected"<!--@end-->>{$lang->grant_to_site_user}</option><!--@end-->
<option value="">{$lang->grant_to_group}</option>
</select>
<div id="zone_{$grant_name}" style="display:none">
<!--@foreach($group_list as $group_srl => $group_item)-->
<input type="checkbox" class="checkbox" name="{$grant_name}" value="{$group_item->group_srl}" id="grant_{$grant_name}_{$group_srl}" />
<label for="grant_{$grant_name}_{$group_srl}">{$group_item->title}</label>
<!--@end-->
</div>
</td>
</tr>
<!--@end-->
</tbody>
</table>
</div>
<div id="popFooter">
<span class="button black strong"><input type="submit" value="{$lang->cmd_registration}" /></span>
</div>
</form>

View file

@ -0,0 +1,73 @@
<!--%import("filter/insert_grant.xml")-->
<!--%import("js/module_admin.js")-->
<script type="text/javascript">
jQuery( function() { jQuery('.grant_default').change( function(event) { doShowGrantZone(); } ); doShowGrantZone() } );
</script>
<form action="./" method="post" onsubmit="return procFilter(this, insert_grant)" id="fo_obj">
<input type="hidden" name="module_srl" value="{$module_srl}" />
<input type="hidden" name="admin_member" value="<!--@foreach($admin_member as $key => $val)-->{$val->user_id},<!--@end-->" />
<h4 class="xeAdmin">{$lang->about_admin_id}</h4>
<table cellspacing="0" class="rowTable">
<tr>
<th scope="row" rowspan="2"><div>{$lang->admin_id}</div></th>
<td class="wide">
<select name="_admin_member" multiple="multiple" size="{count($admin_member)?count($admin_member):1}" class="w200">
<!--@foreach($admin_member as $key => $val)-->
<option value="{$val->user_id}">{$val->nick_name} ({$val->user_id})</option>
<!--@end-->
</select>
</td>
</tr>
<tr>
<th class="wide">
<input type="text" name="admin_id" class="inputTypeText w100" />
<span class="button black strong"><button type="button" onclick="doInsertAdmin()">{$lang->cmd_insert}</button></span>
<span class="button"><button type="button" onclick="doDeleteAdmin()">{$lang->cmd_delete}</button></span>
</th>
</tr>
</table>
<h4 class="xeAdmin">{$lang->about_grant}</h4>
<p class="summary">{$lang->about_grant_deatil}</p>
<table cellspacing="0" class="crossTable">
<thead>
<tr>
<th scope="col"><div>{$lang->grant}</div></th>
<th scope="col" colspan="3"><div>{$lang->target}</div></th>
</tr>
</thead>
<tbody>
<!--@foreach($grant_list as $grant_name => $grant_item)-->
<tr class="row{$cycle_idx}">
<th scope="row"><div>{$grant_item->title}</div></th>
<td class="wide">
<select name="{$grant_name}_default" class="grant_default">
<!--@if($grant_item->default == 'guest')--><option value="0" <!--@if($default_grant[$grant_name]=='all')-->selected="selected"<!--@end-->>{$lang->grant_to_all}</option><!--@end-->
<!--@if($grant_item->default != 'manager')--><option value="-1" <!--@if($default_grant[$grant_name]=='member')-->selected="selected"<!--@end-->>{$lang->grant_to_login_user}</option><!--@end-->
<!--@if($grant_item->default != 'manager')--><option value="-2" <!--@if($default_grant[$grant_name]=='site')-->selected="selected"<!--@end-->>{$lang->grant_to_site_user}</option><!--@end-->
<option value="" <!--@if($default_grant[$grant_name]=='group')-->selected="selected"<!--@end-->>{$lang->grant_to_group}</option>
</select>
<div id="zone_{$grant_name}" style="display:none">
<!--@foreach($group_list as $group_srl => $group_item)-->
<input type="checkbox" class="checkbox" name="{$grant_name}" value="{$group_item->group_srl}" id="grant_{$grant_name}_{$group_srl}" <!--@if(is_array($selected_group[$grant_name])&&in_array($group_srl,$selected_group[$grant_name]))-->checked="checked"<!--@end-->/>
<label for="grant_{$grant_name}_{$group_srl}">{$group_item->title}</label>
<!--@end-->
</div>
</td>
</tr>
<!--@end-->
<tr>
<th class="button" colspan="2">
<span class="button black strong"><input type="submit" value="{$lang->cmd_save}" accesskey="s" /></span>
<span class="button"><input type="button" value="{$lang->cmd_back}" onclick="history.back(); return false;" /></span>
</th>
</tr>
</tbody>
</table>
</form>

View file

@ -1,10 +1,10 @@
<div id="popHeadder">
<h3>{$lang->module_maker}</h3>
<div id="popHeader" class="wide">
<h3 class="xeAdmin">{$lang->module_maker}</h3>
</div>
<div id="popBody">
<table cellspacing="0" class="adminTable">
<table cellspacing="0" class="rowTable">
<tr>
<th scope="row"><div>{$lang->title}</div></th>
<td>{$module_info->title} ver {$module_info->version}</td>
@ -49,11 +49,11 @@
<!--@if($module_info->history)-->
<div id="popHistoryHeadder">
<h3>{$lang->module_history}</h3>
<h3 class="xeAdmin">{$lang->module_history}</h3>
</div>
<div id="popHistoryBody">
<table cellspacing="0" class="adminTable">
<table cellspacing="0" class="rowTable">
<col width="100" />
<col />
@ -87,7 +87,3 @@
</table>
</div>
<!--@endif-->
<div id="popFooter" class="tCenter gap1">
<a href="#" onclick="window.close(); return false;" class="button"><span>{$lang->cmd_close}</span></a>
</div>

View file

@ -0,0 +1,64 @@
<!--%import("./filter/insert_lang.xml")-->
<!--%import("./js/module_admin.js")-->
<div id="popHeader" class="wide">
<h3 class="xeAdmin">{$lang->lang_code}</h3>
</div>
<div id="popBody" style="width:700px;">
<table cellspacing="0" class="colTable" style="width:700px;">
<col width="50%"/>
<col width="50%"/>
<tr>
<td>
<table cellspacing="0" class="rowTable">
<tbody>
<!--@foreach($lang_list as $key => $val)-->
<tr>
<td>
<div class="fl"><a href="#" onclick="doInsertLangCode('{$val->name}','{$target}'); return false;">{$val->name}</a></div>
<div class="fr">
<a href="{getUrl('name',$val->name)}" class="buttonSet buttonActive"><span>{$lang->cmd_select}</span></a>
<a href="#" onclick="if(confirm('{$lang->confirm_delete}')) doDeleteLang('{$val->name}','{$target}'); return false;" class="buttonSet buttonDelete"><span>{$lang->cmd_select}</span></a>
</div>
</td>
</tr>
<!--@end-->
</tbody>
</table>
</td>
<td>
<form action="./" method="post" onsubmit="return procFilter(this, insert_lang)" id="menu_fo">
<input type="hidden" name="target" value="{$target}" />
<table cellspacing="0" class="rowTable">
<tbody>
<tr>
<th scope="row"><div>{$lang->lang_code}</div></th>
<td>
<input type="text" name="lang_code" value="{$name}" class="inputTypeText w200" />
</td>
</tr>
<!--@foreach($lang_supported as $key => $val)-->
<tr>
<th scope="row"><div>{$val}</div></th>
<td>
<textarea name="{$key}" class="inputTypeTextArea" style="height:40px; width:90%;">{$selected_lang[$key]}</textarea>
</td>
</tr>
<!--@end-->
<tr>
<th class="button" colspan="2">
<span class="button black strong"><input type="submit" value="{$lang->cmd_save}"></span>
</th>
</tr>
</tbody>
</table>
</form>
</td>
</tr>
</table>
</div>
<script type="text/javascript">
xAddEventListener(window,'load', doFillLangName);
</script>

View file

@ -5,8 +5,8 @@
<form id="fo_shortcut" action="./" method="get">
<input type="hidden" name="selected_module" value="" />
</form>
<table cellspacing="0" class="adminTable">
<caption>{$lang->module}</caption>
<h4 class="xeAdmin">{$lang->module}</h4>
<table cellspacing="0" class="rowTable">
<thead>
<tr>
<th class="wide"><div>{$lang->module_name}</div></th>

View file

@ -1,16 +1,16 @@
<!--%import("./js/module_admin.js")-->
<div id="popHeadder">
<h3>{$lang->module_selector}</h3>
<div id="popHeader" class="wide">
<h3 class="xeAdmin">{$lang->module_selector}</h3>
</div>
<div id="popBody">
<form action="./" method="post">
<input type="hidden" name="module" value="module" />
<input type="hidden" name="act" value="dispModuleAdminSelectList" />
<input type="hidden" name="act" value="dispModuleSelectList" />
<input type="hidden" name="id" value="{$id}" />
<input type="hidden" name="type" value="{$type}" />
<table class="adminTable" cellspacing="0">
<table class="rowTable" cellspacing="0">
<tbody>
<!--@if($site_count && $logged_info->is_admin == 'Y')-->
<tr>
@ -33,7 +33,7 @@
</tr>
</tbody>
</table>
<table class="adminTable" cellspacing="0">
<table class="rowTable" cellspacing="0">
<thead>
<tr>
<!--@if($module_category_exists)--><th><div>{$lang->module_category}</div></th><!--@end-->
@ -74,7 +74,3 @@
</form>
</div>
<div id="popFooter" class="tCenter gap1">
<span class="button red"><input type="button" value="{$lang->cmd_close}" onclick="window.close(); return false;"/></span>
</div>

View file

@ -0,0 +1,78 @@
<!--%import("./filter/insert_module_setup.xml")-->
<!--%import("./js/module_admin.js")-->
<div id="popHeader" class="wide">
<h3 class="xeAdmin">{$lang->bundle_setup}</h3>
</div>
<form action="./" method="post" onsubmit="return procFilter(this, insert_module_setup)" enctype="multipart/form-data">
<input type="hidden" name="module_srls" value="{$module_srls}" />
<div id="popBody">
<table cellspacing="0" class="rowTable">
<tr>
<th scope="row"><div>{$lang->module_category}</div></th>
<td>
<select name="module_category_srl">
<option value="0">{$lang->notuse}</option>
<!--@foreach($module_category as $key => $val)-->
<option value="{$key}" <!--@if($module_info->module_category_srl==$key)-->selected="selected"<!--@end-->>{$val->title}</option>
<!--@end-->
</select>
<p>{$lang->about_module_category}</p>
</td>
</tr>
<tr>
<th scope="row"><div>{$lang->layout}</div></th>
<td>
<select name="layout_srl">
<option value="0">{$lang->notuse}</option>
<!--@foreach($layout_list as $key => $val)-->
<option value="{$val->layout_srl}" <!--@if($module_info->layout_srl==$val->layout_srl)-->selected="selected"<!--@end-->>{$val->title} ({$val->layout})</option>
<!--@end-->
</select>
<p>{$lang->about_layout}</p>
</td>
</tr>
<!--@if(count($skin_list))-->
<tr>
<th scope="row"><div>{$lang->skin}</div></th>
<td>
<select name="skin">
<!--@foreach($skin_list as $key=>$val)-->
<option value="{$key}" <!--@if($module_info->skin==$key ||(!$module_info->skin && $key=='xe_board'))-->selected="selected"<!--@end-->>{$val->title}</option>
<!--@end-->
</select>
<p>{$lang->about_skin}</p>
</td>
</tr>
<!--@end-->
<tr>
<th scope="row"><div>{$lang->description}</div></th>
<td>
<textarea name="description" class="inputTypeTextArea fixWidth">{htmlspecialchars($module_info->description)}</textarea>
<p>{$lang->about_description}</p>
</td>
</tr>
<tr>
<th scope="row"><div>{$lang->header_text}</div></th>
<td>
<textarea name="header_text" class="inputTypeTextArea fixWidth">{htmlspecialchars($module_info->header_text)}</textarea>
<p>{$lang->about_header_text}</p>
</td>
</tr>
<tr>
<th scope="row"><div>{$lang->footer_text}</div></th>
<td>
<textarea name="footer_text" class="inputTypeTextArea fixWidth">{htmlspecialchars($module_info->footer_text)}</textarea>
<p>{$lang->about_footer_text}</p>
</td>
</tr>
</table>
</div>
<div id="popFooter" class="tCenter gap1">
<span class="button black strong"><input type="submit" value="{$lang->cmd_registration}" /></span>
</div>
</form>

View file

@ -0,0 +1,3 @@
<script type="text/javascript">
top.location.href = "{$url}";
</script>

View file

@ -0,0 +1,148 @@
<form action="{Context::getRequestUri()}" method="post" enctype="multipart/form-data" target="hidden_iframe">
<input type="hidden" name="module" value="module" />
<input type="hidden" name="act" value="procModuleAdminUpdateSkinInfo" />
<input type="hidden" name="module_srl" value="{$module_info->module_srl}" />
<input type="hidden" name="page" value="{$page}" />
<h4 class="xeAdmin">{$lang->skin_default_info}</h4>
<table cellspacing="0" class="rowTable">
<tr>
<th scope="row"><div>{$lang->skin}</div></th>
<td class="wide" >{$skin_info->title}</td>
</tr>
<tr>
<th scope="row"><div>{$lang->skin_author}</div></th>
<td>
<!--@foreach($skin_info->author as $author)-->
{$author->name} <!--@if($author->homepage || $author->email_address)-->(<!--@if($author->homepage)--><a href="{$author->homepage}" onclick="window.open(this.href);return false;">{$author->homepage}</a><!--@end--><!--@if($author->homepage && $author->email_address)-->, <!--@end--><!--@if($author->email_address)--><a href="mailto:{$author->email_address}">{$author->email_address}</a><!--@end-->)<!--@end--><br />
<!--@endforeach-->
</td>
</tr>
<!--@if($skin_info->homepage)-->
<tr>
<th scope="row"><div>{$lang->homepage}</div></th>
<td><a href="{$skin_info->homepage}" onclick="window.open(this.href);return false;">{$skin_info->homepage}</a></td>
</tr><!--@end-->
<tr>
<th scope="row"><div>{$lang->date}</div></th>
<td>{zdate($skin_info->date, 'Y-m-d')}&nbsp;</td>
</tr>
<!--@if($skin_info->license || $skin_info->license_link)-->
<tr>
<th scope="row"><div>{$lang->skin_license}</div></th>
<td>
{nl2br(trim($skin_info->license))}
<!--@if($skin_info->license_link)-->
<p><a href="{$skin_info->license_link}" onclick="window.close(); return false;">{$skin_info->license_link}</a></p>
<!--@end-->
</td>
</tr><!--@end-->
<!--@if($skin_info->description)-->
<tr>
<th scope="row"><div>{$lang->description}</div></th>
<td>{nl2br(trim($skin_info->description))}</td>
</tr><!--@end-->
</table>
<h4 class="xeAdmin">{$lang->extra_vars}</h4>
<table cellspacing="0" class="rowTable">
<tr valign="top">
<th scope="row"><div>{$lang->colorset}</div></th>
<td class="wide">
<!--@foreach($skin_info->colorset as $key => $val)-->
<!--@if($val->screenshot)-->
{@ $_img_info = getImageSize($val->screenshot); $_height = $_img_info[1]+40; $_width = $_img_info[0]+20; $_talign = "center"; }
<!--@else-->
{@ $_width = 200; $_height = 20; $_talign = "left"; }
<!--@end-->
<div style="float:left;text-align:{$_talign};margin-bottom:1em;width:{$_width}px;height:{$_height}px;margin-right:10px;">
<input type="radio" name="colorset" value="{$val->name}" id="colorset_{$key}" <!--@if($skin_vars['colorset']->value==$val->name)-->checked="checked"<!--@end-->/>
<label for="colorset_{$key}">{$val->title}</label>
<!--@if($val->screenshot)-->
<br />
<img src="../../../{$val->screenshot}" alt="{$val->title}" style="border:1px solid #888888;padding:2px;margin:2px;"/>
<!--@end-->
</div>
<!--@end-->
</td>
</tr>
<!--@foreach($skin_info->extra_vars as $key => $val)-->
<!--@if($val->group && ((!$group) || $group != $val->group))-->
{@$group = $val->group}
</table>
<h4 class="xeAdmin">{$group}</h4>
<table cellspacing="0" class="rowTable">
<!--@end-->
<tr>
<th scope="row"><div>{$val->title}</div></th>
<td class="wide">
<!--@if($val->type=="text")-->
<input type="text" name="{$val->name}" value="{htmlspecialchars($val->value)}" id="target{$val->name}" class="inputTypeText w400" />
<a href="{getUrl('','module','module','act','dispModuleAdminLangcode','target','target'.$val->name)}" onclick="popopen(this.href);return false;" class="buttonSet buttonSetting"><span>{$lang->cmd_find_langcode}</span></a>
<!--@elseif($val->type=="textarea")-->
<textarea name="{$val->name}" class="inputTypeTextArea w400" id="target{$val->name}">{htmlspecialchars($val->value)}</textarea>
<a href="{getUrl('','module','module','act','dispModuleAdminLangcode','target','target'.$val->name)}" onclick="popopen(this.href);return false;" class="buttonSet buttonSetting"><span>{$lang->cmd_find_langcode}</span></a>
<!--@elseif($val->type=="select")-->
<select name="{$val->name}">
<!--@foreach($val->options as $k=>$v)-->
<option value="{$v->value}" <!--@if($v->value == $val->value)-->selected="selected"<!--@end-->>{$v->title}</option>
<!--@end-->
</select>
<!--@elseif($val->type=="checkbox")-->
<!--@foreach($val->default as $k=>$v)-->
<span>
<input type="checkbox" name="{$val->name}[]" value="{$v}" id="ch_{$key}_{$k}" <!--@if(in_array($v, $val->value))-->checked="checked"<!--@end--> class="checkbox" />
<label for="ch_{$key}_{$k}">{$v}</label>
</span>
<!--@end-->
<!--@elseif($val->type=="radio")-->
<!--@foreach($val->default as $k=>$v)-->
<span>
<input type="radio" name="{$val->name}" value="{$v}" id="ch_{$key}_{$k}" <!--@if($v==$val->value)-->checked="checked"<!--@end-->/>
<label for="ch_{$key}_{$k}">{$v}</label>
</span>
<!--@end-->
<!--@elseif($val->type=="image")-->
<!--@if($val->value)-->
<div>
<img src="{$val->value}" /><br />
<input type="checkbox" name="del_{$val->name}" value="Y" id="del_{$val->name}" class="checkbox" />
<label for="del_{$val->name}">{$lang->cmd_delete}</label>
</div>
<!--@end-->
<input type="file" name="{$val->name}" value="" />
<!--@end-->
<!--@if($val->description)-->
<p>{nl2br(trim($val->description))}</p>
<!--@end-->
</td>
</tr>
<!--@end-->
<!--@if($group)-->
</table>
<table cellspacing="0" class="rowTable">
<!--@end-->
<tr>
<th colspan="2" class="button">
<span class="button black strong"><input type="submit" value="{$lang->cmd_registration}" accesskey="s" /></span>
</th>
</tr>
</table>
</form>
<iframe name="hidden_iframe" frameborder="0" style="display:none"></iframe>

View file

@ -1,10 +1,10 @@
<!--%import("../../admin/tpl/css/admin.css")-->
<div id="popHeadder">
<h3>{$skin_info->title}</h3>
<div id="popHeader" class="wide">
<h3 class="xeAdmin">{$skin_info->title}</h3>
</div>
<div id="popBody">
<table cellspacing="0" class="adminTable">
<table cellspacing="0" class="rowTable">
<col width="100" />
<col />
<tr>
@ -51,11 +51,11 @@
<!--@if($skin_info->history)-->
<div id="popHistoryHeadder">
<h3>{$lang->skin_history}</h3>
<h3 class="xeAdmin">{$lang->skin_history}</h3>
</div>
<div id="popHistoryBody">
<table cellspacing="0" class="adminTable">
<table cellspacing="0" class="rowTable">
<col width="100" />
<col />
@ -89,7 +89,3 @@
</table>
</div>
<!--@endif-->
<div id="popFooter" class="tCenter">
<a href="#" onclick="window.close(); return false;" class="button"><span>{$lang->cmd_close}</span></a>
</div>

View file

@ -0,0 +1,4 @@
<script type="text/javascript">//<![CDATA[
top.location.href = top.location.href;
//]]>
</script>