config.php 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <?php
  2. /**
  3. * Configuration variables.
  4. *
  5. * Not meant to be edited by the user.
  6. *
  7. * @category Data
  8. */
  9. /**
  10. * Define constant and includesome helpers.
  11. */
  12. define('BASE_PATH', $_SERVER["DOCUMENT_ROOT"] . "/");
  13. require_once(__DIR__ . "/helper/NET_Helper.php");
  14. define('BASE_URL', NET::get_protocol() . $_SERVER["HTTP_HOST"] . "/");
  15. /**
  16. * App related constants.
  17. *
  18. * @category Data
  19. */
  20. final class APP{
  21. /**
  22. * App version.
  23. *
  24. * Can be any string, not just numbers.
  25. */
  26. const VERSION = "3.0.0";
  27. }
  28. /**
  29. * In-app URLs.
  30. *
  31. * @category Data
  32. */
  33. final class URL{
  34. /**
  35. * Domain, with protcol (includes final '/').
  36. */
  37. const BASE = BASE_URL;
  38. /**
  39. * Fonts full url (includes final '/').
  40. */
  41. const FONTS = BASE_URL . "/fonts/";
  42. /**
  43. * CSS full url (includes final '/').
  44. */
  45. const CSS = BASE_URL . "css/";
  46. /**
  47. * URLs to image resources.
  48. */
  49. const IMG = array(
  50. "BASE" => BASE_URL . "img/",
  51. "UNKNOWN" => BASE_URL . "img/unknown.png",
  52. "ICON" => BASE_URL . "img/icon/",
  53. "LOGO" => BASE_URL . "img/logo/",
  54. "CURRENCY" => BASE_URL . "img/currency/",
  55. "UNIT" => BASE_URL . "img/unit/",
  56. "AREA" => BASE_URL . "img/area/",
  57. "SKILL" => BASE_URL . "img/skill/",
  58. "ESSENCE" => BASE_URL . "img/essence/",
  59. "RUNE" => BASE_URL . "img/rune/",
  60. "ARTIFACT" => BASE_URL . "img/artifact/",
  61. "GRIND" => BASE_URL . "img/grind/",
  62. "ELEMENT" => BASE_URL . "img/element/",
  63. "SKILL_GUILD" => BASE_URL . "img/skill_guild/",
  64. "DECORATION" => BASE_URL . "img/decoration/",
  65. "SOURCE" => BASE_URL . "img/source/",
  66. "SKILL_LEADER" => BASE_URL . "img/skill_leader/",
  67. "INVENTORY" => BASE_URL . "img/inventory/",
  68. "EFFECT" => BASE_URL . "img/effect/",
  69. "BUILDING" => BASE_URL . "img/building/",
  70. );
  71. }
  72. /**
  73. * In-app directories (filesystem, not url).
  74. *
  75. * @category Data
  76. */
  77. final class PATH{
  78. /**
  79. * Path to the application direcory.
  80. */
  81. const APPLICATION = BASE_PATH . "../application/";
  82. /**
  83. * Path to the public direcory.
  84. */
  85. const BASE = BASE_PATH;
  86. /**
  87. * Path to the controller file.
  88. */
  89. const CONTROLLER = BASE_PATH . "../application/Controller.php";
  90. /**
  91. * Path to the entity files.
  92. */
  93. const ENTITY = BASE_PATH . "../application/entity/";
  94. /**
  95. * Path to the page files.
  96. */
  97. const PAGE = BASE_PATH . "../application/page/";
  98. /**
  99. * Path to the action files.
  100. */
  101. const ACTION = BASE_PATH . "../application/action/";
  102. /**
  103. * Path to the view files.
  104. */
  105. const VIEW = BASE_PATH . "../application/view/";
  106. /**
  107. * Paths to image resources.
  108. */
  109. const IMG = array(
  110. "BASE" => BASE_PATH . "img/",
  111. "UNKNOWN" => BASE_PATH . "img/unknown.png",
  112. "ICON" => BASE_PATH . "img/icon/",
  113. "LOGO" => BASE_PATH . "img/logo/",
  114. "CURRENCY" => BASE_PATH . "img/currency/",
  115. "UNIT" => BASE_PATH . "img/unit/",
  116. "AREA" => BASE_PATH . "img/area/",
  117. "SKILL" => BASE_PATH . "img/skill/",
  118. "ESSENCE" => BASE_PATH . "img/essence/",
  119. "RUNE" => BASE_PATH . "img/rune/",
  120. "GRIND" => BASE_PATH . "img/grind/",
  121. "ELEMENT" => BASE_PATH . "img/element/",
  122. "SKILL_GUILD" => BASE_PATH . "img/skill_guild/",
  123. "DECORATION" => BASE_PATH . "img/decoration/",
  124. "SOURCE" => BASE_PATH . "img/source/",
  125. "SKILL_LEADER" => BASE_PATH . "img/skill_leader/",
  126. "INVENTORY" => BASE_PATH . "img/inventory/",
  127. "EFFECT" => BASE_PATH . "img/effect/",
  128. "BUILDING" => BASE_PATH . "img/building/",
  129. );
  130. /**
  131. * Path to the helper files.
  132. */
  133. const HELPER = BASE_PATH . "../application/helper/";
  134. /**
  135. * Path to the db_key files.
  136. */
  137. const DB_KEY = BASE_PATH . "../application/sw.sqlite";
  138. /**
  139. * Path to the db_data files.
  140. */
  141. const DB_DATA = BASE_PATH . "../data/sw.sqlite";
  142. }
  143. ?>