Ignore:
Timestamp:
2007/08/27 11:36:40 (17 years ago)
Author:
adachi
Message:

conf.phpが2重にrequireしていたのを修正

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/beta/data/class/SC_CustomerList.php

    r14676 r15362  
    55 * http://www.lockon.co.jp/ 
    66 */ 
    7 $INC_PATH = realpath( dirname( __FILE__) ); 
    8 require( $INC_PATH ."/../conf/conf.php" ); 
     7 
    98/*  [̾¾Î] SC_CustomerList 
    109 *  [³µÍ×] ²ñ°÷¸¡º÷ÍÑ¥¯¥é¥¹ 
     
    1312 
    1413    var $arrColumnCSV; 
    15      
     14 
    1615    function SC_CustomerList($array, $mode = '') { 
    1716        parent::SC_SelectSql($array); 
    18          
     17 
    1918        if($mode == "") { 
    2019            // ²ñ°÷ËÜÅÐÏ¿²ñ°÷¤Çºï½ü¤·¤Æ¤¤¤Ê¤¤²ñ°÷ 
    21             $this->setWhere("status = 2 AND del_flg = 0 ");      
     20            $this->setWhere("status = 2 AND del_flg = 0 "); 
    2221            // ÅÐÏ¿Æü¤ò¼¨¤¹¥«¥é¥à 
    2322            $regdate_col = 'dtb_customer.update_date'; 
    2423        } 
    25          
     24 
    2625        if($mode == "customer") { 
    2726            // ´ÉÍý¼Ô¥Ú¡¼¥¸¸ÜµÒ¸¡º÷¤Î¾ì¹ç²¾ÅÐÏ¿²ñ°÷¤â¸¡º÷ 
    28             $this->setWhere( "(status = 1 OR status = 2) AND del_flg = 0 ");         
     27            $this->setWhere( "(status = 1 OR status = 2) AND del_flg = 0 "); 
    2928            // ÅÐÏ¿Æü¤ò¼¨¤¹¥«¥é¥à 
    3029            $regdate_col = 'dtb_customer.update_date'; 
    3130        } 
    32                  
    33         // ¥á¡¼¥ë¥Þ¥¬¥¸¥ó¤Î¾ì¹ç      
     31 
     32        // ¥á¡¼¥ë¥Þ¥¬¥¸¥ó¤Î¾ì¹ç 
    3433        if($mode == "magazine") { 
    3534            $this->setWhere("(del_flg = 0 OR del_flg IS NULL)"); 
    3635            $this->setWhere("status = 2"); 
    37              
     36 
    3837            /*¡¡²ñ°÷¤Î¤ßÂоݤȤ¹¤ë¤¿¤áºï½ü 
    3938            if(is_array($this->arrSql['customer'])) { 
     
    4241                    if($tmp_where != "") { 
    4342                        $tmp_where.= " OR "; 
    44                     }                    
     43                    } 
    4544                    switch($val) { 
    4645                    // ²ñ°÷ 
     
    7069            $regdate_col = 'dtb_customer.create_date'; 
    7170        } 
    72                  
     71 
    7372        // ¸ÜµÒID 
    7473        if ( strlen($this->arrSql['customer_id']) > 0 ) { 
     
    7675            $this->arrVal[] = $this->arrSql['customer_id']; 
    7776        } 
    78          
     77 
    7978        // ̾Á° 
    8079        if ( strlen($this->arrSql['name']) > 0 ) { 
     
    9998            $this->arrVal[] = mb_ereg_replace("[ ¡¡]+","",$searchKana); 
    10099        } 
    101          
     100 
    102101        //¡¡ÅÔÆ»Éܸ© 
    103102        if ( strlen($this->arrSql['pref']) > 0 ) { 
     
    116115            $this->arrVal[] = ereg_replace("-", "", $searchTel); 
    117116        } 
    118          
     117 
    119118        //¡¡À­ÊÌ 
    120119        if ( is_array( $this->arrSql['sex'] ) ){ 
     
    153152                        $sql_where .= "AND dtb_customer.email NOT ILIKE ? "; 
    154153                    } 
    155                 } else {                 
     154                } else { 
    156155                    if($sql_where == "") { 
    157156                        $sql_where .= "dtb_customer.email ILIKE ? "; 
     
    180179                        $sql_where .= "AND dtb_customer.email_mobile NOT ILIKE ? "; 
    181180                    } 
    182                 } else {                 
     181                } else { 
    183182                    if($sql_where == "") { 
    184183                        $sql_where .= "dtb_customer.email_mobile ILIKE ? "; 
     
    193192        } 
    194193 
    195 /*      2007/05/28  °ìö¡¢Ää»ß¤·¤Þ¤¹¡£               
     194/*      2007/05/28  °ìö¡¢Ää»ß¤·¤Þ¤¹¡£ 
    196195 *      //¡¡ÇÛ¿®¥á¡¼¥ë¥¢¥É¥ì¥¹¼ïÊÌ 
    197196 *      if ( $mode == 'magazine' ){ 
     
    238237            } 
    239238        } 
    240          
     239 
    241240        // ¹ØÆþ¶â³Û»ØÄê 
    242241        if( is_numeric( $this->arrSql["buy_total_from"] ) || is_numeric( $this->arrSql["buy_total_to"] ) ) { 
     
    254253            } 
    255254        } 
    256          
     255 
    257256        // ÃÂÀ¸Æü´ü´Ö»ØÄê 
    258257        if ( (strlen($this->arrSql['b_start_year']) > 0 && strlen($this->arrSql['b_start_month']) > 0 && strlen($this->arrSql['b_start_day']) > 0) || 
     
    267266            } 
    268267        } 
    269                  
     268 
    270269        // ÃÂÀ¸·î¤Î¸¡º÷ 
    271270        if (is_numeric($this->arrSql["birth_month"])) { 
    272             $this->setWhere(" EXTRACT(month from birth) = ?");   
     271            $this->setWhere(" EXTRACT(month from birth) = ?"); 
    273272            $this->arrVal[] = $this->arrSql["birth_month"]; 
    274273        } 
    275              
     274 
    276275        // ÅÐÏ¿´ü´Ö»ØÄê 
    277         if ( (strlen($this->arrSql['start_year']) > 0 && strlen($this->arrSql['start_month']) > 0 && strlen($this->arrSql['start_day']) > 0 ) ||  
     276        if ( (strlen($this->arrSql['start_year']) > 0 && strlen($this->arrSql['start_month']) > 0 && strlen($this->arrSql['start_day']) > 0 ) || 
    278277                (strlen($this->arrSql['end_year']) > 0 && strlen($this->arrSql['end_month']) >0 && strlen($this->arrSql['end_day']) > 0) ) { 
    279278 
     
    286285            } 
    287286        } 
    288              
     287 
    289288        // ºÇ½ª¹ØÆþÆü»ØÄê 
    290         if ( (strlen($this->arrSql['buy_start_year']) > 0 && strlen($this->arrSql['buy_start_month']) > 0 && strlen($this->arrSql['buy_start_day']) > 0 ) ||  
     289        if ( (strlen($this->arrSql['buy_start_year']) > 0 && strlen($this->arrSql['buy_start_month']) > 0 && strlen($this->arrSql['buy_start_day']) > 0 ) || 
    291290                (strlen($this->arrSql['buy_end_year']) > 0 && strlen($this->arrSql['buy_end_month']) >0 && strlen($this->arrSql['buy_end_day']) > 0) ) { 
    292291            $arrRegistTime = $this->selectTermRange($this->arrSql['buy_start_year'], $this->arrSql['buy_start_month'], $this->arrSql['buy_start_day'] 
     
    298297            } 
    299298        } 
    300          
     299 
    301300        //¹ØÆþ¾¦ÉÊ¥³¡¼¥É 
    302301        if ( strlen($this->arrSql['buy_product_code']) > 0 ) { 
     
    312311            $this->arrVal[] = $search_buyproduct_name; 
    313312        } 
    314          
     313 
    315314        //¥«¥Æ¥´¥ê¡¼¤òÁªÂò¤·¤Æ¤¤¤ë¾ì¹ç¤Î¤ß¹Ê¹þ¸¡º÷¤ò¹Ô¤¦ 
    316315        if ( strlen($this->arrSql['category_id']) != ""){ 
     
    336335            $this->arrVal[] = $this->arrSql['campaign_id']; 
    337336        } 
    338                  
     337 
    339338        $this->setOrder( "customer_id DESC" ); 
    340339    } 
     
    343342    function getList() { 
    344343        $this->select = "SELECT customer_id,name01,name02,kana01,kana02,sex,email,tel01,tel02,tel03,pref,status FROM dtb_customer "; 
    345         return $this->getSql(0);     
     344        return $this->getSql(0); 
    346345    } 
    347346 
    348347    function getListMailMagazine($is_mobile = false) { 
    349              
     348 
    350349        $colomn = $this->getMailMagazineColumn($is_mobile); 
    351350        $this->select = " 
    352             SELECT  
     351            SELECT 
    353352                $colomn 
    354             FROM  
     353            FROM 
    355354                dtb_customer"; 
    356         return $this->getSql(0);     
    357     } 
    358      
     355        return $this->getSql(0); 
     356    } 
     357 
    359358    function getMailMagazineColumn($is_mobile= false) { 
    360359        if($is_mobile == true) { 
    361360            $email_column = "dtb_customer.email_mobile as email"; 
    362361        } else { 
    363             $email_column = "dtb_customer.email";            
    364         } 
    365          
     362            $email_column = "dtb_customer.email"; 
     363        } 
     364 
    366365        $column ="dtb_customer.customer_id, 
    367366                dtb_customer.name01, 
     
    370369                dtb_customer.kana02, 
    371370                dtb_customer.sex, 
    372                 $email_column,       
     371                $email_column, 
    373372                dtb_customer.tel01, 
    374373                dtb_customer.tel02, 
    375374                dtb_customer.tel03, 
    376                 dtb_customer.pref,  
     375                dtb_customer.pref, 
    377376                dtb_customer.mailmaga_flg"; 
    378                  
     377 
    379378        return $column; 
    380379    } 
    381      
     380 
    382381    //¡¡¸¡º÷Áí¿ô¥«¥¦¥ó¥ÈÍÑSQL 
    383382    function getListCount() { 
    384         $this->select = "SELECT COUNT(customer_id) FROM dtb_customer ";  
     383        $this->select = "SELECT COUNT(customer_id) FROM dtb_customer "; 
    385384        return $this->getSql(1); 
    386385    } 
     
    397396 
    398397        $this->select = "SELECT " .$state. " FROM dtb_customer "; 
    399         return $this->getSql(2);     
    400     } 
    401      
     398        return $this->getSql(2); 
     399    } 
     400 
    402401    function getWhere() { 
    403402        return array($this->where, $this->arrVal); 
Note: See TracChangeset for help on using the changeset viewer.