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