Example #1
0
//Path to XLS converter
if (!defined('XLSCSV')) {
    define("XLSCSV", APP . 'converter' . DS . 'xls2csv.exe');
}
//Path to PPT converter
if (!defined('CATPPT')) {
    define("CATPPT", APP . 'converter' . DS . 'catppt.exe');
}
// Temporary directory, this should be readable and writable
if (!defined('TMP_DIR')) {
    define('TMP_DIR', APP . 'admin' . DS . 'tmp');
}
//Log directory, this should be readable and writable
if (!defined('LOG_DIR')) {
    define('LOG_DIR', APP . 'admin' . DS . 'log');
}
// Sitemap directory, this should be readable and writable
if (!defined('SMAP_DIR')) {
    define('SMAP_DIR', APP . 'admin' . DS . 'sitemaps');
}
require_once APP . 'include' . DS . 'class.Database.php';
require_once APP . 'include' . DS . 'class.Configure.php';
if (!defined('DB_NOSTART')) {
    $db = new DATABASE();
    Configure::build();
}
/* WEB-based Paths*/
if (!defined('WEBROOT_DIR')) {
    define('WEBROOT_DIR', DS . basename(dirname(dirname(__FILE__))));
}
define('TEMPLATE_DIR', WEBROOT_DIR . '/templates/' . Configure::read('template') . '/');