function show_vars($options_string = NULL) { if (!$GLOBALS['USE_DEBUGLIB']) { return; } $options = DbugL::parse_options($options_string, DbugL::$alt_parameter_names); $print_a_options = $options_string . ';return:1;'; $_SESSION = isset($_SESSION) ? $_SESSION : array(); $_COOKIE = isset($_COOKIE) ? $_COOKIE : array(); $superglobals = array('Script $GLOBALS' => DbugL::script_globals(), '$_GET' => $_GET, '$_POST' => $_POST, '$_FILES' => $_FILES, '$_SESSION' => $_SESSION, '$_COOKIE' => $_COOKIE); if (isset($options['verbose']) && $options['verbose'] == '1') { $superglobals['$_SERVER'] = $_SERVER; $superglobals['$_ENV'] = $_ENV; } $html = DbugL::html_prefix() . script_runtime('before show_vars', 'background:#BBB;', TRUE, TRUE); $html .= '<table class="DbugL_SG" cellpadding="0" cellspacing="0">'; foreach ($superglobals as $name => $reference) { if (empty($reference)) { continue; } $class_name = $name == 'Script $GLOBALS' ? 'globals' : strtolower(str_replace('$_', '', $name)); $html .= '<tr><td class="' . $class_name . '"><div class="DbugL_SG">' . $name . '</div>'; $html .= print_a($reference, $print_a_options); $html .= '</td></tr>'; } $html .= '</table>' . script_runtime('after show_vars', 'background:#BBB;', TRUE, TRUE); if (@$options['return'] == '1') { return $html; } else { print $html; } }