index.php 556 B

12345678910111213141516171819202122232425
  1. <?php
  2. declare(strict_types=1);
  3. // Framework
  4. require 'phar://' . __DIR__ . '/dist/bones.phar';
  5. // New app
  6. $a = new \netico\Bones\Configuration();
  7. $t = $a->getValue('template', 'name');
  8. $n = $a->getValue('application', 'name');
  9. // HTML template
  10. $s = new \netico\Bones\Template(TEMPLATES . "/$t/piracy.tpl");
  11. $s->add('application', $n);
  12. // DB
  13. $db = new \netico\Bones\SQLite();
  14. $db->sql("SELECT [id], [title], [text] FROM pages ORDER BY [id] ASC;");
  15. $db->close();
  16. // Rock'n Roll!
  17. $s->rs($db->data, "toc");
  18. $s->rs($db->data, "pages");
  19. $s->output('HTML');