/** * Load domain specific classes */ Lhp::Load(DOMAIN_PATH . "/classes"); /** * Load domain specific libraries */ Lhp::Load(DOMAIN_PATH . "/lib"); /** * Check domain specific configuration */ Lhp::CheckDomainConfig(); /** * Check to make sure we are on www */ if (LhpBrowser::getServerName() == DOMAIN) { LhpBrowser::redirectToUrl('http' . (LhpBrowser::isSecure() ? 's' : '') . '://www.' . DOMAIN . LhpBrowser::getRequestUri(), 301); } /** * Initiate LhpForm with filtered form data (true) * Set default form values */ $form = new LhpForm(true); /** * Initiate LhpCookie for use with current domain and all sub domains (ie '.domain.com') */ $cookie = new LhpCookie('.' . DOMAIN); /** * Initiate LhpMysql - To save resources, we connect to the mysql server * only when a query is executed, not on every request */