Browse code

removed contact and news

Jimmi08 authored on 2021/04/05 12:09:45
Showing 3 changed files
... ...
@@ -2,10 +2,11 @@
2 2
 
3 3
 IN DEVELOPMENT Still standalone efiction version but without conflicts with e107
4 4
 
5
-This is just backup a notes...
5
+This is just backup and notes...
6
+THIS REPO contains files before changing efiction code itself. Main reason is for it is to have be able to start from beginning if integration ends badly. 
6 7
 
7 8
 
8
-## Database 
9
+## Database changes 
9 10
 *None*
10 11
 
11 12
 Use the same prefix.
... ...
@@ -40,13 +41,15 @@ rename to searching.php for efiction
40 41
 
41 42
 ### news.php
42 43
 
44
+removed
45
+
43 46
 ### index.php
44 47
 e107 has to be used
45 48
 - added recent menu to e107 menus
46 49
 
47 50
 ### contact.php
48 51
 
49
-
52
+removed
50 53
 
51 54
 Just notes: 
52 55
 
53 56
deleted file mode 100644
... ...
@@ -1,65 +0,0 @@
1
-<?php
2
-// ----------------------------------------------------------------------
3
-// Copyright (c) 2007 by Tammy Keefer
4
-// Valid HTML 4.01 Transitional
5
-// Based on eFiction 1.1
6
-// Copyright (C) 2003 by Rebecca Smallwood.
7
-// http://efiction.sourceforge.net/
8
-// ----------------------------------------------------------------------
9
-// LICENSE
10
-//
11
-// This program is free software; you can redistribute it and/or
12
-// modify it under the terms of the GNU General Public License (GPL)
13
-// as published by the Free Software Foundation; either version 2
14
-// of the License, or (at your option) any later version.
15
-//
16
-// This program is distributed in the hope that it will be useful,
17
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
18
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
-// GNU General Public License for more details.
20
-//
21
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html
22
-// ----------------------------------------------------------------------
23
-
24
-$current = "contactus";
25
-
26
-include ("header.php");
27
-
28
-	//make a new TemplatePower object
29
-if(file_exists("$skindir/default.tpl")) $tpl = new TemplatePower( "$skindir/default.tpl" );
30
-else $tpl = new TemplatePower("default_tpls/default.tpl");
31
-$tpl->assignInclude( "header", "./$skindir/header.tpl" );
32
-$tpl->assignInclude( "footer", "./$skindir/footer.tpl" );
33
-include("includes/pagesetup.php");
34
-
35
-	$output .= "<h1>"._CONTACTUS."</h1>";
36
-
37
-	if(isset($_POST['submit'])) {
38
-		if($captcha && !isMEMBER && !captcha_confirm()) $output .= write_error(_CAPTCHAFAIL);
39
-		else {
40
-			include("includes/emailer.php");
41
-			$result = sendemail($sitename, $siteemail, $_POST['email'], $_POST['email'], (!empty($_POST['reportpage']) ? _REPORT.": " : "").descript(strip_tags($_POST['subject'])), format_story(descript($_POST['comments'])).(!empty($_POST['reportpage']) ? "<br /><br /><a href='$url/".$_POST['reportpage']."'>$url/".$_POST['reportpage']."</a>" : "").(isMEMBER ? sprintf(_SITESIG2, "<a href='".$url."/viewuser.php?uid=".USERUID."'>".USERPENNAME."</a>") : _SITESIG), "html");
42
-			if($result) $output .= write_message(_EMAILSENT);
43
-			else $output .= write_error(_EMAILFAILED);
44
-		}
45
-	}
46
-	else
47
-	{
48
-		$output .= "<form method='POST' enctype='multipart/form-data' action='contact.php'>
49
-		<table class='acp'><tr><td><label for='email'>"._YOUREMAIL.":</label></td><td><INPUT type='text' class='textbox' name='email'></td></tr>";
50
-		if(!$action) $output .= "<tr><td><label for='subject'>"._SUBJECT.":</label></td><td><INPUT  type='text' class='textbox' name='subject'></td></tr>";
51
-		else if($action == "report") $output .= "<tr><td><label for='subject'>"._REPORT.":</label></td><td><select class='textbox' name='subject'>
52
-			<option>"._RULESVIOLATION."</option>
53
-			<option>"._BUGREPORT."</option>
54
-			<option>"._MISSING."</option>
55
-		</select>
56
-		<input type='hidden' name='reportpage' value='".descript($_GET['url'])."'></td></tr>";
57
-		$output .= "<tr><td><label for='comments'>"._COMMENTS.":</label></td><td> <TEXTAREA  class='textbox' name='comments' cols='50' rows='6'></TEXTAREA></td></tr>";
58
-		if(!USERUID && !empty($captcha)) $output .= "<tr><td><span class='label'>"._CAPTCHANOTE."</span></td><td><img width=120 height=30 src='"._BASEDIR."includes/button.php' alt='CAPTCHA image'><br /><br /><input MAXLENGTH=5 SIZE=5 name='userdigit' type='text' value=''></td></tr>";
59
-		$output .= "<tr><td colspan='2'><div style='text-align: center;'><INPUT name='submit' class='button' type='submit' value='"._SUBMIT."'></td></tr></table></form>";
60
-	}
61
-
62
-	$tpl->assign( "output", $output );	
63
-	$tpl->printToScreen();
64
-	dbclose( );
65
-	?>
66 0
\ No newline at end of file
67 1
deleted file mode 100644
... ...
@@ -1,152 +0,0 @@
1
-<?php
2
-// ----------------------------------------------------------------------
3
-// Copyright (c) 2007 by Tammy Keefer
4
-// Based on eFiction 1.1
5
-// Copyright (C) 2003 by Rebecca Smallwood.
6
-// http://efiction.sourceforge.net/
7
-// ----------------------------------------------------------------------
8
-// LICENSE
9
-//
10
-// This program is free software; you can redistribute it and/or
11
-// modify it under the terms of the GNU General Public License (GPL)
12
-// as published by the Free Software Foundation; either version 2
13
-// of the License, or (at your option) any later version.
14
-//
15
-// This program is distributed in the hope that it will be useful,
16
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
17
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
-// GNU General Public License for more details.
19
-//
20
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html
21
-// ----------------------------------------------------------------------
22
-
23
-$current = "news";
24
-
25
-include ("header.php");
26
-
27
-if(file_exists("$skindir/default.tpl")) $tpl = new TemplatePower( "$skindir/default.tpl" );
28
-else $tpl = new TemplatePower("default_tpls/default.tpl");
29
-
30
-include("includes/pagesetup.php");
31
-
32
-
33
-if(isset($_REQUEST['nid'])) $nid = $_REQUEST['nid'];
34
-if(!isset($nid) || !isNumber($nid)) $nid = false;
35
-$cid = isset($_REQUEST['cid']) && isNumber($_REQUEST['cid']) ? $_REQUEST['cid'] : false;
36
-
37
-if($nid) {
38
-
39
-	$output .= "<div id=\"pagetitle\">"._NEWS."</div>";
40
-	if(isset($_POST['submit']))
41
-	{
42
-		$comment = escapestring(format_story(replace_naughty(strip_tags($_POST['comment'], $allowed_tags))));
43
-		if(!$cid && USERUID) {
44
-			$insert = dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_comments (nid, uid, comment, time) VALUES ('$nid', '".(USERUID ? USERUID : 0)."', '$comment', now())");
45
-			if($insert) dbquery("UPDATE ".TABLEPREFIX."fanfiction_news SET comments = comments + 1 WHERE nid = '$nid' LIMIT 1");
46
-		}
47
-		else if($cid) {
48
-			dbquery("UPDATE ".TABLEPREFIX."fanfiction_comments SET comment = '$comment' WHERE cid = '$cid'");
49
-		}
50
-		unset($comment);
51
-	}
52
-	if(isset($_GET['del']) && isADMIN && uLEVEL < 4 && !empty($cid)) {
53
-		$insert = dbquery("DELETE FROM ".TABLEPREFIX."fanfiction_comments WHERE cid = '$cid'");
54
-		if($insert) dbquery("UPDATE ".TABLEPREFIX."fanfiction_news SET comments = comments - 1 WHERE nid = '$nid' LIMIT 1");
55
-	}
56
-	$newsquery = dbquery("SELECT n.*, UNIX_TIMESTAMP(n.time) as date FROM ".TABLEPREFIX."fanfiction_news as n WHERE n.nid = '$nid' LIMIT 1");
57
-	$stories = dbassoc($newsquery);
58
-	if(file_exists("./$skindir/newsbox.tpl"))
59
-		$news = new TemplatePower( "./$skindir/newsbox.tpl" );
60
-	else $news = new TemplatePower( "./default_tpls/newsbox.tpl" );
61
-	$news->prepare( );	
62
-	//create a new number_row block
63
-	$news->newBlock("newsbox");
64
-
65
-	//assign values
66
-	$news->assign("newstitle"   , stripslashes($stories['title']) );
67
-	$news->assign("newsstory"   , format_story($stories['story']) );
68
-	$news->assign("newsauthor", stripslashes($stories['author']) );
69
-	$news->assign("newsid", $stories['nid']);
70
-	$news->assign("oddeven", "odd");
71
-	$news->assign("skindir", $skindir);
72
-	$news->assign("newsdate", date("$dateformat $timeformat", $stories['date']) );
73
-	if($newscomments)
74
-		$news->assign("newscomments", "<a href=\"news.php?action=newsstory&amp;nid=".$stories['nid']."\">".$stories['comments']." "._COMMENTS."</a>");
75
-	if(isADMIN && uLEVEL < 4) 
76
-		$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>");
77
-	$output .= $news->getOutputContent( );
78
-
79
-	$cquery = dbquery("SELECT COUNT(cid) FROM ".TABLEPREFIX."fanfiction_comments WHERE nid = '$nid'");
80
-	list($ccount) = dbrow($cquery);
81
-	if($ccount) {
82
-		$query2 = dbquery("SELECT c.*, "._PENNAMEFIELD." as penname, UNIX_TIMESTAMP(c.time) as date FROM ".TABLEPREFIX."fanfiction_comments as c LEFT JOIN "._AUTHORTABLE." ON c.uid = "._UIDFIELD." WHERE c.nid = '$nid' ORDER BY time LIMIT $offset, $itemsperpage");
83
-		$output .= "<div class=\"sectionheader\">"._COMMENTS."</div>";
84
-		if(file_exists("$skindir/comments.tpl")) $c = new TemplatePower( "$skindir/comments.tpl" );
85
-		else $c = new TemplatePower( "default_tpls/comments.tpl" );
86
-		$c->prepare( );
87
-		$count = 0;
88
-		while($comments = dbassoc($query2)) {
89
-			$c->newBlock("commentbox");
90
-			$c->assign("comment", format_story($comments['comment']));
91
-			$c->assign("uname", $comments['penname']);
92
-			$c->assign("date", date("$dateformat $timeformat", $comments['date']));
93
-			if(isADMIN && uLEVEL < 4)
94
-				$c->assign("adminoptions", "<div class='adminoptions'><span class='label'>"._ADMINOPTIONS.":</span> [<a href=\"news.php?action=newsstory&amp;edit=".$comments['cid']."&amp;nid=$nid\">"._EDIT."</a>] [<a href=\"news.php?action=newsstory&amp;cid=".$comments['cid']."&amp;del=1&amp;nid=$nid\">"._DELETE."</a>]</div>");
95
-			$c->assign("oddeven", ($count % 2 ? "odd" : "even"));
96
-			$count++;
97
-		}
98
-		$output .= $c->getOutputContent( );
99
-		if($ccount > $itemsperpage) $output .= build_pagelinks("news.php?nid=$nid&amp;", $ccount, $offset);
100
-	}
101
-	if(isMEMBER) {
102
-		$output .= "<form method=\"POST\" enctype=\"multipart/form-data\" action=\"news.php?action=newsstory&amp;nid=$nid\">";
103
-		if(isset($_GET['edit']) && isNumber($_GET['edit'])) {
104
-			
105
-			$select = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_comments WHERE cid = '".$_GET['edit']."' LIMIT 1");
106
-			list($cid, $nid, $uname, $comment, $time) = dbrow($select);
107
-			$output .= "<input type=\"hidden\" name=\"cid\" value=\"$cid\">";
108
-		}
109
-		else $comment = "";
110
-		$output .= "<table align=\"center\"><tr><td><strong>"._PENNAME.":</strong></td><td>".USERPENNAME."<INPUT type=\"hidden\" name=\"uname\" value=\"".USERPENNAME."\"></td></tr>
111
-		<tr><td><b>"._COMMENTS.":</b></td><td><TEXTAREA name=\"comment\" cols=\"35\" rows=\"6\">$comment</TEXTAREA></td></tr>
112
-		<tr><td><INPUT type=\"hidden\" name=\"nid\" value=\"$nid\"><INPUT name=\"submit\" id=\"submit\" type=\"submit\" value=\""._SUBMIT."\"></td></tr></table></form>";
113
-	}
114
-	$tpl->assign("output", $output);
115
-}
116
-else {
117
-	$output .= "<div id=\"pagetitle\">"._NEWS."</div>";
118
-	if(file_exists("./$skindir/newsbox.tpl"))
119
-		$news = new TemplatePower( "./$skindir/newsbox.tpl" );
120
-	else $news = new TemplatePower( "./default_tpls/newsbox.tpl" );
121
-	$news->prepare( );
122
-	$cquery = dbquery("SELECT count(nid) FROM ".TABLEPREFIX."fanfiction_news");
123
-	list($count) = dbrow($cquery);
124
-	$newsquery = dbquery("SELECT n.*, UNIX_TIMESTAMP(n.time) as date FROM ".TABLEPREFIX."fanfiction_news as n ORDER BY n.time DESC LIMIT $offset, $itemsperpage");
125
-	$counter = 0;
126
-	while($stories = dbassoc($newsquery)) {
127
-
128
-		//create a new number_row block
129
-		$news->newBlock("newsbox");
130
-		
131
-		//assign values
132
-		$news->assign("newstitle"   , $stories['title']);
133
-		$news->assign("newsstory"   , nl2br($stories['story']) );
134
-		$news->assign("newsauthor", $stories['author']);
135
-		$news->assign("newsdate", date("$dateformat $timeformat", $stories['date']) );
136
-		$news->assign("newsid", $stories['nid']);
137
-		$news->assign("skindir", $skindir);
138
-		if($newscomments)
139
-			$news->assign("newscomments", "<a href=\"news.php?action=newsstory&amp;nid=".$stories['nid']."\">".$stories['comments']." "._COMMENTS."</a>");
140
-		if(isADMIN && uLEVEL < 4) 
141
-			$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>");
142
-		$news->assign("oddeven", ($counter % 2 ? "even" : "odd"));
143
-		$counter++;
144
-	}
145
-	$output .= $news->getOutputContent( );
146
-	if ($count > $itemsperpage) $output .= build_pagelinks("news.php?", $count, $offset);
147
-	$tpl->assign("output", $output);
148
-}
149
-
150
-$tpl->printToScreen();
151
-dbclose( );
152
-?>
153 0
\ No newline at end of file