示例#1
0
    echo $label;
    ?>
 (dec: <?php 
    echo $x;
    ?>
) <?php 
    echo $nbytes;
    ?>
 bytes - compressed info: <?php 
    echo $y;
    ?>
				</h4>
			</div>
			<div class="modal-body">
<?php 
    $bytes = Binary::readBinaryBytesAtOffset($vars["binary"], $x, $nbytes);
    $mode = Common::getString("mode");
    if ($mode != "hex" && $mode != "ascii") {
        $mode = "ascii";
    }
    print "<pre>";
    if ($mode == "hex") {
        $html = "<div style='font-size:10pt'>" . Binary::hexDump($bytes) . "</div>";
    } else {
        $bytes = preg_replace("/[\r\n]/", " ", $bytes);
        $html = htmlentities($bytes, ENT_DISALLOWED, "iso-8859-1");
        $html = preg_replace("/&#xFFFD;/", " ", $html);
    }
    print $html;
    print "</pre>";
    ?>