Changeset 22796 for branches/version-2_12-dev/data/class/pages/admin/products/LC_Page_Admin_Products_Product.php
- Timestamp:
- 2013/05/02 18:11:36 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/pages/admin/products/LC_Page_Admin_Products_Product.php
r22578 r22796 32 32 * @version $Id$ 33 33 */ 34 class LC_Page_Admin_Products_Product extends LC_Page_Admin_Products_Ex 35 { 34 class LC_Page_Admin_Products_Product extends LC_Page_Admin_Products_Ex { 36 35 37 36 // }}} … … 43 42 * @return void 44 43 */ 45 function init() 46 { 44 function init() { 47 45 parent::init(); 48 46 $this->tpl_mainpage = 'products/product.tpl'; … … 58 56 $this->arrSTATUS_IMAGE = $masterData->getMasterData('mtb_status_image'); 59 57 $this->arrDELIVERYDATE = $masterData->getMasterData('mtb_delivery_date'); 60 $this->arrMaker = SC_Helper_ Maker_Ex::getIDValueList();58 $this->arrMaker = SC_Helper_DB_Ex::sfGetIDValueList('dtb_maker', 'maker_id', 'name'); 61 59 $this->arrAllowedTag = $masterData->getMasterData('mtb_allowed_tag'); 62 60 } … … 67 65 * @return void 68 66 */ 69 function process() 70 { 67 function process() { 71 68 $this->action(); 72 69 $this->sendResponse(); … … 78 75 * @return void 79 76 */ 80 function action() 81 { 77 function action() { 82 78 83 79 $objFormParam = new SC_FormParam_Ex(); … … 298 294 * @return void 299 295 */ 300 function destroy() 301 { 296 function destroy() { 302 297 parent::destroy(); 303 298 } … … 311 306 * @return void 312 307 */ 313 function lfInitFormParam_PreEdit(&$objFormParam, $arrPost) 314 { 308 function lfInitFormParam_PreEdit(&$objFormParam, $arrPost) { 315 309 $objFormParam->addParam('商品ID', 'product_id', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK')); 316 310 $objFormParam->setParam($arrPost); … … 325 319 * @return void 326 320 */ 327 function lfInitFormParam(&$objFormParam, $arrPost) 328 { 321 function lfInitFormParam(&$objFormParam, $arrPost) { 329 322 $objFormParam->addParam('商品ID', 'product_id', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK')); 330 323 $objFormParam->addParam('商品名', 'name', STEXT_LEN, 'KVa', array('EXIST_CHECK', 'SPTAB_CHECK', 'MAX_LENGTH_CHECK')); … … 394 387 * @return void 395 388 */ 396 function lfInitFormParam_UploadImage(&$objFormParam) 397 { 389 function lfInitFormParam_UploadImage(&$objFormParam) { 398 390 $objFormParam->addParam('image_key', 'image_key', '', '', array()); 399 391 } … … 406 398 * @return void 407 399 */ 408 function lfInitFormParam_UploadDown(&$objFormParam) 409 { 400 function lfInitFormParam_UploadDown(&$objFormParam) { 410 401 $objFormParam->addParam('down_key', 'down_key', '', '', array()); 411 402 } … … 418 409 * @return void 419 410 */ 420 function lfInitFormParam_RecommendSelect(&$objFormParam) 421 { 411 function lfInitFormParam_RecommendSelect(&$objFormParam) { 422 412 $objFormParam->addParam('anchor_key', 'anchor_key', '', '', array()); 423 413 $objFormParam->addParam('select_recommend_no', 'select_recommend_no', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK')); … … 431 421 * @return void 432 422 */ 433 function lfInitFile(&$objUpFile) 434 { 423 function lfInitFile(&$objUpFile) { 435 424 $objUpFile->addFile('一覧-メイン画像', 'main_list_image', array('jpg', 'gif', 'png'),IMAGE_SIZE, false, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT); 436 425 $objUpFile->addFile('詳細-メイン画像', 'main_image', array('jpg', 'gif', 'png'), IMAGE_SIZE, false, NORMAL_IMAGE_WIDTH, NORMAL_IMAGE_HEIGHT); … … 449 438 * @return void 450 439 */ 451 function lfInitDownFile(&$objDownFile) 452 { 440 function lfInitDownFile(&$objDownFile) { 453 441 $objDownFile->addFile('ダウンロード販売用ファイル', 'down_file', explode(',', DOWNLOAD_EXTENSION),DOWN_SIZE, true, 0, 0); 454 442 } … … 463 451 * @return array エラー情報を格納した連想配列 464 452 */ 465 function lfCheckError_Edit(&$objFormParam, &$objUpFile, &$objDownFile, $arrForm) 466 { 453 function lfCheckError_Edit(&$objFormParam, &$objUpFile, &$objDownFile, $arrForm) { 467 454 $objErr = new SC_CheckError_Ex($arrForm); 468 455 $arrErr = array(); … … 506 493 * @return void 507 494 */ 508 function lfCheckError_RecommendSelect(&$arrForm, &$arrErr) 509 { 495 function lfCheckError_RecommendSelect(&$arrForm, &$arrErr) { 510 496 $select_recommend_no = $arrForm['select_recommend_no']; 511 497 $select_recommend_id = $arrForm['recommend_id' . $select_recommend_no]; … … 516 502 continue; 517 503 } 518 $delete_key = 'recommend_delete'.intval(str_replace('recommend_id','',$key)); 519 if ($select_recommend_id == $arrForm[$key] && $arrForm[$delete_key] != 1) {504 505 if ($select_recommend_id == $arrForm[$key]) { 520 506 // 重複した場合、選択されたデータをリセットする 521 507 $arrForm['recommend_id' . $select_recommend_no] = ''; … … 533 519 * @return array 検索パラメーター配列 534 520 */ 535 function lfGetSearchParam($arrPost) 536 { 521 function lfGetSearchParam($arrPost) { 537 522 $arrSearchParam = array(); 538 523 $objFormParam = new SC_FormParam_Ex(); … … 554 539 * @return array フォームパラメーター配列 555 540 */ 556 function lfGetFormParam_PreEdit(&$objUpFile, &$objDownFile, $product_id) 557 { 541 function lfGetFormParam_PreEdit(&$objUpFile, &$objDownFile, $product_id) { 558 542 $arrForm = array(); 559 543 … … 575 559 * @return array フォームパラメーター配列 576 560 */ 577 function lfGetFormParam_Complete(&$objFormParam) 578 { 561 function lfGetFormParam_Complete(&$objFormParam) { 579 562 $arrForm = $objFormParam->getHashArray(); 580 563 $arrForm['category_id'] = unserialize($arrForm['category_id']); … … 593 576 * @return array 表示用フォームパラメーター配列 594 577 */ 595 function lfSetViewParam_InputPage(&$objUpFile, &$objDownFile, &$arrForm) 596 { 578 function lfSetViewParam_InputPage(&$objUpFile, &$objDownFile, &$arrForm) { 597 579 // カテゴリマスターデータ取得 598 580 $objDb = new SC_Helper_DB_Ex(); … … 636 618 * @return array 表示用フォームパラメーター配列 637 619 */ 638 function lfSetViewParam_ConfirmPage(&$objUpFile, &$objDownFile, &$arrForm) 639 { 620 function lfSetViewParam_ConfirmPage(&$objUpFile, &$objDownFile, &$arrForm) { 640 621 // カテゴリ表示用 641 622 $arrForm['arrCategoryId'] = $arrForm['category_id']; … … 657 638 * @return void 658 639 */ 659 function lfSetScaleImage(&$objUpFile, $image_key) 660 { 640 function lfSetScaleImage(&$objUpFile, $image_key) { 661 641 $subno = str_replace('sub_large_image', '', $image_key); 662 642 switch ($image_key) { … … 683 663 * @return void 684 664 */ 685 function lfCopyProductImageFiles(&$objUpFile) 686 { 665 function lfCopyProductImageFiles(&$objUpFile) { 687 666 $arrKey = $objUpFile->keyname; 688 667 $arrSaveFile = $objUpFile->save_file; … … 702 681 * @return void 703 682 */ 704 function lfMakeScaleImage(&$objUpFile, $from_key, $to_key, $forced = false) 705 { 683 function lfMakeScaleImage(&$objUpFile, $from_key, $to_key, $forced = false) { 706 684 $arrImageKey = array_flip($objUpFile->keyname); 707 685 $from_path = ''; … … 741 719 * @return void 742 720 */ 743 function lfDeleteTempFile(&$objUpFile, $image_key) 744 { 721 function lfDeleteTempFile(&$objUpFile, $image_key) { 745 722 // TODO: SC_UploadFile::deleteFileの画像削除条件見直し要 746 723 $arrTempFile = $objUpFile->temp_file; … … 775 752 * @return void 776 753 */ 777 function lfSaveUploadFiles(&$objUpFile, &$objDownFile, $product_id) 778 { 754 function lfSaveUploadFiles(&$objUpFile, &$objDownFile, $product_id) { 779 755 // TODO: SC_UploadFile::moveTempFileの画像削除条件見直し要 780 756 $objImage = new SC_Image_Ex($objUpFile->temp_dir); … … 810 786 * @return boolean 811 787 */ 812 function lfHasSameProductImage($product_id, $arrImageKey, $image_file_name) 813 { 788 function lfHasSameProductImage($product_id, $arrImageKey, $image_file_name) { 814 789 if (!SC_Utils_Ex::sfIsInt($product_id)) return false; 815 790 if (!$arrImageKey) return false; … … 844 819 * @return array 商品データ配列 845 820 */ 846 function lfGetProductData_FromDB($product_id) 847 { 821 function lfGetProductData_FromDB($product_id) { 848 822 $objQuery =& SC_Query_Ex::getSingletonInstance(); 849 823 $arrProduct = array(); … … 908 882 * @return array 関連商品データ配列 909 883 */ 910 function lfGetRecommendProductsData_FromDB($product_id) 911 { 884 function lfGetRecommendProductsData_FromDB($product_id) { 912 885 $objQuery =& SC_Query_Ex::getSingletonInstance(); 913 886 $arrRecommendProducts = array(); … … 936 909 * @return array 関連商品データ配列 937 910 */ 938 function lfGetRecommendProducts(&$arrForm) 939 { 911 function lfGetRecommendProducts(&$arrForm) { 940 912 $arrRecommend = array(); 941 913 … … 964 936 * @return array カテゴリマスターデータ配列 965 937 */ 966 function lfGetCategoryList_Edit() 967 { 938 function lfGetCategoryList_Edit() { 968 939 $objDb = new SC_Helper_DB_Ex(); 969 940 $arrCategoryList = array(); … … 984 955 * @return string ページonload用JavaScript 985 956 */ 986 function lfSetOnloadJavaScript_InputPage($anchor_hash = '') 987 { 957 function lfSetOnloadJavaScript_InputPage($anchor_hash = '') { 988 958 return "fnCheckStockLimit('" . DISABLED_RGB . "'); fnMoveSelect('category_id_unselect', 'category_id');" . $anchor_hash; 989 959 } … … 997 967 * @return integer 登録商品ID 998 968 */ 999 function lfRegistProduct(&$objUpFile, &$objDownFile, $arrList) 1000 { 969 function lfRegistProduct(&$objUpFile, &$objDownFile, $arrList) { 1001 970 $objQuery =& SC_Query_Ex::getSingletonInstance(); 1002 971 $objDb = new SC_Helper_DB_Ex(); … … 1146 1115 * @return void 1147 1116 */ 1148 function lfInsertDummyProductClass($arrList) 1149 { 1117 function lfInsertDummyProductClass($arrList) { 1150 1118 $objQuery =& SC_Query_Ex::getSingletonInstance(); 1151 1119 $objDb = new SC_Helper_DB_Ex(); … … 1180 1148 * @return void 1181 1149 */ 1182 function lfUpdateProductClass($arrList) 1183 { 1150 function lfUpdateProductClass($arrList) { 1184 1151 $objQuery =& SC_Query_Ex::getSingletonInstance(); 1185 1152 $sqlval = array(); … … 1200 1167 * @return void 1201 1168 */ 1202 function lfInsertRecommendProducts(&$objQuery, $arrList, $product_id) 1203 { 1169 function lfInsertRecommendProducts(&$objQuery, $arrList, $product_id) { 1204 1170 // 一旦関連商品をすべて削除する 1205 1171 $objQuery->delete('dtb_recommend_products', 'product_id = ?', array($product_id)); … … 1233 1199 * @return boolean エラーフラグ 1234 1200 */ 1235 function lfCopyProductClass($arrList, &$objQuery) 1236 { 1201 function lfCopyProductClass($arrList, &$objQuery) { 1237 1202 // 複製元のdtb_products_classを取得(規格なしのため、1件のみの取得) 1238 1203 $col = '*'; … … 1284 1249 * @return string 1285 1250 */ 1286 function lfGetAddSuffix($to_key) 1287 { 1251 function lfGetAddSuffix($to_key) { 1288 1252 if ( IMAGE_RENAME === true) return; 1289 1253 … … 1312 1276 * @return boolean true: サブ情報あり, false: サブ情報なし 1313 1277 */ 1314 function hasSubProductData($arrSubProductData) 1315 { 1278 function hasSubProductData($arrSubProductData) { 1316 1279 $has_subproduct_data = false; 1317 1280 … … 1339 1302 * @return <type> 1340 1303 */ 1341 function getAnchorHash($anchor_key) 1342 { 1304 function getAnchorHash($anchor_key) { 1343 1305 if ($anchor_key != '') { 1344 1306 return "location.hash='#" . htmlspecialchars($anchor_key) . "'";
Note: See TracChangeset
for help on using the changeset viewer.