1<?php 2 3if (!isset($_SERVER['HTTP_HOST'])) 4 die(); 5define('ZP_LAST_MODIFIED', gmdate('D, d M Y H:i:s') . ' GMT'); 6require_once(dirname(__FILE__) . '/version.php'); // Include the version info. 7if (!function_exists("gettext")) { 8 require_once(dirname(__FILE__) . '/lib-gettext/gettext.php'); 9} 10if (!defined('SORT_FLAG_CASE')) 11 define('SORT_FLAG_CASE', 0); 12if (!defined('SORT_NATURAL')) 13 define('SORT_NATURAL', 0); 14 15define('ZENFOLDER', 'zp-core'); 16define('PLUGIN_FOLDER', 'zp-extensions'); 17define('COMMON_FOLDER', PLUGIN_FOLDER . '/common'); 18define('USER_PLUGIN_FOLDER', 'plugins'); 19define('ALBUMFOLDER', 'albums'); 20define('THEMEFOLDER', 'themes'); 21define('BACKUPFOLDER', 'backup'); 22define('UTILITIES_FOLDER', 'utilities'); 23define('DATA_FOLDER', 'zp-data'); 24define('CACHEFOLDER', 'cache'); 25define('UPLOAD_FOLDER', 'uploaded'); 26define("STATIC_CACHE_FOLDER", "cache_html"); 27define('CONFIGFILE', 'zenphoto.cfg.php'); 28define('MUTEX_FOLDER', '.mutex'); 29 30//bit masks for plugin priorities 31define('CLASS_PLUGIN', 8192); 32define('ADMIN_PLUGIN', 4096); 33define('FEATURE_PLUGIN', 2048); 34define('THEME_PLUGIN', 1024); 35define('PLUGIN_PRIORITY', 1023); 36 37define('SYMLINK', function_exists('symlink') && strpos(@ini_get("suhosin.executor.func.blacklist"), 'symlink') === false); 38define('CASE_INSENSITIVE', file_exists(strtoupper(__FILE__))); 39 40define('TEST_RELEASE', preg_match('~-[^RC]~', ZENPHOTO_VERSION)); 41 42define('DEBUG_LOGIN', false); // set to true to log admin saves and login attempts 43define('DEBUG_ERROR', TEST_RELEASE); // set to true to supplies the calling sequence with zp_error messages 44define('DEBUG_IMAGE', false); // set to true to log image processing debug information. 45define('DEBUG_IMAGE_ERR', TEST_RELEASE); // set to true to flag image processing errors. 46define('DEBUG_404', TEST_RELEASE); // set to true to log 404 error processing debug information. 47define('DEBUG_EXIF', false); // set to true to log start/finish of exif processing. Useful to find problematic images. 48define('DEBUG_PLUGINS', false); // set to true to log plugin load sequence. 49define('DEBUG_FILTERS', false); // set to true to log filter application sequence. 50define('EXPLAIN_SELECTS', false); // set to true to log the "EXPLAIN" of SELECT queries in the debug log 51define('DEBUG_LOCALE', false); // used for examining language selection problems 52 53define('DB_NOT_CONNECTED', serialize(array('mysql_host' => gettext('not connected'), 'mysql_database' => gettext('not connected'), 'mysql_prefix' => gettext('not connected'), 'mysql_user' => '', 'mysql_pass' => '', 'mysql_port' => ''))); 54$_zp_DB_details = unserialize(DB_NOT_CONNECTED); 55?>