Example #1
0
 private static function gen_key($str)
 {
     if (self::$config == null) {
         self::$config = CONFIG::get('cache');
     }
     return md5($str . self::$config['seed']);
 }
Example #2
0
}
// if base url is not defined in config file
if (!defined("BASE_URL")) {
    define("BASE_URL", URL::get_base_url());
}
/* CONNECT TO DATABASE */
$db = new MYSQLI_DB(CONFIG_DATABASE_HOST, CONFIG_DATABASE_PORT, CONFIG_DATABASE_USERNAME, CONFIG_DATABASE_PASSWORD, CONFIG_DATABASE_DBNAME);
if (DEBUG_MODE == true) {
    $db->sql_debug = true;
    $db->sql_query_monitor = true;
}
if ($db->conn === false) {
    if (DEBUG_MODE == true) {
        die('Error initializing the database connection.');
    } else {
        die;
    }
}
/* INITIALIZATIONS */
URL::init();
USER::init();
LINKS::init(BASE_URL, ADMINISTRATOR_URL_PATH);
CONTENT::init();
DRAWLINE::init();
// set cache folder
CACHE::config("cache_folder", FOLDER_CACHE);
// remove $path variable
if (isset($path)) {
    $path = NULL;
    unset($path);
}