From 9501370fae70c6b8e98ae237f3503a8cf1506b2d Mon Sep 17 00:00:00 2001 From: schrom01 Date: Wed, 15 Feb 2023 17:12:23 +0100 Subject: [PATCH] DataDownload --- SQL/Queries.sql | 3 +++ data/data.xlsx | Bin 9861 -> 9874 bytes dataCollector/download.php | 4 ++++ index.html | 2 +- spreadSheetReader/read_write_xlsx.php | 22 +++++++++++++++++++++- 5 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 SQL/Queries.sql create mode 100644 dataCollector/download.php diff --git a/SQL/Queries.sql b/SQL/Queries.sql new file mode 100644 index 0000000..92ae98e --- /dev/null +++ b/SQL/Queries.sql @@ -0,0 +1,3 @@ +CREATE TABLE `u517357132_genderwatchpro`.`topics` ( `id` VARCHAR(8) CHARACTER SET ascii COLLATE ascii_bin NOT NULL , `lastSave` INT NULL DEFAULT CURRENT_TIMESTAMP , `fullJSON` JSON NOT NULL , `timeWatchM` INT NOT NULL , `timeWatchW` INT NOT NULL , `timeWatchD` INT NOT NULL , `countWatchM` INT NOT NULL , `countWatchW` INT NOT NULL , `countWatchD` INT NOT NULL , PRIMARY KEY (`id`)) ENGINE = InnoDB; + +INSERT INTO `topics` (`id`, `lastSave`, `fullJSON`, `timeWatchM`,`timeWatchW`, `timeWatchD`, `countWatchM`, `countWatchW`, `countWatchD`) values ('test', 2014, '{}', 10, 10, 10, 10, 40, 10) ON DUPLICATE KEY UPDATE `id` = 'test' \ No newline at end of file diff --git a/data/data.xlsx b/data/data.xlsx index 206509a66e754125ac55a1d911114f5e3577b2e9..eef92faae8755a3d2c1f275916bd1f43490228c3 100644 GIT binary patch delta 2227 zcmV;k2u$~dO_EKp+6DwL!mNsu-Ucau1=BziR5B$bXqB3(O0#y8B2^AJ!K%T`m?l-# z|GqPXv}vX(Yf)lj`*?nL_s%~5w#m5hNM*@H9w2;TBZKC#NLaoK(2rSUc9Bskk|%_V zoCfHLmgrmm>zDJjkPizX9t;4;%K)WH6~1MaaY{2%o`{0xu(A{~BMOFcWtD}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}36r4%6q9Ks z5VK<&x&j62eLU1fvmzcQ0e{U-!!Qtp??}8uiz^6U;N*0%J1}(Ge;5fHWVr=>URbXh4GU4rfV*zr7x;bbk(X%E&2ee=wobG47Zx zcrOm_y{iY~ZnsNzc^4z(&+yyg;km0C*Q(tW2UHb;Q*MEIZL23OnTlGA+7@^uv`cK5 z^NX

Genderwatch-protocol

- Anonyme Daten herunterladen (aktuell in Entwicklung) + Anonyme Daten herunterladen (aktuell in Entwicklung)

Aktuelles Thema

diff --git a/spreadSheetReader/read_write_xlsx.php b/spreadSheetReader/read_write_xlsx.php index 577dfd7..a8625ed 100644 --- a/spreadSheetReader/read_write_xlsx.php +++ b/spreadSheetReader/read_write_xlsx.php @@ -2,8 +2,28 @@ require $_SERVER['DOCUMENT_ROOT'] . '/spreadSheetReader/SimpleXLSX.php'; require $_SERVER['DOCUMENT_ROOT'] . '/spreadSheetReader/SimpleXLSXGen.php'; +function read_xls_file($filename){ + $fileContent = []; + if ($xlsx = SimpleXLSX::parse($filename)) { + $fileContent = ($xlsx->rows()); + } else { + echo SimpleXLSX::parseError(); + } + return $fileContent; +} + + + +function write_xlsxFile($filename, $data) { + $xlsx = SimpleXLSXGen::fromArray($data); + $xlsx->saveAs($filename); +} function download_xlsxFile($data) { - $xlsx = SimpleXLSXGen::fromArray($data); + $xlsxArray = read_xls_file($_SERVER['DOCUMENT_ROOT'] ."/data/data.xlsx"); + foreach ($data as $row) { + array_push($xlsxArray, $row); + } + $xlsx = SimpleXLSXGen::fromArray($xlsxArray); $xlsx->downloadAs("data.xlsx"); } \ No newline at end of file