Changeset 19491
- Timestamp:
- 2010/11/07 03:33:36 (13 years ago)
- Location:
- branches/camp/camp-2_5-E
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/camp/camp-2_5-E/data/class/SC_Display.php
r19400 r19491 46 46 */ 47 47 function hoge(LC_Page $page, $is_admin = false){ 48 49 48 if(!$this->deviceSeted || !is_null($this->view)){ 50 49 $device = ($is_admin) ? 8 : $this->detectDevice(); 51 if (!$this->deviceSeted) { 52 $this->setDevice($device); 53 } 50 $this->setDevice($device); 54 51 } 55 52 $this->assignobj($page); 56 57 53 $this->response->setResposeBody($this->view->fetch($page->getTemplate())); 58 54 } … … 90 86 $this->setView(new SC_AdminView()); 91 87 } 92 93 88 $this->deviceSeted = true; 94 89 } -
branches/camp/camp-2_5-E/data/class/pages/LC_Page.php
r19371 r19491 122 122 $this->objDisplay->hoge($this); 123 123 $this->objDisplay->response->response(); 124 } 125 126 /** 127 * Page のレスポンス送信(ダウンロード). 128 * 129 * @return void 130 */ 131 function sendResponseCSV($file_name, $data) { 132 $this->objDisplay->hoge($this); 133 $this->objDisplay->addHeader("Content-disposition", "attachment; filename=${file_name}"); 134 $this->objDisplay->addHeader("Content-type", "application/octet-stream; name=${file_name}"); 135 $this->objDisplay->addHeader("Cache-Control", ""); 136 $this->objDisplay->addHeader("Pragma", ""); 137 138 $this->objDisplay->response->body = $data; 139 $this->objDisplay->response->response(); 140 exit; 124 141 } 125 142 -
branches/camp/camp-2_5-E/data/class/pages/admin/order/LC_Page_Admin_Order.php
r19441 r19491 278 278 279 279 // CSVを送信する。 280 SC_Utils_Ex::sfCSVDownload($head.$data); 280 list($fime_name, $data) = SC_Utils_Ex::sfGetCSVData($head.$data); 281 $this->sendResponseCSV($fime_name, $data); 281 282 exit; 282 283 break; -
branches/camp/camp-2_5-E/data/class/util/SC_Utils.php
r18871 r19491 395 395 396 396 function sfCSVDownload($data, $prefix = ""){ 397 echo "sfGetCSVData()に移行してね。"; 398 exit; 397 399 398 400 if($prefix == "") { … … 415 417 /* データを出力 */ 416 418 echo $data; 419 } 420 421 function sfGetCSVData($data, $prefix = ""){ 422 if($prefix == "") { 423 $dir_name = SC_Utils::sfUpDirName(); 424 $file_name = $dir_name . date("ymdHis") .".csv"; 425 } else { 426 $file_name = $prefix . date("ymdHis") .".csv"; 427 } 428 429 if (mb_internal_encoding() == CHAR_CODE){ 430 $data = mb_convert_encoding($data,'SJIS-Win',CHAR_CODE); 431 } 432 433 /* データを出力 */ 434 return array($file_name, $data); 417 435 } 418 436 -
branches/camp/camp-2_5-E/html/admin/index.php
r18701 r19491 23 23 // {{{ requires 24 24 require_once './require.php'; 25 require_once CLASS_EX_PATH . 'page_extends/admin/LC_Page_Admin_ Ex.php';25 require_once CLASS_EX_PATH . 'page_extends/admin/LC_Page_Admin_Index_Ex.php'; 26 26 27 27 // }}} 28 28 // {{{ generate page 29 29 30 $objPage = new LC_Page_Admin_ Ex();30 $objPage = new LC_Page_Admin_Index_Ex(); 31 31 register_shutdown_function(array($objPage, 'destroy')); 32 32 $objPage->init();
Note: See TracChangeset
for help on using the changeset viewer.