OSDN Git Service

Another small update.
[idb/iDB.git.git] / inc / admin / main.php
1 <?php
2 /*
3     This program is free software; you can redistribute it and/or modify
4     it under the terms of the Revised BSD License.
5
6     This program is distributed in the hope that it will be useful,
7     but WITHOUT ANY WARRANTY; without even the implied warranty of
8     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
9     Revised BSD License for more details.
10
11     Copyright 2004-2008 Cool Dude 2k - http://idb.berlios.de/
12     Copyright 2004-2008 Game Maker 2k - http://intdb.sourceforge.net/
13
14     $FileInfo: main.php - Last Update: 12/12/2008 SVN 215 - Author: cooldude2k $
15 */
16 $File3Name = basename($_SERVER['SCRIPT_NAME']);
17 if ($File3Name=="main.php"||$File3Name=="/main.php") {
18         require('index.php');
19         exit(); }
20
21 // Check if we can goto admin cp
22 if($_SESSION['UserGroup']==$Settings['GuestGroup']||$GroupInfo['HasAdminCP']=="no") {
23 redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false));
24 ob_clean(); @header("Content-Type: text/plain; charset=".$Settings['charset']);
25 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); @mysql_close(); die(); }
26 if(!isset($_POST['update'])) { $_POST['update'] = null; }
27 if($_GET['act']=="mysql"&&$GroupInfo['ViewDBInfo']!="yes") {
28 redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false));
29 ob_clean(); @header("Content-Type: text/plain; charset=".$Settings['charset']);
30 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); @mysql_close(); die(); }
31 if(!isset($_POST['update'])) { $_POST['update'] = null; }
32 $pretext = "<?php\n/*\n    This program is free software; you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation; either version 2 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    Revised BSD License for more details.\n\n    Copyright 2004-2008 Cool Dude 2k - http://idb.berlios.de/\n    Copyright 2004-2008 Game Maker 2k - http://intdb.sourceforge.net/\n    iDB Installer made by Game Maker 2k - http://idb.berlios.net/\n\n    \$FileInfo: settings.php & settingsbak.php - Last Update: ".$SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2]." SVN ".$SubVerN." - Author: cooldude2k \$\n*/\n";
33 $pretext2 = array("/*   Board Setting Section Begins   */\n\$Settings = array();","/*   Board Setting Section Ends  \n     Board Info Section Begins   */\n\$SettInfo = array();","/*   Board Setting Section Ends   \n     Board Dir Section Begins   */\n\$SettDir = array();","/*   Board Dir Section Ends   */");
34 $settcheck = "\$File3Name = basename(\$_SERVER['SCRIPT_NAME']);\nif (\$File3Name==\"settings.php\"||\$File3Name==\"/settings.php\"||\n    \$File3Name==\"settingsbak.php\"||\$File3Name==\"/settingsbak.php\") {\n    @header('Location: index.php');\n    exit(); }\n";
35 if(!isset($_POST['update'])) { $_POST['update'] = null; }
36 function bool_string($boolean) {
37 if(!is_bool($boolean)) {
38 return $boolean; }
39 if(is_bool($boolean)) { 
40 if($boolean==0||$boolean===false) { 
41 return "false"; }
42 if($boolean==1||$boolean===true) { 
43 return "true"; } } }
44 function null_string($string) {
45 if(isset($string)) {
46         return "'".$string."'"; }
47 if(!isset($string)) {
48         return "null"; } }
49 function rsq($string) {
50 $string = str_replace("'", "\'", $string);
51 return $string; }
52 if(!is_numeric($Settings['KarmaBoostDay'])) {
53 $Settings['KarmaBoostDay'] = null; }
54 $KBoostPercent = explode("|",$Settings['KBoostPercent']);
55 if(count($KBoostPercent)<1) { 
56 $Settings['KBoostPercent'] = "6|10"; }
57 if(!is_numeric($KBoostPercent[0])) {
58 $Settings['KBoostPercent'] = "6|10"; }
59 if(count($KBoostPercent)==1) { 
60 $Settings['KBoostPercent'] = "6|10"; }
61 if(!is_numeric($KBoostPercent[1])) {
62 $Settings['KBoostPercent'] = "6|10"; }
63 if(count($KBoostPercent)>2) { 
64 $Settings['KBoostPercent'] = "6|10"; }
65 ?>
66 <table class="Table3">
67 <tr style="width: 100%; vertical-align: top;">
68         <td style="width: 15%; vertical-align: top;">
69 <?php 
70 require($SettDir['admin'].'table.php'); 
71 ?>
72 </td>
73         <td style="width: 85%; vertical-align: top;">
74 <?php if($_POST['update']=="now"&&$_GET['act']!=null) {
75 $updateact = url_maker($exfile['profile'],$Settings['file_ext'],"act=".$_GET['act'],$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
76 $admincptitle = " ".$ThemeSet['TitleDivider']." Updating Settings";
77 @redirect("refresh",$basedir.url_maker($exfile['admin'],$Settings['file_ext'],"act=".$_GET['act'],$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin'],FALSE),"3");
78 ?>
79 <div class="TableMenuBorder">
80 <?php if($ThemeSet['TableStyle']=="div") { ?>
81 <div class="TableMenuRow1">
82 <?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=".$_GET['act'],$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">Updating Settings</a></div>
83 <?php } ?>
84 <table class="TableMenu" style="width: 100%;">
85 <?php if($ThemeSet['TableStyle']=="table") { ?>
86 <tr class="TableMenuRow1">
87 <td class="TableMenuColumn1"><span style="float: left;">
88 <?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=".$_GET['act'],$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">Updating Settings</a>
89 </span><span style="float: right;">&nbsp;</span></td>
90 </tr><?php } ?>
91 <tr id="ProfileTitle" class="TableMenuRow2">
92 <th class="TableMenuColumn2">Updating Settings</th>
93 </tr>
94 <tr class="TableMenuRow3" id="ProfileUpdate">
95 <td class="TableMenuColumn3">
96 <div style="text-align: center;">
97 <br />Settings have been updated <a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=".$_GET['act'],$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">click here</a> to go back. ^_^<br />&nbsp;</div>
98 <?php } if($_GET['act']=="view"&&$_POST['update']!="now") {
99 $query = query("SELECT * FROM `".$Settings['sqltable']."members` WHERE `id`=%i LIMIT 1", array($_SESSION['UserID']));
100 $result=mysql_query($query);
101 $num=mysql_num_rows($result);
102 $i=0;
103 $YourID=mysql_result($result,$i,"id");
104 $Notes=mysql_result($result,$i,"Notes");
105 $noteact = url_maker($exfile['profile'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
106 $notepadact = $noteact; $profiletitle = " ".$ThemeSet['TitleDivider']." NotePad";
107 $admincptitle = " ".$ThemeSet['TitleDivider']." Admin CP";
108 ?>
109 <div class="TableMenuBorder">
110 <?php if($ThemeSet['TableStyle']=="div") { ?>
111 <div class="TableMenuRow1">
112 <?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo $noteact; ?>">NotePad</a></div>
113 <?php } ?>
114 <table class="TableMenu" style="width: 100%;">
115 <?php if($ThemeSet['TableStyle']=="table") { ?>
116 <tr class="TableMenuRow1">
117 <td class="TableMenuColumn1"><span style="float: left;">
118 <?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo $noteact; ?>">NotePad</a>
119 </span><span style="float: right;">&nbsp;</span></td>
120 </tr><?php } ?>
121 <tr id="ProfileTitle" class="TableMenuRow2">
122 <th class="TableMenuColumn2">NotePad</th>
123 </tr>
124 <tr class="TableMenuRow3" id="NotePadRow">
125 <td class="TableMenuColumn3">
126 <form method="post" action="<?php echo $notepadact; ?>"><div style="text-align: center;">
127 <label class="TextBoxLabel" for="NotePad">Your NotePad</label><br />
128 <textarea class="TextBox" name="NotePad" id="NotePad" style="width: 75%; height: 128px;" rows="10" cols="84"><?php echo $Notes; ?></textarea>
129 <input type="hidden" name="act" value="view" style="display: none;" />
130 <input type="hidden" name="update" value="now" style="display: none;" />
131 <br /><input type="submit" class="Button" value="Save" />&nbsp;<input class="Button" type="reset" />
132 </div></form></td>
133 </tr>
134 <tr id="ProfileEnd" class="TableMenuRow4">
135 <td class="TableMenuColumn4">&nbsp;</td>
136 </tr>
137 </table>
138 </div>
139 <?php } if($_GET['act']=="settings"&&$_POST['update']!="now") {
140 require('settings.php'); $admincptitle = " ".$ThemeSet['TitleDivider']." Settings Manager";
141 $ts_array = explode(":",$Settings['DefaultTimeZone']);
142 if(count($ts_array)!=2) {
143         if(!isset($ts_array[0])) { $ts_array[0] = "0"; }
144         if(!isset($ts_array[1])) { $ts_array[1] = "00"; }
145         $Settings['DefaultTimeZone'] = $ts_array[0].":".$ts_array[1]; }
146 if(!is_numeric($ts_array[0])) { $ts_array[0] = "0"; }
147 if($ts_array[0]>12) { $ts_array[0] = "12"; $Settings['DefaultTimeZone'] = $ts_array[0].":".$ts_array[1]; }
148 if($ts_array[0]<-12) { $ts_array[0] = "-12"; $Settings['DefaultTimeZone'] = $ts_array[0].":".$ts_array[1]; }
149 if(!is_numeric($ts_array[1])) { $ts_array[1] = "00"; }
150 if($ts_array[1]>59) { $ts_array[1] = "59"; $Settings['DefaultTimeZone'] = $ts_array[0].":".$ts_array[1]; }
151 if($ts_array[1]<0) { $ts_array[1] = "00"; $Settings['DefaultTimeZone'] = $ts_array[0].":".$ts_array[1]; }
152 $tsa = array("offset" => $Settings['DefaultTimeZone'], "hour" => $ts_array[0], "minute" => $ts_array[1]);
153 ?>
154 <div class="TableMenuBorder">
155 <?php if($ThemeSet['TableStyle']=="div") { ?>
156 <div class="TableMenuRow1">
157 <?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=settings",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">iDB Settings Manager</a></div>
158 <?php } ?>
159 <table class="TableMenu" style="width: 100%;">
160 <?php if($ThemeSet['TableStyle']=="table") { ?>
161 <tr class="TableMenuRow1">
162 <td class="TableMenuColumn1"><span style="float: left;">
163 <?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=settings",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">iDB Settings Manager</a>
164 </span><span style="float: right;">&nbsp;</span></td>
165 </tr><?php } ?>
166 <tr class="TableMenuRow2">
167 <th class="TableMenuColumn2" style="width: 100%; text-align: left;">
168 <span style="float: left;">&nbsp;Editing Setting for iDB: </span>
169 <span style="float: right;">&nbsp;</span>
170 </th>
171 </tr>
172 <tr class="TableMenuRow3">
173 <td class="TableMenuColumn3">
174 <form style="display: inline;" method="post" name="install" id="install" action="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=settings",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">
175 <table style="text-align: left;">
176 <tr style="text-align: left;">
177         <td style="width: 50%;"><label class="TextBoxLabel" for="BoardURL">Insert The Board URL or localhost to use any url:</label></td>
178         <td style="width: 50%;"><input type="text" class="TextBox" name="BoardURL" size="20" id="BoardURL" value="<?php echo $Settings['idburl']; ?>" /></td>
179 </tr><tr style="text-align: left;">
180         <td style="width: 50%;"><label class="TextBoxLabel" for="WebURL">Insert The WebSite URL:</label></td>
181         <td style="width: 50%;"><input type="text" class="TextBox" name="WebURL" size="20" id="WebURL" value="<?php echo $Settings['weburl']; ?>" /></td>
182 </tr><tr style="text-align: left;">
183         <td style="width: 50%;"><label class="TextBoxLabel" for="GuestGroup">Insert The Guest Group:</label></td>
184         <td style="width: 50%;"><input type="text" class="TextBox" name="GuestGroup" size="20" id="GuestGroup" value="<?php echo $Settings['GuestGroup']; ?>" /></td>
185 </tr><tr style="text-align: left;">
186         <td style="width: 50%;"><label class="TextBoxLabel" for="MemberGroup">Insert The Member Group:</label></td>
187         <td style="width: 50%;"><input type="text" class="TextBox" name="MemberGroup" size="20" id="MemberGroup" value="<?php echo $Settings['MemberGroup']; ?>" /></td>
188 </tr><tr style="text-align: left;">
189         <td style="width: 50%;"><label class="TextBoxLabel" for="ValidateGroup">Insert The Validate Group:</label></td>
190         <td style="width: 50%;"><input type="text" class="TextBox" name="ValidateGroup" size="20" id="ValidateGroup" value="<?php echo $Settings['ValidateGroup']; ?>" /></td>
191 </tr><tr style="text-align: left;">
192         <td style="width: 50%;"><label class="TextBoxLabel" for="AdminValidate">Do you want to validate new members:</label></td>
193         <td style="width: 50%;"><select size="1" class="TextBox" name="AdminValidate" id="AdminValidate">
194         <option<?php if($Settings['AdminValidate']=="off") { echo " selected=\"selected\""; } ?> value="off">no</option>
195         <option<?php if($Settings['AdminValidate']=="on") { echo " selected=\"selected\""; } ?> value="on">yes</option>
196         </select></td>
197 </tr><tr style="text-align: left;">
198         <td style="width: 50%;"><label class="TextBoxLabel" for="max_posts">Max replies per page:</label></td>
199         <td style="width: 50%;"><input type="text" class="TextBox" name="max_posts" size="20" id="max_posts" value="<?php echo $Settings['max_posts']; ?>" /></td>
200 </tr><tr style="text-align: left;">
201         <td style="width: 50%;"><label class="TextBoxLabel" for="max_topics">Max topics per page:</label></td>
202         <td style="width: 50%;"><input type="text" class="TextBox" name="max_topics" size="20" id="max_topics" value="<?php echo $Settings['max_topics']; ?>" /></td>
203 </tr><tr style="text-align: left;">
204         <td style="width: 50%;"><label class="TextBoxLabel" for="max_memlist">Max members per page:</label></td>
205         <td style="width: 50%;"><input type="text" class="TextBox" name="max_memlist" size="20" id="max_memlist" value="<?php echo $Settings['max_memlist']; ?>" /></td>
206 </tr><tr style="text-align: left;">
207         <td style="width: 50%;"><label class="TextBoxLabel" for="max_pmlist">Max pms per page:</label></td>
208         <td style="width: 50%;"><input type="text" class="TextBox" name="max_pmlist" size="20" id="max_pmlist" value="<?php echo $Settings['max_pmlist']; ?>" /></td>
209 </tr><tr style="text-align: left;">
210         <td style="width: 50%;"><label class="TextBoxLabel" for="hot_topic_num">Number of replies for hot topic:</label></td>
211         <td style="width: 50%;"><input type="text" class="TextBox" name="hot_topic_num" size="20" id="hot_topic_num" value="<?php echo $Settings['hot_topic_num']; ?>" /></td>
212 </tr><tr style="text-align: left;">
213         <td style="width: 50%;"><label class="TextBoxLabel" title="Can save some bandwidth." for="UseGzip">Do you want to HTTP Content Compression:</label></td>
214         <td style="width: 50%;"><select size="1" class="TextBox" name="UseGzip" id="UseGzip">
215         <option<?php if($Settings['use_gzip']=="off") { echo " selected=\"selected\""; } ?> value="off">No</option>
216         <option<?php if($Settings['use_gzip']=="on") { echo " selected=\"selected\""; } ?> value="on">Yes</option>
217         <option<?php if($Settings['use_gzip']=="gzip") { echo " selected=\"selected\""; } ?> value="gzip">Only GZip</option>
218         <option<?php if($Settings['use_gzip']=="deflate") { echo " selected=\"selected\""; } ?> value="deflate">Only Deflate</option>
219         </select></td>
220 </tr><tr style="text-align: left;">
221         <td style="width: 50%;"><label class="TextBoxLabel" for="HTMLType">HTML Type to use:</label></td>
222         <td style="width: 50%;"><select size="1" class="TextBox" name="HTMLType" id="HTMLType">
223         <option<?php if($Settings['html_type']=="xhtml10") { echo " selected=\"selected\""; } ?> value="xhtml10">XHTML 1.0</option>
224         <option<?php if($Settings['html_type']=="xhtml11") { echo " selected=\"selected\""; } ?> value="xhtml11">XHTML 1.1</option>
225         </select></td>
226 </tr><tr style="text-align: left;">
227         <td style="width: 50%;"><label class="TextBoxLabel" for="HTMLLevel">HTML level only for XHTML 1.0:</label></td>
228         <td style="width: 50%;"><select size="1" class="TextBox" name="HTMLLevel" id="HTMLLevel">
229         <option<?php if($Settings['html_level']=="Transitional") { echo " selected=\"selected\""; } ?> value="Transitional">Transitional</option>
230         <option<?php if($Settings['html_level']=="Strict") { echo " selected=\"selected\""; } ?> value="Strict">Strict</option>
231         </select></td>
232 </tr><tr style="text-align: left;">
233         <td style="width: 50%;"><label class="TextBoxLabel" for="OutPutType">Output file as:</label></td>
234         <td style="width: 50%;"><select size="1" class="TextBox" name="OutPutType" id="OutPutType">
235         <option<?php if($Settings['output_type']=="html") { echo " selected=\"selected\""; } ?> value="html">HTML</option>
236         <option<?php if($Settings['output_type']=="xhtml") { echo " selected=\"selected\""; } ?> value="xhtml">XHTML</option>
237         </select></td>
238 </tr><tr style="text-align: left;">
239         <td style="width: 50%;"><label class="TextBoxLabel" for="YourOffSet">Your TimeZone:</label></td>
240         <td style="width: 50%;"><select id="YourOffSet" name="YourOffSet" class="TextBox"><?php
241 $myofftime = $tsa['hour']; $mydstime = "off";
242 $plusi = 1; $minusi = 12;
243 $plusnum = 13; $minusnum = 0;
244 while ($minusi > $minusnum) {
245 if($myofftime==-$minusi) {
246 echo "<option selected=\"selected\" value=\"-".$minusi."\">GMT - ".$minusi.":00 hours</option>\n"; }
247 if($myofftime!=-$minusi) {
248 echo "<option value=\"-".$minusi."\">GMT - ".$minusi.":00 hours</option>\n"; }
249 --$minusi; }
250 if($myofftime==0) { ?>
251 <option selected="selected" value="0">GMT +/- 0:00 hours</option>
252 <?php } if($myofftime!=0) { ?>
253 <option value="0">GMT +/- 0:00 hours</option>
254 <?php }
255 while ($plusi < $plusnum) {
256 if($myofftime==$plusi) {
257 echo "<option selected=\"selected\" value=\"".$plusi."\">GMT + ".$plusi.":00 hours</option>\n"; }
258 if($myofftime!=$plusi) {
259 echo "<option value=\"".$plusi."\">GMT + ".$plusi.":00 hours</option>\n"; }
260 ++$plusi; }
261 ?></select></td>
262 </tr><tr style="text-align: left;">
263         <td style="width: 50%;"><label class="TextBoxLabel" for="MinOffSet">Minute OffSet:</label></td>
264         <td style="width: 50%;"><select id="MinOffSet" name="MinOffSet" class="TextBox"><?php
265 $mini = 0; $minnum = 60; $mymin = $tsa['minute'];
266 while ($mini < $minnum) {
267 if(strlen($mini)==2) { $showmin = $mini; }
268 if(strlen($mini)==1) { $showmin = "0".$mini; }
269 if($mini==$mymin) {
270 echo "\n<option selected=\"selected\" value=\"".$showmin."\">0:".$showmin." minutes</option>\n"; }
271 if($mini!=$mymin) {
272 echo "<option value=\"".$showmin."\">0:".$showmin." minutes</option>\n"; }
273 ++$mini; }
274 ?></select></td>
275 </tr><tr style="text-align: left;">
276         <td style="width: 50%;"><label class="TextBoxLabel" for="DST">Is <span title="Daylight Savings Time">DST</span> / <span title="Summer Time">ST</span> on or off:</label></td>
277         <td style="width: 50%;"><select id="DST" name="DST" class="TextBox"><?php echo "\n" ?>
278 <option<?php if($Settings['DefaultDST']=="off") { echo " selected=\"selected\""; } ?> value="off">off</option>
279 <option<?php if($Settings['DefaultDST']=="on") { echo " selected=\"selected\""; } ?> value="on">on</option>
280 </select></td>
281 </tr><tr style="text-align: left;">
282         <td style="width: 50%;"><label class="TextBoxLabel" for="DefaultTheme">Default CSS Theme for board:</label></td>
283         <td style="width: 50%;"><select id="DefaultTheme" name="DefaultTheme" class="TextBox"><?php
284 $skindir = dirname(realpath("settings.php"))."/".$SettDir['themes'];
285 if ($handle = opendir($skindir)) { $dirnum = null;
286    while (false !== ($file = readdir($handle))) {
287            if ($dirnum==null) { $dirnum = 0; }
288            if (file_exists($skindir.$file."/info.php")) {
289                    if ($file != "." && $file != "..") {
290            include($skindir.$file."/info.php");
291            if($Settings['DefaultTheme']==$file) {
292            $themelist[$dirnum] =  "<option selected=\"selected\" value=\"".$file."\">".$ThemeInfo['ThemeName']."</option>"; }
293            if($Settings['DefaultTheme']!=$file) {
294        $themelist[$dirnum] =  "<option value=\"".$file."\">".$ThemeInfo['ThemeName']."</option>"; }
295            ++$dirnum; } } }
296    closedir($handle); asort($themelist);
297    $themenum=count($themelist); $themei=0; 
298    while ($themei < $themenum) {
299    echo $themelist[$themei]."\n";
300    ++$themei; }
301 } ?></select></td>
302 </tr><tr style="text-align: left;">
303         <td style="width: 50%;"><label class="TextBoxLabel" for="enable_https">Enable https:</label></td>
304         <td style="width: 50%;"><select size="1" class="TextBox" name="enable_https" id="enable_https">
305         <option<?php if($Settings['enable_https']=="on") { echo " selected=\"selected\""; } ?> value="on">on</option>
306         <option<?php if($Settings['enable_https']=="off") { echo " selected=\"selected\""; } ?> value="off">off</option>
307         </select></td>
308 </tr><tr style="text-align: left;">
309         <td style="width: 50%;"><label class="TextBoxLabel" for="enable_rss">Enable RSS:</label></td>
310         <td style="width: 50%;"><select size="1" class="TextBox" name="enable_rss" id="enable_rss">
311         <option<?php if($Settings['enable_rss']=="on") { echo " selected=\"selected\""; } ?> value="on">on</option>
312         <option<?php if($Settings['enable_rss']=="off") { echo " selected=\"selected\""; } ?> value="off">off</option>
313         </select></td>
314 </tr><tr style="text-align: left;">
315         <td style="width: 50%;"><label class="TextBoxLabel" for="enable_search">Enable search:</label></td>
316         <td style="width: 50%;"><select size="1" class="TextBox" name="enable_search" id="enable_search">
317         <option<?php if($Settings['enable_search']=="on") { echo " selected=\"selected\""; } ?> value="on">on</option>
318         <option<?php if($Settings['enable_search']=="off") { echo " selected=\"selected\""; } ?> value="off">off</option>
319         </select></td>
320 </tr><tr style="text-align: left;">
321         <td style="width: 50%;"><label class="TextBoxLabel" for="TestReferer">Test Referering URL with host name:</label></td>
322         <td style="width: 50%;"><select id="TestReferer" name="TestReferer" class="TextBox">
323 <option<?php if($Settings['TestReferer']=="on") { echo " selected=\"selected\""; } ?> value="on">on</option>
324 <option<?php if($Settings['TestReferer']=="off") { echo " selected=\"selected\""; } ?> value="off">off</option>
325 </select></td>
326 </tr></table>
327 <table style="text-align: left;">
328 <tr style="text-align: left;">
329 <td style="width: 100%;">
330 <input type="hidden" name="act" value="settings" style="display: none;" />
331 <input type="hidden" name="update" value="now" style="display: none;" />
332 <input type="submit" class="Button" value="Apply" name="Apply_Changes" />
333 <input type="reset" value="Reset Form" class="Button" name="Reset_Form" />
334 </td></tr></table>
335 </form>
336 </td>
337 </tr>
338 <tr class="TableMenuRow4">
339 <td class="TableMenuColumn4">&nbsp;</td>
340 </tr>
341 </table>
342 </div>
343 <?php } if($_POST['act']=="settings"&&$_POST['update']=="now"&&$_GET['act']=="settings"&&
344         $_SESSION['UserGroup']!=$Settings['GuestGroup']&&$GroupInfo['HasAdminCP']=="yes") {
345 $_POST  = array_map("rsq", $_POST);
346 $BoardSettings=$pretext2[0]."\n\$Settings['sqlhost'] = ".null_string($Settings['sqlhost']).";\n\$Settings['sqldb'] = ".null_string($Settings['sqldb']).";\n\$Settings['sqltable'] = ".null_string($Settings['sqltable']).";\n\$Settings['sqluser'] = ".null_string($Settings['sqluser']).";\n\$Settings['sqlpass'] = ".null_string($Settings['sqlpass']).";\n\$Settings['board_name'] = ".null_string($Settings['board_name']).";\n\$Settings['idbdir'] = ".null_string($Settings['idbdir']).";\n\$Settings['idburl'] = ".null_string($_POST['BoardURL']).";\n\$Settings['enable_https'] = ".null_string($_POST['enable_https']).";\n\$Settings['weburl'] = ".null_string($_POST['WebURL']).";\n\$Settings['use_gzip'] = ".null_string($_POST['UseGzip']).";\n\$Settings['html_type'] = ".null_string($_POST['HTMLType']).";\n\$Settings['html_level'] = ".null_string($_POST['HTMLLevel']).";\n\$Settings['output_type'] = ".null_string($_POST['OutPutType']).";\n\$Settings['GuestGroup'] = ".null_string($_POST['GuestGroup']).";\n\$Settings['MemberGroup'] = ".null_string($_POST['MemberGroup']).";\n\$Settings['ValidateGroup'] = ".null_string($_POST['ValidateGroup']).";\n\$Settings['AdminValidate'] = ".null_string($_POST['AdminValidate']).";\n\$Settings['TestReferer'] = ".null_string($_POST['TestReferer']).";\n\$Settings['DefaultTheme'] = ".null_string($_POST['DefaultTheme']).";\n\$Settings['DefaultTimeZone'] = ".null_string($_POST['YourOffSet'].":".$_POST['MinOffSet']).";\n\$Settings['DefaultDST'] = ".null_string($_POST['DST']).";\n\$Settings['charset'] = ".null_string($Settings['charset']).";\n\$Settings['add_power_by'] = ".null_string($Settings['add_power_by']).";\n\$Settings['send_pagesize'] = ".null_string($Settings['send_pagesize']).";\n\$Settings['max_posts'] = ".null_string($_POST['max_posts']).";\n\$Settings['max_topics'] = ".null_string($_POST['max_topics']).";\n\$Settings['max_memlist'] = ".null_string($_POST['max_memlist']).";\n\$Settings['max_pmlist'] = ".null_string($_POST['max_pmlist']).";\n\$Settings['hot_topic_num'] = ".null_string($_POST['hot_topic_num']).";\n\$Settings['qstr'] = ".null_string($Settings['qstr']).";\n\$Settings['qsep'] = ".null_string($Settings['qsep']).";\n\$Settings['file_ext'] = ".null_string($Settings['file_ext']).";\n\$Settings['rss_ext'] = ".null_string($Settings['rss_ext']).";\n\$Settings['js_ext'] = ".null_string($Settings['js_ext']).";\n\$Settings['showverinfo'] = ".null_string($Settings['showverinfo']).";\n\$Settings['enable_rss'] = ".null_string($_POST['enable_rss']).";\n\$Settings['enable_search'] = ".null_string($_POST['enable_search']).";\n\$Settings['sessionid_in_urls'] = ".null_string($Settings['sessionid_in_urls']).";\n\$Settings['fixpathinfo'] = ".null_string($Settings['fixpathinfo']).";\n\$Settings['fixbasedir'] = ".null_string($Settings['fixbasedir']).";\n\$Settings['fixcookiedir'] = ".null_string($Settings['fixcookiedir']).";\n\$Settings['enable_pathinfo'] = ".null_string($Settings['enable_pathinfo']).";\n\$Settings['rssurl'] = ".null_string($Settings['rssurl']).";\n\$Settings['board_offline'] = ".null_string($Settings['board_offline']).";\n\$Settings['KarmaBoostDays'] = ".null_string($Settings['KarmaBoostDays']).";\n\$Settings['KBoostPercent'] = ".null_string($Settings['KBoostPercent']).";\n".$pretext2[1]."\n\$SettInfo['board_name'] = ".null_string($SettInfo['board_name']).";\n\$SettInfo['Author'] = ".null_string($SettInfo['Author']).";\n\$SettInfo['Keywords'] = ".null_string($SettInfo['Keywords']).";\n\$SettInfo['Description'] = ".null_string($SettInfo['Description']).";\n".$pretext2[2]."\n\$SettDir['maindir'] = ".null_string($SettDir['maindir']).";\n\$SettDir['inc'] = ".null_string($SettDir['inc']).";\n\$SettDir['misc'] = ".null_string($SettDir['misc']).";\n\$SettDir['admin'] = ".null_string($SettDir['admin']).";\n\$SettDir['mod'] = ".null_string($SettDir['mod']).";\n\$SettDir['themes'] = ".null_string($SettDir['themes']).";\n".$pretext2[3]."\n?>";
347 $BoardSettingsBak = $pretext.$settcheck.$BoardSettings;
348 $BoardSettings = $pretext.$settcheck.$BoardSettings;
349 $fp = fopen("settings.php","w+");
350 fwrite($fp, $BoardSettings);
351 fclose($fp);
352 //      @cp("settings.php","settingsbak.php");
353 $fp = fopen("settingsbak.php","w+");
354 fwrite($fp, $BoardSettingsBak);
355 fclose($fp); } if($_GET['act']=="mysql"&&$_POST['update']!="now"&&$GroupInfo['ViewDBInfo']=="yes") {
356 require('settings.php'); $admincptitle = " ".$ThemeSet['TitleDivider']." Database Manager";
357 ?>
358 <div class="TableMenuBorder">
359 <?php if($ThemeSet['TableStyle']=="div") { ?>
360 <div class="TableMenuRow1">
361 <?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=mysql",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">iDB Database Manager</a></div>
362 <?php } ?>
363 <table class="TableMenu" style="width: 100%;">
364 <?php if($ThemeSet['TableStyle']=="table") { ?>
365 <tr class="TableMenuRow1">
366 <td class="TableMenuColumn1"><span style="float: left;">
367 <?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=mysql",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">iDB Database Manager</a>
368 </span><span style="float: right;">&nbsp;</span></td>
369 </tr><?php } ?>
370 <tr class="TableMenuRow2">
371 <th class="TableMenuColumn2" style="width: 100%; text-align: left;">
372 <span style="float: left;">&nbsp;Editing MySQL Settings for iDB: </span>
373 <span style="float: right;">&nbsp;</span>
374 </th>
375 </tr>
376 <tr class="TableMenuRow3">
377 <td class="TableMenuColumn3">
378 <form style="display: inline;" method="post" name="install" id="install" action="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=mysql",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">
379 <table style="text-align: left;">
380 <tr style="text-align: left;">
381         <td style="width: 50%;"><label class="TextBoxLabel" for="DatabaseUserName">Insert Database User Name:</label></td>
382         <td style="width: 50%;"><input type="text" name="DatabaseUserName" class="TextBox" id="DatabaseUserName" size="20" value="<?php echo $Settings['sqluser']; ?>" /></td>
383 </tr><tr style="text-align: left;">
384         <td style="width: 50%;"><label class="TextBoxLabel" for="DatabasePassword">Insert Database Password:</label></td>
385         <td style="width: 50%;"><input type="password" name="DatabasePassword" class="TextBox" id="DatabasePassword" size="20" value="<?php echo $Settings['sqlpass']; ?>" /></td>
386 </tr><tr style="text-align: left;">
387         <td style="width: 50%;"><label class="TextBoxLabel" for="DatabaseName">Insert Database Name:</label></td>
388         <td style="width: 50%;"><input type="text" name="DatabaseName" class="TextBox" id="DatabaseName" size="20" value="<?php echo $Settings['sqldb']; ?>" /></td>
389 </tr><tr style="text-align: left;">
390         <td style="width: 50%;"><label class="TextBoxLabel" for="DatabaseHost">Insert Database Host:</label></td>
391         <td style="width: 50%;"><input type="text" name="DatabaseHost" class="TextBox" id="DatabaseHost" size="20" value="<?php echo $Settings['sqlhost']; ?>" /></td>
392 </tr><tr style="text-align: left;">
393         <td style="width: 50%;"><label class="TextBoxLabel" for="tableprefix">Insert Table Prefix:<br /></label></td>
394         <td style="width: 50%;"><input type="text" name="tableprefix" class="TextBox" id="tableprefix" size="20" value="<?php echo $Settings['sqltable']; ?>" /></td>
395 </tr></table>
396 <table style="text-align: left;">
397 <tr style="text-align: left;">
398 <td style="width: 100%;">
399 <input type="hidden" name="act" value="mysql" style="display: none;" />
400 <input type="hidden" name="update" value="now" style="display: none;" />
401 <input type="submit" class="Button" value="Apply" name="Apply_Changes" />
402 <input type="reset" value="Reset Form" class="Button" name="Reset_Form" />
403 </td></tr></table>
404 </form>
405 </td>
406 </tr>
407 <tr class="TableMenuRow4">
408 <td class="TableMenuColumn4">&nbsp;</td>
409 </tr>
410 </table>
411 </div>
412 <?php } if($_POST['act']=="mysql"&&$_POST['update']=="now"&&$_GET['act']=="mysql"&&
413         $_SESSION['UserGroup']!=$Settings['GuestGroup']&&$GroupInfo['HasAdminCP']=="yes"&&
414         $GroupInfo['ViewDBInfo']=="yes") {
415 $_POST  = array_map("rsq", $_POST);
416 $BoardSettings=$pretext2[0]."\n\$Settings['sqlhost'] = ".null_string($_POST['DatabaseHost']).";\n\$Settings['sqldb'] = ".null_string($_POST['DatabaseName']).";\n\$Settings['sqltable'] = ".null_string($_POST['tableprefix']).";\n\$Settings['sqluser'] = ".null_string($_POST['DatabaseUserName']).";\n\$Settings['sqlpass'] = ".null_string($_POST['DatabasePassword']).";\n\$Settings['board_name'] = ".null_string($Settings['board_name']).";\n\$Settings['idbdir'] = ".null_string($Settings['idbdir']).";\n\$Settings['idburl'] = ".null_string($Settings['idburl']).";\n\$Settings['enable_https'] = ".null_string($Settings['enable_https']).";\n\$Settings['weburl'] = ".null_string($Settings['weburl']).";\n\$Settings['use_gzip'] = ".null_string($Settings['use_gzip']).";\n\$Settings['html_type'] = ".null_string($Settings['html_type']).";\n\$Settings['html_level'] = ".null_string($Settings['html_level']).";\n\$Settings['output_type'] = ".null_string($Settings['output_type']).";\n\$Settings['GuestGroup'] = ".null_string($Settings['GuestGroup']).";\n\$Settings['MemberGroup'] = ".null_string($Settings['MemberGroup']).";\n\$Settings['ValidateGroup'] = ".null_string($Settings['ValidateGroup']).";\n\$Settings['AdminValidate'] = ".null_string($Settings['AdminValidate']).";\n\$Settings['TestReferer'] = ".null_string($Settings['TestReferer']).";\n\$Settings['DefaultTheme'] = ".null_string($Settings['DefaultTheme']).";\n\$Settings['DefaultTimeZone'] = ".null_string($Settings['DefaultTimeZone']).";\n\$Settings['DefaultDST'] = ".null_string($Settings['DefaultDST']).";\n\$Settings['charset'] = ".null_string($Settings['charset']).";\n\$Settings['add_power_by'] = ".null_string($Settings['add_power_by']).";\n\$Settings['send_pagesize'] = ".null_string($Settings['send_pagesize']).";\n\$Settings['max_posts'] = ".null_string($Settings['max_posts']).";\n\$Settings['max_topics'] = ".null_string($Settings['max_topics']).";\n\$Settings['max_memlist'] = ".null_string($Settings['max_memlist']).";\n\$Settings['max_pmlist'] = ".null_string($Settings['max_pmlist']).";\n\$Settings['hot_topic_num'] = ".null_string($Settings['hot_topic_num']).";\n\$Settings['qstr'] = ".null_string($Settings['qstr']).";\n\$Settings['qsep'] = ".null_string($Settings['qsep']).";\n\$Settings['file_ext'] = ".null_string($Settings['file_ext']).";\n\$Settings['rss_ext'] = ".null_string($Settings['rss_ext']).";\n\$Settings['js_ext'] = ".null_string($Settings['js_ext']).";\n\$Settings['showverinfo'] = ".null_string($Settings['showverinfo']).";\n\$Settings['enable_rss'] = ".null_string($Settings['enable_rss']).";\n\$Settings['enable_search'] = ".null_string($Settings['enable_search']).";\n\$Settings['sessionid_in_urls'] = ".null_string($Settings['sessionid_in_urls']).";\n\$Settings['fixpathinfo'] = ".null_string($Settings['fixpathinfo']).";\n\$Settings['fixbasedir'] = ".null_string($Settings['fixbasedir']).";\n\$Settings['fixcookiedir'] = ".null_string($Settings['fixcookiedir']).";\n\$Settings['enable_pathinfo'] = ".null_string($Settings['enable_pathinfo']).";\n\$Settings['rssurl'] = ".null_string($Settings['rssurl']).";\n\$Settings['board_offline'] = ".null_string($Settings['board_offline']).";\n\$Settings['KarmaBoostDays'] = ".null_string($Settings['KarmaBoostDays']).";\n\$Settings['KBoostPercent'] = ".null_string($Settings['KBoostPercent']).";\n".$pretext2[1]."\n\$SettInfo['board_name'] = ".null_string($SettInfo['board_name']).";\n\$SettInfo['Author'] = ".null_string($SettInfo['Author']).";\n\$SettInfo['Keywords'] = ".null_string($SettInfo['Keywords']).";\n\$SettInfo['Description'] = ".null_string($SettInfo['Description']).";\n".$pretext2[2]."\n\$SettDir['maindir'] = ".null_string($SettDir['maindir']).";\n\$SettDir['inc'] = ".null_string($SettDir['inc']).";\n\$SettDir['misc'] = ".null_string($SettDir['misc']).";\n\$SettDir['admin'] = ".null_string($SettDir['admin']).";\n\$SettDir['mod'] = ".null_string($SettDir['mod']).";\n\$SettDir['themes'] = ".null_string($SettDir['themes']).";\n".$pretext2[3]."\n?>";
417 $BoardSettingsBak = $pretext.$settcheck.$BoardSettings;
418 $BoardSettings = $pretext.$settcheck.$BoardSettings;
419 $fp = fopen("settings.php","w+");
420 fwrite($fp, $BoardSettings);
421 fclose($fp);
422 //      @cp("settings.php","settingsbak.php");
423 $fp = fopen("settingsbak.php","w+");
424 fwrite($fp, $BoardSettingsBak);
425 fclose($fp); } if($_GET['act']=="info"&&$_POST['update']!="now") {
426 require('settings.php'); $admincptitle = " ".$ThemeSet['TitleDivider']." Board Info Manager";
427 ?>
428 <div class="TableMenuBorder">
429 <?php if($ThemeSet['TableStyle']=="div") { ?>
430 <div class="TableMenuRow1">
431 <?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=info",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">Board Info Manager</a></div>
432 <?php } ?>
433 <table class="TableMenu" style="width: 100%;">
434 <?php if($ThemeSet['TableStyle']=="table") { ?>
435 <tr class="TableMenuRow1">
436 <td class="TableMenuColumn1"><span style="float: left;">
437 <?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=info",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">Board Info Manager</a>
438 </span><span style="float: right;">&nbsp;</span></td>
439 </tr><?php } ?>
440 <tr class="TableMenuRow2">
441 <th class="TableMenuColumn2" style="width: 100%; text-align: left;">
442 <span style="float: left;">&nbsp;Editing Board Info: </span>
443 <span style="float: right;">&nbsp;</span>
444 </th>
445 </tr>
446 <tr class="TableMenuRow3">
447 <td class="TableMenuColumn3">
448 <form style="display: inline;" method="post" name="install" id="install" action="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=info",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">
449 <table style="text-align: left;">
450 <tr style="text-align: left;">
451         <td style="width: 50%;"><label class="TextBoxLabel" for="board_name">Insert board name:</label></td>
452         <td style="width: 50%;"><input type="text" name="board_name" class="TextBox" id="board_name" size="20" value="<?php echo $SettInfo['board_name']; ?>" /></td>
453 </tr><tr style="text-align: left;">
454         <td style="width: 50%;"><label class="TextBoxLabel" for="Author">Insert boards admin name:</label></td>
455         <td style="width: 50%;"><input type="text" name="Author" class="TextBox" id="Author" size="20" value="<?php echo $SettInfo['Author']; ?>" /></td>
456 </tr><tr style="text-align: left;">
457         <td style="width: 50%;"><label class="TextBoxLabel" for="Keywords">Insert keywords about this board:</label></td>
458         <td style="width: 50%;"><input type="text" name="Keywords" class="TextBox" id="Keywords" size="20" value="<?php echo $SettInfo['Keywords']; ?>" /></td>
459 </tr><tr style="text-align: left;">
460         <td style="width: 50%;"><label class="TextBoxLabel" for="Description">Insert description about this board:<br /></label></td>
461         <td style="width: 50%;"><input type="text" name="Description" class="TextBox" id="Description" size="20" value="<?php echo $SettInfo['Description']; ?>" /></td>
462 </tr></table>
463 <table style="text-align: left;">
464 <tr style="text-align: left;">
465 <td style="width: 100%;">
466 <input type="hidden" name="act" value="info" style="display: none;" />
467 <input type="hidden" name="update" value="now" style="display: none;" />
468 <input type="submit" class="Button" value="Apply" name="Apply_Changes" />
469 <input type="reset" value="Reset Form" class="Button" name="Reset_Form" />
470 </td></tr></table>
471 </form>
472 </td>
473 </tr>
474 <tr class="TableMenuRow4">
475 <td class="TableMenuColumn4">&nbsp;</td>
476 </tr>
477 </table>
478 </div>
479 <?php } if($_POST['act']=="info"&&$_POST['update']=="now"&&$_GET['act']=="info"&&
480         $_SESSION['UserGroup']!=$Settings['GuestGroup']&&$GroupInfo['HasAdminCP']=="yes") {
481 $_POST  = array_map("rsq", $_POST);
482 $BoardSettings=$pretext2[0]."\n\$Settings['sqlhost'] = ".null_string($Settings['sqlhost']).";\n\$Settings['sqldb'] = ".null_string($Settings['sqldb']).";\n\$Settings['sqltable'] = ".null_string($Settings['sqltable']).";\n\$Settings['sqluser'] = ".null_string($Settings['sqluser']).";\n\$Settings['sqlpass'] = ".null_string($Settings['sqlpass']).";\n\$Settings['board_name'] = ".null_string($_POST['board_name']).";\n\$Settings['idbdir'] = ".null_string($Settings['idbdir']).";\n\$Settings['idburl'] = ".null_string($Settings['idburl']).";\n\$Settings['enable_https'] = ".null_string($Settings['enable_https']).";\n\$Settings['weburl'] = ".null_string($Settings['weburl']).";\n\$Settings['use_gzip'] = ".null_string($Settings['use_gzip']).";\n\$Settings['html_type'] = ".null_string($Settings['html_type']).";\n\$Settings['html_level'] = ".null_string($Settings['html_level']).";\n\$Settings['output_type'] = ".null_string($Settings['output_type']).";\n\$Settings['GuestGroup'] = ".null_string($Settings['GuestGroup']).";\n\$Settings['MemberGroup'] = ".null_string($Settings['MemberGroup']).";\n\$Settings['ValidateGroup'] = ".null_string($Settings['ValidateGroup']).";\n\$Settings['AdminValidate'] = ".null_string($Settings['AdminValidate']).";\n\$Settings['TestReferer'] = ".null_string($Settings['TestReferer']).";\n\$Settings['DefaultTheme'] = ".null_string($Settings['DefaultTheme']).";\n\$Settings['DefaultTimeZone'] = ".null_string($Settings['DefaultTimeZone']).";\n\$Settings['DefaultDST'] = ".null_string($Settings['DefaultDST']).";\n\$Settings['charset'] = ".null_string($Settings['charset']).";\n\$Settings['add_power_by'] = ".null_string($Settings['add_power_by']).";\n\$Settings['send_pagesize'] = ".null_string($Settings['send_pagesize']).";\n\$Settings['max_posts'] = ".null_string($Settings['max_posts']).";\n\$Settings['max_topics'] = ".null_string($Settings['max_topics']).";\n\$Settings['max_memlist'] = ".null_string($Settings['max_memlist']).";\n\$Settings['max_pmlist'] = ".null_string($Settings['max_pmlist']).";\n\$Settings['hot_topic_num'] = ".null_string($Settings['hot_topic_num']).";\n\$Settings['qstr'] = ".null_string($Settings['qstr']).";\n\$Settings['qsep'] = ".null_string($Settings['qsep']).";\n\$Settings['file_ext'] = ".null_string($Settings['file_ext']).";\n\$Settings['rss_ext'] = ".null_string($Settings['rss_ext']).";\n\$Settings['js_ext'] = ".null_string($Settings['js_ext']).";\n\$Settings['showverinfo'] = ".null_string($Settings['showverinfo']).";\n\$Settings['enable_rss'] = ".null_string($Settings['enable_rss']).";\n\$Settings['enable_search'] = ".null_string($Settings['enable_search']).";\n\$Settings['sessionid_in_urls'] = ".null_string($Settings['sessionid_in_urls']).";\n\$Settings['fixpathinfo'] = ".null_string($Settings['fixpathinfo']).";\n\$Settings['fixbasedir'] = ".null_string($Settings['fixbasedir']).";\n\$Settings['fixcookiedir'] = ".null_string($Settings['fixcookiedir']).";\n\$Settings['enable_pathinfo'] = ".null_string($Settings['enable_pathinfo']).";\n\$Settings['rssurl'] = ".null_string($Settings['rssurl']).";\n\$Settings['board_offline'] = ".null_string($Settings['board_offline']).";\n\$Settings['KarmaBoostDays'] = ".null_string($Settings['KarmaBoostDays']).";\n\$Settings['KBoostPercent'] = ".null_string($Settings['KBoostPercent']).";\n".$pretext2[1]."\n\$SettInfo['board_name'] = ".null_string($_POST['board_name']).";\n\$SettInfo['Author'] = ".null_string($_POST['Author']).";\n\$SettInfo['Keywords'] = ".null_string($_POST['Keywords']).";\n\$SettInfo['Description'] = ".null_string($_POST['Description']).";\n".$pretext2[2]."\n\$SettDir['maindir'] = ".null_string($SettDir['maindir']).";\n\$SettDir['inc'] = ".null_string($SettDir['inc']).";\n\$SettDir['misc'] = ".null_string($SettDir['misc']).";\n\$SettDir['admin'] = ".null_string($SettDir['admin']).";\n\$SettDir['mod'] = ".null_string($SettDir['mod']).";\n\$SettDir['themes'] = ".null_string($SettDir['themes']).";\n".$pretext2[3]."\n?>";
483 $BoardSettingsBak = $pretext.$settcheck.$BoardSettings;
484 $BoardSettings = $pretext.$settcheck.$BoardSettings;
485 $fp = fopen("settings.php","w+");
486 fwrite($fp, $BoardSettings);
487 fclose($fp);
488 //      @cp("settings.php","settingsbak.php");
489 $fp = fopen("settingsbak.php","w+");
490 fwrite($fp, $BoardSettingsBak);
491 fclose($fp); } if($_POST['update']=="now"&&$_GET['act']!=null) {
492         $profiletitle = " ".$ThemeSet['TitleDivider']." Updating Settings"; ?>
493 </td></tr>
494 <tr id="ProfileTitleEnd" class="TableMenuRow4">
495 <td class="TableMenuColumn4">&nbsp;</td>
496 </tr></table></div><?php } ?>
497 </td></tr>
498 </table>
499 <div>&nbsp;</div>