include_once txpath . '/lib/txplib_element.php'; include_once txpath . '/lib/txplib_class.php'; include_once txpath . '/lib/admin_config.php'; include_once txpath . '/lib/txplib_controller.php'; include_once txpath . '/lib/txplib_section.php'; $microstart = getmicrotime(); if ($DB->connected && $DB->table_exists(PFX . 'textpattern')) { $dbversion = safe_field('val', 'txp_prefs', "name = 'version'"); // global site prefs $prefs = get_prefs(); extract($prefs); if (empty($siteurl)) { $siteurl = $_SERVER['HTTP_HOST'] . rtrim(dirname(dirname($_SERVER['SCRIPT_NAME'])), '/'); } if (empty($path_to_site)) { updateSitePath(dirname(dirname(__FILE__))); } define("LANG", $language); //i18n: define("LANG","en-gb"); define('txp_version', $thisversion); if (!defined('PROTOCOL')) { switch (serverSet('HTTPS')) { case '': case 'off': // ISAPI with IIS define('PROTOCOL', 'http://'); break; default: define('PROTOCOL', 'https://'); break; }
* @since 4.6.0 */ define('SITE_HOST', (string) @parse_url(hu, PHP_URL_HOST)); } if (!defined('IMPATH')) { /** * Path to image directory. * * @package Image */ define('IMPATH', $path_to_site . DS . $img_dir . DS); } // 1.0: a new $here variable in the top-level index.php should let us know the // server path to the live site let's save it to prefs. if (isset($here) and $path_to_site != $here) { updateSitePath($here); } if (!defined('LANG')) { /** * Currently active language. * * @package L10n */ define('LANG', $language); } if (!empty($locale)) { setlocale(LC_ALL, $locale); } // Initialise the current user. $txp_user = null; // i18n.