1
0

Start work on db query and output.

This commit is contained in:
2017-12-16 18:17:57 +01:00
parent ad530c6967
commit 1ea640b5f1
3 changed files with 139 additions and 4 deletions

36
index_main.php Executable file
View File

@ -0,0 +1,36 @@
<!DOCTYPE html>
<html>
<head>
<title>BlackBerry/TCL Firmware List</title>
</head>
<body>
<?php
require_once __DIR__ . '/lib/autoloader.php';
use \TclUpdates\SQLiteReader;
$db = new SQLiteReader();
$allVars = $db->getAllVariants();
foreach ($allVars as $family => $models) {
foreach ($models as $model => $variants) {
echo '<h2>' . $family . ' ' . $model . '</h2>' . PHP_EOL;
echo '<table>';
foreach ($variants as $ref => $name) {
echo '<tr><td>' . $ref . '</td>' . '</tr>' . PHP_EOL;
}
echo '</table>';
}
}
print_r($db->getAllUpdates('PRD-63117-011', $db::BOTH));
print_r($db->getLatestUpdate('PRD-63117-011', $db::BOTH));
print_r($db->getUnknownPrds());
?>
</body>
</html>