20) {
//
$blacklistfile = fopen("blacklist", "r");
if(!$blacklistfile)
return;
while(!feof($blacklistfile)) {
$blacklist .= fread($blacklistfile, 1024);
}
$blacklistedwordfound = false;
foreach(explode("\n", $blacklist) as $blacklistedword) {
if(strlen($blacklistedword) > 0) {
if(preg_match("/$blacklistedword/", $TEXT)) {
$blacklistedwordfound = true;
}
}
}
if(!$blacklistedwordfound)
SaveFile($pagename, stripslashes($TEXT));
else {
mail($TO, "Blacklisted word von: " . $HTTP_SERVER_VARS{REMOTE_ADDR}, var_export($HTTP_POST_VARS, true) . var_export($HTTP_SERVER_VARS, true), "From: $FROM");
$ipblacklistfilehandle = fopen($IPBLACKLISTFILE, "a");
if($ipblacklistfilehandle) {
#fwrite($ipblacklistfile, $HTTP_SERVER_VARS{REMOTE_ADDR} . "\n");
fclose($ipblacklistfilehandle);
}
}
}
header(sprintf("Location: %s?pagename=%s", $PHP_SELF, $pagename));
exit;
} elseif($changelog) {
$topic = "LinVDR Changelog";
include("../top.php");
$difftime = time() - (86400 * 7);
$d = opendir($PAGEDIRECTORY);
$files = array();
while($file = readdir($d)) {
if($file != "." && $file != "..") {
array_push($files, $file);
}
}
closedir($d);
foreach($files as $file) {
if(is_link($PAGEDIRECTORY . $file)) {
$revisions = Revisions($files, $file);
$history = array();
array_push($history, sprintf("%s
", $PHP_SELF, $file, $file));
for($i = 0; $i < count($revisions); $i++) {
$revision = $revisions[$i];
if(preg_match("/\:(\d+)$/", $revision, $match) && $match[1] > $difftime) {
if(count($revisions) > 1) {
preg_match("/\:(\d+)$/", $revisions[$i+1], $match2); #XXX
array_push($history, sprintf("%s
", $PHP_SELF, $file, $match[1], $match2[1], strftime("%d.%m.%Y %H:%M:%S", $match[1])));
} else {
array_push($history, strftime("%d.%m.%Y %H:%M:%S
", $match[1]));
}
}
}
if(count($history) > 1) {
foreach($history as $line) {
print($line);
}
print("
");
}
}
}
include("../bottom.php");
} elseif($diff) {
$topic = "LinVDR Diff";
include("../top.php");
print("");
if($pure) {
print(nl2br(htmlspecialchars(Diff($pagename, $version1, $version2))));
} else {
print(nl2br(Diff2($pagename, $version1, $version2)));
}
print("
");
include("../bottom.php");
} else {
$topic = "LinVDR $pagename";
include("../top.php");
OpenFile($pagename);
if($text) {
print($text);
?>
Zuletzt geƤndert am 01.01.1970 00:00 ">edit