Changeset 22567 for branches/version-2_12-dev/data/class/pages/admin/design
- Timestamp:
- 2013/02/18 19:09:54 (13 years ago)
- Location:
- branches/version-2_12-dev/data/class/pages/admin/design
- Files:
-
- 7 edited
-
LC_Page_Admin_Design.php (modified) (11 diffs)
-
LC_Page_Admin_Design_Bloc.php (modified) (10 diffs)
-
LC_Page_Admin_Design_CSS.php (modified) (12 diffs)
-
LC_Page_Admin_Design_Header.php (modified) (9 diffs)
-
LC_Page_Admin_Design_MainEdit.php (modified) (11 diffs)
-
LC_Page_Admin_Design_Template.php (modified) (13 diffs)
-
LC_Page_Admin_Design_UpDown.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/pages/admin/design/LC_Page_Admin_Design.php
r22206 r22567 32 32 * @version $Id$ 33 33 */ 34 class LC_Page_Admin_Design extends LC_Page_Admin_Ex { 34 class LC_Page_Admin_Design extends LC_Page_Admin_Ex 35 { 35 36 36 37 // }}} … … 42 43 * @return void 43 44 */ 44 function init() { 45 function init() 46 { 45 47 parent::init(); 46 48 $this->tpl_mainpage = 'design/index.tpl'; … … 59 61 * @return void 60 62 */ 61 function process() { 63 function process() 64 { 62 65 $this->action(); 63 66 $this->sendResponse(); … … 69 72 * @return void 70 73 */ 71 function action() { 74 function action() 75 { 72 76 73 77 $objLayout = new SC_Helper_PageLayout_Ex(); … … 148 152 * @return void 149 153 */ 150 function destroy() { 154 function destroy() 155 { 151 156 parent::destroy(); 152 157 } … … 159 164 * @return void 160 165 */ 161 function lfInitParam(&$objFormParam, $bloc_cnt = 0) { 166 function lfInitParam(&$objFormParam, $bloc_cnt = 0) 167 { 162 168 $objFormParam->addParam('ページID', 'page_id', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK')); 163 169 $objFormParam->addParam('端末種別ID', 'device_type_id', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK')); … … 181 187 * @return array レイアウト情報の配列 182 188 */ 183 function getLayout($device_type_id, $page_id, &$objLayout) { 189 function getLayout($device_type_id, $page_id, &$objLayout) 190 { 184 191 $arrResults = array(); 185 192 $i = 0; … … 212 219 * @return void 213 220 */ 214 function copyBloc(&$arrDest, $arrFrom, $cnt) { 221 function copyBloc(&$arrDest, $arrFrom, $cnt) 222 { 215 223 $arrDest[$cnt]['target_id'] = $this->arrTarget[$arrFrom['target_id']]; 216 224 $arrDest[$cnt]['bloc_id'] = $arrFrom['bloc_id']; … … 227 235 * @return bool 存在する場合 true 228 236 */ 229 function existsBloc($arrBloc, $arrToBlocs) { 237 function existsBloc($arrBloc, $arrToBlocs) 238 { 230 239 foreach ($arrToBlocs as $arrToBloc) { 231 240 if ($arrBloc['bloc_id'] === $arrToBloc['bloc_id']) { … … 243 252 * @return string プレビューを行う tpl_mainpage ファイル名 244 253 */ 245 function savePreviewData($page_id, &$objLayout) { 254 function savePreviewData($page_id, &$objLayout) 255 { 246 256 $arrPageData = $objLayout->getPageProperties(DEVICE_TYPE_PC, $page_id); 247 257 $objQuery =& SC_Query_Ex::getSingletonInstance(); … … 258 268 * @return void 259 269 */ 260 function placingBlocs(&$objFormParam, $is_preview = false) { 270 function placingBlocs(&$objFormParam, $is_preview = false) 271 { 261 272 $page_id = $is_preview ? 0 : $objFormParam->getValue('page_id'); 262 273 $device_type_id = $objFormParam->getValue('device_type_id'); -
branches/version-2_12-dev/data/class/pages/admin/design/LC_Page_Admin_Design_Bloc.php
r22206 r22567 32 32 * @version $Id$ 33 33 */ 34 class LC_Page_Admin_Design_Bloc extends LC_Page_Admin_Ex { 34 class LC_Page_Admin_Design_Bloc extends LC_Page_Admin_Ex 35 { 35 36 36 37 // }}} … … 42 43 * @return void 43 44 */ 44 function init() { 45 function init() 46 { 45 47 parent::init(); 46 48 $this->tpl_mainpage = 'design/bloc.tpl'; … … 60 62 * @return void 61 63 */ 62 function process() { 64 function process() 65 { 63 66 $this->action(); 64 67 $this->sendResponse(); … … 70 73 * @return void 71 74 */ 72 function action() { 75 function action() 76 { 73 77 74 78 $objFormParam = new SC_FormParam_Ex(); … … 150 154 * @return void 151 155 */ 152 function destroy() { 156 function destroy() 157 { 153 158 parent::destroy(); 154 159 } … … 160 165 * @return void 161 166 */ 162 function lfInitParam(&$objFormParam) { 167 function lfInitParam(&$objFormParam) 168 { 163 169 $objFormParam->addParam('ブロックID', 'bloc_id', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK')); 164 170 $objFormParam->addParam('端末種別ID', 'device_type_id', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK')); … … 176 182 * @return array ブロック情報の配列 177 183 */ 178 function getBlocTemplate($device_type_id, $bloc_id, &$objLayout) { 184 function getBlocTemplate($device_type_id, $bloc_id, &$objLayout) 185 { 179 186 $arrBloc = $objLayout->getBlocs($device_type_id, 'bloc_id = ?', array($bloc_id)); 180 187 if (SC_Utils_Ex::isAbsoluteRealPath($arrBloc[0]['tpl_path'])) { … … 200 207 * 失敗した場合 false 201 208 */ 202 function doRegister(&$objFormParam, &$objLayout) { 209 function doRegister(&$objFormParam, &$objLayout) 210 { 203 211 $arrParams = $objFormParam->getHashArray(); 204 212 … … 257 265 * @return boolean 登録が成功した場合 true; 失敗した場合 false 258 266 */ 259 function doDelete(&$objFormParam, &$objLayout) { 267 function doDelete(&$objFormParam, &$objLayout) 268 { 260 269 $arrParams = $objFormParam->getHashArray(); 261 270 $objQuery =& SC_Query_Ex::getSingletonInstance(); … … 299 308 * @return array エラーメッセージの配列 300 309 */ 301 function lfCheckError(&$objFormParam, &$arrErr, &$objLayout) { 310 function lfCheckError(&$objFormParam, &$arrErr, &$objLayout) 311 { 302 312 $arrParams = $objFormParam->getHashArray(); 303 313 $objErr = new SC_CheckError_Ex($arrParams); -
branches/version-2_12-dev/data/class/pages/admin/design/LC_Page_Admin_Design_CSS.php
r22206 r22567 32 32 * @version $Id$ 33 33 */ 34 class LC_Page_Admin_Design_CSS extends LC_Page_Admin_Ex { 34 class LC_Page_Admin_Design_CSS extends LC_Page_Admin_Ex 35 { 35 36 36 37 // }}} … … 42 43 * @return void 43 44 */ 44 function init() { 45 function init() 46 { 45 47 parent::init(); 46 48 $this->tpl_mainpage = 'design/css.tpl'; … … 59 61 * @return void 60 62 */ 61 function process() { 63 function process() 64 { 62 65 $this->action(); 63 66 $this->sendResponse(); … … 69 72 * @return void 70 73 */ 71 function action() { 74 function action() 75 { 72 76 73 77 $objLayout = new SC_Helper_PageLayout_Ex(); … … 142 146 * @return void 143 147 */ 144 function destroy() { 148 function destroy() 149 { 145 150 parent::destroy(); 146 151 } … … 152 157 * @return void 153 158 */ 154 function lfInitParam(&$objFormParam) { 159 function lfInitParam(&$objFormParam) 160 { 155 161 $objFormParam->addParam('端末種別ID', 'device_type_id', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK')); 156 162 $objFormParam->addParam('CSSファイル名', 'css_name', STEXT_LEN, 'a', array('MAX_LENGTH_CHECK')); … … 172 178 * @return boolean 登録が成功した場合 true; 失敗した場合 false 173 179 */ 174 function doRegister($css_dir, $css_name, $old_css_name, $css_path, $css_data) { 180 function doRegister($css_dir, $css_name, $old_css_name, $css_path, $css_data) 181 { 175 182 $objFileManager = new SC_Helper_FileManager_Ex(); 176 183 … … 196 203 * @return boolean 削除が成功した場合 true; 失敗した場合 false 197 204 */ 198 function doDelete($css_path) { 205 function doDelete($css_path) 206 { 199 207 if (!unlink($css_path)) { 200 208 $this->arrErr['err'] = '※ CSSの削除に失敗しました<br />'; … … 210 218 * @return array ファイルリスト 211 219 */ 212 function getCSSList($css_dir) { 220 function getCSSList($css_dir) 221 { 213 222 $objFileManager = new SC_Helper_FileManager_Ex(); 214 223 … … 231 240 * @return array エラーメッセージの配列 232 241 */ 233 function lfCheckError(&$objFormParam, &$arrErr) { 242 function lfCheckError(&$objFormParam, &$arrErr) 243 { 234 244 $arrParams = $objFormParam->getHashArray(); 235 245 $objErr = new SC_CheckError_Ex($arrParams); … … 266 276 * @return string CSSディレクトリ 267 277 */ 268 function getCSSDir($device_type_id) { 278 function getCSSDir($device_type_id) 279 { 269 280 return SC_Helper_PageLayout_Ex::getTemplatePath($device_type_id, true) . 'css/'; 270 281 } … … 275 286 * @return boolean 276 287 */ 277 function checkPath($str) { 288 function checkPath($str) 289 { 278 290 // 含む場合はfalse 279 291 if (preg_match('|\./|', $str)) { -
branches/version-2_12-dev/data/class/pages/admin/design/LC_Page_Admin_Design_Header.php
r22206 r22567 32 32 * @version $Id$ 33 33 */ 34 class LC_Page_Admin_Design_Header extends LC_Page_Admin_Ex { 34 class LC_Page_Admin_Design_Header extends LC_Page_Admin_Ex 35 { 35 36 36 37 // }}} … … 42 43 * @return void 43 44 */ 44 function init() { 45 function init() 46 { 45 47 parent::init(); 46 48 $this->tpl_mainpage = 'design/header.tpl'; … … 60 62 * @return void 61 63 */ 62 function process() { 64 function process() 65 { 63 66 $this->action(); 64 67 $this->sendResponse(); … … 70 73 * @return void 71 74 */ 72 function action() { 75 function action() 76 { 73 77 74 78 $objFormParam = new SC_FormParam_Ex(); … … 121 125 * @return void 122 126 */ 123 function destroy() { 127 function destroy() 128 { 124 129 parent::destroy(); 125 130 } … … 131 136 * @return void 132 137 */ 133 function lfInitParam(&$objFormParam) { 138 function lfInitParam(&$objFormParam) 139 { 134 140 $objFormParam->addParam('端末種別ID', 'device_type_id', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK')); 135 141 $objFormParam->addParam('division', 'division', STEXT_LEN, 'a', array('MAX_LENGTH_CHECK')); … … 144 150 * @return array エラーメッセージの配列 145 151 */ 146 function lfCheckError(&$objFormParam, &$arrErr) { 152 function lfCheckError(&$objFormParam, &$arrErr) 153 { 147 154 $arrParams = $objFormParam->getHashArray(); 148 155 $objErr = new SC_CheckError_Ex($arrParams); … … 160 167 * @return integer|boolean 登録が成功した場合 true; 失敗した場合 false 161 168 */ 162 function doRegister(&$objFormParam) { 169 function doRegister(&$objFormParam) 170 { 163 171 $division = $objFormParam->getValue('division'); 164 172 $contents = $objFormParam->getValue($division); … … 179 187 * @return string|boolean 成功した場合, テンプレートのパス; 失敗した場合 false 180 188 */ 181 function getTemplatePath($device_type_id, $division) { 189 function getTemplatePath($device_type_id, $division) 190 { 182 191 $tpl_path = SC_Helper_PageLayout_Ex::getTemplatePath($device_type_id) . '/' . $division . '.tpl'; 183 192 if (file_exists($tpl_path)) { -
branches/version-2_12-dev/data/class/pages/admin/design/LC_Page_Admin_Design_MainEdit.php
r22206 r22567 32 32 * @version $Id$ 33 33 */ 34 class LC_Page_Admin_Design_MainEdit extends LC_Page_Admin_Ex { 34 class LC_Page_Admin_Design_MainEdit extends LC_Page_Admin_Ex 35 { 35 36 36 37 // }}} … … 42 43 * @return void 43 44 */ 44 function init() { 45 function init() 46 { 45 47 parent::init(); 46 48 $this->tpl_mainpage = 'design/main_edit.tpl'; … … 59 61 * @return void 60 62 */ 61 function process() { 63 function process() 64 { 62 65 $this->action(); 63 66 $this->sendResponse(); … … 69 72 * @return void 70 73 */ 71 function action() { 74 function action() 75 { 72 76 73 77 $objLayout = new SC_Helper_PageLayout_Ex(); … … 141 145 * @return void 142 146 */ 143 function destroy() { 147 function destroy() 148 { 144 149 parent::destroy(); 145 150 } … … 153 158 * @return void 154 159 */ 155 function lfInitParam(&$objFormParam) { 160 function lfInitParam(&$objFormParam) 161 { 156 162 $objFormParam->addParam('ページID', 'page_id', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK')); 157 163 $objFormParam->addParam('端末種別ID', 'device_type_id', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK')); … … 172 178 * @return array ページデータの配列 173 179 */ 174 function getTplMainpage($device_type_id, $page_id, &$objLayout) { 180 function getTplMainpage($device_type_id, $page_id, &$objLayout) 181 { 175 182 $arrPageData = $objLayout->getPageProperties($device_type_id, $page_id); 176 183 … … 196 203 * 失敗した場合 false 197 204 */ 198 function doRegister(&$objFormParam, &$objLayout) { 205 function doRegister(&$objFormParam, &$objLayout) 206 { 199 207 $filename = $objFormParam->getValue('filename'); 200 208 $arrParams['device_type_id'] = $objFormParam->getValue('device_type_id'); … … 251 259 * @return integer ページID 252 260 */ 253 function registerPage($arrParams, &$objLayout) { 261 function registerPage($arrParams, &$objLayout) 262 { 254 263 $objQuery =& SC_Query_Ex::getSingletonInstance(); 255 264 … … 295 304 * @return array エラーメッセージの配列 296 305 */ 297 function lfCheckError(&$objFormParam, &$arrErr) { 306 function lfCheckError(&$objFormParam, &$arrErr) 307 { 298 308 $arrParams = $objFormParam->getHashArray(); 299 309 $objErr = new SC_CheckError_Ex($arrParams); … … 344 354 * @return boolean 作成に成功した場合 true 345 355 */ 346 function createPHPFile($filename) { 356 function createPHPFile($filename) 357 { 347 358 $path = USER_REALDIR . $filename . '.php'; 348 359 -
branches/version-2_12-dev/data/class/pages/admin/design/LC_Page_Admin_Design_Template.php
r22206 r22567 31 31 * @version $Id$ 32 32 */ 33 class LC_Page_Admin_Design_Template extends LC_Page_Admin_Ex { 33 class LC_Page_Admin_Design_Template extends LC_Page_Admin_Ex 34 { 34 35 35 36 // }}} … … 41 42 * @return void 42 43 */ 43 function init() { 44 function init() 45 { 44 46 parent::init(); 45 47 $this->tpl_mainpage = 'design/template.tpl'; … … 60 62 * @return void 61 63 */ 62 function process() { 64 function process() 65 { 63 66 $this->action(); 64 67 $this->sendResponse(); … … 70 73 * @return void 71 74 */ 72 function action() { 75 function action() 76 { 73 77 74 78 $objFormParam = new SC_FormParam_Ex(); … … 138 142 * @return void 139 143 */ 140 function destroy() { 144 function destroy() 145 { 141 146 parent::destroy(); 142 147 } … … 148 153 * @return void 149 154 */ 150 function lfInitParam(&$objFormParam) { 155 function lfInitParam(&$objFormParam) 156 { 151 157 $objFormParam->addParam('端末種別ID', 'device_type_id', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK')); 152 158 $objFormParam->addParam('template_code', 'template_code', STEXT_LEN, 'a', array('EXIST_CHECK', 'SPTAB_CHECK','MAX_LENGTH_CHECK', 'ALNUM_CHECK')); … … 162 168 * @return void 163 169 */ 164 function doUpdateMasterData($template_code, $device_type_id) { 170 function doUpdateMasterData($template_code, $device_type_id) 171 { 165 172 $masterData = new SC_DB_MasterData_Ex(); 166 173 … … 197 204 * @return void 198 205 */ 199 function updateBloc($filepath) { 206 function updateBloc($filepath) 207 { 200 208 $sql = file_get_contents($filepath); 201 209 if ($sql !== false) { … … 219 227 * @return boolean 成功した場合 true; 失敗した場合 false 220 228 */ 221 function doDelete($template_code, $device_type_id) { 229 function doDelete($template_code, $device_type_id) 230 { 222 231 if ($template_code == $this->getTemplateName($device_type_id) 223 232 || $template_code == $this->getTemplateName($device_type_id, true)) { … … 267 276 * @return boolean 成功した場合 true; 失敗した場合 false 268 277 */ 269 function doRegister($template_code, $device_type_id) { 278 function doRegister($template_code, $device_type_id) 279 { 270 280 271 281 $tpl_dir = USER_TEMPLATE_REALDIR . $template_code . '/'; … … 297 307 * @return boolean 成功した場合 true; 失敗した場合 false 298 308 */ 299 function doDownload($template_code) { 309 function doDownload($template_code) 310 { 300 311 $from_dir = USER_TEMPLATE_REALDIR . $template_code . '/'; 301 312 $to_dir = SMARTY_TEMPLATES_REALDIR . $template_code . '/_packages/'; … … 318 329 * @return array テンプレート情報の配列 319 330 */ 320 function getAllTemplates($device_type_id) { 331 function getAllTemplates($device_type_id) 332 { 321 333 $objQuery =& SC_Query_Ex::getSingletonInstance(); 322 334 return $objQuery->select('*', 'dtb_templates', 'device_type_id = ?', array($device_type_id)); … … 330 342 * @return string テンプレート名 331 343 */ 332 function getTemplateName($device_type_id, $isDefault = false) { 344 function getTemplateName($device_type_id, $isDefault = false) 345 { 333 346 switch ($device_type_id) { 334 347 case DEVICE_TYPE_MOBILE: -
branches/version-2_12-dev/data/class/pages/admin/design/LC_Page_Admin_Design_UpDown.php
r22206 r22567 32 32 * @version $Id$ 33 33 */ 34 class LC_Page_Admin_Design_UpDown extends LC_Page_Admin_Ex { 34 class LC_Page_Admin_Design_UpDown extends LC_Page_Admin_Ex 35 { 35 36 36 37 // }}} … … 42 43 * @return void 43 44 */ 44 function init() { 45 function init() 46 { 45 47 parent::init(); 46 48 $this->tpl_mainpage = 'design/up_down.tpl'; … … 61 63 * @return void 62 64 */ 63 function process() { 65 function process() 66 { 64 67 $this->action(); 65 68 $this->sendResponse(); … … 73 76 * @return void 74 77 */ 75 function action() { 78 function action() 79 { 76 80 77 81 $objFormParam = new SC_FormParam_Ex(); … … 110 114 * @return void 111 115 */ 112 function destroy() { 116 function destroy() 117 { 113 118 parent::destroy(); 114 119 } … … 120 125 * @return object SC_UploadFileのインスタンス 121 126 */ 122 function lfInitUploadFile($objForm) { 127 function lfInitUploadFile($objForm) 128 { 123 129 $pkg_dir = SMARTY_TEMPLATES_REALDIR . $objForm->getValue('template_code'); 124 130 $objUpFile = new SC_UploadFile_Ex(TEMPLATE_TEMP_REALDIR, $pkg_dir); … … 133 139 * @return void 134 140 */ 135 function lfInitParam(&$objFormParam) { 141 function lfInitParam(&$objFormParam) 142 { 136 143 $objFormParam->addParam('テンプレートコード', 'template_code', STEXT_LEN, 'a', array('EXIST_CHECK', 'SPTAB_CHECK','MAX_LENGTH_CHECK', 'ALNUM_CHECK')); 137 144 $objFormParam->addParam('テンプレート名', 'template_name', STEXT_LEN, 'KVa', array('EXIST_CHECK', 'SPTAB_CHECK','MAX_LENGTH_CHECK')); … … 146 153 * @return array エラー情報を格納した連想配列, エラーが無ければ(多分)nullを返す 147 154 */ 148 function lfCheckError(&$objFormParam, &$objUpFile) { 155 function lfCheckError(&$objFormParam, &$objUpFile) 156 { 149 157 $arrErr = $objFormParam->checkError(); 150 158 $template_code = $objFormParam->getValue('template_code'); … … 197 205 * @return boolean 成功した場合 true; 失敗した場合 false 198 206 */ 199 function doUpload($objFormParam, $objUpFile) { 207 function doUpload($objFormParam, $objUpFile) 208 { 200 209 $template_code = $objFormParam->getValue('template_code'); 201 210 $template_name = $objFormParam->getValue('template_name');
Note: See TracChangeset
for help on using the changeset viewer.
