| ... | ... |
@@ -42,7 +42,7 @@ $chapid = isset($_GET['chapid']) && isNumber($_GET['chapid']) ? $_GET['chapid'] |
| 42 | 42 |
if($logging) {
|
| 43 | 43 |
$storyquery = dbquery("SELECT story.title, chapter.title as chapter, author.email, author.penname, chapter.uid, chapter.inorder FROM ".TABLEPREFIX."fanfiction_stories as story, ".TABLEPREFIX."fanfiction_chapters as chapter, ".TABLEPREFIX."fanfiction_authors as author WHERE chapter.uid = author.uid AND chapter.chapid = '$chapid' AND chapter.sid = story.sid LIMIT 1");
|
| 44 | 44 |
$story = dbassoc($storyquery); |
| 45 |
- dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`, `log_timestamp`) VALUES('".escapestring(sprintf(_LOG_REJECTION, USERPENNAME, USERUID, $title, $sid, $uid, $penname, $inorder, $letter))."', '".USERUID."', INET_ATON('".$_ENV['REMOTE_ADDR']."'), 'RJ', ". time() . ")");
|
|
| 45 |
+ dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`, `log_timestamp`) VALUES('".escapestring(sprintf(_LOG_REJECTION, USERPENNAME, USERUID, $title, $sid, $uid, $penname, $inorder, $letter))."', '".USERUID. "', INET6_ATON('".$_ENV['REMOTE_ADDR']."'), 'RJ', ". time() . ")");
|
|
| 46 | 46 |
} |
| 47 | 47 |
|
| 48 | 48 |
} |
| ... | ... |
@@ -64,4 +64,4 @@ $chapid = isset($_GET['chapid']) && isNumber($_GET['chapid']) ? $_GET['chapid'] |
| 64 | 64 |
<textarea class=\"textbox\" name=\"letter\" cols=\"40\" rows=\"7\">$letter</TEXTAREA><br /><INPUT type=\"submit\" style=\"margin: 10px;\" class=\"button\" name=\"submit\" value=\""._SUBMIT."\"></form></div></body></html>"; |
| 65 | 65 |
exit( ); |
| 66 | 66 |
} |
| 67 |
-?> |
|
| 68 | 67 |
\ No newline at end of file |
| 68 |
+?> |
| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,67 @@ |
| 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 |
+ |
|
| 27 |
+$chapid = isset($_GET['chapid']) && isNumber($_GET['chapid']) ? $_GET['chapid'] : 0; |
|
| 28 |
+ |
|
| 29 |
+ $adminquery = dbquery("SELECT "._EMAILFIELD." as email, "._PENNAMEFIELD." as penname FROM "._AUTHORTABLE." WHERE "._UIDFIELD." = '".USERUID."' LIMIT 1");
|
|
| 30 |
+ list($adminemail, $adminname) = dbrow($adminquery); |
|
| 31 |
+ if($adminemail) |
|
| 32 |
+ $ademail = $adminemail; |
|
| 33 |
+ else |
|
| 34 |
+ $ademail = $siteemail; |
|
| 35 |
+ if(isset($_POST['submit'])) {
|
|
| 36 |
+ $subject = strip_tags(descript($_POST['subject'])); |
|
| 37 |
+ $letter = descript($_POST['letter']); |
|
| 38 |
+ include("includes/emailer.php");
|
|
| 39 |
+ $result = sendemail($_POST['authorname'], $_POST['authoremail'], $adminname, $ademail, $subject, $letter, "html"); |
|
| 40 |
+ if($result) echo write_message(_EMAILSENT); |
|
| 41 |
+ else echo write_error(_NOMAILSENT); |
|
| 42 |
+ if($logging) {
|
|
| 43 |
+ $storyquery = dbquery("SELECT story.title, chapter.title as chapter, author.email, author.penname, chapter.uid, chapter.inorder FROM ".TABLEPREFIX."fanfiction_stories as story, ".TABLEPREFIX."fanfiction_chapters as chapter, ".TABLEPREFIX."fanfiction_authors as author WHERE chapter.uid = author.uid AND chapter.chapid = '$chapid' AND chapter.sid = story.sid LIMIT 1");
|
|
| 44 |
+ $story = dbassoc($storyquery); |
|
| 45 |
+ dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`, `log_timestamp`) VALUES('".escapestring(sprintf(_LOG_REJECTION, USERPENNAME, USERUID, $title, $sid, $uid, $penname, $inorder, $letter))."', '".USERUID."', INET_ATON('".$_ENV['REMOTE_ADDR']."'), 'RJ', ". time() . ")");
|
|
| 46 |
+ } |
|
| 47 |
+ |
|
| 48 |
+ } |
|
| 49 |
+ else {
|
|
| 50 |
+ $storyquery = dbquery("SELECT story.title, chapter.title as chapter, "._EMAILFIELD." as email, "._PENNAMEFIELD." as penname, chapter.uid FROM ".TABLEPREFIX."fanfiction_stories as story, ".TABLEPREFIX."fanfiction_chapters as chapter, "._AUTHORTABLE." WHERE chapter.uid = "._UIDFIELD." AND chapter.chapid = '$chapid' AND chapter.sid = story.sid LIMIT 1");
|
|
| 51 |
+ $story = dbassoc($storyquery); |
|
| 52 |
+ $letterquery = dbquery("SELECT message_text, message_title FROM ".TABLEPREFIX."fanfiction_messages WHERE message_name = 'nothankyou' LIMIT 1");
|
|
| 53 |
+ list($letter, $subject) = dbrow($letterquery); |
|
| 54 |
+ $search = array("@\{sitename\}@", "@\{adminname\}@", "@\{author\}@", "@\{storytitle\}@", "@\{chaptertitle\}@", "@\{rules\}@");
|
|
| 55 |
+ $replace = array( $sitename, $adminname, $story['penname'], $story['title'], $story['chapter'], "<a href=\"".$url."/viewpage.php?page=rules\">"._RULES."</a>"); |
|
| 56 |
+ $letter = preg_replace($search, $replace, $letter); |
|
| 57 |
+ $subject = preg_replace($search, $replace, $subject); |
|
| 58 |
+ echo "<body> |
|
| 59 |
+ <div id=\"pagetitle\"> ".$story['title'].": ".$story['chapter']." "._BY." ".$story['penname']."</div> |
|
| 60 |
+ <div style=\"line-height: 4ex; margin: 0 auto; width: 90%;\"> |
|
| 61 |
+ <form method=\"POST\" enctype=\"multipart/form-data\" action=\"admin.php?action=noletter&uid=".$story['uid']."&chapid=".$_GET['chapid']."\"> |
|
| 62 |
+ <input type=\"hidden\" name=\"authoremail\" value=\"$story[email]\"><input type=\"hidden\" name=\"authorname\" value=\"story[penname]\"> |
|
| 63 |
+ <label for=\"subject\">"._SUBJECT.":</label> <INPUT type=\"text\" class=\"textbox=\" size=\"40\" name=\"subject\" value=\"$subject\"><br /> |
|
| 64 |
+ <textarea class=\"textbox\" name=\"letter\" cols=\"40\" rows=\"7\">$letter</TEXTAREA><br /><INPUT type=\"submit\" style=\"margin: 10px;\" class=\"button\" name=\"submit\" value=\""._SUBMIT."\"></form></div></body></html>"; |
|
| 65 |
+ exit( ); |
|
| 66 |
+ } |
|
| 67 |
+?> |
|
| 0 | 68 |
\ No newline at end of file |