12345678910111213141516171819202122232425 |
- <?php
- declare(strict_types=1);
- // Framework
- require 'phar://' . __DIR__ . '/dist/bones.phar';
- // New app
- $a = new \netico\Bones\Configuration();
- $t = $a->getValue('template', 'name');
- $n = $a->getValue('application', 'name');
- // HTML template
- $s = new \netico\Bones\Template(TEMPLATES . "/$t/piracy.tpl");
- $s->add('application', $n);
- // DB
- $db = new \netico\Bones\SQLite();
- $db->sql("SELECT [id], [title], [text] FROM pages ORDER BY [id] ASC;");
- $db->close();
- // Rock'n Roll!
- $s->rs($db->data, "toc");
- $s->rs($db->data, "pages");
- $s->output('HTML');
|