Documentation TYPO3 par Ameos |
00001 <?php 00002 /* $Id: decode_bug.php,v 2.1 2003/11/22 20:57:48 garvinhicking Exp $ */ 00003 // vim: expandtab sw=4 ts=4 sts=4 foldmarker={,} fdm=marker: 00004 00005 00019 ?> 00020 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 00021 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 00022 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US"> 00023 00024 <head> 00025 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 00026 <title>phpMyAdmin - Parser BUG decoder</title> 00027 <style type="text/css"> 00028 <!-- 00029 body, p { 00030 font-family: Arial, Helvetica, sans-serif; 00031 font-size: medium; 00032 } 00033 h1 { 00034 font-family: Verdana, Arial, Helvetica, sans-serif; 00035 font-size: large; 00036 font-weight: bold; 00037 color: #000066; 00038 } 00039 //--> 00040 </style> 00041 </head> 00042 00043 00044 <body bgcolor="#FFFFFF"> 00045 <h1>Parser BUG decoder</h1> 00046 <br /> 00047 00048 <form method="post" action="./decode_bug.php"> 00049 <input type="hidden" name="bar" value="<?php echo rand(); ?>" /> 00050 Encoded bug report:<br /> 00051 <textarea name="bug_encoded" cols="72" rows="10"></textarea> 00052 <br /><br /> 00053 <input type="submit" /> 00054 </form> 00055 <hr /> 00056 00057 <?php 00071 function PMA_printDecodedBug($textdata) 00072 { 00073 return '<pre>' . htmlspecialchars($textdata) . '</pre><br />'; 00074 } // end of the "PMA_printDecodedBug()" function 00075 00076 00077 if (!empty($_POST) && isset($_POST['bug_encoded'])) { 00078 $bug_encoded = $_POST['bug_encoded']; 00079 } 00080 00081 if (!empty($bug_encoded)) { 00082 if (get_magic_quotes_gpc()) { 00083 $bug_encoded = stripslashes($bug_encoded); 00084 } 00085 00086 $bug_encoded = ereg_replace('[[:space:]]', '', $bug_encoded); 00087 $bug_decoded = base64_decode($bug_encoded); 00088 if (substr($bug_encoded, 0, 2) == 'eN') { 00089 if (function_exists('gzuncompress')) { 00090 $result = PMA_printDecodedBug(gzuncompress($bug_decoded)); 00091 } else { 00092 $result = 'Error: "gzuncompress()" is unavailable!' . "\n"; 00093 } 00094 } 00095 else { 00096 $result = PMA_printDecodedBug($bug_decoded); 00097 } // end if... else... 00098 00099 echo '<p>Decoded:</p>' . "\n" 00100 . $result . "\n"; 00101 } // end if 00102 ?> 00103 </body> 00104 00105 </html>