Changeset 19795
- Timestamp:
- 2010/12/30 18:50:01 (12 years ago)
- Location:
- branches/version-2_5-dev
- Files:
-
- 5 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/data/class/helper/SC_Helper_PageLayout.php
r19777 r19795 139 139 $arrNavi[$key]['php_path'] = HTML_PATH . $val['php_path']; 140 140 } else { 141 $arrNavi[$key]['tpl_path'] = $this->getTemplatePath($device_type_id) . $val['tpl_path'];141 $arrNavi[$key]['tpl_path'] = $this->getTemplatePath($device_type_id) . BLOC_DIR . $val['tpl_path']; 142 142 } 143 143 // phpから呼び出されるか、tplファイルが存在する場合 -
branches/version-2_5-dev/data/class/pages/admin/design/LC_Page_Admin_Design_Bloc.php
r19768 r19795 80 80 $bloc_id = $_REQUEST['bloc_id']; 81 81 } else { 82 $bloc_id = 1;82 $bloc_id = null; 83 83 } 84 84 $this->bloc_id = $bloc_id; … … 93 93 94 94 $this->objLayout = new SC_Helper_PageLayout_Ex(); 95 $package_path = $this->objLayout->getTemplatePath($device_type_id) ;95 $package_path = $this->objLayout->getTemplatePath($device_type_id) . BLOC_DIR; 96 96 97 97 // ブロック一覧を取得 … … 103 103 array($bloc_id, $device_type_id)); 104 104 105 $ arrBlocData[0]['tpl_path'] = $this->objLayout->getTemplatePath($device_type_id) . $arrBlocData[0]['tpl_path'];105 $tplPath = $package_path . $arrBlocData[0]['filename'] . '.tpl'; 106 106 107 107 // テンプレートファイルの読み込み 108 $arrBlocData[0]['tpl_data'] = file_get_contents($ arrBlocData[0]['tpl_path']);108 $arrBlocData[0]['tpl_data'] = file_get_contents($tplPath); 109 109 $this->arrBlocData = $arrBlocData[0]; 110 110 } … … 124 124 // ディレクトリの作成 125 125 SC_Utils::sfMakeDir($prev_path); 126 $fp = fopen($prev_path,"w"); 127 fwrite($fp, $_POST['bloc_html']); // FIXME いきなり POST はちょっと... 128 fclose($fp); 126 $res = file_put_contents($new_bloc_path, $_POST['bloc_html']); 127 if ($res === false) { 128 SC_Utils_Ex::sfDispException(); 129 } 129 130 130 131 // プレビューデータ表示 … … 147 148 148 149 // 旧ファイルの削除 149 $old_bloc_path = $package_path . $arrBlocData[0]['tpl_path']; 150 if (file_exists($old_bloc_path)) { 151 unlink($old_bloc_path); 150 if (file_exists($tplPath)) { 151 unlink($tplPath); 152 152 } 153 153 154 154 // ファイル作成 155 $new_bloc_path = $package_path . BLOC_DIR .$_POST['filename'] . ".tpl";155 $new_bloc_path = $package_path . $_POST['filename'] . ".tpl"; 156 156 // ディレクトリの作成 157 157 SC_Utils::sfMakeDir($new_bloc_path); 158 $fp = fopen($new_bloc_path,"w"); 159 fwrite($fp, $_POST['bloc_html']); // FIXME いきなり POST はちょっと... 160 fclose($fp); 158 $res = file_put_contents($new_bloc_path, $_POST['bloc_html']); 159 if ($res === false) { 160 SC_Utils_Ex::sfDispException(); 161 } 161 162 162 163 $arrBlocData = $this->lfGetBlocData("filename = ? AND device_type_id = ?", … … 198 199 199 200 // ファイルの削除 200 $del_file = $package_path . BLOC_DIR . $arrBlocData[0]['filename']. '.tpl'; 201 if(file_exists($del_file)){ 202 unlink($del_file); 201 if (file_exists($tplPath)) { 202 unlink($tplPath); 203 203 } 204 204 } … … 254 254 // 更新データ生成 255 255 $arrUpdData = array("bloc_name" => $arrData['bloc_name'], 256 "tpl_path" => BLOC_DIR .$arrData['filename'] . '.tpl',256 "tpl_path" => $arrData['filename'] . '.tpl', 257 257 "filename" => $arrData['filename']); 258 258 -
branches/version-2_5-dev/data/class/pages/rss/LC_Page_Rss_Products.php
r19680 r19795 44 44 function init() { 45 45 parent::init(); 46 $this->tpl_mainpage = "rss/product .tpl";46 $this->tpl_mainpage = "rss/products.tpl"; 47 47 $this->encode = "UTF-8"; 48 48 $this->title = "商品一覧情報"; -
branches/version-2_5-dev/data/mtb_constants_init.php
r19777 r19795 476 476 define('COMPILE_FTP_DIR', COMPILE_DIR . USER_DIR); 477 477 /** ブロックファイル保存先 */ 478 define('BLOC_DIR', " bloc/");478 define('BLOC_DIR', "frontparts/bloc/"); 479 479 /** ブロックファイル保存先 */ 480 480 define('BLOC_PATH', TEMPLATE_DIR . BLOC_DIR); -
branches/version-2_5-dev/html/install/sql/insert_data.sql
r19777 r19795 1 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (10, 1, 'カテゴリ', ' bloc/category.tpl', 'category', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/category.php', 0);2 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (10, 2, '利用ガイド', ' bloc/guide.tpl', 'guide', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, NULL, 0);3 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (10, 3, 'かごの中', ' bloc/cart.tpl', 'cart', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/cart.php', 0);4 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (10, 4, '商品検索', ' bloc/search_products.tpl', 'search_products', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/search_products.php', 0);5 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (10, 5, '新着情報', ' bloc/news.tpl', 'news', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/news.php', 0);6 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (10, 6, 'ログイン', ' bloc/login.tpl', 'login', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/login.php', 0);7 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (10, 7, 'おすすめ商品', 'b loc/best5.tpl', 'best5', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/best5.php', 0);8 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (10, 8, 'カレンダー', ' bloc/calendar.tpl', 'calendar', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/calendar.php', 0);9 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (1, 1, 'カテゴリ', ' bloc/category.tpl', 'category', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/category.php', 0);10 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (1, 2, '利用ガイド', ' bloc/guide.tpl', 'guide', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, NULL, 0);11 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (1, 3, 'かごの中', ' bloc/cart.tpl', 'cart', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/cart.php', 0);12 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (1, 4, '商品検索', ' bloc/search_products.tpl', 'search_products', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/search_products.php', 0);13 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (1, 5, '新着情報', ' bloc/news.tpl', 'news', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/news.php', 0);14 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (1, 6, 'ログイン', ' bloc/login.tpl', 'login', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/login.php', 0);15 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (1, 7, 'おすすめ商品', 'b loc/best5.tpl', 'best5', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/best5.php', 0);16 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (1, 8, 'カレンダー', ' bloc/calendar.tpl', 'calendar', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/calendar.php', 0);17 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (2, 1, 'カテゴリ', ' bloc/category.tpl', 'category', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/category.php', 0);18 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (2, 2, '利用ガイド', ' bloc/guide.tpl', 'guide', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, NULL, 0);19 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (2, 3, 'かごの中', ' bloc/cart.tpl', 'cart', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/cart.php', 0);20 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (2, 4, '商品検索', ' bloc/search_products.tpl', 'search_products', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/search_products.php', 0);21 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (2, 5, '新着情報', ' bloc/news.tpl', 'news', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/news.php', 0);22 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (2, 6, 'ログイン', ' bloc/login.tpl', 'login', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/login.php', 0);23 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (2, 7, 'おすすめ商品', 'b loc/best5.tpl', 'best5', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/best5.php', 0);24 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (2, 8, 'カレンダー', ' bloc/calendar.tpl', 'calendar', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/calendar.php', 0);1 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (10, 1, 'カテゴリ', 'category.tpl', 'category', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/category.php', 0); 2 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (10, 2, '利用ガイド', 'guide.tpl', 'guide', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, NULL, 0); 3 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (10, 3, 'かごの中', 'cart.tpl', 'cart', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/cart.php', 0); 4 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (10, 4, '商品検索', 'search_products.tpl', 'search_products', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/search_products.php', 0); 5 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (10, 5, '新着情報', 'news.tpl', 'news', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/news.php', 0); 6 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (10, 6, 'ログイン', 'login.tpl', 'login', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/login.php', 0); 7 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (10, 7, 'おすすめ商品', 'best5.tpl', 'best5', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/best5.php', 0); 8 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (10, 8, 'カレンダー', 'calendar.tpl', 'calendar', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/calendar.php', 0); 9 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (1, 1, 'カテゴリ', 'category.tpl', 'category', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/category.php', 0); 10 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (1, 2, '利用ガイド', 'guide.tpl', 'guide', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, NULL, 0); 11 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (1, 3, 'かごの中', 'cart.tpl', 'cart', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/cart.php', 0); 12 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (1, 4, '商品検索', 'search_products.tpl', 'search_products', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/search_products.php', 0); 13 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (1, 5, '新着情報', 'news.tpl', 'news', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/news.php', 0); 14 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (1, 6, 'ログイン', 'login.tpl', 'login', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/login.php', 0); 15 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (1, 7, 'おすすめ商品', 'best5.tpl', 'best5', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/best5.php', 0); 16 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (1, 8, 'カレンダー', 'calendar.tpl', 'calendar', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/calendar.php', 0); 17 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (2, 1, 'カテゴリ', 'category.tpl', 'category', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/category.php', 0); 18 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (2, 2, '利用ガイド', 'guide.tpl', 'guide', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, NULL, 0); 19 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (2, 3, 'かごの中', 'cart.tpl', 'cart', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/cart.php', 0); 20 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (2, 4, '商品検索', 'search_products.tpl', 'search_products', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/search_products.php', 0); 21 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (2, 5, '新着情報', 'news.tpl', 'news', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/news.php', 0); 22 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (2, 6, 'ログイン', 'login.tpl', 'login', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/login.php', 0); 23 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (2, 7, 'おすすめ商品', 'best5.tpl', 'best5', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/best5.php', 0); 24 INSERT INTO dtb_bloc (device_type_id, bloc_id, bloc_name, tpl_path, filename, create_date, update_date, php_path, deletable_flg) VALUES (2, 8, 'カレンダー', 'calendar.tpl', 'calendar', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'frontparts/bloc/calendar.php', 0); 25 25 26 26 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 1, 1, 1, 2, 0); … … 1266 1266 INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('TEMPLATE_FTP_DIR', 'USER_PATH . USER_PACKAGE_DIR . TEMPLATE_NAME . "/"', 309, 'SMARTYテンプレート(FTP許可)'); 1267 1267 INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('COMPILE_FTP_DIR', 'COMPILE_DIR . USER_DIR', 310, 'SMARTYコンパイル(FTP許可)'); 1268 INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('BLOC_DIR', '" bloc/"', 311, 'ブロックファイル保存先');1268 INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('BLOC_DIR', '"frontparts/bloc/"', 311, 'ブロックファイル保存先'); 1269 1269 INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('MOBILE_TEMPLATE_DIR', 'SMARTY_TEMPLATES_DIR . MOBILE_TEMPLATE_NAME . "/"', 312, 'SMARTYテンプレート(mobile)'); 1270 1270 INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('MOBILE_COMPILE_DIR', 'DATA_PATH . "Smarty/templates_c/" . MOBILE_TEMPLATE_NAME . "/"', 313, 'SMARTYコンパイル(mobile)');
Note: See TracChangeset
for help on using the changeset viewer.