2014-04-13 12:08:18 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
###
|
|
|
|
# @name Define
|
2015-02-01 21:08:37 +00:00
|
|
|
# @copyright 2015 by Tobias Reich
|
2014-04-13 12:08:18 +00:00
|
|
|
###
|
|
|
|
|
|
|
|
# Define root
|
|
|
|
define('LYCHEE', substr(__DIR__, 0, -3));
|
|
|
|
|
2015-03-06 22:29:55 +00:00
|
|
|
# Define status
|
|
|
|
define('LYCHEE_STATUS_NOCONFIG', 0);
|
|
|
|
define('LYCHEE_STATUS_LOGGEDOUT', 1);
|
|
|
|
define('LYCHEE_STATUS_LOGGEDIN', 2);
|
|
|
|
|
2014-04-13 12:08:18 +00:00
|
|
|
# Define dirs
|
|
|
|
define('LYCHEE_DATA', LYCHEE . 'data/');
|
2014-11-19 22:31:35 +00:00
|
|
|
define('LYCHEE_SRC', LYCHEE . 'src/');
|
2014-04-22 09:47:39 +00:00
|
|
|
define('LYCHEE_UPLOADS', LYCHEE . 'uploads/');
|
|
|
|
define('LYCHEE_UPLOADS_BIG', LYCHEE_UPLOADS . 'big/');
|
2014-04-28 10:00:48 +00:00
|
|
|
define('LYCHEE_UPLOADS_MEDIUM', LYCHEE_UPLOADS . 'medium/');
|
2014-04-22 09:47:39 +00:00
|
|
|
define('LYCHEE_UPLOADS_THUMB', LYCHEE_UPLOADS . 'thumb/');
|
|
|
|
define('LYCHEE_UPLOADS_IMPORT', LYCHEE_UPLOADS . 'import/');
|
2014-04-18 10:59:14 +00:00
|
|
|
define('LYCHEE_PLUGINS', LYCHEE . 'plugins/');
|
2014-04-13 12:08:18 +00:00
|
|
|
|
|
|
|
# Define files
|
|
|
|
define('LYCHEE_CONFIG_FILE', LYCHEE_DATA . 'config.php');
|
|
|
|
|
2014-07-12 18:12:38 +00:00
|
|
|
# Define urls
|
|
|
|
define('LYCHEE_URL_UPLOADS_BIG', 'uploads/big/');
|
2014-10-11 14:09:10 +00:00
|
|
|
define('LYCHEE_URL_UPLOADS_MEDIUM', 'uploads/medium/');
|
|
|
|
define('LYCHEE_URL_UPLOADS_THUMB', 'uploads/thumb/');
|
2014-07-12 18:12:38 +00:00
|
|
|
|
2016-01-24 16:10:23 +00:00
|
|
|
function defineTablePrefix($dbTablePrefix = '') {
|
2014-08-29 21:07:54 +00:00
|
|
|
|
|
|
|
# This part is wrapped into a function, because it needs to be called
|
2016-01-19 10:57:16 +00:00
|
|
|
# after the config-file has been loaded. Other defines are available
|
2014-08-29 21:07:54 +00:00
|
|
|
# before the config-file has been loaded.
|
|
|
|
|
|
|
|
# Parse table prefix
|
|
|
|
# Old users do not have the table prefix stored in their config-file
|
2016-01-24 16:10:23 +00:00
|
|
|
if ($dbTablePrefix!=='') $dbTablePrefix .= '_';
|
2014-08-29 21:07:54 +00:00
|
|
|
|
|
|
|
# Define tables
|
|
|
|
define('LYCHEE_TABLE_ALBUMS', $dbTablePrefix . 'lychee_albums');
|
|
|
|
define('LYCHEE_TABLE_LOG', $dbTablePrefix . 'lychee_log');
|
|
|
|
define('LYCHEE_TABLE_PHOTOS', $dbTablePrefix . 'lychee_photos');
|
|
|
|
define('LYCHEE_TABLE_SETTINGS', $dbTablePrefix . 'lychee_settings');
|
|
|
|
|
|
|
|
}
|
2014-08-29 14:37:11 +00:00
|
|
|
|
2014-04-13 12:08:18 +00:00
|
|
|
?>
|