| ... | ... |
@@ -49,32 +49,32 @@ else {
|
| 49 | 49 |
$lostpassword_notify = isset($tmp['lostpassword_notify']) ? $tmp['lostpassword_notify'] : ""; |
| 50 | 50 |
$registration_toemail = isset($tmp['registration_toemail']) ? $tmp['registration_toemail'] : ""; |
| 51 | 51 |
|
| 52 |
- $output .= "<div id=\"settingsform\" style=\"width: 99%\"> |
|
| 53 |
- <form method=\"POST\" style=\"margin: 1em auto;\" enctype=\"multipart/form-data\" |
|
| 54 |
- action=\"admin.php?action=modules&admin=true&module=notifications\">"; |
|
| 52 |
+ $output .= |
|
| 53 |
+ "<div id=\"settingsform\" style=\"width: 99%\"> |
|
| 54 |
+ <form method=\"POST\" style=\"margin: 1em auto;\" enctype=\"multipart/form-data\" action=\"admin.php?action=modules&admin=true&module=notifications\">"; |
|
| 55 | 55 |
$output .= "<div style='margin-bottom: 1em'> |
| 56 |
- <label for=\"notifications[registration_notify]\">". _REGISTRATION_NOTIFY. ": </label> |
|
| 57 |
- <select name=\"notifications[registration_notify]\"> |
|
| 58 |
- <option value=\"1\"".($registration_notify == "1" ? " selected" : "").">"._YES."</option> |
|
| 59 |
- <option value=\"0\"".($registration_notify == "0" ? " selected" : "").">"._NO. "</option> |
|
| 60 |
- </select></div> |
|
| 61 |
- <div style='margin-bottom: 1em'> |
|
| 62 |
- <label for=\"notifications[lostpassword_notify]\">" . _LOST_PASWORD_NOTIFY . ": </label> |
|
| 63 |
- <select name=\"notifications[lostpassword_notify]\"> |
|
| 64 |
- <option value=\"1\"" . ($lostpassword_notify == "1" ? " selected" : "") . ">" . _YES . "</option> |
|
| 65 |
- <option value=\"0\"" . ($lostpassword_notify == "0" ? " selected" : "") . ">" . _NO . "</option> |
|
| 66 |
- </select></div> |
|
| 67 |
- <div style='margin-bottom: 1em'> |
|
| 68 |
- <label for=\"notifications[registration_toemail]\">". _REGISTRATION_TOEMAIL.":</label> |
|
| 69 |
- <input type=\"text\" class=\"textbox\" id=\"registration_toemail\" maxlength=\"250\" |
|
| 70 |
- name=\"notifications[registration_toemail]\" size=\"80\" value=\"" . $registration_toemail . "\"></div> |
|
| 71 |
- |
|
| 72 |
- </div>"; |
|
| 56 |
+ <label for=\"notifications[registration_notify]\">". _REGISTRATION_NOTIFY. ": </label> |
|
| 57 |
+ <select name=\"notifications[registration_notify]\"> |
|
| 58 |
+ <option value=\"1\"".($registration_notify == "1" ? " selected" : "").">"._YES."</option> |
|
| 59 |
+ <option value=\"0\"".($registration_notify == "0" ? " selected" : "").">"._NO. "</option> |
|
| 60 |
+ </select> |
|
| 61 |
+ </div> |
|
| 62 |
+ <div style='margin-bottom: 1em'> |
|
| 63 |
+ <label for=\"notifications[lostpassword_notify]\">" . _LOST_PASWORD_NOTIFY . ": </label> |
|
| 64 |
+ <select name=\"notifications[lostpassword_notify]\"> |
|
| 65 |
+ <option value=\"1\"" . ($lostpassword_notify == "1" ? " selected" : "") . ">" . _YES . "</option> |
|
| 66 |
+ <option value=\"0\"" . ($lostpassword_notify == "0" ? " selected" : "") . ">" . _NO . "</option> |
|
| 67 |
+ </select> |
|
| 68 |
+ </div> |
|
| 69 |
+ <div style='margin-bottom: 1em'> |
|
| 70 |
+ <label for=\"notifications[registration_toemail]\">". _REGISTRATION_TOEMAIL.":</label> |
|
| 71 |
+ <input type=\"text\" class=\"textbox\" id=\"registration_toemail\" maxlength=\"250\" name=\"notifications[registration_toemail]\" size=\"80\" value=\"" . $registration_toemail . "\"> |
|
| 72 |
+ </div>"; |
|
| 73 | 73 |
$output .= "<div id='submitdiv'> |
| 74 |
- <INPUT type=\"submit\" id=\"submit\" class=\"button\" name=\"submit\" value=\""._SUBMIT."\"> |
|
| 74 |
+ <input type=\"submit\" id=\"submit\" class=\"button\" name=\"submit\" value=\""._SUBMIT."\"> |
|
| 75 | 75 |
</div> |
| 76 | 76 |
</form> |
| 77 |
- </div>"; |
|
| 77 |
+ </div>"; |
|
| 78 | 78 |
|
| 79 | 79 |
} |
| 80 | 80 |
?> |
| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,80 @@ |
| 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 |
+$current = "notifications"; |
|
| 24 |
+if(isset($_GET['action']) && ($_GET['action'] == "add" || $_GET['action'] == "edit")) $displayform = 1; |
|
| 25 |
+ |
|
| 26 |
+if(file_exists(_BASEDIR."languages/{$language}_admin.php")) include_once(_BASEDIR."languages/{$language}_admin.php");
|
|
| 27 |
+else include_once(_BASEDIR."languages/en_admin.php"); |
|
| 28 |
+if(file_exists(_BASEDIR."modules/notifications/languages/{$language}.php")) include_once(_BASEDIR."modules/notifications/languages/{$language}.php");
|
|
| 29 |
+else include_once(_BASEDIR."modules/notifications/languages/en.php"); |
|
| 30 |
+ |
|
| 31 |
+ |
|
| 32 |
+ |
|
| 33 |
+$output = "<div id='pagetitle'>"._NOTIFICATIONADMIN."</div>"; |
|
| 34 |
+if(!isADMIN) accessDenied( ); |
|
| 35 |
+ |
|
| 36 |
+if(isset($_POST['submit'])) {
|
|
| 37 |
+ |
|
| 38 |
+ $dbdata = serialize($_POST['notifications']); |
|
| 39 |
+ $dbdata = addslashes($dbdata); |
|
| 40 |
+ $result = dbquery("UPDATE ".$settingsprefix."fanfiction_settings SET notifications = '$dbdata' WHERE sitekey = '".SITEKEY."'");
|
|
| 41 |
+ if($result) $output .= write_message(_ACTIONSUCCESSFUL); |
|
| 42 |
+ else $output .= write_error(_ERROR); |
|
| 43 |
+} |
|
| 44 |
+else {
|
|
| 45 |
+ |
|
| 46 |
+ $tmp = unserialize($notifications); |
|
| 47 |
+ |
|
| 48 |
+ $registration_notify = isset($tmp['registration_notify']) ? $tmp['registration_notify'] : ""; |
|
| 49 |
+ $lostpassword_notify = isset($tmp['lostpassword_notify']) ? $tmp['lostpassword_notify'] : ""; |
|
| 50 |
+ $registration_toemail = isset($tmp['registration_toemail']) ? $tmp['registration_toemail'] : ""; |
|
| 51 |
+ |
|
| 52 |
+ $output .= "<div id=\"settingsform\" style=\"width: 99%\"> |
|
| 53 |
+ <form method=\"POST\" style=\"margin: 1em auto;\" enctype=\"multipart/form-data\" |
|
| 54 |
+ action=\"admin.php?action=modules&admin=true&module=notifications\">"; |
|
| 55 |
+ $output .= "<div style='margin-bottom: 1em'> |
|
| 56 |
+ <label for=\"notifications[registration_notify]\">". _REGISTRATION_NOTIFY. ": </label> |
|
| 57 |
+ <select name=\"notifications[registration_notify]\"> |
|
| 58 |
+ <option value=\"1\"".($registration_notify == "1" ? " selected" : "").">"._YES."</option> |
|
| 59 |
+ <option value=\"0\"".($registration_notify == "0" ? " selected" : "").">"._NO. "</option> |
|
| 60 |
+ </select></div> |
|
| 61 |
+ <div style='margin-bottom: 1em'> |
|
| 62 |
+ <label for=\"notifications[lostpassword_notify]\">" . _LOST_PASWORD_NOTIFY . ": </label> |
|
| 63 |
+ <select name=\"notifications[lostpassword_notify]\"> |
|
| 64 |
+ <option value=\"1\"" . ($lostpassword_notify == "1" ? " selected" : "") . ">" . _YES . "</option> |
|
| 65 |
+ <option value=\"0\"" . ($lostpassword_notify == "0" ? " selected" : "") . ">" . _NO . "</option> |
|
| 66 |
+ </select></div> |
|
| 67 |
+ <div style='margin-bottom: 1em'> |
|
| 68 |
+ <label for=\"notifications[registration_toemail]\">". _REGISTRATION_TOEMAIL.":</label> |
|
| 69 |
+ <input type=\"text\" class=\"textbox\" id=\"registration_toemail\" maxlength=\"250\" |
|
| 70 |
+ name=\"notifications[registration_toemail]\" size=\"80\" value=\"" . $registration_toemail . "\"></div> |
|
| 71 |
+ |
|
| 72 |
+ </div>"; |
|
| 73 |
+ $output .= "<div id='submitdiv'> |
|
| 74 |
+ <INPUT type=\"submit\" id=\"submit\" class=\"button\" name=\"submit\" value=\""._SUBMIT."\"> |
|
| 75 |
+ </div> |
|
| 76 |
+ </form> |
|
| 77 |
+ </div>"; |
|
| 78 |
+ |
|
| 79 |
+} |
|
| 80 |
+?> |