config.php 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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. "RANK" => BASE_URL . "img/rank/",
  56. "UNIT" => BASE_URL . "img/unit/",
  57. "AREA" => BASE_URL . "img/area/",
  58. "SKILL" => BASE_URL . "img/skill/",
  59. "ESSENCE" => BASE_URL . "img/essence/",
  60. "RUNE" => BASE_URL . "img/rune/",
  61. "ARTIFACT" => BASE_URL . "img/artifact/",
  62. "GRIND" => BASE_URL . "img/grind/",
  63. "ELEMENT" => BASE_URL . "img/element/",
  64. "SKILL_GUILD" => BASE_URL . "img/skill_guild/",
  65. "DECORATION" => BASE_URL . "img/decoration/",
  66. "SOURCE" => BASE_URL . "img/source/",
  67. "SKILL_LEADER" => BASE_URL . "img/skill_leader/",
  68. "INVENTORY" => BASE_URL . "img/inventory/",
  69. "EFFECT" => BASE_URL . "img/effect/",
  70. "BUILDING" => BASE_URL . "img/building/",
  71. );
  72. }
  73. /**
  74. * In-app directories (filesystem, not url).
  75. *
  76. * @category Data
  77. */
  78. final class PATH{
  79. /**
  80. * Path to the application direcory.
  81. */
  82. const APPLICATION = BASE_PATH . "../application/";
  83. /**
  84. * Path to the public direcory.
  85. */
  86. const BASE = BASE_PATH;
  87. /**
  88. * Path to the controller file.
  89. */
  90. const CONTROLLER = BASE_PATH . "../application/Controller.php";
  91. /**
  92. * Path to the entity files.
  93. */
  94. const ENTITY = BASE_PATH . "../application/entity/";
  95. /**
  96. * Path to the page files.
  97. */
  98. const PAGE = BASE_PATH . "../application/page/";
  99. /**
  100. * Path to the action files.
  101. */
  102. const ACTION = BASE_PATH . "../application/action/";
  103. /**
  104. * Path to the view files.
  105. */
  106. const VIEW = BASE_PATH . "../application/view/";
  107. /**
  108. * Paths to image resources.
  109. */
  110. const IMG = array(
  111. "BASE" => BASE_PATH . "img/",
  112. "UNKNOWN" => BASE_PATH . "img/unknown.png",
  113. "ICON" => BASE_PATH . "img/icon/",
  114. "LOGO" => BASE_PATH . "img/logo/",
  115. "CURRENCY" => BASE_PATH . "img/currency/",
  116. "UNIT" => BASE_PATH . "img/unit/",
  117. "AREA" => BASE_PATH . "img/area/",
  118. "SKILL" => BASE_PATH . "img/skill/",
  119. "ESSENCE" => BASE_PATH . "img/essence/",
  120. "RUNE" => BASE_PATH . "img/rune/",
  121. "GRIND" => BASE_PATH . "img/grind/",
  122. "ELEMENT" => BASE_PATH . "img/element/",
  123. "SKILL_GUILD" => BASE_PATH . "img/skill_guild/",
  124. "DECORATION" => BASE_PATH . "img/decoration/",
  125. "SOURCE" => BASE_PATH . "img/source/",
  126. "SKILL_LEADER" => BASE_PATH . "img/skill_leader/",
  127. "INVENTORY" => BASE_PATH . "img/inventory/",
  128. "EFFECT" => BASE_PATH . "img/effect/",
  129. "BUILDING" => BASE_PATH . "img/building/",
  130. );
  131. /**
  132. * Path to the helper files.
  133. */
  134. const HELPER = BASE_PATH . "../application/helper/";
  135. /**
  136. * Path to the db_key files.
  137. */
  138. const DB_KEY = BASE_PATH . "../application/sw.sqlite";
  139. /**
  140. * Path to the db_data files.
  141. */
  142. const DB_DATA = BASE_PATH . "../data/sw.sqlite";
  143. }
  144. ?>