Changeset 17343 for branches/version-2/data/class/pages/admin
- Timestamp:
- 2008/06/03 20:26:52 (18 years ago)
- Location:
- branches/version-2/data/class/pages/admin
- Files:
-
- 3 edited
-
contents/LC_Page_Admin_Contents_CsvSql.php (modified) (2 diffs)
-
customer/LC_Page_Admin_Customer.php (modified) (2 diffs)
-
mail/LC_Page_Admin_Mail.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2/data/class/pages/admin/contents/LC_Page_Admin_Contents_CsvSql.php
r16582 r17343 148 148 $header .= "\n"; 149 149 150 $data = $this->lfGetCSVData($arrCsvOutputData, $arrKey);150 $data = SC_Utils_Ex::getCSVData($arrCsvOutputData, $arrKey); 151 151 // CSV出力 152 152 SC_Utils_Ex::sfCSVDownload($header.$data); … … 411 411 return $ret; 412 412 } 413 414 415 //---- CSV出力用データ取得416 function lfGetCSVData( $array, $arrayIndex){417 $return = "";418 for ($i=0; $i<count($array); $i++){419 for ($j=0; $j<count($array[$i]); $j++ ){420 if ( $j > 0 ) $return .= ",";421 $return .= "\"";422 if ( $arrayIndex ){423 $return .= mb_ereg_replace("<","<",mb_ereg_replace( "\"","\"\"",$array[$i][$arrayIndex[$j]] )) ."\"";424 } else {425 $return .= mb_ereg_replace("<","<",mb_ereg_replace( "\"","\"\"",$array[$i][$j] )) ."\"";426 }427 }428 $return .= "\n";429 }430 431 return $return;432 }433 413 } 434 414 ?> -
branches/version-2/data/class/pages/admin/customer/LC_Page_Admin_Customer.php
r17214 r17343 275 275 276 276 //- CSV出力 277 $data = $this->lfGetCSVData($this->search_data, $arrColumn);277 $data = SC_Utils_Ex::getCSVData($this->search_data, $arrColumn); 278 278 279 279 SC_Utils_Ex::sfCSVDownload($header.$data); … … 491 491 } 492 492 } 493 494 //---- CSV出力用データ取得495 function lfGetCSVData( $array, $arrayIndex){496 497 for ($i=0; $i<count($array); $i++){498 499 for ($j=0; $j<count($array[$i]); $j++ ){500 if ( $j > 0 ) $return .= ",";501 $return .= "\"";502 if ( $arrayIndex ){503 $return .= mb_ereg_replace("<","<",mb_ereg_replace( "\"","\"\"",$array[$i][$arrayIndex[$j]] )) ."\"";504 } else {505 $return .= mb_ereg_replace("<","<",mb_ereg_replace( "\"","\"\"",$array[$i][$j] )) ."\"";506 }507 }508 $return .= "\n";509 }510 511 return $return;512 }513 493 } 514 494 ?> -
branches/version-2/data/class/pages/admin/mail/LC_Page_Admin_Mail.php
r16741 r17343 425 425 426 426 if ( $result ){ 427 $return = $this->lfGetCSVData( $result, $arrTitle); 428 } 429 return $return; 430 } 431 432 //---- CSV出力用データ取得 433 function lfGetCSVData( $array, $arrayIndex){ 434 435 for ($i=0; $i<count($array); $i++){ 436 437 for ($j=0; $j<count($array[$i]); $j++ ){ 438 if ( $j > 0 ) $return .= ","; 439 $return .= "\""; 440 if ( $arrayIndex ){ 441 $return .= mb_ereg_replace("<","<",mb_ereg_replace( "\"","\"\"",$array[$i][$arrayIndex[$j]] )) ."\""; 442 } else { 443 $return .= mb_ereg_replace("<","<",mb_ereg_replace( "\"","\"\"",$array[$i][$j] )) ."\""; 444 } 445 } 446 $return .= "\n"; 427 $return = SC_Utils_Ex::getCSVData( $result, $arrTitle); 447 428 } 448 429 return $return;
Note: See TracChangeset
for help on using the changeset viewer.
