'perl', 'php' => 'php', 'c' => 'c', 'cpp' => 'c', 'css' => 'css', 'java' => 'java', 'xml' => 'xml', 'rb' => 'ruby' ); include("../inc/geshi/geshi.php"); $file = str_replace('../', '', $_REQUEST['file']); if (!$file) $file = "highlight.php"; preg_match("/\.(.+)$/", $file, $matches); $lang = $LANGUAGE_SHEET[$matches[1]]; if (!$lang) $lang = $matches[1]; if (!$lang) $lang = "php"; if (!file_exists($file)) { header("Location: $BASEDIR"); return; } elseif ($_SERVER['QUERY_STRING'] == "download") { header("Content-type: text/plain"); echo file_get_contents($file); return; } $geshi = new GeSHi(file_get_contents($file), $lang, "../inc/geshi/geshi"); $geshi->enable_classes(); //$geshi->enable_line_numbers(GESHI_FANCY_LINE_NUMBERS); ?> Viewing script file: <?=$file?>

Viewing file: | Back to directory listing
Author: Loren Segal | Last modified: | Download

parse_code();?>