/* * bootstrap the application */ require_once 'boot.php'; if (file_exists('.htsite.php')) { include '.htsite.php'; } // our global App object $a = new miniApp(); App::init(); /* * Load the configuration file which contains our DB credentials. * Ignore errors. If the file doesn't exist or is empty, we are running in * installation mode. */ App::$install = file_exists('.htconfig.php') && filesize('.htconfig.php') ? false : true; @(include '.htconfig.php'); if (!defined('UNO')) { define('UNO', 0); } $a->convert(); App::$timezone = x($default_timezone) ? $default_timezone : 'UTC'; date_default_timezone_set(App::$timezone); /* * Try to open the database; */ require_once 'include/dba/dba_driver.php'; if (!App::$install) { $db = dba_factory($db_host, $db_port, $db_user, $db_pass, $db_data, $db_type, App::$install); if (!$db->connected) { system_unavailable();
function sys_boot() { // our central App object App::init(); /* * Load the configuration file which contains our DB credentials. * Ignore errors. If the file doesn't exist or is empty, we are running in * installation mode. */ // miniApp is a conversion object from old style .htconfig.php files $a = new miniApp(); App::$install = file_exists('.htconfig.php') && filesize('.htconfig.php') ? false : true; @(include '.htconfig.php'); if (!defined('UNO')) { define('UNO', 0); } if (array_key_exists('default_timezone', get_defined_vars())) { App::$config['system']['timezone'] = $default_timezone; } $a->convert(); App::$timezone = App::$config['system']['timezone'] ? App::$config['system']['timezone'] : 'UTC'; date_default_timezone_set(App::$timezone); /* * Try to open the database; */ require_once 'include/dba/dba_driver.php'; if (!App::$install) { DBA::dba_factory($db_host, $db_port, $db_user, $db_pass, $db_data, $db_type, App::$install); if (!DBA::$dba->connected) { system_unavailable(); } unset($db_host, $db_port, $db_user, $db_pass, $db_data, $db_type); /** * Load configs from db. Overwrite configs from .htconfig.php */ load_config('config'); load_config('system'); load_config('feature'); App::$session = new Zotlabs\Web\Session(); App::$session->init(); load_hooks(); call_hooks('init_1'); } }
//use Retargeting\Lib\App; $app = new App(Config(), $_GET); ?> <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Retargeting</title> <link rel="stylesheet" type="text/css" href="css/authCallback.css"> <link href='//fonts.googleapis.com/css?family=Lato:300,400,700,900,300italic' rel='stylesheet' type='text/css'> </head> <body> <?php if ($app->install()) { // redirect to configuration page ?> <section> <img src="imgs/logo-big.jpg"> <h1>Thank you!</h1> <h2>The application has been succesfully installed.</h2> </section> <?php } else { // let bigcommerce handle it OR do something about the failed installation ?> <section> <img src="imgs/logo-big.jpg"> <h1>Something went wrong..</h1> <h2><a href="https://retargeting.biz">Please contact us for support!</a></h2>