Browse code

3.5.6 efiction version

Jimako authored on 2024/03/09 16:09:42
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,47 @@
1
+<?php
2
+// ----------------------------------------------------------------------
3
+// eFiction 3.0
4
+// Copyright (c) 2007 by Tammy Keefer
5
+// Valid HTML 4.01 Transitional
6
+// Based on eFiction 1.1
7
+// Copyright (C) 2003 by Rebecca Smallwood.
8
+// http://efiction.sourceforge.net/
9
+// ----------------------------------------------------------------------
10
+// LICENSE
11
+//
12
+// This program is free software; you can redistribute it and/or
13
+// modify it under the terms of the GNU General Public License (GPL)
14
+// as published by the Free Software Foundation; either version 2
15
+// of the License, or (at your option) any later version.
16
+//
17
+// This program is distributed in the hope that it will be useful,
18
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20
+// GNU General Public License for more details.
21
+//
22
+// To read the license please visit http://www.gnu.org/copyleft/gpl.html
23
+// ----------------------------------------------------------------------
24
+
25
+if(!defined("_CHARSET")) exit( );
26
+	$output .= "<div id=\"pagetitle\">"._CENSOR."</div>";
27
+	if(isset($_POST['submit'])) {
28
+		if($_POST["words"]) {
29
+			$wordlist = explode(",", trim(strip_tags($_POST['words'])));
30
+			foreach($wordlist as $word) {
31
+				$word = trim($word);
32
+				if(strlen($word) > 0) $newwords[] = $word;
33
+			}
34
+		}
35
+		$result = dbquery("UPDATE ".$settingsprefix."fanfiction_settings SET words = '".(is_array($newwords) ? implode(", ", $newwords) : "")."' WHERE sitekey = '".SITEKEY."'");
36
+		if($result) $output .= write_message(_ACTIONSUCCESSFUL);
37
+		else $output .= write_error(_ERROR);
38
+	}
39
+	else {
40
+		if(is_array($words)) $wordlist = implode(", ", $words);
41
+		else $wordlist = "";
42
+		$output .= "<div style=\"text-align: center; margin: 1em; \">"._CENSORDIRS."</div>";
43
+		$output .= "<form method=\"POST\" enctype=\"multipart/form-data\" action=\"admin.php?action=censor\" style=\"width: 500px; margin: 0 auto;\">
44
+			<textarea name=\"words\" rows=\"7\" cols=\"60\">$wordlist</textarea><br /><INPUT type=\"submit\" class=\"button\" name=\"submit\" value=\""._SUBMIT."\"></form>";
45
+	}
46
+
47
+?>
0 48
\ No newline at end of file