Browse code

More general cleanup - layout and consistency changes

Clarissa Walker authored on 2026/08/19 19:06:44
Showing 1 changed files
... ...
@@ -60,7 +60,7 @@ if(!defined("_CHARSET")) exit( );
60 60
 		$output .= "<label for='sortby'>"._DEFAULTSORT.": </label><select name='sortby' class='textbox'>
61 61
 				<option value='1'".($user['sortby'] ? " selected" : "").">"._MOSTRECENT."</option>
62 62
 				<option value='0'".(!$user['sortby'] ? " selected" : "").">"._ALPHA."</option>
63
-			</select><A HREF=\"#\" class=\"pophelp\">[?]<span>"._HELP_DEFAULTSORT."</span></A><br />
63
+			</select> <A HREF=\"#\" class=\"pophelp\">[?]<span>"._HELP_DEFAULTSORT."</span></A><br />
64 64
 			<label for='skinnew'>"._SKIN.":</label> <select name=\"skinnew\">";
65 65
 		if(!isset($hiddenskins)) $hiddenskins = array( );
66 66
 		if(is_string($hiddenskins)) $hiddenskins = explode(",", $hiddenskins);
... ...
@@ -73,7 +73,7 @@ if(!defined("_CHARSET")) exit( );
73 73
 		foreach($skinlist as $s) { $output .= $s; }
74 74
 		unset($skinlist, $s);
75 75
 		closedir($directory);
76
-		$output .= "</select><A HREF=\"#\" class=\"pophelp\">[?]<span>"._HELP_SKIN."</span></A><br /><INPUT type=\"submit\" class=\"button\" id=\"submit\" name=\"submit\" value=\""._SUBMIT."\"></form>";
76
+		$output .= "</select> <A HREF=\"#\" class=\"pophelp\">[?]<span>"._HELP_SKIN."</span></A><br /><INPUT style='margin-top: 0.5em;' type=\"submit\" class=\"button\" id=\"submit\" name=\"submit\" value=\""._SUBMIT."\"></form>";
77 77
 	}
78 78
 
79
-?>
80 79
\ No newline at end of file
80
+?>
Browse code

3.5.6 efiction version

Jimako authored on 2024/03/09 16:09:42
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,79 @@
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
+	$output = "<div id='pagetitle'>".($action == "register" ? _SETPREFS : _EDITPREFS)."</div>";
28
+	if(isset($_POST['submit'])) {
29
+		$useralertson = isset($_POST['useralertson']) && $_POST['useralertson'] == "on" ? 1 : 0;
30
+		$newreviews = isset($_POST['newreviews']) && $_POST['newreviews'] == "on" ? 1 : 0;
31
+		$newrespond = isset($_POST['newrespond']) && $_POST['newrespond'] == "on" ? 1 : 0;
32
+		$ageconsent = isset($_POST['ageconsent']) && isNumber($_POST['ageconsent']) ? $_POST['ageconsent'] : 0;
33
+		$tinyMCE = isset($_POST['tinyMCE']) && $_POST['tinyMCE'] == "on" ? 1 : 0;
34
+		$storyindex = isset($_POST['storyindex']) && $_POST['storyindex'] == "on" ? 1 : 0;
35
+		$sortby = isset($_POST['sortby']) && $_POST['sortby'] == 1 ? 1 : 0;
36
+		$skinnew = descript(strip_tags($_POST['skinnew']));
37
+		if($skinnew != $skin) $_SESSION[$sitekey."_skin"] = $skinnew;
38
+		dbquery("UPDATE ".TABLEPREFIX."fanfiction_authorprefs SET alertson = '$useralertson', newreviews = '$newreviews', newrespond = '$newrespond', ageconsent = '$ageconsent', tinyMCE ='$tinyMCE', userskin = '$skinnew', storyindex = '$storyindex', sortby = '$sortby' WHERE uid = '".USERUID."'");
39
+		$output .= write_message(_ACTIONSUCCESSFUL." "._BACK2ACCT);
40
+	}
41
+	else {
42
+		$result = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorprefs WHERE uid = '".USERUID."' LIMIT 1");
43
+		if(dbnumrows($result) == 0) {
44
+			dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_authorprefs(`uid`, `userskin`) VALUES('".USERUID."', '$skin')");
45
+			$result = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorprefs WHERE uid = '".USERUID."' LIMIT 1");
46
+		}
47
+		$user = dbassoc($result);
48
+		$output .= "<form method=\"POST\" enctype=\"multipart/form-data\" style='width: 425px; margin: 0 auto;' action=\"user.php?action=editprefs\">
49
+		<label for='newreviews'>"._CONTACTREVIEWS.":</label> <INPUT name=\"newreviews\" type=\"checkbox\" class=\"checkbox\"".($user['newreviews'] ? " checked" : "")."> <A HREF=\"#\" class=\"pophelp\">[?]<span>"._HELP_NEWREV."</span></A><br />
50
+		<label for='newrespond'>"._CONTACTRESPOND.":</label> <INPUT name=\"newrespond\" type=\"checkbox\" class=\"checkbox\"".($user['newrespond'] ? " checked" : "")."><A HREF=\"#\" class=\"pophelp\">[?]<span>"._HELP_NEWRESP."</span></A><br />";
51
+		if($alertson) 
52
+		$output .= "<label for='useralertson'>"._ALERTSON2."</label> <INPUT name=\"useralertson\" type=\"checkbox\" class=\"checkbox\"".($user['alertson'] ? " checked" : "")."><A HREF=\"#\" class=\"pophelp\">[?]<span>"._HELP_FAVALERT."</span></A><br />";
53
+		$output .= "<label for='storyindex'>"._DISPLAYINDEX."</label> <INPUT name=\"storyindex\" type=\"checkbox\" class=\"checkbox\"".($user['storyindex'] ? " checked" : "")."><A HREF=\"#\" class=\"pophelp\">[?]<span>"._HELP_TOC."</span></A><br />";
54
+		$output .= "<label for='tinyMCE'>"._USETINYMCE."</label> <INPUT name=\"tinyMCE\" type=\"checkbox\" class=\"checkbox\"".($user['tinyMCE'] ? " checked" : "")."><A HREF=\"#\" class=\"pophelp\">[?]<span>"._HELP_TINYMCE."</span></A><br />";
55
+		if($agestatement) {
56
+			$output .= "<div style=\"margin: 1ex 0;\">"._AGECONSENT." <span style='white-space: nowrap;'>
57
+				<input type=\"radio\" class=\"radio\" id=\"ageyes\" value=\"1\" name=\"ageconsent\" ".($user['ageconsent'] ? " checked" : "")."> <label for=\"ageyes\">"._YES."</label>
58
+				<input type=\"radio\" class=\"radio\" id=\"ageno\" value=\"0\" name=\"ageconsent\" ".(!$user['ageconsent'] ? " checked" : "")."> <label for=\"ageno\">"._NO."</label></span><A HREF=\"#\" class=\"pophelp\">[?]<span>"._HELP_AGE."</span></A></div>";
59
+		}
60
+		$output .= "<label for='sortby'>"._DEFAULTSORT.": </label><select name='sortby' class='textbox'>
61
+				<option value='1'".($user['sortby'] ? " selected" : "").">"._MOSTRECENT."</option>
62
+				<option value='0'".(!$user['sortby'] ? " selected" : "").">"._ALPHA."</option>
63
+			</select><A HREF=\"#\" class=\"pophelp\">[?]<span>"._HELP_DEFAULTSORT."</span></A><br />
64
+			<label for='skinnew'>"._SKIN.":</label> <select name=\"skinnew\">";
65
+		if(!isset($hiddenskins)) $hiddenskins = array( );
66
+		if(is_string($hiddenskins)) $hiddenskins = explode(",", $hiddenskins);
67
+			$directory = opendir(_BASEDIR."skins");
68
+		while($filename = readdir($directory)) {
69
+			if($filename== "." || $filename== ".." || !is_dir(_BASEDIR."skins/".$filename) || (in_array($filename, $hiddenskins) && !isADMIN)) continue;
70
+			$skinlist[strtolower($filename)] = "<option value=\"$filename\"".($siteskin == $filename ? " selected" : "").">$filename</option>";
71
+		}
72
+		ksort($skinlist);
73
+		foreach($skinlist as $s) { $output .= $s; }
74
+		unset($skinlist, $s);
75
+		closedir($directory);
76
+		$output .= "</select><A HREF=\"#\" class=\"pophelp\">[?]<span>"._HELP_SKIN."</span></A><br /><INPUT type=\"submit\" class=\"button\" id=\"submit\" name=\"submit\" value=\""._SUBMIT."\"></form>";
77
+	}
78
+
79
+?>
0 80
\ No newline at end of file