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,61 @@
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
+
27
+include ("../../header.php");
28
+
29
+if(file_exists("$skindir/default.tpl")) $tpl = new TemplatePower( "$skindir/default.tpl" );
30
+else $tpl = new TemplatePower("../../default_tpls/default.tpl");
31
+//let TemplatePower do its thing, parsing etc.
32
+
33
+include("../../includes/pagesetup.php");
34
+
35
+if(file_exists("{$language}.php")) include_once("{$language}.php");
36
+else include_once("en.php");
37
+
38
+$shouts = dbquery("SELECT shouts.*, "._PENNAMEFIELD." as penname FROM ".TABLEPREFIX."fanfiction_shoutbox as shouts LEFT JOIN "._AUTHORTABLE." ON "._UIDFIELD." = shouts.shout_name ORDER BY shout_datestamp DESC");
39
+$totalshouts = dbnumrows($shouts);
40
+$shouts = dbquery("SELECT shouts.*, "._PENNAMEFIELD." as penname FROM ".TABLEPREFIX."fanfiction_shoutbox as shouts LEFT JOIN "._AUTHORTABLE." ON "._UIDFIELD." = shouts.shout_name ORDER BY shout_datestamp DESC LIMIT $offset, $itemsperpage");
41
+if(dbnumrows($shouts) > 0) {
42
+	if(!empty($blocks['shoutbox']['shoutdate'])) $shoutdate = $blocks['shoutbox']['shoutdate'];
43
+	else $shoutdate = $dateformat." ".$timeformat;
44
+	$output .= "<div class='sectionheader'>"._SHOUTARCHIVE."</div><div style='width: 80%;margin: 0 auto;'>";
45
+	while($shout = dbassoc($shouts)) {
46
+		if(isNumber($shout['shout_name']) && isset($shout['penname'])) $shoutname = "<a href='"._BASEDIR."viewuser.php?uid=".$shout['shout_name']."'>".$shout['penname']."</a>";
47
+		else if(isset($shout['shout_name'])) $shoutname = $shout['shout_name'];
48
+		else $shout = _GUEST; // Just in case.
49
+		$output .= "
50
+<div class='tblborder'><span class='sbname'>$shoutname</span><br />\n
51
+<span class='sbshout'>".stripslashes($shout['shout_message'])."</span><br />\n
52
+<span class='sbdatetime'>".date("$shoutdate", $shout['shout_datestamp'])." [<a href='../../admin.php?action=blocks&amp;admin=shoutbox&amp;delete=".$shout['shout_id']."' class='sbadmin'>"._DELETE."</a>] [<a href='../../admin.php?action=blocks&amp;admin=shoutbox&amp;shout_id=".$shout['shout_id']."' class='sbadmin'>"._EDIT."</a>]</span></div>\n<br />";
53
+	}
54
+	$output .= "</div>";
55
+	if($totalshouts > $itemsperpage) $output .= build_pagelinks("archive.php?", $totalshouts, $offset);
56
+}
57
+else $output .= write_message(_NOSHOUTS);
58
+$tpl->assign("output", "<div id='pagetitle'>"._SHOUTARCHIVE."</div>\n\n$output");
59
+$tpl->printToScreen();
60
+
61
+?>
0 62
\ No newline at end of file