config.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. "photo" => "foto",
  21. "festivals" => "fiestas"
  22. ],
  23. "en" => [
  24. "help" => "help",
  25. "activities" => "activities",
  26. "blog" => "blog",
  27. "us" => "us",
  28. "gallery" => "gallery",
  29. "photo" => "photo",
  30. "festivals" => "festivals"
  31. ],
  32. "eu" => [
  33. "help" => "laguntza",
  34. "activities" => "aktibitateak",
  35. "blog" => "blog",
  36. "us" => "gu",
  37. "gallery" => "argaskinak",
  38. "photo" => "argaskia",
  39. "festivals" => "jaiak"
  40. ]
  41. ];
  42. /**
  43. * Static url, absolute, language independant.
  44. */
  45. $static = [
  46. "layout" => $static_url . "/img/layout/",
  47. "content" => $static_url . "/img/content/",
  48. "fonts" => $static_url . "/fonts/",
  49. "css" => $static_url . "/css/",
  50. "script" => $static_url . "/script/",
  51. ];
  52. /**
  53. * Server document root.
  54. */
  55. $base_dir = $_SERVER["DOCUMENT_ROOT"];
  56. /**
  57. * Paths within the server.
  58. */
  59. $path = [
  60. "application" => $base_dir . "/../application/",
  61. "controller" => $base_dir . "/../application/Controller.php",
  62. "entity" => $base_dir . "/../application/entity/",
  63. "page" => $base_dir . "/../application/page/",
  64. "util" => $base_dir . "/../application/util/",
  65. "template" => $base_dir . "/../application/template/",
  66. "include" => $base_dir . "/../application/template/include/",
  67. "string" => $base_dir . "/../application/template/string/"
  68. ];
  69. require_once(__DIR__ . "/data.php");
  70. ?>