| ... | ... |
@@ -105,7 +105,7 @@ if(isset($_POST['submit'])) {
|
| 105 | 105 |
$submissionsoff = $_POST['newsubmissionsoff'] == 1 ? 1 : 0; |
| 106 | 106 |
$autovalidate = $_POST['newautovalidate'] == 1 ? 1 : 0; |
| 107 | 107 |
$coauthallowed = $_POST['newcoauthallowed'] == 1 ? 1 : 0; |
| 108 |
- $store = !empty($_POST['newstore']) ? $_POST['newstore'] == "files" ? "files" : "mysql" : $store; |
|
| 108 |
+ $store = !empty($_POST['newstore']) ? ($_POST['newstore'] == "files" ? "files" : "mysql" ) : $store; |
|
| 109 | 109 |
$storiespath = descript($_POST['newstoriespath']); |
| 110 | 110 |
$minwords = isNumber($_POST['newminwords']) ? $_POST['newminwords'] : 0; |
| 111 | 111 |
$maxwords = isNumber($_POST['newmaxwords']) ? $_POST['newmaxwords'] : 0; |
| ... | ... |
@@ -1,484 +1,486 @@ |
| 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 |
-function updatePanelOrder( ) {
|
|
| 28 |
- |
|
| 29 |
- $ptypes = dbquery("SELECT panel_type FROM ".TABLEPREFIX."fanfiction_panels GROUP BY panel_type");
|
|
| 30 |
- while($ptype = dbassoc($ptypes)) {
|
|
| 31 |
- if($ptype['panel_type'] == "A") {
|
|
| 32 |
- for($x = 1; $x < 5; $x++) {
|
|
| 33 |
- $count = 1; |
|
| 34 |
- $plist = dbquery("SELECT panel_name, panel_id FROM ".TABLEPREFIX."fanfiction_panels WHERE panel_hidden = '0' AND panel_type = '".$ptype['panel_type']."' AND panel_level = '$x' ORDER BY panel_level, panel_order");
|
|
| 35 |
- while($p = dbassoc($plist)) {
|
|
| 36 |
- dbquery("UPDATE ".TABLEPREFIX."fanfiction_panels SET panel_order = '$count' WHERE panel_id = '".$p['panel_id']."' LIMIT 1");
|
|
| 37 |
- $count++; |
|
| 38 |
- } |
|
| 39 |
- } |
|
| 40 |
- } |
|
| 41 |
- else {
|
|
| 42 |
- $count = 1; |
|
| 43 |
- $plist = dbquery("SELECT panel_name, panel_id FROM ".TABLEPREFIX."fanfiction_panels WHERE panel_hidden = '0' AND panel_type = '".$ptype['panel_type']."' ORDER BY ".($ptype['panel_type'] == "A" ? "panel_level," : "")."panel_order");
|
|
| 44 |
- while($p = dbassoc($plist)) {
|
|
| 45 |
- dbquery("UPDATE ".TABLEPREFIX."fanfiction_panels SET panel_order = '$count' WHERE panel_id = '".$p['panel_id']."' LIMIT 1");
|
|
| 46 |
- $count++; |
|
| 47 |
- } |
|
| 48 |
- } |
|
| 49 |
- } |
|
| 50 |
-} |
|
| 51 |
- |
|
| 52 |
-if($action == "settings") {
|
|
| 53 |
-$output .= "<h1>"._SETTINGS."</h1><div style='text-align: center;'> |
|
| 54 |
- <a href='admin.php?action=settings&sect=main'>"._MAINSETTINGS."</a> | |
|
| 55 |
- <a href='admin.php?action=settings&sect=submissions'>"._SUBMISSIONSETTINGS."</a> | |
|
| 56 |
- <a href='admin.php?action=settings&sect=sitesettings'>"._SITESETTINGS."</a> | |
|
| 57 |
- <a href='admin.php?action=settings&sect=display'>"._DISPLAYSETTINGS."</a> | |
|
| 58 |
- <a href='admin.php?action=settings&sect=reviews'>"._REVIEWSETTINGS."</a> | |
|
| 59 |
- <a href='admin.php?action=settings&sect=useropts'>"._USERSETTINGS."</a> | |
|
| 60 |
- <a href='admin.php?action=settings&sect=email'>"._EMAILSETTINGS."</a> | |
|
| 61 |
- <a href='admin.php?action=censor'>"._CENSOR."</a> <br /> |
|
| 62 |
- <a href='admin.php?action=messages&message=welcome'>"._WELCOME."</a> | |
|
| 63 |
- <a href='admin.php?action=messages&message=copyright'>"._COPYRIGHT."</a> | |
|
| 64 |
- <a href='admin.php?action=messages&message=printercopyright'>"._PRINTERCOPYRIGHT."</a> | |
|
| 65 |
- <a href='admin.php?action=messages&message=tinyMCE'>"._TINYMCE."</a> | |
|
| 66 |
- <a href='admin.php?action=messages&message=nothankyou'>"._NOTHANKYOU."</a> | |
|
| 67 |
- <a href='admin.php?action=messages&message=thankyou'>"._THANKYOU."</a><br />"; |
|
| 68 |
- $settingsquery = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_panels WHERE panel_type = 'AS' ORDER BY panel_title");
|
|
| 69 |
- while($os = dbassoc($settingsquery)) {
|
|
| 70 |
- if($os['panel_url']) $othersettings[] = "<a href='".$os['panel_url']."'>".$os['panel_title']."</a>"; |
|
| 71 |
- } |
|
| 72 |
- if(isset($othersettings)) $output .= implode(" | ", $othersettings);
|
|
| 73 |
-$output .= "</div> "; |
|
| 74 |
-} |
|
| 75 |
- |
|
| 76 |
-$sects = array("main", "submissions", "sitesettings", "display", "reviews", "useropts", "email");
|
|
| 77 |
-//if(!isset($_GET['sect'])) $sect = "main"; |
|
| 78 |
-//else $sect = $_GET['sect']; |
|
| 79 |
-$sect = isset($_GET['sect']) ? $_GET['sect'] : "main"; |
|
| 80 |
-if(isset($_POST['submit'])) {
|
|
| 81 |
- if($sect == "main") {
|
|
| 82 |
- if(!preg_match("!^[a-z0-9_]{3,30}$!i", $_POST['newsitekey'])) $output .= write_error(_BADSITEKEY);
|
|
| 83 |
- else {
|
|
| 84 |
- $oldsitekey = $sitekey; |
|
| 85 |
- $sitekey = descript($_POST['newsitekey']); |
|
| 86 |
- $sitename = escapestring(descript(strip_tags($_POST['newsitename']))); |
|
| 87 |
- $slogan = escapestring(descript(strip_tags($_POST['newslogan']))); |
|
| 88 |
- $url = escapestring(descript(strip_tags($_POST['newsiteurl']))); |
|
| 89 |
- // if the http:// is missing add it. |
|
| 90 |
- if(substr($url, 0, 7) != "http://") $url = "http://".$url; |
|
| 91 |
- // we also want to check for a trailing slash. |
|
| 92 |
- if(substr($url, -1, 1) == "/") $url = substr($url, 0, strlen($url) - 1); |
|
| 93 |
- $tableprefix = escapestring(descript(strip_tags($_POST['newtableprefix']))); |
|
| 94 |
- $siteemail = escapestring(descript(strip_tags($_POST['newsiteemail']))); |
|
| 95 |
- $skin = escapestring(descript(strip_tags($_POST['newskin']))); |
|
| 96 |
- $language = escapestring(descript(strip_tags($_POST['newlanguage']))); |
|
| 97 |
- if(empty($sitekey)) $output .= write_message(_SITEKEYREQUIRED); |
|
| 98 |
- else {
|
|
| 99 |
- if($sitekey != $oldsitekey) $output .= write_message(_SITEKEYCHANGED); |
|
| 100 |
- $result = dbquery("UPDATE ".$settingsprefix."fanfiction_settings SET sitekey = '$sitekey', sitename = '$sitename', slogan = '$slogan', url = '$url', tableprefix = '$tableprefix', siteemail = '$siteemail', skin = '$skin', language = '$language' WHERE sitekey = '$oldsitekey'");
|
|
| 101 |
- } |
|
| 102 |
- } |
|
| 103 |
- } |
|
| 104 |
- else if($sect == "submissions") {
|
|
| 105 |
- $submissionsoff = $_POST['newsubmissionsoff'] == 1 ? 1 : 0; |
|
| 106 |
- $autovalidate = $_POST['newautovalidate'] == 1 ? 1 : 0; |
|
| 107 |
- $coauthallowed = $_POST['newcoauthallowed'] == 1 ? 1 : 0; |
|
| 108 |
- $store = !empty($_POST['newstore']) ? $_POST['newstore'] == "files" ? "files" : "mysql" : $store; |
|
| 109 |
- $storiespath = descript($_POST['newstoriespath']); |
|
| 110 |
- $minwords = isNumber($_POST['newminwords']) ? $_POST['newminwords'] : 0; |
|
| 111 |
- $maxwords = isNumber($_POST['newmaxwords']) ? $_POST['newmaxwords'] : 0; |
|
| 112 |
- $roundrobins = $_POST['newroundrobins'] == 1 ? 1 : 0; |
|
| 113 |
- $allowseries = $_POST['newallowseries'] && isNumber($_POST['newallowseries']) ? $_POST['newallowseries'] : 0; |
|
| 114 |
- $imageupload = $_POST['newimageupload'] == 1 ? 1 : 0; |
|
| 115 |
- $imageheight = isNumber($_POST['newimageheight']) ? $_POST['newimageheight'] : 0; |
|
| 116 |
- $imagewidth = isNumber($_POST['newimagewidth']) ? $_POST['newimagewidth'] : 0; |
|
| 117 |
- $result = dbquery("UPDATE ".$settingsprefix."fanfiction_settings SET submissionsoff = '$submissionsoff', autovalidate = '$autovalidate', coauthallowed = '$coauthallowed', store = '$store', storiespath = '$storiespath', minwords = '$minwords', maxwords = '$maxwords', imageupload = '$imageupload', imageheight = '$imageheight', imagewidth = '$imagewidth', roundrobins = '$roundrobins', allowseries = '$allowseries' WHERE sitekey ='".SITEKEY."'");
|
|
| 118 |
- if($action == "settings") {
|
|
| 119 |
- dbquery("UPDATE ".TABLEPREFIX."fanfiction_panels SET panel_hidden = '".($imageupload ? "0" : "1")."' WHERE panel_name LIKE 'manageimages'");
|
|
| 120 |
- dbquery("UPDATE ".TABLEPREFIX."fanfiction_panels SET panel_hidden = '".($allowseries ? "0" : "1")."' WHERE (panel_name LIKE '%series%' OR panel_title LIKE '%series%') AND panel_type != 'A' AND panel_type != 'B'");
|
|
| 121 |
- updatePanelOrder( ); |
|
| 122 |
- } |
|
| 123 |
- |
|
| 124 |
- } |
|
| 125 |
- else if($sect == "sitesettings") {
|
|
| 126 |
- $tinyMCE = $_POST['newtinyMCE'] == 1 ? 1 : 0; |
|
| 127 |
- $allowed_tags = $_POST['newallowed_tags']; |
|
| 128 |
- $favorites = $_POST['newfavorites'] == 1 ? 1 : 0; |
|
| 129 |
- $multiplecats = $_POST['newmultiplecats'] == 1 ? 1 : 0; |
|
| 130 |
- $newscomments = $_POST['newnewscomments'] == 1 ? 1 : 0; |
|
| 131 |
- $logging = $_POST['newlogging'] == 1 ? 1 : 0; |
|
| 132 |
- $maintenance = $_POST['newmaint'] == 1 ? 1 : 0; |
|
| 133 |
- $debug = $_POST['newdebug'] == 1 ? 1 : 0; |
|
| 134 |
- $captcha = $_POST['newcaptcha'] == 1 ? 1 : 0; |
|
| 135 |
- $result = dbquery("UPDATE ".$settingsprefix."fanfiction_settings SET tinyMCE = '$tinyMCE', favorites = '$favorites', multiplecats = '$multiplecats', allowed_tags = '$allowed_tags', newscomments = '$newscomments', logging = '$logging', maintenance = '$maintenance', debug = '$debug', captcha = '$captcha' WHERE sitekey ='".SITEKEY."'");
|
|
| 136 |
- } |
|
| 137 |
- else if($sect == "display") {
|
|
| 138 |
- $dateformat = $_POST['newdateformat'] ? descript(strip_tags($_POST['newdateformat'])) : descript(strip_tags($_POST['customdateformat'])); |
|
| 139 |
- $timeformat = $_POST['newtimeformat'] ? descript(strip_tags($_POST['newtimeformat'])) : descript(strip_tags($_POST['customtimeformat'])); |
|
| 140 |
- $extendcats = $_POST['newextendcats'] == 1 ? 1 : 0; |
|
| 141 |
- if(isset($_POST['newdisplaycolumns']) && isNumber($_POST['newdisplaycolumns'])) $displaycolumns = $_POST['newdisplaycolumns']; |
|
| 142 |
- if(isset($_POST['newitemsperpage']) && isNumber($_POST['newitemsperpage'])) $itemsperpage = $_POST['newitemsperpage']; |
|
| 143 |
- if(isset($_POST['newlinkstyle']) && isNumber($_POST['newlinkstyle'])) $linkstyle = $_POST['newlinkstyle']; |
|
| 144 |
- if(isset($_POST['newlinkrange']) && isNumber($_POST['newlinkrange'])) $linkrange = $_POST['newlinkrange']; |
|
| 145 |
- $displayindex = $_POST['newstoryindex'] == 1 ? 1 : 0; |
|
| 146 |
- $displayprofile = $_POST['newdisplayprofile'] == 1 ? 1 : 0; |
|
| 147 |
- $defaultsort = $_POST['newdefaultsort'] == 1 ? 1 : 0; |
|
| 148 |
- if(isNumber($_POST['newrecentdays'])) $recentdays = $_POST['newrecentdays']; |
|
| 149 |
- $result = dbquery("UPDATE ".$settingsprefix."fanfiction_settings SET dateformat = '$dateformat', timeformat = '$timeformat', extendcats = '$extendcats', displaycolumns = '$displaycolumns', itemsperpage = '$itemsperpage', displayindex = '$displayindex', defaultsort = '$defaultsort', recentdays = '$recentdays', displayprofile = '$displayprofile', linkstyle = '$linkstyle', linkrange = '$linkrange' WHERE sitekey ='".SITEKEY."'");
|
|
| 150 |
- } |
|
| 151 |
- else if($sect == "reviews") {
|
|
| 152 |
- $reviewsallowed = $_POST['newreviewsallowed'] == 1 ? 1 : 0; |
|
| 153 |
- $anonreviews = $_POST['newanonreviews'] == 1 ? 1 : 0; |
|
| 154 |
- $rateonly = $_POST['newrateonly'] == 1 ? 1 : 0; |
|
| 155 |
- $ratings = isset($_POST['newratings']) && isNumber($_POST['newratings']) ? $_POST['newratings'] : 0; |
|
| 156 |
- $revdelete = isset($_POST['newrevdelete']) && isNumber($_POST['newrevdelete']) ? $_POST['newrevdelete'] : 0; |
|
| 157 |
- $result = dbquery("UPDATE ".$settingsprefix."fanfiction_settings SET reviewsallowed = '$reviewsallowed', anonreviews = '$anonreviews', rateonly = '$rateonly', ratings = '$ratings', revdelete = '$revdelete' WHERE sitekey ='".SITEKEY."'");
|
|
| 158 |
- } |
|
| 159 |
- else if($sect == "useropts") {
|
|
| 160 |
- $alertson = $_POST['newalertson'] == 1 ? 1 : 0; |
|
| 161 |
- $disablepopups = $_POST['newdisablepops'] == 1 ? 1 : 0; |
|
| 162 |
- $agestatement = $_POST['newagestatement'] == 1 ? 1 : 0; |
|
| 163 |
- $pwdsetting = $_POST['newpwdsetting'] == 1 ? 1 : 0; |
|
| 164 |
- $result = dbquery("UPDATE ".$settingsprefix."fanfiction_settings SET alertson = '$alertson', disablepopups = '$disablepopups', agestatement = '$agestatement', pwdsetting = '$pwdsetting' WHERE sitekey ='".SITEKEY."'");
|
|
| 165 |
- } |
|
| 166 |
- else if($sect == "email") {
|
|
| 167 |
- $smtp_host = $_POST['newsmtp_host']; |
|
| 168 |
- $smtp_username = $_POST['newsmtp_username']; |
|
| 169 |
- $smtp_password = $_POST['newsmtp_password']; |
|
| 170 |
- $result = dbquery("UPDATE ".$settingsprefix."fanfiction_settings SET smtp_host = '$smtp_host', smtp_username = '$smtp_username', smtp_password = '$smtp_password' WHERE sitekey ='".SITEKEY."'");
|
|
| 171 |
- } |
|
| 172 |
- if($result) {
|
|
| 173 |
- $output .= write_message(_ACTIONSUCCESSFUL); |
|
| 174 |
- $sect = $sects[(array_search($sect, $sects) + 1)]; |
|
| 175 |
- if(!$sect) $sect = $sects[0]; |
|
| 176 |
- } |
|
| 177 |
- else $output .= write_error(_ERROR); |
|
| 178 |
-} |
|
| 179 |
- $settingsresults = dbquery("SELECT * FROM ".$settingsprefix."fanfiction_settings WHERE sitekey ='".SITEKEY."'");
|
|
| 180 |
- $settings = dbassoc($settingsresults); |
|
| 181 |
- foreach($settings as $var => $val) {
|
|
| 182 |
- $$var = stripslashes($val); |
|
| 183 |
- } |
|
| 184 |
- |
|
| 185 |
- $output .= "<form method='POST' class='tblborder' style='' enctype='multipart/form-data' action='".($action == "settings" ? "admin.php?action=settings" : $_SERVER['PHP_SELF']."?step=".$_GET['step'])."&sect=$sect'>"; |
|
| 186 |
- if($sect == "main") {
|
|
| 187 |
- $output .= "<h2>"._SITEINFO."</h2> |
|
| 188 |
- <table class='acp'> |
|
| 189 |
- <tr> |
|
| 190 |
- <td><label for='newsitekey'>"._SITEKEY.":</label></td><td><input type='text' class='textbox' name='newsitekey' value='".SITEKEY."'> <a href='#' class='pophelp'>[?]<span>"._HELP_SITEKEY."</span></a></td> |
|
| 191 |
- </tr> |
|
| 192 |
- <tr> |
|
| 193 |
- <td><label for='newsitename'>"._SITENAME.":</label></td><td><input type='text' class='textbox' name='newsitename' value='".htmlspecialchars($sitename, ENT_QUOTES)."'> <a href='#' class='pophelp'>[?]<span>"._HELP_SITENAME."</span></a></td> |
|
| 194 |
- </tr> |
|
| 195 |
- <tr> |
|
| 196 |
- <td><label for='newslogan'>"._SITESLOGAN.":</label></td><td><input type='text' class='textbox' name='newslogan' value='".htmlspecialchars($slogan, ENT_QUOTES)."'> <a href='#' class='pophelp'>[?]<span>"._HELP_SLOGAN."</span></a></td> |
|
| 197 |
- </tr> |
|
| 198 |
- <tr> |
|
| 199 |
- <td><label for='newurl'>"._SITEURL.":</label></td><td><input type='text' class='textbox' name='newsiteurl' value='$url'> <a href='#' class='pophelp'>[?]<span>"._HELP_URL."</span></a></td> |
|
| 200 |
- </tr> |
|
| 201 |
- <tr> |
|
| 202 |
- <td><label for='newtableprefix'>"._TABLEPREFIX.":</label></td><td><input type='text' class='textbox' name='newtableprefix' value='".TABLEPREFIX."'> <a href='#' class='pophelp'>[?]<span>"._HELP_TABLEPREFIX."</span></a></td> |
|
| 203 |
- </tr> |
|
| 204 |
- <tr> |
|
| 205 |
- <td><label for='newsiteemail'>"._ADMINEMAIL.":</label></td><td><input type='text' class='textbox' name='newsiteemail' value='$siteemail'> <a href='#' class='pophelp'>[?]<span>"._HELP_SITEEMAIL."</span></a></td> |
|
| 206 |
- </tr> |
|
| 207 |
- <tr> |
|
| 208 |
- <td><label for='newsiteskin'>"._DEFAULTSKIN.":</label></td><td><select name='newskin'>"; |
|
| 209 |
- $directory = opendir(_BASEDIR."skins"); |
|
| 210 |
- while($filename = readdir($directory)) {
|
|
| 211 |
- if($filename=="." || $filename==".." || !is_dir(_BASEDIR."skins/".$filename)) continue; |
|
| 212 |
- $output .= "<option value='$filename'".($skin == $filename ? " selected" : "").">$filename</option>"; |
|
| 213 |
- } |
|
| 214 |
- closedir($directory); |
|
| 215 |
- $output .= "</select> <a href='#' class='pophelp'>[?]<span>"._HELP_SITESKIN."</span></a></td> |
|
| 216 |
- </tr> |
|
| 217 |
- <tr> |
|
| 218 |
- <td><label for='newlanguage'>"._LANGUAGE.":</label></td><td><select name='newlanguage'>"; |
|
| 219 |
- $directory = opendir(_BASEDIR."languages"); |
|
| 220 |
- while($filename = readdir($directory)) {
|
|
| 221 |
- if($filename=="." || $filename==".." || substr($filename, 2) == "_admin.php") continue; |
|
| 222 |
- $output .= "<option value='".substr($filename, 0, 2)."'". |
|
| 223 |
- ($language == substr($filename, 0, strpos($filename, ".php")) ? " selected" : "")."> |
|
| 224 |
- ".substr($filename, 0, strpos($filename, ".php"))."</option>"; |
|
| 225 |
- } |
|
| 226 |
- closedir($directory); |
|
| 227 |
- $output .= "</select> <a href='#' class='pophelp'>[?]<span>"._HELP_LANGUAGE."</span></a></td></tr>"; |
|
| 228 |
- } |
|
| 229 |
- else if($sect == "submissions") {
|
|
| 230 |
- $output .= "<h2>"._SUBMISSIONSETTINGS."</h2> |
|
| 231 |
- <table class='acp'> |
|
| 232 |
- <tr> |
|
| 233 |
- <td><label for='newsubmissionsoff'>"._NOSUBS.":</label></td><td><select name='newsubmissionsoff'> |
|
| 234 |
- <option value='1'".($submissionsoff == "1" ? " selected" : "").">"._YES."</option> |
|
| 235 |
- <option value='0'".($submissionsoff == "0" ? " selected" : "").">"._NO."</option> |
|
| 236 |
- </select> <a href='#' class='pophelp'>[?]<span>"._HELP_SUBSOFF."</span></a></td> |
|
| 237 |
- </tr> |
|
| 238 |
- <tr> |
|
| 239 |
- <td><label for='newautovalidate'>"._AUTOVALIDATE.":</label></td><td><select name='newautovalidate'> |
|
| 240 |
- <option value='1'".($autovalidate == "1" ? "selected" : "").">"._YES."</option> |
|
| 241 |
- <option value='0'".($autovalidate == "0" ? "selected" : "").">"._NO."</option> |
|
| 242 |
- </select> <a href='#' class='pophelp'>[?]<span>"._HELP_AUTOVALIDATE."</span></a></td> |
|
| 243 |
- </tr> |
|
| 244 |
- <tr> |
|
| 245 |
- <td><label for='newcoauthallowed'>"._COAUTHALLOW.":</label></td><td><select name='newcoauthallowed'> |
|
| 246 |
- <option value='1'".($coauthallowed == "1" ? "selected" : "").">"._YES."</option> |
|
| 247 |
- <option value='0'".($coauthallowed == "0" ? "selected" : "").">"._NO."</option> |
|
| 248 |
- </select> <a href='#' class='pophelp'>[?]<span>"._HELP_COAUTHORS."</span></a></td> |
|
| 249 |
- </tr> |
|
| 250 |
- <tr> |
|
| 251 |
- <td><label for='newroundrobins'>"._ALLOWRR.":</label></td><td><select name='newroundrobins'> |
|
| 252 |
- <option value='1'".($roundrobins == "1" ? " selected" : "").">"._YES."</option> |
|
| 253 |
- <option value='0'".($roundrobins == "0" ? " selected" : "").">"._NO."</option> |
|
| 254 |
- </select> <a href='#' class='pophelp'>[?]<span>"._HELP_ROUNDROBINS."</span></a></td> |
|
| 255 |
- </tr> |
|
| 256 |
- <tr> |
|
| 257 |
- <td><label for='newallowseries'>"._ALLOWSERIES.":</label></td><td><select name='newallowseries'> |
|
| 258 |
- <option value='2'".($allowseries == "2" ? " selected" : "").">"._ALLMEMBERS."</option> |
|
| 259 |
- <option value='1'".($allowseries == "1" ? " selected" : "").">"._AUTHORSONLY."</option> |
|
| 260 |
- <option value='0'".($allowseries == "0" ? " selected" : "").">"._ADMINS."</option> |
|
| 261 |
- </select> <a href='#' class='pophelp'>[?]<span>"._HELP_ALLOWSERIES."</span></a></td> |
|
| 262 |
- </tr> |
|
| 263 |
- <tr> |
|
| 264 |
- <td><label for='newimageupload'>"._IMAGEUPLOAD.":</label></td><td><select name='newimageupload'> |
|
| 265 |
- <option value='1'".($imageupload == "1" ? " selected" : "").">"._YES."</option> |
|
| 266 |
- <option value='0'".($imageupload == "0" ? " selected" : "").">"._NO."</option> |
|
| 267 |
- </select> <a href='#' class='pophelp'>[?]<span>"._HELP_IMAGEUPLOAD."</span></a></td> |
|
| 268 |
- </tr> |
|
| 269 |
- <tr> |
|
| 270 |
- <td colspan='2'><fieldset style='margin: 0 auto;'><legend>"._IMAGESIZE." <a href='#' class='pophelp'>[?]<span>"._HELP_IMAGESIZE."</span></a></legend> |
|
| 271 |
- <label for='newimageheight'>"._MAXHEIGHT.":</label> <input type='text' class='textbox=' name='newimageheight' value='$imageheight' size='5'> <br /> |
|
| 272 |
- <label for='newimagewidth'>"._MAXWIDTH.":</label> <input type='text' class='textbox=' name='newimagewidth' value='$imagewidth' size='5'></fieldset></td> |
|
| 273 |
- </tr> |
|
| 274 |
- <tr> |
|
| 275 |
- <td><label for='newstore'>"._HOWSTORE.":</label></td><td><select name='newstore' onChange='if (this.disabled) this.selectedIndex=0' disabled> |
|
| 276 |
- <option value='files'".($store == "files" || !$store ? " selected" : "").">"._FILES."</option> |
|
| 277 |
- <option value='mysql'".($store == "mysql" ? " selected" : "").">"._MYSQL."</option> |
|
| 278 |
- </select> <input class='textbox=' type='checkbox' class='checkbox' name='r1' onClick='this.form.newstore.disabled=false' checked> <a href='#' class='pophelp'>[?]<span>"._HELP_STORE."</span></a></td> |
|
| 279 |
- </tr> |
|
| 280 |
- <tr> |
|
| 281 |
- <td><label for='newstoriespath'>"._STORIESPATH.":</label></td><td><input type='text' class='textbox=' name='newstoriespath' value='$storiespath'> <a href='#' class='pophelp'>[?]<span>"._HELP_STORIESPATH."</span></a></td> |
|
| 282 |
- </tr> |
|
| 283 |
- <tr> |
|
| 284 |
- <td colspan='2'><fieldset style='margin: 0 auto;'><legend>"._MAXMINWORDS."<a href='#' class='pophelp'>[?]<span>"._HELP_MINMAXWORDS."</span></a></legend> |
|
| 285 |
- <label for='newminwords'>"._MIN.":</label> <input type='text' class='textbox=' name='newminwords' value='$minwords' size='5'> <br /> |
|
| 286 |
- <label for='newmaxwords'>"._MAX.":</label> <input type='text' class='textbox=' name='newmaxwords' value='$maxwords' size='7'></fieldset></td></tr>"; |
|
| 287 |
- } |
|
| 288 |
- else if($sect == "sitesettings") {
|
|
| 289 |
- $output .= "<h2>"._SITESETTINGS."</h2> |
|
| 290 |
- <table class='acp'> |
|
| 291 |
- <tr> |
|
| 292 |
- <td><label for='newtinyMCE'>"._USETINYMCE.": </label></td><td><select name='newtinyMCE'> |
|
| 293 |
- <option value='1'".($tinyMCE ? " selected" : "").">"._YES."</option> |
|
| 294 |
- <option value='0'".(!$tinyMCE ? " selected" : "").">"._NO."</option> |
|
| 295 |
- </select> <a href='#' class='pophelp'>[?]<span>"._HELP_TINYMCE." "._TINYMCENOTE."</span></a></td> |
|
| 296 |
- </tr> |
|
| 297 |
- <tr> |
|
| 298 |
- <td><label for='newallowed_tags'>"._TAGS.": </label></td><td><input type='text' class='textbox' name='newallowed_tags' value='".($allowed_tags ? $allowed_tags : "<strong><em><br /><br><blockquote><strike><font><b><i><u><center><img><a><hr><p><ul><li><ol>")."' size='40'> <a href='#' class='pophelp'>[?]<span>"._HELP_ALLOWEDTAGS." "._TINYMCENOTE."</span></a></td> |
|
| 299 |
- </tr> |
|
| 300 |
- <tr> |
|
| 301 |
- <td><label for='newfavorites'>"._FAVORITES.": </label></td><td><select name='newfavorites'> |
|
| 302 |
- <option value='1'".($favorites == "1" ? " selected" : "").">"._YES."</option> |
|
| 303 |
- <option value='0'".($favorites == "0" ? " selected" : "").">"._NO."</option> |
|
| 304 |
- </select><a href='#' class='pophelp'>[?]<span>"._HELP_FAVORITES."</span></a></td> |
|
| 305 |
- </tr> |
|
| 306 |
- <tr> |
|
| 307 |
- <td><label for='newmultplecats'>"._NUMCATS.": </label></td><td><select name='newmultiplecats'> |
|
| 308 |
- <option value='1'".($multiplecats == "1" ? "selected" : "").">"._MORETHANONE."</option> |
|
| 309 |
- <option value='0'".($multiplecats == "0" ? "selected" : "").">"._ONLYONE."</option> |
|
| 310 |
- </select> <a href='#' class='pophelp'>[?]<span>"._HELP_NUMCATS."</span></a></td> |
|
| 311 |
- </tr> |
|
| 312 |
- <tr> |
|
| 313 |
- <td><label for='newnewscomments'>"._NEWSCOMMENTS.": </label></td><td><select name='newnewscomments'> |
|
| 314 |
- <option value='1'".($newscomments == "1" ? " selected" : "").">"._YES."</option> |
|
| 315 |
- <option value='0'".($newscomments == "0" ? " selected" : "").">"._NO."</option> |
|
| 316 |
- </select> <a href='#' class='pophelp'>[?]<span>"._HELP_NEWSCOMMENTS."</span></a></td> |
|
| 317 |
- </tr> |
|
| 318 |
- <tr> |
|
| 319 |
- <td><label for='newlogging'>"._LOGGING.": </label></td><td><select name='newlogging'> |
|
| 320 |
- <option value='1'".($logging == "1" ? " selected" : "").">"._YES."</option> |
|
| 321 |
- <option value='0'".($logging == "0" ? " selected" : "").">"._NO."</option> |
|
| 322 |
- </select> <a href='#' class='pophelp'>[?]<span>"._HELP_LOGGING."</span></a></td> |
|
| 323 |
- </tr> |
|
| 324 |
- <tr> |
|
| 325 |
- <td><label for='newmaint'>"._MAINTENANCE.": </label></td><td><select name='newmaint'> |
|
| 326 |
- <option value='1'".($maintenance == "1" ? " selected" : "").">"._YES."</option> |
|
| 327 |
- <option value='0'".($maintenance == "0" ? " selected" : "").">"._NO."</option> |
|
| 328 |
- </select> <a href='#' class='pophelp'>[?]<span>"._HELP_MAINTENANCE."</span></a></td> |
|
| 329 |
- </tr> |
|
| 330 |
- <tr> |
|
| 331 |
- <td><label for='newdebug'>"._DEBUG.": </label></td><td><select name='newdebug'> |
|
| 332 |
- <option value='1'".($debug == "1" ? " selected" : "").">"._YES."</option> |
|
| 333 |
- <option value='0'".(!isset($debug) || $debug == "0" ? " selected" : "").">"._NO."</option> |
|
| 334 |
- </select> <a href='#' class='pophelp'>[?]<span>"._HELP_DEBUG."</span></a></td> |
|
| 335 |
- </tr> |
|
| 336 |
- <tr> |
|
| 337 |
- <td><label for='newcaptcha'>"._CAPTCHA.": </label></td><td><select name='newcaptcha'> |
|
| 338 |
- <option value='1'".($captcha == "1" ? " selected" : "").">"._YES."</option> |
|
| 339 |
- <option value='0'".(!isset($captcha) || $captcha == "0" ? " selected" : "").">"._NO."</option> |
|
| 340 |
- </select><a href='#' class='pophelp'>[?]<span>"._HELP_CAPTCHA."</span></a></td></tr>"; |
|
| 341 |
- } |
|
| 342 |
- else if($sect == "display") {
|
|
| 343 |
- $settings = dbquery("SELECT defaultsort, displayindex FROM ".$settingsprefix."fanfiction_settings WHERE sitekey ='".SITEKEY."'");
|
|
| 344 |
- list($sitedefaultsort, $sitedisplayindex) = dbrow($settings); |
|
| 345 |
- $defaultdates = array("m/d/y", "m/d/Y", "m/d/Y", "d/m/Y", "d/m/y", "d M Y",
|
|
| 346 |
- "d.m.y", "Y.m.d", "m.d.Y", "d-m-y", "m-d-y", "M d Y", "M d, Y", "F d Y", "F d, Y"); |
|
| 347 |
- $defaulttimes = array("h:i a", "h:i A", "H:i", "g:i a", "g:i A", "G:i", "h:i:s a", "H:i:s", "g:i:s a", "g:i:s A", "G:i:s");
|
|
| 348 |
- $output .= "<h2>"._DISPLAYSETTINGS."</h2> |
|
| 349 |
- <table class='acp'> |
|
| 350 |
- <tr> |
|
| 351 |
- <td><label for='newdateformat'>"._DATEFORMAT.":</label></td><td><select name='newdateformat'><option value=''>"._SELECTONE."</option>"; |
|
| 352 |
- foreach($defaultdates as $date) {
|
|
| 353 |
- $output .= "<option value='$date'>".date("$date")."</option>";
|
|
| 354 |
- } |
|
| 355 |
- $output .= "</select> "._OR." <input type='text' name='customdateformat' class='textbox' value='$dateformat'> <a href='#' class='pophelp'>[?]<span>"._HELP_DATEFORMAT."</span></a></td> |
|
| 356 |
- </tr> |
|
| 357 |
- <tr> |
|
| 358 |
- <td><label for='newtimeformat'>"._TIMEFORMAT.":</label></td><td><select name='newtimeformat'><option value=''>"._SELECTONE."</option>"; |
|
| 359 |
- foreach($defaulttimes as $time) {
|
|
| 360 |
- $output .= "<option value='$time'>".date("$time")."</option>";
|
|
| 361 |
- } |
|
| 362 |
- $output .= " |
|
| 363 |
- </select> "._OR." <input type='text' name='customtimeformat' class='textbox' value='$timeformat'> <a href='#' class='pophelp'>[?]<span>"._HELP_TIMEFORMAT."</span></a></td> |
|
| 364 |
- </tr> |
|
| 365 |
- <tr> |
|
| 366 |
- <td><label for='newextendcats'>"._EXTENDCATS.":</label></td><td><select name='newextendcats'> |
|
| 367 |
- <option value='1'".($extendcats == "1" ? " selected" : "").">"._YES."</option> |
|
| 368 |
- <option value='0'".($extendcats == "0" ? " selected" : "").">"._NO."</option> |
|
| 369 |
- </select> <a href='#' class='pophelp'>[?]<span>"._HELP_EXTENDCATS."</span></a></td> |
|
| 370 |
- </tr> |
|
| 371 |
- <tr> |
|
| 372 |
- <td><label for='newdisplaycolumns'>"._COLUMNS.":</label></td><td><input type='text' class='textbox=' name='newdisplaycolumns' size='3' value='$displaycolumns'> <a href='#' class='pophelp'>[?]<span>"._HELP_COLUMNS."</span></a></td> |
|
| 373 |
- </tr> |
|
| 374 |
- <tr> |
|
| 375 |
- <td><label for='newitemsperpage'>"._NUMITEMS.":</label></td><td><input type='text' class='textbox' name='newitemsperpage' size='3' value='$itemsperpage'> <a href='#' class='pophelp'>[?]<span>"._HELP_ITEMSPERPAGE."</span></a></td> |
|
| 376 |
- </tr> |
|
| 377 |
- <tr> |
|
| 378 |
- <td><label for='newrecentdays'>"._RECENTDAYS.":</label></td><td><input type='text' class='textbox' name='newrecentdays' size='3' value='$recentdays'> <a href='#' class='pophelp'>[?]<span>"._HELP_RECENTDAYS."</span></a></td> |
|
| 379 |
- </tr> |
|
| 380 |
- <tr> |
|
| 381 |
- <td><label for='newdefaultsort'>"._DEFAULTSORT.":</label></td><td><select name='newdefaultsort'> |
|
| 382 |
- <option value='1'".($sitedefaultsort ? " selected" : "").">"._MOSTRECENT."</option> |
|
| 383 |
- <option value='0'".(!$sitedefaultsort ? " selected" : "").">"._ALPHA."</option> |
|
| 384 |
- </select> <a href='#' class='pophelp'>[?]<span>"._HELP_DEFAULTSORT."</span></a></td> |
|
| 385 |
- </tr> |
|
| 386 |
- <tr> |
|
| 387 |
- <td><label for='newdisplayindex'>"._STORYINDEX.":</label></td><td><select name='newstoryindex'> |
|
| 388 |
- <option value='1'".($sitedisplayindex ? " selected" : "").">"._YES."</option> |
|
| 389 |
- <option value='0'".(!$sitedisplayindex ? " selected" : "").">"._NO."</option> |
|
| 390 |
- </select> <a href='#' class='pophelp'>[?]<span>"._HELP_DISPLAYINDEX."</span></a></td> |
|
| 391 |
- </tr> |
|
| 392 |
- <tr> |
|
| 393 |
- <td><label for='newdisplayprofile'>"._DISPLAYPROFILE.":</label></td><td><select name='newdisplayprofile'> |
|
| 394 |
- <option value='1'".($displayprofile ? " selected" : "").">"._YES."</option> |
|
| 395 |
- <option value='0'".(!$displayprofile ? " selected" : "").">"._NO."</option> |
|
| 396 |
- </select> <a href='#' class='pophelp'>[?]<span>"._HELP_DISPLAYPROFILE."</span></a></td> |
|
| 397 |
- </tr> |
|
| 398 |
- <tr> |
|
| 399 |
- <td><label for='newdisplayprofile'>"._LINKSTYLE.":</label></td><td><select name='newlinkstyle'> |
|
| 400 |
- <option value='2'".($linkstyle == 2 ? " selected" : "").">"._BOTHLINKSTYLE."</option> |
|
| 401 |
- <option value='1'".($linkstyle == 1 ? " selected" : "").">"._FIRSTLAST."</option> |
|
| 402 |
- <option value='0'".(!$linkstyle ? " selected" : "").">"._NEXTPREV."</option> |
|
| 403 |
- </select> <a href='#' class='pophelp'>[?]<span>"._HELP_LINKSTYLE."</span></a></td> |
|
| 404 |
- </tr> |
|
| 405 |
- <tr> |
|
| 406 |
- <td><label for='newlinkrange'>"._LINKRANGE.":</label></td><td><input type='text' class='textbox=' name='newlinkrange' size='3' value='$linkrange'> <a href='#' class='pophelp'>[?]<span>"._HELP_LINKRANGE."</span></a></td></tr>"; |
|
| 407 |
- } |
|
| 408 |
- else if($sect == "reviews") {
|
|
| 409 |
- $output .= "<h2>"._REVIEWSETTINGS."</h2> |
|
| 410 |
- <table class='acp'> |
|
| 411 |
- <tr> |
|
| 412 |
- <td><label for='newreviewsallowed'>"._ONREVIEWS.":</label></td><td><select name='newreviewsallowed'> |
|
| 413 |
- <option value='1'".($reviewsallowed == "1" ? " selected" : "").">"._YES."</option> |
|
| 414 |
- <option value='0'".($reviewsallowed == "0" ? " selected" : "").">"._NO."</option> |
|
| 415 |
- </select> <a href='#' class='pophelp'>[?]<span>"._HELP_REVIEWSON."</span></a></td> |
|
| 416 |
- </tr> |
|
| 417 |
- <tr> |
|
| 418 |
- <td><label for='newanonreviews'>"._ANONREVIEWS.":</label></td><td><select name='newanonreviews'> |
|
| 419 |
- <option value='1'".($anonreviews == "1" ? " selected" : "").">"._YES."</option> |
|
| 420 |
- <option value='0'".($anonreviews == "0" ? " selected" : "").">"._NO."</option> |
|
| 421 |
- </select> <a href='#' class='pophelp'>[?]<span>"._HELP_ANONREVIEWS."</span></a></td> |
|
| 422 |
- </tr> |
|
| 423 |
- <tr> |
|
| 424 |
- <td><label for='newrevdelete'>"._REVDELETE.":</label></td><td><select name='newrevdelete'> |
|
| 425 |
- <option value='2'".($revdelete == 2 ? " selected" : "").">"._ALLREV."</option> |
|
| 426 |
- <option value='1'".($revdelete == 1 ? " selected" : "").">"._ANONREV."</option> |
|
| 427 |
- <option value='0'".(empty($revdelete) ? " selected" : "").">"._NONE."</option> |
|
| 428 |
- </select> <a href='#' class='pophelp'>[?]<span>"._HELP_REVDELETE."</span></a></td> |
|
| 429 |
- </tr> |
|
| 430 |
- <tr> |
|
| 431 |
- <td><label for='newratings'>"._WHATRATINGS.":</label></td><td><select name='newratings'> |
|
| 432 |
- <option value='2'".($ratings == "2" ? " selected" : "").">"._LIKESYS."</option> |
|
| 433 |
- <option value='1'".($ratings == "1" ? " selected" : "").">"._STARS."</option> |
|
| 434 |
- <option value='0'".($ratings == "0" ? " selected" : "").">"._NONE."</option> |
|
| 435 |
- </select> <a href='#' class='pophelp'>[?]<span>"._HELP_RATINGS."</span></a></td> |
|
| 436 |
- </tr> |
|
| 437 |
- <tr> |
|
| 438 |
- <td><label for='newrateonly'>"._ALLOWRATEONLY.":</label></td><td><select name='newrateonly'> |
|
| 439 |
- <option value='1'".($rateonly == "1" ? " selected" : "").">"._YES."</option> |
|
| 440 |
- <option value='0'".($rateonly == "0" ? " selected" : "").">"._NO."</option> |
|
| 441 |
- </select> <a href='#' class='pophelp'>[?]<span>"._HELP_RATEONLY."</span></a></td></tr>"; |
|
| 442 |
- } |
|
| 443 |
- else if($sect == "useropts") {
|
|
| 444 |
- $output .= "<h2>"._USERSETTINGS."</h2> |
|
| 445 |
- <table class='acp'> |
|
| 446 |
- <tr> |
|
| 447 |
- <td><label for='newalertson'>"._ALERTSON.":</label></td><td><select name='newalertson'> |
|
| 448 |
- <option value='1'".($alertson == "1" ? " selected" : "").">"._YES."</option> |
|
| 449 |
- <option value='0'".($alertson == "0" ? " selected" : "").">"._NO."</option> |
|
| 450 |
- </select> <a href='#' class='pophelp'>[?]<span>"._HELP_ALERTSON."</span></a></td> |
|
| 451 |
- </tr> |
|
| 452 |
- <tr> |
|
| 453 |
- <td><label for='newdisablepops'>"._USERPOPS.":</label></td><td><select name='newdisablepops'> |
|
| 454 |
- <option value='1'".($disablepopups ? " selected" : "").">"._YES."</option> |
|
| 455 |
- <option value='0'".(!$disablepopups ? " selected" : "").">"._NO."</option> |
|
| 456 |
- </select> <a href='#' class='pophelp'>[?]<span>"._HELP_POPUPS."</span></a></td> |
|
| 457 |
- </tr> |
|
| 458 |
- <tr> |
|
| 459 |
- <td><label for='newagestatement'>"._AGESTATEMENT.":</label></td><td><select name='newagestatement'> |
|
| 460 |
- <option value='1'".($agestatement ? " selected" : "").">"._YES."</option> |
|
| 461 |
- <option value='0'".(!$agestatement ? " selected" : "").">"._NO."</option> |
|
| 462 |
- </select> <a href='#' class='pophelp'>[?]<span>"._HELP_AGECONSENT."</span></a></td> |
|
| 463 |
- </tr> |
|
| 464 |
- <tr> |
|
| 465 |
- <td><label for='newpwdsetting'>"._PWDSETTING.":</label></td><td><select name='newpwdsetting'> |
|
| 466 |
- <option value='1'".($pwdsetting ? " selected" : "").">"._SELF."</option> |
|
| 467 |
- <option value='0'".(!$pwdsetting ? " selected" : "").">"._RANDOM."</option> |
|
| 468 |
- </select> <a href='#' class='pophelp'>[?]<span>"._HELP_PWD."</span></a></td></tr>"; |
|
| 469 |
- } |
|
| 470 |
- else if($sect == "email") {
|
|
| 471 |
- $output .= "<h2>"._EMAILSETTINGS."</h2> |
|
| 472 |
- <table class='acp'> |
|
| 473 |
- <tr> |
|
| 474 |
- <td><label for='newsmtp_host'>"._SMTPHOST.":</label></td><td><input name='newsmtp_host' type='text' value='$smtp_host'> <a href='#' class='pophelp'>[?]<span>"._HELP_SMTPHOST."</span></a></td> |
|
| 475 |
- </tr> |
|
| 476 |
- <tr> |
|
| 477 |
- <td><label for='newsmtp_username'>"._SMTPUSER.":</label></td><td><input name='newsmtp_username' type='text' value='$smtp_username'> <a href='#' class='pophelp'>[?]<span>"._HELP_SMTPUSER."</span></a></td> |
|
| 478 |
- </tr> |
|
| 479 |
- <tr> |
|
| 480 |
- <td><label for='newsmtp_password'>"._SMTPPASS.":</label></td><td><input name='newsmtp_password' type='password' value='$smtp_password'> <a href='#' class='pophelp'>[?]<span>"._HELP_SMTPPWD."</span></a></td></tr>"; |
|
| 481 |
- $output .= write_message(_SMTPOFF); |
|
| 482 |
- } |
|
| 483 |
- $output .= "<tr><td colspan='2'><div align='center'><input type='submit' id='submit' class='button' name='submit' value='"._SUBMIT."'></div></form></td></tr></table>"; |
|
| 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 |
+function updatePanelOrder( ) {
|
|
| 28 |
+ |
|
| 29 |
+ $ptypes = dbquery("SELECT panel_type FROM ".TABLEPREFIX."fanfiction_panels GROUP BY panel_type");
|
|
| 30 |
+ while($ptype = dbassoc($ptypes)) {
|
|
| 31 |
+ if($ptype['panel_type'] == "A") {
|
|
| 32 |
+ for($x = 1; $x < 5; $x++) {
|
|
| 33 |
+ $count = 1; |
|
| 34 |
+ $plist = dbquery("SELECT panel_name, panel_id FROM ".TABLEPREFIX."fanfiction_panels WHERE panel_hidden = '0' AND panel_type = '".$ptype['panel_type']."' AND panel_level = '$x' ORDER BY panel_level, panel_order");
|
|
| 35 |
+ while($p = dbassoc($plist)) {
|
|
| 36 |
+ dbquery("UPDATE ".TABLEPREFIX."fanfiction_panels SET panel_order = '$count' WHERE panel_id = '".$p['panel_id']."' LIMIT 1");
|
|
| 37 |
+ $count++; |
|
| 38 |
+ } |
|
| 39 |
+ } |
|
| 40 |
+ } |
|
| 41 |
+ else {
|
|
| 42 |
+ $count = 1; |
|
| 43 |
+ $plist = dbquery("SELECT panel_name, panel_id FROM ".TABLEPREFIX."fanfiction_panels WHERE panel_hidden = '0' AND panel_type = '".$ptype['panel_type']."' ORDER BY ".($ptype['panel_type'] == "A" ? "panel_level," : "")."panel_order");
|
|
| 44 |
+ while($p = dbassoc($plist)) {
|
|
| 45 |
+ dbquery("UPDATE ".TABLEPREFIX."fanfiction_panels SET panel_order = '$count' WHERE panel_id = '".$p['panel_id']."' LIMIT 1");
|
|
| 46 |
+ $count++; |
|
| 47 |
+ } |
|
| 48 |
+ } |
|
| 49 |
+ } |
|
| 50 |
+} |
|
| 51 |
+ |
|
| 52 |
+if($action == "settings") {
|
|
| 53 |
+$output .= "<h1>"._SETTINGS."</h1><div style='text-align: center;'> |
|
| 54 |
+ <a href='admin.php?action=settings&sect=main'>"._MAINSETTINGS."</a> | |
|
| 55 |
+ <a href='admin.php?action=settings&sect=submissions'>"._SUBMISSIONSETTINGS."</a> | |
|
| 56 |
+ <a href='admin.php?action=settings&sect=sitesettings'>"._SITESETTINGS."</a> | |
|
| 57 |
+ <a href='admin.php?action=settings&sect=display'>"._DISPLAYSETTINGS."</a> | |
|
| 58 |
+ <a href='admin.php?action=settings&sect=reviews'>"._REVIEWSETTINGS."</a> | |
|
| 59 |
+ <a href='admin.php?action=settings&sect=useropts'>"._USERSETTINGS."</a> | |
|
| 60 |
+ <a href='admin.php?action=settings&sect=email'>"._EMAILSETTINGS."</a> | |
|
| 61 |
+ <a href='admin.php?action=censor'>"._CENSOR."</a> <br /> |
|
| 62 |
+ <a href='admin.php?action=messages&message=welcome'>"._WELCOME."</a> | |
|
| 63 |
+ <a href='admin.php?action=messages&message=copyright'>"._COPYRIGHT."</a> | |
|
| 64 |
+ <a href='admin.php?action=messages&message=printercopyright'>"._PRINTERCOPYRIGHT."</a> | |
|
| 65 |
+ <a href='admin.php?action=messages&message=tinyMCE'>"._TINYMCE."</a> | |
|
| 66 |
+ <a href='admin.php?action=messages&message=nothankyou'>"._NOTHANKYOU."</a> | |
|
| 67 |
+ <a href='admin.php?action=messages&message=thankyou'>"._THANKYOU."</a><br />"; |
|
| 68 |
+ $settingsquery = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_panels WHERE panel_type = 'AS' ORDER BY panel_title");
|
|
| 69 |
+ while($os = dbassoc($settingsquery)) {
|
|
| 70 |
+ if($os['panel_url']) $othersettings[] = "<a href='".$os['panel_url']."'>".$os['panel_title']."</a>"; |
|
| 71 |
+ } |
|
| 72 |
+ if(isset($othersettings)) $output .= implode(" | ", $othersettings);
|
|
| 73 |
+$output .= "</div> "; |
|
| 74 |
+} |
|
| 75 |
+ |
|
| 76 |
+$sects = array("main", "submissions", "sitesettings", "display", "reviews", "useropts", "email");
|
|
| 77 |
+//if(!isset($_GET['sect'])) $sect = "main"; |
|
| 78 |
+//else $sect = $_GET['sect']; |
|
| 79 |
+$sect = isset($_GET['sect']) ? $_GET['sect'] : "main"; |
|
| 80 |
+if(isset($_POST['submit'])) {
|
|
| 81 |
+ if($sect == "main") {
|
|
| 82 |
+ if(!preg_match("!^[a-z0-9_]{3,30}$!i", $_POST['newsitekey'])) $output .= write_error(_BADSITEKEY);
|
|
| 83 |
+ else {
|
|
| 84 |
+ $oldsitekey = $sitekey; |
|
| 85 |
+ $sitekey = descript($_POST['newsitekey']); |
|
| 86 |
+ $sitename = escapestring(descript(strip_tags($_POST['newsitename']))); |
|
| 87 |
+ $slogan = escapestring(descript(strip_tags($_POST['newslogan']))); |
|
| 88 |
+ $url = escapestring(descript(strip_tags($_POST['newsiteurl']))); |
|
| 89 |
+ // if the http:// is missing add it. |
|
| 90 |
+ if(substr($url, 0, 7) != "http://") $url = "http://".$url; |
|
| 91 |
+ // we also want to check for a trailing slash. |
|
| 92 |
+ if(substr($url, -1, 1) == "/") $url = substr($url, 0, strlen($url) - 1); |
|
| 93 |
+ $tableprefix = escapestring(descript(strip_tags($_POST['newtableprefix']))); |
|
| 94 |
+ $siteemail = escapestring(descript(strip_tags($_POST['newsiteemail']))); |
|
| 95 |
+ $skin = escapestring(descript(strip_tags($_POST['newskin']))); |
|
| 96 |
+ $language = escapestring(descript(strip_tags($_POST['newlanguage']))); |
|
| 97 |
+ if(empty($sitekey)) $output .= write_message(_SITEKEYREQUIRED); |
|
| 98 |
+ else {
|
|
| 99 |
+ if($sitekey != $oldsitekey) $output .= write_message(_SITEKEYCHANGED); |
|
| 100 |
+ $result = dbquery("UPDATE ".$settingsprefix."fanfiction_settings SET sitekey = '$sitekey', sitename = '$sitename', slogan = '$slogan', url = '$url', tableprefix = '$tableprefix', siteemail = '$siteemail', skin = '$skin', language = '$language' WHERE sitekey = '$oldsitekey'");
|
|
| 101 |
+ } |
|
| 102 |
+ } |
|
| 103 |
+ } |
|
| 104 |
+ else if($sect == "submissions") {
|
|
| 105 |
+ $submissionsoff = $_POST['newsubmissionsoff'] == 1 ? 1 : 0; |
|
| 106 |
+ $autovalidate = $_POST['newautovalidate'] == 1 ? 1 : 0; |
|
| 107 |
+ $coauthallowed = $_POST['newcoauthallowed'] == 1 ? 1 : 0; |
|
| 108 |
+ $store = !empty($_POST['newstore']) ? $_POST['newstore'] == "files" ? "files" : "mysql" : $store; |
|
| 109 |
+ $storiespath = descript($_POST['newstoriespath']); |
|
| 110 |
+ $minwords = isNumber($_POST['newminwords']) ? $_POST['newminwords'] : 0; |
|
| 111 |
+ $maxwords = isNumber($_POST['newmaxwords']) ? $_POST['newmaxwords'] : 0; |
|
| 112 |
+ $roundrobins = $_POST['newroundrobins'] == 1 ? 1 : 0; |
|
| 113 |
+ $allowseries = $_POST['newallowseries'] && isNumber($_POST['newallowseries']) ? $_POST['newallowseries'] : 0; |
|
| 114 |
+ $imageupload = $_POST['newimageupload'] == 1 ? 1 : 0; |
|
| 115 |
+ $imageheight = isNumber($_POST['newimageheight']) ? $_POST['newimageheight'] : 0; |
|
| 116 |
+ $imagewidth = isNumber($_POST['newimagewidth']) ? $_POST['newimagewidth'] : 0; |
|
| 117 |
+ $result = dbquery("UPDATE ".$settingsprefix."fanfiction_settings SET submissionsoff = '$submissionsoff', autovalidate = '$autovalidate', coauthallowed = '$coauthallowed', store = '$store', storiespath = '$storiespath', minwords = '$minwords', maxwords = '$maxwords', imageupload = '$imageupload', imageheight = '$imageheight', imagewidth = '$imagewidth', roundrobins = '$roundrobins', allowseries = '$allowseries' WHERE sitekey ='".SITEKEY."'");
|
|
| 118 |
+ if($action == "settings") {
|
|
| 119 |
+ dbquery("UPDATE ".TABLEPREFIX."fanfiction_panels SET panel_hidden = '".($imageupload ? "0" : "1")."' WHERE panel_name LIKE 'manageimages'");
|
|
| 120 |
+ dbquery("UPDATE ".TABLEPREFIX."fanfiction_panels SET panel_hidden = '".($allowseries ? "0" : "1")."' WHERE (panel_name LIKE '%series%' OR panel_title LIKE '%series%') AND panel_type != 'A' AND panel_type != 'B'");
|
|
| 121 |
+ updatePanelOrder( ); |
|
| 122 |
+ } |
|
| 123 |
+ |
|
| 124 |
+ } |
|
| 125 |
+ else if($sect == "sitesettings") {
|
|
| 126 |
+ $tinyMCE = $_POST['newtinyMCE'] == 1 ? 1 : 0; |
|
| 127 |
+ $allowed_tags = $_POST['newallowed_tags']; |
|
| 128 |
+ $favorites = $_POST['newfavorites'] == 1 ? 1 : 0; |
|
| 129 |
+ $multiplecats = $_POST['newmultiplecats'] == 1 ? 1 : 0; |
|
| 130 |
+ $newscomments = $_POST['newnewscomments'] == 1 ? 1 : 0; |
|
| 131 |
+ $logging = $_POST['newlogging'] == 1 ? 1 : 0; |
|
| 132 |
+ $maintenance = $_POST['newmaint'] == 1 ? 1 : 0; |
|
| 133 |
+ $debug = $_POST['newdebug'] == 1 ? 1 : 0; |
|
| 134 |
+ $captcha = $_POST['newcaptcha'] == 1 ? 1 : 0; |
|
| 135 |
+ $result = dbquery("UPDATE ".$settingsprefix."fanfiction_settings SET tinyMCE = '$tinyMCE', favorites = '$favorites', multiplecats = '$multiplecats', allowed_tags = '$allowed_tags', newscomments = '$newscomments', logging = '$logging', maintenance = '$maintenance', debug = '$debug', captcha = '$captcha' WHERE sitekey ='".SITEKEY."'");
|
|
| 136 |
+ } |
|
| 137 |
+ else if($sect == "display") {
|
|
| 138 |
+ $dateformat = $_POST['newdateformat'] ? descript(strip_tags($_POST['newdateformat'])) : descript(strip_tags($_POST['customdateformat'])); |
|
| 139 |
+ $timeformat = $_POST['newtimeformat'] ? descript(strip_tags($_POST['newtimeformat'])) : descript(strip_tags($_POST['customtimeformat'])); |
|
| 140 |
+ $extendcats = $_POST['newextendcats'] == 1 ? 1 : 0; |
|
| 141 |
+ if(isset($_POST['newdisplaycolumns']) && isNumber($_POST['newdisplaycolumns'])) $displaycolumns = $_POST['newdisplaycolumns']; |
|
| 142 |
+ if(isset($_POST['newitemsperpage']) && isNumber($_POST['newitemsperpage'])) $itemsperpage = $_POST['newitemsperpage']; |
|
| 143 |
+ if(isset($_POST['newlinkstyle']) && isNumber($_POST['newlinkstyle'])) $linkstyle = $_POST['newlinkstyle']; |
|
| 144 |
+ if(isset($_POST['newlinkrange']) && isNumber($_POST['newlinkrange'])) $linkrange = $_POST['newlinkrange']; |
|
| 145 |
+ $displayindex = $_POST['newstoryindex'] == 1 ? 1 : 0; |
|
| 146 |
+ $displayprofile = $_POST['newdisplayprofile'] == 1 ? 1 : 0; |
|
| 147 |
+ $defaultsort = $_POST['newdefaultsort'] == 1 ? 1 : 0; |
|
| 148 |
+ if(isNumber($_POST['newrecentdays'])) $recentdays = $_POST['newrecentdays']; |
|
| 149 |
+ $result = dbquery("UPDATE ".$settingsprefix."fanfiction_settings SET dateformat = '$dateformat', timeformat = '$timeformat', extendcats = '$extendcats', displaycolumns = '$displaycolumns', itemsperpage = '$itemsperpage', displayindex = '$displayindex', defaultsort = '$defaultsort', recentdays = '$recentdays', displayprofile = '$displayprofile', linkstyle = '$linkstyle', linkrange = '$linkrange' WHERE sitekey ='".SITEKEY."'");
|
|
| 150 |
+ } |
|
| 151 |
+ else if($sect == "reviews") {
|
|
| 152 |
+ $reviewsallowed = $_POST['newreviewsallowed'] == 1 ? 1 : 0; |
|
| 153 |
+ $anonreviews = $_POST['newanonreviews'] == 1 ? 1 : 0; |
|
| 154 |
+ $rateonly = $_POST['newrateonly'] == 1 ? 1 : 0; |
|
| 155 |
+ $ratings = isset($_POST['newratings']) && isNumber($_POST['newratings']) ? $_POST['newratings'] : 0; |
|
| 156 |
+ $revdelete = isset($_POST['newrevdelete']) && isNumber($_POST['newrevdelete']) ? $_POST['newrevdelete'] : 0; |
|
| 157 |
+ $result = dbquery("UPDATE ".$settingsprefix."fanfiction_settings SET reviewsallowed = '$reviewsallowed', anonreviews = '$anonreviews', rateonly = '$rateonly', ratings = '$ratings', revdelete = '$revdelete' WHERE sitekey ='".SITEKEY."'");
|
|
| 158 |
+ } |
|
| 159 |
+ else if($sect == "useropts") {
|
|
| 160 |
+ $alertson = $_POST['newalertson'] == 1 ? 1 : 0; |
|
| 161 |
+ $disablepopups = $_POST['newdisablepops'] == 1 ? 1 : 0; |
|
| 162 |
+ $agestatement = $_POST['newagestatement'] == 1 ? 1 : 0; |
|
| 163 |
+ $pwdsetting = $_POST['newpwdsetting'] == 1 ? 1 : 0; |
|
| 164 |
+ $result = dbquery("UPDATE ".$settingsprefix."fanfiction_settings SET alertson = '$alertson', disablepopups = '$disablepopups', agestatement = '$agestatement', pwdsetting = '$pwdsetting' WHERE sitekey ='".SITEKEY."'");
|
|
| 165 |
+ } |
|
| 166 |
+ else if($sect == "email") {
|
|
| 167 |
+ $smtp_host = $_POST['newsmtp_host']; |
|
| 168 |
+ $smtp_username = $_POST['newsmtp_username']; |
|
| 169 |
+ $smtp_password = $_POST['newsmtp_password']; |
|
| 170 |
+ $result = dbquery("UPDATE ".$settingsprefix."fanfiction_settings SET smtp_host = '$smtp_host', smtp_username = '$smtp_username', smtp_password = '$smtp_password' WHERE sitekey ='".SITEKEY."'");
|
|
| 171 |
+ } |
|
| 172 |
+ if($result) {
|
|
| 173 |
+ $output .= write_message(_ACTIONSUCCESSFUL); |
|
| 174 |
+ $sect = $sects[(array_search($sect, $sects) + 1)]; |
|
| 175 |
+ if(!$sect) $sect = $sects[0]; |
|
| 176 |
+ } |
|
| 177 |
+ else $output .= write_error(_ERROR); |
|
| 178 |
+} |
|
| 179 |
+ $settingsresults = dbquery("SELECT * FROM ".$settingsprefix."fanfiction_settings WHERE sitekey ='".SITEKEY."'");
|
|
| 180 |
+ $settings = dbassoc($settingsresults); |
|
| 181 |
+ |
|
| 182 |
+ foreach($settings as $var => $val) {
|
|
| 183 |
+ if(is_NULL($val)) $val = ''; |
|
| 184 |
+ $$var = stripslashes($val ); |
|
| 185 |
+ } |
|
| 186 |
+ |
|
| 187 |
+ $output .= "<form method='POST' class='tblborder' style='' enctype='multipart/form-data' action='".($action == "settings" ? "admin.php?action=settings" : $_SERVER['PHP_SELF']."?step=".$_GET['step'])."&sect=$sect'>"; |
|
| 188 |
+ if($sect == "main") {
|
|
| 189 |
+ $output .= "<h2>"._SITEINFO."</h2> |
|
| 190 |
+ <table class='acp'> |
|
| 191 |
+ <tr> |
|
| 192 |
+ <td><label for='newsitekey'>"._SITEKEY.":</label></td><td><input type='text' class='textbox' name='newsitekey' value='".SITEKEY."'> <a href='#' class='pophelp'>[?]<span>"._HELP_SITEKEY."</span></a></td> |
|
| 193 |
+ </tr> |
|
| 194 |
+ <tr> |
|
| 195 |
+ <td><label for='newsitename'>"._SITENAME.":</label></td><td><input type='text' class='textbox' name='newsitename' value='".htmlspecialchars($sitename, ENT_QUOTES)."'> <a href='#' class='pophelp'>[?]<span>"._HELP_SITENAME."</span></a></td> |
|
| 196 |
+ </tr> |
|
| 197 |
+ <tr> |
|
| 198 |
+ <td><label for='newslogan'>"._SITESLOGAN.":</label></td><td><input type='text' class='textbox' name='newslogan' value='".htmlspecialchars($slogan, ENT_QUOTES)."'> <a href='#' class='pophelp'>[?]<span>"._HELP_SLOGAN."</span></a></td> |
|
| 199 |
+ </tr> |
|
| 200 |
+ <tr> |
|
| 201 |
+ <td><label for='newurl'>"._SITEURL.":</label></td><td><input type='text' class='textbox' name='newsiteurl' value='$url'> <a href='#' class='pophelp'>[?]<span>"._HELP_URL."</span></a></td> |
|
| 202 |
+ </tr> |
|
| 203 |
+ <tr> |
|
| 204 |
+ <td><label for='newtableprefix'>"._TABLEPREFIX.":</label></td><td><input type='text' class='textbox' name='newtableprefix' value='".TABLEPREFIX."'> <a href='#' class='pophelp'>[?]<span>"._HELP_TABLEPREFIX."</span></a></td> |
|
| 205 |
+ </tr> |
|
| 206 |
+ <tr> |
|
| 207 |
+ <td><label for='newsiteemail'>"._ADMINEMAIL.":</label></td><td><input type='text' class='textbox' name='newsiteemail' value='$siteemail'> <a href='#' class='pophelp'>[?]<span>"._HELP_SITEEMAIL."</span></a></td> |
|
| 208 |
+ </tr> |
|
| 209 |
+ <tr> |
|
| 210 |
+ <td><label for='newsiteskin'>"._DEFAULTSKIN.":</label></td><td><select name='newskin'>"; |
|
| 211 |
+ $directory = opendir(_BASEDIR."skins"); |
|
| 212 |
+ while($filename = readdir($directory)) {
|
|
| 213 |
+ if($filename=="." || $filename==".." || !is_dir(_BASEDIR."skins/".$filename)) continue; |
|
| 214 |
+ $output .= "<option value='$filename'".($skin == $filename ? " selected" : "").">$filename</option>"; |
|
| 215 |
+ } |
|
| 216 |
+ closedir($directory); |
|
| 217 |
+ $output .= "</select> <a href='#' class='pophelp'>[?]<span>"._HELP_SITESKIN."</span></a></td> |
|
| 218 |
+ </tr> |
|
| 219 |
+ <tr> |
|
| 220 |
+ <td><label for='newlanguage'>"._LANGUAGE.":</label></td><td><select name='newlanguage'>"; |
|
| 221 |
+ $directory = opendir(_BASEDIR."languages"); |
|
| 222 |
+ while($filename = readdir($directory)) {
|
|
| 223 |
+ if($filename=="." || $filename==".." || substr($filename, 2) == "_admin.php") continue; |
|
| 224 |
+ $output .= "<option value='".substr($filename, 0, 2)."'". |
|
| 225 |
+ ($language == substr($filename, 0, strpos($filename, ".php")) ? " selected" : "")."> |
|
| 226 |
+ ".substr($filename, 0, strpos($filename, ".php"))."</option>"; |
|
| 227 |
+ } |
|
| 228 |
+ closedir($directory); |
|
| 229 |
+ $output .= "</select> <a href='#' class='pophelp'>[?]<span>"._HELP_LANGUAGE."</span></a></td></tr>"; |
|
| 230 |
+ } |
|
| 231 |
+ else if($sect == "submissions") {
|
|
| 232 |
+ $output .= "<h2>"._SUBMISSIONSETTINGS."</h2> |
|
| 233 |
+ <table class='acp'> |
|
| 234 |
+ <tr> |
|
| 235 |
+ <td><label for='newsubmissionsoff'>"._NOSUBS.":</label></td><td><select name='newsubmissionsoff'> |
|
| 236 |
+ <option value='1'".($submissionsoff == "1" ? " selected" : "").">"._YES."</option> |
|
| 237 |
+ <option value='0'".($submissionsoff == "0" ? " selected" : "").">"._NO."</option> |
|
| 238 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_SUBSOFF."</span></a></td> |
|
| 239 |
+ </tr> |
|
| 240 |
+ <tr> |
|
| 241 |
+ <td><label for='newautovalidate'>"._AUTOVALIDATE.":</label></td><td><select name='newautovalidate'> |
|
| 242 |
+ <option value='1'".($autovalidate == "1" ? "selected" : "").">"._YES."</option> |
|
| 243 |
+ <option value='0'".($autovalidate == "0" ? "selected" : "").">"._NO."</option> |
|
| 244 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_AUTOVALIDATE."</span></a></td> |
|
| 245 |
+ </tr> |
|
| 246 |
+ <tr> |
|
| 247 |
+ <td><label for='newcoauthallowed'>"._COAUTHALLOW.":</label></td><td><select name='newcoauthallowed'> |
|
| 248 |
+ <option value='1'".($coauthallowed == "1" ? "selected" : "").">"._YES."</option> |
|
| 249 |
+ <option value='0'".($coauthallowed == "0" ? "selected" : "").">"._NO."</option> |
|
| 250 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_COAUTHORS."</span></a></td> |
|
| 251 |
+ </tr> |
|
| 252 |
+ <tr> |
|
| 253 |
+ <td><label for='newroundrobins'>"._ALLOWRR.":</label></td><td><select name='newroundrobins'> |
|
| 254 |
+ <option value='1'".($roundrobins == "1" ? " selected" : "").">"._YES."</option> |
|
| 255 |
+ <option value='0'".($roundrobins == "0" ? " selected" : "").">"._NO."</option> |
|
| 256 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_ROUNDROBINS."</span></a></td> |
|
| 257 |
+ </tr> |
|
| 258 |
+ <tr> |
|
| 259 |
+ <td><label for='newallowseries'>"._ALLOWSERIES.":</label></td><td><select name='newallowseries'> |
|
| 260 |
+ <option value='2'".($allowseries == "2" ? " selected" : "").">"._ALLMEMBERS."</option> |
|
| 261 |
+ <option value='1'".($allowseries == "1" ? " selected" : "").">"._AUTHORSONLY."</option> |
|
| 262 |
+ <option value='0'".($allowseries == "0" ? " selected" : "").">"._ADMINS."</option> |
|
| 263 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_ALLOWSERIES."</span></a></td> |
|
| 264 |
+ </tr> |
|
| 265 |
+ <tr> |
|
| 266 |
+ <td><label for='newimageupload'>"._IMAGEUPLOAD.":</label></td><td><select name='newimageupload'> |
|
| 267 |
+ <option value='1'".($imageupload == "1" ? " selected" : "").">"._YES."</option> |
|
| 268 |
+ <option value='0'".($imageupload == "0" ? " selected" : "").">"._NO."</option> |
|
| 269 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_IMAGEUPLOAD."</span></a></td> |
|
| 270 |
+ </tr> |
|
| 271 |
+ <tr> |
|
| 272 |
+ <td colspan='2'><fieldset style='margin: 0 auto;'><legend>"._IMAGESIZE." <a href='#' class='pophelp'>[?]<span>"._HELP_IMAGESIZE."</span></a></legend> |
|
| 273 |
+ <label for='newimageheight'>"._MAXHEIGHT.":</label> <input type='text' class='textbox=' name='newimageheight' value='$imageheight' size='5'> <br /> |
|
| 274 |
+ <label for='newimagewidth'>"._MAXWIDTH.":</label> <input type='text' class='textbox=' name='newimagewidth' value='$imagewidth' size='5'></fieldset></td> |
|
| 275 |
+ </tr> |
|
| 276 |
+ <tr> |
|
| 277 |
+ <td><label for='newstore'>"._HOWSTORE.":</label></td><td><select name='newstore' onChange='if (this.disabled) this.selectedIndex=0' disabled> |
|
| 278 |
+ <option value='files'".($store == "files" || !$store ? " selected" : "").">"._FILES."</option> |
|
| 279 |
+ <option value='mysql'".($store == "mysql" ? " selected" : "").">"._MYSQL."</option> |
|
| 280 |
+ </select> <input class='textbox=' type='checkbox' class='checkbox' name='r1' onClick='this.form.newstore.disabled=false' checked> <a href='#' class='pophelp'>[?]<span>"._HELP_STORE."</span></a></td> |
|
| 281 |
+ </tr> |
|
| 282 |
+ <tr> |
|
| 283 |
+ <td><label for='newstoriespath'>"._STORIESPATH.":</label></td><td><input type='text' class='textbox=' name='newstoriespath' value='$storiespath'> <a href='#' class='pophelp'>[?]<span>"._HELP_STORIESPATH."</span></a></td> |
|
| 284 |
+ </tr> |
|
| 285 |
+ <tr> |
|
| 286 |
+ <td colspan='2'><fieldset style='margin: 0 auto;'><legend>"._MAXMINWORDS."<a href='#' class='pophelp'>[?]<span>"._HELP_MINMAXWORDS."</span></a></legend> |
|
| 287 |
+ <label for='newminwords'>"._MIN.":</label> <input type='text' class='textbox=' name='newminwords' value='$minwords' size='5'> <br /> |
|
| 288 |
+ <label for='newmaxwords'>"._MAX.":</label> <input type='text' class='textbox=' name='newmaxwords' value='$maxwords' size='7'></fieldset></td></tr>"; |
|
| 289 |
+ } |
|
| 290 |
+ else if($sect == "sitesettings") {
|
|
| 291 |
+ $output .= "<h2>"._SITESETTINGS."</h2> |
|
| 292 |
+ <table class='acp'> |
|
| 293 |
+ <tr> |
|
| 294 |
+ <td><label for='newtinyMCE'>"._USETINYMCE.": </label></td><td><select name='newtinyMCE'> |
|
| 295 |
+ <option value='1'".($tinyMCE ? " selected" : "").">"._YES."</option> |
|
| 296 |
+ <option value='0'".(!$tinyMCE ? " selected" : "").">"._NO."</option> |
|
| 297 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_TINYMCE." "._TINYMCENOTE."</span></a></td> |
|
| 298 |
+ </tr> |
|
| 299 |
+ <tr> |
|
| 300 |
+ <td><label for='newallowed_tags'>"._TAGS.": </label></td><td><input type='text' class='textbox' name='newallowed_tags' value='".($allowed_tags ? $allowed_tags : "<strong><em><br /><br><blockquote><strike><font><b><i><u><center><img><a><hr><p><ul><li><ol>")."' size='40'> <a href='#' class='pophelp'>[?]<span>"._HELP_ALLOWEDTAGS." "._TINYMCENOTE."</span></a></td> |
|
| 301 |
+ </tr> |
|
| 302 |
+ <tr> |
|
| 303 |
+ <td><label for='newfavorites'>"._FAVORITES.": </label></td><td><select name='newfavorites'> |
|
| 304 |
+ <option value='1'".($favorites == "1" ? " selected" : "").">"._YES."</option> |
|
| 305 |
+ <option value='0'".($favorites == "0" ? " selected" : "").">"._NO."</option> |
|
| 306 |
+ </select><a href='#' class='pophelp'>[?]<span>"._HELP_FAVORITES."</span></a></td> |
|
| 307 |
+ </tr> |
|
| 308 |
+ <tr> |
|
| 309 |
+ <td><label for='newmultplecats'>"._NUMCATS.": </label></td><td><select name='newmultiplecats'> |
|
| 310 |
+ <option value='1'".($multiplecats == "1" ? "selected" : "").">"._MORETHANONE."</option> |
|
| 311 |
+ <option value='0'".($multiplecats == "0" ? "selected" : "").">"._ONLYONE."</option> |
|
| 312 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_NUMCATS."</span></a></td> |
|
| 313 |
+ </tr> |
|
| 314 |
+ <tr> |
|
| 315 |
+ <td><label for='newnewscomments'>"._NEWSCOMMENTS.": </label></td><td><select name='newnewscomments'> |
|
| 316 |
+ <option value='1'".($newscomments == "1" ? " selected" : "").">"._YES."</option> |
|
| 317 |
+ <option value='0'".($newscomments == "0" ? " selected" : "").">"._NO."</option> |
|
| 318 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_NEWSCOMMENTS."</span></a></td> |
|
| 319 |
+ </tr> |
|
| 320 |
+ <tr> |
|
| 321 |
+ <td><label for='newlogging'>"._LOGGING.": </label></td><td><select name='newlogging'> |
|
| 322 |
+ <option value='1'".($logging == "1" ? " selected" : "").">"._YES."</option> |
|
| 323 |
+ <option value='0'".($logging == "0" ? " selected" : "").">"._NO."</option> |
|
| 324 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_LOGGING."</span></a></td> |
|
| 325 |
+ </tr> |
|
| 326 |
+ <tr> |
|
| 327 |
+ <td><label for='newmaint'>"._MAINTENANCE.": </label></td><td><select name='newmaint'> |
|
| 328 |
+ <option value='1'".($maintenance == "1" ? " selected" : "").">"._YES."</option> |
|
| 329 |
+ <option value='0'".($maintenance == "0" ? " selected" : "").">"._NO."</option> |
|
| 330 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_MAINTENANCE."</span></a></td> |
|
| 331 |
+ </tr> |
|
| 332 |
+ <tr> |
|
| 333 |
+ <td><label for='newdebug'>"._DEBUG.": </label></td><td><select name='newdebug'> |
|
| 334 |
+ <option value='1'".($debug == "1" ? " selected" : "").">"._YES."</option> |
|
| 335 |
+ <option value='0'".(!isset($debug) || $debug == "0" ? " selected" : "").">"._NO."</option> |
|
| 336 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_DEBUG."</span></a></td> |
|
| 337 |
+ </tr> |
|
| 338 |
+ <tr> |
|
| 339 |
+ <td><label for='newcaptcha'>"._CAPTCHA.": </label></td><td><select name='newcaptcha'> |
|
| 340 |
+ <option value='1'".($captcha == "1" ? " selected" : "").">"._YES."</option> |
|
| 341 |
+ <option value='0'".(!isset($captcha) || $captcha == "0" ? " selected" : "").">"._NO."</option> |
|
| 342 |
+ </select><a href='#' class='pophelp'>[?]<span>"._HELP_CAPTCHA."</span></a></td></tr>"; |
|
| 343 |
+ } |
|
| 344 |
+ else if($sect == "display") {
|
|
| 345 |
+ $settings = dbquery("SELECT defaultsort, displayindex FROM ".$settingsprefix."fanfiction_settings WHERE sitekey ='".SITEKEY."'");
|
|
| 346 |
+ list($sitedefaultsort, $sitedisplayindex) = dbrow($settings); |
|
| 347 |
+ $defaultdates = array("m/d/y", "m/d/Y", "m/d/Y", "d/m/Y", "d/m/y", "d M Y",
|
|
| 348 |
+ "d.m.y", "Y.m.d", "m.d.Y", "d-m-y", "m-d-y", "M d Y", "M d, Y", "F d Y", "F d, Y"); |
|
| 349 |
+ $defaulttimes = array("h:i a", "h:i A", "H:i", "g:i a", "g:i A", "G:i", "h:i:s a", "H:i:s", "g:i:s a", "g:i:s A", "G:i:s");
|
|
| 350 |
+ $output .= "<h2>"._DISPLAYSETTINGS."</h2> |
|
| 351 |
+ <table class='acp'> |
|
| 352 |
+ <tr> |
|
| 353 |
+ <td><label for='newdateformat'>"._DATEFORMAT.":</label></td><td><select name='newdateformat'><option value=''>"._SELECTONE."</option>"; |
|
| 354 |
+ foreach($defaultdates as $date) {
|
|
| 355 |
+ $output .= "<option value='$date'>".date("$date")."</option>";
|
|
| 356 |
+ } |
|
| 357 |
+ $output .= "</select> "._OR." <input type='text' name='customdateformat' class='textbox' value='$dateformat'> <a href='#' class='pophelp'>[?]<span>"._HELP_DATEFORMAT."</span></a></td> |
|
| 358 |
+ </tr> |
|
| 359 |
+ <tr> |
|
| 360 |
+ <td><label for='newtimeformat'>"._TIMEFORMAT.":</label></td><td><select name='newtimeformat'><option value=''>"._SELECTONE."</option>"; |
|
| 361 |
+ foreach($defaulttimes as $time) {
|
|
| 362 |
+ $output .= "<option value='$time'>".date("$time")."</option>";
|
|
| 363 |
+ } |
|
| 364 |
+ $output .= " |
|
| 365 |
+ </select> "._OR." <input type='text' name='customtimeformat' class='textbox' value='$timeformat'> <a href='#' class='pophelp'>[?]<span>"._HELP_TIMEFORMAT."</span></a></td> |
|
| 366 |
+ </tr> |
|
| 367 |
+ <tr> |
|
| 368 |
+ <td><label for='newextendcats'>"._EXTENDCATS.":</label></td><td><select name='newextendcats'> |
|
| 369 |
+ <option value='1'".($extendcats == "1" ? " selected" : "").">"._YES."</option> |
|
| 370 |
+ <option value='0'".($extendcats == "0" ? " selected" : "").">"._NO."</option> |
|
| 371 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_EXTENDCATS."</span></a></td> |
|
| 372 |
+ </tr> |
|
| 373 |
+ <tr> |
|
| 374 |
+ <td><label for='newdisplaycolumns'>"._COLUMNS.":</label></td><td><input type='text' class='textbox=' name='newdisplaycolumns' size='3' value='$displaycolumns'> <a href='#' class='pophelp'>[?]<span>"._HELP_COLUMNS."</span></a></td> |
|
| 375 |
+ </tr> |
|
| 376 |
+ <tr> |
|
| 377 |
+ <td><label for='newitemsperpage'>"._NUMITEMS.":</label></td><td><input type='text' class='textbox' name='newitemsperpage' size='3' value='$itemsperpage'> <a href='#' class='pophelp'>[?]<span>"._HELP_ITEMSPERPAGE."</span></a></td> |
|
| 378 |
+ </tr> |
|
| 379 |
+ <tr> |
|
| 380 |
+ <td><label for='newrecentdays'>"._RECENTDAYS.":</label></td><td><input type='text' class='textbox' name='newrecentdays' size='3' value='$recentdays'> <a href='#' class='pophelp'>[?]<span>"._HELP_RECENTDAYS."</span></a></td> |
|
| 381 |
+ </tr> |
|
| 382 |
+ <tr> |
|
| 383 |
+ <td><label for='newdefaultsort'>"._DEFAULTSORT.":</label></td><td><select name='newdefaultsort'> |
|
| 384 |
+ <option value='1'".($sitedefaultsort ? " selected" : "").">"._MOSTRECENT."</option> |
|
| 385 |
+ <option value='0'".(!$sitedefaultsort ? " selected" : "").">"._ALPHA."</option> |
|
| 386 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_DEFAULTSORT."</span></a></td> |
|
| 387 |
+ </tr> |
|
| 388 |
+ <tr> |
|
| 389 |
+ <td><label for='newdisplayindex'>"._STORYINDEX.":</label></td><td><select name='newstoryindex'> |
|
| 390 |
+ <option value='1'".($sitedisplayindex ? " selected" : "").">"._YES."</option> |
|
| 391 |
+ <option value='0'".(!$sitedisplayindex ? " selected" : "").">"._NO."</option> |
|
| 392 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_DISPLAYINDEX."</span></a></td> |
|
| 393 |
+ </tr> |
|
| 394 |
+ <tr> |
|
| 395 |
+ <td><label for='newdisplayprofile'>"._DISPLAYPROFILE.":</label></td><td><select name='newdisplayprofile'> |
|
| 396 |
+ <option value='1'".($displayprofile ? " selected" : "").">"._YES."</option> |
|
| 397 |
+ <option value='0'".(!$displayprofile ? " selected" : "").">"._NO."</option> |
|
| 398 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_DISPLAYPROFILE."</span></a></td> |
|
| 399 |
+ </tr> |
|
| 400 |
+ <tr> |
|
| 401 |
+ <td><label for='newdisplayprofile'>"._LINKSTYLE.":</label></td><td><select name='newlinkstyle'> |
|
| 402 |
+ <option value='2'".($linkstyle == 2 ? " selected" : "").">"._BOTHLINKSTYLE."</option> |
|
| 403 |
+ <option value='1'".($linkstyle == 1 ? " selected" : "").">"._FIRSTLAST."</option> |
|
| 404 |
+ <option value='0'".(!$linkstyle ? " selected" : "").">"._NEXTPREV."</option> |
|
| 405 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_LINKSTYLE."</span></a></td> |
|
| 406 |
+ </tr> |
|
| 407 |
+ <tr> |
|
| 408 |
+ <td><label for='newlinkrange'>"._LINKRANGE.":</label></td><td><input type='text' class='textbox=' name='newlinkrange' size='3' value='$linkrange'> <a href='#' class='pophelp'>[?]<span>"._HELP_LINKRANGE."</span></a></td></tr>"; |
|
| 409 |
+ } |
|
| 410 |
+ else if($sect == "reviews") {
|
|
| 411 |
+ $output .= "<h2>"._REVIEWSETTINGS."</h2> |
|
| 412 |
+ <table class='acp'> |
|
| 413 |
+ <tr> |
|
| 414 |
+ <td><label for='newreviewsallowed'>"._ONREVIEWS.":</label></td><td><select name='newreviewsallowed'> |
|
| 415 |
+ <option value='1'".($reviewsallowed == "1" ? " selected" : "").">"._YES."</option> |
|
| 416 |
+ <option value='0'".($reviewsallowed == "0" ? " selected" : "").">"._NO."</option> |
|
| 417 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_REVIEWSON."</span></a></td> |
|
| 418 |
+ </tr> |
|
| 419 |
+ <tr> |
|
| 420 |
+ <td><label for='newanonreviews'>"._ANONREVIEWS.":</label></td><td><select name='newanonreviews'> |
|
| 421 |
+ <option value='1'".($anonreviews == "1" ? " selected" : "").">"._YES."</option> |
|
| 422 |
+ <option value='0'".($anonreviews == "0" ? " selected" : "").">"._NO."</option> |
|
| 423 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_ANONREVIEWS."</span></a></td> |
|
| 424 |
+ </tr> |
|
| 425 |
+ <tr> |
|
| 426 |
+ <td><label for='newrevdelete'>"._REVDELETE.":</label></td><td><select name='newrevdelete'> |
|
| 427 |
+ <option value='2'".($revdelete == 2 ? " selected" : "").">"._ALLREV."</option> |
|
| 428 |
+ <option value='1'".($revdelete == 1 ? " selected" : "").">"._ANONREV."</option> |
|
| 429 |
+ <option value='0'".(empty($revdelete) ? " selected" : "").">"._NONE."</option> |
|
| 430 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_REVDELETE."</span></a></td> |
|
| 431 |
+ </tr> |
|
| 432 |
+ <tr> |
|
| 433 |
+ <td><label for='newratings'>"._WHATRATINGS.":</label></td><td><select name='newratings'> |
|
| 434 |
+ <option value='2'".($ratings == "2" ? " selected" : "").">"._LIKESYS."</option> |
|
| 435 |
+ <option value='1'".($ratings == "1" ? " selected" : "").">"._STARS."</option> |
|
| 436 |
+ <option value='0'".($ratings == "0" ? " selected" : "").">"._NONE."</option> |
|
| 437 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_RATINGS."</span></a></td> |
|
| 438 |
+ </tr> |
|
| 439 |
+ <tr> |
|
| 440 |
+ <td><label for='newrateonly'>"._ALLOWRATEONLY.":</label></td><td><select name='newrateonly'> |
|
| 441 |
+ <option value='1'".($rateonly == "1" ? " selected" : "").">"._YES."</option> |
|
| 442 |
+ <option value='0'".($rateonly == "0" ? " selected" : "").">"._NO."</option> |
|
| 443 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_RATEONLY."</span></a></td></tr>"; |
|
| 444 |
+ } |
|
| 445 |
+ else if($sect == "useropts") {
|
|
| 446 |
+ $output .= "<h2>"._USERSETTINGS."</h2> |
|
| 447 |
+ <table class='acp'> |
|
| 448 |
+ <tr> |
|
| 449 |
+ <td><label for='newalertson'>"._ALERTSON.":</label></td><td><select name='newalertson'> |
|
| 450 |
+ <option value='1'".($alertson == "1" ? " selected" : "").">"._YES."</option> |
|
| 451 |
+ <option value='0'".($alertson == "0" ? " selected" : "").">"._NO."</option> |
|
| 452 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_ALERTSON."</span></a></td> |
|
| 453 |
+ </tr> |
|
| 454 |
+ <tr> |
|
| 455 |
+ <td><label for='newdisablepops'>"._USERPOPS.":</label></td><td><select name='newdisablepops'> |
|
| 456 |
+ <option value='1'".($disablepopups ? " selected" : "").">"._YES."</option> |
|
| 457 |
+ <option value='0'".(!$disablepopups ? " selected" : "").">"._NO."</option> |
|
| 458 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_POPUPS."</span></a></td> |
|
| 459 |
+ </tr> |
|
| 460 |
+ <tr> |
|
| 461 |
+ <td><label for='newagestatement'>"._AGESTATEMENT.":</label></td><td><select name='newagestatement'> |
|
| 462 |
+ <option value='1'".($agestatement ? " selected" : "").">"._YES."</option> |
|
| 463 |
+ <option value='0'".(!$agestatement ? " selected" : "").">"._NO."</option> |
|
| 464 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_AGECONSENT."</span></a></td> |
|
| 465 |
+ </tr> |
|
| 466 |
+ <tr> |
|
| 467 |
+ <td><label for='newpwdsetting'>"._PWDSETTING.":</label></td><td><select name='newpwdsetting'> |
|
| 468 |
+ <option value='1'".($pwdsetting ? " selected" : "").">"._SELF."</option> |
|
| 469 |
+ <option value='0'".(!$pwdsetting ? " selected" : "").">"._RANDOM."</option> |
|
| 470 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_PWD."</span></a></td></tr>"; |
|
| 471 |
+ } |
|
| 472 |
+ else if($sect == "email") {
|
|
| 473 |
+ $output .= "<h2>"._EMAILSETTINGS."</h2> |
|
| 474 |
+ <table class='acp'> |
|
| 475 |
+ <tr> |
|
| 476 |
+ <td><label for='newsmtp_host'>"._SMTPHOST.":</label></td><td><input name='newsmtp_host' type='text' value='$smtp_host'> <a href='#' class='pophelp'>[?]<span>"._HELP_SMTPHOST."</span></a></td> |
|
| 477 |
+ </tr> |
|
| 478 |
+ <tr> |
|
| 479 |
+ <td><label for='newsmtp_username'>"._SMTPUSER.":</label></td><td><input name='newsmtp_username' type='text' value='$smtp_username'> <a href='#' class='pophelp'>[?]<span>"._HELP_SMTPUSER."</span></a></td> |
|
| 480 |
+ </tr> |
|
| 481 |
+ <tr> |
|
| 482 |
+ <td><label for='newsmtp_password'>"._SMTPPASS.":</label></td><td><input name='newsmtp_password' type='password' value='$smtp_password'> <a href='#' class='pophelp'>[?]<span>"._HELP_SMTPPWD."</span></a></td></tr>"; |
|
| 483 |
+ $output .= write_message(_SMTPOFF); |
|
| 484 |
+ } |
|
| 485 |
+ $output .= "<tr><td colspan='2'><div align='center'><input type='submit' id='submit' class='button' name='submit' value='"._SUBMIT."'></div></form></td></tr></table>"; |
|
| 484 | 486 |
?> |
| 485 | 487 |
\ No newline at end of file |
| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,484 @@ |
| 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 |
+function updatePanelOrder( ) {
|
|
| 28 |
+ |
|
| 29 |
+ $ptypes = dbquery("SELECT panel_type FROM ".TABLEPREFIX."fanfiction_panels GROUP BY panel_type");
|
|
| 30 |
+ while($ptype = dbassoc($ptypes)) {
|
|
| 31 |
+ if($ptype['panel_type'] == "A") {
|
|
| 32 |
+ for($x = 1; $x < 5; $x++) {
|
|
| 33 |
+ $count = 1; |
|
| 34 |
+ $plist = dbquery("SELECT panel_name, panel_id FROM ".TABLEPREFIX."fanfiction_panels WHERE panel_hidden = '0' AND panel_type = '".$ptype['panel_type']."' AND panel_level = '$x' ORDER BY panel_level, panel_order");
|
|
| 35 |
+ while($p = dbassoc($plist)) {
|
|
| 36 |
+ dbquery("UPDATE ".TABLEPREFIX."fanfiction_panels SET panel_order = '$count' WHERE panel_id = '".$p['panel_id']."' LIMIT 1");
|
|
| 37 |
+ $count++; |
|
| 38 |
+ } |
|
| 39 |
+ } |
|
| 40 |
+ } |
|
| 41 |
+ else {
|
|
| 42 |
+ $count = 1; |
|
| 43 |
+ $plist = dbquery("SELECT panel_name, panel_id FROM ".TABLEPREFIX."fanfiction_panels WHERE panel_hidden = '0' AND panel_type = '".$ptype['panel_type']."' ORDER BY ".($ptype['panel_type'] == "A" ? "panel_level," : "")."panel_order");
|
|
| 44 |
+ while($p = dbassoc($plist)) {
|
|
| 45 |
+ dbquery("UPDATE ".TABLEPREFIX."fanfiction_panels SET panel_order = '$count' WHERE panel_id = '".$p['panel_id']."' LIMIT 1");
|
|
| 46 |
+ $count++; |
|
| 47 |
+ } |
|
| 48 |
+ } |
|
| 49 |
+ } |
|
| 50 |
+} |
|
| 51 |
+ |
|
| 52 |
+if($action == "settings") {
|
|
| 53 |
+$output .= "<h1>"._SETTINGS."</h1><div style='text-align: center;'> |
|
| 54 |
+ <a href='admin.php?action=settings&sect=main'>"._MAINSETTINGS."</a> | |
|
| 55 |
+ <a href='admin.php?action=settings&sect=submissions'>"._SUBMISSIONSETTINGS."</a> | |
|
| 56 |
+ <a href='admin.php?action=settings&sect=sitesettings'>"._SITESETTINGS."</a> | |
|
| 57 |
+ <a href='admin.php?action=settings&sect=display'>"._DISPLAYSETTINGS."</a> | |
|
| 58 |
+ <a href='admin.php?action=settings&sect=reviews'>"._REVIEWSETTINGS."</a> | |
|
| 59 |
+ <a href='admin.php?action=settings&sect=useropts'>"._USERSETTINGS."</a> | |
|
| 60 |
+ <a href='admin.php?action=settings&sect=email'>"._EMAILSETTINGS."</a> | |
|
| 61 |
+ <a href='admin.php?action=censor'>"._CENSOR."</a> <br /> |
|
| 62 |
+ <a href='admin.php?action=messages&message=welcome'>"._WELCOME."</a> | |
|
| 63 |
+ <a href='admin.php?action=messages&message=copyright'>"._COPYRIGHT."</a> | |
|
| 64 |
+ <a href='admin.php?action=messages&message=printercopyright'>"._PRINTERCOPYRIGHT."</a> | |
|
| 65 |
+ <a href='admin.php?action=messages&message=tinyMCE'>"._TINYMCE."</a> | |
|
| 66 |
+ <a href='admin.php?action=messages&message=nothankyou'>"._NOTHANKYOU."</a> | |
|
| 67 |
+ <a href='admin.php?action=messages&message=thankyou'>"._THANKYOU."</a><br />"; |
|
| 68 |
+ $settingsquery = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_panels WHERE panel_type = 'AS' ORDER BY panel_title");
|
|
| 69 |
+ while($os = dbassoc($settingsquery)) {
|
|
| 70 |
+ if($os['panel_url']) $othersettings[] = "<a href='".$os['panel_url']."'>".$os['panel_title']."</a>"; |
|
| 71 |
+ } |
|
| 72 |
+ if(isset($othersettings)) $output .= implode(" | ", $othersettings);
|
|
| 73 |
+$output .= "</div> "; |
|
| 74 |
+} |
|
| 75 |
+ |
|
| 76 |
+$sects = array("main", "submissions", "sitesettings", "display", "reviews", "useropts", "email");
|
|
| 77 |
+//if(!isset($_GET['sect'])) $sect = "main"; |
|
| 78 |
+//else $sect = $_GET['sect']; |
|
| 79 |
+$sect = isset($_GET['sect']) ? $_GET['sect'] : "main"; |
|
| 80 |
+if(isset($_POST['submit'])) {
|
|
| 81 |
+ if($sect == "main") {
|
|
| 82 |
+ if(!preg_match("!^[a-z0-9_]{3,30}$!i", $_POST['newsitekey'])) $output .= write_error(_BADSITEKEY);
|
|
| 83 |
+ else {
|
|
| 84 |
+ $oldsitekey = $sitekey; |
|
| 85 |
+ $sitekey = descript($_POST['newsitekey']); |
|
| 86 |
+ $sitename = escapestring(descript(strip_tags($_POST['newsitename']))); |
|
| 87 |
+ $slogan = escapestring(descript(strip_tags($_POST['newslogan']))); |
|
| 88 |
+ $url = escapestring(descript(strip_tags($_POST['newsiteurl']))); |
|
| 89 |
+ // if the http:// is missing add it. |
|
| 90 |
+ if(substr($url, 0, 7) != "http://") $url = "http://".$url; |
|
| 91 |
+ // we also want to check for a trailing slash. |
|
| 92 |
+ if(substr($url, -1, 1) == "/") $url = substr($url, 0, strlen($url) - 1); |
|
| 93 |
+ $tableprefix = escapestring(descript(strip_tags($_POST['newtableprefix']))); |
|
| 94 |
+ $siteemail = escapestring(descript(strip_tags($_POST['newsiteemail']))); |
|
| 95 |
+ $skin = escapestring(descript(strip_tags($_POST['newskin']))); |
|
| 96 |
+ $language = escapestring(descript(strip_tags($_POST['newlanguage']))); |
|
| 97 |
+ if(empty($sitekey)) $output .= write_message(_SITEKEYREQUIRED); |
|
| 98 |
+ else {
|
|
| 99 |
+ if($sitekey != $oldsitekey) $output .= write_message(_SITEKEYCHANGED); |
|
| 100 |
+ $result = dbquery("UPDATE ".$settingsprefix."fanfiction_settings SET sitekey = '$sitekey', sitename = '$sitename', slogan = '$slogan', url = '$url', tableprefix = '$tableprefix', siteemail = '$siteemail', skin = '$skin', language = '$language' WHERE sitekey = '$oldsitekey'");
|
|
| 101 |
+ } |
|
| 102 |
+ } |
|
| 103 |
+ } |
|
| 104 |
+ else if($sect == "submissions") {
|
|
| 105 |
+ $submissionsoff = $_POST['newsubmissionsoff'] == 1 ? 1 : 0; |
|
| 106 |
+ $autovalidate = $_POST['newautovalidate'] == 1 ? 1 : 0; |
|
| 107 |
+ $coauthallowed = $_POST['newcoauthallowed'] == 1 ? 1 : 0; |
|
| 108 |
+ $store = !empty($_POST['newstore']) ? $_POST['newstore'] == "files" ? "files" : "mysql" : $store; |
|
| 109 |
+ $storiespath = descript($_POST['newstoriespath']); |
|
| 110 |
+ $minwords = isNumber($_POST['newminwords']) ? $_POST['newminwords'] : 0; |
|
| 111 |
+ $maxwords = isNumber($_POST['newmaxwords']) ? $_POST['newmaxwords'] : 0; |
|
| 112 |
+ $roundrobins = $_POST['newroundrobins'] == 1 ? 1 : 0; |
|
| 113 |
+ $allowseries = $_POST['newallowseries'] && isNumber($_POST['newallowseries']) ? $_POST['newallowseries'] : 0; |
|
| 114 |
+ $imageupload = $_POST['newimageupload'] == 1 ? 1 : 0; |
|
| 115 |
+ $imageheight = isNumber($_POST['newimageheight']) ? $_POST['newimageheight'] : 0; |
|
| 116 |
+ $imagewidth = isNumber($_POST['newimagewidth']) ? $_POST['newimagewidth'] : 0; |
|
| 117 |
+ $result = dbquery("UPDATE ".$settingsprefix."fanfiction_settings SET submissionsoff = '$submissionsoff', autovalidate = '$autovalidate', coauthallowed = '$coauthallowed', store = '$store', storiespath = '$storiespath', minwords = '$minwords', maxwords = '$maxwords', imageupload = '$imageupload', imageheight = '$imageheight', imagewidth = '$imagewidth', roundrobins = '$roundrobins', allowseries = '$allowseries' WHERE sitekey ='".SITEKEY."'");
|
|
| 118 |
+ if($action == "settings") {
|
|
| 119 |
+ dbquery("UPDATE ".TABLEPREFIX."fanfiction_panels SET panel_hidden = '".($imageupload ? "0" : "1")."' WHERE panel_name LIKE 'manageimages'");
|
|
| 120 |
+ dbquery("UPDATE ".TABLEPREFIX."fanfiction_panels SET panel_hidden = '".($allowseries ? "0" : "1")."' WHERE (panel_name LIKE '%series%' OR panel_title LIKE '%series%') AND panel_type != 'A' AND panel_type != 'B'");
|
|
| 121 |
+ updatePanelOrder( ); |
|
| 122 |
+ } |
|
| 123 |
+ |
|
| 124 |
+ } |
|
| 125 |
+ else if($sect == "sitesettings") {
|
|
| 126 |
+ $tinyMCE = $_POST['newtinyMCE'] == 1 ? 1 : 0; |
|
| 127 |
+ $allowed_tags = $_POST['newallowed_tags']; |
|
| 128 |
+ $favorites = $_POST['newfavorites'] == 1 ? 1 : 0; |
|
| 129 |
+ $multiplecats = $_POST['newmultiplecats'] == 1 ? 1 : 0; |
|
| 130 |
+ $newscomments = $_POST['newnewscomments'] == 1 ? 1 : 0; |
|
| 131 |
+ $logging = $_POST['newlogging'] == 1 ? 1 : 0; |
|
| 132 |
+ $maintenance = $_POST['newmaint'] == 1 ? 1 : 0; |
|
| 133 |
+ $debug = $_POST['newdebug'] == 1 ? 1 : 0; |
|
| 134 |
+ $captcha = $_POST['newcaptcha'] == 1 ? 1 : 0; |
|
| 135 |
+ $result = dbquery("UPDATE ".$settingsprefix."fanfiction_settings SET tinyMCE = '$tinyMCE', favorites = '$favorites', multiplecats = '$multiplecats', allowed_tags = '$allowed_tags', newscomments = '$newscomments', logging = '$logging', maintenance = '$maintenance', debug = '$debug', captcha = '$captcha' WHERE sitekey ='".SITEKEY."'");
|
|
| 136 |
+ } |
|
| 137 |
+ else if($sect == "display") {
|
|
| 138 |
+ $dateformat = $_POST['newdateformat'] ? descript(strip_tags($_POST['newdateformat'])) : descript(strip_tags($_POST['customdateformat'])); |
|
| 139 |
+ $timeformat = $_POST['newtimeformat'] ? descript(strip_tags($_POST['newtimeformat'])) : descript(strip_tags($_POST['customtimeformat'])); |
|
| 140 |
+ $extendcats = $_POST['newextendcats'] == 1 ? 1 : 0; |
|
| 141 |
+ if(isset($_POST['newdisplaycolumns']) && isNumber($_POST['newdisplaycolumns'])) $displaycolumns = $_POST['newdisplaycolumns']; |
|
| 142 |
+ if(isset($_POST['newitemsperpage']) && isNumber($_POST['newitemsperpage'])) $itemsperpage = $_POST['newitemsperpage']; |
|
| 143 |
+ if(isset($_POST['newlinkstyle']) && isNumber($_POST['newlinkstyle'])) $linkstyle = $_POST['newlinkstyle']; |
|
| 144 |
+ if(isset($_POST['newlinkrange']) && isNumber($_POST['newlinkrange'])) $linkrange = $_POST['newlinkrange']; |
|
| 145 |
+ $displayindex = $_POST['newstoryindex'] == 1 ? 1 : 0; |
|
| 146 |
+ $displayprofile = $_POST['newdisplayprofile'] == 1 ? 1 : 0; |
|
| 147 |
+ $defaultsort = $_POST['newdefaultsort'] == 1 ? 1 : 0; |
|
| 148 |
+ if(isNumber($_POST['newrecentdays'])) $recentdays = $_POST['newrecentdays']; |
|
| 149 |
+ $result = dbquery("UPDATE ".$settingsprefix."fanfiction_settings SET dateformat = '$dateformat', timeformat = '$timeformat', extendcats = '$extendcats', displaycolumns = '$displaycolumns', itemsperpage = '$itemsperpage', displayindex = '$displayindex', defaultsort = '$defaultsort', recentdays = '$recentdays', displayprofile = '$displayprofile', linkstyle = '$linkstyle', linkrange = '$linkrange' WHERE sitekey ='".SITEKEY."'");
|
|
| 150 |
+ } |
|
| 151 |
+ else if($sect == "reviews") {
|
|
| 152 |
+ $reviewsallowed = $_POST['newreviewsallowed'] == 1 ? 1 : 0; |
|
| 153 |
+ $anonreviews = $_POST['newanonreviews'] == 1 ? 1 : 0; |
|
| 154 |
+ $rateonly = $_POST['newrateonly'] == 1 ? 1 : 0; |
|
| 155 |
+ $ratings = isset($_POST['newratings']) && isNumber($_POST['newratings']) ? $_POST['newratings'] : 0; |
|
| 156 |
+ $revdelete = isset($_POST['newrevdelete']) && isNumber($_POST['newrevdelete']) ? $_POST['newrevdelete'] : 0; |
|
| 157 |
+ $result = dbquery("UPDATE ".$settingsprefix."fanfiction_settings SET reviewsallowed = '$reviewsallowed', anonreviews = '$anonreviews', rateonly = '$rateonly', ratings = '$ratings', revdelete = '$revdelete' WHERE sitekey ='".SITEKEY."'");
|
|
| 158 |
+ } |
|
| 159 |
+ else if($sect == "useropts") {
|
|
| 160 |
+ $alertson = $_POST['newalertson'] == 1 ? 1 : 0; |
|
| 161 |
+ $disablepopups = $_POST['newdisablepops'] == 1 ? 1 : 0; |
|
| 162 |
+ $agestatement = $_POST['newagestatement'] == 1 ? 1 : 0; |
|
| 163 |
+ $pwdsetting = $_POST['newpwdsetting'] == 1 ? 1 : 0; |
|
| 164 |
+ $result = dbquery("UPDATE ".$settingsprefix."fanfiction_settings SET alertson = '$alertson', disablepopups = '$disablepopups', agestatement = '$agestatement', pwdsetting = '$pwdsetting' WHERE sitekey ='".SITEKEY."'");
|
|
| 165 |
+ } |
|
| 166 |
+ else if($sect == "email") {
|
|
| 167 |
+ $smtp_host = $_POST['newsmtp_host']; |
|
| 168 |
+ $smtp_username = $_POST['newsmtp_username']; |
|
| 169 |
+ $smtp_password = $_POST['newsmtp_password']; |
|
| 170 |
+ $result = dbquery("UPDATE ".$settingsprefix."fanfiction_settings SET smtp_host = '$smtp_host', smtp_username = '$smtp_username', smtp_password = '$smtp_password' WHERE sitekey ='".SITEKEY."'");
|
|
| 171 |
+ } |
|
| 172 |
+ if($result) {
|
|
| 173 |
+ $output .= write_message(_ACTIONSUCCESSFUL); |
|
| 174 |
+ $sect = $sects[(array_search($sect, $sects) + 1)]; |
|
| 175 |
+ if(!$sect) $sect = $sects[0]; |
|
| 176 |
+ } |
|
| 177 |
+ else $output .= write_error(_ERROR); |
|
| 178 |
+} |
|
| 179 |
+ $settingsresults = dbquery("SELECT * FROM ".$settingsprefix."fanfiction_settings WHERE sitekey ='".SITEKEY."'");
|
|
| 180 |
+ $settings = dbassoc($settingsresults); |
|
| 181 |
+ foreach($settings as $var => $val) {
|
|
| 182 |
+ $$var = stripslashes($val); |
|
| 183 |
+ } |
|
| 184 |
+ |
|
| 185 |
+ $output .= "<form method='POST' class='tblborder' style='' enctype='multipart/form-data' action='".($action == "settings" ? "admin.php?action=settings" : $_SERVER['PHP_SELF']."?step=".$_GET['step'])."&sect=$sect'>"; |
|
| 186 |
+ if($sect == "main") {
|
|
| 187 |
+ $output .= "<h2>"._SITEINFO."</h2> |
|
| 188 |
+ <table class='acp'> |
|
| 189 |
+ <tr> |
|
| 190 |
+ <td><label for='newsitekey'>"._SITEKEY.":</label></td><td><input type='text' class='textbox' name='newsitekey' value='".SITEKEY."'> <a href='#' class='pophelp'>[?]<span>"._HELP_SITEKEY."</span></a></td> |
|
| 191 |
+ </tr> |
|
| 192 |
+ <tr> |
|
| 193 |
+ <td><label for='newsitename'>"._SITENAME.":</label></td><td><input type='text' class='textbox' name='newsitename' value='".htmlspecialchars($sitename, ENT_QUOTES)."'> <a href='#' class='pophelp'>[?]<span>"._HELP_SITENAME."</span></a></td> |
|
| 194 |
+ </tr> |
|
| 195 |
+ <tr> |
|
| 196 |
+ <td><label for='newslogan'>"._SITESLOGAN.":</label></td><td><input type='text' class='textbox' name='newslogan' value='".htmlspecialchars($slogan, ENT_QUOTES)."'> <a href='#' class='pophelp'>[?]<span>"._HELP_SLOGAN."</span></a></td> |
|
| 197 |
+ </tr> |
|
| 198 |
+ <tr> |
|
| 199 |
+ <td><label for='newurl'>"._SITEURL.":</label></td><td><input type='text' class='textbox' name='newsiteurl' value='$url'> <a href='#' class='pophelp'>[?]<span>"._HELP_URL."</span></a></td> |
|
| 200 |
+ </tr> |
|
| 201 |
+ <tr> |
|
| 202 |
+ <td><label for='newtableprefix'>"._TABLEPREFIX.":</label></td><td><input type='text' class='textbox' name='newtableprefix' value='".TABLEPREFIX."'> <a href='#' class='pophelp'>[?]<span>"._HELP_TABLEPREFIX."</span></a></td> |
|
| 203 |
+ </tr> |
|
| 204 |
+ <tr> |
|
| 205 |
+ <td><label for='newsiteemail'>"._ADMINEMAIL.":</label></td><td><input type='text' class='textbox' name='newsiteemail' value='$siteemail'> <a href='#' class='pophelp'>[?]<span>"._HELP_SITEEMAIL."</span></a></td> |
|
| 206 |
+ </tr> |
|
| 207 |
+ <tr> |
|
| 208 |
+ <td><label for='newsiteskin'>"._DEFAULTSKIN.":</label></td><td><select name='newskin'>"; |
|
| 209 |
+ $directory = opendir(_BASEDIR."skins"); |
|
| 210 |
+ while($filename = readdir($directory)) {
|
|
| 211 |
+ if($filename=="." || $filename==".." || !is_dir(_BASEDIR."skins/".$filename)) continue; |
|
| 212 |
+ $output .= "<option value='$filename'".($skin == $filename ? " selected" : "").">$filename</option>"; |
|
| 213 |
+ } |
|
| 214 |
+ closedir($directory); |
|
| 215 |
+ $output .= "</select> <a href='#' class='pophelp'>[?]<span>"._HELP_SITESKIN."</span></a></td> |
|
| 216 |
+ </tr> |
|
| 217 |
+ <tr> |
|
| 218 |
+ <td><label for='newlanguage'>"._LANGUAGE.":</label></td><td><select name='newlanguage'>"; |
|
| 219 |
+ $directory = opendir(_BASEDIR."languages"); |
|
| 220 |
+ while($filename = readdir($directory)) {
|
|
| 221 |
+ if($filename=="." || $filename==".." || substr($filename, 2) == "_admin.php") continue; |
|
| 222 |
+ $output .= "<option value='".substr($filename, 0, 2)."'". |
|
| 223 |
+ ($language == substr($filename, 0, strpos($filename, ".php")) ? " selected" : "")."> |
|
| 224 |
+ ".substr($filename, 0, strpos($filename, ".php"))."</option>"; |
|
| 225 |
+ } |
|
| 226 |
+ closedir($directory); |
|
| 227 |
+ $output .= "</select> <a href='#' class='pophelp'>[?]<span>"._HELP_LANGUAGE."</span></a></td></tr>"; |
|
| 228 |
+ } |
|
| 229 |
+ else if($sect == "submissions") {
|
|
| 230 |
+ $output .= "<h2>"._SUBMISSIONSETTINGS."</h2> |
|
| 231 |
+ <table class='acp'> |
|
| 232 |
+ <tr> |
|
| 233 |
+ <td><label for='newsubmissionsoff'>"._NOSUBS.":</label></td><td><select name='newsubmissionsoff'> |
|
| 234 |
+ <option value='1'".($submissionsoff == "1" ? " selected" : "").">"._YES."</option> |
|
| 235 |
+ <option value='0'".($submissionsoff == "0" ? " selected" : "").">"._NO."</option> |
|
| 236 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_SUBSOFF."</span></a></td> |
|
| 237 |
+ </tr> |
|
| 238 |
+ <tr> |
|
| 239 |
+ <td><label for='newautovalidate'>"._AUTOVALIDATE.":</label></td><td><select name='newautovalidate'> |
|
| 240 |
+ <option value='1'".($autovalidate == "1" ? "selected" : "").">"._YES."</option> |
|
| 241 |
+ <option value='0'".($autovalidate == "0" ? "selected" : "").">"._NO."</option> |
|
| 242 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_AUTOVALIDATE."</span></a></td> |
|
| 243 |
+ </tr> |
|
| 244 |
+ <tr> |
|
| 245 |
+ <td><label for='newcoauthallowed'>"._COAUTHALLOW.":</label></td><td><select name='newcoauthallowed'> |
|
| 246 |
+ <option value='1'".($coauthallowed == "1" ? "selected" : "").">"._YES."</option> |
|
| 247 |
+ <option value='0'".($coauthallowed == "0" ? "selected" : "").">"._NO."</option> |
|
| 248 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_COAUTHORS."</span></a></td> |
|
| 249 |
+ </tr> |
|
| 250 |
+ <tr> |
|
| 251 |
+ <td><label for='newroundrobins'>"._ALLOWRR.":</label></td><td><select name='newroundrobins'> |
|
| 252 |
+ <option value='1'".($roundrobins == "1" ? " selected" : "").">"._YES."</option> |
|
| 253 |
+ <option value='0'".($roundrobins == "0" ? " selected" : "").">"._NO."</option> |
|
| 254 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_ROUNDROBINS."</span></a></td> |
|
| 255 |
+ </tr> |
|
| 256 |
+ <tr> |
|
| 257 |
+ <td><label for='newallowseries'>"._ALLOWSERIES.":</label></td><td><select name='newallowseries'> |
|
| 258 |
+ <option value='2'".($allowseries == "2" ? " selected" : "").">"._ALLMEMBERS."</option> |
|
| 259 |
+ <option value='1'".($allowseries == "1" ? " selected" : "").">"._AUTHORSONLY."</option> |
|
| 260 |
+ <option value='0'".($allowseries == "0" ? " selected" : "").">"._ADMINS."</option> |
|
| 261 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_ALLOWSERIES."</span></a></td> |
|
| 262 |
+ </tr> |
|
| 263 |
+ <tr> |
|
| 264 |
+ <td><label for='newimageupload'>"._IMAGEUPLOAD.":</label></td><td><select name='newimageupload'> |
|
| 265 |
+ <option value='1'".($imageupload == "1" ? " selected" : "").">"._YES."</option> |
|
| 266 |
+ <option value='0'".($imageupload == "0" ? " selected" : "").">"._NO."</option> |
|
| 267 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_IMAGEUPLOAD."</span></a></td> |
|
| 268 |
+ </tr> |
|
| 269 |
+ <tr> |
|
| 270 |
+ <td colspan='2'><fieldset style='margin: 0 auto;'><legend>"._IMAGESIZE." <a href='#' class='pophelp'>[?]<span>"._HELP_IMAGESIZE."</span></a></legend> |
|
| 271 |
+ <label for='newimageheight'>"._MAXHEIGHT.":</label> <input type='text' class='textbox=' name='newimageheight' value='$imageheight' size='5'> <br /> |
|
| 272 |
+ <label for='newimagewidth'>"._MAXWIDTH.":</label> <input type='text' class='textbox=' name='newimagewidth' value='$imagewidth' size='5'></fieldset></td> |
|
| 273 |
+ </tr> |
|
| 274 |
+ <tr> |
|
| 275 |
+ <td><label for='newstore'>"._HOWSTORE.":</label></td><td><select name='newstore' onChange='if (this.disabled) this.selectedIndex=0' disabled> |
|
| 276 |
+ <option value='files'".($store == "files" || !$store ? " selected" : "").">"._FILES."</option> |
|
| 277 |
+ <option value='mysql'".($store == "mysql" ? " selected" : "").">"._MYSQL."</option> |
|
| 278 |
+ </select> <input class='textbox=' type='checkbox' class='checkbox' name='r1' onClick='this.form.newstore.disabled=false' checked> <a href='#' class='pophelp'>[?]<span>"._HELP_STORE."</span></a></td> |
|
| 279 |
+ </tr> |
|
| 280 |
+ <tr> |
|
| 281 |
+ <td><label for='newstoriespath'>"._STORIESPATH.":</label></td><td><input type='text' class='textbox=' name='newstoriespath' value='$storiespath'> <a href='#' class='pophelp'>[?]<span>"._HELP_STORIESPATH."</span></a></td> |
|
| 282 |
+ </tr> |
|
| 283 |
+ <tr> |
|
| 284 |
+ <td colspan='2'><fieldset style='margin: 0 auto;'><legend>"._MAXMINWORDS."<a href='#' class='pophelp'>[?]<span>"._HELP_MINMAXWORDS."</span></a></legend> |
|
| 285 |
+ <label for='newminwords'>"._MIN.":</label> <input type='text' class='textbox=' name='newminwords' value='$minwords' size='5'> <br /> |
|
| 286 |
+ <label for='newmaxwords'>"._MAX.":</label> <input type='text' class='textbox=' name='newmaxwords' value='$maxwords' size='7'></fieldset></td></tr>"; |
|
| 287 |
+ } |
|
| 288 |
+ else if($sect == "sitesettings") {
|
|
| 289 |
+ $output .= "<h2>"._SITESETTINGS."</h2> |
|
| 290 |
+ <table class='acp'> |
|
| 291 |
+ <tr> |
|
| 292 |
+ <td><label for='newtinyMCE'>"._USETINYMCE.": </label></td><td><select name='newtinyMCE'> |
|
| 293 |
+ <option value='1'".($tinyMCE ? " selected" : "").">"._YES."</option> |
|
| 294 |
+ <option value='0'".(!$tinyMCE ? " selected" : "").">"._NO."</option> |
|
| 295 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_TINYMCE." "._TINYMCENOTE."</span></a></td> |
|
| 296 |
+ </tr> |
|
| 297 |
+ <tr> |
|
| 298 |
+ <td><label for='newallowed_tags'>"._TAGS.": </label></td><td><input type='text' class='textbox' name='newallowed_tags' value='".($allowed_tags ? $allowed_tags : "<strong><em><br /><br><blockquote><strike><font><b><i><u><center><img><a><hr><p><ul><li><ol>")."' size='40'> <a href='#' class='pophelp'>[?]<span>"._HELP_ALLOWEDTAGS." "._TINYMCENOTE."</span></a></td> |
|
| 299 |
+ </tr> |
|
| 300 |
+ <tr> |
|
| 301 |
+ <td><label for='newfavorites'>"._FAVORITES.": </label></td><td><select name='newfavorites'> |
|
| 302 |
+ <option value='1'".($favorites == "1" ? " selected" : "").">"._YES."</option> |
|
| 303 |
+ <option value='0'".($favorites == "0" ? " selected" : "").">"._NO."</option> |
|
| 304 |
+ </select><a href='#' class='pophelp'>[?]<span>"._HELP_FAVORITES."</span></a></td> |
|
| 305 |
+ </tr> |
|
| 306 |
+ <tr> |
|
| 307 |
+ <td><label for='newmultplecats'>"._NUMCATS.": </label></td><td><select name='newmultiplecats'> |
|
| 308 |
+ <option value='1'".($multiplecats == "1" ? "selected" : "").">"._MORETHANONE."</option> |
|
| 309 |
+ <option value='0'".($multiplecats == "0" ? "selected" : "").">"._ONLYONE."</option> |
|
| 310 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_NUMCATS."</span></a></td> |
|
| 311 |
+ </tr> |
|
| 312 |
+ <tr> |
|
| 313 |
+ <td><label for='newnewscomments'>"._NEWSCOMMENTS.": </label></td><td><select name='newnewscomments'> |
|
| 314 |
+ <option value='1'".($newscomments == "1" ? " selected" : "").">"._YES."</option> |
|
| 315 |
+ <option value='0'".($newscomments == "0" ? " selected" : "").">"._NO."</option> |
|
| 316 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_NEWSCOMMENTS."</span></a></td> |
|
| 317 |
+ </tr> |
|
| 318 |
+ <tr> |
|
| 319 |
+ <td><label for='newlogging'>"._LOGGING.": </label></td><td><select name='newlogging'> |
|
| 320 |
+ <option value='1'".($logging == "1" ? " selected" : "").">"._YES."</option> |
|
| 321 |
+ <option value='0'".($logging == "0" ? " selected" : "").">"._NO."</option> |
|
| 322 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_LOGGING."</span></a></td> |
|
| 323 |
+ </tr> |
|
| 324 |
+ <tr> |
|
| 325 |
+ <td><label for='newmaint'>"._MAINTENANCE.": </label></td><td><select name='newmaint'> |
|
| 326 |
+ <option value='1'".($maintenance == "1" ? " selected" : "").">"._YES."</option> |
|
| 327 |
+ <option value='0'".($maintenance == "0" ? " selected" : "").">"._NO."</option> |
|
| 328 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_MAINTENANCE."</span></a></td> |
|
| 329 |
+ </tr> |
|
| 330 |
+ <tr> |
|
| 331 |
+ <td><label for='newdebug'>"._DEBUG.": </label></td><td><select name='newdebug'> |
|
| 332 |
+ <option value='1'".($debug == "1" ? " selected" : "").">"._YES."</option> |
|
| 333 |
+ <option value='0'".(!isset($debug) || $debug == "0" ? " selected" : "").">"._NO."</option> |
|
| 334 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_DEBUG."</span></a></td> |
|
| 335 |
+ </tr> |
|
| 336 |
+ <tr> |
|
| 337 |
+ <td><label for='newcaptcha'>"._CAPTCHA.": </label></td><td><select name='newcaptcha'> |
|
| 338 |
+ <option value='1'".($captcha == "1" ? " selected" : "").">"._YES."</option> |
|
| 339 |
+ <option value='0'".(!isset($captcha) || $captcha == "0" ? " selected" : "").">"._NO."</option> |
|
| 340 |
+ </select><a href='#' class='pophelp'>[?]<span>"._HELP_CAPTCHA."</span></a></td></tr>"; |
|
| 341 |
+ } |
|
| 342 |
+ else if($sect == "display") {
|
|
| 343 |
+ $settings = dbquery("SELECT defaultsort, displayindex FROM ".$settingsprefix."fanfiction_settings WHERE sitekey ='".SITEKEY."'");
|
|
| 344 |
+ list($sitedefaultsort, $sitedisplayindex) = dbrow($settings); |
|
| 345 |
+ $defaultdates = array("m/d/y", "m/d/Y", "m/d/Y", "d/m/Y", "d/m/y", "d M Y",
|
|
| 346 |
+ "d.m.y", "Y.m.d", "m.d.Y", "d-m-y", "m-d-y", "M d Y", "M d, Y", "F d Y", "F d, Y"); |
|
| 347 |
+ $defaulttimes = array("h:i a", "h:i A", "H:i", "g:i a", "g:i A", "G:i", "h:i:s a", "H:i:s", "g:i:s a", "g:i:s A", "G:i:s");
|
|
| 348 |
+ $output .= "<h2>"._DISPLAYSETTINGS."</h2> |
|
| 349 |
+ <table class='acp'> |
|
| 350 |
+ <tr> |
|
| 351 |
+ <td><label for='newdateformat'>"._DATEFORMAT.":</label></td><td><select name='newdateformat'><option value=''>"._SELECTONE."</option>"; |
|
| 352 |
+ foreach($defaultdates as $date) {
|
|
| 353 |
+ $output .= "<option value='$date'>".date("$date")."</option>";
|
|
| 354 |
+ } |
|
| 355 |
+ $output .= "</select> "._OR." <input type='text' name='customdateformat' class='textbox' value='$dateformat'> <a href='#' class='pophelp'>[?]<span>"._HELP_DATEFORMAT."</span></a></td> |
|
| 356 |
+ </tr> |
|
| 357 |
+ <tr> |
|
| 358 |
+ <td><label for='newtimeformat'>"._TIMEFORMAT.":</label></td><td><select name='newtimeformat'><option value=''>"._SELECTONE."</option>"; |
|
| 359 |
+ foreach($defaulttimes as $time) {
|
|
| 360 |
+ $output .= "<option value='$time'>".date("$time")."</option>";
|
|
| 361 |
+ } |
|
| 362 |
+ $output .= " |
|
| 363 |
+ </select> "._OR." <input type='text' name='customtimeformat' class='textbox' value='$timeformat'> <a href='#' class='pophelp'>[?]<span>"._HELP_TIMEFORMAT."</span></a></td> |
|
| 364 |
+ </tr> |
|
| 365 |
+ <tr> |
|
| 366 |
+ <td><label for='newextendcats'>"._EXTENDCATS.":</label></td><td><select name='newextendcats'> |
|
| 367 |
+ <option value='1'".($extendcats == "1" ? " selected" : "").">"._YES."</option> |
|
| 368 |
+ <option value='0'".($extendcats == "0" ? " selected" : "").">"._NO."</option> |
|
| 369 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_EXTENDCATS."</span></a></td> |
|
| 370 |
+ </tr> |
|
| 371 |
+ <tr> |
|
| 372 |
+ <td><label for='newdisplaycolumns'>"._COLUMNS.":</label></td><td><input type='text' class='textbox=' name='newdisplaycolumns' size='3' value='$displaycolumns'> <a href='#' class='pophelp'>[?]<span>"._HELP_COLUMNS."</span></a></td> |
|
| 373 |
+ </tr> |
|
| 374 |
+ <tr> |
|
| 375 |
+ <td><label for='newitemsperpage'>"._NUMITEMS.":</label></td><td><input type='text' class='textbox' name='newitemsperpage' size='3' value='$itemsperpage'> <a href='#' class='pophelp'>[?]<span>"._HELP_ITEMSPERPAGE."</span></a></td> |
|
| 376 |
+ </tr> |
|
| 377 |
+ <tr> |
|
| 378 |
+ <td><label for='newrecentdays'>"._RECENTDAYS.":</label></td><td><input type='text' class='textbox' name='newrecentdays' size='3' value='$recentdays'> <a href='#' class='pophelp'>[?]<span>"._HELP_RECENTDAYS."</span></a></td> |
|
| 379 |
+ </tr> |
|
| 380 |
+ <tr> |
|
| 381 |
+ <td><label for='newdefaultsort'>"._DEFAULTSORT.":</label></td><td><select name='newdefaultsort'> |
|
| 382 |
+ <option value='1'".($sitedefaultsort ? " selected" : "").">"._MOSTRECENT."</option> |
|
| 383 |
+ <option value='0'".(!$sitedefaultsort ? " selected" : "").">"._ALPHA."</option> |
|
| 384 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_DEFAULTSORT."</span></a></td> |
|
| 385 |
+ </tr> |
|
| 386 |
+ <tr> |
|
| 387 |
+ <td><label for='newdisplayindex'>"._STORYINDEX.":</label></td><td><select name='newstoryindex'> |
|
| 388 |
+ <option value='1'".($sitedisplayindex ? " selected" : "").">"._YES."</option> |
|
| 389 |
+ <option value='0'".(!$sitedisplayindex ? " selected" : "").">"._NO."</option> |
|
| 390 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_DISPLAYINDEX."</span></a></td> |
|
| 391 |
+ </tr> |
|
| 392 |
+ <tr> |
|
| 393 |
+ <td><label for='newdisplayprofile'>"._DISPLAYPROFILE.":</label></td><td><select name='newdisplayprofile'> |
|
| 394 |
+ <option value='1'".($displayprofile ? " selected" : "").">"._YES."</option> |
|
| 395 |
+ <option value='0'".(!$displayprofile ? " selected" : "").">"._NO."</option> |
|
| 396 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_DISPLAYPROFILE."</span></a></td> |
|
| 397 |
+ </tr> |
|
| 398 |
+ <tr> |
|
| 399 |
+ <td><label for='newdisplayprofile'>"._LINKSTYLE.":</label></td><td><select name='newlinkstyle'> |
|
| 400 |
+ <option value='2'".($linkstyle == 2 ? " selected" : "").">"._BOTHLINKSTYLE."</option> |
|
| 401 |
+ <option value='1'".($linkstyle == 1 ? " selected" : "").">"._FIRSTLAST."</option> |
|
| 402 |
+ <option value='0'".(!$linkstyle ? " selected" : "").">"._NEXTPREV."</option> |
|
| 403 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_LINKSTYLE."</span></a></td> |
|
| 404 |
+ </tr> |
|
| 405 |
+ <tr> |
|
| 406 |
+ <td><label for='newlinkrange'>"._LINKRANGE.":</label></td><td><input type='text' class='textbox=' name='newlinkrange' size='3' value='$linkrange'> <a href='#' class='pophelp'>[?]<span>"._HELP_LINKRANGE."</span></a></td></tr>"; |
|
| 407 |
+ } |
|
| 408 |
+ else if($sect == "reviews") {
|
|
| 409 |
+ $output .= "<h2>"._REVIEWSETTINGS."</h2> |
|
| 410 |
+ <table class='acp'> |
|
| 411 |
+ <tr> |
|
| 412 |
+ <td><label for='newreviewsallowed'>"._ONREVIEWS.":</label></td><td><select name='newreviewsallowed'> |
|
| 413 |
+ <option value='1'".($reviewsallowed == "1" ? " selected" : "").">"._YES."</option> |
|
| 414 |
+ <option value='0'".($reviewsallowed == "0" ? " selected" : "").">"._NO."</option> |
|
| 415 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_REVIEWSON."</span></a></td> |
|
| 416 |
+ </tr> |
|
| 417 |
+ <tr> |
|
| 418 |
+ <td><label for='newanonreviews'>"._ANONREVIEWS.":</label></td><td><select name='newanonreviews'> |
|
| 419 |
+ <option value='1'".($anonreviews == "1" ? " selected" : "").">"._YES."</option> |
|
| 420 |
+ <option value='0'".($anonreviews == "0" ? " selected" : "").">"._NO."</option> |
|
| 421 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_ANONREVIEWS."</span></a></td> |
|
| 422 |
+ </tr> |
|
| 423 |
+ <tr> |
|
| 424 |
+ <td><label for='newrevdelete'>"._REVDELETE.":</label></td><td><select name='newrevdelete'> |
|
| 425 |
+ <option value='2'".($revdelete == 2 ? " selected" : "").">"._ALLREV."</option> |
|
| 426 |
+ <option value='1'".($revdelete == 1 ? " selected" : "").">"._ANONREV."</option> |
|
| 427 |
+ <option value='0'".(empty($revdelete) ? " selected" : "").">"._NONE."</option> |
|
| 428 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_REVDELETE."</span></a></td> |
|
| 429 |
+ </tr> |
|
| 430 |
+ <tr> |
|
| 431 |
+ <td><label for='newratings'>"._WHATRATINGS.":</label></td><td><select name='newratings'> |
|
| 432 |
+ <option value='2'".($ratings == "2" ? " selected" : "").">"._LIKESYS."</option> |
|
| 433 |
+ <option value='1'".($ratings == "1" ? " selected" : "").">"._STARS."</option> |
|
| 434 |
+ <option value='0'".($ratings == "0" ? " selected" : "").">"._NONE."</option> |
|
| 435 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_RATINGS."</span></a></td> |
|
| 436 |
+ </tr> |
|
| 437 |
+ <tr> |
|
| 438 |
+ <td><label for='newrateonly'>"._ALLOWRATEONLY.":</label></td><td><select name='newrateonly'> |
|
| 439 |
+ <option value='1'".($rateonly == "1" ? " selected" : "").">"._YES."</option> |
|
| 440 |
+ <option value='0'".($rateonly == "0" ? " selected" : "").">"._NO."</option> |
|
| 441 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_RATEONLY."</span></a></td></tr>"; |
|
| 442 |
+ } |
|
| 443 |
+ else if($sect == "useropts") {
|
|
| 444 |
+ $output .= "<h2>"._USERSETTINGS."</h2> |
|
| 445 |
+ <table class='acp'> |
|
| 446 |
+ <tr> |
|
| 447 |
+ <td><label for='newalertson'>"._ALERTSON.":</label></td><td><select name='newalertson'> |
|
| 448 |
+ <option value='1'".($alertson == "1" ? " selected" : "").">"._YES."</option> |
|
| 449 |
+ <option value='0'".($alertson == "0" ? " selected" : "").">"._NO."</option> |
|
| 450 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_ALERTSON."</span></a></td> |
|
| 451 |
+ </tr> |
|
| 452 |
+ <tr> |
|
| 453 |
+ <td><label for='newdisablepops'>"._USERPOPS.":</label></td><td><select name='newdisablepops'> |
|
| 454 |
+ <option value='1'".($disablepopups ? " selected" : "").">"._YES."</option> |
|
| 455 |
+ <option value='0'".(!$disablepopups ? " selected" : "").">"._NO."</option> |
|
| 456 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_POPUPS."</span></a></td> |
|
| 457 |
+ </tr> |
|
| 458 |
+ <tr> |
|
| 459 |
+ <td><label for='newagestatement'>"._AGESTATEMENT.":</label></td><td><select name='newagestatement'> |
|
| 460 |
+ <option value='1'".($agestatement ? " selected" : "").">"._YES."</option> |
|
| 461 |
+ <option value='0'".(!$agestatement ? " selected" : "").">"._NO."</option> |
|
| 462 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_AGECONSENT."</span></a></td> |
|
| 463 |
+ </tr> |
|
| 464 |
+ <tr> |
|
| 465 |
+ <td><label for='newpwdsetting'>"._PWDSETTING.":</label></td><td><select name='newpwdsetting'> |
|
| 466 |
+ <option value='1'".($pwdsetting ? " selected" : "").">"._SELF."</option> |
|
| 467 |
+ <option value='0'".(!$pwdsetting ? " selected" : "").">"._RANDOM."</option> |
|
| 468 |
+ </select> <a href='#' class='pophelp'>[?]<span>"._HELP_PWD."</span></a></td></tr>"; |
|
| 469 |
+ } |
|
| 470 |
+ else if($sect == "email") {
|
|
| 471 |
+ $output .= "<h2>"._EMAILSETTINGS."</h2> |
|
| 472 |
+ <table class='acp'> |
|
| 473 |
+ <tr> |
|
| 474 |
+ <td><label for='newsmtp_host'>"._SMTPHOST.":</label></td><td><input name='newsmtp_host' type='text' value='$smtp_host'> <a href='#' class='pophelp'>[?]<span>"._HELP_SMTPHOST."</span></a></td> |
|
| 475 |
+ </tr> |
|
| 476 |
+ <tr> |
|
| 477 |
+ <td><label for='newsmtp_username'>"._SMTPUSER.":</label></td><td><input name='newsmtp_username' type='text' value='$smtp_username'> <a href='#' class='pophelp'>[?]<span>"._HELP_SMTPUSER."</span></a></td> |
|
| 478 |
+ </tr> |
|
| 479 |
+ <tr> |
|
| 480 |
+ <td><label for='newsmtp_password'>"._SMTPPASS.":</label></td><td><input name='newsmtp_password' type='password' value='$smtp_password'> <a href='#' class='pophelp'>[?]<span>"._HELP_SMTPPWD."</span></a></td></tr>"; |
|
| 481 |
+ $output .= write_message(_SMTPOFF); |
|
| 482 |
+ } |
|
| 483 |
+ $output .= "<tr><td colspan='2'><div align='center'><input type='submit' id='submit' class='button' name='submit' value='"._SUBMIT."'></div></form></td></tr></table>"; |
|
| 484 |
+?> |
|
| 0 | 485 |
\ No newline at end of file |