Changeset 22796 for branches/version-2_12-dev/data/class/pages/admin/products/LC_Page_Admin_Products_ProductRank.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_ProductRank.php
r22597 r22796 32 32 * @version $Id$ 33 33 */ 34 class LC_Page_Admin_Products_ProductRank extends LC_Page_Admin_Ex 35 { 34 class LC_Page_Admin_Products_ProductRank extends LC_Page_Admin_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_rank.tpl'; … … 58 56 * @return void 59 57 */ 60 function process() 61 { 58 function process() { 62 59 $this->action(); 63 60 $this->sendResponse(); … … 69 66 * @return void 70 67 */ 71 function action() 72 { 68 function action() { 73 69 70 $objQuery =& SC_Query_Ex::getSingletonInstance(); 74 71 $objDb = new SC_Helper_DB_Ex(); 75 $objCategory = new SC_Helper_Category_Ex();76 72 77 73 $this->tpl_pageno = isset($_POST['pageno']) ? $_POST['pageno'] : ''; … … 104 100 } 105 101 106 $this->arrTree = $objCategory->getTree(); 107 $this->arrParentID = $objCategory->getTreeTrail($this->arrForm['parent_category_id']); 102 $this->arrTree = $objDb->sfGetCatTree($this->arrForm['parent_category_id']); 108 103 $this->arrProductsList = $this->lfGetProduct($this->arrForm['parent_category_id']); 109 $arrBread = $objCategory->getTreeTrail($this->arrForm['parent_category_id'], FALSE); 110 $this->tpl_bread_crumbs = SC_Utils_Ex::jsonEncode(array_reverse($arrBread)); 104 $arrBread = array(); 105 $objDb->findTree($this->arrTree, $this->arrForm['parent_category_id'], $arrBread); 106 $this->tpl_bread_crumbs = SC_Utils_Ex::jsonEncode($arrBread); 111 107 112 108 } … … 117 113 * @return void 118 114 */ 119 function destroy() 120 { 115 function destroy() { 121 116 parent::destroy(); 122 117 } 123 118 124 119 /* 商品読み込み */ 125 function lfGetProduct($category_id) 126 { 120 function lfGetProduct($category_id) { 127 121 // FIXME SC_Product クラスを使用した実装 128 122 $objQuery =& SC_Query_Ex::getSingletonInstance(); … … 157 151 * 商品の数値指定での並び替え実行 158 152 */ 159 function lfRenumber($parent_category_id) 160 { 153 function lfRenumber($parent_category_id) { 161 154 $objQuery =& SC_Query_Ex::getSingletonInstance(); 162 155 … … 183 176 } 184 177 185 function lfRankUp(&$objDb, $parent_category_id, $product_id) 186 { 178 function lfRankUp(&$objDb, $parent_category_id, $product_id) { 187 179 $where = 'category_id = ' . SC_Utils_Ex::sfQuoteSmart($parent_category_id); 188 180 $objDb->sfRankUp('dtb_product_categories', 'product_id', $product_id, $where); 189 181 } 190 182 191 function lfRankDown(&$objDb, $parent_category_id, $product_id) 192 { 183 function lfRankDown(&$objDb, $parent_category_id, $product_id) { 193 184 $where = 'category_id = ' . SC_Utils_Ex::sfQuoteSmart($parent_category_id); 194 185 $objDb->sfRankDown('dtb_product_categories', 'product_id', $product_id, $where); 195 186 } 196 187 197 function lfRankMove(&$objDb, $parent_category_id, $product_id) 198 { 188 function lfRankMove(&$objDb, $parent_category_id, $product_id) { 199 189 $key = 'pos-'.$product_id; 200 190 $input_pos = mb_convert_kana($_POST[$key], 'n');
Note: See TracChangeset
for help on using the changeset viewer.