/** * データをExcelシートに書き込む */ public function writeCell(ExcelSheet $objSht, $row, $col, $data) { switch ($data["t"]) { case "n": //数値 $val = floatVal($data["v"]); $fmt = $this->_format["val"]; $type = ExcelFormat::AS_NUMERIC_STRING; break; case "d": //日付 $val = intVal($data["v"]); $fmt = $this->_format["date"]; $type = ExcelFormat::AS_DATE; break; case "b": //真偽値 $val = boolVal($data["v"]); $fmt = $this->_format["val"]; $type = ExcelFormat::AS_NUMERIC_STRING; break; case "t": //文字列 $val = strVal($data["v"]); $fmt = $this->_format["val"]; $type = ExcelFormat::AS_NUMERIC_STRING; break; default: } //書き込む $objSht->write($row, $col, $val, $fmt, $type); return; }
// header('Vary: Accept-Encoding'); // } // else { $content = $data; // } header('Content-Length: ' . strlen($content)); echo $content; die; } // Sending the header header('Content-type: text/plain'); $dusheader = "[ID]\n"; $dusheader .= "DUS=3\n"; $dusheader .= "Description=Dragon UnPACKer 5 Update Server v" . DUS_VERSION . " (" . DUS_DATE . ")"; // Test information define('DUS_TEST', isset($_GET['test']) && strlen($_GET['test']) > 0 && boolVal($_GET['test'])); if (DUS_TEST) { $testinfo = ' [TEST]'; } else { $testinfo = ''; } $dusheader .= "{$testinfo}\n"; // Getting user build from HTTP GET parameter $userBuild = $_GET['installedbuild']; if (!isset($userBuild) | strlen($userBuild) == 0 | !is_numeric($userBuild)) { $dusheader .= "Result=P01\n"; $dusheader .= "ResultDescription=Parameter \"installedbuild\" is missing!\n"; sendData($dusheader); } // Connect to MYSQL Database if (DUS_TEST) {