$xmpp_host = str_replace(".", "_", XMPP_HOST); } } else { unset($_POST['inpLogin']); unset($_POST['inpPass']); // Try to recreate db object... if ($_GET['act'] === "logout") { if ($sess->get('vhost') != "") { $xmpp_host = str_replace(".", "_", $sess->get('vhost')); } } } } // create db_manager object $db = new db_manager(MYSQL_HOST, MYSQL_NAME, MYSQL_USER, MYSQL_PASS, "mysql", "{$xmpp_host}"); $db->set_debug(SQL_DEBUG); // create encryption object $enc = new url_crypt(ENC_KEY); // username (token) define(TOKEN, $sess->get('uid_l')); //debug debug(DEBUG, "User session:" . TOKEN); // authentication checks. Ensure if session data is not altered... (only when we are inside Jorge) if (!preg_match("/index.php/i", $location)) { if (check_registered_user($sess, $ejabberd_rpc, $enc) !== true) { header("Location: index.php?act=logout"); exit; } // Load language file based on current session debug(DEBUG, "Selecting initial language after authentication"); if ($sess->get('language')) {