Browse code

conflict file names fix

Jimako authored on 2023/09/07 15:38:37
Showing 1 changed files
... ...
@@ -97,7 +97,7 @@ else
97 97
 		$news->assign("newsdate", date("$dateformat $timeformat", $stories['date']));
98 98
 		$news->assign("oddeven", ($count % 2 ? "even" : "odd"));
99 99
 		if ($newscomments == "1")
100
-			$news->assign("newscomments", "<a href=\"news.php?action=newsstory&amp;nid=" . $stories['nid'] . "\">" . $stories['comments'] . " " . _COMMENTS . "</a>");
100
+			$news->assign("newscomments", "<a href=\"ffnews.php?action=newsstory&amp;nid=" . $stories['nid'] . "\">" . $stories['comments'] . " " . _COMMENTS . "</a>");
101 101
 		if (isADMIN)
102 102
 			$news->assign("adminoptions", "<a href=\"admin.php?action=news&amp;form=" . $stories['nid'] . "\">" . _EDIT . "</a> | <a href=\"admin.php?action=news&amp;delete=" . $stories['nid'] . "\">" . _DELETE . "</a>");
103 103
 		$count++;
Browse code

update

Jimako authored on 2023/09/07 15:28:52
Showing 1 changed files
... ...
@@ -23,76 +23,86 @@
23 23
 // To read the license please visit http://www.gnu.org/copyleft/gpl.html
24 24
 // ----------------------------------------------------------------------
25 25
 
26
-if(!defined("_CHARSET")) exit( );
27
-if(uLEVEL > 3) accessDenied();
28
-		$output .= "<div id=\"pagetitle\">"._NEWS."</div>";
29
-		if(isset($_POST['submit'])) {
30
-			$title = addslashes(strip_tags(descript($_POST['title']), $allowed_tags));
31
-			$author = addslashes(strip_tags(descript($_POST['author']), $allowed_tags));
32
-			$story = addslashes(strip_tags(descript($_POST['story']), $allowed_tags));
33
-			if($_GET['form'] == "new") $result = dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_news (title, author, story, time) VALUES ('$title', '$author', '$story', now())");
34
-			else $result = dbquery("UPDATE ".TABLEPREFIX."fanfiction_news SET title = '$title', author = '$author', story = '$story' WHERE nid = '$_POST[nid]'");
35
-			if($result) {
36
-				$output .= write_message(_ACTIONSUCCESSFUL);
37
-				unset($_GET['form']);
38
-			}
39
-			else $output .= write_error(_ERROR." ".TRYAGAIN);
26
+if (!defined("_CHARSET")) exit();
27
+if (uLEVEL > 3) accessDenied();
28
+$output .= "<div id=\"pagetitle\">" . _NEWS . "</div>";
29
+if (isset($_POST['submit']))
30
+{
31
+	$title = addslashes(strip_tags(descript($_POST['title']), $allowed_tags));
32
+	$author = addslashes(strip_tags(descript($_POST['author']), $allowed_tags));
33
+	$story = addslashes(strip_tags(descript($_POST['story']), $allowed_tags));
34
+	if ($_GET['form'] == "new") $result = dbquery("INSERT INTO " . TABLEPREFIX . "fanfiction_news (title, author, story, time) VALUES ('$title', '$author', '$story', now())");
35
+	else $result = dbquery("UPDATE " . TABLEPREFIX . "fanfiction_news SET title = '$title', author = '$author', story = '$story' WHERE nid = '$_POST[nid]'");
36
+	if ($result)
37
+	{
38
+		$output .= write_message(_ACTIONSUCCESSFUL);
39
+		unset($_GET['form']);
40
+	}
41
+	else $output .= write_error(_ERROR . " " . TRYAGAIN);
42
+}
43
+if (isset($_GET['delete']) && isNumber($_GET['delete']))
44
+{
45
+	if (isset($_GET['confirm']))
46
+	{
47
+		if ($_GET['confirm'] == "yes")
48
+		{
49
+			dbquery("DELETE FROM " . TABLEPREFIX . "fanfiction_news where nid = '" . $_GET['delete'] . "'");
50
+			$output .= write_message(_ACTIONSUCCESSFUL);
40 51
 		}
41
-		if(isset($_GET['delete']) && isNumber($_GET['delete'])) {
42
-			if($_GET['confirm'] == "yes") {
43
-				dbquery("DELETE FROM ".TABLEPREFIX."fanfiction_news where nid = '".$_GET['delete']."'");
44
-				$output .= write_message(_ACTIONSUCCESSFUL);
45
-			}
46
-			else if ($_GET['confirm'] == "no") $output .= write_message(_ACTIONCANCELLED);
47
-			else {
48
-			$output .= write_message(_CONFIRMDELETE."<br /><br />
49
-[ <a href=\"admin.php?action=news&confirm=yes&delete=$_GET[delete]\">"._YES."</a> | <a href=\"admin.php?action=news&confirm=no&delete=$_GET[delete]\">"._NO."</a> ]");
50
-			}
51
-		}
52
-		else if(isset($_GET["form"])) {
53
-			if($_GET["form"] != "new" && isNumber($_GET["form"])) {
54
-				$result = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_news WHERE nid = '".$_GET['form']."' LIMIT 1");
55
-				$newsitem = dbassoc($result);
56
-			}
57
-			else $newsitem = array("title" => "", "author" => "", "story" => "");
58
-			$output .= "<form method=\"POST\" enctype=\"multipart/form-data\" action=\"admin.php?action=news&form=$_GET[form]\">
59
-				<table align=\"center\"><tr><td colspan=\"2\" align=\"center\"><b>".($_GET["form"] == "new" ? _ADDNEWS : _EDITNEWS)."</b></td></tr>
60
-			<tr><td>"._AUTHOR.": </td><td><INPUT  type=\"text\" class=\"textbox=\" name=\"author\" value=\"".stripslashes($newsitem['author'])."\"></td></tr>
61
-			<tr><td>"._TITLE.": </td><td><INPUT  type=\"text\" class=\"textbox=\" name=\"title\" value=\"".stripslashes($newsitem['title'])."\"></td></tr>
62
-			<tr><td>"._TEXT.": </td><td><textarea class=\"textbox\" name=\"story\" id=\"story\" COLS=\"45\" ROWS=\"6\">".stripslashes($newsitem['story'])."</TEXTAREA>";
63
-			if($tinyMCE) 
64
-				$output .= "<div class='tinytoggle'><input type='checkbox' name='toggle' onclick=\"toogleEditorMode('story');\" checked><label for='toggle'>"._TINYMCETOGGLE."</label></div>";
52
+		else if ($_GET['confirm'] == "no") $output .= write_message(_ACTIONCANCELLED);
53
+	}
54
+	else
55
+	{
56
+		$output .= write_message(_CONFIRMDELETE . "<br /><br />
57
+	[ <a href=\"admin.php?action=news&confirm=yes&delete=$_GET[delete]\">" . _YES . "</a> | <a href=\"admin.php?action=news&confirm=no&delete=$_GET[delete]\">" . _NO . "</a> ]");
58
+	}
59
+}
60
+else if (isset($_GET["form"]))
61
+{
62
+	if ($_GET["form"] != "new" && isNumber($_GET["form"]))
63
+	{
64
+		$result = dbquery("SELECT * FROM " . TABLEPREFIX . "fanfiction_news WHERE nid = '" . $_GET['form'] . "' LIMIT 1");
65
+		$newsitem = dbassoc($result);
66
+	}
67
+	else $newsitem = array("title" => "", "author" => "", "story" => "");
68
+	$output .= "<form method=\"POST\" enctype=\"multipart/form-data\" action=\"admin.php?action=news&form=$_GET[form]\">
69
+				<table align=\"center\"><tr><td colspan=\"2\" align=\"center\"><b>" . ($_GET["form"] == "new" ? _ADDNEWS : _EDITNEWS) . "</b></td></tr>
70
+			<tr><td>" . _AUTHOR . ": </td><td><INPUT  type=\"text\" class=\"textbox=\" name=\"author\" value=\"" . stripslashes($newsitem['author']) . "\"></td></tr>
71
+			<tr><td>" . _TITLE . ": </td><td><INPUT  type=\"text\" class=\"textbox=\" name=\"title\" value=\"" . stripslashes($newsitem['title']) . "\"></td></tr>
72
+			<tr><td>" . _TEXT . ": </td><td><textarea class=\"textbox\" name=\"story\" id=\"story\" COLS=\"45\" ROWS=\"6\">" . stripslashes($newsitem['story']) . "</TEXTAREA>";
73
+	if ($tinyMCE)
74
+		$output .= "<div class='tinytoggle'><input type='checkbox' name='toggle' onclick=\"toogleEditorMode('story');\" checked><label for='toggle'>" . _TINYMCETOGGLE . "</label></div>";
65 75
 
66
-			$output .= "</td></tr><tr><td colspan=\"2\" align=\"center\">".($_GET["form"] != "new" ? "<INPUT type=\"hidden\" name=\"nid\" value=\"".$_GET['form']."\">" : "")."<INPUT type=\"submit\" class=\"button\" name=\"submit\" value=\""._SUBMIT."\"></td></tr></table></form>";
67
-		}
68
-		else {
69
-			$output .= "<p align=\"center\"><a href=\"admin.php?action=news&form=new\">"._ADDNEWS."</a></p>";
70
-			$count = dbquery("SELECT COUNT(nid) FROM ".TABLEPREFIX."fanfiction_news");
71
-			list($numrows)= dbrow($count);
72
-	
73
-			$result = dbquery("SELECT n.*, UNIX_TIMESTAMP(n.time) as date, count(c.cid) as comments FROM ".TABLEPREFIX."fanfiction_news as n LEFT JOIN ".TABLEPREFIX."fanfiction_comments as c ON  n.nid = c.nid GROUP BY n.nid ORDER BY time DESC LIMIT $offset, $itemsperpage");
74
-			if(file_exists("$skindir/newsbox.tpl")) $news = new TemplatePower( "$skindir/newsbox.tpl" );
75
-			else $news = new TemplatePower( "default_tpls/newsbox.tpl" );
76
-			$news->prepare();
77
-			$count = 0;
78
-			while($stories = dbassoc($result)) {
79
-				$news->newBlock("newsbox");
80
-		
81
-				//assign values
82
-				$news->assign("newstitle"   , $stories['title'] );
83
-				$news->assign("newsstory"   , $stories['story'] );
84
-				$news->assign("newsauthor", $stories['author'] );
85
-				$news->assign("newsdate", date("$dateformat $timeformat", $stories['date']) );
86
-				$news->assign("oddeven", ($count % 2 ? "even" : "odd"));
87
-				if($newscomments == "1")
88
-					$news->assign("newscomments", "<a href=\"ffnews.php?action=newsstory&amp;nid=".$stories['nid']."\">".$stories['comments']." "._COMMENTS."</a>");
89
-				if(isADMIN) 
90
-					$news->assign("adminoptions", "<a href=\"admin.php?action=news&amp;form=".$stories['nid']."\">"._EDIT."</a> | <a href=\"admin.php?action=news&amp;delete=".$stories['nid']."\">"._DELETE."</a>");
91
-				$count++;
92
-			}
93
-			$news->gotoBlock("_ROOT");
94
-			$output .= $news->getOutputContent( );
95
-			if($numrows > $itemsperpage) $output .= build_pagelinks("admin.php?action=news&amp;", $numrows, $offset);
96
-		}
76
+	$output .= "</td></tr><tr><td colspan=\"2\" align=\"center\">" . ($_GET["form"] != "new" ? "<INPUT type=\"hidden\" name=\"nid\" value=\"" . $_GET['form'] . "\">" : "") . "<INPUT type=\"submit\" class=\"button\" name=\"submit\" value=\"" . _SUBMIT . "\"></td></tr></table></form>";
77
+}
78
+else
79
+{
80
+	$output .= "<p align=\"center\"><a href=\"admin.php?action=news&form=new\">" . _ADDNEWS . "</a></p>";
81
+	$count = dbquery("SELECT COUNT(nid) FROM " . TABLEPREFIX . "fanfiction_news");
82
+	list($numrows) = dbrow($count);
83
+
84
+	$result = dbquery("SELECT n.*, n.time as date, count(c.cid) as comments FROM " . TABLEPREFIX . "fanfiction_news as n LEFT JOIN " . TABLEPREFIX . "fanfiction_comments as c ON  n.nid = c.nid GROUP BY n.nid ORDER BY time DESC LIMIT $offset, $itemsperpage");
85
+	if (file_exists("$skindir/newsbox.tpl")) $news = new TemplatePower("$skindir/newsbox.tpl");
86
+	else $news = new TemplatePower("default_tpls/newsbox.tpl");
87
+	$news->prepare();
88
+	$count = 0;
89
+	while ($stories = dbassoc($result))
90
+	{
91
+		$news->newBlock("newsbox");
97 92
 
98
-?>
99 93
\ No newline at end of file
94
+		//assign values
95
+		$news->assign("newstitle", $stories['title']);
96
+		$news->assign("newsstory", $stories['story']);
97
+		$news->assign("newsauthor", $stories['author']);
98
+		$news->assign("newsdate", date("$dateformat $timeformat", $stories['date']));
99
+		$news->assign("oddeven", ($count % 2 ? "even" : "odd"));
100
+		if ($newscomments == "1")
101
+			$news->assign("newscomments", "<a href=\"news.php?action=newsstory&amp;nid=" . $stories['nid'] . "\">" . $stories['comments'] . " " . _COMMENTS . "</a>");
102
+		if (isADMIN)
103
+			$news->assign("adminoptions", "<a href=\"admin.php?action=news&amp;form=" . $stories['nid'] . "\">" . _EDIT . "</a> | <a href=\"admin.php?action=news&amp;delete=" . $stories['nid'] . "\">" . _DELETE . "</a>");
104
+		$count++;
105
+	}
106
+	$news->gotoBlock("_ROOT");
107
+	$output .= $news->getOutputContent();
108
+	if ($numrows > $itemsperpage) $output .= build_pagelinks("admin.php?action=news&amp;", $numrows, $offset);
109
+}
Browse code

Moved docs to gitbook, added news back

Jimmi08 authored on 2021/08/26 05:24:22
Showing 1 changed files
... ...
@@ -85,7 +85,7 @@ if(uLEVEL > 3) accessDenied();
85 85
 				$news->assign("newsdate", date("$dateformat $timeformat", $stories['date']) );
86 86
 				$news->assign("oddeven", ($count % 2 ? "even" : "odd"));
87 87
 				if($newscomments == "1")
88
-					$news->assign("newscomments", "<a href=\"news.php?action=newsstory&amp;nid=".$stories['nid']."\">".$stories['comments']." "._COMMENTS."</a>");
88
+					$news->assign("newscomments", "<a href=\"ffnews.php?action=newsstory&amp;nid=".$stories['nid']."\">".$stories['comments']." "._COMMENTS."</a>");
89 89
 				if(isADMIN) 
90 90
 					$news->assign("adminoptions", "<a href=\"admin.php?action=news&amp;form=".$stories['nid']."\">"._EDIT."</a> | <a href=\"admin.php?action=news&amp;delete=".$stories['nid']."\">"._DELETE."</a>");
91 91
 				$count++;
Browse code

backup 3.52

Jimmi08 authored on 2021/04/02 11:08:04
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,98 @@
1
+<?php
2
+
3
+// ----------------------------------------------------------------------
4
+// eFiction 3.2
5
+// Copyright (c) 2007 by Tammy Keefer
6
+// Valid HTML 4.01 Transitional
7
+// Based on eFiction 1.1
8
+// Copyright (C) 2003 by Rebecca Smallwood.
9
+// http://efiction.sourceforge.net/
10
+// ----------------------------------------------------------------------
11
+// LICENSE
12
+//
13
+// This program is free software; you can redistribute it and/or
14
+// modify it under the terms of the GNU General Public License (GPL)
15
+// as published by the Free Software Foundation; either version 2
16
+// of the License, or (at your option) any later version.
17
+//
18
+// This program is distributed in the hope that it will be useful,
19
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
20
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
+// GNU General Public License for more details.
22
+//
23
+// To read the license please visit http://www.gnu.org/copyleft/gpl.html
24
+// ----------------------------------------------------------------------
25
+
26
+if(!defined("_CHARSET")) exit( );
27
+if(uLEVEL > 3) accessDenied();
28
+		$output .= "<div id=\"pagetitle\">"._NEWS."</div>";
29
+		if(isset($_POST['submit'])) {
30
+			$title = addslashes(strip_tags(descript($_POST['title']), $allowed_tags));
31
+			$author = addslashes(strip_tags(descript($_POST['author']), $allowed_tags));
32
+			$story = addslashes(strip_tags(descript($_POST['story']), $allowed_tags));
33
+			if($_GET['form'] == "new") $result = dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_news (title, author, story, time) VALUES ('$title', '$author', '$story', now())");
34
+			else $result = dbquery("UPDATE ".TABLEPREFIX."fanfiction_news SET title = '$title', author = '$author', story = '$story' WHERE nid = '$_POST[nid]'");
35
+			if($result) {
36
+				$output .= write_message(_ACTIONSUCCESSFUL);
37
+				unset($_GET['form']);
38
+			}
39
+			else $output .= write_error(_ERROR." ".TRYAGAIN);
40
+		}
41
+		if(isset($_GET['delete']) && isNumber($_GET['delete'])) {
42
+			if($_GET['confirm'] == "yes") {
43
+				dbquery("DELETE FROM ".TABLEPREFIX."fanfiction_news where nid = '".$_GET['delete']."'");
44
+				$output .= write_message(_ACTIONSUCCESSFUL);
45
+			}
46
+			else if ($_GET['confirm'] == "no") $output .= write_message(_ACTIONCANCELLED);
47
+			else {
48
+			$output .= write_message(_CONFIRMDELETE."<br /><br />
49
+[ <a href=\"admin.php?action=news&confirm=yes&delete=$_GET[delete]\">"._YES."</a> | <a href=\"admin.php?action=news&confirm=no&delete=$_GET[delete]\">"._NO."</a> ]");
50
+			}
51
+		}
52
+		else if(isset($_GET["form"])) {
53
+			if($_GET["form"] != "new" && isNumber($_GET["form"])) {
54
+				$result = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_news WHERE nid = '".$_GET['form']."' LIMIT 1");
55
+				$newsitem = dbassoc($result);
56
+			}
57
+			else $newsitem = array("title" => "", "author" => "", "story" => "");
58
+			$output .= "<form method=\"POST\" enctype=\"multipart/form-data\" action=\"admin.php?action=news&form=$_GET[form]\">
59
+				<table align=\"center\"><tr><td colspan=\"2\" align=\"center\"><b>".($_GET["form"] == "new" ? _ADDNEWS : _EDITNEWS)."</b></td></tr>
60
+			<tr><td>"._AUTHOR.": </td><td><INPUT  type=\"text\" class=\"textbox=\" name=\"author\" value=\"".stripslashes($newsitem['author'])."\"></td></tr>
61
+			<tr><td>"._TITLE.": </td><td><INPUT  type=\"text\" class=\"textbox=\" name=\"title\" value=\"".stripslashes($newsitem['title'])."\"></td></tr>
62
+			<tr><td>"._TEXT.": </td><td><textarea class=\"textbox\" name=\"story\" id=\"story\" COLS=\"45\" ROWS=\"6\">".stripslashes($newsitem['story'])."</TEXTAREA>";
63
+			if($tinyMCE) 
64
+				$output .= "<div class='tinytoggle'><input type='checkbox' name='toggle' onclick=\"toogleEditorMode('story');\" checked><label for='toggle'>"._TINYMCETOGGLE."</label></div>";
65
+
66
+			$output .= "</td></tr><tr><td colspan=\"2\" align=\"center\">".($_GET["form"] != "new" ? "<INPUT type=\"hidden\" name=\"nid\" value=\"".$_GET['form']."\">" : "")."<INPUT type=\"submit\" class=\"button\" name=\"submit\" value=\""._SUBMIT."\"></td></tr></table></form>";
67
+		}
68
+		else {
69
+			$output .= "<p align=\"center\"><a href=\"admin.php?action=news&form=new\">"._ADDNEWS."</a></p>";
70
+			$count = dbquery("SELECT COUNT(nid) FROM ".TABLEPREFIX."fanfiction_news");
71
+			list($numrows)= dbrow($count);
72
+	
73
+			$result = dbquery("SELECT n.*, UNIX_TIMESTAMP(n.time) as date, count(c.cid) as comments FROM ".TABLEPREFIX."fanfiction_news as n LEFT JOIN ".TABLEPREFIX."fanfiction_comments as c ON  n.nid = c.nid GROUP BY n.nid ORDER BY time DESC LIMIT $offset, $itemsperpage");
74
+			if(file_exists("$skindir/newsbox.tpl")) $news = new TemplatePower( "$skindir/newsbox.tpl" );
75
+			else $news = new TemplatePower( "default_tpls/newsbox.tpl" );
76
+			$news->prepare();
77
+			$count = 0;
78
+			while($stories = dbassoc($result)) {
79
+				$news->newBlock("newsbox");
80
+		
81
+				//assign values
82
+				$news->assign("newstitle"   , $stories['title'] );
83
+				$news->assign("newsstory"   , $stories['story'] );
84
+				$news->assign("newsauthor", $stories['author'] );
85
+				$news->assign("newsdate", date("$dateformat $timeformat", $stories['date']) );
86
+				$news->assign("oddeven", ($count % 2 ? "even" : "odd"));
87
+				if($newscomments == "1")
88
+					$news->assign("newscomments", "<a href=\"news.php?action=newsstory&amp;nid=".$stories['nid']."\">".$stories['comments']." "._COMMENTS."</a>");
89
+				if(isADMIN) 
90
+					$news->assign("adminoptions", "<a href=\"admin.php?action=news&amp;form=".$stories['nid']."\">"._EDIT."</a> | <a href=\"admin.php?action=news&amp;delete=".$stories['nid']."\">"._DELETE."</a>");
91
+				$count++;
92
+			}
93
+			$news->gotoBlock("_ROOT");
94
+			$output .= $news->getOutputContent( );
95
+			if($numrows > $itemsperpage) $output .= build_pagelinks("admin.php?action=news&amp;", $numrows, $offset);
96
+		}
97
+
98
+?>
0 99
\ No newline at end of file