config.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. require_once(__DIR__ . "/auth.php");
  3. require_once(__DIR__ . "/../util/net.php");
  4. /**
  5. * Server base url, including protocol, without language indicator.
  6. * It may be overwritten by the controller to add the language.
  7. */
  8. $base_url = get_protocol() . $_SERVER["HTTP_HOST"];
  9. $static_url = get_protocol() . $_SERVER["HTTP_HOST"];
  10. /**
  11. * Page urls, different languages.
  12. */
  13. $url_l10n = [
  14. "es" => [
  15. "help" => "ayuda",
  16. "activities" => "actividades",
  17. "blog" => "blog",
  18. "us" => "nosotros",
  19. "gallery" => "galeria",
  20. "festivals" => "fiestas"
  21. ],
  22. "en" => [
  23. "help" => "help",
  24. "activities" => "activities",
  25. "blog" => "blog",
  26. "us" => "us",
  27. "gallery" => "gallery",
  28. "festivals" => "festivals"
  29. ],
  30. "eu" => [
  31. "help" => "laguntza",
  32. "activities" => "aktibitateak",
  33. "blog" => "blog",
  34. "us" => "gu",
  35. "gallery" => "argaskinak",
  36. "festivals" => "jaiak"
  37. ]
  38. ];
  39. /**
  40. * Static url, absolute, language independant.
  41. */
  42. $static = [
  43. "layout" => $static_url . "/img/layout/",
  44. "content" => $static_url . "/img/content/",
  45. "fonts" => $static_url . "/fonts/",
  46. "css" => $static_url . "/css/",
  47. "script" => $static_url . "/script/",
  48. ];
  49. /**
  50. * Server document root.
  51. */
  52. $base_dir = $_SERVER["DOCUMENT_ROOT"];
  53. /**
  54. * Paths within the server.
  55. */
  56. $path = [
  57. "application" => $base_dir . "/../application/",
  58. "controller" => $base_dir . "/../application/Controller.php",
  59. "entity" => $base_dir . "/../application/entity/",
  60. "page" => $base_dir . "/../application/page/",
  61. "util" => $base_dir . "/../application/util/",
  62. "template" => $base_dir . "/../application/template/",
  63. "include" => $base_dir . "/../application/template/include/",
  64. "string" => $base_dir . "/../application/template/string/"
  65. ];
  66. require_once(__DIR__ . "/data.php");
  67. ?>