public function __construct($p_uri = 'SELF')
{
$this->m_config = CampConfig::singleton();
if (isset($p_uri) && $p_uri != 'SELF') {
$uriString = $p_uri;
} else {
// ... otherwise we build the uri from the server itself.
//
// checks whether the site is being queried through SSL
if (isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) != 'off') {
$scheme = 'https://';
} else {
$scheme = 'http://';
}
// this works at least for apache, some research is needed
// in order to support other web servers.
if (!empty($_SERVER['PHP_SELF'])) {
$uriString = $scheme . $_SERVER['HTTP_HOST'];
}
if (isset($_SERVER['REQUEST_URI'])) {
$uriString .= $_SERVER['REQUEST_URI'];
}
// some cleaning directives
$uriString = urldecode($uriString);
$uriString = str_replace('"', '"', $uriString);
$uriString = str_replace('<', '<', $uriString);
$uriString = str_replace('>', '>', $uriString);
$uriString = preg_replace('/eval\\((.*)\\)/', '', $uriString);
$uriString = preg_replace('/[\\\\"\\\'][\\s]*javascript:(.*)[\\\\"\\\']/', '""', $uriString);
}
$this->parse($uriString);
$this->m_queryArray = array_merge($this->m_queryArray, CampRequest::GetInput('POST'));
$this->readUser();
}