Changeset 21563 for branches/version-2_12-dev/data/class/pages/admin/products/LC_Page_Admin_Products_Review.php
- Timestamp:
- 2012/02/28 22:35:14 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/pages/admin/products/LC_Page_Admin_Products_Review.php
r21527 r21563 107 107 if (!$this->arrErr) { 108 108 // 検索条件を取得 109 list($where, $arr val) = $this->lfGetWhere($this->arrForm);109 list($where, $arrWhereVal) = $this->lfGetWhere($this->arrForm); 110 110 } 111 111 112 112 //CSVダウンロード 113 113 if ($this->getMode() == 'csv') { 114 $this->lfDoOutputCsv($where, $arr val);114 $this->lfDoOutputCsv($where, $arrWhereVal); 115 115 exit; 116 116 } 117 117 118 118 // 検索条件を取得 119 $this->arrReview = $this->lfGetReview($this->arrForm, $where, $arr val);119 $this->arrReview = $this->lfGetReview($this->arrForm, $where, $arrWhereVal); 120 120 break; 121 121 default: … … 230 230 * 231 231 * @param string $where WHERE文 232 * @param array $arr val WHERE文の判定値233 * @return void 234 */ 235 function lfDoOutputCsv($where, $arr Val) {232 * @param array $arrWhereVal WHERE文の判定値 233 * @return void 234 */ 235 function lfDoOutputCsv($where, $arrWhereVal) { 236 236 $objCSV = new SC_Helper_CSV_Ex(); 237 237 if ($where != '') { 238 238 $where = 'WHERE ' . $where; 239 239 } 240 $objCSV->sfDownloadCsv('4', $where, $arr Val, '', true);240 $objCSV->sfDownloadCsv('4', $where, $arrWhereVal, '', true); 241 241 } 242 242 … … 250 250 //削除されていない商品を検索 251 251 $where = 'A.del_flg = 0 AND B.del_flg = 0'; 252 $arrWhereVal = array(); 252 253 253 254 foreach ($arrForm AS $key=>$val) { … … 258 259 $val = preg_replace('/ /', '%', $val); 259 260 $where.= ' AND reviewer_name LIKE ? '; 260 $arr val[] = "%$val%";261 $arrWhereVal[] = "%$val%"; 261 262 break; 262 263 … … 264 265 $val = preg_replace('/ /', '%', $val); 265 266 $where.= ' AND reviewer_url LIKE ? '; 266 $arr val[] = "%$val%";267 $arrWhereVal[] = "%$val%"; 267 268 break; 268 269 … … 270 271 $val = preg_replace('/ /', '%', $val); 271 272 $where.= ' AND name LIKE ? '; 272 $arr val[] = "%$val%";273 $arrWhereVal[] = "%$val%"; 273 274 break; 274 275 … … 276 277 $val = preg_replace('/ /', '%', $val); 277 278 $where.= ' AND A.product_id IN (SELECT product_id FROM dtb_products_class WHERE product_code LIKE ?)'; 278 $arr val[] = "%$val%";279 $arrWhereVal[] = "%$val%"; 279 280 break; 280 281 … … 290 291 $tmp_where .= ' OR sex = ?'; 291 292 } 292 $arr val[] = $element;293 $arrWhereVal[] = $element; 293 294 } 294 295 } … … 303 304 case 'search_recommend_level': 304 305 $where.= ' AND recommend_level = ? '; 305 $arr val[] = $val;306 $arrWhereVal[] = $val; 306 307 break; 307 308 … … 310 311 $date = SC_Utils_Ex::sfGetTimestamp($_POST['search_startyear'], $_POST['search_startmonth'], $_POST['search_startday']); 311 312 $where.= ' AND A.create_date >= ? '; 312 $arr val[] = $date;313 $arrWhereVal[] = $date; 313 314 } 314 315 break; … … 327 328 328 329 } 329 return array($where, $arr val);330 return array($where, $arrWhereVal); 330 331 } 331 332 … … 335 336 * @param array $arrForm フォームデータ 336 337 * @param string $where WHERE文 337 * @param array $arr val WHERE文の判定値338 * @param array $arrWhereVal WHERE文の判定値 338 339 * @return array レビュー一覧 339 340 */ 340 function lfGetReview($arrForm, $where, $arr val) {341 function lfGetReview($arrForm, $where, $arrWhereVal) { 341 342 $objQuery =& SC_Query_Ex::getSingletonInstance(); 342 343 … … 344 345 $page_max = SC_Utils_Ex::sfGetSearchPageMax($arrForm['search_page_max']); 345 346 346 if (!isset($arr val)) $arrval = array();347 if (!isset($arrWhereVal)) $arrWhereVal = array(); 347 348 348 349 $from = 'dtb_review AS A LEFT JOIN dtb_products AS B ON A.product_id = B.product_id '; 349 $linemax = $objQuery->count($from, $where, $arr val);350 $linemax = $objQuery->count($from, $where, $arrWhereVal); 350 351 $this->tpl_linemax = $linemax; 351 352 … … 369 370 $col .= 'reviewer_url, title, comment, A.status, A.create_date, A.update_date, name'; 370 371 $from = 'dtb_review AS A LEFT JOIN dtb_products AS B ON A.product_id = B.product_id '; 371 $arrReview = $objQuery->select($col, $from, $where, $arr val);372 $arrReview = $objQuery->select($col, $from, $where, $arrWhereVal); 372 373 373 374 return $arrReview;
Note: See TracChangeset
for help on using the changeset viewer.