Source for file LC_Page_Admin_Design_Up_Down.php
Documentation is available at LC_Page_Admin_Design_Up_Down.php
-  * This file is part of EC-CUBE 
-  * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved. 
-  * http://www.lockon.co.jp/ 
-  * This program is free software; you can redistribute it and/or 
-  * modify it under the terms of the GNU General Public License 
-  * as published by the Free Software Foundation; either version 2 
-  * of the License, or (at your option) any later version. 
-  * This program 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 General Public License for more details. 
-  * You should have received a copy of the GNU General Public License 
-  * along with this program; if not, write to the Free Software 
-  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. 
- require_once(CLASS_PATH - .  "pages/LC_Page.php");
 
- require_once(DATA_PATH- .  "module/Tar.php");
 
- require_once(CLASS_EX_PATH - .  "helper_extends/SC_Helper_FileManager_Ex.php");
 
-  * @author LOCKON CO.,LTD. 
-  * @version $Id: LC_Page_Admin_Design_Up_Down.php 16582 2007-10-29 03:06:29Z nanasess $ 
-         $this->tpl_subnavi  - =  'design/subnavi.tpl';
 
-         $this->tpl_subno    - =  'up_down';
 
-         $this->tpl_subtitle - =  'アップロード/ダウンロード';
 
-         $this->arrForm - =  array();
 
-         ini_set("max_execution_time", 300); 
-         $this->uniqid - =  $objSession->getUniqId();
 
-                 $this->arrForm - =  $objForm->getFormParamList();
 
-             $errMsg - =  $objUpFile->makeTempFile('template_file', false);
 
-                 $this->arrErr['template_file'] - =  $errMsg;
 
-                 $this->arrForm - =  $objForm->getFormParamList();
 
-             $this->tpl_onload-  =  "alert('テンプレートファイルをアップロードしました。');";
 
-         $objView->assignobj($this); 
-         $objView->display(MAIN_FRAME); 
-      * @return string modeパラメータ, 無ければnull 
-         if (- isset ($_POST['mode'])) return $_POST['mode'];
 
-      * @param object $objForm SC_FormParamのインスタンス 
-      * @return object SC_UploadFileのインスタンス  
-         $pkg_dir - =  SMARTY_TEMPLATES_DIR- .  $objForm->getValue('template_code');
 
-         $objUpFile->addFile("テンプレートファイル", 'template_file', array(), TEMPLATE_SIZE, true, 0, 0, false); 
-      * @retrun object SC_FormParamのインスタンス 
-         $objForm->addParam("テンプレートコード", "template_code", STEXT_LEN, "KVa", array("EXIST_CHECK","SPTAB_CHECK","MAX_LENGTH_CHECK", "ALNUM_CHECK")); 
-         $objForm->addParam("テンプレート名", "template_name", STEXT_LEN, "KVa", array("EXIST_CHECK","SPTAB_CHECK","MAX_LENGTH_CHECK")); 
-         $objForm->setParam($_POST); 
-      * @param object $objForm SC_FormParamのインスタンス 
-      * @return array エラー情報を格納した連想配列, エラーが無ければ(多分)nullを返す 
-         $arrErr - =  $objForm->checkError();
 
-         $arrForm - =  $objForm->getHashArray();
 
-         if(file_exists(USER_TEMPLATE_PATH - .  $arrForm['template_code'])) {
 
-             $arrErr['template_code'] - =  "※ 同名のファイルがすでに存在します。<br/>";
 
-             'admin', 'mobile', 'default' 
-         if(in_array($arrForm['template_code'], $arrIgnoreCode)) { 
-             $arrErr['template_code'] - =  "※ このテンプレートコードは使用できません。<br/>";
 
-         $ret - =  $objQuery->count("dtb_templates", "template_code = ?", array($arrForm['template_code']));
 
-             $arrErr['template_code'] - =  "※ すでに登録されているテンプレートコードです。<br/>";
 
-         // ファイルの拡張子チェック(.tar/tar.gzのみ許可) 
-         $array_ext - =  explode(".", $_FILES['template_file']['name']);
 
-         $ext - =  $array_ext[ count ( $array_ext )- -  1 ];
 
-         $ext - =  $array_ext[ count ( $array_ext )- -  2 ]- . "."- . $ext;
 
-             $arrErr['template_file'] - =  "※ アップロードするテンプレートファイルで許可されている形式は、tar/tar.gzです。<br />";
 
-      * DBおよびTPL_PKG_PATHにテンプレートパッケージを追加する. 
-      * @param object $objForm SC_FormParamのインスタンス 
-      * @param object $objUpFile SC_UploadFileのインスタンス 
-         $template_code - =  $objForm->getValue('template_code');
 
-         $template_dir - =  SMARTY_TEMPLATES_DIR- .  $template_code;
 
-         $compile_dir  - =  DATA_PATH- .  "Smarty/templates_c/"- .  $template_code;
 
-         $objUpFile->moveTempFile(); 
-         $from_dir - =  SMARTY_TEMPLATES_DIR- .  $template_code- .  "/_packages/";
 
-         $to_dir - =  USER_PATH- .  "packages/"- .  $template_code- .  "/";
 
-      * dtb_templatesへ入力内容を登録する. 
-      * @param array $arrForm POSTされたパラメータ 
-         $sqlval['create_date'] - =  "now()";
 
-         $sqlval['update_date'] - =  "now()";
 
-         $objQuery->insert('dtb_templates', $sqlval); 
-      * デザイン管理で作成されたファイルをupload/temp_template/以下にコピーする 
-         foreach ($arrDirs as $dir) { 
-             $from - =  USER_PATH- .   $dir;
 
-      * 現在選択しているテンプレートパッケージをupload/temp_template/以下にコピーする 
-      * @param string $to 保存先パス 
-         $from - =  TPL_PKG_PATH- .  $nowTpl- .  '/';
 
-      * 現在適用しているテンプレートパッケージ名を取得する. 
-      * @return string テンプレートパッケージ名 
-         $arrRet - =  $objQuery->select('top_tpl', 'dtb_baseinfo');
 
-         if (- isset ($arrRet[0]['top_tpl'])) {
 
-             return $arrRet[0]['top_tpl']; 
 
	
		Documentation generated on Tue, 28 Apr 2009 18:11:11 +0900 by phpDocumentor 1.4.2