- Timestamp:
- 2011/03/20 07:57:42 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/data/class/pages/admin/order/LC_Page_Admin_Order.php
r20538 r20736 133 133 // CSVを送信する。 134 134 case 'csv': 135 list($file_name, $data) = $this->getCSV($where, $arrval, 136 $order); 137 $this->sendResponseCSV($file_name, $data); 135 $this->doOutputCSV($where, $arrval,$order); 138 136 exit; 139 137 break; … … 412 410 * 413 411 * @param string $where 検索条件の WHERE 句 414 * @param array $arrVal ues検索条件のパラメータ412 * @param array $arrVal 検索条件のパラメータ 415 413 * @param string $order 検索結果の並び順 416 * @return array|boolean 構築に成功した場合, ファイルと出力内容の配列; 417 * 失敗した場合 false 418 */ 419 function getCSV($where, $arrValues, $order) { 414 * @return void 415 */ 416 function doOutputCSV($where, $arrVal, $order) { 420 417 require_once CLASS_EX_REALDIR . 'helper_extends/SC_Helper_CSV_Ex.php'; 418 if($where != "") { 419 $where = " WHERE $where "; 420 } 421 421 422 $objCSV = new SC_Helper_CSV_Ex(); 422 423 $option = "ORDER BY $order"; 424 425 // CSV出力タイトル行の作成 426 $arrCsvOutput = SC_Utils_Ex::sfSwapArray($objCSV->sfGetCsvOutput(3, 'status = 1')); 427 428 if (count($arrCsvOutput) <= 0) { 429 return false; 430 } 431 432 $arrCsvOutputCols = $arrCsvOutput['col']; 433 $arrCsvOutputConvs = $arrCsvOutput['conv']; 434 $arrCsvOutputTitle = $arrCsvOutput['disp_name']; 435 $head = SC_Utils_Ex::sfGetCSVList($arrCsvOutputTitle); 436 $data = $objCSV->lfGetCSV("dtb_order", $where, $option, $arrValues, 437 $arrCsvOutputCols, $arrCsvOutputConvs); 438 return SC_Utils_Ex::sfGetCSVData($head . $data); 423 $objCSV->sfDownloadCsv("3", $where, $arrVal, $order, true); 439 424 } 440 425
Note: See TracChangeset
for help on using the changeset viewer.