PageRenderTime 61ms CodeModel.GetById 34ms RepoModel.GetById 0ms app.codeStats 0ms

/framework/lib/setup.php

https://bitbucket.org/designbyheart/original
PHP | 142 lines | 123 code | 10 blank | 9 comment | 1 complexity | 7ef94012e67faa0fb4eb19e70ddefa88 MD5 | raw file
Possible License(s): GPL-3.0
  1. <?php
  2. /**
  3. * Created by JetBrains PhpStorm.
  4. * User: predragjevtic
  5. * Date: 8/10/12
  6. * Time: 3:23 AM
  7. * To change this template use File | Settings | File Templates.
  8. */
  9. switch ($_SERVER["SERVER_NAME"]) {
  10. case "original.net":
  11. case "localhost/original":
  12. defined("SITE_ROOT") ? null : define("SITE_ROOT", "http://" . $_SERVER["SERVER_NAME"] . "/");
  13. defined("SITE_ROOT_CL") ? null : define("SITE_ROOT_CL", "http://" . $_SERVER["SERVER_NAME"] . "/");
  14. defined("ROOT_DIR") ? null : define("ROOT_DIR", $_SERVER["DOCUMENT_ROOT"] . '/');
  15. define("IS_SERVER", 'no');
  16. defined("ADMIN") ? null : define("ADMIN", SITE_ROOT . 'admin/');
  17. break;
  18. case "localhost":
  19. defined("SITE_ROOT") ? null : define("SITE_ROOT", "http://" . $_SERVER["SERVER_NAME"] . "/Original/");
  20. defined("SITE_ROOT_CL") ? null : define("SITE_ROOT_CL", "http://" . $_SERVER["SERVER_NAME"] . "/Original/");
  21. defined("ROOT_DIR") ? null : define("ROOT_DIR", $_SERVER["DOCUMENT_ROOT"] . '/Original/');
  22. define("IS_SERVER", 'yes');
  23. defined("ADMIN") ? null : define("ADMIN", SITE_ROOT . 'admin/');
  24. break;
  25. case "127.0.0.1": // ime lokalnog servera
  26. defined("SITE_ROOT") ? null : define("SITE_ROOT", "http://" . $_SERVER["SERVER_NAME"] . "/"); //putanju do foldera iz root servera
  27. defined("SITE_ROOT_CL") ? null : define("SITE_ROOT_CL", "http://" . $_SERVER["SERVER_NAME"] . "/");
  28. defined("ROOT_DIR") ? null : define("ROOT_DIR", $_SERVER["DOCUMENT_ROOT"] . '/');
  29. defined("ADMIN") ? null : define("ADMIN", SITE_ROOT . 'admin/');
  30. break;
  31. case 'admin.original.net':
  32. defined("SITE_ROOT") ? null : define("SITE_ROOT", "http://" . $_SERVER["SERVER_NAME"] . "/");
  33. defined("SITE_ROOT_CL") ? null : define("SITE_ROOT_CL", "http://" . $_SERVER["SERVER_NAME"] . "/");
  34. defined("ROOT_DIR") ? null : define("ROOT_DIR", $_SERVER["DOCUMENT_ROOT"] . '/../');
  35. defined("ADMIN") ? null : define("ADMIN", SITE_ROOT . 'admin/');
  36. break;
  37. case '10.0.1.7':
  38. case '192.168.1.9':
  39. defined("SITE_ROOT") ? null : define("SITE_ROOT", "http://" . $_SERVER["SERVER_NAME"] . "/original/");
  40. defined("SITE_ROOT_CL") ? null : define("SITE_ROOT_CL", "http://" . $_SERVER["SERVER_NAME"] . "/original/");
  41. defined("ROOT_DIR") ? null : define("ROOT_DIR", $_SERVER["DOCUMENT_ROOT"] . '/original/');
  42. define("IS_SERVER", 'no');
  43. defined("ADMIN") ? null : define("ADMIN", SITE_ROOT . 'admin/');
  44. break;
  45. case "original.cnnproject.com":
  46. defined("SITE_ROOT") ? null : define("SITE_ROOT", "http://" . $_SERVER["SERVER_NAME"] . "/");
  47. defined("SITE_ROOT_CL") ? null : define("SITE_ROOT_CL", "http://" . $_SERVER["SERVER_NAME"] . "/");
  48. defined("ASSETS") ? null : define("ASSETS", SITE_ROOT . "assets/");
  49. define("ROOT_DIR", '/home/origb2b/public_html/');
  50. break;
  51. default;
  52. defined("SITE_ROOT") ? null : define("SITE_ROOT", "http://" . $_SERVER["SERVER_NAME"] . "/~origb2b/");
  53. defined("SITE_ROOT_CL") ? null : define("SITE_ROOT_CL", "http://" . $_SERVER["SERVER_NAME"] . "/~origb2b/");
  54. defined("ASSETS") ? null : define("ASSETS", SITE_ROOT . "assets/");
  55. define("ROOT_DIR", '/home/origb2b/public_html/');
  56. break;
  57. }
  58. date_default_timezone_set('Europe/Belgrade');
  59. defined("LIBS_DIR") ? null : define("LIBS_DIR", ROOT_DIR . "framework/lib/");
  60. defined("ASSETS") ? null : define("ASSETS", SITE_ROOT . "assets/");
  61. defined("INC") ? null : define("INC", ROOT_DIR . "framework/inc/");
  62. defined("MOD") ? null : define("MOD", ROOT_DIR . "framework/models/");
  63. defined("VIEW") ? null : define("VIEW", ROOT_DIR . "framework/views/");
  64. defined("ADMIN_ROOT") ? null : define("ADMIN_ROOT", ROOT_DIR . '/admin/');
  65. defined("CLASSES") ? null : define("CLASSES", LIBS_DIR . "classes/");
  66. defined("CSS") ? null : define("CSS", ASSETS . "css/");
  67. defined("JS") ? null : define("JS", ASSETS . "js/");
  68. defined("IMG") ? null : define("IMG", ASSETS . "images/");
  69. defined("PAGE_404") ? null : define("PAGE_404", INC . "404.php");
  70. defined("ADMIN") ? null : define("ADMIN", SITE_ROOT . 'admin/');
  71. defined("BANNER") ? null : define("BANNER", SITE_ROOT . "images/gallery/thumbsM/");
  72. defined("GALL") ? null : define("GALL", SITE_ROOT . "images/gallery/");
  73. defined("GALL_DIR") ? null : define("GALL_DIR", ROOT_DIR . "images/gallery/");
  74. defined("Th_M") ? null : define("Th_M", SITE_ROOT . "images/gallery/thumbsM/");
  75. defined("DEF_IMG") ? null : define("DEF_IMG", "no-image.png");
  76. defined("Th_S") ? null : define("Th_S", SITE_ROOT . "images/gallery/thumbsS/");
  77. defined("E_TEMP") ? null : define("E_TEMP", ROOT_DIR . 'framework/lib/mailTemp/full_width.php');
  78. defined("E_TEMP_ROOT") ? null : define("E_TEMP_ROOT", SITE_ROOT . 'framework/lib/mailTemp/images/');
  79. defined("DRIVER_F") ? null : define("DRIVER_F", ROOT_DIR . 'driversDownload/');
  80. defined("INSTRUCTION_F") ? null : define("INSTRUCTION_F", ROOT_DIR . 'instructionDownload/');
  81. defined("COUNTER") ? null : define("COUNTER", INC . 'counter.php');
  82. defined("CSV") ? null : define("CSV", ROOT_DIR . 'admin/uploadedFiles/');
  83. //config, funcion_lib, sesion, database, database_object,
  84. require_once(LIBS_DIR . "config.php");
  85. require_once(LIBS_DIR . "function_lib.php");
  86. require_once(LIBS_DIR . "session.php");
  87. require_once(CLASSES . "database.php");
  88. require_once(CLASSES . "database_object.php");
  89. require_once(CLASSES . 'administrator.php');
  90. require_once(CLASSES . "product.php");
  91. require_once(CLASSES . "tempProduct.php");
  92. require_once(CLASSES . "category.php");
  93. require_once(CLASSES . "manufacturer.php");
  94. require_once(CLASSES . "general_page.php");
  95. require_once(CLASSES . "gallery.php");
  96. require_once(CLASSES . "news.php");
  97. require_once(CLASSES . "mail.php");
  98. //require_once(CLASSES."cache.php");
  99. require_once(CLASSES . 'reference.php');
  100. require_once(CLASSES . 'news.php');
  101. require_once(CLASSES . 'customer.php');
  102. require_once(CLASSES . 'customerHistory.php');
  103. require_once(CLASSES . 'order.php');
  104. require_once(CLASSES . 'pricetemplate.php');
  105. require_once(CLASSES . 'pricetemplate.php');
  106. require_once(CLASSES . 'price.php');
  107. require_once(CLASSES . 'price_group.php');
  108. require_once(CLASSES . 'characteristics.php');
  109. require_once(CLASSES . 'mainMenu.php');
  110. require_once(CLASSES . 'promo.php');
  111. require_once(CLASSES . 'drivers.php');
  112. require_once(CLASSES . 'instructions.php');
  113. require_once(CLASSES . 'submenu.php');
  114. require_once(CLASSES . 'euro.php');
  115. require_once(CLASSES . 'log.php');
  116. require_once(CLASSES . 'order.php');
  117. require_once(CLASSES . 'address.php');
  118. require_once(CLASSES . 'settings.php');
  119. require_once(CLASSES . 'countries.php');
  120. require_once(CLASSES . 'country.php');
  121. require_once(CLASSES . 'productDetailsSettings.php');
  122. require_once(CLASSES . 'productDetails.php');
  123. require_once(CLASSES . 'notes.php');
  124. require_once(CLASSES . 'attributeSet.php');
  125. require_once(CLASSES . 'ticketsCategory.php');
  126. require_once(CLASSES . 'PHPExcel.php');
  127. require_once(CLASSES . 'searchTemplates.php');
  128. require_once(CLASSES . 'logVisit.php');
  129. require_once(CLASSES . 'characteristic_category.php');
  130. require_once(CLASSES . 'characteristic_value.php');
  131. require_once(CLASSES . 'iplus-product.php');
  132. require_once(CLASSES . 'iplus-promo.php');