Changeset 18613


Ignore:
Timestamp:
2010/03/31 12:39:06 (16 years ago)
Author:
shutta
Message:

未使用メソッドの削除
r18279 をマージ

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/data/class/pages/admin/customer/LC_Page_Admin_Customer.php

    r18007 r18613  
    461461        return $objErr->arrErr; 
    462462    } 
    463  
    464     function lfSetWhere($arrForm){ 
    465         foreach ($arrForm as $key => $val) { 
    466  
    467             $val = sfManualEscape($val); 
    468  
    469             if($val == "") continue; 
    470  
    471             switch ($key) { 
    472             case 'product_id': 
    473                 $where .= " AND product_id = ?"; 
    474                 $arrval[] = $val; 
    475                 break; 
    476             case 'product_class_id': 
    477                 $where .= " AND product_id IN (SELECT product_id FROM dtb_products_class WHERE product_class_id = ?)"; 
    478                 $arrval[] = $val; 
    479                 break; 
    480             case 'name': 
    481                 $where .= " AND name ILIKE ?"; 
    482                 $arrval[] = "%$val%"; 
    483                 break; 
    484             case 'category_id': 
    485                 list($tmp_where, $tmp_arrval) = sfGetCatWhere($val); 
    486                 if($tmp_where != "") { 
    487                     $where.= " AND $tmp_where"; 
    488                     $arrval = array_merge($arrval, $tmp_arrval); 
    489                 } 
    490                 break; 
    491             case 'product_code': 
    492                 $where .= " AND product_id IN (SELECT product_id FROM dtb_products_class WHERE product_code ILIKE ? GROUP BY product_id)"; 
    493                 $arrval[] = "%$val%"; 
    494                 break; 
    495             case 'startyear': 
    496                 $date = sfGetTimestamp($_POST['startyear'], $_POST['startmonth'], $_POST['startday']); 
    497                 $where.= " AND update_date >= ?"; 
    498                 $arrval[] = $date; 
    499                 break; 
    500             case 'endyear': 
    501                 $date = sfGetTimestamp($_POST['endyear'], $_POST['endmonth'], $_POST['endday']); 
    502                 $where.= " AND update_date <= ?"; 
    503                 $arrval[] = $date; 
    504                 break; 
    505             case 'product_flag': 
    506                 global $arrSTATUS; 
    507                 $product_flag = sfSearchCheckBoxes($val); 
    508                 if($product_flag != "") { 
    509                     $where.= " AND product_flag LIKE ?"; 
    510                     $arrval[] = $product_flag; 
    511                 } 
    512                 break; 
    513             case 'status': 
    514                 $tmp_where = ""; 
    515                 foreach ($val as $element){ 
    516                     if ($element != ""){ 
    517                         if ($tmp_where == ""){ 
    518                             $tmp_where.="AND (status LIKE ? "; 
    519                         }else{ 
    520                             $tmp_where.="OR status LIKE ? "; 
    521                         } 
    522                         $arrval[]=$element; 
    523                     } 
    524                 } 
    525                 if ($tmp_where != ""){ 
    526                     $tmp_where.=")"; 
    527                     $where.= "$tmp_where"; 
    528                 } 
    529                 break; 
    530             default: 
    531                 break; 
    532             } 
    533         } 
    534     } 
    535463} 
    536464?> 
Note: See TracChangeset for help on using the changeset viewer.