Browse code

just formatting fix

Jimmi08 authored on 2023/03/07 13:59:25
Showing 1 changed files
... ...
@@ -26,14 +26,14 @@ function random_char($string)
26 26
 {
27 27
 	$length = strlen($string);
28 28
 	$position = mt_rand(0, $length - 1);
29
-	 return $string[$position];
29
+	return $string[$position];
30 30
 }
31 31
 
32
-function random_string ($charset_string, $length)
32
+function random_string($charset_string, $length)
33 33
 {
34 34
 	$return_string = random_char($charset_string);
35 35
 	for ($x = 1; $x < $length; $x++)
36
-	$return_string .= random_char($charset_string);
36
+		$return_string .= random_char($charset_string);
37 37
 	return $return_string;
38 38
 }
39 39
 
... ...
@@ -41,34 +41,38 @@ $randomcharset = '23456789' . 'abcdefghijkmnpqrstuvwxyz' . 'ABCDEFGHJKLMNPQRSTUV
41 41
 
42 42
 
43 43
 // Strip out slashes if magic quotes isn't on.
44
-if(ini_get("magic_quotes_gpc")) {
45
-	foreach($_POST as $var => $val) {
46
-		$val = is_array( $val ) ? array_map( 'stripslashes', $val ) : stripslashes( $val );
44
+if (ini_get("magic_quotes_gpc"))
45
+{
46
+	foreach ($_POST as $var => $val)
47
+	{
48
+		$val = is_array($val) ? array_map('stripslashes', $val) : stripslashes($val);
47 49
 	}
48
-	foreach($_GET as $var => $val) {
49
-		$val = is_array( $val ) ? array_map( 'stripslashes', $val ) : stripslashes( $val );
50
+	foreach ($_GET as $var => $val)
51
+	{
52
+		$val = is_array($val) ? array_map('stripslashes', $val) : stripslashes($val);
50 53
 	}
51
-	foreach($_COOKIE as $var => $val) {
52
-		$val = is_array( $val ) ? array_map( 'stripslashes', $val ) : stripslashes( $val );
54
+	foreach ($_COOKIE as $var => $val)
55
+	{
56
+		$val = is_array($val) ? array_map('stripslashes', $val) : stripslashes($val);
53 57
 	}
54 58
 }
55 59
 
56 60
 define("_BASEDIR", "../");
57 61
 define("_CHARSET", "utf-8");
58 62
 Header('Cache-Control: private, no-cache, must-revalidate, max_age=0, post-check=0, pre-check=0');
59
-header ("Pragma: no-cache"); 
60
-header ("Expires: 0"); 
63
+header("Pragma: no-cache");
64
+header("Expires: 0");
61 65
 
62 66
 $output = "";
63 67
 $language = "";
64 68
 
65
-include ("../includes/class.TemplatePower.inc.php");
69
+include("../includes/class.TemplatePower.inc.php");
66 70
 
67 71
 /* PHP 8 fix - other way is separated LANs to smaller files */
68 72
 $allowed_tags = '';
69 73
 $recentdays = 7;
70 74
 $sitename = "";  // this breaks stuff in PHP 8.2 
71
-$url = "" ;
75
+$url = "";
72 76
 $multiplecats = '';
73 77
 $minwords = '';
74 78
 $maxwords = '';
... ...
@@ -82,36 +86,39 @@ $user['penname'] = '';
82 86
 $user['email'] = '';
83 87
 $penname = '';
84 88
 
85
-if(!isset($_GET['step']) || $_GET['step'] == 2) {
86
-	include ("../languages/en.php");
87
-	include ("../languages/en_admin.php");
88
-	include ("languages/en.php");
89
+if (!isset($_GET['step']) || $_GET['step'] == 2)
90
+{
91
+	include("../languages/en.php");
92
+	include("../languages/en_admin.php");
93
+	include("languages/en.php");
89 94
 }
90
-else if(isset($_REQUEST['language'])) {
95
+else if (isset($_REQUEST['language']))
96
+{
91 97
 	$language = $_REQUEST['language'];
92
-	if(file_exists("../languages/".$language.".php")) include ("../languages/".$language.".php");
93
-	else include ("../languages/en.php");
94
-	if(file_exists("../languages/".$language."_admin.php")) include("../languages/".$language."_admin.php");
95
-	else include ("../languages/en_admin.php");
96
-	if(file_exists("languages/".$language.".php")) include("languages/".$language.".php");
97
-	else include ("languages/en.php");
98
+	if (file_exists("../languages/" . $language . ".php")) include("../languages/" . $language . ".php");
99
+	else include("../languages/en.php");
100
+	if (file_exists("../languages/" . $language . "_admin.php")) include("../languages/" . $language . "_admin.php");
101
+	else include("../languages/en_admin.php");
102
+	if (file_exists("languages/" . $language . ".php")) include("languages/" . $language . ".php");
103
+	else include("languages/en.php");
98 104
 }
99
-else {
100
-include("../config.php");
101
-$dbconnect = dbconnect($dbhost, $dbuser, $dbpass, $dbname );
102
-$settings = dbquery("SELECT tableprefix, language FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".$sitekey."'");
103
-list($tableprefix, $language) = dbrow($settings);
104
-
105
-define("TABLEPREFIX", $tableprefix);
106
-define("SITEKEY", $sitekey);
107
-if(file_exists("../languages/".$language.".php")) include ("../languages/".$language.".php");
108
-else include ("../languages/en.php");
109
-if(file_exists("../languages/".$language."_admin.php")) include("../languages/".$language."_admin.php");
110
-else include ("../languages/en_admin.php");
111
-if(file_exists("languages/".$language.".php")) include("languages/".$language.".php");
112
-else include ("languages/en.php");
105
+else
106
+{
107
+	include("../config.php");
108
+	$dbconnect = dbconnect($dbhost, $dbuser, $dbpass, $dbname);
109
+	$settings = dbquery("SELECT tableprefix, language FROM " . $settingsprefix . "fanfiction_settings WHERE sitekey = '" . $sitekey . "'");
110
+	list($tableprefix, $language) = dbrow($settings);
111
+
112
+	define("TABLEPREFIX", $tableprefix);
113
+	define("SITEKEY", $sitekey);
114
+	if (file_exists("../languages/" . $language . ".php")) include("../languages/" . $language . ".php");
115
+	else include("../languages/en.php");
116
+	if (file_exists("../languages/" . $language . "_admin.php")) include("../languages/" . $language . "_admin.php");
117
+	else include("../languages/en_admin.php");
118
+	if (file_exists("languages/" . $language . ".php")) include("languages/" . $language . ".php");
119
+	else include("languages/en.php");
113 120
 }
114
-include(_BASEDIR."includes/corefunctions.php");
121
+include(_BASEDIR . "includes/corefunctions.php");
115 122
 
116 123
 //  So I don't have to keep updating the version number in 3 different files.
117 124
 include("../version.php");
... ...
@@ -155,294 +162,319 @@ a.pophelp:hover span{ /*the span will display just on :hover state*/
155 162
 </style>
156 163
 <link rel=\"stylesheet\" type=\"text/css\" href='../default_tpls/style.css'></head>";
157 164
 
158
-$tpl = new TemplatePower( "../default_tpls/default.tpl" );
159
-$tpl->assignInclude( "header", "./../default_tpls/header.tpl" );
160
-$tpl->assignInclude( "footer", "./../default_tpls/footer.tpl" );
161
-$tpl->prepare( );
165
+$tpl = new TemplatePower("../default_tpls/default.tpl");
166
+$tpl->assignInclude("header", "./../default_tpls/header.tpl");
167
+$tpl->assignInclude("footer", "./../default_tpls/footer.tpl");
168
+$tpl->prepare();
162 169
 $tpl->newBlock("header");
163 170
 $tpl->assign("sitename", "eFiction $version Install");
164
-$tpl->gotoBlock( "_ROOT" );
171
+$tpl->gotoBlock("_ROOT");
165 172
 $tpl->newBlock("footer");
166
-$tpl->assign( "footer", "eFiction $version &copy; 2007. <a href='http://efiction.org/'>http://efiction.org/</a>");
167
-$tpl->gotoBlock( "_ROOT" );
173
+$tpl->assign("footer", "eFiction $version &copy; 2007. <a href='http://efiction.org/'>http://efiction.org/</a>");
174
+$tpl->gotoBlock("_ROOT");
168 175
 
169
-if(!isset($_GET['step']))  $_GET['step'] = 0;
170
-switch($_GET['step']) {
176
+if (!isset($_GET['step']))  $_GET['step'] = 0;
177
+switch ($_GET['step'])
178
+{
171 179
 	case "9":
172
-		if(isset($_POST['submit'])) {
180
+		if (isset($_POST['submit']))
181
+		{
173 182
 			$penname = descript($_POST['newpenname']);
174
-			if((!$_POST['email']) && !isADMIN) $fail .= "<div style='text-align: center;'>"._EMAILREQUIRED." "._TRYAGAIN."</div>";
175
-			if($penname && !preg_match("!^[a-z0-9_ ]{3,30}$!i", $penname)) $fail = "<div style='text-align: center;'>"._BADUSERNAME." "._TRYAGAIN."</div>";
176
-			if(!preg_match("/^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9.-]+$/", $_POST['email'])) $fail = "<div style='text-align: center;'>"._INVALIDEMAIL." "._TRYAGAIN."</div>";
177
-			if($_POST['password'] == $_POST['password2']) $encryptpassword = md5($_POST['password']);
183
+			if ((!$_POST['email']) && !isADMIN) $fail .= "<div style='text-align: center;'>" . _EMAILREQUIRED . " " . _TRYAGAIN . "</div>";
184
+			if ($penname && !preg_match("!^[a-z0-9_ ]{3,30}$!i", $penname)) $fail = "<div style='text-align: center;'>" . _BADUSERNAME . " " . _TRYAGAIN . "</div>";
185
+			if (!preg_match("/^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9.-]+$/", $_POST['email'])) $fail = "<div style='text-align: center;'>" . _INVALIDEMAIL . " " . _TRYAGAIN . "</div>";
186
+			if ($_POST['password'] == $_POST['password2']) $encryptpassword = md5($_POST['password']);
178 187
 			else $fail =  write_message(_PASSWORDTWICE);
179
-			if(!isset($fail)) {
180
-				$result = dbquery("INSERT INTO ".$tableprefix."fanfiction_authors(`penname`, `email`, `password`, `date`) VALUES('$penname', '".$_POST['email']."', '$encryptpassword', now( ))");
181
-				define("USERUID", dbinsertid( ));
182
-				$skinquery = dbquery("SELECT skin FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".SITEKEY."'");
188
+			if (!isset($fail))
189
+			{
190
+				$result = dbquery("INSERT INTO " . $tableprefix . "fanfiction_authors(`penname`, `email`, `password`, `date`) VALUES('$penname', '" . $_POST['email'] . "', '$encryptpassword', now( ))");
191
+				define("USERUID", dbinsertid());
192
+				$skinquery = dbquery("SELECT skin FROM " . $settingsprefix . "fanfiction_settings WHERE sitekey = '" . SITEKEY . "'");
183 193
 				list($skin) = dbrow($skinquery);
184
-				$result2 = dbquery("INSERT INTO ".$tableprefix."fanfiction_authorprefs(`uid`, `userskin`, `level`) VALUES('".USERUID."', '$skin', '1')");
185
-				if($result && $result2) $output .= write_message(_ACTIONSUCCESSFUL."<br /><br />Installation complete!  <a href='../user.php?action=login'>Log in</a> to your site and go to the Admin area to configure your archive. <strong>Note:</strong> Please delete the install/ folder!");
194
+				$result2 = dbquery("INSERT INTO " . $tableprefix . "fanfiction_authorprefs(`uid`, `userskin`, `level`) VALUES('" . USERUID . "', '$skin', '1')");
195
+				if ($result && $result2) $output .= write_message(_ACTIONSUCCESSFUL . "<br /><br />Installation complete!  <a href='../user.php?action=login'>Log in</a> to your site and go to the Admin area to configure your archive. <strong>Note:</strong> Please delete the install/ folder!");
186 196
 			}
187 197
 			else $output .= $fail;
188 198
 		}
189
-		else {
190
-			$output .= "<div id='pagetitle'>"._ADMINACCT."</div><form method=\"POST\" class='tblborder' style='margin: 1em auto; width: 400px;' enctype=\"multipart/form-data\" action=\"install.php?step=9\">
191
-			<div class='row'><label for='newpenname'>"._PENNAME.":</label> 
192
-			<input name=\"newpenname\" type=\"text\" class=\"textbox\" maxlength=\"200\" value=\"".$user['penname']."\"></div>
193
-		 	<div class='row'><label for='email'>"._EMAIL.":</label> <INPUT  type=\"text\" class=\"textbox=\" name=\"email\" value=\"".$user['email'].
194
-			"\" maxlength=\"200\"></div>
195
-			<div class='row'><label for='password'>"._PASSWORD.":</label>  <INPUT name=\"password\" class=\"textbox\" value=\"\" type=\"password\"></div> 
196
-			<div class='row'><label for='password2'>"._PASSWORD2.":</label> <INPUT name=\"password2\" class=\"textbox=\" value=\"\" type=\"password\"></div>
197
-			<div style='text-align: center;'><INPUT type=\"submit\"class=\"button\" name=\"submit\" value=\"submit\"></div></form>";	
199
+		else
200
+		{
201
+			$output .= "<div id='pagetitle'>" . _ADMINACCT . "</div><form method=\"POST\" class='tblborder' style='margin: 1em auto; width: 400px;' enctype=\"multipart/form-data\" action=\"install.php?step=9\">
202
+			<div class='row'><label for='newpenname'>" . _PENNAME . ":</label> 
203
+			<input name=\"newpenname\" type=\"text\" class=\"textbox\" maxlength=\"200\" value=\"" . $user['penname'] . "\"></div>
204
+		 	<div class='row'><label for='email'>" . _EMAIL . ":</label> <INPUT  type=\"text\" class=\"textbox=\" name=\"email\" value=\"" . $user['email'] .
205
+				"\" maxlength=\"200\"></div>
206
+			<div class='row'><label for='password'>" . _PASSWORD . ":</label>  <INPUT name=\"password\" class=\"textbox\" value=\"\" type=\"password\"></div> 
207
+			<div class='row'><label for='password2'>" . _PASSWORD2 . ":</label> <INPUT name=\"password2\" class=\"textbox=\" value=\"\" type=\"password\"></div>
208
+			<div style='text-align: center;'><INPUT type=\"submit\"class=\"button\" name=\"submit\" value=\"submit\"></div></form>";
198 209
 		}
199
-	break;
210
+		break;
200 211
 
201 212
 	case "8":
202
-		$output .= "<div id='pagetitle'>"._AUTHORFIELDS."</div>";
203
-		if(isset($_GET['install'])) {
204
-			if($_GET['install'] == "automatic") {
205
-				$fields[] = array('4','lj','Live Journal','http://{info}.livejournal.com','','','0');
206
-				$fields[] = array('1','website','Web Site','','','','1');
207
-				$fields[] = array('5','AOL','AIM','','$output .= "<div><label for=\'AOL\'>".$field[\'field_title\'].":</label><INPUT type=\'text\' class=\'textbox\'  name=\'af_".$field[\'field_name\']."\' maxlength=\'40\' value=\'".(!empty($user[\'af_\'.$field[\'field_id\']]) ? $user[\'af_\'.$field[\'field_id\']] : "")."\' size=\'20\'></div>";','$thisfield = "<img src=\"http://big.oscar.aol.com/".$field[\'info\']."?on_url=$url/images/aim.gif&off_url=$url/images/aim.gif\"> <a href=\"aim:goim?{aol}ScreenName=".$field[\'info\']."\">".format_email($field[\'info\'])."</a>";','1');
208
-				$fields[] = array('5','ICQ','ICQ','','$output .= "<div><label for=\'AOL\'>".$field[\'field_title\'].":</label><INPUT type=\'text\' class=\'textbox\'  name=\'af_".$field[\'field_name\']."\' maxlength=\'40\' value=\'".(!empty($user[\'af_\'.$field[\'field_id\']]) ? $user[\'af_\'.$field[\'field_id\']] : "")."\' size=\'20\'></div>";','$thisfield = "<img src=\"http://status.icq.com/online.gif?icq=".$field[\'info\']."&img=5\"> ".$field[\'info\'];','1');
209
-				$fields[] = array('5','MSN','MSN IM','','$output .= "<div><label for=\'AOL\'>".$field[\'field_title\'].":</label><INPUT type=\'text\' class=\'textbox\'  name=\'af_".$field[\'field_name\']."\' maxlength=\'40\' value=\'".(!empty($user[\'af_\'.$field[\'field_id\']]) ? $user[\'af_\'.$field[\'field_id\']] : "")."\' size=\'20\'></div>";','$thisfield = "<img src=\"images/msntalk.gif\" alt=\""._MSN."\"> ".format_email($field[\'info\']);','1');
210
-				$fields[] = array('5','Yahoo','Yahoo IM','','$output .= "<div><label for=\'AOL\'>".$field[\'field_title\'].":</label><INPUT type=\'text\' class=\'textbox\'  name=\'af_".$field[\'field_name\']."\' maxlength=\'40\' value=\'".(!empty($user[\'af_\'.$field[\'field_id\']]) ? $user[\'af_\'.$field[\'field_id\']] : "")."\' size=\'20\'></div>";','$thisfield = "<a href=\"http://edit.yahoo.com/config/send_webmesg?.target=".$field[\'info\']."&.src=pg\"><img border=\'0\' src=\"http://opi.yahoo.com/online?u=".$field[\'info\']."&m=g&t=1\"> ".format_email($field[\'info\'])."</a>";','1');
211
-				$fields[] = array('4','da','Deviant Art','http://{info}.deviantart.com','','','0');
212
-				$fields[] = array('3','betareader','Beta-reader','','','','1');
213
-				$fields[] = array('4','dj','DeadJournal','http://{info}.deadjournal.com/','','','0');
214
-				$fields[] = array('4','xanga','Xanga','http://www.xanga.com/{info}','','','0');
213
+		$output .= "<div id='pagetitle'>" . _AUTHORFIELDS . "</div>";
214
+		if (isset($_GET['install']))
215
+		{
216
+			if ($_GET['install'] == "automatic")
217
+			{
218
+				$fields[] = array('4', 'lj', 'Live Journal', 'http://{info}.livejournal.com', '', '', '0');
219
+				$fields[] = array('1', 'website', 'Web Site', '', '', '', '1');
220
+				$fields[] = array('5', 'AOL', 'AIM', '', '$output .= "<div><label for=\'AOL\'>".$field[\'field_title\'].":</label><INPUT type=\'text\' class=\'textbox\'  name=\'af_".$field[\'field_name\']."\' maxlength=\'40\' value=\'".(!empty($user[\'af_\'.$field[\'field_id\']]) ? $user[\'af_\'.$field[\'field_id\']] : "")."\' size=\'20\'></div>";', '$thisfield = "<img src=\"http://big.oscar.aol.com/".$field[\'info\']."?on_url=$url/images/aim.gif&off_url=$url/images/aim.gif\"> <a href=\"aim:goim?{aol}ScreenName=".$field[\'info\']."\">".format_email($field[\'info\'])."</a>";', '1');
221
+				$fields[] = array('5', 'ICQ', 'ICQ', '', '$output .= "<div><label for=\'AOL\'>".$field[\'field_title\'].":</label><INPUT type=\'text\' class=\'textbox\'  name=\'af_".$field[\'field_name\']."\' maxlength=\'40\' value=\'".(!empty($user[\'af_\'.$field[\'field_id\']]) ? $user[\'af_\'.$field[\'field_id\']] : "")."\' size=\'20\'></div>";', '$thisfield = "<img src=\"http://status.icq.com/online.gif?icq=".$field[\'info\']."&img=5\"> ".$field[\'info\'];', '1');
222
+				$fields[] = array('5', 'MSN', 'MSN IM', '', '$output .= "<div><label for=\'AOL\'>".$field[\'field_title\'].":</label><INPUT type=\'text\' class=\'textbox\'  name=\'af_".$field[\'field_name\']."\' maxlength=\'40\' value=\'".(!empty($user[\'af_\'.$field[\'field_id\']]) ? $user[\'af_\'.$field[\'field_id\']] : "")."\' size=\'20\'></div>";', '$thisfield = "<img src=\"images/msntalk.gif\" alt=\""._MSN."\"> ".format_email($field[\'info\']);', '1');
223
+				$fields[] = array('5', 'Yahoo', 'Yahoo IM', '', '$output .= "<div><label for=\'AOL\'>".$field[\'field_title\'].":</label><INPUT type=\'text\' class=\'textbox\'  name=\'af_".$field[\'field_name\']."\' maxlength=\'40\' value=\'".(!empty($user[\'af_\'.$field[\'field_id\']]) ? $user[\'af_\'.$field[\'field_id\']] : "")."\' size=\'20\'></div>";', '$thisfield = "<a href=\"http://edit.yahoo.com/config/send_webmesg?.target=".$field[\'info\']."&.src=pg\"><img border=\'0\' src=\"http://opi.yahoo.com/online?u=".$field[\'info\']."&m=g&t=1\"> ".format_email($field[\'info\'])."</a>";', '1');
224
+				$fields[] = array('4', 'da', 'Deviant Art', 'http://{info}.deviantart.com', '', '', '0');
225
+				$fields[] = array('3', 'betareader', 'Beta-reader', '', '', '', '1');
226
+				$fields[] = array('4', 'dj', 'DeadJournal', 'http://{info}.deadjournal.com/', '', '', '0');
227
+				$fields[] = array('4', 'xanga', 'Xanga', 'http://www.xanga.com/{info}', '', '', '0');
215 228
 				$fields[] = array('2', 'gender', 'Gender', 'male|#|female|#|undisclosed', '', '', 0);
216
-				$fields[] = array('4','myspace','MySpace','http://www.myspace.com/{info}','','','0');
217
-		
218
-				$output .= "<table class='tblborder' style='margin: 1em auto; padding: 1em;' cellpadding='5'><tr><th>"._FIELD."</th><th>"._RESULT."</th></tr>";
219
-				foreach($fields as $field) {
220
-					$f = dbquery("INSERT INTO `".$tableprefix."fanfiction_authorfields` (`field_type`, `field_name`, `field_title`, `field_options`, `field_code_in`, `field_code_out`, `field_on`) VALUES('".$field[0]."', '".$field[1]."','".$field[2]."','".escapestring($field[3])."','".escapestring($field[4])."','".escapestring($field[5])."','".$field[6]."');");
221
-					$output .= "<tr><td>".$field[2]."</td><td align='center'>" . ($f ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
229
+				$fields[] = array('4', 'myspace', 'MySpace', 'http://www.myspace.com/{info}', '', '', '0');
230
+
231
+				$output .= "<table class='tblborder' style='margin: 1em auto; padding: 1em;' cellpadding='5'><tr><th>" . _FIELD . "</th><th>" . _RESULT . "</th></tr>";
232
+				foreach ($fields as $field)
233
+				{
234
+					$f = dbquery("INSERT INTO `" . $tableprefix . "fanfiction_authorfields` (`field_type`, `field_name`, `field_title`, `field_options`, `field_code_in`, `field_code_out`, `field_on`) VALUES('" . $field[0] . "', '" . $field[1] . "','" . $field[2] . "','" . escapestring($field[3]) . "','" . escapestring($field[4]) . "','" . escapestring($field[5]) . "','" . $field[6] . "');");
235
+					$output .= "<tr><td>" . $field[2] . "</td><td align='center'>" . ($f ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
222 236
 				}
223 237
 				$output .= "</table>";
224
-				$output .= write_message(_FIELDAUTOFAIL."<br /><br /> <a href='install.php?step=9'>"._CONTINUE."</a>");
238
+				$output .= write_message(_FIELDAUTOFAIL . "<br /><br /> <a href='install.php?step=9'>" . _CONTINUE . "</a>");
225 239
 			}
226
-			else {
227
-				$output .= write_message(_FIELDMANUAL."<br /><br /><a href='install.php?step=9'>"._CONTINUE."</a>");
240
+			else
241
+			{
242
+				$output .= write_message(_FIELDMANUAL . "<br /><br /><a href='install.php?step=9'>" . _CONTINUE . "</a>");
228 243
 			}
229 244
 		}
230
-		else $output .= write_message(_FIELDDATAINFO."<br /><br /><a href='install.php?step=8&amp;install=automatic'>"._AUTO."</a> "._OR." <a href='install.php?step=8&amp;install=manual'>"._MANUAL2."</a>");
231
-	break;
245
+		else $output .= write_message(_FIELDDATAINFO . "<br /><br /><a href='install.php?step=8&amp;install=automatic'>" . _AUTO . "</a> " . _OR . " <a href='install.php?step=8&amp;install=manual'>" . _MANUAL2 . "</a>");
246
+		break;
232 247
 	case "7":
233
-		$output .= "<div id='pagetitle'>"._MESSAGEDATA."</div>";
234
-		if(isset($_GET['install'])) {
235
-			if($_GET['install'] == "automatic") {
236
-				$output .= "<table class='tblborder' style='margin: 1em auto; padding: 1em;' cellpadding='5'><tr><th>"._MESSAGE."</th><th>"._RESULT."</th></tr>";
237
-				$msg = dbquery("INSERT INTO `".$tableprefix."fanfiction_messages` VALUES (1, 'welcome', '', 'This is your welcome message. It appears on the index page. Include it in your .tpl files with {welcome}.');");
238
-				$output .= "<tr><td>Welcome</td><td align='center'>" . ($msg ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
239
-				$msg = dbquery("INSERT INTO `".$tableprefix."fanfiction_messages` VALUES (2, 'copyright', '', 'This is your sample copyright footer.  Include it in your footer.tpl with <b>{footer}</b><br />\r\n<u>Disclaimer:</u>  All publicly recognizable characters, settings, etc. are the property of their respective owners.  The original characters and plot are the property of the author.  No money is being made from this work.  No copyright infringement is intended.\r\n');");
240
-				$output .= "<tr><td>Copyright</td><td align='center'>" . ($msg ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
241
-				$msg = dbquery("INSERT INTO `".$tableprefix."fanfiction_messages` VALUES (3, 'help', 'Help', '<h3>FAQ</h3><p><strong>I forgot my password!&nbsp; What do I do now?</strong></p><p>To recover a lost password, <a href=\"user.php?action=lostpassword\">click here</a> and enter the e-mail address with which you registered.&nbsp; Your password will be sent to you shortly.</p><p><strong>What kinds of stories are allowed?</strong></p><p>See our <a href=\"submission.php\">Submission Rules.</a></p><p><strong>How do I contact the site administrators?</strong></p><p>You can e-mail us via our <a href=\"contact.php\">contact form.</a></p><p><strong>How do I submit stories?</strong></p><p>If you have not already done so, please <a href=\"user.php?action=newaccount\">register for an account</a>. Once you\'ve logged in, click on <a href=\"user.php\">Account Information</a> and choose <a href=\"stories.php?action=newstory\">Add Story</a>.&nbsp; The form presented there will allow you to submit your story.</p><p><strong>What are the ratings used on the site?</strong></p><p>We use the ratings system from <a href=\"http://www.fictionratings.com/\">www.fictionratings.com</a>.</p><p><strong>What are the story classifications?</strong></p><p>Stories are classified by categories, genres, and warnings.</p>');");
242
-				$output .= "<tr><td>Help</td><td align='center'>" . ($msg ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
243
-				$msg = dbquery("INSERT INTO `".$tableprefix."fanfiction_messages` VALUES (4, 'nothankyou', 'Submission Rejection', 'Your recent submission of \"{storytitle} : {chaptertitle}\" to {sitename} did not meet our requirements for submission.  Please review our {rules}.<br /><br />\r\n\r\n{adminname}');");
244
-				$output .= "<tr><td>Rejection Letter</td><td align='center'>" . ($msg ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
245
-				$msg = dbquery("INSERT INTO `".$tableprefix."fanfiction_messages` VALUES (5, 'printercopyright', '', '<u>Disclaimer:</u> All publicly recognizable characters and settings are the property of their respective owners. The original characters and plot are the property of the author. No money is being made from this work. No copyright infringement is intended.');");
246
-				$output .= "<tr><td>Printable Copyright</td><td align='center'>" . ($msg ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
247
-				$msg = dbquery("INSERT INTO `".$tableprefix."fanfiction_messages` VALUES (6, 'rules', 'Submission Rules', '<p align=\"center\"><strong>Submission Rules</strong></p>\r\n<ol>\r\n  <li>All submissions must be accompanied by a complete disclaimer. If a \r\n  suitable disclaimer is not included, the site administrators reserve the right \r\n  to add a disclaimer.&nbsp; Repeat offenders may be subject to further action \r\n  up to and including removal of stories and account.\r\n<div class=\"tblborder\" style=\"width: 400px; margin: 1em auto;\">\r\n<div style=\"background: #000; color: #FFF; padding: 5px; text-align: center; font-weight: bold;\">Sample Disclaimer</div>\r\n<div class=\"tblborder\" style=\"padding: 5px;\"><span style=\"text-decoration: underline;\">Disclaimer:</span>  All publicly recognizable characters, settings, etc. are the property of their respective owners.  The original characters and plot are the property of the author.&nbsp; \r\n        The author is in no way associated with the owners, creators, or producers of any media franchise.&nbsp;  No copyright infringement is intended.</div>\r\n  </div>\r\n  </li>\r\n  <li>Stories must be submitted to the proper category. &nbsp;If there is an appropriate sub-category, <strong>DO NOT</strong> add your story to the main category.&nbsp; The submission \r\n  form allows you to choose multiple categories for your story, and we worked very hard to add that functionality for you.&nbsp;&nbsp; <u><strong>So please \r\n  do NOT add your story multiple times!</strong></u></li>\r\n  <li>Titles and summaries must be kid friendly.&nbsp; No exceptions.&nbsp; </li>\r\n  <li>&quot;Please read&quot;, &quot;Untitled&quot;, etc. are not acceptable titles or summaries.</li>\r\n  <li>A number of authors have requested that fans refrain from writing fan \r\n  fiction based on their work.&nbsp; Therefore submissions will not be \r\n  accepted based on the works of P.N. Elrod, Raymond Feist, Terry Goodkind, \r\n  Laurell K. Hamilton, Anne McCaffrey, Robin McKinley, Irene Radford, Anne Rice, \r\n  and Nora Roberts/J.D. Robb.&nbsp; </li>\r\n  <li>Actor/actress stories are not permitted...not even if they\'re visiting an \r\n  alternate reality.</li>\r\n  <li>Correct grammar and spelling are expected of all stories submitted to this \r\n  site.&nbsp; The site administrators are not grammar Nazis.&nbsp; However, the \r\n  site administrators reserve the right to request corrections in submissions \r\n  with a multitude of grammar and/or spelling errors.&nbsp; If such a request is \r\n  ignored, the story will be deleted.</li>\r\n  <li>All stories must be rated correctly and have the appropriate warnings.&nbsp; \r\n  All adult rated stories are expected to have warnings.&nbsp; After all, they \r\n  wouldn\'t have that rating if there wasn\'t something to be warned about!&nbsp; The site administrators recognize \r\n  that there is an audience for these stories, but please respect those who do \r\n  not wish to read them by labeling them appropriately.&nbsp;\r\n  <u><strong>Please note: Stories containing adults having sex with minors are strictly forbidden.</strong></u>&nbsp; </li>\r\n  <li>Stories with multiple chapters should be archived as such and <span style=\"font-weight: bold; text-decoration: underline;\">NEVER</span> as \r\n  separate stories.&nbsp; Upload the first chapter of your story, then go to <a href=\"stories.php?action=viewstories\">Manage Stories</a> in \r\nyour account to add additional chapters.  If you have trouble with this, please contact the site administrator or ask a \r\n  friend to help you.</li>\r\n  <li>As much as possible, spoiler warnings are expected on all stories.  For categories with serialized content, such as series of books or television series, \r\n  spoilers are <strong>mandatory</strong> for the current season and/or most recent part.  An appropriate spoiler warning to place in your summary would be: Spoilers for <u>Star Trek II: The Wrath of Khan.</u> \r\n  <strong>DO NOT</strong> do anything like this: <u>Spoilers for the one where Spock dies.</u></li>\r\n</ol>\r\n  <p>Submissions found to be in violation of these rules may be removed and the \r\n  author\'s account suspended at the discretion of the site administrators and/or \r\n  moderators.&nbsp; The site administrators reserve the right to modify these \r\n  rules as needed.</p>');");
248
-				$output .= "<tr><td>Submission Rules</td><td align='center'>" . ($msg ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
249
-				$msg = dbquery("INSERT INTO `".$tableprefix."fanfiction_messages` VALUES (7, 'thankyou', '{sitename} Submission Acceptance', 'Thanks for your submission.');");
250
-				$output .= "<tr><td>Acceptance Letter</td><td align='center'>" . ($msg ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
251
-				$msg = dbquery("INSERT INTO `".$tableprefix."fanfiction_messages` VALUES (8, 'tos', 'Terms of Service', 'This is the Terms of Service for your site.  It will be displayed when a new member registers to the site.');");
252
-				$output .= "<tr><td>Terms of Service</td><td align='center'>" . ($msg ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
253
-				$msg = dbquery("INSERT INTO `".$tableprefix."fanfiction_messages` VALUES (9, 'maintenance', 'Site Maintenance', '<p style=\"text-align: center;\">This site is currently undergoing maintenance.  Please check back soon.  Thank you.</p>');");
254
-				$output .= "<tr><td>Site Maintenance</td><td align='center'>" . ($msg ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
248
+		$output .= "<div id='pagetitle'>" . _MESSAGEDATA . "</div>";
249
+		if (isset($_GET['install']))
250
+		{
251
+			if ($_GET['install'] == "automatic")
252
+			{
253
+				$output .= "<table class='tblborder' style='margin: 1em auto; padding: 1em;' cellpadding='5'><tr><th>" . _MESSAGE . "</th><th>" . _RESULT . "</th></tr>";
254
+				$msg = dbquery("INSERT INTO `" . $tableprefix . "fanfiction_messages` VALUES (1, 'welcome', '', 'This is your welcome message. It appears on the index page. Include it in your .tpl files with {welcome}.');");
255
+				$output .= "<tr><td>Welcome</td><td align='center'>" . ($msg ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
256
+				$msg = dbquery("INSERT INTO `" . $tableprefix . "fanfiction_messages` VALUES (2, 'copyright', '', 'This is your sample copyright footer.  Include it in your footer.tpl with <b>{footer}</b><br />\r\n<u>Disclaimer:</u>  All publicly recognizable characters, settings, etc. are the property of their respective owners.  The original characters and plot are the property of the author.  No money is being made from this work.  No copyright infringement is intended.\r\n');");
257
+				$output .= "<tr><td>Copyright</td><td align='center'>" . ($msg ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
258
+				$msg = dbquery("INSERT INTO `" . $tableprefix . "fanfiction_messages` VALUES (3, 'help', 'Help', '<h3>FAQ</h3><p><strong>I forgot my password!&nbsp; What do I do now?</strong></p><p>To recover a lost password, <a href=\"user.php?action=lostpassword\">click here</a> and enter the e-mail address with which you registered.&nbsp; Your password will be sent to you shortly.</p><p><strong>What kinds of stories are allowed?</strong></p><p>See our <a href=\"submission.php\">Submission Rules.</a></p><p><strong>How do I contact the site administrators?</strong></p><p>You can e-mail us via our <a href=\"contact.php\">contact form.</a></p><p><strong>How do I submit stories?</strong></p><p>If you have not already done so, please <a href=\"user.php?action=newaccount\">register for an account</a>. Once you\'ve logged in, click on <a href=\"user.php\">Account Information</a> and choose <a href=\"stories.php?action=newstory\">Add Story</a>.&nbsp; The form presented there will allow you to submit your story.</p><p><strong>What are the ratings used on the site?</strong></p><p>We use the ratings system from <a href=\"http://www.fictionratings.com/\">www.fictionratings.com</a>.</p><p><strong>What are the story classifications?</strong></p><p>Stories are classified by categories, genres, and warnings.</p>');");
259
+				$output .= "<tr><td>Help</td><td align='center'>" . ($msg ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
260
+				$msg = dbquery("INSERT INTO `" . $tableprefix . "fanfiction_messages` VALUES (4, 'nothankyou', 'Submission Rejection', 'Your recent submission of \"{storytitle} : {chaptertitle}\" to {sitename} did not meet our requirements for submission.  Please review our {rules}.<br /><br />\r\n\r\n{adminname}');");
261
+				$output .= "<tr><td>Rejection Letter</td><td align='center'>" . ($msg ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
262
+				$msg = dbquery("INSERT INTO `" . $tableprefix . "fanfiction_messages` VALUES (5, 'printercopyright', '', '<u>Disclaimer:</u> All publicly recognizable characters and settings are the property of their respective owners. The original characters and plot are the property of the author. No money is being made from this work. No copyright infringement is intended.');");
263
+				$output .= "<tr><td>Printable Copyright</td><td align='center'>" . ($msg ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
264
+				$msg = dbquery("INSERT INTO `" . $tableprefix . "fanfiction_messages` VALUES (6, 'rules', 'Submission Rules', '<p align=\"center\"><strong>Submission Rules</strong></p>\r\n<ol>\r\n  <li>All submissions must be accompanied by a complete disclaimer. If a \r\n  suitable disclaimer is not included, the site administrators reserve the right \r\n  to add a disclaimer.&nbsp; Repeat offenders may be subject to further action \r\n  up to and including removal of stories and account.\r\n<div class=\"tblborder\" style=\"width: 400px; margin: 1em auto;\">\r\n<div style=\"background: #000; color: #FFF; padding: 5px; text-align: center; font-weight: bold;\">Sample Disclaimer</div>\r\n<div class=\"tblborder\" style=\"padding: 5px;\"><span style=\"text-decoration: underline;\">Disclaimer:</span>  All publicly recognizable characters, settings, etc. are the property of their respective owners.  The original characters and plot are the property of the author.&nbsp; \r\n        The author is in no way associated with the owners, creators, or producers of any media franchise.&nbsp;  No copyright infringement is intended.</div>\r\n  </div>\r\n  </li>\r\n  <li>Stories must be submitted to the proper category. &nbsp;If there is an appropriate sub-category, <strong>DO NOT</strong> add your story to the main category.&nbsp; The submission \r\n  form allows you to choose multiple categories for your story, and we worked very hard to add that functionality for you.&nbsp;&nbsp; <u><strong>So please \r\n  do NOT add your story multiple times!</strong></u></li>\r\n  <li>Titles and summaries must be kid friendly.&nbsp; No exceptions.&nbsp; </li>\r\n  <li>&quot;Please read&quot;, &quot;Untitled&quot;, etc. are not acceptable titles or summaries.</li>\r\n  <li>A number of authors have requested that fans refrain from writing fan \r\n  fiction based on their work.&nbsp; Therefore submissions will not be \r\n  accepted based on the works of P.N. Elrod, Raymond Feist, Terry Goodkind, \r\n  Laurell K. Hamilton, Anne McCaffrey, Robin McKinley, Irene Radford, Anne Rice, \r\n  and Nora Roberts/J.D. Robb.&nbsp; </li>\r\n  <li>Actor/actress stories are not permitted...not even if they\'re visiting an \r\n  alternate reality.</li>\r\n  <li>Correct grammar and spelling are expected of all stories submitted to this \r\n  site.&nbsp; The site administrators are not grammar Nazis.&nbsp; However, the \r\n  site administrators reserve the right to request corrections in submissions \r\n  with a multitude of grammar and/or spelling errors.&nbsp; If such a request is \r\n  ignored, the story will be deleted.</li>\r\n  <li>All stories must be rated correctly and have the appropriate warnings.&nbsp; \r\n  All adult rated stories are expected to have warnings.&nbsp; After all, they \r\n  wouldn\'t have that rating if there wasn\'t something to be warned about!&nbsp; The site administrators recognize \r\n  that there is an audience for these stories, but please respect those who do \r\n  not wish to read them by labeling them appropriately.&nbsp;\r\n  <u><strong>Please note: Stories containing adults having sex with minors are strictly forbidden.</strong></u>&nbsp; </li>\r\n  <li>Stories with multiple chapters should be archived as such and <span style=\"font-weight: bold; text-decoration: underline;\">NEVER</span> as \r\n  separate stories.&nbsp; Upload the first chapter of your story, then go to <a href=\"stories.php?action=viewstories\">Manage Stories</a> in \r\nyour account to add additional chapters.  If you have trouble with this, please contact the site administrator or ask a \r\n  friend to help you.</li>\r\n  <li>As much as possible, spoiler warnings are expected on all stories.  For categories with serialized content, such as series of books or television series, \r\n  spoilers are <strong>mandatory</strong> for the current season and/or most recent part.  An appropriate spoiler warning to place in your summary would be: Spoilers for <u>Star Trek II: The Wrath of Khan.</u> \r\n  <strong>DO NOT</strong> do anything like this: <u>Spoilers for the one where Spock dies.</u></li>\r\n</ol>\r\n  <p>Submissions found to be in violation of these rules may be removed and the \r\n  author\'s account suspended at the discretion of the site administrators and/or \r\n  moderators.&nbsp; The site administrators reserve the right to modify these \r\n  rules as needed.</p>');");
265
+				$output .= "<tr><td>Submission Rules</td><td align='center'>" . ($msg ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
266
+				$msg = dbquery("INSERT INTO `" . $tableprefix . "fanfiction_messages` VALUES (7, 'thankyou', '{sitename} Submission Acceptance', 'Thanks for your submission.');");
267
+				$output .= "<tr><td>Acceptance Letter</td><td align='center'>" . ($msg ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
268
+				$msg = dbquery("INSERT INTO `" . $tableprefix . "fanfiction_messages` VALUES (8, 'tos', 'Terms of Service', 'This is the Terms of Service for your site.  It will be displayed when a new member registers to the site.');");
269
+				$output .= "<tr><td>Terms of Service</td><td align='center'>" . ($msg ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
270
+				$msg = dbquery("INSERT INTO `" . $tableprefix . "fanfiction_messages` VALUES (9, 'maintenance', 'Site Maintenance', '<p style=\"text-align: center;\">This site is currently undergoing maintenance.  Please check back soon.  Thank you.</p>');");
271
+				$output .= "<tr><td>Site Maintenance</td><td align='center'>" . ($msg ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
255 272
 				$output .= "</table>";
256
-				$output .= write_message(_MESSAGEAUTOFAILUPGRADE."<br /><br /> <a href='install.php?step=8'>"._CONTINUE."</a>");
273
+				$output .= write_message(_MESSAGEAUTOFAILUPGRADE . "<br /><br /> <a href='install.php?step=8'>" . _CONTINUE . "</a>");
257 274
 			}
258
-			else {
259
-				$output .= write_message(_MESSAGEMANUAL."<br /><br /><a href='install.php?step=8'>"._CONTINUE."</a>");
275
+			else
276
+			{
277
+				$output .= write_message(_MESSAGEMANUAL . "<br /><br /><a href='install.php?step=8'>" . _CONTINUE . "</a>");
260 278
 			}
261 279
 		}
262
-		else $output .= write_message(_MESSAGEDATANEW."<br /><br /><a href='install.php?step=7&amp;install=automatic'>"._AUTO."</a> "._OR." <a href='install.php?step=7&amp;install=manual'>"._MANUAL2."</a>");
280
+		else $output .= write_message(_MESSAGEDATANEW . "<br /><br /><a href='install.php?step=7&amp;install=automatic'>" . _AUTO . "</a> " . _OR . " <a href='install.php?step=7&amp;install=manual'>" . _MANUAL2 . "</a>");
263 281
 
264
-	break;
282
+		break;
265 283
 	case "6":
266
-		$output .= "<div id='pagetitle'>"._BLOCKDATA."</div>";
267
-		if(isset($_GET['install'])) {
268
-			if($_GET['install'] == "automatic") {
284
+		$output .= "<div id='pagetitle'>" . _BLOCKDATA . "</div>";
285
+		if (isset($_GET['install']))
286
+		{
287
+			if ($_GET['install'] == "automatic")
288
+			{
269 289
 				$blocklist = array(
270
-					array("categories","Categories","categories/categories.php","1",""),
271
-					array("featured","Featured Stories","featured/featured.php","1",""),
272
-					array("info","Site Info","info/info.php","2",""),
273
-					array("login","Log In","login/login.php","1",""),
274
-					array("menu","Main Menu","menu/menu.php","1",""),
275
-					array("random","Random Story","random/random.php","2",""),
276
-					array("recent","Most Recent","recent/recent.php","2","a:1:{s:3:\"num\";s:1:\"1\";}"),
277
-					array("skinchange","Skin Change","skinchange/skinchange.php","1",""),
278
-					array("news","Site News","news/news.php","1","a:1:{s:3:\"num\";s:1:\"1\";}")
290
+					array("categories", "Categories", "categories/categories.php", "1", ""),
291
+					array("featured", "Featured Stories", "featured/featured.php", "1", ""),
292
+					array("info", "Site Info", "info/info.php", "2", ""),
293
+					array("login", "Log In", "login/login.php", "1", ""),
294
+					array("menu", "Main Menu", "menu/menu.php", "1", ""),
295
+					array("random", "Random Story", "random/random.php", "2", ""),
296
+					array("recent", "Most Recent", "recent/recent.php", "2", "a:1:{s:3:\"num\";s:1:\"1\";}"),
297
+					array("skinchange", "Skin Change", "skinchange/skinchange.php", "1", ""),
298
+					array("news", "Site News", "news/news.php", "1", "a:1:{s:3:\"num\";s:1:\"1\";}")
279 299
 				);
280
-				$output .= "<table class='tblborder' style='margin: 1em auto; padding: 1em;' cellpadding='5'><tr><th>"._BLOCK."</th><th>"._RESULT."</th></tr>";
281
-				foreach($blocklist as $block) {
282
-					$b = dbquery("INSERT INTO `".$tableprefix."fanfiction_blocks` (`block_name`, `block_title`, `block_file`, `block_status`, `block_variables`) VALUES('".$block[0]."', '".$block[1]."', '".$block[2]."', '".$block[3]."', '".escapestring($block[4])."');");
283
-					$output .= "<tr><td>".$block[1]."</td><td align='center'>" . ($b ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
300
+				$output .= "<table class='tblborder' style='margin: 1em auto; padding: 1em;' cellpadding='5'><tr><th>" . _BLOCK . "</th><th>" . _RESULT . "</th></tr>";
301
+				foreach ($blocklist as $block)
302
+				{
303
+					$b = dbquery("INSERT INTO `" . $tableprefix . "fanfiction_blocks` (`block_name`, `block_title`, `block_file`, `block_status`, `block_variables`) VALUES('" . $block[0] . "', '" . $block[1] . "', '" . $block[2] . "', '" . $block[3] . "', '" . escapestring($block[4]) . "');");
304
+					$output .= "<tr><td>" . $block[1] . "</td><td align='center'>" . ($b ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
284 305
 				}
285 306
 				$output .= "</table>";
286
-				$output .= write_message(_BLOCKDATAFAILUPGRADE."<br /><br /><a href='install.php?step=7'>"._CONTINUE."</a>");
307
+				$output .= write_message(_BLOCKDATAFAILUPGRADE . "<br /><br /><a href='install.php?step=7'>" . _CONTINUE . "</a>");
287 308
 			}
288
-			else {
289
-				$output .= write_message(_BLOCKDATAMANUAL."<br /><br /><a href='install.php?step=6'>"._CONTINUE."</a>");
309
+			else
310
+			{
311
+				$output .= write_message(_BLOCKDATAMANUAL . "<br /><br /><a href='install.php?step=6'>" . _CONTINUE . "</a>");
290 312
 			}
291 313
 		}
292
-		else $output .= write_message(_BLOCKDATANEW."<br /><br /><a href='install.php?step=6&amp;install=automatic'>"._AUTO."</a> "._OR." <a href='install.php?step=6&amp;install=manual'>"._MANUAL2."</a>");
293
-	break;
314
+		else $output .= write_message(_BLOCKDATANEW . "<br /><br /><a href='install.php?step=6&amp;install=automatic'>" . _AUTO . "</a> " . _OR . " <a href='install.php?step=6&amp;install=manual'>" . _MANUAL2 . "</a>");
315
+		break;
294 316
 	case "5":
295
-		$output .= "<div id='pagetitle'>"._LINKDATA."</div>";
296
-		if(isset($_GET['install'])) {
297
-			if($_GET['install'] == "automatic") {
317
+		$output .= "<div id='pagetitle'>" . _LINKDATA . "</div>";
318
+		if (isset($_GET['install']))
319
+		{
320
+			if ($_GET['install'] == "automatic")
321
+			{
298 322
 				$pagelist = array(
299
-					array("home","Home","index.php","0","0"),
300
-					array("recent","Most Recent","browse.php?type=recent","0","0"),
301
-					array("login","Login","user.php?action=login","0","0"),
302
-					array("adminarea","Admin","admin.php","0","2"),
303
-					array("logout","Logout","user.php?action=logout","0","1"),
304
-					array("featured","Featured Stories","browse.php?type=featured","0","0"),
305
-					array("catslink","Categories","browse.php?type=categories","0","0"),
306
-					array("members","Members","authors.php?action=list","0","0"),
307
-					array("authors","Authors","authors.php?list=authors","0","0"),
308
-					array("help","Help","viewpage.php?page=help","0","0"),
309
-					array("search","Search","search.php","0","0"),
310
-					array("series","Series","browse.php?type=series","0","0"),
311
-					array("tens","Top Tens","toplists.php","0","0"),
312
-					array("challenges","Challenges","modules/challenges/challenges.php","0","0"),
313
-					array("contactus","Contact Us","contact.php","0","0"),
314
-					array("rules","Rules","viewpage.php?page=rules","0","0"),
315
-					array("tos","Terms of Service","viewpage.php?page=tos","0","0"),
316
-					array("rss","<img src=\'images/xml.gif\' alt=\'RSS\' border=\'0\'>","rss.php","0","0"),
317
-					array("login","Account Info","user.php","0","1"),
318
-					array("titles","Titles","browse.php?type=titles","0","0"),
319
-					array("register","Register","user.php?action=register","0","0"),
320
-					array("lostpassword","Lost Password","user.php?action=lostpassword","0","0"),
321
-					array("newsarchive","News Archive","news.php","0","0"),
322
-					array("browse","Browse","browse.php","0","0"),
323
-					array("charslink", "Characters", "browse.php?type=characters","0","0"),
323
+					array("home", "Home", "index.php", "0", "0"),
324
+					array("recent", "Most Recent", "browse.php?type=recent", "0", "0"),
325
+					array("login", "Login", "user.php?action=login", "0", "0"),
326
+					array("adminarea", "Admin", "admin.php", "0", "2"),
327
+					array("logout", "Logout", "user.php?action=logout", "0", "1"),
328
+					array("featured", "Featured Stories", "browse.php?type=featured", "0", "0"),
329
+					array("catslink", "Categories", "browse.php?type=categories", "0", "0"),
330
+					array("members", "Members", "authors.php?action=list", "0", "0"),
331
+					array("authors", "Authors", "authors.php?list=authors", "0", "0"),
332
+					array("help", "Help", "viewpage.php?page=help", "0", "0"),
333
+					array("search", "Search", "search.php", "0", "0"),
334
+					array("series", "Series", "browse.php?type=series", "0", "0"),
335
+					array("tens", "Top Tens", "toplists.php", "0", "0"),
336
+					array("challenges", "Challenges", "modules/challenges/challenges.php", "0", "0"),
337
+					array("contactus", "Contact Us", "contact.php", "0", "0"),
338
+					array("rules", "Rules", "viewpage.php?page=rules", "0", "0"),
339
+					array("tos", "Terms of Service", "viewpage.php?page=tos", "0", "0"),
340
+					array("rss", "<img src=\'images/xml.gif\' alt=\'RSS\' border=\'0\'>", "rss.php", "0", "0"),
341
+					array("login", "Account Info", "user.php", "0", "1"),
342
+					array("titles", "Titles", "browse.php?type=titles", "0", "0"),
343
+					array("register", "Register", "user.php?action=register", "0", "0"),
344
+					array("lostpassword", "Lost Password", "user.php?action=lostpassword", "0", "0"),
345
+					array("newsarchive", "News Archive", "news.php", "0", "0"),
346
+					array("browse", "Browse", "browse.php", "0", "0"),
347
+					array("charslink", "Characters", "browse.php?type=characters", "0", "0"),
324 348
 					array("ratings", "Ratings", "browse.php?type=ratings", "0", "0"),
325 349
 				);
326
-				$output .= "<table class='tblborder' style='margin: 1em auto; padding: 1em;' cellpadding='5'><tr><th>"._PAGE."</th><th>"._RESULT."</th></tr>";
327
-				foreach($pagelist as $page) {
328
-					$pages = dbquery("INSERT INTO `".$tableprefix."fanfiction_pagelinks` (`link_name`, `link_text`, `link_url`, `link_target`, `link_access`) VALUES ('".$page[0]."', '".$page[1]."', '".$page[2]."', '".$page[3]."', '".$page[4]."');");
329
-					$output .= "<tr><td>".stripslashes($page[1])."</td><td align='center'>" . ($pages ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
350
+				$output .= "<table class='tblborder' style='margin: 1em auto; padding: 1em;' cellpadding='5'><tr><th>" . _PAGE . "</th><th>" . _RESULT . "</th></tr>";
351
+				foreach ($pagelist as $page)
352
+				{
353
+					$pages = dbquery("INSERT INTO `" . $tableprefix . "fanfiction_pagelinks` (`link_name`, `link_text`, `link_url`, `link_target`, `link_access`) VALUES ('" . $page[0] . "', '" . $page[1] . "', '" . $page[2] . "', '" . $page[3] . "', '" . $page[4] . "');");
354
+					$output .= "<tr><td>" . stripslashes($page[1]) . "</td><td align='center'>" . ($pages ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
330 355
 				}
331 356
 
332 357
 				$output .= "</table>";
333
-				$output .= write_message(_LINKAUTOFAIL."<br /><br /> <a href='install.php?step=6'>"._CONTINUE."</a>");
358
+				$output .= write_message(_LINKAUTOFAIL . "<br /><br /> <a href='install.php?step=6'>" . _CONTINUE . "</a>");
334 359
 			}
335
-			else {
336
-				$output .= write_message(_LINKMANUAL."<br /><br /><a href='install.php?step=5'>"._CONTINUE."</a>");
360
+			else
361
+			{
362
+				$output .= write_message(_LINKMANUAL . "<br /><br /><a href='install.php?step=5'>" . _CONTINUE . "</a>");
337 363
 			}
338 364
 		}
339
-		else $output .= write_message(_LINKDATAINFO."<br /><br />"._LINKSETUP." <a href='install.php?step=5&amp;install=automatic'>"._AUTO."</a> "._OR." <a href='install.php?step=5&amp;install=manual'>"._MANUAL2."</a>");
340
-	break;
365
+		else $output .= write_message(_LINKDATAINFO . "<br /><br />" . _LINKSETUP . " <a href='install.php?step=5&amp;install=automatic'>" . _AUTO . "</a> " . _OR . " <a href='install.php?step=5&amp;install=manual'>" . _MANUAL2 . "</a>");
366
+		break;
341 367
 	case "4":
342
-		$output .= "<div id='pagetitle'>"._PANELDATA."</div>";
343
-		if(isset($_GET['install'])){
344
-			if($_GET['install'] == "automatic") {
345
-		
368
+		$output .= "<div id='pagetitle'>" . _PANELDATA . "</div>";
369
+		if (isset($_GET['install']))
370
+		{
371
+			if ($_GET['install'] == "automatic")
372
+			{
373
+
346 374
 				$panellist = array(
347
-					array("submitted","Submissions", "","3","5","0","A"),
375
+					array("submitted", "Submissions", "", "3", "5", "0", "A"),
348 376
 					array("versioncheck", "Version Check", "", "3", "7", "0", "A"),
349
-					array("newstory","Add New Story","stories.php?action=newstory&admin=1","3","3","0","A"),
350
-					array("addseries","Add New Series","series.php?action=add","3","3","0","A"),
351
-					array("news","News","","3","5","0","A"),
352
-					array("featured","Featured Stories","","3","5","0","A"),
353
-					array("characters","Characters","","2","2","0","A"),
354
-					array("ratings","Ratings","","2","3","0","A"),
355
-					array("members","Members","","2","5","0","A"),
356
-					array("mailusers","Mail Users","","2","6","0","A"),
357
-					array("settings","Settings","","1","2","0","A"),
358
-					array("blocks","Blocks","","1","3","0","A"),
359
-					array("censor","Censor","","1","0","1","A"),
360
-					array("admins","Admins","","1","6","0","A"),
361
-					array("classifications","Classifications","","2","4","0","A"),
362
-					array("categories","Categories","","2","1","0","A"),
363
-					array("custpages","Custom Pages","","1","4","0","A"),
364
-					array("validate","Validate Submission","","3","0","1","A"),
365
-					array("yesletter","Validation Letter","","3","0","1","A"),
366
-					array("noletter","Rejection Letter","","3","0","1","A"),
367
-					array("links","Page Links","","1","5","0","A"),
368
-					array("messages","Message Settings","","2","0","1","A"),
369
-					array("login","Login","","0","0","1","U"),
370
-					array("logout","Logout","","1","5","0","U"),
371
-					array("revreceived","Reviews Received","","1","0","1","U"),
372
-					array("editprefs","Edit Preferences","","1","2","0","U"),
373
-					array("lostpassword","Lost Password","","0","0","1","U"),
374
-					array("editbio","Edit Bio","","1","1","0","U"),
375
-					array("register","Register","","0","0","1","U"),
376
-					array("manageimages","Manage Images","","1","5","0","S"),
377
-					array("revres","Review Response","","1","0","1","U"),
378
-					array("stats","View Your Statistics","","1","3","0","U"),
379
-					array("newstory","Add New Story","stories.php?action=newstory","1","1","0","S"),
380
-					array("newseries","Add New Series","series.php?action=add","1","3","0","S"),
381
-					array("managestories","Manage Stories","stories.php?action=viewstories","1","2","0","S"),
382
-					array("manageseries","Manage Series","series.php?action=manage","1","4","0","S"),
383
-					array("reviewsby","Your Reviews","","1","0","1","U"),
384
-					array("storiesby","Stories by {author}","","0","1","0","P"),
385
-					array("seriesby","Series by {author}","","0","2","0","P"),
386
-					array("reviewsby","Reviews by {author}","","0","3","0","P"),
387
-					array("categories","Categories","","0","1","0","B"),
388
-					array("characters","Characters","","0","2","0","B"),
389
-					array("ratings","Ratings","","0","3","0","B"),
390
-					array("titles","Titles","","0","5","0","B"),
391
-					array("class","Classes","","0","0","1","B"),
392
-					array("recent","Most Recent","","0","0","1","B"),
393
-					array("featured","Featured Stories","","0","0","1","B"),
394
-					array("panels","Panels","","1","1","0","A"),
395
-					array("phpinfo","PHP Info","","1","7","0","A"),
396
-					array("contact","Contact","","0","0","1","P"),
377
+					array("newstory", "Add New Story", "stories.php?action=newstory&admin=1", "3", "3", "0", "A"),
378
+					array("addseries", "Add New Series", "series.php?action=add", "3", "3", "0", "A"),
379
+					array("news", "News", "", "3", "5", "0", "A"),
380
+					array("featured", "Featured Stories", "", "3", "5", "0", "A"),
381
+					array("characters", "Characters", "", "2", "2", "0", "A"),
382
+					array("ratings", "Ratings", "", "2", "3", "0", "A"),
383
+					array("members", "Members", "", "2", "5", "0", "A"),
384
+					array("mailusers", "Mail Users", "", "2", "6", "0", "A"),
385
+					array("settings", "Settings", "", "1", "2", "0", "A"),
386
+					array("blocks", "Blocks", "", "1", "3", "0", "A"),
387
+					array("censor", "Censor", "", "1", "0", "1", "A"),
388
+					array("admins", "Admins", "", "1", "6", "0", "A"),
389
+					array("classifications", "Classifications", "", "2", "4", "0", "A"),
390
+					array("categories", "Categories", "", "2", "1", "0", "A"),
391
+					array("custpages", "Custom Pages", "", "1", "4", "0", "A"),
392
+					array("validate", "Validate Submission", "", "3", "0", "1", "A"),
393
+					array("yesletter", "Validation Letter", "", "3", "0", "1", "A"),
394
+					array("noletter", "Rejection Letter", "", "3", "0", "1", "A"),
395
+					array("links", "Page Links", "", "1", "5", "0", "A"),
396
+					array("messages", "Message Settings", "", "2", "0", "1", "A"),
397
+					array("login", "Login", "", "0", "0", "1", "U"),
398
+					array("logout", "Logout", "", "1", "5", "0", "U"),
399
+					array("revreceived", "Reviews Received", "", "1", "0", "1", "U"),
400
+					array("editprefs", "Edit Preferences", "", "1", "2", "0", "U"),
401
+					array("lostpassword", "Lost Password", "", "0", "0", "1", "U"),
402
+					array("editbio", "Edit Bio", "", "1", "1", "0", "U"),
403
+					array("register", "Register", "", "0", "0", "1", "U"),
404
+					array("manageimages", "Manage Images", "", "1", "5", "0", "S"),
405
+					array("revres", "Review Response", "", "1", "0", "1", "U"),
406
+					array("stats", "View Your Statistics", "", "1", "3", "0", "U"),
407
+					array("newstory", "Add New Story", "stories.php?action=newstory", "1", "1", "0", "S"),
408
+					array("newseries", "Add New Series", "series.php?action=add", "1", "3", "0", "S"),
409
+					array("managestories", "Manage Stories", "stories.php?action=viewstories", "1", "2", "0", "S"),
410
+					array("manageseries", "Manage Series", "series.php?action=manage", "1", "4", "0", "S"),
411
+					array("reviewsby", "Your Reviews", "", "1", "0", "1", "U"),
412
+					array("storiesby", "Stories by {author}", "", "0", "1", "0", "P"),
413
+					array("seriesby", "Series by {author}", "", "0", "2", "0", "P"),
414
+					array("reviewsby", "Reviews by {author}", "", "0", "3", "0", "P"),
415
+					array("categories", "Categories", "", "0", "1", "0", "B"),
416
+					array("characters", "Characters", "", "0", "2", "0", "B"),
417
+					array("ratings", "Ratings", "", "0", "3", "0", "B"),
418
+					array("titles", "Titles", "", "0", "5", "0", "B"),
419
+					array("class", "Classes", "", "0", "0", "1", "B"),
420
+					array("recent", "Most Recent", "", "0", "0", "1", "B"),
421
+					array("featured", "Featured Stories", "", "0", "0", "1", "B"),
422
+					array("panels", "Panels", "", "1", "1", "0", "A"),
423
+					array("phpinfo", "PHP Info", "", "1", "7", "0", "A"),
424
+					array("contact", "Contact", "", "0", "0", "1", "P"),
397 425
 					array("series", "Series", "", "0", "4", "0", "B"),
398 426
 					array("viewlog", "Action Log", "", "1", "8", "0", "A"),
399
-					array("shortstories","10 Shortest Stories","toplists/default.php","0","6","0","L"), 
400
-					array("longstories","10 Longest Stories","toplists/default.php","0","5","0","L"), 
401
-					array("largeseries","10 Largest Series","toplists/default.php","0","1","0","L"), 
402
-					array("smallseries","10 Smallest Series","toplists/default.php","0","2","0","L"), 
403
-					array("reviewedseries","10 Most Reviewed Series","toplists/default.php","0","4","0","L"), 
404
-					array("prolificauthors","10 Most Prolific Authors","toplists/default.php","0","10","0","L"), 
405
-					array("prolificreviewers","10 Most Prolific Reviewers","toplists/default.php","0","12","0","L"), 
406
-					array("reviewedstories","10 Most Reviewed Stories","toplists/default.php","0","8","0","L"), 
407
-					array("readstories","10 Most Read Stories","toplists/default.php","0","9","0","L"),
408
-					array("manfavs","Manage Favorites","","1","2","0","F"),
409
-					array("favstories","10 Most Favorite Stories","toplists/default.php","0","7","0","L"), 
410
-					array("favauthors","10 Most Favorite Authors","toplists/default.php","0","11","0","L"), 
411
-					array("favseries","10 Most Favorite Series","toplists/default.php","0","3","0","L"), 
412
-					array("favst","Favorite Stories","","0","0","1","F"),
413
-					array("favse","Favorite Series","","0","0","1","F"),
414
-					array("favau","Favorite Authors","","0","0","1","F"),
415
-					array("favst","Favorite Stories","","0","0","1","U"),
416
-					array("favse","Favorite Series","","0","0","1","U"),
417
-					array("favau","Favorite Authors","","0","0","1","U"),
418
-					array("favlist","{author}\'s Favorites","viewuser.php?action=manfavs","0","5","0","F"),
427
+					array("shortstories", "10 Shortest Stories", "toplists/default.php", "0", "6", "0", "L"),
428
+					array("longstories", "10 Longest Stories", "toplists/default.php", "0", "5", "0", "L"),
429
+					array("largeseries", "10 Largest Series", "toplists/default.php", "0", "1", "0", "L"),
430
+					array("smallseries", "10 Smallest Series", "toplists/default.php", "0", "2", "0", "L"),
431
+					array("reviewedseries", "10 Most Reviewed Series", "toplists/default.php", "0", "4", "0", "L"),
432
+					array("prolificauthors", "10 Most Prolific Authors", "toplists/default.php", "0", "10", "0", "L"),
433
+					array("prolificreviewers", "10 Most Prolific Reviewers", "toplists/default.php", "0", "12", "0", "L"),
434
+					array("reviewedstories", "10 Most Reviewed Stories", "toplists/default.php", "0", "8", "0", "L"),
435
+					array("readstories", "10 Most Read Stories", "toplists/default.php", "0", "9", "0", "L"),
436
+					array("manfavs", "Manage Favorites", "", "1", "2", "0", "F"),
437
+					array("favstories", "10 Most Favorite Stories", "toplists/default.php", "0", "7", "0", "L"),
438
+					array("favauthors", "10 Most Favorite Authors", "toplists/default.php", "0", "11", "0", "L"),
439
+					array("favseries", "10 Most Favorite Series", "toplists/default.php", "0", "3", "0", "L"),
440
+					array("favst", "Favorite Stories", "", "0", "0", "1", "F"),
441
+					array("favse", "Favorite Series", "", "0", "0", "1", "F"),
442
+					array("favau", "Favorite Authors", "", "0", "0", "1", "F"),
443
+					array("favst", "Favorite Stories", "", "0", "0", "1", "U"),
444
+					array("favse", "Favorite Series", "", "0", "0", "1", "U"),
445
+					array("favau", "Favorite Authors", "", "0", "0", "1", "U"),
446
+					array("favlist", "{author}\'s Favorites", "viewuser.php?action=manfavs", "0", "5", "0", "F"),
419 447
 					array("skins", "Skins", "", "3", "6", "0", "A"),
420 448
 					array("authorfields", "Profile Information", "", "1", "9", "0", "A"),
421 449
 					array("maintenance", "Archive Maintenance", "", "1", "10", "0", "A"),
422 450
 					array("manual", "Admin Manual", "", "3", "6", "0", "A"),
423 451
 					array('modules', 'Modules', '', 1, "11", 0, 'A')
424 452
 				);
425
-				$output .= "<table class='tblborder' style='margin: 1em auto; padding: 1em;' cellpadding='5'><tr><th>Panel</th><th>"._RESULT."</th></tr>";
426
-				foreach($panellist as $panel) {
453
+				$output .= "<table class='tblborder' style='margin: 1em auto; padding: 1em;' cellpadding='5'><tr><th>Panel</th><th>" . _RESULT . "</th></tr>";
454
+				foreach ($panellist as $panel)
455
+				{
427 456
 					unset($panels);
428
-					$panels = dbquery("INSERT INTO `".$tableprefix."fanfiction_panels` (`panel_name`, `panel_title`, `panel_url`, `panel_level`, `panel_order`, `panel_hidden`, `panel_type`) VALUES ('".$panel[0]."', '".$panel[1]."', '".$panel[2]."', '".$panel[3]."', '".$panel[4]."', '".$panel[5]."', '".$panel[6]."');");
429
-					$output .= "<tr><td>".stripslashes($panel[1])."</td><td align='center'>" . ($panels ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
457
+					$panels = dbquery("INSERT INTO `" . $tableprefix . "fanfiction_panels` (`panel_name`, `panel_title`, `panel_url`, `panel_level`, `panel_order`, `panel_hidden`, `panel_type`) VALUES ('" . $panel[0] . "', '" . $panel[1] . "', '" . $panel[2] . "', '" . $panel[3] . "', '" . $panel[4] . "', '" . $panel[5] . "', '" . $panel[6] . "');");
458
+					$output .= "<tr><td>" . stripslashes($panel[1]) . "</td><td align='center'>" . ($panels ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
430 459
 				}
431 460
 				$output .= "</table>";
432
-				$output .= write_message(_PANELAUTOFAIL."<br /><br /><a href='install.php?step=5'>"._CONTINUE."</a>");
461
+				$output .= write_message(_PANELAUTOFAIL . "<br /><br /><a href='install.php?step=5'>" . _CONTINUE . "</a>");
433 462
 			}
434
-			else {
435
-				$output .= write_message(_PANELMANUAL."<br /><br /><a href='install.php?step=5'>"._CONTINUE."</a>");
463
+			else
464
+			{
465
+				$output .= write_message(_PANELMANUAL . "<br /><br /><a href='install.php?step=5'>" . _CONTINUE . "</a>");
436 466
 			}
437 467
 		}
438
-		else $output .= write_message(_PANELDATAINFO."<br /><br />"._PANELSETUP." <a href='install.php?step=4&amp;install=automatic'>"._AUTO."</a> "._OR." <a href='install.php?step=4&amp;install=manual'>"._MANUAL2."</a>");
439
-	break;
468
+		else $output .= write_message(_PANELDATAINFO . "<br /><br />" . _PANELSETUP . " <a href='install.php?step=4&amp;install=automatic'>" . _AUTO . "</a> " . _OR . " <a href='install.php?step=4&amp;install=manual'>" . _MANUAL2 . "</a>");
469
+		break;
440 470
 	case "3":
441
-		$output .= "<div id='pagetitle'>"._INSTALLTABLES."</div>";
442
-		if(isset($_GET['install'])) {
443
-			if($_GET['install'] == "automatic") {
444
-				$output .= "<table class='tblborder' style='margin: 1em auto; padding: 1em;' cellpadding='5'><tr><th>Table</th><th>"._RESULT."</th></tr>";
445
-				$authorfields = dbquery("CREATE TABLE IF NOT EXISTS `".$tableprefix."fanfiction_authorfields` (
471
+		$output .= "<div id='pagetitle'>" . _INSTALLTABLES . "</div>";
472
+		if (isset($_GET['install']))
473
+		{
474
+			if ($_GET['install'] == "automatic")
475
+			{
476
+				$output .= "<table class='tblborder' style='margin: 1em auto; padding: 1em;' cellpadding='5'><tr><th>Table</th><th>" . _RESULT . "</th></tr>";
477
+				$authorfields = dbquery("CREATE TABLE IF NOT EXISTS `" . $tableprefix . "fanfiction_authorfields` (
446 478
   `field_id` int(11) NOT NULL AUTO_INCREMENT,
447 479
   `field_type` tinyint(4) NOT NULL default '0',
448 480
   `field_name` varchar(30) NOT NULL default ' ',
... ...
@@ -453,16 +485,16 @@ switch($_GET['step']) {
453 485
   `field_on` tinyint(1) NOT NULL default '0',
454 486
   PRIMARY KEY  (`field_id`)
455 487
 ) ENGINE=MyISAM;");
456
-$output .= "<tr><td>".$tableprefix."fanfiction_authorfields</td><td align='center'>" . ($authorfields ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
457
-				$authorinfo = dbquery("CREATE TABLE IF NOT EXISTS `".$tableprefix."fanfiction_authorinfo` (
488
+				$output .= "<tr><td>" . $tableprefix . "fanfiction_authorfields</td><td align='center'>" . ($authorfields ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
489
+				$authorinfo = dbquery("CREATE TABLE IF NOT EXISTS `" . $tableprefix . "fanfiction_authorinfo` (
458 490
   `uid` int(11) NOT NULL default '0',
459 491
   `field` int(11) NOT NULL default '0',
460 492
   `info` varchar(255) NOT NULL default ' ',
461 493
   PRIMARY KEY  (`uid`,`field`),
462 494
   KEY `uid` (`uid`)) ENGINE=MyISAM;");
463
-$output .= "<tr><td>".$tableprefix."fanfiction_authorinfo</td><td align='center'>" . ($authorinfo ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
495
+				$output .= "<tr><td>" . $tableprefix . "fanfiction_authorinfo</td><td align='center'>" . ($authorinfo ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
464 496
 				$authorprefs = dbquery("
465
-CREATE TABLE IF NOT EXISTS `".$tableprefix."fanfiction_authorprefs` (
497
+CREATE TABLE IF NOT EXISTS `" . $tableprefix . "fanfiction_authorprefs` (
466 498
   `uid` int(11) NOT NULL default '0',
467 499
   `newreviews` tinyint(1) NOT NULL default '0',
468 500
   `newrespond` tinyint(1) NOT NULL default '0',
... ...
@@ -479,8 +511,8 @@ CREATE TABLE IF NOT EXISTS `".$tableprefix."fanfiction_authorprefs` (
479 511
   `stories` int(11) NOT NULL default '0',
480 512
   PRIMARY KEY  (`uid`)
481 513
 ) ENGINE=MyISAM;");
482
-$output .= "<tr><td>".$tableprefix."fanfiction_authorprefs</td><td align='center'>" . ($authorprefs ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
483
-				$authors = dbquery("CREATE TABLE IF NOT EXISTS `".$tableprefix."fanfiction_authors` (
514
+				$output .= "<tr><td>" . $tableprefix . "fanfiction_authorprefs</td><td align='center'>" . ($authorprefs ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
515
+				$authors = dbquery("CREATE TABLE IF NOT EXISTS `" . $tableprefix . "fanfiction_authors` (
484 516
   `uid` int(11) NOT NULL auto_increment,
485 517
   `penname` varchar(200) NOT NULL default '',
486 518
   `realname` varchar(200) NOT NULL default '',
... ...
@@ -494,8 +526,8 @@ $output .= "<tr><td>".$tableprefix."fanfiction_authorprefs</td><td align='center
494 526
   KEY `penname` (`penname`),
495 527
   KEY `admincreated` (`admincreated`)
496 528
 ) ENGINE=MyISAM;");
497
-$output .= "<tr><td>".$tableprefix."fanfiction_authors</td><td align='center'>" . ($authors ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
498
-				$blocks = dbquery("CREATE TABLE IF NOT EXISTS `".$tableprefix."fanfiction_blocks` (
529
+				$output .= "<tr><td>" . $tableprefix . "fanfiction_authors</td><td align='center'>" . ($authors ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
530
+				$blocks = dbquery("CREATE TABLE IF NOT EXISTS `" . $tableprefix . "fanfiction_blocks` (
499 531
   `block_id` int(11) NOT NULL auto_increment,
500 532
   `block_name` varchar(30) NOT NULL default '',
501 533
   `block_title` varchar(150) NOT NULL default '',
... ...
@@ -505,8 +537,8 @@ $output .= "<tr><td>".$tableprefix."fanfiction_authors</td><td align='center'>"
505 537
   PRIMARY KEY  (`block_id`),
506 538
   KEY `block_name` (`block_name`)
507 539
 ) ENGINE=MyISAM;");
508
-$output .= "<tr><td>".$tableprefix."fanfiction_blocks</td><td align='center'>" . ($blocks ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
509
-				$categories = dbquery("CREATE TABLE IF NOT EXISTS `".$tableprefix."fanfiction_categories` (
540
+				$output .= "<tr><td>" . $tableprefix . "fanfiction_blocks</td><td align='center'>" . ($blocks ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
541
+				$categories = dbquery("CREATE TABLE IF NOT EXISTS `" . $tableprefix . "fanfiction_categories` (
510 542
   `catid` int(11) NOT NULL auto_increment,
511 543
   `parentcatid` int(11) NOT NULL default '-1',
512 544
   `category` varchar(60) NOT NULL default '',
... ...
@@ -519,8 +551,8 @@ $output .= "<tr><td>".$tableprefix."fanfiction_blocks</td><td align='center'>" .
519 551
   PRIMARY KEY  (`catid`),
520 552
   KEY `byparent` (`parentcatid`,`displayorder`)
521 553
 ) ENGINE=MyISAM;");
522
-$output .= "<tr><td>".$tableprefix."fanfiction_categories</td><td align='center'>" . ($categories ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
523
-				$chapters = dbquery("CREATE TABLE IF NOT EXISTS `".$tableprefix."fanfiction_chapters` (
554
+				$output .= "<tr><td>" . $tableprefix . "fanfiction_categories</td><td align='center'>" . ($categories ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
555
+				$chapters = dbquery("CREATE TABLE IF NOT EXISTS `" . $tableprefix . "fanfiction_chapters` (
524 556
   `chapid` int(11) NOT NULL auto_increment,
525 557
   `title` varchar(250) NOT NULL default '',
526 558
   `inorder` int(11) NOT NULL default '0',
... ...
@@ -542,8 +574,8 @@ $output .= "<tr><td>".$tableprefix."fanfiction_categories</td><td align='center'
542 574
   KEY `validated` (`validated`),
543 575
   KEY `forstoryblock` (`sid`,`validated`)
544 576
 ) ENGINE=MyISAM;");
545
-$output .= "<tr><td>".$tableprefix."fanfiction_chapters</td><td align='center'>" . ($chapters ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
546
-				$characters = dbquery("CREATE TABLE IF NOT EXISTS `".$tableprefix."fanfiction_characters` (
577
+				$output .= "<tr><td>" . $tableprefix . "fanfiction_chapters</td><td align='center'>" . ($chapters ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
578
+				$characters = dbquery("CREATE TABLE IF NOT EXISTS `" . $tableprefix . "fanfiction_characters` (
547 579
   `charid` int(11) NOT NULL auto_increment,
548 580
   `catid` int(11) NOT NULL default '0',
549 581
   `charname` varchar(60) NOT NULL default '',
... ...
@@ -553,30 +585,30 @@ $output .= "<tr><td>".$tableprefix."fanfiction_chapters</td><td align='center'>"
553 585
   KEY `catid` (`catid`),
554 586
   KEY `charname` (`charname`)
555 587
 ) ENGINE=MyISAM;");
556
-$output .= "<tr><td>".$tableprefix."fanfiction_characters</td><td align='center'>" . ($characters ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
557
-				$classes = dbquery("CREATE TABLE IF NOT EXISTS `".$tableprefix."fanfiction_classes` (
588
+				$output .= "<tr><td>" . $tableprefix . "fanfiction_characters</td><td align='center'>" . ($characters ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
589
+				$classes = dbquery("CREATE TABLE IF NOT EXISTS `" . $tableprefix . "fanfiction_classes` (
558 590
   `class_id` int(11) NOT NULL auto_increment,
559 591
   `class_type` int(11) NOT NULL default '0',
560 592
   `class_name` varchar(100) NOT NULL default '',
561 593
   PRIMARY KEY  (`class_id`),
562 594
   KEY `byname` (`class_type`,`class_name`,`class_id`)
563 595
 ) ENGINE=MyISAM;");
564
-$output .= "<tr><td>".$tableprefix."fanfiction_classes</td><td align='center'>" . ($classes ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
565
-				$classtypes = dbquery("CREATE TABLE IF NOT EXISTS `".$tableprefix."fanfiction_classtypes` (
596
+				$output .= "<tr><td>" . $tableprefix . "fanfiction_classes</td><td align='center'>" . ($classes ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
597
+				$classtypes = dbquery("CREATE TABLE IF NOT EXISTS `" . $tableprefix . "fanfiction_classtypes` (
566 598
   `classtype_id` int(11) NOT NULL auto_increment,
567 599
   `classtype_name` varchar(50) NOT NULL default '',
568 600
   `classtype_title` varchar(50) NOT NULL default '',
569 601
   PRIMARY KEY  (`classtype_id`),
570 602
   UNIQUE KEY `classtype_name` (`classtype_name`)
571 603
 ) ENGINE=MyISAM;");
572
-$output .= "<tr><td>".$tableprefix."fanfiction_classtypes</td><td align='center'>" . ($classtypes ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
573
-$coauthors = dbquery("CREATE TABLE IF NOT EXISTS `".$tableprefix."fanfiction_coauthors` (
604
+				$output .= "<tr><td>" . $tableprefix . "fanfiction_classtypes</td><td align='center'>" . ($classtypes ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
605
+				$coauthors = dbquery("CREATE TABLE IF NOT EXISTS `" . $tableprefix . "fanfiction_coauthors` (
574 606
   `sid` int(11) NOT NULL default '0',
575 607
   `uid` int(11) NOT NULL default '0',
576 608
   PRIMARY KEY  (`sid`,`uid`)
577 609
 ) ENGINE=MyISAM;");
578
-$output .= "<tr><td>".$tableprefix."fanfiction_coauthors</td><td align='center'>" . ($coauthors ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
579
-				$codeblocks = dbquery("CREATE TABLE IF NOT EXISTS `".$tableprefix."fanfiction_codeblocks` (
610
+				$output .= "<tr><td>" . $tableprefix . "fanfiction_coauthors</td><td align='center'>" . ($coauthors ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
611
+				$codeblocks = dbquery("CREATE TABLE IF NOT EXISTS `" . $tableprefix . "fanfiction_codeblocks` (
580 612
   `code_id` int(11) NOT NULL auto_increment,
581 613
   `code_text` text NOT NULL,
582 614
   `code_type` varchar(20) default NULL,
... ...
@@ -584,8 +616,8 @@ $output .= "<tr><td>".$tableprefix."fanfiction_coauthors</td><td align='center'>
584 616
   PRIMARY KEY  (`code_id`),
585 617
   KEY `code_type` (`code_type`)
586 618
 ) ENGINE=MyISAM;");
587
-$output .= "<tr><td>".$tableprefix."fanfiction_codeblocks</td><td align='center'>" . ($codeblocks ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
588
-				$comments = dbquery("CREATE TABLE IF NOT EXISTS `".$tableprefix."fanfiction_comments` (
619
+				$output .= "<tr><td>" . $tableprefix . "fanfiction_codeblocks</td><td align='center'>" . ($codeblocks ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
620
+				$comments = dbquery("CREATE TABLE IF NOT EXISTS `" . $tableprefix . "fanfiction_comments` (
589 621
   `cid` int(11) NOT NULL auto_increment,
590 622
   `nid` int(11) NOT NULL default '0',
591 623
   `uid` int(11) NOT NULL default '0',
... ...
@@ -594,8 +626,8 @@ $output .= "<tr><td>".$tableprefix."fanfiction_codeblocks</td><td align='center'
594 626
   PRIMARY KEY  (`cid`),
595 627
   KEY `commentlist` (`nid`,`time`)
596 628
 ) ENGINE=MyISAM;");
597
-$output .= "<tr><td>".$tableprefix."fanfiction_comments</td><td align='center'>" . ($comments ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
598
-				$favorites = dbquery("CREATE TABLE IF NOT EXISTS `".$tableprefix."fanfiction_favorites` (
629
+				$output .= "<tr><td>" . $tableprefix . "fanfiction_comments</td><td align='center'>" . ($comments ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
630
+				$favorites = dbquery("CREATE TABLE IF NOT EXISTS `" . $tableprefix . "fanfiction_favorites` (
599 631
   `uid` int(11) NOT NULL default '0',
600 632
   `item` int(11) NOT NULL default '0',
601 633
   `type` char(2) NOT NULL default '',
... ...
@@ -603,8 +635,8 @@ $output .= "<tr><td>".$tableprefix."fanfiction_comments</td><td align='center'>"
603 635
   UNIQUE KEY `byitem` (`item`,`type`,`uid`),
604 636
   UNIQUE KEY `byuid` (`uid`,`type`,`item`)
605 637
 ) ENGINE=MyISAM;");
606
-$output .= "<tr><td>".$tableprefix."fanfiction_favorites</td><td align='center'>" . ($favorites ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
607
-				$inseries = dbquery("CREATE TABLE IF NOT EXISTS `".$tableprefix."fanfiction_inseries` (
638
+				$output .= "<tr><td>" . $tableprefix . "fanfiction_favorites</td><td align='center'>" . ($favorites ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
639
+				$inseries = dbquery("CREATE TABLE IF NOT EXISTS `" . $tableprefix . "fanfiction_inseries` (
608 640
   `seriesid` int(11) NOT NULL default '0',
609 641
   `sid` int(11) NOT NULL default '0',
610 642
   `subseriesid` int(11) NOT NULL default '0',
... ...
@@ -613,8 +645,8 @@ $output .= "<tr><td>".$tableprefix."fanfiction_favorites</td><td align='center'>
613 645
   PRIMARY KEY  (`sid`,`seriesid`, `subseriesid`),
614 646
   KEY `seriesid` (`seriesid`,`inorder`)
615 647
 ) ENGINE=MyISAM;");
616
-$output .= "<tr><td>".$tableprefix."fanfiction_inseries</td><td align='center'>" . ($inseries ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
617
-				$logs = dbquery("CREATE TABLE IF NOT EXISTS `".$tableprefix."fanfiction_log` (
648
+				$output .= "<tr><td>" . $tableprefix . "fanfiction_inseries</td><td align='center'>" . ($inseries ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
649
+				$logs = dbquery("CREATE TABLE IF NOT EXISTS `" . $tableprefix . "fanfiction_log` (
618 650
   `log_id` int(11) NOT NULL auto_increment,
619 651
   `log_action` varchar(255) default NULL,
620 652
   `log_uid` int(11) NOT NULL,
... ...
@@ -623,8 +655,8 @@ $output .= "<tr><td>".$tableprefix."fanfiction_inseries</td><td align='center'>"
623 655
   `log_type` varchar(2) NOT NULL,
624 656
   PRIMARY KEY  (`log_id`)
625 657
 ) ENGINE=MyISAM");
626
-$output .= "<tr><td>".$tableprefix."fanfiction_log</td><td align='center'>" . ($logs ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
627
-				$messages = dbquery("CREATE TABLE IF NOT EXISTS `".$tableprefix."fanfiction_messages` (
658
+				$output .= "<tr><td>" . $tableprefix . "fanfiction_log</td><td align='center'>" . ($logs ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
659
+				$messages = dbquery("CREATE TABLE IF NOT EXISTS `" . $tableprefix . "fanfiction_messages` (
628 660
   `message_id` int(11) NOT NULL auto_increment,
629 661
   `message_name` varchar(50) NOT NULL default '',
630 662
   `message_title` varchar(200) NOT NULL default '',
... ...
@@ -632,17 +664,17 @@ $output .= "<tr><td>".$tableprefix."fanfiction_log</td><td align='center'>" . ($
632 664
   PRIMARY KEY  (`message_id`),
633 665
   KEY `message_name` (`message_name`)
634 666
 ) ENGINE=MyISAM;");
635
-$output .= "<tr><td>".$tableprefix."fanfiction_messages</td><td align='center'>" . ($messages ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
667
+				$output .= "<tr><td>" . $tableprefix . "fanfiction_messages</td><td align='center'>" . ($messages ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
636 668
 				$modules = dbquery("
637
-CREATE TABLE IF NOT EXISTS `".$tableprefix."fanfiction_modules` (
669
+CREATE TABLE IF NOT EXISTS `" . $tableprefix . "fanfiction_modules` (
638 670
   `id` int(11) NOT NULL auto_increment,
639 671
   `name` varchar(100) NOT NULL default 'Test Module',
640 672
   `version` varchar(10) NOT NULL default '1.0',
641 673
   PRIMARY KEY  (`id`),
642 674
   KEY `name_version` (`name`,`version`)
643 675
 )");
644
-$output .= "<tr><td>".$tableprefix."fanfiction_modules</td><td align='center'>" . ($modules ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
645
-				$news = dbquery("CREATE TABLE IF NOT EXISTS `".$tableprefix."fanfiction_news` (
676
+				$output .= "<tr><td>" . $tableprefix . "fanfiction_modules</td><td align='center'>" . ($modules ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
677
+				$news = dbquery("CREATE TABLE IF NOT EXISTS `" . $tableprefix . "fanfiction_news` (
646 678
   `nid` int(11) NOT NULL auto_increment,
647 679
   `author` varchar(60) NOT NULL default '',
648 680
   `title` varchar(255) NOT NULL default '',
... ...
@@ -651,8 +683,8 @@ $output .= "<tr><td>".$tableprefix."fanfiction_modules</td><td align='center'>"
651 683
   `comments` INT NOT NULL DEFAULT '0',
652 684
   PRIMARY KEY  (`nid`)
653 685
 ) ENGINE=MyISAM;");
654
-$output .= "<tr><td>".$tableprefix."fanfiction_news</td><td align='center'>" . ($news ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
655
-				$pagelinks = dbquery("CREATE TABLE IF NOT EXISTS `".$tableprefix."fanfiction_pagelinks` (
686
+				$output .= "<tr><td>" . $tableprefix . "fanfiction_news</td><td align='center'>" . ($news ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
687
+				$pagelinks = dbquery("CREATE TABLE IF NOT EXISTS `" . $tableprefix . "fanfiction_pagelinks` (
656 688
   `link_id` int(11) NOT NULL auto_increment,
657 689
   `link_name` varchar(50) NOT NULL default '',
658 690
   `link_text` varchar(100) NOT NULL default '',
... ...
@@ -663,8 +695,8 @@ $output .= "<tr><td>".$tableprefix."fanfiction_news</td><td align='center'>" . (
663 695
   PRIMARY KEY  (`link_id`),
664 696
   KEY `link_name` (`link_name`)
665 697
 ) ENGINE=MyISAM;");
666
-$output .= "<tr><td>".$tableprefix."fanfiction_pagelinks</td><td align='center'>" . ($pagelinks ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
667
-				$panels = dbquery("CREATE TABLE IF NOT EXISTS `".$tableprefix."fanfiction_panels` (
698
+				$output .= "<tr><td>" . $tableprefix . "fanfiction_pagelinks</td><td align='center'>" . ($pagelinks ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
699
+				$panels = dbquery("CREATE TABLE IF NOT EXISTS `" . $tableprefix . "fanfiction_panels` (
668 700
   `panel_id` int(11) NOT NULL auto_increment,
669 701
   `panel_name` varchar(50) NOT NULL default 'unknown',
670 702
   `panel_title` varchar(100) NOT NULL default 'Unnamed Panel',
... ...
@@ -676,8 +708,8 @@ $output .= "<tr><td>".$tableprefix."fanfiction_pagelinks</td><td align='center'>
676 708
   PRIMARY KEY  (`panel_id`),
677 709
   KEY `panel_type` (`panel_type`,`panel_name`)
678 710
 ) ENGINE=MyISAM;");
679
-$output .= "<tr><td>".$tableprefix."fanfiction_panels</td><td align='center'>" . ($panels ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
680
-				$ratings = dbquery("CREATE TABLE IF NOT EXISTS `".$tableprefix."fanfiction_ratings` (
711
+				$output .= "<tr><td>" . $tableprefix . "fanfiction_panels</td><td align='center'>" . ($panels ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
712
+				$ratings = dbquery("CREATE TABLE IF NOT EXISTS `" . $tableprefix . "fanfiction_ratings` (
681 713
   `rid` int(11) NOT NULL auto_increment,
682 714
   `rating` varchar(60) NOT NULL default '',
683 715
   `ratingwarning` char(1) NOT NULL default '0',
... ...
@@ -685,8 +717,8 @@ $output .= "<tr><td>".$tableprefix."fanfiction_panels</td><td align='center'>" .
685 717
   PRIMARY KEY  (`rid`),
686 718
   KEY `rating` (`rating`)
687 719
 ) ENGINE=MyISAM;");
688
-$output .= "<tr><td>".$tableprefix."fanfiction_ratings</td><td align='center'>" . ($ratings ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
689
-				$reviews = dbquery("CREATE TABLE IF NOT EXISTS `".$tableprefix."fanfiction_reviews` (
720
+				$output .= "<tr><td>" . $tableprefix . "fanfiction_ratings</td><td align='center'>" . ($ratings ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
721
+				$reviews = dbquery("CREATE TABLE IF NOT EXISTS `" . $tableprefix . "fanfiction_reviews` (
690 722
   `reviewid` int(11) NOT NULL auto_increment,
691 723
   `item` int(11) NOT NULL default '0',
692 724
   `chapid` int(11) NOT NULL default '0',
... ...
@@ -705,8 +737,8 @@ $output .= "<tr><td>".$tableprefix."fanfiction_ratings</td><td align='center'>"
705 737
   KEY `bychapter` (`chapid`,`rating`),
706 738
   KEY `byuid` (`uid`,`item`,`type`)
707 739
 ) ENGINE=MyISAM;");
708
-$output .= "<tr><td>".$tableprefix."fanfiction_reviews</td><td align='center'>" . ($reviews ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
709
-				$series = dbquery("CREATE TABLE IF NOT EXISTS `".$tableprefix."fanfiction_series` (
740
+				$output .= "<tr><td>" . $tableprefix . "fanfiction_reviews</td><td align='center'>" . ($reviews ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
741
+				$series = dbquery("CREATE TABLE IF NOT EXISTS `" . $tableprefix . "fanfiction_series` (
710 742
   `seriesid` int(11) NOT NULL auto_increment,
711 743
   `title` varchar(200) NOT NULL default '',
712 744
   `summary` text NOT NULL,
... ...
@@ -725,8 +757,8 @@ $output .= "<tr><td>".$tableprefix."fanfiction_reviews</td><td align='center'>"
725 757
   KEY `classes` (`classes`),
726 758
   KEY `owner` (`uid`,`title`)
727 759
 ) ENGINE=MyISAM;");
728
-$output .= "<tr><td>".$tableprefix."fanfiction_series</td><td align='center'>" . ($series ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
729
-	$stats = dbquery("CREATE TABLE IF NOT EXISTS `".$tableprefix."fanfiction_stats` (
760
+				$output .= "<tr><td>" . $tableprefix . "fanfiction_series</td><td align='center'>" . ($series ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
761
+				$stats = dbquery("CREATE TABLE IF NOT EXISTS `" . $tableprefix . "fanfiction_stats` (
730 762
   `sitekey` varchar(50) NOT NULL default '0',
731 763
   `stories` int(11) NOT NULL default '0',
732 764
   `chapters` int(11) NOT NULL default '0',
... ...
@@ -738,9 +770,9 @@ $output .= "<tr><td>".$tableprefix."fanfiction_series</td><td align='center'>" .
738 770
   `reviewers` int(11) NOT NULL default '0',
739 771
   `newestmember` int(11) NOT NULL default '0'
740 772
 ) ENGINE=MyISAM");
741
-	dbquery("INSERT INTO ".$tableprefix."fanfiction_stats(`sitekey`, `newestmember`) VALUES('".SITEKEY."', '1')");
742
-$output .= "<tr><td>".$tableprefix."fanfiction_stats</td><td align='center'>" . ($stats ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
743
-				$stories = dbquery("CREATE TABLE IF NOT EXISTS `".$tableprefix."fanfiction_stories` (
773
+				dbquery("INSERT INTO " . $tableprefix . "fanfiction_stats(`sitekey`, `newestmember`) VALUES('" . SITEKEY . "', '1')");
774
+				$output .= "<tr><td>" . $tableprefix . "fanfiction_stats</td><td align='center'>" . ($stats ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
775
+				$stories = dbquery("CREATE TABLE IF NOT EXISTS `" . $tableprefix . "fanfiction_stories` (
744 776
   `sid` int(11) NOT NULL auto_increment,
745 777
   `title` varchar(200) NOT NULL default 'Untitled',
746 778
   `summary` text NULL,
... ...
@@ -773,76 +805,87 @@ $output .= "<tr><td>".$tableprefix."fanfiction_stats</td><td align='center'>" .
773 805
   KEY `validateduid` (`validated`,`uid`),
774 806
   KEY `recent` (`updated`,`validated`)
775 807
 ) ENGINE=MyISAM;");
776
-$output .= "<tr><td>".$tableprefix."fanfiction_stories</td><td align='center'>" . ($stories ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>";
777
-$output .= "</table>";
778
-$output .= write_message(_TABLEFAILED."<br /><br /><a href='install.php?step=4'>"._CONTINUE."</a>");
779
-
808
+				$output .= "<tr><td>" . $tableprefix . "fanfiction_stories</td><td align='center'>" . ($stories ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") . "</td></tr>";
809
+				$output .= "</table>";
810
+				$output .= write_message(_TABLEFAILED . "<br /><br /><a href='install.php?step=4'>" . _CONTINUE . "</a>");
780 811
 			}
781
-			else if($_GET['install'] == "manual") {
782
-				$output .= write_message(_TABLESMANUAL."<br /><br /><a href='install.php?step=3'>"._CONTINUE."</a>");
812
+			else if ($_GET['install'] == "manual")
813
+			{
814
+				$output .= write_message(_TABLESMANUAL . "<br /><br /><a href='install.php?step=3'>" . _CONTINUE . "</a>");
783 815
 			}
784
-
785 816
 		}
786
-		else {
787
-	
788
-			$output .= write_message(_TABLESINSTALL."<br /><br /><a href='install.php?step=3&amp;install=automatic'>"._AUTO."</a> "._OR." <a href='install.php?step=3&amp;install=manual'>"._MANUAL2."</a>");
817
+		else
818
+		{
819
+
820
+			$output .= write_message(_TABLESINSTALL . "<br /><br /><a href='install.php?step=3&amp;install=automatic'>" . _AUTO . "</a> " . _OR . " <a href='install.php?step=3&amp;install=manual'>" . _MANUAL2 . "</a>");
789 821
 		}
790 822
 
791
-	break;
823
+		break;
792 824
 
793 825
 	case "2";
794 826
 		include("../config.php");
795
-		if(dbnumrows(dbquery("SHOW TABLES LIKE '".$settingsprefix."fanfiction_settings'"))) {
827
+		if (dbnumrows(dbquery("SHOW TABLES LIKE '" . $settingsprefix . "fanfiction_settings'")))
828
+		{
796 829
 			include("../config.php");
797
-			$dbconnect = dbconnect($dbhost, $dbuser, $dbpass, $dbname );
798
-			$settings = dbquery("SELECT tableprefix, language FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".$sitekey."'");
830
+			$dbconnect = dbconnect($dbhost, $dbuser, $dbpass, $dbname);
831
+			$settings = dbquery("SELECT tableprefix, language FROM " . $settingsprefix . "fanfiction_settings WHERE sitekey = '" . $sitekey . "'");
799 832
 			list($tableprefix, $language) = dbrow($settings);
800
-			
833
+
801 834
 			if ($tableprefix == '') $tableprefix = $settingsprefix;
802 835
 
803 836
 			define("TABLEPREFIX", $tableprefix);
804 837
 			define("SITEKEY", $sitekey);
805
-			
838
+
806 839
 			$sect = isset($_GET['sect']) ? $_GET['sect'] : "main";
807
-			$settingsresults = dbquery("SELECT * FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".SITEKEY."'");
808
-			if(dbnumrows($settingsresults) == 0) {
809
-				dbquery("INSERT INTO ".$settingsprefix."fanfiction_settings (`sitekey`) VALUES('".SITEKEY."');");
810
-				$settingsresults = dbquery("SELECT * FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".SITEKEY."'");
840
+			$settingsresults = dbquery("SELECT * FROM " . $settingsprefix . "fanfiction_settings WHERE sitekey = '" . SITEKEY . "'");
841
+			if (dbnumrows($settingsresults) == 0)
842
+			{
843
+				dbquery("INSERT INTO " . $settingsprefix . "fanfiction_settings (`sitekey`) VALUES('" . SITEKEY . "');");
844
+				$settingsresults = dbquery("SELECT * FROM " . $settingsprefix . "fanfiction_settings WHERE sitekey = '" . SITEKEY . "'");
811 845
 			}
812 846
 			$settings = dbassoc($settingsresults);
813
-			foreach($settings as $var => $val) {
847
+			foreach ($settings as $var => $val)
848
+			{
814 849
 				$$var = $val;
815 850
 			}
816
-			if($sect == "submissions") {
817
-				if(isset($_POST['submit'])) {
851
+			if ($sect == "submissions")
852
+			{
853
+				if (isset($_POST['submit']))
854
+				{
818 855
 					$storiespath = descript($_POST['newstoriespath']);
819
-					if(!file_exists($storiespath) && !file_exists("../".$storiespath)) {
820
-						if(!strrchr($storiespath, "/") && !strrchr($storiespath, "\\")) $storiespath = "../$storiespath";
856
+					if (!file_exists($storiespath) && !file_exists("../" . $storiespath))
857
+					{
858
+						if (!strrchr($storiespath, "/") && !strrchr($storiespath, "\\")) $storiespath = "../$storiespath";
821 859
 						mkdir("$storiespath", 0755);
822 860
 						@chmod("$storiespath", 0777);
823
-						if(substr(sprintf('%o', @fileperms("../".$storiespath)), -4) != "0777") $output .= write_message(_STORIESPATHNOTWRITABLE);
861
+						if (substr(sprintf('%o', @fileperms("../" . $storiespath)), -4) != "0777") $output .= write_message(_STORIESPATHNOTWRITABLE);
824 862
 					}
825 863
 				}
826 864
 			}
827
-			if($sect == "email" && isset($_POST['submit'])) {
828
-				$output .= "<div id=\"pagetitle\">"._SETTINGS."</div>";
865
+			if ($sect == "email" && isset($_POST['submit']))
866
+			{
867
+				$output .= "<div id=\"pagetitle\">" . _SETTINGS . "</div>";
829 868
 				$smtp_host = $_POST['newsmtp_host'];
830 869
 				$smtp_username = $_POST['newsmtp_username'];
831 870
 				$smtp_password = $_POST['newsmtp_password'];
832
-				$result = dbquery("UPDATE ".$settingsprefix."fanfiction_settings SET smtp_host = '$smtp_host', smtp_username = '$smtp_username', smtp_password = '$smtp_password' WHERE sitekey = '".SITEKEY."'");
833
-				if($result) {
871
+				$result = dbquery("UPDATE " . $settingsprefix . "fanfiction_settings SET smtp_host = '$smtp_host', smtp_username = '$smtp_username', smtp_password = '$smtp_password' WHERE sitekey = '" . SITEKEY . "'");
872
+				if ($result)
873
+				{
834 874
 					$output .= write_message(_ACTIONSUCCESSFUL);
835
-					$output .= write_message("<a href='install.php?step=3'>"._CONTINUE."</a>");
875
+					$output .= write_message("<a href='install.php?step=3'>" . _CONTINUE . "</a>");
836 876
 				}
837 877
 				else include("../admin/settings.php");
838 878
 			}
839 879
 			else include("../admin/settings.php");
840 880
 		}
841
-		else {
842
-			if($_GET['install']) {
843
-				if($_GET['install'] == "automatic") {
844
-			
845
-								$settings = dbquery("CREATE TABLE IF NOT EXISTS `".$settingsprefix."fanfiction_settings` (
881
+		else
882
+		{
883
+			if ($_GET['install'])
884
+			{
885
+				if ($_GET['install'] == "automatic")
886
+				{
887
+
888
+					$settings = dbquery("CREATE TABLE IF NOT EXISTS `" . $settingsprefix . "fanfiction_settings` (
846 889
   `sitekey` varchar(50) NOT NULL default '1',
847 890
   `sitename` varchar(200) NOT NULL default 'Your Site',
848 891
   `slogan` varchar(200) NOT NULL default 'It''s a cool site!',
... ...
@@ -894,30 +937,33 @@ $output .= write_message(_TABLEFAILED."<br /><br /><a href='install.php?step=4'>
894 937
   `disablepopups` tinyint(1) NOT NULL default '0',
895 938
   `agestatement` tinyint(1) NOT NULL default '0',
896 939
   `words` text,
897
-  `version` varchar(10) NOT NULL default '".$version."',
940
+  `version` varchar(10) NOT NULL default '" . $version . "',
898 941
   `smtp_host` varchar(200) default NULL,
899 942
   `smtp_username` varchar(50) default NULL,
900 943
   `smtp_password` varchar(50) default NULL,
901 944
   PRIMARY KEY  (`sitekey`)
902 945
 ) ENGINE=MyISAM;");
903
-if($settings) $output .= write_message("<img src=\"../images/check.gif\"> "._SETTINGSTABLESUCCESS." <br /><a href='install.php?step=2'>"._CONTINUE."</a>");
904
-else $output .= write_message(_SETTINGSTABLEAUTOFAIL."<br /><br /> <a href='install.php?step=2'>"._CONTINUE."</a>");
946
+					if ($settings) $output .= write_message("<img src=\"../images/check.gif\"> " . _SETTINGSTABLESUCCESS . " <br /><a href='install.php?step=2'>" . _CONTINUE . "</a>");
947
+					else $output .= write_message(_SETTINGSTABLEAUTOFAIL . "<br /><br /> <a href='install.php?step=2'>" . _CONTINUE . "</a>");
905 948
 				}
906
-				else {
907
-					$output .= write_message(_SETTINGSTABLEMANUAL."<br /><br /><a href='install.php?step=2'>"._CONTINUE."</a>");
949
+				else
950
+				{
951
+					$output .= write_message(_SETTINGSTABLEMANUAL . "<br /><br /><a href='install.php?step=2'>" . _CONTINUE . "</a>");
908 952
 				}
909 953
 			}
910
-			else {
911
-		
954
+			else
955
+			{
956
+
912 957
 				$test = dbquery("SHOW TABLES");
913
-				if(!$test) $output .= write_message(_CONFIGFAILED);
914
-				else $output .= write_message(_SETTINGSTABLESETUP." <a href='install.php?step=2&amp;install=automatic'>"._AUTO."</a> "._OR." <a href='install.php?step=2&amp;install=manual'>"._MANUAL2."</a>");
958
+				if (!$test) $output .= write_message(_CONFIGFAILED);
959
+				else $output .= write_message(_SETTINGSTABLESETUP . " <a href='install.php?step=2&amp;install=automatic'>" . _AUTO . "</a> " . _OR . " <a href='install.php?step=2&amp;install=manual'>" . _MANUAL2 . "</a>");
915 960
 			}
916 961
 		}
917
-	break;
962
+		break;
918 963
 	default:
919
-		$output .= "<div id='pagetitle'>"._CONFIGDATA."</div>";
920
-		if(isset($_POST['submit'])) {
964
+		$output .= "<div id='pagetitle'>" . _CONFIGDATA . "</div>";
965
+		if (isset($_POST['submit']))
966
+		{
921 967
 			$dbhost = descript($_POST['dbhost']);
922 968
 			$dbname = descript($_POST['dbname']);
923 969
 			$dbuser = descript($_POST['dbuser']);
... ...
@@ -926,23 +972,27 @@ else $output .= write_message(_SETTINGSTABLEAUTOFAIL."<br /><br /> <a href='inst
926 972
 			$sitekey = descript($_POST['sitekey']);
927 973
 			$settingsprefix = descript($_POST['settingsprefix']);
928 974
 			$mysql_access = mysqli_connect($dbhost, $dbuser, $dbpass);
929
-			if(!$mysql_access) {
975
+			if (!$mysql_access)
976
+			{
930 977
 				$output .= write_message(_CONFIGFAILED);
931 978
 			}
932 979
 		}
933
-		if(isset($_POST['submit']) && $mysql_access) {
980
+		if (isset($_POST['submit']) && $mysql_access)
981
+		{
934 982
 			$handle = fopen("../config.php", 'w');
935
-			if(!$handle) {
983
+			if (!$handle)
984
+			{
936 985
 				@chmod("../config.php", 0666);
937 986
 				$handle = fopen("../config.php", 'w');
938 987
 			}
939
-			if($handle) {
988
+			if ($handle)
989
+			{
940 990
 				$dbhost = descript($_POST['dbhost']);
941 991
 				$dbname = descript($_POST['dbname']);
942 992
 				$dbuser = descript($_POST['dbuser']);
943 993
 				$dbpass = descript($_POST['dbpass']);
944 994
 				$sitekey = descript($_POST['sitekey']);
945
-				if(empty($sitekey)) $sitekey = random_string($randomcharset, 10);
995
+				if (empty($sitekey)) $sitekey = random_string($randomcharset, 10);
946 996
 				$language = $_POST['language'];
947 997
 				$settingsprefix = descript($_POST['settingsprefix']);
948 998
 				$text = "<?php 
... ...
@@ -960,42 +1010,43 @@ if(!empty(\$sitekey)) \$dbconnect = dbconnect(\$dbhost, \$dbuser,\$dbpass, \$dbn
960 1010
 				fwrite($handle, $text);
961 1011
 				fclose($handle);
962 1012
 				@chmod("../config.php", 0644);
963
-				$output .= write_message(_CONFIGSUCCESS."<br /><br /><a href='install.php?step=2&amp;language=$language'>"._CONTINUE."</a>");
1013
+				$output .= write_message(_CONFIGSUCCESS . "<br /><br /><a href='install.php?step=2&amp;language=$language'>" . _CONTINUE . "</a>");
964 1014
 			}
965 1015
 			else $output .= write_message(_ERROR_CONFIGWRITE);
966
-
967 1016
 		}
968
-		else { 
969
-			if(file_exists("../config.php") && !isset($mysql_access)) include("../config.php");
970
-			if(isset($tinyMCE)) $output .= write_message(_CONFIG2DETECTED);
971
-			else if(isset($sitename) && $sitename) $output .= write_message(_CONFIG1DETECTED);
972
-			else {
973
-				$output .=  
1017
+		else
1018
+		{
1019
+			if (file_exists("../config.php") && !isset($mysql_access)) include("../config.php");
1020
+			if (isset($tinyMCE)) $output .= write_message(_CONFIG2DETECTED);
1021
+			else if (isset($sitename) && $sitename) $output .= write_message(_CONFIG1DETECTED);
1022
+			else
1023
+			{
1024
+				$output .=
974 1025
 					"<form method='POST' enctype='multipart/form-data' action='install.php?step=1' class='tblborder' style='width: 350px; margin: 1em auto;'>
975
-						<div><label for='dbhost'>"._DBHOST."</label><input type='text'  name='dbhost' id='dbhost'".(!empty($dbhost) ? "value='$dbhost'" : "value='localhost'")."> <A HREF=\"#\" class=\"pophelp\">[?]<span>"._HELP_DBHOST."</span></A></div>
976
-						<div><label for='dbname'>"._DBNAME."</label><input type='text' name='dbname' id='dbname'".(!empty($dbname) ? "value='$dbname'" : "")."> <A HREF=\"#\" class=\"pophelp\">[?]<span>"._HELP_DBNAME."</span></A></div>
977
-						<div><label for='dbuser'>"._DBUSER."</label><input type='text' name='dbuser' id='dbuser'".(!empty($dbuser) ? "value='$dbuser'" : "")."> <A HREF=\"#\" class=\"pophelp\">[?]<span>"._HELP_DBUSER."</span></A></div>
978
-						<div><label for='dbpass'>"._DBPASS."</label><input type='password' name='dbpass' id='dbpass'".(!empty($dbpass) ? "value='$dbpass'" : "")."> <A HREF=\"#\" class=\"pophelp\">[?]<span>"._HELP_DBPASS."</span></A></div>
979
-						<div><label for='sitekey'>"._SITEKEY."</label><input type='text' name='sitekey' value='".(!empty($sitekey) ? $sitekey : random_string($randomcharset, 10))."' id='sitekey'> <A HREF=\"#\" class=\"pophelp\">[?]<span>"._HELP_INSTALL_SITEKEY."</span></A></div>
980
-						<div><label for=\"language\">"._LANGUAGE.":</label> <select name=\"language\">";
1026
+						<div><label for='dbhost'>" . _DBHOST . "</label><input type='text'  name='dbhost' id='dbhost'" . (!empty($dbhost) ? "value='$dbhost'" : "value='localhost'") . "> <A HREF=\"#\" class=\"pophelp\">[?]<span>" . _HELP_DBHOST . "</span></A></div>
1027
+						<div><label for='dbname'>" . _DBNAME . "</label><input type='text' name='dbname' id='dbname'" . (!empty($dbname) ? "value='$dbname'" : "") . "> <A HREF=\"#\" class=\"pophelp\">[?]<span>" . _HELP_DBNAME . "</span></A></div>
1028
+						<div><label for='dbuser'>" . _DBUSER . "</label><input type='text' name='dbuser' id='dbuser'" . (!empty($dbuser) ? "value='$dbuser'" : "") . "> <A HREF=\"#\" class=\"pophelp\">[?]<span>" . _HELP_DBUSER . "</span></A></div>
1029
+						<div><label for='dbpass'>" . _DBPASS . "</label><input type='password' name='dbpass' id='dbpass'" . (!empty($dbpass) ? "value='$dbpass'" : "") . "> <A HREF=\"#\" class=\"pophelp\">[?]<span>" . _HELP_DBPASS . "</span></A></div>
1030
+						<div><label for='sitekey'>" . _SITEKEY . "</label><input type='text' name='sitekey' value='" . (!empty($sitekey) ? $sitekey : random_string($randomcharset, 10)) . "' id='sitekey'> <A HREF=\"#\" class=\"pophelp\">[?]<span>" . _HELP_INSTALL_SITEKEY . "</span></A></div>
1031
+						<div><label for=\"language\">" . _LANGUAGE . ":</label> <select name=\"language\">";
981 1032
 				$directory = opendir("../languages");
982
-				while($filename = readdir($directory)) {
983
-					if($filename=="." || $filename==".." || substr($filename, 2) == "_admin.php") continue;
984
-					$output .= "<option value=\"".substr($filename, 0, 2)."\"".
985
-						($language == substr($filename, 0, strpos($filename, ".php")) ? " selected" : "").">
986
-					".substr($filename, 0, strpos($filename, ".php"))."</option>";
1033
+				while ($filename = readdir($directory))
1034
+				{
1035
+					if ($filename == "." || $filename == ".." || substr($filename, 2) == "_admin.php") continue;
1036
+					$output .= "<option value=\"" . substr($filename, 0, 2) . "\"" .
1037
+						($language == substr($filename, 0, strpos($filename, ".php")) ? " selected" : "") . ">
1038
+					" . substr($filename, 0, strpos($filename, ".php")) . "</option>";
987 1039
 				}
988 1040
 				closedir($directory);
989
-				$output .= 
990
-					"</select> <A HREF=\"#\" class=\"pophelp\">[?]<span>"._HELP_LANGUAGE."</span></A></div>
991
-						<label for='settingsprefix'>"._SETTINGSPREFIX."</label><input type='text' name='settingsprefix' id='settingsprefix'".(isset($settingsprefix) ? "value='$settingsprefix'" : "")."> <A HREF=\"#\" class=\"pophelp\">[?]<span>"._HELP_SETTINGSPREFIX."</span></A><br />
1041
+				$output .=
1042
+					"</select> <A HREF=\"#\" class=\"pophelp\">[?]<span>" . _HELP_LANGUAGE . "</span></A></div>
1043
+						<label for='settingsprefix'>" . _SETTINGSPREFIX . "</label><input type='text' name='settingsprefix' id='settingsprefix'" . (isset($settingsprefix) ? "value='$settingsprefix'" : "") . "> <A HREF=\"#\" class=\"pophelp\">[?]<span>" . _HELP_SETTINGSPREFIX . "</span></A><br />
992 1044
 						<div style='text-align: center; margin: 1em;'><INPUT type=\"submit\"class=\"button\" name=\"submit\" value=\"submit\"></div>
993 1045
 					</form>";
994 1046
 			}
995
-		}	
1047
+		}
996 1048
 }
997 1049
 $tpl->assign("output", $output);
998 1050
 
999 1051
 $tpl->printToScreen();
1000
-if(isset($_GET['step']) && $_GET['step'] > 2) dbclose( );
1001
-?>
1002 1052
\ No newline at end of file
1053
+if (isset($_GET['step']) && $_GET['step'] > 2) dbclose();