Changeset 21514 for branches/version-2_12-dev/data/class/pages/admin/products/LC_Page_Admin_Products_ClassCategory.php
- Timestamp:
- 2012/02/15 19:56:17 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/pages/admin/products/LC_Page_Admin_Products_ClassCategory.php
r21481 r21514 147 147 */ 148 148 function lfInitParam(&$objFormParam) { 149 $objFormParam->addParam( "規格ID", 'class_id', INT_LEN, 'n', array('NUM_CHECK'));150 $objFormParam->addParam( "規格分類名", 'name', STEXT_LEN, 'KVa', array('EXIST_CHECK' ,'SPTAB_CHECK' ,'MAX_LENGTH_CHECK'));151 $objFormParam->addParam( "規格分類ID", 'classcategory_id', INT_LEN, 'n', array('NUM_CHECK'));149 $objFormParam->addParam('規格ID', 'class_id', INT_LEN, 'n', array('NUM_CHECK')); 150 $objFormParam->addParam('規格分類名', 'name', STEXT_LEN, 'KVa', array('EXIST_CHECK' ,'SPTAB_CHECK' ,'MAX_LENGTH_CHECK')); 151 $objFormParam->addParam('規格分類ID', 'classcategory_id', INT_LEN, 'n', array('NUM_CHECK')); 152 152 } 153 153 … … 161 161 $objQuery =& SC_Query_Ex::getSingletonInstance(); 162 162 163 $where = "del_flg <> 1 AND class_id = ?";164 $objQuery->setOrder( "rank DESC"); // XXX 降順165 $arrClassCat = $objQuery->select( "name, classcategory_id", 'dtb_classcategory', $where, array($class_id));163 $where = 'del_flg <> 1 AND class_id = ?'; 164 $objQuery->setOrder('rank DESC'); // XXX 降順 165 $arrClassCat = $objQuery->select('name, classcategory_id', 'dtb_classcategory', $where, array($class_id)); 166 166 return $arrClassCat; 167 167 } … … 176 176 $objQuery =& SC_Query_Ex::getSingletonInstance(); 177 177 178 $where = "class_id = ?";178 $where = 'class_id = ?'; 179 179 $name = $objQuery->get('name', 'dtb_class', $where, array($class_id)); 180 180 return $name; … … 188 188 function lfGetClassCatName($classcategory_id) { 189 189 $objQuery =& SC_Query_Ex::getSingletonInstance(); 190 $where = "classcategory_id = ?";190 $where = 'classcategory_id = ?'; 191 191 $name = $objQuery->get('name', 'dtb_classcategory', $where, array($classcategory_id)); 192 192 return $name; … … 203 203 $objQuery->begin(); 204 204 // 親規格IDの存在チェック 205 $where = "del_flg <> 1 AND class_id = ?";205 $where = 'del_flg <> 1 AND class_id = ?'; 206 206 $class_id = $objQuery->get('class_id', 'dtb_class', $where, array($arrForm['class_id'])); 207 207 if (!SC_Utils_Ex::isBlank($class_id)) { … … 232 232 $sqlval['name'] = $arrForm['name']; 233 233 $sqlval['update_date'] = 'CURRENT_TIMESTAMP'; 234 $where = "classcategory_id = ?";234 $where = 'classcategory_id = ?'; 235 235 // UPDATEの実行 236 236 $ret = $objQuery->update('dtb_classcategory', $sqlval, $where, array($arrForm['classcategory_id'])); … … 255 255 } 256 256 257 $where = "class_id = ? AND name = ?";258 $arrRet = $objQuery->select( "classcategory_id, name", 'dtb_classcategory', $where, array($arrForm['class_id'], $arrForm['name']));257 $where = 'class_id = ? AND name = ?'; 258 $arrRet = $objQuery->select('classcategory_id, name', 'dtb_classcategory', $where, array($arrForm['class_id'], $arrForm['name'])); 259 259 // 編集中のレコード以外に同じ名称が存在する場合 260 260 if ($arrRet[0]['classcategory_id'] != $arrForm['classcategory_id'] && $arrRet[0]['name'] == $arrForm['name']) { 261 $arrErr['name'] = "※ 既に同じ内容の登録が存在します。<br>";261 $arrErr['name'] = '※ 既に同じ内容の登録が存在します。<br>'; 262 262 } 263 263 return $arrErr; … … 288 288 function lfDeleteClassCat($class_id, $classcategory_id) { 289 289 $objDb = new SC_Helper_DB_Ex(); 290 $where = "class_id = ". SC_Utils_Ex::sfQuoteSmart($class_id);290 $where = 'class_id = ' . SC_Utils_Ex::sfQuoteSmart($class_id); 291 291 $objDb->sfDeleteRankRecord('dtb_classcategory', 'classcategory_id', $classcategory_id, $where, true); 292 292 } … … 300 300 function lfUpRank($class_id, $classcategory_id) { 301 301 $objDb = new SC_Helper_DB_Ex(); 302 $where = "class_id = ". SC_Utils_Ex::sfQuoteSmart($class_id);302 $where = 'class_id = ' . SC_Utils_Ex::sfQuoteSmart($class_id); 303 303 $objDb->sfRankUp('dtb_classcategory', 'classcategory_id', $classcategory_id, $where); 304 304 } … … 312 312 function lfDownRank($class_id, $classcategory_id) { 313 313 $objDb = new SC_Helper_DB_Ex(); 314 $where = "class_id = ". SC_Utils_Ex::sfQuoteSmart($class_id);314 $where = 'class_id = ' . SC_Utils_Ex::sfQuoteSmart($class_id); 315 315 $objDb->sfRankDown('dtb_classcategory', 'classcategory_id', $classcategory_id, $where); 316 316 }
Note: See TracChangeset
for help on using the changeset viewer.