Пример #1
0
 public function errorHandler($errno, $errstr, $errfile, $errline)
 {
     $errString = array_key_exists($errno, $this->errorConstants) ? $this->errorConstants[$errno] : $errno;
     //echo 'HYPPO ' . $errString.': '.$errstr;
     //error_log($errString.' ['.$errno.']: '.$errstr.' in '.$errfile.' on line '.$errline);
     $d = file($errfile);
     $a = "<?php\n\n";
     for ($i = $errline - 10; $i < $errline + 10; $i++) {
         $a .= $i . ')' . $d[$i];
     }
     echo xhtml_highlight($a . "\n?>");
     exit;
 }
}
</script>
</head>
<body>
<?php 
    // Logo image is handled
    if (isset($useimage) && $useimage != "none" && $useimage != "") {
        if ($logo = @getimagesize($useimage)) {
            echo "<img id=\"logo\" src=\"{$useimage}\" {$logo[3]} alt=\"\" />";
        }
    }
    if ($action == "showsource") {
        echo "<h1>" . printMsg("headlineShowSource", "{$dir}/{$_GET["file"]}") . " <a href=\"{$self}{$reloadlink}\" class=\"small\">" . printMsg("linkBack") . "</a></h1>";
        if (file_exists("{$dir}/{$_GET["file"]}")) {
            if (checkForSource(getExt($_GET["file"])) == 1) {
                echo xhtml_highlight("{$dir}/{$_GET["file"]}");
            } else {
                echo "<p class=\"error\">" . printMsg("err") . printMsg("errNoShow") . "</p>";
            }
        } else {
            echo "<p class=\"error\">" . printMsg("err") . printMsg("errNoFile") . "</p>";
        }
    } elseif ($action == "edit") {
        $editfile = "{$dir}/{$_GET["file"]}";
        echo "<h1>" . printMsg("headlineEdit", $editfile) . " <a href=\"{$self}{$reloadlink}\" class=\"small\">" . printMsg("linkBack") . "</a></h1>";
        if (checkForEdit(getExt($editfile)) == 1) {
            if (file_exists($editfile) && is_writeable($editfile)) {
                $filecontent = implode("", file("{$dir}/{$_GET["file"]}"));
                $filecontent = htmlentities($filecontent);
                if ($converttabs == TRUE) {
                    $filecontent = str_replace("\t", "    ", $filecontent);