2017-12-16 17:17:57 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>BlackBerry/TCL Firmware List</title>
|
2017-12-16 18:42:24 +00:00
|
|
|
<link rel="stylesheet" href="assets/style.css"/>
|
2017-12-16 17:17:57 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<?php
|
|
|
|
|
|
|
|
require_once __DIR__ . '/lib/autoloader.php';
|
|
|
|
|
|
|
|
use \TclUpdates\SQLiteReader;
|
|
|
|
|
|
|
|
$db = new SQLiteReader();
|
|
|
|
|
|
|
|
$allVars = $db->getAllVariants();
|
2017-12-16 18:42:24 +00:00
|
|
|
$unknowns = $db->getUnknownRefs();
|
|
|
|
if (count($unknowns) > 0) {
|
|
|
|
$variants = array();
|
|
|
|
foreach ($unknowns as $uref) {
|
|
|
|
$variants[$uref] = '';
|
|
|
|
}
|
|
|
|
$allVars['Unknown'] = array(
|
|
|
|
'Variants' => $variants,
|
|
|
|
);
|
|
|
|
}
|
2017-12-16 17:17:57 +00:00
|
|
|
|
|
|
|
foreach ($allVars as $family => $models) {
|
|
|
|
foreach ($models as $model => $variants) {
|
|
|
|
echo '<h2>' . $family . ' ' . $model . '</h2>' . PHP_EOL;
|
2017-12-16 18:42:24 +00:00
|
|
|
$allVersions = $db->getAllVersionsForModel($model);
|
|
|
|
echo '<table><tbody>';
|
2017-12-16 17:17:57 +00:00
|
|
|
foreach ($variants as $ref => $name) {
|
2017-12-16 18:42:24 +00:00
|
|
|
echo '<tr><td>' . $ref . '</td>';
|
|
|
|
$refVersions = $db->getAllVersionsForRef($ref);
|
|
|
|
foreach ($allVersions as $v) {
|
|
|
|
if (in_array($v, $refVersions, true)) {
|
|
|
|
echo '<td>' . $v . '</td>';
|
|
|
|
} else {
|
|
|
|
echo '<td class="empty">------</td>';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
echo '</tr>' . PHP_EOL;
|
2017-12-16 17:17:57 +00:00
|
|
|
}
|
2017-12-16 18:42:24 +00:00
|
|
|
echo '</tbody></table>';
|
2017-12-16 17:17:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</body>
|
|
|
|
</html>
|