anlegt define('LATEX_SERVICE', 'http://latex.codecogs.com/gif.latex?'); # define('LATEX_SERVICE', 'http://www.matheboard.de/latex2png/latex2png.php?'); function latex($treffer) { $x = $treffer[1]; return '[latex]'.htmlentities($x).'[/latex]'; } function startsWith($haystack,$needle,$case=true) { // http://stackoverflow.com/questions/834303/php-startswith-and-endswith-functions if($case){return (strcmp(substr($haystack, 0, strlen($needle)),$needle)===0);} return (strcasecmp(substr($haystack, 0, strlen($needle)),$needle)===0); } // ------------------------------------- if (!isset($_REQUEST["q"])) { header('HTTP/1.1 403 Forbidden'); echo ''; echo 'Forbidden'; echo '

Forbidden

'; echo '

You cannot access the engine directly.

'; echo ''; die(); } $file = $_REQUEST["q"]; if (strpos($file, '..')) die('Not permitted'); if (strpos($file, '/') === 0) die('Not permitted'); $content = file_get_contents($file); $magic1 = ''; $is_ma1 = (strpos($content, $magic1) !== false); if (!$is_ma1) { echo $content; exit; } preg_match('|

(.*)

|ismU', $content, $matches); if (isset($matches[1])) { $title = $matches[1]; } else { $title = 'Untitled'; } header('Content-Type: text/html'); ?> DMA Viewer - <?php echo $title; ?>
am anfang einfügen, wenn man nicht in ist etc. ??? $ary = explode("\n", $content); foreach ($ary as $x) { if ( (!startsWith(trim($x), ''; } echo $x."\n"; } ?>
DMA Viewer © 2010-2011 ViaThinkSoft

">Index