Ignore:
Timestamp:
2007/03/28 13:01:38 (17 years ago)
Author:
uehara
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/comu/html/admin/mail/index.php

    r11730 r11982  
    2727        global $arrSex;      
    2828        $this->arrSex = $arrSex; 
     29        global $arrMailType; 
     30        $this->arrMailType = $arrMailType; 
    2931        global $arrPageRows; 
    3032        $this->arrPageRows = $arrPageRows; 
     
    9395        $list_data['job_disp'] = $job_disp; 
    9496    } 
    95      
     97         
    9698    // ¥«¥Æ¥´¥êÊÑ´¹ 
    9799    $arrCatList = sfGetCategoryList(); 
     
    106108 
    107109if($_POST['mode'] == 'delete') { 
    108     $objQuery = new SC_Query(); 
    109     $objQuery->delete("dtb_customer_mail", "email = ?", array($_POST['result_email'])); 
    110110} 
    111111 
     
    120120    //-- ÆþÎÏÃÍ¥³¥ó¥Ð¡¼¥È 
    121121    $objPage->list_data = lfConvertParam($_POST, $arrSearchColumn); 
    122      
     122         
    123123    //-- ÆþÎÏ¥¨¥é¡¼¤Î¥Á¥§¥Ã¥¯ 
    124124    $objPage->arrErr = lfErrorCheck($objPage->list_data); 
     
    132132        //-- ¸¡º÷¥Ç¡¼¥¿¼èÆÀ  
    133133        $objSelect = new SC_CustomerList($objPage->list_data, "magazine"); 
    134  
    135134        // À¸À®¤µ¤ì¤¿WHEREʸ¤ò¼èÆÀ¤¹¤ë       
    136135        list($where, $arrval) = $objSelect->getWhere(); 
     136     
    137137        // ¡ÖWHERE¡×Éôʬ¤òºï½ü¤¹¤ë¡£ 
    138138        $where = ereg_replace("^WHERE", "", $where); 
     
    140140        // ¸¡º÷·ë²Ì¤Î¼èÆÀ 
    141141        $objQuery = new SC_Query(); 
    142         $from = "dtb_customer_mail LEFT OUTER JOIN dtb_customer USING(email)"; 
     142        $from = "dtb_customer"; 
    143143 
    144144        // ¹Ô¿ô¤Î¼èÆÀ 
     
    155155        // ɽ¼¨½ç½ø 
    156156        $objQuery->setorder("customer_id DESC"); 
    157         // ¸¡º÷·ë²Ì¤Î¼èÆÀ 
    158         $col = "dtb_customer.customer_id, 
    159             dtb_customer.name01, 
    160             dtb_customer.name02, 
    161             dtb_customer.kana01, 
    162             dtb_customer.kana02, 
    163             dtb_customer.sex, 
    164             dtb_customer.email, 
    165             dtb_customer.tel01, 
    166             dtb_customer.tel02, 
    167             dtb_customer.tel03, 
    168             dtb_customer.pref, 
    169             dtb_customer_mail.mail_flag"; 
     157         
     158        // ¸¡º÷·ë²Ì¤Î¼èÆÀ    
     159        $col = $objSelect->getMailMagazineColumn(lfGetIsMobile($_POST['mail_type'])); 
    170160        $objPage->arrResults = $objQuery->select($col, $from, $where, $arrval); 
    171  
    172161        //¸½ºß»þ¹ï¤Î¼èÆÀ 
    173162        $objPage->arrNowDate = lfGetNowDate(); 
     
    175164    break; 
    176165/* 
    177     input:¸¡º÷·ë²Ì²èÌÌ¡ÖÇÛ¿®ÆâÍÆÀßÄê¡×¥Ü¥¿¥ó 
     166    input:¸¡º÷·ë²Ì²èÌÌ¡ÖhtmlmailÆâÍÆÀßÄê¡×¥Ü¥¿¥ó 
    178167*/ 
    179168case 'input': 
     
    278267    break; 
    279268default: 
     269    $objPage->list_data['mail_type'] = 1; 
    280270    break; 
    281271} 
     
    386376     
    387377    $objQuery = new SC_Query(); 
    388          
    389378    $objSelect = new SC_CustomerList( lfConvertParam($arrData, $arrSearchColumn), "magazine" ); 
    390     $search_data = $conn->getAll($objSelect->getListMailMagazine(), $objSelect->arrVal); 
     379     
     380    $search_data = $conn->getAll($objSelect->getListMailMagazine(lfGetIsMobile($_POST['mail_type'])), $objSelect->arrVal); 
    391381    $dataCnt = count($search_data); 
    392382     
     
    439429    return $arrCampaign; 
    440430} 
     431 
     432function lfGetIsMobile($mail_type) { 
     433    // ¸¡º÷·ë²Ì¤Î¼èÆÀ            
     434    $is_mobile = false; 
     435    switch($mail_type) { 
     436        case 1: 
     437            $is_mobile = false; 
     438            break; 
     439        case 2: 
     440            $is_mobile = true;       
     441            break; 
     442        default: 
     443            $is_mobile = false; 
     444            break; 
     445    } 
     446     
     447    return $is_mobile; 
     448} 
    441449?> 
Note: See TracChangeset for help on using the changeset viewer.