Beispiel #1
0
function printNotes($request)
{
    $dir = BASE_PATH . $request;
    $uri = BASE_URI . $request;
    $html = '<div id="notes">';
    if (is_dir($dir)) {
        $html .= printDir($request);
        $html .= "</div>";
        return $html;
    } else {
        if (substr($request, -1) == '/') {
            $request = substr($request, 0, strlen($request) - 1);
        }
        if (file_exists(BASE_PATH . $request . TEXTENSION)) {
            $file = substr($request, strrpos($request, '/') + 1, strlen($request));
            $dir = substr($request, 0, strrpos($request, '/') + 1);
            $html .= printPost(BASE_PATH . $dir, $file . TEXTENSION, $uri);
            $html .= "</div>";
            return $html;
        }
    }
    return printErrorText();
}
Beispiel #2
0
        break;
    case 'dl':
        ob_clean();
        downloadFile($subject);
        break;
    case 'edit':
    case 'new':
        editFile($subject, $action == 'new');
        break;
    case 'rn':
        ob_clean();
        renameSubject($subject, $value);
        break;
    case 'save':
        ob_clean();
        saveFile($subject, $value);
        break;
    case 'eval':
        evalBox($value);
        break;
    case 'ul':
        uploadFile($subject);
        break;
    case 'dir':
        printDir($subject);
        break;
}
?>
</body>
</html>