$tmp = sys_get_temp_dir() . '/ysl_survey_' . time() . '.xlsx';
$writer->save($tmp);
+ $dao = new wsDAOBook($core->con);
+ $book = $dao->selectById($bid);
+
$head = ['Date', 'Page', 'Rating', 'Country', 'Function', 'Suggestions'];
$sql = "SELECT * FROM ysl_survey WHERE fluidbook_id='" . $core->con->escape($bid) . "' ORDER BY date ASC";
CubeIT_Excel::simple('Survey data #' . $bid, $data, $head, $tmp, 100);
files::$mimeType['xlsx'] = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
- cubeHTTP::downloadFile($tmp, 'ysl_survey_' . $bid . '.xlsx');
+ cubeHTTP::downloadFile($tmp, 'report-' . $bid . '-' . cubeText::str2URL($book->parametres->title) . '.xlsx');
}
public static function chooseExistingBook()