0 ? true:false; define('USE_SSL', $init_ssl); $init_url = $init_ssl ? "https://" : "http://"; if ($init_ssl && $_SERVER['PORT']!=443) { $init_port = $_SERVER['PORT']; } if (!$init_ssl && $_SERVER['PORT']!=80) { $init_port = $_SERVER['PORT']; } $init_url .= $_SERVER['HTTP_HOST']; if ($init_port) { $init_url .= ":" . $init_port; } if (defined('REL_DIR') && strlen(REL_DIR)) { $init_url .= '/' . REL_DIR; } define ('URL_ROOT', $init_url); } if (!defined('IMG_ROOT')) { define('IMG_ROOT', URL_ROOT . '/images'); } $DB = DBH::getInstance(); $DB_NAME = 'replex_crash'; $DB_USER = 'replex_crash'; $DB_PASS = 'replex_sekrit'; $DB_HOST = 'localhost'; if (!DBH::$db->connect($DB_NAME, $DB_HOST, $DB_USER, $DB_PASS)) { echo "System is down for mantainence. Please try again later."; die(); } // Google API settings set_include_path(get_include_path() . PATH_SEPARATOR . SITE_ROOT . '/lib'); require_once 'Google/Client.php'; $GoogleClientID = "get client id at google dev console"; $GoogleClientSecret = "secret from google dev console"; GoogleLogin::init($GoogleClientID, $GoogleClientSecret); // Options Option::init(); // Session if (!defined('NO_SESSION') && PHP_SAPI != "cli") { $S = new Session(); $S->check(); } /* Prevent XSS attacks via PHP_SELF */ $_SERVER['PHP_SELF'] = htmlspecialchars($_SERVER['PHP_SELF']); /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * End: * vim600: sw=4 ts=4 fdm=marker * vim<600: sw=4 ts=4 */ ?>