Пример #1
0
require_once 'classes/templates.php';
require_once 'classes/modules.php';
require_once 'classes/blocks.php';
require_once 'includes/db_info.php';
// Establishing database connection.
$db = new Databases();
switch ($db_type) {
    case 'mysql':
        $db->connect('mysql', $db_host, $db_user, $db_pass, $db_name, $db_prefix);
        break;
    case 'sqlite':
        $db->connect('sqlite', $db_path);
        break;
}
// Setting global variables
$settings = $db->fetch('settings');
$settings = $settings[0];
// Establishing languages.
$lang = new Languages();
// Establishing Smarty and templates.
$smarty = new Smarty();
$smarty->compile_dir = 'cache';
$smarty->assign('settings', $settings);
$tmpl = new Templates();
$smarty->assign('lang', $lang);
// Establishing modules
$module_dev = new Modules();
$smarty->assign('module_dev', $module_dev);
// Establishing blocks
$blocks = new Blocks();
$smarty->assign('blocks', $blocks);
Пример #2
0
require_once '../includes/db_info.php';
// Defines.
define('FOXY_VERSION', '0.11 alpha');
$time = time();
// Establishing database connection.
$db = new Databases();
switch ($db_type) {
    case 'mysql':
        $db->connect('mysql', $db_host, $db_user, $db_pass, $db_name, $db_prefix);
        break;
    case 'sqlite':
        $db->connect('sqlite', $db_path);
        break;
}
// Setting global variables
$settings = $db->fetch('settings');
$settings = $settings[0];
// Establishing languages.
$lang = new Languages();
// Establishing modules.
$module_dev = new Modules();
// Establishing users.
$users = new Users();
// Establishing Smarty and templates.
$smarty = new Smarty();
$smarty->template_dir = 'style';
$smarty->compile_dir = '../cache';
$tmpl = new Templates();
$tmpl->check();
$smarty->assign('settings', $settings);
$smarty->assign('lang', $lang);