Changeset 20863
- Timestamp:
- 2011/04/19 22:52:35 (15 years ago)
- bzr:base-revision:
- [email protected]
- bzr:committer:
- Kentaro Ohkouchi <[email protected]>
- bzr:file-ids:
data/Smarty/templates/admin/design/template.tpl 15732@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2FSmarty%2Ftemplates%2Fdefault%2Fadmin%2Fdesign%2Ftemplate.tpl
data/Smarty/templates/admin/design/up_down.tpl 16677@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2FSmarty%2Ftemplates%2Fdefault%2Fadmin%2Fdesign%2Fup_down.tpl
data/class/SC_UploadFile.php 18171@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fcomu-ver2%2Fdata%2Fclass%2FSC_UploadFile.php
data/class/helper/SC_Helper_FileManager.php 16253@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fhelper%2FSC_Helper_FileManager.php
data/class/pages/admin/design/LC_Page_Admin_Design_Template.php 16430@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fadmin%2Fdesign%2FLC_Page_Admin_Design_Template.php
data/class/pages/admin/design/LC_Page_Admin_Design_UpDown.php 20543@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fversion-2_5-dev%2Fdata%2Fclass%2Fpages%2Fadmin%2Fdesign%2FLC_Page_Admin_Design_UpDown.php
data/class/util/SC_Utils.php 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Futil%2FSC_Utils.php
html/install/sql/insert_data.sql 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fhtml%2Finstall%2Fsql%2Finsert_data.sql
html/user_data/packages/default/sql/update_bloc.sql 17136@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fcomu-ver2%2Fhtml%2Fuser_data%2Fpackages%2Fdefault%2Fsql%2Fupdate_bloc.sql- bzr:mapping-version:
- v4
- bzr:merge:
[email protected]- bzr:repository-uuid:
- 1e3b908f-19a9-db11-a64c-001125224ba8
- bzr:revision-id:
- [email protected]
- bzr:revno:
- 3574
- bzr:revprop:branch-nick:
- branches/version-2_11-dev
- bzr:root:
- branches/version-2_11-dev
- bzr:text-revisions:
data/Smarty/templates/admin/design/template.tpl [email protected]
data/Smarty/templates/admin/design/up_down.tpl [email protected]
data/class/SC_UploadFile.php [email protected]
data/class/helper/SC_Helper_FileManager.php [email protected]
data/class/pages/admin/design/LC_Page_Admin_Design_Template.php [email protected]
data/class/pages/admin/design/LC_Page_Admin_Design_UpDown.php [email protected]
data/class/util/SC_Utils.php [email protected]
html/user_data/packages/default/sql/update_bloc.sql [email protected]- bzr:timestamp:
- 2011-04-19 22:52:31.440999985 +0900
- bzr:user-agent:
- bzr2.2.1+bzr-svn1.0.4
- svn:original-date:
- 2011-04-19T13:52:31.441000Z
- Location:
- branches/version-2_11-dev
- Files:
-
- 8 edited
-
data/Smarty/templates/admin/design/template.tpl (modified) (4 diffs)
-
data/Smarty/templates/admin/design/up_down.tpl (modified) (1 diff)
-
data/class/SC_UploadFile.php (modified) (1 diff)
-
data/class/helper/SC_Helper_FileManager.php (modified) (6 diffs)
-
data/class/pages/admin/design/LC_Page_Admin_Design_Template.php (modified) (5 diffs)
-
data/class/pages/admin/design/LC_Page_Admin_Design_UpDown.php (modified) (4 diffs)
-
data/class/util/SC_Utils.php (modified) (1 diff)
-
html/user_data/packages/default/sql/update_bloc.sql (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_11-dev/data/Smarty/templates/admin/design/template.tpl
r20764 r20863 38 38 <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" /> 39 39 <input type="hidden" name="mode" value="" /> 40 <input type="hidden" name="template_code _temp" value="" />40 <input type="hidden" name="template_code" value="" /> 41 41 <input type="hidden" name="device_type_id" value="<!--{$device_type_id|h}-->" /> 42 42 <div id="design" class="contents-main"> … … 45 45 選択したテンプレートへデザインを変更することが出来ます。 46 46 </p> 47 48 <!--{if $arrErr.err != ""}--> 49 <div class="message"> 50 <span class="attention"><!--{$arrErr.err}--></span> 51 </div> 52 <!--{/if}--> 53 47 54 <table class="list center"> 48 55 <colgroup width="5%"> … … 61 68 <!--{assign var=tplcode value=$tpl.template_code}--> 62 69 <tr class="center"> 63 <td><input type="radio" name="template_code" value="<!--{$tplcode|h}-->" <!--{if $tplcode == $tpl_select}-->checked <!--{/if}--> /></td>70 <td><input type="radio" name="template_code" value="<!--{$tplcode|h}-->" <!--{if $tplcode == $tpl_select}-->checked="checked"<!--{/if}--> /></td> 64 71 <td class="left"><!--{$tpl.template_name|h}--></td> 65 72 <td class="left">data/Smarty/templates/<!--{$tplcode|h}-->/</td> 66 <td><span class="icon_confirm"><a href=" #" onClick="fnModeSubmit('download','template_code_temp','<!--{$tplcode}-->');return false;">ダウンロード</a></span></td>67 <td><span class="icon_delete"><a href=" #" onClick="fnModeSubmit('delete','template_code_temp','<!--{$tplcode}-->');return false;">削除</a></span></td>73 <td><span class="icon_confirm"><a href="javascript:;" onClick="fnFormModeSubmit('form2', 'download','template_code','<!--{$tplcode}-->');return false;">ダウンロード</a></span></td> 74 <td><span class="icon_delete"><a href="javascript:;" onClick="fnFormModeSubmit('form2', 'delete','template_code','<!--{$tplcode}-->');return false;">削除</a></span></td> 68 75 </tr> 69 76 <!--{/foreach}--> … … 76 83 </div> 77 84 </form> 85 <form name="form2" method="post" action="?"> 86 <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" /> 87 <input type="hidden" name="mode" value="" /> 88 <input type="hidden" name="template_code" value="" /> 89 <input type="hidden" name="device_type_id" value="<!--{$device_type_id|h}-->" /> 90 </form> -
branches/version-2_11-dev/data/Smarty/templates/admin/design/up_down.tpl
r20764 r20863 44 44 アップロードしたパッケージは、「テンプレート設定」で選択できるようになります。 45 45 </p> 46 47 <!--{if $arrErr.err != ""}--> 48 <div class="message"> 49 <span class="attention"><!--{$arrErr.err}--></span> 50 </div> 51 <!--{/if}--> 52 46 53 <table> 47 54 <!--{assign var=key value="template_code"}--> -
branches/version-2_11-dev/data/class/SC_UploadFile.php
r20764 r20863 127 127 GC_Utils_Ex::gfPrintLog($_FILES[$keyname]['name']." -> ". $this->temp_dir . $this->temp_file[$cnt]); 128 128 } else { 129 $objErr->arrErr[$keyname] = '※ ファイルのアップロードに失敗しました ん。<br />';129 $objErr->arrErr[$keyname] = '※ ファイルのアップロードに失敗しました。<br />'; 130 130 GC_Utils_Ex::gfPrintLog('File Upload Error!: ' . $_FILES[$keyname]['name']." -> ". $this->temp_dir . $this->temp_file[$cnt]); 131 131 } -
branches/version-2_11-dev/data/class/helper/SC_Helper_FileManager.php
r20847 r20863 364 364 * ユーザが作成したファイルをアーカイブしダウンロードさせる 365 365 * TODO 要リファクタリング 366 * @param void367 * @ return void368 * /369 function downloadArchiveFiles($dir) {370 $debug_message = "";366 * @param string $dir アーカイブを行なうディレクトリ 367 * @param string $template_code テンプレートコード 368 * @return boolean 成功した場合 true; 失敗した場合 false 369 */ 370 function downloadArchiveFiles($dir, $template_code) { 371 371 // ダウンロードされるファイル名 372 $dlFileName = 'tpl_package_' . date('YmdHis') . '.tar.gz'; 373 372 $dlFileName = 'tpl_package_' . $template_code . '_' . date('YmdHis') . '.tar.gz'; 373 374 $debug_message = $dir . " から " . $dlFileName . " を作成します...\n"; 374 375 // ファイル一覧取得 375 376 $arrFileHash = SC_Utils_Ex::sfGetFileList($dir); … … 378 379 $debug_message.= "圧縮:".$val['file_name']."\n"; 379 380 } 380 GC_Utils_Ex::gf DebugLog($debug_message);381 GC_Utils_Ex::gfPrintLog($debug_message); 381 382 382 383 // ディレクトリを移動 … … 384 385 // 圧縮をおこなう 385 386 $tar = new Archive_Tar($dlFileName, true); 386 $tar->create($arrFileList); 387 388 // ダウンロード用HTTPヘッダ出力 389 header("Content-disposition: attachment; filename=${dlFileName}"); 390 header("Content-type: application/octet-stream; name=${dlFileName}"); 391 header("Content-Length: " . filesize($dlFileName)); 392 readfile($dlFileName); 393 unlink($dir . "/" . $dlFileName); 394 exit; 387 if ($tar->create($arrFileList)) { 388 // ダウンロード用HTTPヘッダ出力 389 header("Content-disposition: attachment; filename=${dlFileName}"); 390 header("Content-type: application/octet-stream; name=${dlFileName}"); 391 header("Cache-Control: "); 392 header("Pragma: "); 393 readfile($dlFileName); 394 unlink($dir . "/" . $dlFileName); 395 return true; 396 } else { 397 return false; 398 } 395 399 } 396 400 … … 399 403 * 400 404 * @param string $path アーカイブパス 401 * @return stringArchive_Tar::extractModify()のエラー405 * @return boolean Archive_Tar::extractModify()のエラー 402 406 */ 403 407 function unpackFile($path) { … … 412 416 413 417 // 指定されたフォルダ内に解凍する 414 $ tar->extractModify($dir. "/", $unpacking_name);418 $result = $tar->extractModify($dir. "/", $unpacking_name); 415 419 GC_Utils_Ex::gfPrintLog("解凍:" . $dir."/".$file_name."->".$dir."/".$unpacking_name); 416 420 … … 419 423 // 圧縮ファイル削除 420 424 unlink($path); 425 return $result; 421 426 } 422 427 } -
branches/version-2_11-dev/data/class/pages/admin/design/LC_Page_Admin_Design_Template.php
r20764 r20863 71 71 * Page のアクション. 72 72 * 73 * FIXME ロジックを見直し74 *75 73 * @return void 76 74 */ 77 75 function action() { 78 // 端末種別IDを取得 79 if (isset($_REQUEST['device_type_id']) 80 && is_numeric($_REQUEST['device_type_id'])) { 81 $device_type_id = $_REQUEST['device_type_id']; 76 $objFormParam = new SC_FormParam_Ex(); 77 $this->lfInitParam($objFormParam); 78 $objFormParam->setParam($_REQUEST); 79 $objFormParam->convParam(); 80 81 $this->device_type_id = $objFormParam->getValue('device_type_id', DEVICE_TYPE_PC); 82 $this->tpl_select = $this->getTemplateName($this->device_type_id); 83 $template_code = $objFormParam->getValue('template_code'); 84 85 switch($this->getMode()) { 86 87 // 登録ボタン押下時 88 case 'register': 89 $this->arrErr = $objFormParam->checkError(); 90 if (SC_Utils_Ex::isBlank($this->arrErr)) { 91 if ($this->doRegister($template_code, $this->device_type_id)) { 92 $this->tpl_select = $template_code; 93 $this->tpl_onload = "alert('登録が完了しました。');"; 94 } 95 } 96 break; 97 98 // 削除ボタン押下時 99 case 'delete': 100 if ($objFormParam->checkError()) { 101 SC_Utils_Ex::sfDispError(''); 102 } 103 $this->arrErr = $objFormParam->checkError(); 104 if (SC_Utils_Ex::isBlank($this->arrErr)) { 105 if ($this->doDelete($template_code, $this->device_type_id)) { 106 $this->tpl_onload = "alert('削除が完了しました。');"; 107 } 108 } 109 break; 110 111 // downloadボタン押下時 112 case 'download': 113 $this->arrErr = $objFormParam->checkError(); 114 if (SC_Utils_Ex::isBlank($this->arrErr)) { 115 if ($this->doDownload($template_code) !== false) { 116 // ブラウザに出力し, 終了する 117 exit; 118 } 119 } 120 break; 121 122 default: 123 break; 124 } 125 126 if (!$is_error) { 127 $this->templates = $this->getAllTemplates($this->device_type_id); 82 128 } else { 83 $device_type_id = DEVICE_TYPE_PC; 84 } 85 86 //サブタイトルの追加 87 $this->tpl_subtitle .= ' - ' . $this->arrDeviceType[$device_type_id]; 88 89 $this->tpl_select = $this->getTemplateName($device_type_id); 90 91 $objView = new SC_AdminView_Ex(); 92 93 switch($this->getMode()) { 94 95 // 登録ボタン押下時 96 case 'register': 97 // パラメータ検証 98 $objForm = $this->lfInitRegister(); 99 if ($objForm->checkError()) { 100 SC_Utils_Ex::sfDispError(''); 101 } 102 103 $template_code = $objForm->getValue('template_code'); 104 $this->tpl_select = $template_code; 105 106 if($template_code == "") { 107 $template_code = $this->getTemplateName($device_type_id, true); 108 } 109 110 // DBへ使用するテンプレートを登録 111 $this->lfRegisterTemplate($template_code); 112 113 // XXX コンパイルファイルのクリア処理を行う 114 $objView->_smarty->clear_compiled_tpl(); 115 116 // ブロック位置を更新 117 $this->lfChangeBloc($template_code); 118 119 // 完了メッセージ 120 $this->tpl_onload="alert('登録が完了しました。');"; 121 break; 122 123 // 削除ボタン押下時 124 case 'delete': 125 // パラメータ検証 126 $objForm = $this->lfInitDelete(); 127 if ($objForm->checkError()) { 128 SC_Utils_Ex::sfDispError(''); 129 } 130 131 //現在使用中のテンプレートとデフォルトのテンプレートは削除できないようにする 132 $template_code = $objForm->getValue('template_code_temp'); 133 if ($template_code == $this->getTemplateName($device_type_id) 134 || $template_code == $this->getTemplateName($device_type_id, true)) { 135 $this->tpl_onload = "alert('デフォルトテンプレートと、選択中のテンプレートは削除出来ません');"; 136 break; 137 } 138 $this->lfDeleteTemplate($template_code); 139 break; 140 141 // downloadボタン押下時 142 case 'download': 143 // パラメータ検証 144 $objForm = $this->lfInitDownload(); 145 $template_code = $objForm->getValue('template_code_temp'); 146 // ユーザデータの下のファイルも保存する。 147 $from_dir = USER_TEMPLATE_REALDIR . $template_code . "/"; 148 $to_dir = SMARTY_TEMPLATES_REALDIR . $template_code . "/_packages/"; 149 SC_Utils_Ex::sfMakeDir($to_dir); 150 SC_Utils_Ex::sfCopyDir($from_dir, $to_dir); 151 SC_Helper_FileManager_Ex::downloadArchiveFiles(SMARTY_TEMPLATES_REALDIR . $template_code); 152 break; 153 154 // プレビューボタン押下時 155 case 'preview': 156 break; 157 158 default: 159 break; 160 } 161 162 $this->templates = $this->lfGetAllTemplates($device_type_id); 163 $this->now_template = TEMPLATE_NAME; 164 $this->device_type_id = $device_type_id; 129 // 画面にエラー表示しないため, ログ出力 130 GC_Utils_Ex::gfPrintLog('Error: ' . print_r($this->arrErr, true)); 131 } 132 $this->tpl_subtitle .= ' - ' . $this->arrDeviceType[$this->device_type_id]; 165 133 } 166 134 … … 174 142 } 175 143 176 function lfInitRegister() { 177 $objForm = new SC_FormParam_Ex(); 178 $objForm->addParam( 179 'template_code', 'template_code', STEXT_LEN, '', 180 array("EXIST_CHECK","SPTAB_CHECK","MAX_LENGTH_CHECK", "ALNUM_CHECK") 181 ); 182 $objForm->setParam($_POST); 183 184 return $objForm; 185 } 186 187 function lfInitDelete() { 188 $objForm = new SC_FormParam_Ex(); 189 $objForm->addParam( 190 'template_code_temp', 'template_code_temp', STEXT_LEN, '', 191 array("EXIST_CHECK","SPTAB_CHECK","MAX_LENGTH_CHECK", "ALNUM_CHECK") 192 ); 193 $objForm->setParam($_POST); 194 195 return $objForm; 196 } 197 198 function lfInitDownload() { 199 $objForm = new SC_FormParam_Ex(); 200 $objForm->addParam( 201 'template_code_temp', 'template_code_temp', STEXT_LEN, '', 202 array("EXIST_CHECK","SPTAB_CHECK","MAX_LENGTH_CHECK", "ALNUM_CHECK") 203 ); 204 $objForm->setParam($_POST); 205 206 return $objForm; 207 } 208 209 /** 210 * 使用するテンプレートをDBへ登録する 211 */ 212 function lfRegisterTemplate($template_code, $device_type_id) { 144 /** 145 * パラメータ情報の初期化 146 * 147 * @param object $objFormParam SC_FormParamインスタンス 148 * @return void 149 */ 150 function lfInitParam(&$objFormParam) { 151 $objFormParam->addParam("端末種別ID", "device_type_id", INT_LEN, 'n', array("NUM_CHECK", "MAX_LENGTH_CHECK")); 152 $objFormParam->addParam('template_code', 'template_code', STEXT_LEN, 'a', array("EXIST_CHECK", "SPTAB_CHECK","MAX_LENGTH_CHECK", "ALNUM_CHECK")); 153 } 154 155 /** 156 * 使用するテンプレートを設定する. 157 * 158 * テンプレートをマスタデータに登録する. 159 * 160 * @param string $template_code テンプレートコード 161 * @param integer $device_type_id 端末種別ID 162 * @return void 163 */ 164 function doUpdateMasterData($template_code, $device_type_id) { 213 165 $masterData = new SC_DB_MasterData_Ex(); 214 166 … … 222 174 $defineName = 'SMARTPHONE_' . $defineName; 223 175 break; 176 224 177 case DEVICE_TYPE_PC: 225 178 default: 226 179 } 227 180 228 $data = array($defineName => var_export($template_code, TRUE));229 230 181 // DBのデータを更新 231 $masterData->updateMasterData('mtb_constants', array(), $data); 182 $arrData = array($defineName => var_export($template_code, true)); 183 $masterData->updateMasterData('mtb_constants', array(), $arrData); 232 184 233 185 // キャッシュを生成 … … 236 188 237 189 /** 238 * ブロック位置の更新 239 */ 240 function lfChangeBloc($template_code) { 241 $objQuery = new SC_Query_Ex(); 242 /* 243 * FIXME 各端末に合わせて作成する必要あり 244 * $filepath = USER_TEMPLATE_REALDIR. $template_code. "/sql/update_bloc.sql"; 245 */ 246 247 // ブロック位置更新SQLファイル有 248 if(file_exists($filepath)) { 249 if($fp = fopen($filepath, 'r')) { 250 $sql = fread($fp, filesize($filepath)); 251 fclose($fp); 252 } 190 * ブロック位置の更新. 191 * 192 * ブロック位置を更新する SQL を実行する. 193 * この SQL は, 各端末に合わせて実行する必要がある 194 * 195 * @param string $filepath SQLのファイルパス 196 * @return void 197 */ 198 function updateBloc($filepath) { 199 $sql = file_get_contents($filepath); 200 if ($sql !== false) { 253 201 // 改行、タブを1スペースに変換 254 202 $sql = preg_replace("/[\r\n\t]/", " " ,$sql); 255 203 $sql_split = explode(";", $sql); 256 foreach($sql_split as $key => $val){ 204 $objQuery =& SC_Query_Ex::getSingletonInstance(); 205 foreach($sql_split as $val){ 257 206 if (trim($val) != "") { 258 207 $objQuery->query($val); … … 263 212 264 213 /** 265 * テンプレートパッケージの削除 266 */ 267 function lfDeleteTemplate($template_code) { 268 // DB更新 269 $objQuery = new SC_Query_Ex(); 270 $objQuery->delete('dtb_templates', 'template_code = ?', array($template_code)); 271 // テンプレート削除 272 $templates_dir = SMARTY_TEMPLATES_REALDIR. $template_code. "/"; 273 SC_Utils_Ex::sfDelFile($templates_dir); 274 // コンパイル削除 275 $templates_c_dir = DATA_REALDIR. "Smarty/templates_c/". $template_code. "/"; 276 SC_Utils_Ex::sfDelFile($templates_c_dir); 277 // ユーザーデータ削除 278 $user_dir = USER_TEMPLATE_REALDIR. $template_code. "/"; 279 SC_Utils_Ex::sfDelFile($user_dir); 280 } 281 282 function lfGetAllTemplates($device_type_id) { 283 $objQuery = new SC_Query_Ex(); 284 $arrRet = $objQuery->select('*', 'dtb_templates', "device_type_id = ?", array($device_type_id)); 285 if (empty($arrRet)) return array(); 286 287 return $arrRet; 288 } 289 290 /* 291 * 関数名:lfGetFileContents() 292 * 引数1 :ファイルパス 293 * 説明 :ファイル読込 294 * 戻り値:無し 295 */ 296 function lfGetFileContents($read_file) { 297 298 if(file_exists($read_file)) { 299 $contents = file_get_contents($read_file); 214 * テンプレートパッケージの削除. 215 * 216 * @param string $template_code テンプレートコード 217 * @param integer $device_type_id 端末種別ID 218 * @return boolean 成功した場合 true; 失敗した場合 false 219 */ 220 function doDelete($template_code, $device_type_id) { 221 if ($template_code == $this->getTemplateName($device_type_id) 222 || $template_code == $this->getTemplateName($device_type_id, true)) { 223 $this->arrErr['err'] = "※ デフォルトテンプレートと、選択中のテンプレートは削除出来ません<br />"; 224 return false; 300 225 } else { 301 $contents = ""; 302 } 303 304 return $contents; 226 $objQuery =& SC_Query_Ex::getSingletonInstance(); 227 $objQuery->begin(); 228 $objQuery->delete('dtb_templates', 'template_code = ? AND device_type_id = ?', 229 array($template_code, $device_type_id)); 230 231 $error = "※ テンプレートの削除ができませんでした<br />"; 232 // テンプレート削除 233 $templates_dir = SMARTY_TEMPLATES_REALDIR . $template_code. "/"; 234 if (SC_Utils_Ex::sfDelFile($templates_dir) === false) { 235 $this->arrErr['err'] = $error; 236 $objQuery->rollback(); 237 return false; 238 } 239 // ユーザーデータ削除 240 $user_dir = USER_TEMPLATE_REALDIR. $template_code. "/"; 241 if (SC_Utils_Ex::sfDelFile($user_dir) === false) { 242 $this->arrErr['err'] = $error; 243 $objQuery->rollback(); 244 return false; 245 } 246 247 // コンパイル削除 248 $templates_c_dir = DATA_REALDIR. "Smarty/templates_c/". $template_code. "/"; 249 if (SC_Utils_Ex::sfDelFile($templates_c_dir) === false) { 250 $this->arrErr['err'] = $error; 251 $objQuery->rollback(); 252 return false; 253 } 254 $objQuery->commit(); 255 return true; 256 } 257 } 258 259 /** 260 * 登録を実行する. 261 * 262 * 失敗した場合は, エラーメッセージを出力し, false を返す. 263 * 264 * @param string $template_code テンプレートコード 265 * @param integer $device_type_id 端末種別ID 266 * @return boolean 成功した場合 true; 失敗した場合 false 267 */ 268 function doRegister($template_code, $device_type_id) { 269 270 $tpl_dir = USER_TEMPLATE_REALDIR . $template_code . '/'; 271 if (!is_dir($tpl_dir)) { 272 $this->arrErr['err'] = '※ ' . $tpl_dir . 'が見つかりません<br />'; 273 return false; 274 } 275 276 // 更新SQLファイルが存在する場合はブロック位置を更新 277 $sql_file = $tpl_dir . "sql/update_bloc.sql"; 278 if (file_exists($sql_file)) { 279 $this->updateBloc($sql_file); 280 } 281 282 $this->doUpdateMasterData($template_code, $device_type_id); 283 // コンパイルファイルのクリア処理 284 $objView = new SC_AdminView_Ex(); 285 $objView->_smarty->clear_compiled_tpl(); 286 return true; 287 } 288 289 /** 290 * ダウンロードを実行する. 291 * 292 * 指定のテンプレートをアーカイブし, ブラウザに出力する. 293 * 失敗した場合は, エラーメッセージを出力し, false を返す. 294 * 295 * @param string $template_code テンプレートコード 296 * @return boolean 成功した場合 true; 失敗した場合 false 297 */ 298 function doDownload($template_code) { 299 $from_dir = USER_TEMPLATE_REALDIR . $template_code . "/"; 300 $to_dir = SMARTY_TEMPLATES_REALDIR . $template_code . "/_packages/"; 301 if (SC_Utils_Ex::recursiveMkdir($to_dir) === false) { 302 $this->arrErr['err'] = '※ ディレクトリの作成に失敗しました<br />'; 303 return false; 304 } 305 SC_Utils_Ex::sfCopyDir($from_dir, $to_dir); 306 if (SC_Helper_FileManager_Ex::downloadArchiveFiles(SMARTY_TEMPLATES_REALDIR . $template_code, $template_code) === false) { 307 $this->arrErr['err'] = '※ アーカイブファイルの作成に失敗しました<br />'; 308 return false; 309 } 310 return true; 311 } 312 313 /** 314 * テンプレート情報を取得する. 315 * 316 * @param integer $device_type_id 端末種別ID 317 * @return array テンプレート情報の配列 318 */ 319 function getAllTemplates($device_type_id) { 320 $objQuery =& SC_Query_Ex::getSingletonInstance(); 321 return $objQuery->select('*', 'dtb_templates', "device_type_id = ?", array($device_type_id)); 305 322 } 306 323 307 324 /** 308 325 * テンプレート名を返す. 326 * 327 * @param integer $device_type_id 端末種別ID 328 * @param boolean $isDefault デフォルトテンプレート名を返す場合 true 329 * @return string テンプレート名 309 330 */ 310 331 function getTemplateName($device_type_id, $isDefault = false) { -
branches/version-2_11-dev/data/class/pages/admin/design/LC_Page_Admin_Design_UpDown.php
r20764 r20863 76 76 */ 77 77 function action() { 78 // 端末種別IDを取得 79 if (isset($_REQUEST['device_type_id']) 80 && is_numeric($_REQUEST['device_type_id'])) { 81 $device_type_id = $_REQUEST['device_type_id']; 82 } else { 83 $device_type_id = DEVICE_TYPE_PC; 84 } 85 86 //サブタイトルの追加 87 $this->tpl_subtitle .= ' - ' . $this->arrDeviceType[$device_type_id]; 78 $objFormParam = new SC_FormParam_Ex(); 79 $this->lfInitParam($objFormParam); 80 $objFormParam->setParam($_REQUEST); 81 $objFormParam->convParam(); 82 83 $this->device_type_id = $objFormParam->getValue('device_type_id', DEVICE_TYPE_PC); 88 84 89 85 switch($this->getMode()) { 90 91 // ダウンロードボタン押下時の処理 92 case 'download': 86 // アップロードボタン押下時の処理 87 case 'upload': 88 $objUpFile = $this->lfInitUploadFile($objFormParam); 89 $this->arrErr = $this->lfCheckError($objFormParam, $objUpFile); 90 if (SC_Utils_Ex::isBlank($this->arrErr)) { 91 if ($this->doUpload($objFormParam, $objUpFile)) { 92 $this->tpl_onload = "alert('テンプレートファイルをアップロードしました。');"; 93 $objFormParam->setValue('template_name', ''); 94 $objFormParam->setValue('template_code', ''); 95 } 96 } 93 97 break; 94 // アップロードボタン押下時の処理 95 case 'upload': 96 // フォームパラメータ初期化 97 $objForm = $this->lfInitUpload(); 98 // エラーチェック 99 if ($arrErr = $this->lfValidateUpload($objForm)) { 100 $this->arrErr = $arrErr; 101 $this->arrForm = $objForm->getFormParamList(); 102 break; 103 } 104 // アップロードファイル初期化 105 $objUpFile = $this->lfInitUploadFile($objForm); 106 // 一時ファイルへ保存 107 $errMsg = $objUpFile->makeTempFile('template_file', false); 108 // 書き込みエラーチェック 109 if(isset($errMsg)) { 110 $this->arrErr['template_file'] = $errMsg; 111 $this->arrForm = $objForm->getFormParamList(); 112 break; 113 } 114 $this->lfAddTemplates($objForm, $objUpFile, $device_type_id); 115 $this->tpl_onload = "alert('テンプレートファイルをアップロードしました。');"; 116 break; 117 118 // 初回表示 98 119 99 default: 120 100 break; 121 101 } 122 $this->device_type_id = $device_type_id; 102 //サブタイトルの追加 103 $this->tpl_subtitle .= ' - ' . $this->arrDeviceType[$this->device_type_id]; 104 $this->arrForm = $objFormParam->getFormParamList(); 123 105 } 124 106 … … 142 124 $objUpFile = new SC_UploadFile_Ex(TEMPLATE_TEMP_REALDIR, $pkg_dir); 143 125 $objUpFile->addFile("テンプレートファイル", 'template_file', array(), TEMPLATE_SIZE, true, 0, 0, false); 144 145 126 return $objUpFile; 146 127 } 128 147 129 /** 148 130 * SC_FormParamクラスの初期化. 149 131 * 150 * @param void 151 * @return object SC_FormParamのインスタンス 152 */ 153 function lfInitUpload() { 154 $objForm = new SC_FormParam; 155 156 $objForm->addParam("テンプレートコード", "template_code", STEXT_LEN, 'KVa', array("EXIST_CHECK","SPTAB_CHECK","MAX_LENGTH_CHECK", "ALNUM_CHECK")); 157 $objForm->addParam("テンプレート名", "template_name", STEXT_LEN, 'KVa', array("EXIST_CHECK","SPTAB_CHECK","MAX_LENGTH_CHECK")); 158 $objForm->setParam($_POST); 159 160 return $objForm; 161 } 132 * @param SC_FormParam $objFormParam SC_FormParamのインスタンス 133 * @return void 134 */ 135 function lfInitParam(&$objFormParam) { 136 $objFormParam->addParam("テンプレートコード", "template_code", STEXT_LEN, 'a', array("EXIST_CHECK", "SPTAB_CHECK","MAX_LENGTH_CHECK", "ALNUM_CHECK")); 137 $objFormParam->addParam("テンプレート名", "template_name", STEXT_LEN, 'KVa', array("EXIST_CHECK", "SPTAB_CHECK","MAX_LENGTH_CHECK")); 138 $objFormParam->addParam("端末種別ID", "device_type_id", INT_LEN, 'n', array("EXIST_CHECK", "NUM_CHECK", "MAX_LENGTH_CHECK")); 139 } 140 162 141 /** 163 142 * uploadモードのパラメータ検証を行う. 164 143 * 165 * @param object $objForm SC_FormParamのインスタンス 144 * @param object $objFormParam SC_FormParamのインスタンス 145 * @param object $objUpFile SC_UploadFileのインスタンス 166 146 * @return array エラー情報を格納した連想配列, エラーが無ければ(多分)nullを返す 167 147 */ 168 function lfValidateUpload($objForm) { 169 $arrErr = $objForm->checkError(); 170 if (!empty($arrErr)) { 171 return $arrErr; 172 } 173 174 $arrForm = $objForm->getHashArray(); 148 function lfCheckError(&$objFormParam, &$objUpFile) { 149 $arrErr = $objFormParam->checkError(); 150 $template_code = $objFormParam->getValue('template_code'); 175 151 176 152 // 同名のフォルダが存在する場合はエラー 177 if (file_exists(USER_TEMPLATE_REALDIR . $arrForm['template_code'])) {153 if (file_exists(USER_TEMPLATE_REALDIR . $template_code)) { 178 154 $arrErr['template_code'] = "※ 同名のファイルがすでに存在します。<br/>"; 179 155 } … … 184 160 SMARTPHONE_DEFAULT_TEMPLATE_NAME, 185 161 DEFAULT_TEMPLATE_NAME); 186 if (in_array($arrForm['template_code'], $arrIgnoreCode)) {162 if (in_array($template_code, $arrIgnoreCode)) { 187 163 $arrErr['template_code'] = "※ このテンプレートコードは使用できません。<br/>"; 188 164 } 189 165 190 166 // DBにすでに登録されていないかチェック 191 $objQuery = new SC_Query_Ex();192 $ ret = $objQuery->count("dtb_templates", "template_code = ?", array($arrForm['template_code']));193 if (!empty($ret)) {167 $objQuery =& SC_Query_Ex::getSingletonInstance(); 168 $count = $objQuery->count("dtb_templates", "template_code = ?", array($template_code)); 169 if ($count > 0) { 194 170 $arrErr['template_code'] = "※ すでに登録されているテンプレートコードです。<br/>"; 195 171 } 196 172 197 // ファイルの拡張子チェック(.tar/tar.gzのみ許可) 198 $errFlag = true; 199 $array_ext = explode(".", $_FILES['template_file']['name']); 200 $ext = $array_ext[ count ( $array_ext ) - 1 ]; 201 $ext = strtolower($ext); 202 // .tarチェック 203 if ($ext == 'tar') { 204 $errFlag = false; 205 } 206 $ext = $array_ext[ count ( $array_ext ) - 2 ].".".$ext; 207 $ext = strtolower($ext); 208 // .tar.gzチェック 209 if ($ext== 'tar.gz') { 210 $errFlag = false; 211 } 212 213 if($errFlag) { 214 $arrErr['template_file'] = "※ アップロードするテンプレートファイルで許可されている形式は、tar/tar.gzです。<br />"; 215 } 216 173 /* 174 * ファイル形式チェック 175 * ファイルが壊れていることも考慮して, 展開可能かチェックする. 176 */ 177 $tar = new Archive_Tar($_FILES['template_file']['tmp_name'], true); 178 $arrArchive = $tar->listContent(); 179 if (!is_array($arrArchive)) { 180 $arrErr['template_file'] = "※ テンプレートファイルが解凍できません。許可されている形式は、tar/tar.gzです。<br />"; 181 } 182 183 $arrErr['template_file'] = $objUpFile->makeTempFile('template_file', false); 217 184 return $arrErr; 218 185 } 186 219 187 /** 220 188 * DBおよびファイルシステムにテンプレートパッケージを追加する. 221 189 * 222 * @param object $objForm SC_FormParamのインスタンス 190 * エラーが発生した場合は, エラーを出力し, false を返す. 191 * 192 * @param object $objFormParam SC_FormParamのインスタンス 223 193 * @param object $objUpFile SC_UploadFileのインスタンス 224 * @return void 225 */ 226 function lfAddTemplates($objForm, $objUpFile, $device_type_id) { 227 $template_code = $objForm->getValue('template_code'); 194 * @return boolean 成功した場合 true; 失敗した場合 false 195 */ 196 function doUpload($objFormParam, $objUpFile) { 197 $template_code = $objFormParam->getValue('template_code'); 198 $template_name = $objFormParam->getValue('template_name'); 199 $device_type_id = $objFormParam->getValue('device_type_id'); 200 228 201 $template_dir = SMARTY_TEMPLATES_REALDIR . $template_code; 229 202 $compile_dir = DATA_REALDIR . "Smarty/templates_c/" . $template_code; 203 204 $objQuery =& SC_Query_Ex::getSingletonInstance(); 205 $objQuery->begin(); 206 207 $arrValues = array('template_code' => $template_code, 208 'device_type_id' => $device_type_id, 209 'template_name' => $template_name, 210 'create_date' => 'now()', 211 'update_date' => 'now()'); 212 $objQuery->insert('dtb_templates', $arrValues); 213 214 $is_error = false; 230 215 // フォルダ作成 231 if(!file_exists($template_dir)) { 232 mkdir($template_dir); 233 } 234 if(!file_exists($compile_dir)) { 235 mkdir($compile_dir); 216 if (!file_exists($template_dir)) { 217 if (!mkdir($template_dir)) { 218 $this->arrErr['err'] = "※ テンプレートフォルダが作成できませんでした。<br/>"; 219 $objQuery->rollback(); 220 return false; 221 } 222 } 223 if (!file_exists($compile_dir)) { 224 if (!mkdir($compile_dir)) { 225 $this->arrErr['err'] = "※ Smarty コンパイルフォルダが作成できませんでした。<br/>"; 226 $objQuery->rollback(); 227 return false; 228 } 236 229 } 237 230 … … 240 233 241 234 // 解凍 242 SC_Helper_FileManager_Ex::unpackFile($template_dir . "/" . $_FILES['template_file']['name']); 235 if (!SC_Helper_FileManager_Ex::unpackFile($template_dir . "/" . $_FILES['template_file']['name'])) { 236 $this->arrErr['err'] = "※ テンプレートファイルの解凍に失敗しました。<br/>"; 237 $objQuery->rollback(); 238 return false; 239 } 243 240 // ユーザデータの下のファイルをコピーする 244 241 $from_dir = SMARTY_TEMPLATES_REALDIR . $template_code . "/_packages/"; 245 242 $to_dir = USER_REALDIR . "packages/" . $template_code . "/"; 246 SC_Utils_Ex::sfMakeDir($to_dir); 243 if (!SC_Utils_Ex::recursiveMkdir($to_dir)) { 244 $this->arrErr['err'] = "※ " . $to_dir . " の作成に失敗しました。<br/>"; 245 $objQuery->rollback(); 246 return false; 247 } 247 248 SC_Utils_Ex::sfCopyDir($from_dir, $to_dir); 248 249 249 // DBにテンプレート情報を保存 250 $this->lfRegisterTemplates($objForm->getHashArray(), $device_type_id); 251 } 252 253 /** 254 * dtb_templatesへ入力内容を登録する. 255 * 256 * @param array $arrForm POSTされたパラメータ 257 * @return void 258 */ 259 function lfRegisterTemplates($arrForm, $device_type_id) { 260 $objQuery = new SC_Query_Ex(); 261 $sqlval = $arrForm; 262 $sqlval['device_type_id'] = $device_type_id; 263 $sqlval['create_date'] = "now()"; 264 $sqlval['update_date'] = "now()"; 265 $objQuery->insert('dtb_templates', $sqlval); 250 $objQuery->commit(); 251 return true; 266 252 } 267 253 } -
branches/version-2_11-dev/data/class/util/SC_Utils.php
r20847 r20863 2227 2227 * @see http://jp.php.net/mkdir 2228 2228 */ 2229 function recursiveMkdir($pathname, $mode ) {2229 function recursiveMkdir($pathname, $mode = 0777) { 2230 2230 /* 2231 2231 * SC_Utils_Ex への再帰は無限ループやメモリリークの懸念 -
branches/version-2_11-dev/html/user_data/packages/default/sql/update_bloc.sql
r20395 r20863 1 DELETE FROM dtb_blocposition WHERE page_id = 1; 2 DELETE FROM dtb_blocposition WHERE page_id = 2; 3 DELETE FROM dtb_blocposition WHERE page_id = 3; 4 DELETE FROM dtb_blocposition WHERE page_id = 4; 1 DELETE FROM dtb_blocposition WHERE page_id <> 0 AND device_type_id = 10; 5 2 6 INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(1,1,1,2,'category'); 7 INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(1,1,2,3,'guide'); 8 INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(1,1,3,1,'cart'); 9 INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(1,3,4,2,'search_products'); 10 INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(1,4,5,1,'news'); 11 INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(1,3,6,1,'login'); 12 INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(1,4,7,2,'recommend'); 13 INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(2,1,1,2,'category'); 14 INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(2,1,2,3,'guide'); 15 INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(2,1,3,1,'cart'); 16 INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(2,5,4,0,'search_products'); 17 INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(2,5,5,0,'news'); 18 INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(2,5,6,0,'login'); 19 INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(2,5,7,0,'recommend'); 20 INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(3,1,1,2,'category'); 21 INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(3,1,2,3,'guide'); 22 INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(3,1,3,1,'cart'); 23 INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(3,5,4,0,'search_products'); 24 INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(3,5,5,0,'news'); 25 INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(3,5,6,0,'login'); 26 INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(3,5,7,0,'recommend'); 3 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 1, 1, 1, 2, 0); 4 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 1, 1, 2, 3, 0); 5 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 1, 1, 3, 1, 0); 6 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 1, 3, 4, 2, 0); 7 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 1, 3, 8, 3, 0); 8 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 1, 4, 7, 1, 0); 9 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 1, 4, 5, 2, 0); 10 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 1, 3, 6, 1, 0); 11 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 1, 10, 9, 1, 1); 12 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 2, 1, 1, 2, 0); 13 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 2, 1, 2, 3, 0); 14 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 2, 1, 3, 1, 0); 15 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 3, 1, 1, 2, 0); 16 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 3, 1, 2, 3, 0); 17 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 3, 1, 3, 1, 0); 18 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 4, 1, 1, 2, 0); 19 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 4, 1, 2, 3, 0); 20 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 4, 1, 3, 1, 0); 21 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 5, 1, 1, 2, 0); 22 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 5, 1, 2, 3, 0); 23 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 5, 1, 3, 1, 0); 24 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 6, 1, 1, 2, 0); 25 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 6, 1, 2, 3, 0); 26 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 6, 1, 3, 1, 0); 27 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 7, 1, 1, 2, 0); 28 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 7, 1, 2, 3, 0); 29 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 7, 1, 3, 1, 0); 30 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 8, 1, 1, 2, 0); 31 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 8, 1, 2, 3, 0); 32 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 8, 1, 3, 1, 0); 33 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 9, 1, 1, 2, 0); 34 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 9, 1, 2, 3, 0); 35 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 9, 1, 3, 1, 0); 36 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 10, 1, 1, 2, 0); 37 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 10, 1, 2, 3, 0); 38 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 10, 1, 3, 1, 0); 39 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 11, 1, 1, 2, 0); 40 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 11, 1, 2, 3, 0); 41 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 11, 1, 3, 1, 0); 42 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 12, 1, 1, 2, 0); 43 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 12, 1, 2, 3, 0); 44 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 12, 1, 3, 1, 0); 45 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 13, 1, 1, 2, 0); 46 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 13, 1, 2, 3, 0); 47 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 13, 1, 3, 1, 0); 48 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 14, 1, 1, 2, 0); 49 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 14, 1, 2, 3, 0); 50 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 14, 1, 3, 1, 0); 51 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 15, 1, 1, 2, 0); 52 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 15, 1, 2, 3, 0); 53 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 15, 1, 3, 1, 0); 54 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 16, 1, 1, 2, 0); 55 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 16, 1, 2, 3, 0); 56 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 16, 1, 3, 1, 0); 57 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 17, 1, 1, 2, 0); 58 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 17, 1, 2, 3, 0); 59 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 17, 1, 3, 1, 0); 60 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 18, 1, 1, 2, 0); 61 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 18, 1, 2, 3, 0); 62 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 18, 1, 3, 1, 0); 63 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 19, 1, 1, 2, 0); 64 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 19, 1, 2, 3, 0); 65 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 19, 1, 3, 1, 0); 66 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 20, 1, 1, 2, 0); 67 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 20, 1, 2, 3, 0); 68 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 20, 1, 3, 1, 0); 69 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 21, 1, 1, 2, 0); 70 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 21, 1, 2, 3, 0); 71 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 21, 1, 3, 1, 0); 72 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 22, 1, 1, 2, 0); 73 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 22, 1, 2, 3, 0); 74 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 22, 1, 3, 1, 0); 75 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 23, 1, 1, 2, 0); 76 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 23, 1, 2, 3, 0); 77 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 23, 1, 3, 1, 0); 78 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 24, 1, 1, 2, 0); 79 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 24, 1, 2, 3, 0); 80 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 24, 1, 3, 1, 0); 81 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 25, 1, 1, 2, 0); 82 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 25, 1, 2, 3, 0); 83 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 25, 1, 3, 1, 0); 84 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 26, 1, 1, 2, 0); 85 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 26, 1, 2, 3, 0); 86 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 26, 1, 3, 1, 0); 87 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 27, 1, 1, 2, 0); 88 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 27, 1, 2, 3, 0); 89 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 27, 1, 3, 1, 0); 90 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 28, 1, 1, 2, 0); 91 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 28, 1, 2, 3, 0); 92 INSERT INTO dtb_blocposition (device_type_id, page_id, target_id, bloc_id, bloc_row, anywhere) VALUES (10, 28, 1, 3, 1, 0);
Note: See TracChangeset
for help on using the changeset viewer.
