$user = substr($username, 0, $pos); $domain = substr($domain, 1, strlen($domain) - 1); if (file_exists('./protected/application_' . $domain . '.xml')) { $config_file = './protected/application_' . $domain . '.xml'; $session['application.xml'] = $config_file; $_REQUEST['ctl0$Main$username'] = $user; $_POST['ctl0$Main$username'] = $user; $_REQUEST['username'] = $user; $_GET['username'] = $user; } else { $_REQUEST['ctl0$Main$username'] = ""; $_POST['ctl0$Main$username'] = ""; $_REQUEST['username'] = ""; $_GET['username'] = ""; } } else { $_REQUEST['ctl0$Main$username'] = ""; $_POST['ctl0$Main$username'] = ""; $_REQUEST['username'] = ""; $_GET['username'] = ""; } } } if ($session['application.xml']) { $config_file = $session['application.xml']; } $session->close(); $app_conf->loadFromFile($config_file); $application->applyConfiguration($app_conf, true); $application->run(); }