A QCodo powered CMS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

259 lines
12 KiB

  1. <?php
  2. //This file must always be included for any QuintaCMS files to run
  3. define('QUINTACMS', 1);
  4. define('QUINTA_VERSION', '0.3');
  5. /* * ********** Quinta CMS configuration ************ */
  6. /**
  7. * Attempt to set the base directories - if this does not work for you
  8. * comment out the autoconfiguration and uncomment and set the
  9. * following for your setup:
  10. * define('__WWWROOT__', '/var/www/quinta');
  11. * define ('__QUINTA_SUBDIRECTORY__', '');
  12. */
  13. /// _Relative_ location of the Quinta tree for discovery .. absolute is defined below
  14. define('__QUINTA_INCLUDES__', '/../includes/quinta');
  15. if (!defined('__WWWROOT__') || !defined('__QUINTA_SUBDIRECTORY__')) {
  16. define('__WWWROOT__', rtrim($_SERVER['DOCUMENT_ROOT'], '/'));
  17. //if Quinta is in the docroot, just leave __QUINTA_SUBDIRECTORY__ empty
  18. if (file_exists(__WWWROOT__ . __QUINTA_INCLUDES__ . '/Quinta.class.php'))
  19. define('__QUINTA_SUBDIRECTORY__', '');
  20. else {
  21. //attempt to find the sub directory from the script executing:
  22. $strScriptname = $_SERVER['SCRIPT_NAME'];
  23. $pos = strrpos($strScriptname, '/');
  24. //remove scriptname itself ..
  25. $strSubdir = substr($strScriptname, 0, $pos);
  26. $arySubdirs = explode('/', trim($strSubdir));
  27. //remove empty first cell ..
  28. array_shift($arySubdirs);
  29. $strDirStack = '';
  30. //check each subdirectory for Quinta class file ..
  31. foreach ($arySubdirs as $strPart) {
  32. $strDirStack .= '/' . $strPart;
  33. if (file_exists(__WWWROOT__ . $strDirStack . __QUINTA_INCLUDES__ . '/Quinta.class.php')) {
  34. define('__QUINTA_SUBDIRECTORY__', $strDirStack);
  35. break;
  36. }
  37. }
  38. //Quinta installation will catch this ..
  39. if (!defined('__QUINTA_SUBDIRECTORY__'))
  40. throw new Exception('Base directory autoconfiguration failed. Please set manually.');
  41. }
  42. }
  43. define('__QUINTA_WWWROOT__', __WWWROOT__ . __QUINTA_SUBDIRECTORY__);
  44. $thisdir = dirname(__FILE__);
  45. define('__QUINTA_ABSROOT__', $thisdir . '/../..' );
  46. define('__QUINTA_LIBDIR__', __QUINTA_ABSROOT__ . '/includes/quinta');
  47. define('__QUINTA_DBDIR__', __QUINTA_ABSROOT__ . '/database');
  48. /**
  49. * ----------------------- Quinta CMS directories -------------------------------
  50. *
  51. * The Quinta directory structure is designed to support separation between core, contributed
  52. * and local code to make isolation and independant updates clean. The core/ directory is
  53. * maintained in the main Quinta repository and may be checked out and updated by itself,
  54. * the contrib directory is maintained as the Quinta contributed code repository and local is
  55. * delegated to local custom code for a site. Each of these contains the same substructure:
  56. * - assets: images, css and javascript files
  57. * - classes: class files and other files
  58. * - modules: module class files - this is where the module loader looks for registered modules
  59. * - templates: template files used by classes in the other directories. These represent the final
  60. * stage of the View and may be altered
  61. * - orm: ORM object classes for the data model. Base classes for these may be placed
  62. * under orm/static for non-generated or orm/generated for QCodo generated classes.
  63. * Classes under orm/ will be autoloaded by Quinta.
  64. * Note: you must configure QCodo code generation to use these directories - or you can
  65. * also use the standard QCodo default directories under qcodoroot/includes
  66. * The autoloader also makes it possible to have a local version of a class that overrides the
  67. * core version - local classes will be loaded first, then contrib, then core. The same applies
  68. * for Javascripts and in CSS loading cascades in the reverse direction.
  69. */
  70. ///Base of the Quinta tree - Note that this _includes_ the subdirectory for the absolute path
  71. /// ASSETS of any kind are relative and must build off ONLY __QUINTA_SUBDIRECTORY__
  72. /// - see below.
  73. ///Quinta core absolute directories
  74. define('__QUINTA_CORE__', __QUINTA_LIBDIR__ . '/core');
  75. define('__QUINTA_CORE_CONTROLLERS__', __QUINTA_CORE__ . '/controllers');
  76. define('__QUINTA_CORE_METACONTROLS__', __QUINTA_CORE_CONTROLLERS__ . '/meta_controls');
  77. define('__QUINTA_CORE_MODULES__', __QUINTA_CORE__ . '/modules');
  78. define('__QUINTA_CORE_MODELS__', __QUINTA_CORE__ . '/models');
  79. define('__QUINTA_CORE_VIEWS__', __QUINTA_CORE__ . '/views');
  80. define('__QUINTA_CORE_UTILITIES__', __QUINTA_CORE__ . '/utilities');
  81. ///Contributed and non-core code directories
  82. define('__QUINTA_CONTRIB__', __QUINTA_LIBDIR__ . '/contrib');
  83. define('__QUINTA_CONTRIB_CONTROLLERS__', __QUINTA_CONTRIB__ . '/controllers');
  84. define('__QUINTA_CONTRIB_METACONTROLS__', __QUINTA_CONTRIB_CONTROLLERS__ . '/meta_controls');
  85. define('__QUINTA_CONTRIB_MODULES__', __QUINTA_CONTRIB__ . '/modules');
  86. define('__QUINTA_CONTRIB_MODELS__', __QUINTA_CONTRIB__ . '/models');
  87. define('__QUINTA_CONTRIB_VIEWS__', __QUINTA_CONTRIB__ . '/views');
  88. ///Local code directories
  89. define('__QUINTA_LOCAL__', __QUINTA_LIBDIR__ . '/local');
  90. define('__QUINTA_LOCAL_CLASSES__', __QUINTA_LOCAL__ . '/controllers');
  91. define('__QUINTA_LOCAL_MODULES__', __QUINTA_LOCAL__ . '/modules');
  92. define('__QUINTA_LOCAL_MODELS__', __QUINTA_LOCAL__ . '/models');
  93. define('__QUINTA_LOCAL_METACONTROLS__', __QUINTA_LOCAL__ . '/meta_controls');
  94. define('__QUINTA_LOCAL_VIEWS__', __QUINTA_LOCAL__ . '/views');
  95. ///core relative directories
  96. define('__QUINTA_CORE_ASSETS__', __QUINTA_SUBDIRECTORY__ . '/assets');
  97. define('__QUINTA_CORE_IMAGES__', __QUINTA_CORE_ASSETS__ . '/images');
  98. define('__QUINTA_CORE_JS__', __QUINTA_CORE_ASSETS__ . '/js');
  99. define('__QUINTA_CORE_CSS__', __QUINTA_CORE_ASSETS__ . '/css');
  100. ///contrib relative directories
  101. define('__QUINTA_CONTRIB_ASSETS__', __QUINTA_SUBDIRECTORY__ . '/contrib/assets');
  102. define('__QUINTA_CONTRIB_IMAGES__', __QUINTA_CONTRIB_ASSETS__ . '/images');
  103. define('__QUINTA_CONTRIB_JS__', __QUINTA_CONTRIB_ASSETS__ . '/js');
  104. define('__QUINTA_CONTRIB_CSS__', __QUINTA_CONTRIB_ASSETS__ . '/css');
  105. ///local relative directories
  106. define('__QUINTA_LOCAL_ASSETS__', __QUINTA_SUBDIRECTORY__ . '/local/assets');
  107. define('__QUINTA_LOCAL_IMAGES__', __QUINTA_LOCAL_ASSETS__ . '/images');
  108. define('__QUINTA_LOCAL_JS__', __QUINTA_LOCAL_ASSETS__ . '/js');
  109. define('__QUINTA_LOCAL_CSS__', __QUINTA_LOCAL_ASSETS__ . '/css');
  110. /**
  111. * Base of the QCodo tree - this is required to run Quinta CMS - it is the one thing
  112. * you may need to configure. If the Quinta CMS and QCodo directories are together
  113. * (ie. Quinta root == QCodo's wwwroot), you can simply uncomment the second line,
  114. * otherwise you must specify the location of QCodo's root (the directory called "wwwroot"
  115. * in the distribution) as shown in the first line.
  116. */
  117. define('__QCODO_ROOT__', __QUINTA_ABSROOT__);
  118. /**
  119. * Extend the PHP include path - this makes it unnecessary to modify php.ini, you can
  120. * also add extra paths to search here. This also ensures that we load our files first in
  121. * case of conflicts. The final include is for QCodo for if it is bundled with Quinta.
  122. */
  123. set_include_path(__QUINTA_CORE_CONTROLLERS__ . PATH_SEPARATOR
  124. . __QUINTA_CORE_MODULES__ . PATH_SEPARATOR
  125. . __QUINTA_CORE_UTILITIES__ . PATH_SEPARATOR
  126. . __QUINTA_CONTRIB_CONTROLLERS__ . PATH_SEPARATOR
  127. . __QUINTA_CONTRIB_MODULES__ . PATH_SEPARATOR
  128. . __QUINTA_LOCAL_CLASSES__ . PATH_SEPARATOR
  129. . __QUINTA_LOCAL_MODULES__ . PATH_SEPARATOR
  130. //this is for QCodo if bundled ..
  131. . __QCODO_ROOT__ . PATH_SEPARATOR
  132. . get_include_path()
  133. );
  134. /**
  135. * Module configurations - these are local values for modules.
  136. * TODO: create a scheme for storing these in the database - this is a quick fix
  137. * due to current time constraints, ideally we should probably move these to the
  138. * database (encrypted). First we need an interface for entering them, then store in db ..
  139. *
  140. */
  141. ///USPS shipping ..change me for use!
  142. define('USPS_USERID', 'get from USPS');
  143. ///Endicia Label service .. Note: the test values can also be set to the production values
  144. /// and test mode will be active against the production server.
  145. define('ENDICIA_TESTDOMAIN', 'www.envmgr.com');
  146. define('ENDICIA_TESTREQUESTER_ID', 'get from Endicia');
  147. define('ENDICIA_TESTREQUEST_ID', 'get from Endicia');
  148. define('ENDICIA_TESTACCOUNT_ID', 'get from Endicia');
  149. define('ENDICIA_TESTPASSWORD', 'get from Endicia');
  150. define('ENDICIA_DOMAIN', 'labelserver.endicia.com');
  151. define('ENDICIA_REQUESTER_ID', 'get from Endicia');
  152. define('ENDICIA_REQUEST_ID', 'get from Endicia');
  153. define('ENDICIA_ACCOUNT_ID', 'get from Endicia');
  154. define('ENDICIA_PASSWORD', 'get from Endicia');
  155. define('ENDICIA_RECREDIT_AMOUNT', 100);
  156. define('ENDICIA_ACCOUNT_MIN', 100);
  157. define('ENDICIA_AUTO_RECREDIT', false);
  158. ///default mail piece type/shape
  159. define('ENDICIA_MAILPIECE_SHAPE', 'FlatRateEnvelope');
  160. define('ENDICIA_CGI_URL', '/LabelService/EwsLabelService.asmx/');
  161. ///FedEx shipping ..
  162. define('FEDEX_TESTKEY', 'developer key');
  163. define('FEDEX_TESTPASSWORD', 'developer password');
  164. define('FEDEX_TESTACCOUNT_NUMBER', 'developer number');
  165. define('FEDEX_TESTMETER_NUMBER', 'developer number');
  166. define('FEDEX_KEY', 'get from FedEx');
  167. define('FEDEX_PASSWORD', 'get from FedEx');
  168. define('FEDEX_ACCOUNT_NUMBER', 'get from FedEx');
  169. define('FEDEX_METER_NUMBER', 'get from FedEx');
  170. /**
  171. * Payment methods
  172. */
  173. /* /// PayPal EWP - unimplemented (requires FORM POST ... use IFRAME ??)
  174. define("PAYPAL_DEV_CENTRAL", "developer");
  175. define("PAYPAL_ENV", "sandbox");
  176. ///Note: these are testing values by default, from the PP SDK ..
  177. define("PAYPAL_EWP_USERNAME", "sdk-three_api1.sdk.com");
  178. define("PAYPAL_EWP_PASSWORD", "QFZCWN5HZM8VBG7Q");
  179. define("PAYPAL_SIGNATURE", "A.d9eRKfd1yVkRrtmMfCFLTqa6M9AyodL0SJkhYztxUi8W9pCXF6.4NI");
  180. define("PAYPAL_EMAIL_ADDRESS", "sdk-seller@sdk.com");
  181. define("PAYPAL_IDENTITY_TOKEN", "G5JgcRdmlYUwnHcYSEXI2rFuQ5yv-Ei19fMFWn30aDkZAoKt_7LTuufYXUa");
  182. define("PAYPAL_EWP_CERT_PATH", "cert/sdk-ewp-cert.pem");
  183. define("PAYPAL_EWP_PRIVATE_KEY_PATH", "cert/sdk-ewp-key.pem");
  184. define("PAYPAL_EWP_PRIVATE_KEY_PWD", "password");
  185. define("PAYPAL_CERT_ID", "KJAERUGBLVF6Y");
  186. define("PAYPAL_CERT_PATH", "cert/sandbox-cert.pem");
  187. define("PAYPAL_BUTTON_IMAGE_URL", "https://www.paypal.com/en_US/i/btn/x-click-but23.gif");
  188. define("PAYPAL_IPN_LOG", "paypal-ipn.log");
  189. */
  190. /// PayPal Express / NVP
  191. define('PAYPAL_REDIRECT_TESTURL', 'https://www.sandbox.paypal.com');
  192. define('PAYPAL_REDIRECT_URL', 'https://www.paypal.com');
  193. define('PAYPAL_NVP_TESTURL', 'https://api-3t.sandbox.paypal.com');
  194. define('PAYPAL_NVP_URL', 'https://api-3t.paypal.com');
  195. ///Note: these are testing values by default, from the PayPal SDK, adjust for real account ..
  196. define('PAYPAL_NVP_USERNAME', 'sdk-three_api1.sdk.com');
  197. define('PAYPAL_NVP_PASSWORD', 'QFZCWN5HZM8VBG7Q');
  198. define('PAYPAL_NVP_SIGNATURE', 'A.d9eRKfd1yVkRrtmMfCFLTqa6M9AyodL0SJkhYztxUi8W9pCXF6.4NI');
  199. ///Authorize.net AIM
  200. define('AUTHORIZENET_AIM_USERNAME', 'get from authorize.net');
  201. define('AUTHORIZENET_AIM_TRANSACTIONKEY', 'get from authorize.net');
  202. define('AUTHORIZENET_AIM_URL', 'secure.authorize.net');
  203. define('AUTHORIZENET_AIM_TESTUSERNAME', 'get from authorize.net');
  204. define('AUTHORIZENET_AIM_TESTTRANSACTIONKEY', 'get from authorize.net');
  205. define('AUTHORIZENET_AIM_TESTURL', 'test.authorize.net');
  206. /**
  207. * Webstore settings - Note, this might be better as Account #1 in the database ..
  208. */
  209. define('STORE_EMAIL_ADDRESS', '');
  210. define('STORE_OWNER', '');
  211. define('STORE_ADDRESS1', '');
  212. define('STORE_ADDRESS2', '');
  213. define('STORE_CITY', '');
  214. define('STORE_COUNTY', '');
  215. define('STORE_STATE', '');
  216. define('STORE_POSTAL_CODE', '');
  217. define('STORE_COUNTRY', '');
  218. define('STORE_PHONE', '');
  219. define('STORE_FAX', '');
  220. define('STORE_NAME', 'My Store');
  221. /// Default description sent to payment providers ..
  222. define('DEFAULT_ORDER_DESCRIPTION', 'storename product');
  223. ///Defaults for providers - these will be selected by default at checkout.
  224. /// Note: you can disable defaults by merely leaving these empty.
  225. define('DEFAULT_PAYMENT_PROVIDER', 'Authorize.net');
  226. define('DEFAULT_PAYMENT_SERVICE', 'Credit Card');
  227. define('DEFAULT_SHIPPING_CARRIER', 'USPS');
  228. define('DEFAULT_SHIPPING_SERVICE', 'PRIORITY');
  229. /**
  230. * Which page to redirect to after login
  231. */
  232. define('LOGIN_REDIRECT', '/index.php/AccountHome');
  233. /**
  234. * Miscelleneous defaults
  235. */
  236. define('MAX_PRODUCT_QUANTITY', 1000);
  237. define('DEFAULT_SHIPPING_RATE', 2);
  238. ?>