Changeset 15353
- Timestamp:
- 2007/08/24 21:58:12 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/feature-module-update/data/class/pages/products/LC_Page_Products_Detail.php
r15178 r15353 18 18 class LC_Page_Products_Detail extends LC_Page { 19 19 20 // TODO21 20 /** ステータス */ 22 21 var $arrSTATUS; … … 63 62 $objCustomer = new SC_Customer(); 64 63 $objQuery = new SC_Query(); 64 $objDb = new SC_Helper_DB_Ex(); 65 65 66 66 // レイアウトデザインを取得 … … 81 81 82 82 // 管理ページからの確認の場合は、非公開の商品も表示する。 83 if( $_GET['admin'] == 'on') {83 if(isset($_GET['admin']) && $_GET['admin'] == 'on') { 84 84 $where = "del_flg = 0"; 85 85 } else { … … 87 87 } 88 88 89 if( $_POST['mode'] != "") {89 if(isset($_POST['mode']) && $_POST['mode'] != "") { 90 90 $tmp_id = $_POST['product_id']; 91 91 } else { … … 94 94 95 95 // 値の正当性チェック 96 if(!SC_Utils_Ex::sfIsInt($_GET['product_id']) || !SC_Utils_Ex::sfIsRecord("dtb_products", "product_id", $tmp_id, $where)) { 96 if(!SC_Utils_Ex::sfIsInt($_GET['product_id']) 97 || !$objDb->sfIsRecord("dtb_products", "product_id", $tmp_id, $where)) { 97 98 SC_Utils_Ex::sfDispSiteError(PRODUCT_NOT_FOUND); 98 99 } … … 135 136 $this->tpl_product_id = $tmp_id; 136 137 138 if (!isset($_['mode'])) $_POST['mode'] = ""; 139 137 140 switch($_POST['mode']) { 138 141 case 'cart': … … 253 256 function lfMakeSelect($this, $product_id) { 254 257 258 $objDb = new SC_Helper_DB_Ex(); 255 259 $classcat_find1 = false; 256 260 $classcat_find2 = false; … … 259 263 260 264 // 規格名一覧 261 $arrClassName = SC_Utils_Ex::sfGetIDValueList("dtb_class", "class_id", "name");265 $arrClassName = $objDb->sfGetIDValueList("dtb_class", "class_id", "name"); 262 266 // 規格分類名一覧 263 $arrClassCatName = SC_Utils_Ex::sfGetIDValueList("dtb_classcategory", "classcategory_id", "name");267 $arrClassCatName = $objDb->sfGetIDValueList("dtb_classcategory", "classcategory_id", "name"); 264 268 // 商品規格情報の取得 265 269 $arrProductsClass = $this->lfGetProductsClass($product_id); 266 270 267 271 // 規格1クラス名の取得 268 $this->tpl_class_name1 = $arrClassName[$arrProductsClass[0]['class_id1']]; 272 $this->tpl_class_name1 = isset($arrClassName[$arrProductsClass[0]['class_id1']]) 273 ? $arrClassName[$arrProductsClass[0]['class_id1']] : ""; 269 274 // 規格2クラス名の取得 270 $this->tpl_class_name2 = $arrClassName[$arrProductsClass[0]['class_id2']]; 275 $this->tpl_class_name2 = isset($arrClassName[$arrProductsClass[0]['class_id2']]) 276 ? $arrClassName[$arrProductsClass[0]['class_id2']] : ""; 271 277 272 278 // すべての組み合わせ数 … … 303 309 304 310 // セレクトボックス表示値 311 if (!isset($arrList[$list_id])) $arrList[$list_id] = ""; 305 312 if($arrList[$list_id] == "") { 306 313 $arrList[$list_id] = "\tlist".$list_id." = new Array('選択してください', '".$arrClassCatName[$classcat_id2]."'"; … … 310 317 311 318 // セレクトボックスPOST値 319 if (!isset($arrVal[$list_id])) $arrVal[$list_id] = ""; 312 320 if($arrVal[$list_id] == "") { 313 321 $arrVal[$list_id] = "\tval".$list_id." = new Array('', '".$classcat_id2."'"; … … 352 360 353 361 // 選択されている規格2ID 354 $this->tpl_onload = "lnSetSelect('form1', 'classcategory_id1', 'classcategory_id2', '" . $_POST['classcategory_id2'] . "');"; 362 if (!isset($_POST['classcategory_id2'])) $_POST['classcategory_id2'] = ""; 363 $this->tpl_onload = "lnSetSelect('form1', 'classcategory_id1', 'classcategory_id2', '" . htmlspecialchars($_POST['classcategory_id2'], ENT_QUOTES) . "');"; 355 364 356 365 // 規格1が設定されている … … 395 404 /* 登録済みオススメ商品の読み込み */ 396 405 function lfPreGetRecommendProducts($product_id) { 406 $arrRecommend = array(); 397 407 $objQuery = new SC_Query(); 398 408 $objQuery->setorder("rank DESC"); … … 506 516 507 517 function lfConvertParam() { 518 if (!isset($this->arrForm['quantity']['value'])) $this->arrForm['quantity']['value'] = ""; 508 519 $value = $this->arrForm['quantity']['value']; 509 520 $this->arrForm['quantity']['value'] = htmlspecialchars($value, ENT_QUOTES, CHAR_CODE);
Note: See TracChangeset
for help on using the changeset viewer.