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ů.

inc.php 571B

123456789101112131415161718192021222324
  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.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. $db = DBHandler::Connect($config->host, $config->user, $config->pass, $config->db);
  15. require_once(BASE . '/inc/user.php');
  16. // Templates
  17. require_once(BASE . '/templates/header.php');
  18. require_once(BASE . '/templates/footer.php');