Commit 835947a5 authored by Thomas Bella's avatar Thomas Bella

Add export of SQLite table

parent 1597b086
Pipeline #309 passed with stage
in 17 seconds
......@@ -111,6 +111,13 @@ if (isset($_SESSION["active"]) && isset($_GET["ajax"])) {
}
echo "\n";
}
} else if ($_GET['export'] == 'sqlite') {
// Output monitor.sqlite file
header('Content-Type: application/octet-stream');
header('Content-Transfer-Encoding: Binary');
header('Content-Disposition: attachment; filename="monitor.sqlite"');
header('Pragma: no-cache');
readfile('monitor.sqlite');
}
exit;
}
......
......@@ -270,7 +270,10 @@ if ($filesize < 1000) {
} else {
echo round($filesize/(1000*1000),2) . " MB";
}
?> (<a href="index.php?export=csv">Export</a>)</div>
if (EXPORT) {
?> (Export: <a href="index.php?export=csv">CSV <small>[Domains]</small></a> | <a href="index.php?export=sqlite">SQLite</a>)<?php
}
?></div>
<div class="col-xs-5 col-sm-3">Software update</div>
<div class="col-xs-7 col-sm-9" id="versionstatus">Checking ...</div>
<div class="col-xs-5 col-sm-3">Latest version</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment