define.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. ###
  3. # @name Define
  4. # @author Tobias Reich
  5. # @copyright 2014 by Tobias Reich
  6. ###
  7. # Define root
  8. define('LYCHEE', substr(__DIR__, 0, -3));
  9. # Define dirs
  10. define('LYCHEE_DATA', LYCHEE . 'data/');
  11. define('LYCHEE_BUILD', LYCHEE . 'build/');
  12. define('LYCHEE_UPLOADS', LYCHEE . 'uploads/');
  13. define('LYCHEE_UPLOADS_BIG', LYCHEE_UPLOADS . 'big/');
  14. define('LYCHEE_UPLOADS_MEDIUM', LYCHEE_UPLOADS . 'medium/');
  15. define('LYCHEE_UPLOADS_THUMB', LYCHEE_UPLOADS . 'thumb/');
  16. define('LYCHEE_UPLOADS_IMPORT', LYCHEE_UPLOADS . 'import/');
  17. define('LYCHEE_PLUGINS', LYCHEE . 'plugins/');
  18. # Define files
  19. define('LYCHEE_CONFIG_FILE', LYCHEE_DATA . 'config.php');
  20. # Define urls
  21. define('LYCHEE_URL_UPLOADS_THUMB', 'uploads/thumb/');
  22. define('LYCHEE_URL_UPLOADS_BIG', 'uploads/big/');
  23. # Parse table prefix
  24. # Old users do not have the table prefix stored in their config-file
  25. if (!isset($dbTablePrefix)) $dbTablePrefix = '';
  26. else $dbTablePrefix .= '_';
  27. # Define tables
  28. define('LYCHEE_TABLE_ALBUMS', $dbTablePrefix . 'lychee_albums');
  29. define('LYCHEE_TABLE_LOG', $dbTablePrefix . 'lychee_log');
  30. define('LYCHEE_TABLE_PHOTOS', $dbTablePrefix . 'lychee_photos');
  31. define('LYCHEE_TABLE_SETTINGS', $dbTablePrefix . 'lychee_settings');
  32. ?>