Translated using Weblate (Turkish)
[phpmyadmin.git] / scripts / decode_bug.php
blob8ac7b799dba728b50ef5e87aeb370078a7725c88
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Parser bug report decoder
6 * This is the parser bug decoder system
7 * Throw the bug data in the query box, and hit submit for output.
9 * Copyright 2002 Robin Johnson <robbat2@users.sourceforge.net>
11 * @package PhpMyAdmin-debug
14 /**
15 * Displays the form
18 <!DOCTYPE HTML>
19 <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" dir="ltr">
21 <head>
22 <link rel="icon" href="favicon.ico" type="image/x-icon" />
23 <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
24 <meta charset="iso-8859-1" />
25 <title>phpMyAdmin - Parser bug report decoder</title>
26 <style type="text/css">
27 <!--
28 body, p {
29 font-family: Arial, Helvetica, sans-serif;
30 font-size: medium;
32 h1 {
33 font-family: Verdana, Arial, Helvetica, sans-serif;
34 font-size: large;
35 font-weight: bold;
36 color: #000066;
38 //-->
39 </style>
40 </head>
43 <body bgcolor="#FFFFFF">
44 <h1>Parser bug report decoder</h1>
45 <br />
47 <form method="post" action="./decode_bug.php">
48 <input type="hidden" name="bar" value="<?php echo rand(); ?>" />
49 Encoded bug report:<br />
50 <textarea name="bug_encoded" cols="72" rows="10"></textarea>
51 <br /><br />
52 <input type="submit" />
53 </form>
54 <hr />
56 <?php
57 /**
58 * If the form has been submitted -> decodes the bug report
61 /**
62 * Display the decoded bug report in ASCII format
64 * @param string the text data
66 * @return string the text enclosed by "<pre>...</pre>" tags
68 * @access public
70 function PMA_printDecodedBug($textdata)
72 return '<pre>' . htmlspecialchars($textdata) . '</pre><br />';
73 } // end of the "PMA_printDecodedBug()" function
76 if (!empty($_POST) && isset($_POST['bug_encoded'])) {
77 $bug_encoded = $_POST['bug_encoded'];
80 if (!empty($bug_encoded) && is_string($bug_encoded)) {
81 if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
82 $bug_encoded = stripslashes($bug_encoded);
85 $bug_encoded = preg_replace('/[[:space:]]/', '', $bug_encoded);
86 $bug_decoded = base64_decode($bug_encoded);
87 if (substr($bug_encoded, 0, 2) == 'eN') {
88 if (function_exists('gzuncompress')) {
89 $result = PMA_printDecodedBug(gzuncompress($bug_decoded));
90 } else {
91 $result = 'Error: &quot;gzuncompress()&quot; is unavailable!' . "\n";
93 } else {
94 $result = PMA_printDecodedBug($bug_decoded);
95 } // end if... else...
97 echo '<p>Decoded:</p>' . "\n"
98 . $result . "\n";
99 } // end if
101 </body>
103 </html>