| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,53 @@ |
| 1 |
+<?php |
|
| 2 |
+// ---------------------------------------------------------------------- |
|
| 3 |
+// eFiction 3.2 |
|
| 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 |
+ if(!$uid) $output .= write_error(_ERROR); |
|
| 28 |
+ else {
|
|
| 29 |
+ $author = dbquery("SELECT "._PENNAMEFIELD." as penname, "._EMAILFIELD." as email FROM "._AUTHORTABLE." WHERE "._UIDFIELD." = '$uid' LIMIT 1");
|
|
| 30 |
+ list($penname, $email) = dbrow($author); |
|
| 31 |
+ $output .= "<div class='sectionheader'>"._CONTACTAUTHOR."</div>"; |
|
| 32 |
+ if(isset($_POST['submit'])) {
|
|
| 33 |
+ if($captcha && !isMEMBER && !captcha_confirm()) $output .= write_error(_CAPTCHAFAIL); |
|
| 34 |
+ else {
|
|
| 35 |
+ include_once(_BASEDIR."includes/emailer.php"); |
|
| 36 |
+ if(!$email) $output .= write_error(_ERROR); |
|
| 37 |
+ else $result = sendemail($penname, $email, $_POST['email'], $siteemail , descript(strip_tags($_POST['subject'])), descript($_POST['comments'])."<br /><br />".(isMEMBER ? sprintf(_SITESIG2, "<a href='".$url."/viewuser.php?uid=".USERUID."'>".USERPENNAME."</a>") : _SITESIG), "html"); |
|
| 38 |
+ if($result) $output .= write_message(_ACTIONSUCCESSFUL); |
|
| 39 |
+ else $output .= write_error(_ERROR); |
|
| 40 |
+ } |
|
| 41 |
+ } |
|
| 42 |
+ else {
|
|
| 43 |
+ $output .= "<form method=\"POST\" enctype=\"multipart/form-data\" style=\"width: 400px; margin: 0 auto;\" action=\"viewuser.php?action=contact&uid=$uid\"> |
|
| 44 |
+ <label for=\"email\">"._YOUREMAIL.":</label> <INPUT type=\"text\" class=\"textbox\" name=\"email\"><br /> |
|
| 45 |
+ <label for=\"subject\">"._SUBJECT.":</label> <INPUT type=\"text\" class=\"textbox\" name=\"subject\"><br /> |
|
| 46 |
+ <label for=\"comments\">"._COMMENTS.":</label> <TEXTAREA class=\"textbox\" name=\"comments\" cols=\"50\" rows=\"6\"></TEXTAREA><br />"; |
|
| 47 |
+ if(!USERUID && !empty($captcha)) $output .= "<div><span class=\"label\">"._CAPTCHANOTE."</span><input MAXLENGTH=5 SIZE=5 name=\"userdigit\" type=\"text\" value=\"\"><br /><img width=120 height=30 src=\""._BASEDIR."includes/button.php\" style=\"border: 1px solid #111;\"></div>"; |
|
| 48 |
+ $output .= "<div style=\"text-align: center;\"><INPUT name=\"submit\" class=\"button\" type=\"submit\" value=\""._SUBMIT."\"></div></form>"; |
|
| 49 |
+ $output .= write_message(_REQUIREDFIELDS._RESPECTNOTE); |
|
| 50 |
+ } |
|
| 51 |
+ } |
|
| 52 |
+ $tpl->assign( "output", $output ); |
|
| 53 |
+?> |
|
| 0 | 54 |
\ No newline at end of file |