diff --git a/htdocs/sql/scripts/decode_bug.php b/htdocs/sql/scripts/decode_bug.php new file mode 100755 --- /dev/null +++ b/htdocs/sql/scripts/decode_bug.php @@ -0,0 +1,105 @@ + + * + * @version $Id: decode_bug.php 10289 2007-04-16 13:32:45Z cybot_tm $ + * @package phpMyAdmin-debug + */ + +/** + * Displays the form + */ +?> + + + + + + + + phpMyAdmin - Parser BUG decoder + + + + + +

Parser BUG decoder

+
+ +
+ + Encoded bug report:
+ +

+ +
+
+ + decodes the bug report + */ + +/** + * Display the decoded bug report in ASCII format + * + * @param string the text data + * + * @return string the text enclosed by "
...
" tags + * + * @access public + */ +function PMA_printDecodedBug($textdata) +{ + return '
' . htmlspecialchars($textdata) . '

'; +} // end of the "PMA_printDecodedBug()" function + + +if (!empty($_POST) && isset($_POST['bug_encoded'])) { + $bug_encoded = $_POST['bug_encoded']; +} + +if (!empty($bug_encoded)) { + if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) { + $bug_encoded = stripslashes($bug_encoded); + } + + $bug_encoded = ereg_replace('[[:space:]]', '', $bug_encoded); + $bug_decoded = base64_decode($bug_encoded); + if (substr($bug_encoded, 0, 2) == 'eN') { + if (function_exists('gzuncompress')) { + $result = PMA_printDecodedBug(gzuncompress($bug_decoded)); + } else { + $result = 'Error: "gzuncompress()" is unavailable!' . "\n"; + } + } else { + $result = PMA_printDecodedBug($bug_decoded); + } // end if... else... + + echo '

Decoded:

' . "\n" + . $result . "\n"; +} // end if +?> + + +