Ignore:
Timestamp:
2012/02/06 11:05:15 (12 years ago)
Author:
Seasoft
Message:

#1613 (ソース整形・ソースコメントの改善)

  • Zend Framework PHP 標準コーディング規約への準拠を高めた
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/data/class/SC_CustomerList.php

    r21420 r21441  
    3737        $dbFactory = SC_DB_DBFactory_Ex::getInstance(); 
    3838 
    39         if($mode == "") { 
     39        if ($mode == "") { 
    4040            // 会員本登録会員で削除していない会員 
    4141            $this->setWhere("status = 2 AND del_flg = 0 "); 
     
    4444        } 
    4545 
    46         if($mode == 'customer') { 
     46        if ($mode == 'customer') { 
    4747            $this->setWhere( " del_flg = 0 "); 
    4848            // 登録日を示すカラム 
     
    5252        // 会員ID 
    5353        if (!isset($this->arrSql['search_customer_id'])) $this->arrSql['search_customer_id'] = ""; 
    54         if ( strlen($this->arrSql['search_customer_id']) > 0 ) { 
     54        if (strlen($this->arrSql['search_customer_id']) > 0 ) { 
    5555            $this->setWhere( "customer_id =  ?" ); 
    5656            $this->arrVal[] = $this->arrSql['search_customer_id']; 
     
    5959        // 名前 
    6060        if (!isset($this->arrSql['search_name'])) $this->arrSql['search_name'] = ""; 
    61         if ( strlen($this->arrSql['search_name']) > 0 ) { 
     61        if (strlen($this->arrSql['search_name']) > 0 ) { 
    6262            $this->setWhere("(" . $dbFactory->concatColumn(array("name01", "name02")) . " LIKE ?)" ); 
    6363            $searchName = $this->addSearchStr($this->arrSql['search_name']); 
     
    6767        // 名前(フリガナ) 
    6868        if (!isset($this->arrSql['search_kana'])) $this->arrSql['search_kana'] = ""; 
    69         if ( strlen($this->arrSql['search_kana']) > 0 ) { 
     69        if (strlen($this->arrSql['search_kana']) > 0 ) { 
    7070            $this->setWhere("(" . $dbFactory->concatColumn(array("kana01", "kana02")) . " LIKE ?)" ); 
    7171            $searchKana = $this->addSearchStr($this->arrSql['search_kana']); 
     
    7575        // 都道府県 
    7676        if (!isset($this->arrSql['search_pref'])) $this->arrSql['search_pref'] = ""; 
    77         if ( strlen($this->arrSql['search_pref']) > 0 ) { 
     77        if (strlen($this->arrSql['search_pref']) > 0 ) { 
    7878            $this->setWhere( "pref = ?" ); 
    7979            $this->arrVal[] = $this->arrSql['search_pref']; 
     
    8282        // 電話番号 
    8383        if (!isset($this->arrSql['search_tel'])) $this->arrSql['search_tel'] = ""; 
    84         if ( is_numeric( $this->arrSql['search_tel'] ) ) { 
     84        if (is_numeric( $this->arrSql['search_tel'] ) ) { 
    8585            $this->setWhere("(" . $dbFactory->concatColumn(array("tel01", "tel02", "tel03")) . " LIKE ?)" ); 
    8686            $searchTel = $this->addSearchStr($this->arrSql['search_tel']); 
     
    9090        // 性別 
    9191        if (!isset($this->arrSql['search_sex'])) $this->arrSql['search_sex'] = ""; 
    92         if ( is_array( $this->arrSql['search_sex'] ) ){ 
     92        if (is_array( $this->arrSql['search_sex'] ) ) { 
    9393            $arrSexVal = $this->setItemTerm( $this->arrSql['search_sex'] ,'sex' ); 
    9494            foreach ($arrSexVal as $data) { 
     
    9999        // 職業 
    100100        if (!isset($this->arrSql['search_job'])) $this->arrSql['search_job'] = ""; 
    101         if ( is_array( $this->arrSql['search_job'] ) ){ 
    102             if ( in_array("不明", $this->arrSql['search_job'] ) ) { 
     101        if (is_array( $this->arrSql['search_job'] ) ) { 
     102            if (in_array("不明", $this->arrSql['search_job'] ) ) { 
    103103                $arrJobVal = $this->setItemTermWithNull( $this->arrSql['search_job'] ,'job' ); 
    104104            } else { 
     
    118118            $this->arrSql['search_email'] = explode(",", $this->arrSql['search_email']); 
    119119            $sql_where = ""; 
    120             foreach($this->arrSql['search_email'] as $val) { 
     120            foreach ($this->arrSql['search_email'] as $val) { 
    121121                $val = trim($val); 
    122122                //検索条件を含まない 
    123                 if($this->arrSql['not_emailinc'] == '1') { 
    124                     if($sql_where == "") { 
     123                if ($this->arrSql['not_emailinc'] == '1') { 
     124                    if ($sql_where == "") { 
    125125                        $sql_where .= "dtb_customer.email NOT ILIKE ? "; 
    126126                    } else { 
     
    128128                    } 
    129129                } else { 
    130                     if($sql_where == "") { 
     130                    if ($sql_where == "") { 
    131131                        $sql_where .= "dtb_customer.email ILIKE ? "; 
    132132                    } else { 
     
    147147            $this->arrSql['search_email_mobile'] = explode(",", $this->arrSql['search_email_mobile']); 
    148148            $sql_where = ""; 
    149             foreach($this->arrSql['search_email_mobile'] as $val) { 
     149            foreach ($this->arrSql['search_email_mobile'] as $val) { 
    150150                $val = trim($val); 
    151151                //検索条件を含まない 
    152                 if($this->arrSql['not_email_mobileinc'] == '1') { 
    153                     if($sql_where == "") { 
     152                if ($this->arrSql['not_email_mobileinc'] == '1') { 
     153                    if ($sql_where == "") { 
    154154                        $sql_where .= "dtb_customer.email_mobile NOT ILIKE ? "; 
    155155                    } else { 
     
    157157                    } 
    158158                } else { 
    159                     if($sql_where == "") { 
     159                    if ($sql_where == "") { 
    160160                        $sql_where .= "dtb_customer.email_mobile ILIKE ? "; 
    161161                    } else { 
     
    170170 
    171171        // メールマガジンの場合 
    172         if($mode == 'customer') { 
     172        if ($mode == 'customer') { 
    173173            // メルマガ受け取りの選択項目がフォームに存在する場合 
    174             if ( isset($this->arrSql['search_htmlmail'])){ 
    175                 if (SC_Utils_Ex::sfIsInt($this->arrSql['search_htmlmail'])){ 
     174            if (isset($this->arrSql['search_htmlmail'])) { 
     175                if (SC_Utils_Ex::sfIsInt($this->arrSql['search_htmlmail'])) { 
    176176                    $this->setWhere("mailmaga_flg = ?"); 
    177177                    $this->arrVal[] = $this->arrSql['search_htmlmail']; 
     
    184184 
    185185        // 配信メールアドレス種別 
    186         if ( $mode == 'customer' ){ 
    187             if (isset($this->arrSql['search_mail_type'])){ 
     186        if ($mode == 'customer' ) { 
     187            if (isset($this->arrSql['search_mail_type'])) { 
    188188                $sqlEmailMobileIsEmpty = "(dtb_customer.email_mobile IS NULL OR dtb_customer.email_mobile = '')"; 
    189189                switch ($this->arrSql['search_mail_type']) { 
     
    211211        if (!isset($this->arrSql['search_buy_total_from'])) $this->arrSql['search_buy_total_from'] = ""; 
    212212        if (!isset($this->arrSql['search_buy_total_to'])) $this->arrSql['search_buy_total_to'] = ""; 
    213         if( is_numeric( $this->arrSql["search_buy_total_from"] ) || is_numeric( $this->arrSql["search_buy_total_to"] ) ) { 
     213        if (is_numeric( $this->arrSql["search_buy_total_from"] ) || is_numeric( $this->arrSql["search_buy_total_to"] ) ) { 
    214214            $arrBuyTotal = $this->selectRange($this->arrSql["search_buy_total_from"], $this->arrSql["search_buy_total_to"], "buy_total"); 
    215215            foreach ($arrBuyTotal as $data) { 
     
    221221        if (!isset($this->arrSql['search_buy_times_from'])) $this->arrSql['search_buy_times_from'] = ""; 
    222222        if (!isset($this->arrSql['search_buy_times_to'])) $this->arrSql['search_buy_times_to'] = ""; 
    223         if( is_numeric( $this->arrSql["search_buy_times_from"] ) || is_numeric( $this->arrSql["search_buy_times_to"] ) ) { 
     223        if (is_numeric( $this->arrSql["search_buy_times_from"] ) || is_numeric( $this->arrSql["search_buy_times_to"] ) ) { 
    224224            $arrBuyTimes = $this->selectRange($this->arrSql["search_buy_times_from"], $this->arrSql["search_buy_times_to"], "buy_times"); 
    225225            foreach ($arrBuyTimes as $data) { 
     
    288288        // 購入商品コード 
    289289        if (!isset($this->arrSql['search_buy_product_code'])) $this->arrSql['search_buy_product_code'] = ""; 
    290         if ( strlen($this->arrSql['search_buy_product_code']) > 0 ) { 
     290        if (strlen($this->arrSql['search_buy_product_code']) > 0 ) { 
    291291            $this->setWhere( "customer_id IN (SELECT customer_id FROM dtb_order WHERE order_id IN (SELECT order_id FROM dtb_order_detail WHERE product_code LIKE ? ) AND del_flg = 0)"); 
    292292            $search_buyproduct_code = $this->addSearchStr($this->arrSql['search_buy_product_code']); 
     
    296296        // 購入商品名称 
    297297        if (!isset($this->arrSql['search_buy_product_name'])) $this->arrSql['search_buy_product_name'] = ""; 
    298         if ( strlen($this->arrSql['search_buy_product_name']) > 0 ) { 
     298        if (strlen($this->arrSql['search_buy_product_name']) > 0 ) { 
    299299            $this->setWhere( "customer_id IN (SELECT customer_id FROM dtb_order WHERE order_id IN (SELECT order_id FROM dtb_order_detail WHERE product_name LIKE ? ) AND del_flg = 0)"); 
    300300            $search_buyproduct_name = $this->addSearchStr($this->arrSql['search_buy_product_name']); 
     
    304304        // カテゴリを選択している場合のみ絞込検索を行う 
    305305        if (!isset($this->arrSql['search_category_id'])) $this->arrSql['search_category_id'] = ""; 
    306         if ( strlen($this->arrSql['search_category_id']) > 0){ 
     306        if (strlen($this->arrSql['search_category_id']) > 0) { 
    307307            // カテゴリで絞込検索を行うSQL文生成 
    308308            list($tmp_where, $tmp_arrval) = $objDb->sfGetCatWhere($this->arrSql['search_category_id']); 
    309309 
    310310            // カテゴリで絞込みが可能の場合 
    311             if($tmp_where != "") { 
     311            if ($tmp_where != "") { 
    312312                $this->setWhere( " customer_id IN (SELECT distinct customer_id FROM dtb_order WHERE order_id IN (SELECT distinct order_id FROM dtb_order_detail WHERE product_id IN (SELECT product_id FROM dtb_product_categories WHERE ".$tmp_where." ) AND del_flg = 0)) "); 
    313313                $this->arrVal = array_merge((array)$this->arrVal, (array)$tmp_arrval); 
     
    317317        // 会員状態 
    318318        if (!isset($this->arrSql['search_status'])) $this->arrSql['search_status'] = ""; 
    319         if ( is_array( $this->arrSql['search_status'] ) ){ 
     319        if (is_array( $this->arrSql['search_status'] ) ) { 
    320320            $arrStatusVal = $this->setItemTerm( $this->arrSql['search_status'] ,'status' ); 
    321321            foreach ($arrStatusVal as $data) { 
Note: See TracChangeset for help on using the changeset viewer.