Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

12345678910111213141516171819202122232425262728
  1. <?php
  2. // Defines
  3. define('BASE', dirname(__DIR__));
  4. define('BASEURL', $_SERVER['SERVER_NAME']);
  5. $config = json_decode(file_get_contents(BASE . "/inc/config/config.json"));
  6. if (empty($config)) {
  7. header('Location: /configure.php');
  8. die();
  9. }
  10. // Start the session
  11. session_start();
  12. // Database and Authentication
  13. require_once(BASE . '/inc/db.php');
  14. if ($config->type == "mysql")
  15. $db = MysqlDb::Connect($config->host, $config->user, $config->pass, $config->db);
  16. else
  17. $db = SqliteDb::Connect();
  18. require_once(BASE . '/inc/user.php');
  19. require_once(BASE . '/inc/misc.php');
  20. // Templates
  21. require_once(BASE . '/templates/header.php');
  22. require_once(BASE . '/templates/footer.php');