$object_attribute_cache = array();
-function escapeString ($value, $do_db_escape = FALSE)
-{
- $ret = htmlspecialchars ($value, ENT_QUOTES, 'UTF-8');
- if ($do_db_escape)
- {
- global $dbxlink;
- $ret = substr ($dbxlink->quote ($ret), 1, -1);
- }
- return $ret;
-}
-
// Return detailed information about one rack row.
function getRackRowInfo ($rackrow_id)
{
return $ret;
}
-function dos2unix ($text)
-{
- return str_replace ("\r\n", "\n", $text);
-}
-
function unix2dos ($text)
{
return str_replace ("\n", "\r\n", $text);
if ($tmp != '' and ! preg_match ("/^\n+$/D", $tmp))
echo $tmp;
connectDB();
-
-// Magic quotes feature is deprecated, but just in case the local system
-// still has it activated, reverse its effect.
-if (function_exists ('get_magic_quotes_gpc') and get_magic_quotes_gpc())
- foreach ($_REQUEST as $key => $value)
- if (gettype ($value) == 'string')
- $_REQUEST[$key] = stripslashes ($value);
-
-// Escape any globals before we ever try to use them, but keep a copy of originals.
-$sic = array();
-foreach ($_REQUEST as $key => $value)
-{
- $sic[$key] = dos2unix ($value);
- if (gettype ($value) == 'string')
- $_REQUEST[$key] = escapeString (dos2unix ($value));
-}
-
-if (isset ($_SERVER['PHP_AUTH_USER']))
- $_SERVER['PHP_AUTH_USER'] = escapeString ($_SERVER['PHP_AUTH_USER']);
-if (isset ($_SERVER['REMOTE_USER']))
- $_SERVER['REMOTE_USER'] = escapeString ($_SERVER['REMOTE_USER']);
-
+transformRequestData();
loadConfigDefaults();
$tab['reports']['local'] = getConfigVar ('enterprise');
exit;
}
+function dos2unix ($text)
+{
+ return str_replace ("\r\n", "\n", $text);
+}
+
+function escapeString ($value, $do_db_escape = FALSE)
+{
+ $ret = htmlspecialchars ($value, ENT_QUOTES, 'UTF-8');
+ if ($do_db_escape)
+ {
+ global $dbxlink;
+ $ret = substr ($dbxlink->quote ($ret), 1, -1);
+ }
+ return $ret;
+}
+
+function transformRequestData()
+{
+ global $sic;
+ // Magic quotes feature is deprecated, but just in case the local system
+ // still has it activated, reverse its effect.
+ if (function_exists ('get_magic_quotes_gpc') and get_magic_quotes_gpc())
+ foreach ($_REQUEST as $key => $value)
+ if (gettype ($value) == 'string')
+ $_REQUEST[$key] = stripslashes ($value);
+ // Escape any globals before we ever try to use them, but keep a copy of originals.
+ $sic = array();
+ foreach ($_REQUEST as $key => $value)
+ {
+ $sic[$key] = dos2unix ($value);
+ if (gettype ($value) == 'string')
+ $_REQUEST[$key] = escapeString (dos2unix ($value));
+ }
+
+ if (isset ($_SERVER['PHP_AUTH_USER']))
+ $_SERVER['PHP_AUTH_USER'] = escapeString ($_SERVER['PHP_AUTH_USER']);
+ if (isset ($_SERVER['REMOTE_USER']))
+ $_SERVER['REMOTE_USER'] = escapeString ($_SERVER['REMOTE_USER']);
+}
+
?>