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.

93 lines
3.8 KiB

  1. <?php
  2. // This is the "recommended" version of configuration.inc.php, without any comments, and restructured in a way
  3. // that should make sense for most pro-users of Qcodo.
  4. // While it is recommended (for ease of code readability) to use this version of configuration.inc.php-dist,
  5. // the configuration.inc.php-full version could potentially be more useful for newer users of Qcodo as it has
  6. // comments inline within the file.
  7. // To use, simply rename or copy this file to includes/configuration.inc.php, and begin making modifications
  8. // to the configuration constants as it makes sense for your PHP and docroot installation.
  9. define('SERVER_INSTANCE', 'dev');
  10. switch (SERVER_INSTANCE) {
  11. case 'test':
  12. case 'stage':
  13. case 'prod':
  14. case 'dev':
  15. // define ('__DOCROOT__', '/var/www');
  16. // define ('__SUBDIRECTORY__', '/quinta');
  17. define ('__VIRTUAL_DIRECTORY__', '');
  18. define('__DOCROOT__', rtrim($_SERVER['DOCUMENT_ROOT'], '/'));
  19. //if Qcodo is in the docroot, just leave _SUBDIRECTORY__ empty
  20. if (file_exists(__DOCROOT__ . '/../includes/configuration.inc.php')){
  21. define('__SUBDIRECTORY__', '');
  22. } else {
  23. //attempt to find the sub directory from the script executing:
  24. $strScriptname = $_SERVER['SCRIPT_NAME'];
  25. $pos = strrpos($strScriptname, '/');
  26. //remove scriptname itself ..
  27. $strSubdir = substr($strScriptname, 0, $pos);
  28. $arySubdirs = explode('/', trim($strSubdir));
  29. //remove empty first cell ..
  30. array_shift($arySubdirs);
  31. $strDirStack = '';
  32. //check each subdirectory for Quinta class file ..
  33. foreach ($arySubdirs as $strPart) {
  34. $strDirStack .= '/' . $strPart;
  35. if (file_exists( __DOCROOT__ . $strDirStack . '/../includes/configuration.inc.php')) {
  36. define('__SUBDIRECTORY__', $strDirStack);
  37. break;
  38. }
  39. }
  40. }
  41. define('DB_CONNECTION_1', serialize(array(
  42. 'adapter' => 'MySqli5',
  43. 'server' => 'localhost',
  44. 'port' => null,
  45. 'database' => 'quintacmstest',
  46. 'username' => 'quintadbutest',
  47. 'password' => 'quintadbptest',
  48. 'profiling' => false)));
  49. break;
  50. }
  51. define('ALLOW_REMOTE_ADMIN', false);
  52. define ('__URL_REWRITE__', 'none');
  53. define ('__DEVTOOLS_CLI__', __DOCROOT__ . __SUBDIRECTORY__ . '/../cli');
  54. define ('__INCLUDES__', __DOCROOT__ . __SUBDIRECTORY__ . '/../includes');
  55. define ('__QCODO__', __INCLUDES__ . '/qcodo');
  56. define ('__QCODO_CORE__', __INCLUDES__ . '/qcodo/_core');
  57. define ('__DATA_CLASSES__', __INCLUDES__ . '/data_classes');
  58. define ('__DATAGEN_CLASSES__', __INCLUDES__ . '/data_classes/generated');
  59. define ('__DATA_META_CONTROLS__', __INCLUDES__ . '/data_meta_controls');
  60. define ('__DATAGEN_META_CONTROLS__', __INCLUDES__ . '/data_meta_controls/generated');
  61. define('__ERROR_LOG__', __DOCROOT__ . '/../error_log');
  62. define('__QCODO_LOG__', __DOCROOT__ . '/../log');
  63. define('__TEST_CASES__', __DOCROOT__ . '/../tests');
  64. define ('__FORM_DRAFTS__', __SUBDIRECTORY__ . '/drafts');
  65. define ('__PANEL_DRAFTS__', __SUBDIRECTORY__ . '/drafts/dashboard');
  66. // Examples and Devtools are deprecated as of 0.4.0, but these constants are still here to
  67. // support any QPM packages that may still want to use them
  68. define ('__DEVTOOLS__', null);
  69. define ('__EXAMPLES__', null);
  70. define ('__JS_ASSETS__', __SUBDIRECTORY__ . '/assets/js');
  71. define ('__CSS_ASSETS__', __SUBDIRECTORY__ . '/assets/css');
  72. define ('__IMAGE_ASSETS__', __SUBDIRECTORY__ . '/assets/images');
  73. define ('__PHP_ASSETS__', __SUBDIRECTORY__ . '/assets/php');
  74. if (!ini_get('date.timezone'))
  75. date_default_timezone_set('America/Los_Angeles');
  76. define('ERROR_LOG_FLAG', false);
  77. // define('ERROR_FRIENDLY_PAGE_PATH', '/absolute/path/to/friendly_error_page.html');
  78. // define('ERROR_FRIENDLY_AJAX_MESSAGE', 'Oops! An error has occurred.\r\n\r\nThe error was logged, and we will take a look into this right away.');
  79. define('QCODO_LOG_LEVEL', 6);
  80. ?>