Changeset 15642


Ignore:
Timestamp:
2007/09/07 15:24:34 (13 years ago)
Author:
nanasess
Message:

未定義変数の修正

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/feature-module-update/data/class/SC_CustomerList.php

    r15562 r15642  
    1515    function SC_CustomerList($array, $mode = '') { 
    1616        parent::SC_SelectSql($array); 
     17        $objDb = new SC_Helper_DB_Ex(); 
    1718 
    1819        if($mode == "") { 
     
    7172 
    7273        // 顧客ID 
     74        if (!isset($this->arrSql['customer_id'])) $this->arrSql['customer_id'] = ""; 
    7375        if ( strlen($this->arrSql['customer_id']) > 0 ) { 
    7476            $this->setWhere( "customer_id =  ?" ); 
     
    7779 
    7880        // 名前 
     81        if (!isset($this->arrSql['name'])) $this->arrSql['name'] = ""; 
    7982        if ( strlen($this->arrSql['name']) > 0 ) { 
    8083            if(DB_TYPE == "pgsql"){ 
     
    8992 
    9093        // 名前(カナ) 
     94        if (!isset($this->arrSql['kana'])) $this->arrSql['kana'] = ""; 
    9195        if ( strlen($this->arrSql['kana']) > 0 ) { 
    9296            if(DB_TYPE == "pgsql"){ 
     
    100104 
    101105        // 都道府県 
     106        if (!isset($this->arrSql['pref'])) $this->arrSql['pref'] = ""; 
    102107        if ( strlen($this->arrSql['pref']) > 0 ) { 
    103108            $this->setWhere( "pref = ?" ); 
     
    106111 
    107112        // 電話番号 
     113        if (!isset($this->arrSql['tel'])) $this->arrSql['tel'] = ""; 
    108114        if ( is_numeric( $this->arrSql['tel'] ) ) { 
    109115            if(DB_TYPE == "pgsql"){ 
     
    141147 
    142148        // E-MAIL 
     149        if (!isset($this->arrSql['email'])) $this->arrSql['email'] = ""; 
    143150        if (strlen($this->arrSql['email']) > 0) { 
    144151            //カンマ区切りで複数の条件指定可能に 
     
    168175 
    169176        // E-MAIL(mobile) 
     177        if (!isset($this->arrSql['email_mobile'])) $this->arrSql['email_mobile'] = ""; 
    170178        if (strlen($this->arrSql['email_mobile']) > 0) { 
    171179            //カンマ区切りで複数の条件指定可能に 
     
    196204        // 配信メールアドレス種別 
    197205        if ( $mode == 'magazine' ){ 
     206            if (!isset($this->arrSql['mail_type'])) $this->arrSql['mail_type'] = ""; 
    198207            if ( strlen($this->arrSql['mail_type']) > 0 && $this->arrSql['mail_type'] == 2) { 
    199208                $this->setWhere( " dtb_customer.email_mobile <> ''  "); 
     
    203212        // HTML-mail 
    204213        if ( $mode == 'magazine' ){ 
     214            if (!isset($this->arrSql['htmlmail'])) $this->arrSql['htmlmail'] = ""; 
    205215            if ( strlen($this->arrSql['htmlmail']) > 0 ) { 
    206216                $this->setWhere( " mailmaga_flg = ? "); 
     
    212222 
    213223        // 購入金額指定 
     224        if (!isset($this->arrSql['buy_total_from'])) $this->arrSql['buy_total_from'] = ""; 
     225        if (!isset($this->arrSql['buy_total_to'])) $this->arrSql['buy_total_to'] = ""; 
    214226        if( is_numeric( $this->arrSql["buy_total_from"] ) || is_numeric( $this->arrSql["buy_total_to"] ) ) { 
    215227            $arrBuyTotal = $this->selectRange($this->arrSql["buy_total_from"], $this->arrSql["buy_total_to"], "buy_total"); 
     
    220232 
    221233        // 購入回数指定 
     234        if (!isset($this->arrSql['buy_times_from'])) $this->arrSql['buy_times_from'] = ""; 
     235        if (!isset($this->arrSql['buy_times_to'])) $this->arrSql['buy_times_to'] = ""; 
    222236        if( is_numeric( $this->arrSql["buy_times_from"] ) || is_numeric( $this->arrSql["buy_times_to"] ) ) { 
    223237            $arrBuyTimes = $this->selectRange($this->arrSql["buy_times_from"], $this->arrSql["buy_times_to"], "buy_times"); 
     
    228242 
    229243        // 誕生日期間指定 
     244        if (!isset($this->arrSql['b_start_year'])) $this->arrSql['b_start_year'] = ""; 
     245        if (!isset($this->arrSql['b_start_month'])) $this->arrSql['b_start_month'] = ""; 
     246        if (!isset($this->arrSql['b_start_day'])) $this->arrSql['b_start_day'] = ""; 
     247        if (!isset($this->arrSql['b_end_year'])) $this->arrSql['b_end_year'] = ""; 
     248        if (!isset($this->arrSql['b_end_month'])) $this->arrSql['b_end_month'] = ""; 
     249        if (!isset($this->arrSql['b_end_day'])) $this->arrSql['b_end_day'] = ""; 
    230250        if ( (strlen($this->arrSql['b_start_year']) > 0 && strlen($this->arrSql['b_start_month']) > 0 && strlen($this->arrSql['b_start_day']) > 0) || 
    231251              strlen($this->arrSql['b_end_year']) > 0 && strlen($this->arrSql['b_end_month']) > 0 && strlen($this->arrSql['b_end_day']) > 0) { 
     
    241261 
    242262        // 誕生月の検索 
     263        if (!isset($this->arrSql['birth_month'])) $this->arrSql['birth_month'] = ""; 
    243264        if (is_numeric($this->arrSql["birth_month"])) { 
    244265            $this->setWhere(" EXTRACT(month from birth) = ?"); 
     
    247268 
    248269        // 登録期間指定 
     270        if (!isset($this->arrSql['start_year'])) $this->arrSql['start_year'] = ""; 
     271        if (!isset($this->arrSql['start_month'])) $this->arrSql['start_month'] = ""; 
     272        if (!isset($this->arrSql['start_day'])) $this->arrSql['start_day'] = ""; 
     273        if (!isset($this->arrSql['end_year'])) $this->arrSql['end_year'] = ""; 
     274        if (!isset($this->arrSql['end_month'])) $this->arrSql['end_month'] = ""; 
     275        if (!isset($this->arrSql['end_day'])) $this->arrSql['end_day'] = ""; 
    249276        if ( (strlen($this->arrSql['start_year']) > 0 && strlen($this->arrSql['start_month']) > 0 && strlen($this->arrSql['start_day']) > 0 ) || 
    250277                (strlen($this->arrSql['end_year']) > 0 && strlen($this->arrSql['end_month']) >0 && strlen($this->arrSql['end_day']) > 0) ) { 
     
    260287 
    261288        // 最終購入日指定 
     289        if (!isset($this->arrSql['buy_start_year'])) $this->arrSql['buy_start_year'] = ""; 
     290        if (!isset($this->arrSql['buy_start_month'])) $this->arrSql['buy_start_month'] = ""; 
     291        if (!isset($this->arrSql['buy_start_day'])) $this->arrSql['buy_start_day'] = ""; 
     292        if (!isset($this->arrSql['buy_end_year'])) $this->arrSql['buy_end_year'] = ""; 
     293        if (!isset($this->arrSql['buy_end_month'])) $this->arrSql['buy_end_month'] = ""; 
     294        if (!isset($this->arrSql['buy_end_day'])) $this->arrSql['buy_end_day'] = ""; 
     295 
    262296        if ( (strlen($this->arrSql['buy_start_year']) > 0 && strlen($this->arrSql['buy_start_month']) > 0 && strlen($this->arrSql['buy_start_day']) > 0 ) || 
    263297                (strlen($this->arrSql['buy_end_year']) > 0 && strlen($this->arrSql['buy_end_month']) >0 && strlen($this->arrSql['buy_end_day']) > 0) ) { 
     
    272306 
    273307        //購入商品コード 
     308        if (!isset($this->arrSql['buy_product_code'])) $this->arrSql['buy_product_code'] = ""; 
    274309        if ( strlen($this->arrSql['buy_product_code']) > 0 ) { 
    275310            $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 ? ))"); 
     
    279314 
    280315        //購入商品名称 
     316        if (!isset($this->arrSql['buy_product_name'])) $this->arrSql['buy_product_name'] = ""; 
    281317        if ( strlen($this->arrSql['buy_product_name']) > 0 ) { 
    282318            $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 ? ))"); 
     
    286322 
    287323        //カテゴリーを選択している場合のみ絞込検索を行う 
     324        if (!isset($this->arrSql['category_id'])) $this->arrSql['category_id'] = ""; 
    288325        if ( strlen($this->arrSql['category_id']) != ""){ 
    289326            //カテゴリーで絞込検索を行うSQL文生成 
    290             list($tmp_where, $tmp_arrval) = sfGetCatWhere(sfManualEscape($this->arrSql['category_id'])); 
     327            list($tmp_where, $tmp_arrval) = $objDb->sfGetCatWhere(SC_Utils_Ex::sfManualEscape($this->arrSql['category_id'])); 
    291328 
    292329            //カテゴリーで絞込みが可能の場合 
Note: See TracChangeset for help on using the changeset viewer.