]*)editor_component=([^\>]*)>(.*?)\<\/div\>!is', array($this,'transEditorComponent'), $content);
$content = preg_replace_callback('!
![]()
]*)editor_component=([^\>]*?)\>!is', array($this,'transEditorComponent'), $content);
+ // style의 url 경로를 재정의 한다.
+ $content = preg_replace('/url\(http:\/\/([^ ]+)http:\/\//is','url(http://', $content);
// body 내의 를 header로 이동
$content = preg_replace_callback('!
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {$content}
+
+
+
+
+
+
+
+
![]()
+
+
+
+
![]()
+
+
+
![]()
+
+
+
![]()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/layouts/xe_official/conf/info.xml b/layouts/xe_official/conf/info.xml
index 2e674a9fc..66015b95d 100644
--- a/layouts/xe_official/conf/info.xml
+++ b/layouts/xe_official/conf/info.xml
@@ -124,15 +124,15 @@
로고이미지
ロゴイメージ
LOGO图片
-
LOGO圖片
+
Logo圖片
Logo image
Logobildes
Изображения логотипа
Imagen del logotipo
레이아웃의 상단에 표시될 로고이미지를 입력하세요. (세로길이가 23px인 투명이미지가 가장 어울립니다)
レイアウトの上段に表示されるロゴイメージを入力してください。 (縦幅が23pxである透明イメージが最も合います。)
-
请输入显示在布局顶部的LOGO图片。(高度为23px的透明图片为适。)
-
請輸入在版面上端要顯示的LOGO圖片。(適當高度為23px的透明圖片。)
+
请输入显示在布局顶部的LOGO图片(高度为23px的透明图片为适)。
+
請輸入要顯示在版面上端的Logo圖片。(適當高度為23px的透明圖片。)
Please input a logo image which will be displayed on the top of layout. (Transparent image with height of 23px is recommended.)
Bitte geben Sie ein Logo das Bild wird auf dem oberen Layout. (Transparent Bild mit einer Höhe von 23px wird empfohlen).
Введите логотип изображение, которое будет отображаться в верхней части формы. (Прозрачный изображение с высотой 23px рекомендуется.)
@@ -150,7 +150,7 @@
로고를 클릭시에 이동할 홈 페이지 URL을 입력해 주세요.
ロゴをクリックした時に移動するホームページのURLを入力してください。
点击网站LOGO时要移动的页面URL。
-
請輸入當用戶按了網站LOGO後,要前往的頁面網址。
+
請輸入當用戶按了網站Logo後,要前往的頁面網址。
Please input the URL to redirect when user clicks the logo
Bitte geben Sie die URL umzuleiten, wenn Benutzer klickt das Logo
Пожалуйста, введите URL для перенаправления, когда пользователь нажимает логотип
diff --git a/layouts/xe_official/css/default.css b/layouts/xe_official/css/default.css
index 304f991a7..78a86ffa7 100644
--- a/layouts/xe_official/css/default.css
+++ b/layouts/xe_official/css/default.css
@@ -1,92 +1,92 @@
-@charset "utf-8";
-/*
-NHN UIT Lab. WebStandardization Team (http://html.nhndesign.com/)
-Jeong, Chan Myeong 070601~070630
-*/
-
-/* Default Skin - Start */
-#selectLang { margin:0; padding:0; }
-#gnb { margin:0; padding:0; }
-#lnb { margin:0; padding:0; }
-#lnb ul { margin:0; padding:0; }
-
-/* Site Layout - Body Wrap */
-body { background:#FFFFFF url(../images/default/bgBody.gif) repeat-x left top; }
-#bodyWrap { width:980px; margin:1.5em auto 0 auto; }
-
-/* Site Layout - Header */
-#header { position:relative; width:980px; height:120px; background:url(../images/default/bgHeader.jpg) no-repeat right top; margin-bottom:10px; z-index:99;}
-#header h1 { margin:0; padding:0; position:absolute; top:32px; left:25px;}
-#language { position:absolute; top:18px; right:19px; z-index:100;}
-#language strong { color:#ffffff; font:.75em Tahoma; margin-right:3px;}
-#language a img { vertical-align:-5px;}
-#language ul { position:absolute; top:15px; right:0px; display:none; border:1px solid #b23628; background:#de4332;}
-#language ul li { list-style:none; }
-#language ul li a { display:block; width:61px; padding:3px 8px; font:9px Tahoma; color:#ffffff; text-decoration:none;}
-#language ul li a:hover { background:#bc4032;}
-
-#it_search_form { position:absolute; top:50px; right:15px;}
-#it_search_form .input { border:1px solid #bc4032; height:17px; width:120px; color:#888888; font-size:.9em;}
-#it_search_form .submit_button { width:1px; height:1px; visibility:hidden; }
-
-#gnb { position:absolute; top:82px; left:0; height:38px; overflow:hidden; white-space:nowrap; margin-bottom:10px;}
-#gnb li { float:left; list-style:none; background:url(../images/default/bgGnbVr.gif) no-repeat left center; padding-left:2px; position:relative; left:-2px; white-space:nowrap;}
-#gnb li a { display:block; float:left; padding:13px 15px 0 15px; height:25px; color:#e8e8e8; white-space:nowrap; text-decoration:none; }
-#gnb li a:hover,
-#gnb li a:focus { color:#ffffff;}
-#gnb li.on a { font-weight:bold; color:#ffffff; background:url(../images/default/bgGnbOn.gif) no-repeat center top;}
-
-#isSearch { position:absolute; top:48px; right:15px; width:214px; text-align:right;}
-#isSearch .searchOrder { display:none;}
-#isSearch .checked { position:absolute; left:0; top:0; text-align:left; display:block; padding:5px 0 0 5px; width:64px; height:14px; background:url(../images/default/bgSearchTerm.gif) no-repeat; font:11px "돋움", Dotum, "굴림", Gulim, AppleGothic, Sans-serif; color:#ffffff; line-height:normal;}
-*:first-child+html #isSearch .checked { top:1px; }
-#isSearch ul { display:none; position:absolute; left:0; top:18px; padding:2px 0 3px 0; text-align:left; border:1px solid #919898; background:#536c6d;}
-#isSearch ul li { width:67px; height:18px; list-style:none; }
-#isSearch ul li input { display:none;}
-#isSearch ul li label { display:block; padding:4px 0 0 4px; width:63px; height:15px; font:11px "돋움", Dotum, "굴림", Gulim, AppleGothic, Sans-serif; color:#ffffff;}
-#isSearch ul li label.on { background:#455a5b; }
-#isSearch ul li label:hover,
-#isSearch ul li label:focus { background:#455a5b;}
-#isSearch .inputText { vertical-align:middle; position:relative; top:0; _top:-1px; left:1px; padding:3px 3px 1px 3px; width:94px; height:13px; color:#ffffff; border:1px solid #8E8E8D; background-color:#857C79; }
-#isSearch .inputText:hover,
-#isSearch .inputText:focus { border:1px solid #B0B0AF; background-color:#A9A4A3; }
-*:first-child+html body#default #isSearch .inputText { position:relative; top:-1px;}
-#isSearch .submit { vertical-align:middle; _position:relative; _top:-1px;}
-*:first-child+html body#default #isSearch .submit { position:relative; top:-1px;}
-
-/* Site Layout - Content Body */
-#contentBody { position:relative; width:980px; padding-bottom:30px; overflow:hidden; background:url(../images/default/bgContentBody.gif) repeat-y left top; border-bottom:1px solid #dddddd;}
-
-/* Site Layout - Column Left */
-#columnLeft { position:relative; width:201px; float:left;}
-#columnLeft .mask { width:201px; height:5px; background:#ffffff; display:block; clear:both;}
-
-#lnb { border-top:1px solid #dddddd; padding:4px 5px; width:190px;}
-#lnb li { padding-bottom:4px; list-style:none; }
-#lnb li a { padding:6px 5px 6px 13px; width:170px; display:block; border:1px solid #e8e8e8; background:url(../images/default/bgLnbOff.gif) repeat-x; color:#3e3e3e; position:relative; z-index:99; text-decoration:none;}
-#lnb li a:hover,
-#lnb li a:focus { color:#ffffff; background:#de4332; border:1px solid #de4332;}
-#lnb li.on a { color:#ffffff; background:#de4332; border:1px solid #de4332;}
-#lnb li.on a:hover,
-#lnb li.on a:focus { font-weight:bold;}
-#lnb li ul { display:block; position:relative; width:184px; padding:0 3px; border-top:1px solid #ffffff; overflow:hidden;}
-#lnb li.on ul { display:block;}
-#lnb li ul li { padding:0; border-top:1px solid #f2f2f2; position:relative; top:-1px;}
-#lnb li ul li a { padding:6px 5px 6px 10px; width:169px; color:#818181 !important; border:none; background:none !important; border:none !important;}
-#lnb li ul li a:hover,
-#lnb li ul li a:focus { font-weight:normal !important; color:#de4332 !important;}
-#lnb li.on ul li.on a { color:#ff1a00 !important; font-weight:bold !important; background:url(../images/default/bulletLnb.gif) no-repeat 175px center !important;}
-
-/* Site Layout - Column Right */
-#columnRight { width:770px; float:right; overflow:hidden;}
-#visualArea { width:770px; height:200px; background:#f5f5f5; margin-bottom:2.5em; position:relative; left:-15px; margin-right:-15px;}
-#content { width:100%; overflow:hidden;}
-
-/* Site Layout - Footer */
-#footer { margin:0; padding:0; border-top:3px solid #f4f4f4; text-align:center; padding:2em 0 4em; clear:both;}
-#footer li { display:inline; padding:0 .6em 0 1em; background:url(../images/default/vrType1.gif) no-repeat left center;}
-#footer li.first-child { background:none;}
-#footer li a { color:#999999; font:.9em "돋움", Dotum, "굴림", Gulim, AppleGothic, Sans-serif;}
-#footer li address { display:inline; }
-
-/* Default Skin - End */
+@charset "utf-8";
+/*
+NHN UIT Lab. WebStandardization Team (http://html.nhndesign.com/)
+Jeong, Chan Myeong 070601~070630
+*/
+
+/* Default Skin - Start */
+#selectLang { margin:0; padding:0; }
+#gnb { margin:0; padding:0; }
+#lnb { margin:0; padding:0; }
+#lnb ul { margin:0; padding:0; }
+
+/* Site Layout - Body Wrap */
+body { background:#FFFFFF url(../images/default/bgBody.gif) repeat-x left top;}
+#bodyWrap { width:980px; margin:1.5em auto 0 auto; }
+
+/* Site Layout - Header */
+#header { position:relative; width:980px; height:120px; background:url(../images/default/bgHeader.jpg) no-repeat right top; margin-bottom:10px; z-index:99;}
+#header h1 { margin:0; padding:0; position:absolute; top:32px; left:25px;}
+#language { position:absolute; top:18px; right:19px; z-index:100;}
+#language strong { color:#ffffff; font:.75em Tahoma; margin-right:3px;}
+#language a img { vertical-align:-5px;}
+#language ul { position:absolute; top:15px; right:0px; display:none; border:1px solid #b23628; background:#de4332;}
+#language ul li { list-style:none; }
+#language ul li a { display:block; width:61px; padding:3px 8px; font:9px Tahoma; color:#ffffff; text-decoration:none;}
+#language ul li a:hover { background:#bc4032;}
+
+#it_search_form { position:absolute; top:50px; right:15px;}
+#it_search_form .input { border:1px solid #bc4032; height:17px; width:120px; color:#888888; font-size:.9em;}
+#it_search_form .submit_button { width:1px; height:1px; visibility:hidden; }
+
+#gnb { position:absolute; top:82px; left:0; height:38px; overflow:hidden; white-space:nowrap; margin-bottom:10px;}
+#gnb li { float:left; list-style:none; background:url(../images/default/bgGnbVr.gif) no-repeat left center; padding-left:2px; position:relative; left:-2px; white-space:nowrap;}
+#gnb li a { display:block; float:left; padding:13px 15px 0 15px; height:25px; color:#e8e8e8; white-space:nowrap; text-decoration:none; }
+#gnb li a:hover,
+#gnb li a:focus { color:#ffffff;}
+#gnb li.on a { font-weight:bold; color:#ffffff; background:url(../images/default/bgGnbOn.gif) no-repeat center top;}
+
+#isSearch { position:absolute; top:48px; right:15px; width:214px; text-align:right;}
+#isSearch .searchOrder { display:none;}
+#isSearch .checked { position:absolute; left:0; top:0; text-align:left; display:block; padding:5px 0 0 5px; width:64px; height:14px; background:url(../images/default/bgSearchTerm.gif) no-repeat; font:11px "돋움", Dotum, "굴림", Gulim, AppleGothic, Sans-serif; color:#ffffff; line-height:normal;}
+*:first-child+html #isSearch .checked { top:1px; }
+#isSearch ul { display:none; position:absolute; left:0; top:18px; padding:2px 0 3px 0; text-align:left; border:1px solid #919898; background:#536c6d;}
+#isSearch ul li { width:67px; height:18px; list-style:none; }
+#isSearch ul li input { display:none;}
+#isSearch ul li label { display:block; padding:4px 0 0 4px; width:63px; height:15px; font:11px "돋움", Dotum, "굴림", Gulim, AppleGothic, Sans-serif; color:#ffffff;}
+#isSearch ul li label.on { background:#455a5b; }
+#isSearch ul li label:hover,
+#isSearch ul li label:focus { background:#455a5b;}
+#isSearch .inputText { vertical-align:middle; position:relative; top:0; _top:-1px; left:1px; padding:3px 3px 1px 3px; width:94px; height:13px; color:#ffffff; border:1px solid #8E8E8D; background-color:#857C79; }
+#isSearch .inputText:hover,
+#isSearch .inputText:focus { border:1px solid #B0B0AF; background-color:#A9A4A3; }
+*:first-child+html body#default #isSearch .inputText { position:relative; top:-1px;}
+#isSearch .submit { vertical-align:middle; _position:relative; _top:-1px;}
+*:first-child+html body#default #isSearch .submit { position:relative; top:-1px;}
+
+/* Site Layout - Content Body */
+#contentBody { position:relative; width:980px; padding-bottom:30px; overflow:hidden; background:url(../images/default/bgContentBody.gif) repeat-y left top; border-bottom:1px solid #dddddd;}
+
+/* Site Layout - Column Left */
+#columnLeft { position:relative; width:201px; float:left;}
+#columnLeft .mask { width:201px; height:5px; background:#ffffff; display:block; clear:both;}
+
+#lnb { border-top:1px solid #dddddd; padding:4px 5px; width:190px;}
+#lnb li { padding-bottom:4px; list-style:none; }
+#lnb li a { padding:6px 5px 6px 13px; width:170px; display:block; border:1px solid #e8e8e8; background:url(../images/default/bgLnbOff.gif) repeat-x; color:#3e3e3e; position:relative; z-index:99; text-decoration:none;}
+#lnb li a:hover,
+#lnb li a:focus { color:#ffffff; background:#de4332; border:1px solid #de4332;}
+#lnb li.on a { color:#ffffff; background:#de4332; border:1px solid #de4332;}
+#lnb li.on a:hover,
+#lnb li.on a:focus { font-weight:bold;}
+#lnb li ul { display:block; position:relative; width:184px; padding:0 3px; border-top:1px solid #ffffff; overflow:hidden;}
+#lnb li.on ul { display:block;}
+#lnb li ul li { padding:0; border-top:1px solid #f2f2f2; position:relative; top:-1px;}
+#lnb li ul li a { padding:6px 5px 6px 10px; width:169px; color:#818181 !important; border:none; background:none !important; border:none !important;}
+#lnb li ul li a:hover,
+#lnb li ul li a:focus { font-weight:normal !important; color:#de4332 !important;}
+#lnb li.on ul li.on a { color:#ff1a00 !important; font-weight:bold !important; background:url(../images/default/bulletLnb.gif) no-repeat 175px center !important;}
+
+/* Site Layout - Column Right */
+#columnRight { width:770px; float:right; overflow:hidden;}
+#visualArea { width:770px; height:200px; background:#f5f5f5; margin-bottom:2.5em; position:relative; left:-15px; margin-right:-15px;}
+#content { width:100%; overflow:hidden;}
+
+/* Site Layout - Footer */
+#footer { margin:0; padding:0; border-top:3px solid #f4f4f4; text-align:center; padding:2em 0 4em; clear:both;}
+#footer li { display:inline; padding:0 .6em 0 1em; background:url(../images/default/vrType1.gif) no-repeat left center;}
+#footer li.first-child { background:none;}
+#footer li a { color:#999999; font:.9em "돋움", Dotum, "굴림", Gulim, AppleGothic, Sans-serif;}
+#footer li address { display:inline; }
+
+/* Default Skin - End */
diff --git a/layouts/xe_official/layout.html b/layouts/xe_official/layout.html
index 30fa8a810..94de21107 100644
--- a/layouts/xe_official/layout.html
+++ b/layouts/xe_official/layout.html
@@ -1,107 +1,106 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {@$layout_info->colorset = "default"}
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {@$layout_info->colorset = "default"}
+
+
diff --git a/libs/tar.class.php b/libs/tar.class.php
new file mode 100644
index 000000000..d6d72f4e4
--- /dev/null
+++ b/libs/tar.class.php
@@ -0,0 +1,558 @@
+
+
+Description:
+ This class reads and writes Tape-Archive (TAR) Files and Gzip
+ compressed TAR files, which are mainly used on UNIX systems.
+ This class works on both windows AND unix systems, and does
+ NOT rely on external applications!! Woohoo!
+
+Usage:
+ Copyright (C) 2002 Josh Barger
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details at:
+ http://www.gnu.org/copyleft/lesser.html
+
+ If you use this script in your application/website, please
+ send me an e-mail letting me know about it :)
+
+Bugs:
+ Please report any bugs you might find to my e-mail address
+ at joshb@npt.com. If you have already created a fix/patch
+ for the bug, please do send it to me so I can incorporate it into my release.
+
+Version History:
+ 1.0 04/10/2002 - InitialRelease
+
+ 2.0 04/11/2002 - Merged both tarReader and tarWriter
+ classes into one
+ - Added support for gzipped tar files
+ Remember to name for .tar.gz or .tgz
+ if you use gzip compression!
+ :: THIS REQUIRES ZLIB EXTENSION ::
+ - Added additional comments to
+ functions to help users
+ - Added ability to remove files and
+ directories from archive
+ 2.1 04/12/2002 - Fixed serious bug in generating tar
+ - Created another example file
+ - Added check to make sure ZLIB is
+ installed before running GZIP
+ compression on TAR
+ 2.2 05/07/2002 - Added automatic detection of Gzipped
+ tar files (Thanks go to J?gen Falch
+ for the idea)
+ - Changed "private" functions to have
+ special function names beginning with
+ two underscores
+=======================================================================
+*/
+
+class tar {
+ // Unprocessed Archive Information
+ var $filename;
+ var $isGzipped;
+ var $tar_file;
+
+ // Processed Archive Information
+ var $files;
+ var $directories;
+ var $numFiles;
+ var $numDirectories;
+
+
+ // Class Constructor -- Does nothing...
+ function tar() {
+ return true;
+ }
+
+
+ // Computes the unsigned Checksum of a file's header
+ // to try to ensure valid file
+ // PRIVATE ACCESS FUNCTION
+ function __computeUnsignedChecksum($bytestring) {
+ for($i=0; $i<512; $i++)
+ $unsigned_chksum += ord($bytestring[$i]);
+ for($i=0; $i<8; $i++)
+ $unsigned_chksum -= ord($bytestring[148 + $i]);
+ $unsigned_chksum += ord(" ") * 8;
+
+ return $unsigned_chksum;
+ }
+
+
+ // Converts a NULL padded string to a non-NULL padded string
+ // PRIVATE ACCESS FUNCTION
+ function __parseNullPaddedString($string) {
+ $position = strpos($string,chr(0));
+ return substr($string,0,$position);
+ }
+
+
+ // This function parses the current TAR file
+ // PRIVATE ACCESS FUNCTION
+ function __parseTar() {
+ // Read Files from archive
+ $tar_length = strlen($this->tar_file);
+ $main_offset = 0;
+ while($main_offset < $tar_length) {
+ // If we read a block of 512 nulls, we are at the end of the archive
+ if(substr($this->tar_file,$main_offset,512) == str_repeat(chr(0),512))
+ break;
+
+ // Parse file name
+ $file_name = $this->__parseNullPaddedString(substr($this->tar_file,$main_offset,100));
+
+ // Parse the file mode
+ $file_mode = substr($this->tar_file,$main_offset + 100,8);
+
+ // Parse the file user ID
+ $file_uid = octdec(substr($this->tar_file,$main_offset + 108,8));
+
+ // Parse the file group ID
+ $file_gid = octdec(substr($this->tar_file,$main_offset + 116,8));
+
+ // Parse the file size
+ $file_size = octdec(substr($this->tar_file,$main_offset + 124,12));
+
+ // Parse the file update time - unix timestamp format
+ $file_time = octdec(substr($this->tar_file,$main_offset + 136,12));
+
+ // Parse Checksum
+ $file_chksum = octdec(substr($this->tar_file,$main_offset + 148,6));
+
+ // Parse user name
+ $file_uname = $this->__parseNullPaddedString(substr($this->tar_file,$main_offset + 265,32));
+
+ // Parse Group name
+ $file_gname = $this->__parseNullPaddedString(substr($this->tar_file,$main_offset + 297,32));
+
+ // Make sure our file is valid
+ if($this->__computeUnsignedChecksum(substr($this->tar_file,$main_offset,512)) != $file_chksum)
+ return false;
+
+ // Parse File Contents
+ $file_contents = substr($this->tar_file,$main_offset + 512,$file_size);
+
+ /* ### Unused Header Information ###
+ $activeFile["typeflag"] = substr($this->tar_file,$main_offset + 156,1);
+ $activeFile["linkname"] = substr($this->tar_file,$main_offset + 157,100);
+ $activeFile["magic"] = substr($this->tar_file,$main_offset + 257,6);
+ $activeFile["version"] = substr($this->tar_file,$main_offset + 263,2);
+ $activeFile["devmajor"] = substr($this->tar_file,$main_offset + 329,8);
+ $activeFile["devminor"] = substr($this->tar_file,$main_offset + 337,8);
+ $activeFile["prefix"] = substr($this->tar_file,$main_offset + 345,155);
+ $activeFile["endheader"] = substr($this->tar_file,$main_offset + 500,12);
+ */
+
+ if($file_size > 0) {
+ // Increment number of files
+ $this->numFiles++;
+
+ // Create us a new file in our array
+ $activeFile = &$this->files[];
+
+ // Asign Values
+ $activeFile["name"] = $file_name;
+ $activeFile["mode"] = $file_mode;
+ $activeFile["size"] = $file_size;
+ $activeFile["time"] = $file_time;
+ $activeFile["user_id"] = $file_uid;
+ $activeFile["group_id"] = $file_gid;
+ $activeFile["user_name"] = $file_uname;
+ $activeFile["group_name"] = $file_gname;
+ $activeFile["checksum"] = $file_chksum;
+ $activeFile["file"] = $file_contents;
+
+ } else {
+ // Increment number of directories
+ $this->numDirectories++;
+
+ // Create a new directory in our array
+ $activeDir = &$this->directories[];
+
+ // Assign values
+ $activeDir["name"] = $file_name;
+ $activeDir["mode"] = $file_mode;
+ $activeDir["time"] = $file_time;
+ $activeDir["user_id"] = $file_uid;
+ $activeDir["group_id"] = $file_gid;
+ $activeDir["user_name"] = $file_uname;
+ $activeDir["group_name"] = $file_gname;
+ $activeDir["checksum"] = $file_chksum;
+ }
+
+ // Move our offset the number of blocks we have processed
+ $main_offset += 512 + (ceil($file_size / 512) * 512);
+ }
+
+ return true;
+ }
+
+
+ // Read a non gzipped tar file in for processing
+ // PRIVATE ACCESS FUNCTION
+ function __readTar($filename='') {
+ // Set the filename to load
+ if(!$filename)
+ $filename = $this->filename;
+
+ // Read in the TAR file
+ $fp = fopen($filename,"rb");
+ $this->tar_file = fread($fp,filesize($filename));
+ fclose($fp);
+
+ if($this->tar_file[0] == chr(31) && $this->tar_file[1] == chr(139) && $this->tar_file[2] == chr(8)) {
+ if(!function_exists("gzinflate"))
+ return false;
+
+ $this->isGzipped = TRUE;
+
+ $this->tar_file = gzinflate(substr($this->tar_file,10,-4));
+ }
+
+ // Parse the TAR file
+ $this->__parseTar();
+
+ return true;
+ }
+
+
+ // Generates a TAR file from the processed data
+ // PRIVATE ACCESS FUNCTION
+ function __generateTAR() {
+ // Clear any data currently in $this->tar_file
+ unset($this->tar_file);
+
+ // Generate Records for each directory, if we have directories
+ if($this->numDirectories > 0) {
+ foreach($this->directories as $key => $information) {
+ unset($header);
+
+ // Generate tar header for this directory
+ // Filename, Permissions, UID, GID, size, Time, checksum, typeflag, linkname, magic, version, user name, group name, devmajor, devminor, prefix, end
+ $header .= str_pad($information["name"],100,chr(0));
+ $header .= str_pad(decoct($information["mode"]),7,"0",STR_PAD_LEFT) . chr(0);
+ $header .= str_pad(decoct($information["user_id"]),7,"0",STR_PAD_LEFT) . chr(0);
+ $header .= str_pad(decoct($information["group_id"]),7,"0",STR_PAD_LEFT) . chr(0);
+ $header .= str_pad(decoct(0),11,"0",STR_PAD_LEFT) . chr(0);
+ $header .= str_pad(decoct($information["time"]),11,"0",STR_PAD_LEFT) . chr(0);
+ $header .= str_repeat(" ",8);
+ $header .= "5";
+ $header .= str_repeat(chr(0),100);
+ $header .= str_pad("ustar",6,chr(32));
+ $header .= chr(32) . chr(0);
+ $header .= str_pad("",32,chr(0));
+ $header .= str_pad("",32,chr(0));
+ $header .= str_repeat(chr(0),8);
+ $header .= str_repeat(chr(0),8);
+ $header .= str_repeat(chr(0),155);
+ $header .= str_repeat(chr(0),12);
+
+ // Compute header checksum
+ $checksum = str_pad(decoct($this->__computeUnsignedChecksum($header)),6,"0",STR_PAD_LEFT);
+ for($i=0; $i<6; $i++) {
+ $header[(148 + $i)] = substr($checksum,$i,1);
+ }
+ $header[154] = chr(0);
+ $header[155] = chr(32);
+
+ // Add new tar formatted data to tar file contents
+ $this->tar_file .= $header;
+ }
+ }
+
+ // Generate Records for each file, if we have files (We should...)
+ if($this->numFiles > 0) {
+ foreach($this->files as $key => $information) {
+ unset($header);
+
+ // Generate the TAR header for this file
+ // Filename, Permissions, UID, GID, size, Time, checksum, typeflag, linkname, magic, version, user name, group name, devmajor, devminor, prefix, end
+ $header .= str_pad($information["name"],100,chr(0));
+ $header .= str_pad(decoct($information["mode"]),7,"0",STR_PAD_LEFT) . chr(0);
+ $header .= str_pad(decoct($information["user_id"]),7,"0",STR_PAD_LEFT) . chr(0);
+ $header .= str_pad(decoct($information["group_id"]),7,"0",STR_PAD_LEFT) . chr(0);
+ $header .= str_pad(decoct($information["size"]),11,"0",STR_PAD_LEFT) . chr(0);
+ $header .= str_pad(decoct($information["time"]),11,"0",STR_PAD_LEFT) . chr(0);
+ $header .= str_repeat(" ",8);
+ $header .= "0";
+ $header .= str_repeat(chr(0),100);
+ $header .= str_pad("ustar",6,chr(32));
+ $header .= chr(32) . chr(0);
+ $header .= str_pad($information["user_name"],32,chr(0)); // How do I get a file's user name from PHP?
+ $header .= str_pad($information["group_name"],32,chr(0)); // How do I get a file's group name from PHP?
+ $header .= str_repeat(chr(0),8);
+ $header .= str_repeat(chr(0),8);
+ $header .= str_repeat(chr(0),155);
+ $header .= str_repeat(chr(0),12);
+
+ // Compute header checksum
+ $checksum = str_pad(decoct($this->__computeUnsignedChecksum($header)),6,"0",STR_PAD_LEFT);
+ for($i=0; $i<6; $i++) {
+ $header[(148 + $i)] = substr($checksum,$i,1);
+ }
+ $header[154] = chr(0);
+ $header[155] = chr(32);
+
+ // Pad file contents to byte count divisible by 512
+ $file_contents = str_pad($information["file"],(ceil($information["size"] / 512) * 512),chr(0));
+
+ // Add new tar formatted data to tar file contents
+ $this->tar_file .= $header . $file_contents;
+ }
+ }
+
+ // Add 512 bytes of NULLs to designate EOF
+ $this->tar_file .= str_repeat(chr(0),512);
+
+ return true;
+ }
+
+
+ // Open a TAR file
+ function openTAR($filename) {
+ // Clear any values from previous tar archives
+ unset($this->filename);
+ unset($this->isGzipped);
+ unset($this->tar_file);
+ unset($this->files);
+ unset($this->directories);
+ unset($this->numFiles);
+ unset($this->numDirectories);
+
+ // If the tar file doesn't exist...
+ if(!file_exists($filename))
+ return false;
+
+ $this->filename = $filename;
+
+ // Parse this file
+ $this->__readTar();
+
+ return true;
+ }
+
+
+ // Appends a tar file to the end of the currently opened tar file
+ function appendTar($filename) {
+ // If the tar file doesn't exist...
+ if(!file_exists($filename))
+ return false;
+
+ $this->__readTar($filename);
+
+ return true;
+ }
+
+
+ // Retrieves information about a file in the current tar archive
+ function getFile($filename) {
+ if($this->numFiles > 0) {
+ foreach($this->files as $key => $information) {
+ if($information["name"] == $filename)
+ return $information;
+ }
+ }
+
+ return false;
+ }
+
+
+ // Retrieves information about a directory in the current tar archive
+ function getDirectory($dirname) {
+ if($this->numDirectories > 0) {
+ foreach($this->directories as $key => $information) {
+ if($information["name"] == $dirname)
+ return $information;
+ }
+ }
+
+ return false;
+ }
+
+
+ // Check if this tar archive contains a specific file
+ function containsFile($filename) {
+ if($this->numFiles > 0) {
+ foreach($this->files as $key => $information) {
+ if($information["name"] == $filename)
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+
+ // Check if this tar archive contains a specific directory
+ function containsDirectory($dirname) {
+ if($this->numDirectories > 0) {
+ foreach($this->directories as $key => $information) {
+ if($information["name"] == $dirname)
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+
+ // Add a directory to this tar archive
+ function addDirectory($dirname) {
+ if(!file_exists($dirname))
+ return false;
+
+ // Get directory information
+ $file_information = stat($dirname);
+
+ // Add directory to processed data
+ $this->numDirectories++;
+ $activeDir = &$this->directories[];
+ $activeDir["name"] = $dirname;
+ $activeDir["mode"] = $file_information["mode"];
+ $activeDir["time"] = $file_information["time"];
+ $activeDir["user_id"] = $file_information["uid"];
+ $activeDir["group_id"] = $file_information["gid"];
+ $activeDir["checksum"] = $checksum;
+
+ return true;
+ }
+
+
+ // Add a file to the tar archive
+ function addFile($filename,$from=null,$to=null) {
+ // Make sure the file we are adding exists!
+ if(!file_exists($filename))
+ return false;
+
+ if(filesize($filename)==0)
+ return false;
+
+ // Make sure there are no other files in the archive that have this same filename
+ if($this->containsFile($filename))
+ return false;
+
+ // Get file information
+ $file_information = stat($filename);
+
+ // Read in the file's contents
+ $fp = fopen($filename,"rb");
+ $file_contents = fread($fp,filesize($filename));
+ fclose($fp);
+
+ if($from && $to){
+ $file_contents = str_replace($from,$to,$file_contents);
+ $file_information["size"] = strlen($file_contents);
+ }
+
+ // Add file to processed data
+ $this->numFiles++;
+ $activeFile = &$this->files[];
+ $activeFile["name"] = $filename;
+ $activeFile["mode"] = $file_information["mode"];
+ $activeFile["user_id"] = $file_information["uid"];
+ $activeFile["group_id"] = $file_information["gid"];
+ $activeFile["size"] = $file_information["size"];
+ $activeFile["time"] = $file_information["mtime"];
+ $activeFile["checksum"] = $checksum;
+ $activeFile["user_name"] = "";
+ $activeFile["group_name"] = "";
+ $activeFile["file"] = $file_contents;
+
+ return true;
+ }
+
+
+ // Remove a file from the tar archive
+ function removeFile($filename) {
+ if($this->numFiles > 0) {
+ foreach($this->files as $key => $information) {
+ if($information["name"] == $filename) {
+ $this->numFiles--;
+ unset($this->files[$key]);
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
+
+
+ // Remove a directory from the tar archive
+ function removeDirectory($dirname) {
+ if($this->numDirectories > 0) {
+ foreach($this->directories as $key => $information) {
+ if($information["name"] == $dirname) {
+ $this->numDirectories--;
+ unset($this->directories[$key]);
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
+
+
+ // Write the currently loaded tar archive to disk
+ function saveTar() {
+ if(!$this->filename)
+ return false;
+
+ // Write tar to current file using specified gzip compression
+ $this->toTar($this->filename,$this->isGzipped);
+
+ return true;
+ }
+
+
+ // Saves tar archive to a different file than the current file
+ function toTar($filename,$useGzip) {
+ if(!$filename)
+ return false;
+
+ // Encode processed files into TAR file format
+ $this->__generateTar();
+
+ // GZ Compress the data if we need to
+ if($useGzip) {
+ // Make sure we have gzip support
+ if(!function_exists("gzencode"))
+ return false;
+
+ $file = gzencode($this->tar_file);
+ } else {
+ $file = $this->tar_file;
+ }
+
+ // Write the TAR file
+ $fp = fopen($filename,"wb");
+ fwrite($fp,$file);
+ fclose($fp);
+
+ return true;
+ }
+
+
+ function toTarStream() {
+ $this->__generateTar();
+ return $this->tar_file;
+ }
+}
+?>
diff --git a/modules/addon/addon.admin.controller.php b/modules/addon/addon.admin.controller.php
index 125d332f3..184540af5 100644
--- a/modules/addon/addon.admin.controller.php
+++ b/modules/addon/addon.admin.controller.php
@@ -20,17 +20,19 @@
function procAddonAdminToggleActivate() {
$oAddonModel = &getAdminModel('addon');
+ $site_module_info = Context::get('site_module_info');
+
// addon값을 받아옴
$addon = Context::get('addon');
if($addon) {
// 활성화 되어 있으면 비활성화 시킴
- if($oAddonModel->isActivatedAddon($addon)) $this->doDeactivate($addon);
+ if($oAddonModel->isActivatedAddon($addon, $site_module_info->site_srl)) $this->doDeactivate($addon, $site_module_info->site_srl);
// 비활성화 되어 있으면 활성화 시킴
- else $this->doActivate($addon);
+ else $this->doActivate($addon, $site_module_info->site_srl);
}
- $this->makeCacheFile();
+ $this->makeCacheFile($site_module_info->site_srl);
}
/**
@@ -44,9 +46,11 @@
unset($args->addon_name);
unset($args->body);
- $this->doSetup($addon_name, $args);
+ $site_module_info = Context::get('site_module_info');
- $this->makeCacheFile();
+ $this->doSetup($addon_name, $args, $site_module_info->site_srl);
+
+ $this->makeCacheFile($site_module_info->site_srl);
}
@@ -55,20 +59,24 @@
* @brief 애드온 추가
* DB에 애드온을 추가함
**/
- function doInsert($addon) {
+ function doInsert($addon, $site_srl = 0) {
$args->addon = $addon;
$args->is_used = 'N';
- return executeQuery('addon.insertAddon', $args);
+ if(!$site_srl) return executeQuery('addon.insertAddon', $args);
+ $args->site_srl = $site_srl;
+ return executeQuery('addon.insertSiteAddon', $args);
}
/**
* @brief 애드온 활성화
* addons라는 테이블에 애드온의 활성화 상태를 on 시켜줌
**/
- function doActivate($addon) {
+ function doActivate($addon, $site_srl = 0) {
$args->addon = $addon;
$args->is_used = 'Y';
- return executeQuery('addon.updateAddon', $args);
+ if(!$site_srl) return executeQuery('addon.updateAddon', $args);
+ $args->site_srl = $site_srl;
+ return executeQuery('addon.updateSiteAddon', $args);
}
/**
@@ -76,10 +84,12 @@
*
* addons라는 테이블에 애드온의 이름을 제거하는 것으로 비활성화를 시키게 된다
**/
- function doDeactivate($addon) {
+ function doDeactivate($addon, $site_srl = 0) {
$args->addon = $addon;
$args->is_used = 'N';
- return executeQuery('addon.updateAddon', $args);
+ if(!$site_srl) return executeQuery('addon.updateAddon', $args);
+ $args->site_srl = $site_srl;
+ return executeQuery('addon.updateSiteAddon', $args);
}
diff --git a/modules/addon/addon.admin.model.php b/modules/addon/addon.admin.model.php
index 0a7b35757..7d4efe229 100644
--- a/modules/addon/addon.admin.model.php
+++ b/modules/addon/addon.admin.model.php
@@ -25,9 +25,9 @@
/**
* @brief 애드온의 종류와 정보를 구함
**/
- function getAddonList() {
+ function getAddonList($site_srl = 0) {
// activated된 애드온 목록을 구함
- $inserted_addons = $this->getInsertedAddons();
+ $inserted_addons = $this->getInsertedAddons($site_srl);
// 다운받은 애드온과 설치된 애드온의 목록을 구함
$searched_list = FileHandler::readDir('./addons');
@@ -44,7 +44,7 @@
// 해당 애드온의 정보를 구함
unset($info);
- $info = $this->getAddonInfoXml($addon_name);
+ $info = $this->getAddonInfoXml($addon_name, $site_srl);
$info->addon = $addon_name;
$info->path = $path;
@@ -54,7 +54,7 @@
if(!in_array($addon_name, array_keys($inserted_addons))) {
// DB에 입력되어 있지 않으면 입력 (model에서 이런짓 하는거 싫지만 귀찮아서.. ㅡ.ㅜ)
$oAddonAdminController = &getAdminController('addon');
- $oAddonAdminController->doInsert($addon_name);
+ $oAddonAdminController->doInsert($addon_name, $site_srl);
// 활성화 되어 있는지 확인
} else {
@@ -69,7 +69,7 @@
/**
* @brief 모듈의 conf/info.xml 을 읽어서 정보를 구함
**/
- function getAddonInfoXml($addon) {
+ function getAddonInfoXml($addon, $site_srl = 0) {
// 요청된 모듈의 경로를 구한다. 없으면 return
$addon_path = $this->getAddonPath($addon);
if(!$addon_path) return;
@@ -87,7 +87,11 @@
// DB에 설정된 내역을 가져온다
$db_args->addon = $addon;
- $output = executeQuery('addon.getAddonInfo',$db_args);
+ if(!$site_srl) $output = executeQuery('addon.getAddonInfo',$db_args);
+ else {
+ $db_args->site_srl = $site_srl;
+ $output = executeQuery('addon.getSiteAddonInfo',$db_args);
+ }
$extra_vals = unserialize($output->data->extra_vars);
if($extra_vals->mid_list) {
@@ -266,9 +270,13 @@
/**
* @brief 활성화된 애드온 목록을 구해옴
**/
- function getInsertedAddons() {
+ function getInsertedAddons($site_srl = 0) {
$args->list_order = 'addon';
- $output = executeQuery('addon.getAddons', $args);
+ if(!$site_srl) $output = executeQuery('addon.getAddons', $args);
+ else {
+ $args->site_srl = $site_srl;
+ $output = executeQuery('addon.getSiteAddons', $args);
+ }
if(!$output->data) return array();
if(!is_array($output->data)) $output->data = array($output->data);
@@ -283,9 +291,13 @@
/**
* @brief 애드온이 활성화 되어 있는지 체크
**/
- function isActivatedAddon($addon) {
+ function isActivatedAddon($addon, $site_srl = 0) {
$args->addon = $addon;
- $output = executeQuery('addon.getAddonIsActivated', $args);
+ if(!$site_srl) $output = executeQuery('addon.getAddonIsActivated', $args);
+ else {
+ $args->site_srl = $site_srl;
+ $output = executeQuery('addon.getSiteAddonIsActivated', $args);
+ }
if($output->data->count>0) return true;
return false;
}
diff --git a/modules/addon/addon.admin.view.php b/modules/addon/addon.admin.view.php
index 735a5361e..73e45af55 100644
--- a/modules/addon/addon.admin.view.php
+++ b/modules/addon/addon.admin.view.php
@@ -18,9 +18,11 @@
* @brief 애드온 관리 메인 페이지 (목록 보여줌)
**/
function dispAddonAdminIndex() {
+ $site_module_info = Context::get('site_module_info');
+
// 애드온 목록을 세팅
$oAddonModel = &getAdminModel('addon');
- $addon_list = $oAddonModel->getAddonList();
+ $addon_list = $oAddonModel->getAddonList($site_module_info->site_srl);
Context::set('addon_list', $addon_list);
// 템플릿 패스 및 파일을 지정
@@ -31,24 +33,27 @@
* @biref 애드온 세부 설정 팝업 출력
**/
function dispAddonAdminSetup() {
+ $site_module_info = Context::get('site_module_info');
+
// 요청된 애드온을 구함
$selected_addon = Context::get('selected_addon');
// 요청된 애드온의 정보를 구함
$oAddonModel = &getAdminModel('addon');
- $addon_info = $oAddonModel->getAddonInfoXml($selected_addon);
+ $addon_info = $oAddonModel->getAddonInfoXml($selected_addon, $site_module_info->site_srl);
Context::set('addon_info', $addon_info);
// mid 목록을 가져옴
$oModuleModel = &getModel('module');
- // 모듈 카테고리 목록을 구함
- $module_categories = $oModuleModel->getModuleCategories();
-
- $mid_list = $oModuleModel->getMidList();
+ if($site_module_info->site_srl) $args->site_srl = $site_module_info->site_srl;
+ $mid_list = $oModuleModel->getMidList($args);
// module_category와 module의 조합
- if($module_categories) {
+ if(!$site_module_info->site_srl) {
+ // 모듈 카테고리 목록을 구함
+ $module_categories = $oModuleModel->getModuleCategories();
+
foreach($mid_list as $module_srl => $module) {
$module_categories[$module->module_category_srl]->list[$module_srl] = $module;
}
@@ -69,12 +74,14 @@
* @brief 애드온의 상세 정보(conf/info.xml)를 팝업 출력
**/
function dispAddonAdminInfo() {
+ $site_module_info = Context::get('site_module_info');
+
// 요청된 애드온을 구함
$selected_addon = Context::get('selected_addon');
// 요청된 애드온의 정보를 구함
$oAddonModel = &getAdminModel('addon');
- $addon_info = $oAddonModel->getAddonInfoXml($selected_addon);
+ $addon_info = $oAddonModel->getAddonInfoXml($selected_addon, $site_module_info->site_srl);
Context::set('addon_info', $addon_info);
// 레이아웃을 팝업으로 지정
diff --git a/modules/addon/addon.class.php b/modules/addon/addon.class.php
index dcd4937e3..cce625e85 100644
--- a/modules/addon/addon.class.php
+++ b/modules/addon/addon.class.php
@@ -13,10 +13,6 @@
* @brief 설치시 추가 작업이 필요할시 구현
**/
function moduleInstall() {
- // action forward에 등록 (관리자 모드에서 사용하기 위함)
- $oModuleController = &getController('module');
- $oModuleController->insertActionForward('addon', 'view', 'dispAddonAdminIndex');
-
// 몇가지 애드온을 등록
$oAddonController = &getAdminController('addon');
$oAddonController->doInsert('autolink');
@@ -39,7 +35,7 @@
$oAddonController->doActivate('mobile');
$oAddonController->doActivate('referer');
$oAddonController->doActivate('resize_image');
- $oAddonController->procAddonAdminToggleActivate();
+ $oAddonController->makeCacheFile(0);
return new Object();
}
@@ -47,6 +43,7 @@
* @brief 설치가 이상이 없는지 체크하는 method
**/
function checkUpdate() {
+ if(file_exists($this->cache_file)) FileHandler::removeFile($this->cache_file);
return false;
}
@@ -61,8 +58,7 @@
* @brief 캐시 파일 재생성
**/
function recompileCache() {
- $oAddonController = &getAdminController('addon');
- $oAddonController->makeCacheFile();
+ FileHandler::removeFilesInDir('./files/cache/addons');
}
}
diff --git a/modules/addon/addon.controller.php b/modules/addon/addon.controller.php
index 35a595638..b0f0eb5eb 100644
--- a/modules/addon/addon.controller.php
+++ b/modules/addon/addon.controller.php
@@ -14,14 +14,31 @@
function init() {
}
+ /**
+ * @brief 메인/ 가상 사이트별 애드온 캐시 파일의 위치를 구함
+ **/
+ function getCacheFilePath() {
+ $site_module_info = Context::get('site_module_info');
+ $site_srl = $site_module_info->site_srl;
+
+ $addon_path = _XE_PATH_.'files/cache/addons/';
+ if(!is_dir($addon_path)) FileHandler::makeDir($addon_path);
+
+ if($site_srl) $addon_file = $addon_path.$site_srl.'.acivated_addons.cache.php';
+ else $addon_file = $addon_path.'acivated_addons.cache.php';
+
+ if(!file_exists($addon_file)) $this->makeCacheFile($site_srl);
+ return $addon_file;
+ }
+
/**
* @brief 애드온 mid 추가 설정
**/
- function _getMidList($selected_addon) {
+ function _getMidList($selected_addon, $site_srl = 0) {
$oAddonAdminModel = &getAdminModel('addon');
- $addon_info = $oAddonAdminModel->getAddonInfoXml($selected_addon);
+ $addon_info = $oAddonAdminModel->getAddonInfoXml($selected_addon, $site_srl);
return $addon_info->mid_list;
}
@@ -30,24 +47,24 @@
/**
* @brief 애드온 mid 추가 설정
**/
- function _setAddMid($selected_addon,$mid) {
+ function _setAddMid($selected_addon,$mid, $site_srl=0) {
// 요청된 애드온의 정보를 구함
- $mid_list = $this->_getMidList($selected_addon);
+ $mid_list = $this->_getMidList($selected_addon, $site_srl);
$mid_list[] = $mid;
$new_mid_list = array_unique($mid_list);
- $this->_setMid($selected_addon,$new_mid_list);
+ $this->_setMid($selected_addon,$new_mid_list, $site_srl);
}
/**
* @brief 애드온 mid 추가 설정
**/
- function _setDelMid($selected_addon,$mid) {
+ function _setDelMid($selected_addon,$mid,$site_srl=0) {
// 요청된 애드온의 정보를 구함
- $mid_list = $this->_getMidList($selected_addon);
+ $mid_list = $this->_getMidList($selected_addon,$site_srl);
$new_mid_list = array();
if(is_array($mid_list)){
@@ -59,16 +76,16 @@
}
- $this->_setMid($selected_addon,$new_mid_list);
+ $this->_setMid($selected_addon,$new_mid_list,$site_srl);
}
/**
* @brief 애드온 mid 추가 설정
**/
- function _setMid($selected_addon,$mid_list) {
+ function _setMid($selected_addon,$mid_list,$site_srl=0) {
$args->mid_list = join('|@|',$mid_list);
- $this->doSetup($selected_addon, $args);
- $this->makeCacheFile();
+ $this->doSetup($selected_addon, $args,$site_srl);
+ $this->makeCacheFile($site_srl);
}
@@ -76,37 +93,35 @@
* @brief 애드온 mid 추가
**/
function procAddonSetupAddonAddMid() {
+ $site_module_info = Context::get('site_module_info');
$args = Context::getRequestVars();
$addon_name = $args->addon_name;
$mid = $args->mid;
- $this->_setAddMid($addon_name,$mid);
+ $this->_setAddMid($addon_name,$mid,$site_module_info->site_srl);
}
-
/**
* @brief 애드온 mid 삭제
**/
function procAddonSetupAddonDelMid() {
+ $site_module_info = Context::get('site_module_info');
$args = Context::getRequestVars();
$addon_name = $args->addon_name;
$mid = $args->mid;
- $this->_setDelMid($addon_name,$mid);
+ $this->_setDelMid($addon_name,$mid,$site_module_info->site_srl);
}
-
-
-
/**
* @brief 캐시 파일 생성
**/
- function makeCacheFile() {
+ function makeCacheFile($site_srl = 0) {
// 모듈에서 애드온을 사용하기 위한 캐시 파일 생성
$buff = "";
$oAddonModel = &getAdminModel('addon');
- $addon_list = $oAddonModel->getInsertedAddons();
+ $addon_list = $oAddonModel->getInsertedAddons($site_srl);
foreach($addon_list as $addon => $val) {
if($val->is_used != 'Y' || !is_dir(_XE_PATH_.'addons/'.$addon) ) continue;
@@ -125,19 +140,39 @@
$buff = sprintf('', $buff);
- FileHandler::writeFile($this->cache_file, $buff);
+ $addon_path = _XE_PATH_.'files/cache/addons/';
+ if(!is_dir($addon_path)) FileHandler::makeDir($addon_path);
+
+ if($site_srl) $addon_file = $addon_path.$site_srl.'.acivated_addons.cache.php';
+ else $addon_file = $addon_path.'acivated_addons.cache.php';
+
+ FileHandler::writeFile($addon_file, $buff);
}
-
-
/**
* @brief 애드온 설정
**/
- function doSetup($addon, $extra_vars) {
+ function doSetup($addon, $extra_vars,$site_srl=0) {
if($extra_vars->mid_list) $extra_vars->mid_list = explode('|@|', $extra_vars->mid_list);
$args->addon = $addon;
$args->extra_vars = serialize($extra_vars);
- return executeQuery('addon.updateAddon', $args);
+ if(!$site_srl) return executeQuery('addon.updateAddon', $args);
+ $args->site_srl = $site_srl;
+ return executeQuery('addon.updateSiteAddon', $args);
+ }
+
+ /**
+ * @brief 가상 사이트에서의 애드온 정보 제거
+ **/
+ function removeAddonConfig($site_srl) {
+ $addon_path = _XE_PATH_.'files/cache/addons/';
+ $addon_file = $addon_path.$site_srl.'.acivated_addons.cache.php';
+ if(file_exists($addon_file)) FileHandler::removeFile($addon_file);
+
+ $args->site_srl = $site_srl;
+ executeQuery('addon.deleteSiteAddons', $args);
+
+
}
diff --git a/modules/addon/conf/info.xml b/modules/addon/conf/info.xml
index 78dcaab28..a7d14cc82 100644
--- a/modules/addon/conf/info.xml
+++ b/modules/addon/conf/info.xml
@@ -3,7 +3,7 @@
애드온
Addon
Addon
-
插件
+
插件管理
アドオン
Additions
Аддоны
@@ -18,7 +18,7 @@
設定附加元件「登錄、啟用、禁用」的管理模組。
0.1
2007-02-28
-
manager
+
utility
zero
diff --git a/modules/addon/conf/module.xml b/modules/addon/conf/module.xml
index bc552e1dc..6daf7c96d 100644
--- a/modules/addon/conf/module.xml
+++ b/modules/addon/conf/module.xml
@@ -1,5 +1,7 @@
+
+
diff --git a/modules/addon/lang/ko.lang.php b/modules/addon/lang/ko.lang.php
index 9200a3c58..587b1fdb9 100644
--- a/modules/addon/lang/ko.lang.php
+++ b/modules/addon/lang/ko.lang.php
@@ -12,6 +12,6 @@
$lang->addon_license = '라이선스';
$lang->addon_history = '변경 이력';
- $lang->about_addon_mid = "애드온이 사용될 대상을 지정할 수 있습니다.
(모두 해제시 모든 대상에서 사용 가능합니다)";
+ $lang->about_addon_mid = '애드온이 사용될 대상을 지정할 수 있습니다.
(모두 해제시 모든 대상에서 사용 가능합니다)';
$lang->about_addon = '애드온은 html결과물을 출력하기 보다 동작을 제어하는 역할을 합니다.
원하시는 애드온을 on/ off하시는 것만으로 사이트 운영에 유용한 기능을 연동할 수 있습니다.';
?>
diff --git a/modules/addon/lang/zh-TW.lang.php b/modules/addon/lang/zh-TW.lang.php
index ea55114a7..8a6b99d63 100644
--- a/modules/addon/lang/zh-TW.lang.php
+++ b/modules/addon/lang/zh-TW.lang.php
@@ -13,5 +13,5 @@
$lang->addon_history = '更新紀錄';
$lang->about_addon_mid = "可以指定使用附加元件的目標。
(全部不選取表示可用在所有目標。)";
- $lang->about_addon = '附加元件可擴展程式功能,而不是顯示輸出HTML結果。
『啟用/禁用』附加元件,增強網站的功能。';
+ $lang->about_addon = '附加元件可擴展程式功能,而不是顯示輸出HTML結果。
『啟用/禁用』附加元件,以增強網站的功能。';
?>
diff --git a/modules/addon/queries/deleteSiteAddon.xml b/modules/addon/queries/deleteSiteAddon.xml
new file mode 100644
index 000000000..91fc13695
--- /dev/null
+++ b/modules/addon/queries/deleteSiteAddon.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/modules/addon/queries/deleteSiteAddons.xml b/modules/addon/queries/deleteSiteAddons.xml
new file mode 100644
index 000000000..163ae955c
--- /dev/null
+++ b/modules/addon/queries/deleteSiteAddons.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/modules/addon/queries/getSiteAddonInfo.xml b/modules/addon/queries/getSiteAddonInfo.xml
new file mode 100644
index 000000000..064f1033e
--- /dev/null
+++ b/modules/addon/queries/getSiteAddonInfo.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/modules/addon/queries/getSiteAddonIsActivated.xml b/modules/addon/queries/getSiteAddonIsActivated.xml
new file mode 100644
index 000000000..b4bc83c89
--- /dev/null
+++ b/modules/addon/queries/getSiteAddonIsActivated.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/modules/addon/queries/getSiteAddons.xml b/modules/addon/queries/getSiteAddons.xml
new file mode 100644
index 000000000..2bf25b713
--- /dev/null
+++ b/modules/addon/queries/getSiteAddons.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/modules/addon/queries/insertSiteAddon.xml b/modules/addon/queries/insertSiteAddon.xml
new file mode 100644
index 000000000..6aa9fc618
--- /dev/null
+++ b/modules/addon/queries/insertSiteAddon.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/modules/addon/queries/updateSiteAddon.xml b/modules/addon/queries/updateSiteAddon.xml
new file mode 100644
index 000000000..344c220d9
--- /dev/null
+++ b/modules/addon/queries/updateSiteAddon.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/modules/addon/schemas/addons_site.xml b/modules/addon/schemas/addons_site.xml
new file mode 100644
index 000000000..fc156ae09
--- /dev/null
+++ b/modules/addon/schemas/addons_site.xml
@@ -0,0 +1,7 @@
+
diff --git a/modules/addon/tpl/addon_info.html b/modules/addon/tpl/addon_info.html
index 97441a3cd..dd13c3513 100644
--- a/modules/addon/tpl/addon_info.html
+++ b/modules/addon/tpl/addon_info.html
@@ -1,9 +1,9 @@
-
-
{$lang->addon_maker}
+
-
+
{$lang->title} |
{$addon_info->title} ver. {$addon_info->version} |
@@ -45,12 +45,12 @@
-
-
{$lang->addon_history}
+
-
+
-
-
diff --git a/modules/addon/tpl/addon_list.html b/modules/addon/tpl/addon_list.html
index 0caa8f3fd..f351b4a4e 100644
--- a/modules/addon/tpl/addon_list.html
+++ b/modules/addon/tpl/addon_list.html
@@ -1,7 +1,7 @@
-{$lang->addon} {$lang->cmd_management}
+{$lang->addon} {$lang->cmd_management}
{nl2br($lang->about_addon)}
@@ -10,7 +10,7 @@
-
+
{$lang->addon_name} |
@@ -31,20 +31,20 @@
({$val->addon})
- {$val->version} |
-
+ | {$val->version} |
+
{$author->name}
|
- {zdate($val->date, 'Y-m-d')} |
- {$val->path} |
- {$lang->cmd_setup} |
-
+ | {zdate($val->date, 'Y-m-d')} |
+ {$val->path} |
+ {$lang->cmd_setup} |
+
- {$lang->use}
+ {$lang->use}
- {$lang->notuse}
+ {$lang->notuse}
|
diff --git a/modules/addon/tpl/js/addon.js b/modules/addon/tpl/js/addon.js
index 3ff4dad01..782702afa 100644
--- a/modules/addon/tpl/js/addon.js
+++ b/modules/addon/tpl/js/addon.js
@@ -7,3 +7,10 @@ function doToggleAddon(addon) {
fo_obj.addon.value = addon;
procFilter(fo_obj, toggle_activate_addon);
}
+
+// 관리자 제어판 페이지용
+function doToggleAddonInAdmin(obj, addon) {
+ var params = new Array();
+ params['addon'] = addon;
+ exec_xml('addon','procAddonAdminToggleActivate',params,function() { if(/Active/.test(obj.className)) obj.className = "buttonSet buttonDisable"; else obj.className = "buttonSet buttonActive"; } );
+}
diff --git a/modules/addon/tpl/setup_addon.html b/modules/addon/tpl/setup_addon.html
index 0fccb37dd..d39b76217 100644
--- a/modules/addon/tpl/setup_addon.html
+++ b/modules/addon/tpl/setup_addon.html
@@ -2,15 +2,15 @@
-