Ignore:
Timestamp:
2010/02/03 14:15:27 (14 years ago)
Author:
nanasess
bzr:base-revision:
svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/version-2_4:18541
bzr:committer:
Kentaro Ohkouchi <ohkouchi@loop-az.jp>
bzr:file-ids:

data/class/helper/SC_Helper_CSV.php 15535@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fhelper%2FSC_Helper_CSV.php
data/class/pages/admin/products/LC_Page_Admin_Products.php 15342@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fadmin%2Fproducts%2FLC_Page_Admin_Products.php
data/class/pages/admin/products/LC_Page_Admin_Products_Category.php 15518@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fadmin%2Fproducts%2FLC_Page_Admin_Products_Category.php
bzr:mapping-version:
v4
bzr:repository-uuid:
1e3b908f-19a9-db11-a64c-001125224ba8
bzr:revision-id:
ohkouchi@loop-az.jp-20100203051523-uw0bf8tqp0fz8bro
bzr:revno:
1908
bzr:revprop:branch-nick:
branches/version-2_4
bzr:root:
branches/version-2_4
bzr:text-parents:

data/class/helper/SC_Helper_CSV.php svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/version-2_4:18174
data/class/pages/admin/products/LC_Page_Admin_Products.php svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/version-2_4:17823
data/class/pages/admin/products/LC_Page_Admin_Products_Category.php svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/version-2_4:18262
bzr:timestamp:
2010-02-03 14:15:23.996000051 +0900
bzr:user-agent:
bzr2.0.4+bzr-svn1.0.1
svn:original-date:
2010-02-03T05:15:23.996000Z
Message:

merged r18476

  • CSVアップロードで項目数不正によりエラーが発生する不具合(#577)
Location:
branches/version-2_4/data/class
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_4/data/class/helper/SC_Helper_CSV.php

    r18174 r18543  
    9999    } 
    100100 
    101  
    102     // CSV出力データを作成する。(商品) 
    103     function lfGetProductsCSV($where, $option, $arrval, $arrOutputCols) { 
    104         $objDb = new SC_Helper_DB_Ex(); 
    105  
    106         $from = "vw_product_class AS prdcls"; 
    107         $cols = SC_Utils_Ex::sfGetCommaList($arrOutputCols, true, array('category_id')); 
    108  
    109         $objQuery = new SC_Query(); 
    110         $objQuery->setoption($option); 
    111  
    112         $list_data = $objQuery->select($cols, $from, $where, $arrval); 
    113         $max = count($list_data); 
     101    // CSVを送信する。(商品) 
     102    function sfDownloadProductsCsv($where, $arrval, $order) { 
     103 
     104        // CSV出力タイトル行の作成 
     105        $arrOutput = SC_Utils_Ex::sfSwapArray($this->sfgetCsvOutput(1, " WHERE csv_id = 1 AND status = 1")); 
     106        if (count($arrOutput) <= 0) return false; // 失敗終了 
     107        $arrOutputCols = $arrOutput['col']; 
     108 
     109        $objQuery = new SC_Query(); 
     110        $objQuery->setorder($order); 
     111 
     112        $dataRows = $objQuery->select( 
     113             SC_Utils_Ex::sfGetCommaList($arrOutputCols, true, array('category_id')) 
     114            ,'vw_product_class AS prdcls' 
     115            ,$where 
     116            ,$arrval 
     117        ); 
    114118 
    115119        // 規格分類名一覧 
    116120        if (in_array('classcategory_id1', $arrOutputCols) || in_array('classcategory_id2', $arrOutputCols)) { 
     121            $objDb = new SC_Helper_DB_Ex(); 
    117122            $arrClassCatName = $objDb->sfGetIDValueList("dtb_classcategory", "classcategory_id", "name"); 
    118123        } 
    119124 
    120         if (!isset($data)) $data = ""; 
    121         for($i = 0; $i < $max; $i++) { 
    122             // 関連商品情報の付与 
     125        $outputArray = array(); 
     126 
     127        // ヘッダ行 
     128        $outputArray[] = $arrOutput['disp_name']; 
     129 
     130        // データ行 
     131        foreach ($dataRows as $row) { 
     132            // 規格名1 
    123133            if (in_array('classcategory_id1', $arrOutputCols)) { 
    124                 $list_data[$i]['classcategory_id1'] = $arrClassCatName[$list_data[$i]['classcategory_id1']]; 
    125             } 
     134                $row['classcategory_id1'] = $arrClassCatName[$row['classcategory_id1']]; 
     135            } 
     136 
     137            // 規格名2 
    126138            if (in_array('classcategory_id2', $arrOutputCols)) { 
    127                 $list_data[$i]['classcategory_id2'] = $arrClassCatName[$list_data[$i]['classcategory_id2']]; 
    128             } 
    129  
     139                $row['classcategory_id2'] = $arrClassCatName[$row['classcategory_id2']]; 
     140            } 
     141 
     142            // カテゴリID 
    130143            if (in_array('category_id', $arrOutputCols)) { 
    131                 $arrCategory_id = $objQuery->getCol("dtb_product_categories", 
     144                $row['category_id'] = $objQuery->getCol("dtb_product_categories", 
    132145                                  "category_id", 
    133146                                  "product_id = ?", 
    134                                   array($list_data[$i]['product_id'])); 
    135  
    136                 // カテゴリID 付与 
    137                 for ($j = 0; $j < count($arrCategory_id); $j++) { 
    138                     $list_data[$i]['category_id'] .= $arrCategory_id[$j]; 
    139                     if ($j < count($arrCategory_id) - 1) { 
    140                         $list_data[$i]['category_id'] .= "|"; 
    141                     } 
    142                 } 
    143             } 
    144  
    145             // 各項目をCSV出力用に変換する。 
    146             $data .= $this->lfMakeProductsCSV($list_data[$i]); 
    147         } 
    148         return $data; 
     147                                   array($row['product_id'])); 
     148         } 
     149 
     150           $outputArray[] = $row; 
     151       } 
     152 
     153       // CSVを送信する。 
     154       $this->lfDownloadCsv($outputArray); 
     155 
     156       // 成功終了 
     157       return true; 
    149158    } 
    150159 
     
    188197    } 
    189198 
    190     // CSV出力データを作成する。(カテゴリ) 
    191     function lfGetCategoryCSV($where, $option, $arrval, $arrOutputCols) { 
    192         $objDb = new SC_Helper_DB_Ex(); 
    193  
    194         $from = "dtb_category"; 
    195         $cols = SC_Utils_Ex::sfGetCommaList($arrOutputCols); 
    196  
    197         $objQuery = new SC_Query(); 
    198         $objQuery->setoption($option); 
    199  
    200         $list_data = $objQuery->select($cols, $from, $where, $arrval); 
    201         $max = count($list_data); 
    202  
    203         if (!isset($data)) $data = ""; 
    204         for($i = 0; $i < $max; $i++) { 
    205             // 各項目をCSV出力用に変換する。 
    206             $data .= $this->lfMakeCSV($list_data[$i]); 
    207         } 
    208         return $data; 
     199    // CSVを送信する。(カテゴリ) 
     200    function sfDownloadCategoryCsv() { 
     201 
     202    // CSV出力タイトル行の作成 
     203    $arrOutput = SC_Utils_Ex::sfSwapArray($this->sfgetCsvOutput(5, " WHERE csv_id = 5 AND status = 1")); 
     204    if (count($arrOutput) <= 0) return false; // 失敗終了 
     205        $arrOutputCols = $arrOutput['col']; 
     206 
     207        $objQuery = new SC_Query(); 
     208        $objQuery->setorder('rank DESC'); 
     209 
     210        $dataRows = $objQuery->select( 
     211             SC_Utils_Ex::sfGetCommaList($arrOutputCols) 
     212            ,'dtb_category' 
     213            ,'del_flg = 0' 
     214        ); 
     215 
     216        $outputArray = array(); 
     217 
     218        // ヘッダ行 
     219        $outputArray[] = $arrOutput['disp_name']; 
     220 
     221        // データ行 
     222        foreach ($dataRows as $row) { 
     223            $outputArray[] = $row; 
     224        } 
     225 
     226        // CSVを送信する。 
     227        $this->lfDownloadCsv($outputArray, 'category'); 
     228 
     229        // 成功終了 
     230        return true; 
    209231    } 
    210232 
     
    231253    function lfMakeCSV($list) { 
    232254        $line = ""; 
    233          
    234         reset($list); 
     255 
     256        reset($list); 
    235257        while(list($key, $val) = each($list)){ 
    236258            $tmp = ""; 
    237259            switch($key) { 
    238260            case 'order_pref': 
    239                 $tmp = $this->arrPref[$val]; 
    240                 break; 
    241261            case 'deliv_pref': 
    242262                $tmp = $this->arrPref[$val]; 
     
    255275    } 
    256276 
    257     // 各項目をCSV出力用に変換する。(商品) 
    258     function lfMakeProductsCSV($list) { 
    259         $line = ""; 
    260         if(is_array($list)) { 
    261             reset($list); 
    262             while(list($key, $val) = each($list)){ 
    263                 $tmp = ""; 
    264                 switch($key) { 
    265                 case 'point_rate': 
    266                     if($val == "") { 
    267                         $tmp = '0'; 
    268                     } else { 
    269                         $tmp = $val; 
    270                     } 
    271                     break; 
    272                 default: 
    273                     $tmp = $val; 
    274                     break; 
    275                 } 
    276                 $tmp = str_replace("\"", "\\\"", $tmp); 
    277                 $line .= "\"".$tmp."\","; 
    278             } 
    279             // 文末の","を変換 
    280             $line = $this->replaceLineSuffix($line); 
    281         } 
    282         return $line; 
    283     } 
    284  
    285277    // 各項目をCSV出力用に変換する。(レビュー) 
    286278    function lfMakeReviewCSV($list) { 
    287279        $line = ""; 
    288         reset($list); 
    289         while(list($key, $val) = each($list)){ 
     280        reset($list); 
     281        while(list($key, $val) = each($list)){ 
    290282            $tmp = ""; 
    291283            switch($key) { 
     
    316308    function lfMakeTrackbackCSV($list) { 
    317309        $line = ""; 
    318         reset($list); 
    319         while(list($key, $val) = each($list)){ 
     310        reset($list); 
     311        while(list($key, $val) = each($list)){ 
    320312            $tmp = ""; 
    321313            switch($key) { 
     
    411403                                           ); 
    412404    } 
     405 
     406 
     407    /** 
     408     * 1次元配列を1行のCSVとして返す 
     409     * 参考: http://jp.php.net/fputcsv 
     410     */ 
     411    function sfArrayToCsv($fields, $delimiter = ',', $enclosure = '"', $arrayDelimiter = '|') { 
     412 
     413        if( strlen($delimiter) != 1 ) { 
     414            trigger_error('delimiter must be a single character', E_USER_WARNING); 
     415            return ""; 
     416        } 
     417 
     418        if( strlen($enclosure) < 1 ) { 
     419            trigger_error('enclosure must be a single character', E_USER_WARNING); 
     420            return ""; 
     421        } 
     422 
     423        foreach (array_keys($fields) as $key) { 
     424            $field =& $fields[$key]; 
     425 
     426            // 配列を「|」区切りの文字列に変換する 
     427            if (is_array($field)) { 
     428                $field = implode($arrayDelimiter, $field); 
     429            } 
     430 
     431            /* enclose a field that contains a delimiter, an enclosure character, or a newline */ 
     432            if ( 
     433                   is_string($field) 
     434                && preg_match('/[' . preg_quote($delimiter) . preg_quote($enclosure) . '\\s]/', $field) 
     435            ) { 
     436                $field = $enclosure . preg_replace('/' . preg_quote($enclosure) . '/', $enclosure . $enclosure, $field) . $enclosure; 
     437            } 
     438        } 
     439 
     440        return implode($delimiter, $fields); 
     441    } 
     442 
     443    /** 
     444     * CSVを送信する。 
     445     */ 
     446    function lfDownloadCsv($arrayData, $prefix = ""){ 
     447 
     448        if($prefix == "") { 
     449            $dir_name = SC_Utils::sfUpDirName(); 
     450            $file_name = $dir_name . date("ymdHis") .".csv"; 
     451        } else { 
     452            $file_name = $prefix . date("ymdHis") .".csv"; 
     453        } 
     454 
     455        /* HTTPヘッダの出力 */ 
     456        Header("Content-disposition: attachment; filename=${file_name}"); 
     457        Header("Content-type: application/octet-stream; name=${file_name}"); 
     458        Header("Cache-Control: "); 
     459        Header("Pragma: "); 
     460 
     461        /* データを出力 */ 
     462        foreach ($arrayData as $lineArray) { 
     463            $lineString = $this->sfArrayToCsv($lineArray); 
     464            $lineString = mb_convert_encoding($lineString, 'SJIS-Win'); 
     465            echo $lineString . "\n"; 
     466        } 
     467    } 
    413468} 
    414469?> 
  • branches/version-2_4/data/class/pages/admin/products/LC_Page_Admin_Products.php

    r17823 r18543  
    164164 
    165165                    switch ($key) { 
    166                         case 'search_product_id':   // 商品ID 
     166                        case 'search_product_id': // 商品ID 
    167167                            $where .= " AND product_id = ?"; 
    168168                            $view_where .= " AND product_id = ?"; 
     
    179179                            $view_where = $where; 
    180180                            break; 
    181                         case 'search_name':         // 商品名 
     181                        case 'search_name': // 商品名 
    182182                            $where .= " AND name ILIKE ?"; 
    183183                            $view_where .= " AND name ILIKE ?"; 
    184184                            $arrval[] = "%$val%"; 
    185185                            break; 
    186                         case 'search_category_id':  // カテゴリー 
     186                        case 'search_category_id': // カテゴリー 
    187187                            list($tmp_where, $tmp_arrval) = $objDb->sfGetCatWhere($val); 
    188188                            if($tmp_where != "") { 
     
    192192                            } 
    193193                            break; 
    194                         case 'search_product_code': // 商品コード 
     194                        case 'search_product_code': // 商品コード 
    195195                            $where .= " AND product_id IN (SELECT product_id FROM dtb_products_class WHERE product_code ILIKE ? GROUP BY product_id)"; 
    196196                            $view_where .= " AND EXISTS (SELECT product_id FROM dtb_products_class as cls WHERE cls.product_code ILIKE ? AND dtb_products.product_id = cls.product_id GROUP BY cls.product_id )"; 
    197197                            $arrval[] = "%$val%"; 
    198198                            break; 
    199                         case 'search_startyear':    // 登録更新日(FROM) 
     199                        case 'search_startyear': // 登録更新日(FROM) 
    200200                            $date = SC_Utils_Ex::sfGetTimestamp($_POST['search_startyear'], $_POST['search_startmonth'], $_POST['search_startday']); 
    201201                            $where.= " AND update_date >= '" . $_POST['search_startyear'] . "/" . $_POST['search_startmonth']. "/" .$_POST['search_startday'] . "'"; 
    202202                            $view_where.= " AND update_date >= '" . $_POST['search_startyear'] . "/" . $_POST['search_startmonth']. "/" .$_POST['search_startday'] . "'"; 
    203203                            break; 
    204                         case 'search_endyear':      // 登録更新日(TO) 
     204                        case 'search_endyear': // 登録更新日(TO) 
    205205                            $date = SC_Utils_Ex::sfGetTimestamp($_POST['search_endyear'], $_POST['search_endmonth'], $_POST['search_endday']); 
    206206                            $date = date('Y/m/d', strtotime($date) + 86400); 
     
    208208                            $view_where.= " AND update_date < date('" . $date . "')"; 
    209209                            break; 
    210                         case 'search_product_flag': //種別 
     210                        case 'search_product_flag': //種別 
    211211                            global $arrSTATUS; 
    212212                            $search_product_flag = SC_Utils_Ex::sfSearchCheckBoxes($val); 
     
    217217                            } 
    218218                            break; 
    219                         case 'search_status':       // ステータス 
     219                        case 'search_status': // ステータス 
    220220                            $tmp_where = ""; 
    221221                            foreach ($val as $element){ 
     
    244244 
    245245                switch($_POST['mode']) { 
    246                 case 'csv': 
    247  
    248                     require_once(CLASS_EX_PATH . "helper_extends/SC_Helper_CSV_Ex.php"); 
    249  
    250                     $objCSV = new SC_Helper_CSV_Ex(); 
    251                     // オプションの指定 
    252                     $option = "ORDER BY $order"; 
    253                     // CSV出力タイトル行の作成 
    254                     $arrOutput = SC_Utils_Ex::sfSwapArray($objCSV->sfgetCsvOutput(1, " WHERE csv_id = 1 AND status = 1")); 
    255  
    256                     if (count($arrOutput) <= 0) break; 
    257  
    258                     $arrOutputCols = $arrOutput['col']; 
    259                     $arrOutputTitle = $arrOutput['disp_name']; 
    260  
    261                     $head = SC_Utils_Ex::sfGetCSVList($arrOutputTitle); 
    262  
    263                     $data = $objCSV->lfGetProductsCSV($where, $option, $arrval, $arrOutputCols); 
    264  
    265                     // CSVを送信する。 
    266                     SC_Utils_Ex::sfCSVDownload($head.$data); 
    267                     exit; 
    268                     break; 
    269                 case 'delete_all': 
    270                     // 検索結果の取得 
    271                     $col = "product_id"; 
    272                     $from = "vw_products_nonclass AS noncls "; 
    273                     $arrProducts = $objQuery->select($col, $from, $where, $arrval); 
    274                     // 検索結果をすべて削除 
    275                     $sqlval['del_flg'] = 1; 
    276                     $where = "product_id = ?"; 
    277                     if (count($arrProducts) > 0) { 
    278                         foreach ($arrProducts as $key => $val) { 
    279                             $objQuery->update("dtb_products", $sqlval, $where, array($arrProducts[$key]["product_id"])); 
     246                    case 'csv': 
     247                        require_once(CLASS_EX_PATH . "helper_extends/SC_Helper_CSV_Ex.php"); 
     248 
     249                        $objCSV = new SC_Helper_CSV_Ex(); 
     250 
     251                        // CSVを送信する。正常終了の場合、終了。 
     252                        $objCSV->sfDownloadProductsCsv($where, $arrval, $order) && exit; 
     253 
     254                        break; 
     255                    case 'delete_all': 
     256                        // 検索結果をすべて削除 
     257                        $where = "product_id IN (SELECT product_id FROM vw_products_allclass_detail AS alldtl WHERE $where)"; 
     258                        $sqlval['del_flg'] = 1; 
     259                        $objQuery->update("dtb_products", $sqlval, $where, $arrval); 
     260                        $objQuery->delete("dtb_customer_favorite_products", $where, $arrval); 
     261                        break; 
     262                    default: 
     263                        // 読み込む列とテーブルの指定 
     264                        $col = "product_id, name, main_list_image, status, product_code_min, product_code_max, price02_min, price02_max, stock_min, stock_max, stock_unlimited_min, stock_unlimited_max, update_date"; 
     265                        $from = "vw_products_allclass_detail AS alldtl "; 
     266 
     267                        // 行数の取得 
     268                        $linemax = $objQuery->count("dtb_products", $view_where, $arrval); 
     269                        $this->tpl_linemax = $linemax; // 何件が該当しました。表示用 
     270 
     271                        // ページ送りの処理 
     272                        if(is_numeric($_POST['search_page_max'])) { 
     273                            $page_max = $_POST['search_page_max']; 
     274                        } else { 
     275                            $page_max = SEARCH_PMAX; 
    280276                        } 
    281                     } 
    282                     break; 
    283                 default: 
    284                     // 読み込む列とテーブルの指定 
    285                     $col = "product_id, name, category_id, main_list_image, status, product_code, price01, price02, stock, stock_unlimited"; 
    286                     $from = "vw_products_nonclass AS noncls "; 
    287  
    288                     // 行数の取得 
    289                     $linemax = $objQuery->count("dtb_products", $view_where, $arrval); 
    290                     $this->tpl_linemax = $linemax;              // 何件が該当しました。表示用 
    291  
    292                     // ページ送りの処理 
    293                     if(is_numeric($_POST['search_page_max'])) { 
    294                         $page_max = $_POST['search_page_max']; 
    295                     } else { 
    296                         $page_max = SEARCH_PMAX; 
    297                     } 
    298  
    299                     // ページ送りの取得 
    300                     $objNavi = new SC_PageNavi($this->arrHidden['search_pageno'], $linemax, $page_max, "fnNaviSearchPage", NAVI_PMAX); 
    301                     $startno = $objNavi->start_row; 
    302                     $this->arrPagenavi = $objNavi->arrPagenavi; 
    303  
    304                     //キャンペーン商品検索時は、全結果の商品IDを変数に格納する 
    305                     if(isset($_POST['search_mode']) && $_POST['search_mode'] == 'campaign') { 
    306                         $arrRet = $objQuery->select($col, $from, $where, $arrval); 
    307                         if(count($arrRet) > 0) { 
    308                             $arrRet = sfSwapArray($arrRet); 
    309                             $pid = implode("-", $arrRet['product_id']); 
    310                             $this->arrHidden['campaign_product_id'] = $pid; 
     277 
     278                        // ページ送りの取得 
     279                        $objNavi = new SC_PageNavi($this->arrHidden['search_pageno'], $linemax, $page_max, "fnNaviSearchPage", NAVI_PMAX); 
     280                        $startno = $objNavi->start_row; 
     281                        $this->arrPagenavi = $objNavi->arrPagenavi; 
     282 
     283                        //キャンペーン商品検索時は、全結果の商品IDを変数に格納する 
     284                        if(isset($_POST['search_mode']) && $_POST['search_mode'] == 'campaign') { 
     285                            $arrRet = $objQuery->select($col, $from, $where, $arrval); 
     286                            if(count($arrRet) > 0) { 
     287                                $arrRet = sfSwapArray($arrRet); 
     288                                $pid = implode("-", $arrRet['product_id']); 
     289                                $this->arrHidden['campaign_product_id'] = $pid; 
     290                            } 
    311291                        } 
    312                     } 
    313  
    314                     // 取得範囲の指定(開始行番号、行数のセット) 
    315                     //                    if(DB_TYPE != "mysql") $objQuery->setlimitoffset($page_max, $startno); 
    316                     $objQuery->setlimitoffset($page_max, $startno); 
    317                     // 表示順序 
    318                     $objQuery->setorder($order); 
    319  
    320                     // 検索結果の取得 
    321                     $this->arrProducts = $objQuery->select($col, $from, $where, $arrval); 
    322  
    323                     // 各商品ごとのカテゴリIDを取得 
    324                     if (count($this->arrProducts) > 0) { 
    325                         foreach ($this->arrProducts as $key => $val) { 
    326                             $this->arrProducts[$key]["categories"] = $objDb->sfGetCategoryId($val["product_id"]); 
    327                             $objDb->g_category_on = false; 
     292 
     293                        // 取得範囲の指定(開始行番号、行数のセット) 
     294                        //                    if(DB_TYPE != "mysql") $objQuery->setlimitoffset($page_max, $startno); 
     295                        $objQuery->setlimitoffset($page_max, $startno); 
     296                        // 表示順序 
     297                        $objQuery->setorder($order); 
     298 
     299                        // 検索結果の取得 
     300                        $this->arrProducts = $objQuery->select($col, $from, $where, $arrval); 
     301 
     302                        // 各商品ごとのカテゴリIDを取得 
     303                        if (count($this->arrProducts) > 0) { 
     304                            foreach ($this->arrProducts as $key => $val) { 
     305                                $this->arrProducts[$key]["categories"] = $objDb->sfGetCategoryId($val["product_id"]); 
     306                                $objDb->g_category_on = false; 
     307                            } 
    328308                        } 
    329                     } 
    330309                } 
    331310            } 
     
    354333        global $objPage; 
    355334        /* 
    356          *  文字列の変換 
    357          *  K :  「半角(ハンカク)片仮名」を「全角片仮名」に変換 
    358          *  C :  「全角ひら仮名」を「全角かた仮名」に変換 
    359          *  V :  濁点付きの文字を一文字に変換。"K","H"と共に使用します 
    360          *  n :  「全角」数字を「半角(ハンカク)」に変換 
     335         * 文字列の変換 
     336         * K :  「半角(ハンカク)片仮名」を「全角片仮名」に変換 
     337         * C :  「全角ひら仮名」を「全角かた仮名」に変換 
     338         * V :  濁点付きの文字を一文字に変換。"K","H"と共に使用します 
     339         * n :  「全角」数字を「半角(ハンカク)」に変換 
    361340         */ 
    362341        $arrConvList['search_name'] = "KVa"; 
  • branches/version-2_4/data/class/pages/admin/products/LC_Page_Admin_Products_Category.php

    r18262 r18543  
    180180 
    181181            $objCSV = new SC_Helper_CSV_Ex(); 
    182             // オプションの指定 
    183             $option = "ORDER BY rank DESC"; 
    184             // CSV出力タイトル行の作成 
    185             $arrOutput = SC_Utils_Ex::sfSwapArray($objCSV->sfgetCsvOutput(5, " WHERE csv_id = 5 AND status = 1")); 
    186  
    187             if (count($arrOutput) <= 0) break; 
    188  
    189             $arrOutputCols = $arrOutput['col']; 
    190             $arrOutputTitle = $arrOutput['disp_name']; 
    191  
    192             $head = SC_Utils_Ex::sfGetCSVList($arrOutputTitle); 
    193  
    194             $where = "del_flg = 0"; 
    195             $arrval = array(); 
    196             $data = $objCSV->lfGetCategoryCSV($where, $option, $arrval, $arrOutputCols); 
    197  
    198             // CSVを送信する。 
    199             SC_Utils_Ex::sfCSVDownload($head.$data, 'category'); 
    200             exit; 
     182 
     183            // CSVを送信する。正常終了の場合、終了。 
     184            $objCSV->sfDownloadCategoryCsv() && exit; 
     185 
    201186            break; 
    202187        default: 
Note: See TracChangeset for help on using the changeset viewer.