Пример #1
0
 /**
  * ファイル出力
  */
 protected function output(&$data, $key)
 {
     if ($this->_isDownload == false) {
         // ページ表示
         parent::output($data, $key);
     } else {
         // ファイルダウンロード
         $smarty =& $this->_core->getSmarty();
         $smarty->assign($data);
         $ankenId = $this->_extendAnkenId;
         $path = $this->_core->getTmplName("alladinExtend/{$ankenId}/result/download/csv_media_report_all_{$ankenId}");
         $output = $smarty->fetch($path);
         $output = mb_convert_encoding($output, 'shift-jis', 'utf-8');
         $filename = "report_all.csv";
         header("Content-disposition: attachment; filename={$filename}\n");
         header('Content-type: application/octet-stream\\n\\n');
         echo $output;
         exit;
     }
 }
Пример #2
0
 /**
  * ファイル出力
  */
 protected function output(&$data, $key)
 {
     if ($this->_isDownLoad == false && $this->_isOldDownLoad == false) {
         // ページ表示
         parent::output($data, $key);
     }
 }