Another small update to apache like request logger.
[iDB.git] / inc / admin / main.php
blob3a08b9863b70c2d3dde385770371c9adc2b8ee6d
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.
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.
11 Copyright 2004-2011 iDB Support - http://idb.berlios.de/
12 Copyright 2004-2011 Game Maker 2k - http://gamemaker2k.org/
14 $FileInfo: main.php - Last Update: 06/14/2011 SVN 672 - Author: cooldude2k $
16 $File3Name = basename($_SERVER['SCRIPT_NAME']);
17 if ($File3Name=="main.php"||$File3Name=="/main.php") {
18 require('index.php');
19 exit(); }
21 // Check if we can goto admin cp
22 if($_SESSION['UserGroup']==$Settings['GuestGroup']||$GroupInfo['HasAdminCP']=="no") {
23 redirect("location",$rbasedir.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']); $urlstatus = 302;
25 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
26 if(!isset($_POST['update'])) { $_POST['update'] = null; }
27 if($_GET['act']=="sql"&&$GroupInfo['ViewDBInfo']!="yes") {
28 redirect("location",$rbasedir.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']); $urlstatus = 302;
30 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
31 if(!isset($_POST['update'])) { $_POST['update'] = null; }
32 if($_GET['act']=="resyncthemes"&&$Settings['SQLThemes']!="on") { $_GET['act'] = "enablesthemes"; }
33 if($_GET['act']=="enablesthemes"&&$Settings['SQLThemes']!="off") { $_GET['act'] = "resyncthemes"; }
34 $iDBRDate = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2];
35 $iDBRSVN = $VER2[2]." ".$SubVerN;
36 $OutPutLog = null;
37 $LastUpdateS = "Last Update: ".$iDBRDate." ".$iDBRSVN;
38 $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-".$SVNDay[2]." iDB Support - http://idb.berlios.de/\n Copyright 2004-".$SVNDay[2]." Game Maker 2k - http://gamemaker2k.org/\n iDB Installer made by Game Maker 2k - http://idb.berlios.net/\n\n \$FileInfo: settings.php & settingsbak.php - ".$LastUpdateS." - Author: cooldude2k \$\n*/\n";
39 $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 */");
40 $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";
41 if(!isset($_POST['update'])) { $_POST['update'] = null; }
42 function bool_string($boolean) {
43 if(!is_bool($boolean)) {
44 return $boolean; }
45 if(is_bool($boolean)) {
46 if($boolean==0||$boolean===false) {
47 return "false"; }
48 if($boolean==1||$boolean===true) {
49 return "true"; } } }
50 function null_string($string) {
51 $strtype = strtolower(gettype($string));
52 if($strtype=="string") {
53 return "'".$string."'"; }
54 if($strtype=="null") {
55 return "null"; }
56 if($strtype=="integer") {
57 return $string; }
58 return "null"; }
59 function rsq($string) {
60 $string = preg_replace("/^(\')|$(\')/i","\'",$string);
61 return $string; }
62 $KarmaExp = explode("&",$Settings['KarmaBoostDays']);
63 $KarmaNum = count($KarmaExp);
64 $Karmai = 0; $KarmaNex = 0; $KarmaTemp = null;
65 while ($Karmai < $KarmaNum) {
66 if(is_numeric($KarmaExp[$Karmai])) {
67 $KarmaTemp[$KarmaNex] = $KarmaExp[$Karmai];
68 ++$KarmaNex; }
69 ++$Karmai; }
70 $KarmaExp = $KarmaTemp;
71 $Settings['KarmaBoostDays'] = implode("&",$KarmaExp);
72 $KBoostPercent = explode("|",$Settings['KBoostPercent']);
73 if(count($KBoostPercent)<1) {
74 $Settings['KBoostPercent'] = "6|10"; }
75 if(!is_numeric($KBoostPercent[0])) {
76 $Settings['KBoostPercent'] = "6|10"; }
77 if(count($KBoostPercent)==1) {
78 $Settings['KBoostPercent'] = "6|10"; }
79 if(!is_numeric($KBoostPercent[1])) {
80 $Settings['KBoostPercent'] = "6|10"; }
81 if(count($KBoostPercent)>2) {
82 $Settings['KBoostPercent'] = "6|10"; }
83 if($Settings['html_type']=="html5") {
84 $Settings['output_type'] = "html"; }
85 if(!isset($Settings['sqltype'])) {
86 $Settings['sqltype'] = "mysql"; }
87 $Settings['sqltype'] = strtolower($Settings['sqltype']);
88 if($Settings['sqltype']!="mysql"&&
89 $Settings['sqltype']!="mysqli"&&
90 $Settings['sqltype']!="pgsql"&&
91 $Settings['sqltype']!="sqlite") {
92 $Settings['sqltype'] = "mysql"; }
93 if($Settings['sqltype']=="mysql"||
94 $Settings['sqltype']=="mysqli") {
95 $DBType['Server'] = "MySQL version ".sql_server_info($SQLStat);
96 $DBType['Client'] = "MySQL version ".sql_client_info($SQLStat); }
97 if($Settings['sqltype']=="pgsql") {
98 $DBType['Server'] = "PostgreSQL version ".sql_server_info($SQLStat);
99 $DBType['Client'] = "PostgreSQL version ".sql_client_info($SQLStat); }
100 if($Settings['sqltype']=="sqlite") {
101 $DBType['Server'] = "SQLite version ".sql_server_info($SQLStat);
102 $DBType['Client'] = sql_client_info($SQLStat); }
103 if(!isset($Settings['vercheck'])) {
104 $Settings['vercheck'] = 2; }
105 if($Settings['vercheck']!=1&&
106 $Settings['vercheck']!=2) {
107 $Settings['vercheck'] = 2; }
108 if(!isset($Settings['start_date'])) {
109 $Settings['start_date'] = GMTimeStamp(); }
110 if(!isset($Settings['SQLThemes'])) {
111 $Settings['SQLThemes'] = 'off'; }
112 if($Settings['SQLThemes']!="on"&&
113 $Settings['SQLThemes']!="off") {
114 $Settings['SQLThemes'] = 'off'; }
115 if(!isset($Settings['board_name'])&&isset($SettInfo['board_name'])) {
116 $Settings['board_name'] = $SettInfo['board_name']; }
117 if(!isset($SettInfo['board_name'])&&isset($Settings['board_name'])) {
118 $SettInfo['board_name'] = $Settings['board_name']; }
119 if($Settings['board_name']!=$SettInfo['board_name']) {
120 $SettInfo['board_name'] = $Settings['board_name']; }
122 <table class="Table3">
123 <tr style="width: 100%; vertical-align: top;">
124 <td style="width: 15%; vertical-align: top;">
125 <?php
126 require($SettDir['admin'].'table.php');
127 if($_GET['act']=="delsessions"&&$GroupInfo['ViewDBInfo']=="yes") {
128 $time = GMTimeStamp() - ini_get("session.gc_maxlifetime");
129 //$sqlg = sql_pre_query('DELETE FROM \"'.$Settings['sqltable'].'sessions\" WHERE \"expires\" < UNIX_TIMESTAMP();', array(null));
130 $sqlgc = sql_pre_query("DELETE FROM \"".$Settings['sqltable']."sessions\" WHERE \"expires\" < %i", array($time));
131 sql_query($sqlgc,$SQLStat);
132 $_POST['update'] = "now"; $_GET['act'] = "optimize"; }
133 if($_GET['act']=="enablesthemes"&&$GroupInfo['ViewDBInfo']=="yes"&&$Settings['SQLThemes']=="off") {
134 $Settings['board_name'] = htmlspecialchars($Settings['board_name'], ENT_QUOTES, $Settings['charset']);
135 $Settings['board_name'] = fixbamps($Settings['board_name']);
136 $Settings['board_name'] = remove_spaces($Settings['board_name']);
137 $Settings['board_name'] = str_replace("\&#039;", "&#039;", $Settings['board_name']);
138 $SettInfo['board_name'] = htmlspecialchars($SettInfo['board_name'], ENT_QUOTES, $Settings['charset']);
139 $SettInfo['board_name'] = fixbamps($SettInfo['board_name']);
140 $SettInfo['board_name'] = remove_spaces($SettInfo['board_name']);
141 $SettInfo['board_name'] = str_replace("\&#039;", "&#039;", $SettInfo['board_name']);
142 $SettInfo['Author'] = htmlspecialchars($SettInfo['Author'], ENT_QUOTES, $Settings['charset']);
143 $SettInfo['Author'] = fixbamps($SettInfo['Author']);
144 $SettInfo['Author'] = remove_spaces($SettInfo['Author']);
145 $SettInfo['Author'] = str_replace("\&#039;", "&#039;", $SettInfo['Author']);
146 $SettInfo['Keywords'] = htmlspecialchars($SettInfo['Keywords'], ENT_QUOTES, $Settings['charset']);
147 $SettInfo['Keywords'] = fixbamps($SettInfo['Keywords']);
148 $SettInfo['Keywords'] = remove_spaces($SettInfo['Keywords']);
149 $SettInfo['Keywords'] = str_replace("\&#039;", "&#039;", $SettInfo['Keywords']);
150 $SettInfo['Description'] = htmlspecialchars($SettInfo['Description'], ENT_QUOTES, $Settings['charset']);
151 $SettInfo['Description'] = fixbamps($SettInfo['Description']);
152 $SettInfo['Description'] = remove_spaces($SettInfo['Description']);
153 $SettInfo['Description'] = str_replace("\&#039;", "&#039;", $SettInfo['Description']);
154 $BoardSettings=$pretext2[0]."\n".
155 "\$Settings['sqlhost'] = ".null_string($Settings['sqlhost']).";\n".
156 "\$Settings['sqldb'] = ".null_string($Settings['sqldb']).";\n".
157 "\$Settings['sqltable'] = ".null_string($Settings['sqltable']).";\n".
158 "\$Settings['sqluser'] = ".null_string($Settings['sqluser']).";\n".
159 "\$Settings['sqlpass'] = ".null_string($Settings['sqlpass']).";\n".
160 "\$Settings['sqltype'] = ".null_string($Settings['sqltype']).";\n".
161 "\$Settings['board_name'] = ".null_string($Settings['board_name']).";\n".
162 "\$Settings['idbdir'] = ".null_string($Settings['idbdir']).";\n".
163 "\$Settings['idburl'] = ".null_string($Settings['idburl']).";\n".
164 "\$Settings['enable_https'] = ".null_string($Settings['enable_https']).";\n".
165 "\$Settings['weburl'] = ".null_string($Settings['weburl']).";\n".
166 "\$Settings['SQLThemes'] = 'on';\n".
167 "\$Settings['use_gzip'] = ".null_string($Settings['use_gzip']).";\n".
168 "\$Settings['html_type'] = ".null_string($Settings['html_type']).";\n".
169 "\$Settings['html_level'] = ".null_string($Settings['html_level']).";\n".
170 "\$Settings['output_type'] = ".null_string($Settings['output_type']).";\n".
171 "\$Settings['GuestGroup'] = ".null_string($Settings['GuestGroup']).";\n".
172 "\$Settings['MemberGroup'] = ".null_string($Settings['MemberGroup']).";\n".
173 "\$Settings['ValidateGroup'] = ".null_string($Settings['ValidateGroup']).";\n".
174 "\$Settings['AdminValidate'] = ".null_string($Settings['AdminValidate']).";\n".
175 "\$Settings['TestReferer'] = ".null_string($Settings['TestReferer']).";\n".
176 "\$Settings['DefaultTheme'] = ".null_string($Settings['DefaultTheme']).";\n".
177 "\$Settings['DefaultTimeZone'] = ".null_string($Settings['DefaultTimeZone']).";\n".
178 "\$Settings['DefaultDST'] = ".null_string($Settings['DefaultDST']).";\n".
179 "\$Settings['start_date'] = ".null_string($Settings['start_date']).";\n".
180 "\$Settings['use_hashtype'] = ".null_string($Settings['use_hashtype']).";\n".
181 "\$Settings['charset'] = ".null_string($Settings['charset']).";\n".
182 "\$Settings['sql_collate'] = ".null_string($Settings['sql_collate']).";\n".
183 "\$Settings['sql_charset'] = ".null_string($Settings['sql_charset']).";\n".
184 "\$Settings['add_power_by'] = ".null_string($Settings['add_power_by']).";\n".
185 "\$Settings['send_pagesize'] = ".null_string($Settings['send_pagesize']).";\n".
186 "\$Settings['max_posts'] = ".null_string($Settings['max_posts']).";\n".
187 "\$Settings['max_topics'] = ".null_string($Settings['max_topics']).";\n".
188 "\$Settings['max_memlist'] = ".null_string($Settings['max_memlist']).";\n".
189 "\$Settings['max_pmlist'] = ".null_string($Settings['max_pmlist']).";\n".
190 "\$Settings['hot_topic_num'] = ".null_string($Settings['hot_topic_num']).";\n".
191 "\$Settings['qstr'] = ".null_string($Settings['qstr']).";\n".
192 "\$Settings['qsep'] = ".null_string($Settings['qsep']).";\n".
193 "\$Settings['file_ext'] = ".null_string($Settings['file_ext']).";\n".
194 "\$Settings['rss_ext'] = ".null_string($Settings['rss_ext']).";\n".
195 "\$Settings['js_ext'] = ".null_string($Settings['js_ext']).";\n".
196 "\$Settings['showverinfo'] = ".null_string($Settings['showverinfo']).";\n".
197 "\$Settings['vercheck'] = ".null_string($Settings['vercheck']).";\n".
198 "\$Settings['enable_rss'] = ".null_string($Settings['enable_rss']).";\n".
199 "\$Settings['enable_search'] = ".null_string($Settings['enable_search']).";\n".
200 "\$Settings['sessionid_in_urls'] = ".null_string($Settings['sessionid_in_urls']).";\n".
201 "\$Settings['fixpathinfo'] = ".null_string($OldSettings['fixpathinfo']).";\n".
202 "\$Settings['fixbasedir'] = ".null_string($OldSettings['fixbasedir']).";\n".
203 "\$Settings['fixcookiedir'] = ".null_string($OldSettings['fixcookiedir']).";\n".
204 "\$Settings['fixredirectdir'] = ".null_string($OldSettings['fixredirectdir']).";\n".
205 "\$Settings['enable_pathinfo'] = ".null_string($Settings['enable_pathinfo']).";\n".
206 "\$Settings['rssurl'] = ".null_string($Settings['rssurl']).";\n".
207 "\$Settings['board_offline'] = ".null_string($Settings['board_offline']).";\n".
208 "\$Settings['log_http_request'] = ".null_string($Settings['log_http_request']).";\n".
209 "\$Settings['BoardUUID'] = ".null_string($Settings['BoardUUID']).";\n".
210 "\$Settings['KarmaBoostDays'] = ".null_string($Settings['KarmaBoostDays']).";\n".
211 "\$Settings['KBoostPercent'] = ".null_string($Settings['KBoostPercent']).";\n".$pretext2[1]."\n".
212 "\$SettInfo['board_name'] = ".null_string($SettInfo['board_name']).";\n".
213 "\$SettInfo['Author'] = ".null_string($SettInfo['Author']).";\n".
214 "\$SettInfo['Keywords'] = ".null_string($SettInfo['Keywords']).";\n".
215 "\$SettInfo['Description'] = ".null_string($SettInfo['Description']).";\n".$pretext2[2]."\n".
216 "\$SettDir['maindir'] = ".null_string($SettDir['maindir']).";\n".
217 "\$SettDir['inc'] = ".null_string($SettDir['inc']).";\n".
218 "\$SettDir['logs'] = ".null_string($SettDir['logs']).";\n".
219 "\$SettDir['archive'] = ".null_string($SettDir['archive']).";\n".
220 "\$SettDir['misc'] = ".null_string($SettDir['misc']).";\n".
221 "\$SettDir['sql'] = ".null_string($SettDir['sql']).";\n".
222 "\$SettDir['admin'] = ".null_string($SettDir['admin']).";\n".
223 "\$SettDir['sqldumper'] = ".null_string($SettDir['sqldumper']).";\n".
224 "\$SettDir['mod'] = ".null_string($SettDir['mod']).";\n".
225 "\$SettDir['themes'] = ".null_string($SettDir['themes']).";\n".$pretext2[3]."\n?>";
226 $BoardSettingsBak = $pretext.$settcheck.$BoardSettings;
227 $BoardSettings = $pretext.$settcheck.$BoardSettings;
228 $fp = fopen("settings.php","w+");
229 fwrite($fp, $BoardSettings);
230 fclose($fp);
231 // cp("settings.php","settingsbak.php");
232 $fp = fopen("settingsbak.php","w+");
233 fwrite($fp, $BoardSettingsBak);
234 fclose($fp);
235 $Settings['SQLThemes'] = "on";
236 $_POST['update'] = "now"; $_GET['act'] = "resyncthemes"; }
237 if(($_GET['act']=="themelist"&&$GroupInfo['ViewDBInfo']=="yes")||
238 ($_GET['act']=="gettheme"&&$_POST['act']=="gettheme"&&$GroupInfo['ViewDBInfo']=="yes")) {
239 if($_GET['act']=="gettheme"&&$_POST['act']=="gettheme"&&$_POST['GetTheme']==null) {
240 $_GET['act'] = "themelist"; $_POST['act'] = ""; }
241 if($_GET['act']=="gettheme"&&$_POST['act']=="gettheme"&&$_POST['GetTheme']=="None") {
242 $_GET['act'] = "themelist"; $_POST['act'] = ""; }
243 $conn_id = ftp_connect("ftp.berlios.de",21,90);
244 ftp_login($conn_id, "anonymous", "anonymous");
245 ftp_pasv($conn_id, true);
246 if($_GET['act']=="themelist") {
247 ftp_chdir($conn_id, "/pub/idb/themes/"); }
248 if($_GET['act']=="gettheme"&&$_POST['act']=="gettheme") {
249 ftp_chdir($conn_id, "/pub/idb/themes/".$_POST['GetTheme']."/");
250 ftp_get($conn_id, $SettDir['archive'].$_POST['GetTheme'].".tar", "./".$_POST['GetTheme'].".tar", FTP_BINARY);
251 untar($SettDir['archive'].$_POST['GetTheme'].".tar",$SettDir['themes'].$_POST['GetTheme']."/");
252 unlink($SettDir['archive'].$_POST['GetTheme'].".tar");
253 if($Settings['SQLThemes']=="off") { $_POST['update'] = "now"; }
254 if($Settings['SQLThemes']=="on") {
255 $_POST['update'] = "now"; $_GET['act'] = "resyncthemes"; } }
256 if($_GET['act']=="themelist") {
257 $themelist = ftp_nlist($conn_id, ".");
258 $it = 0; $numt = count($themelist);
259 $themeact = url_maker($exfile['admin'],$Settings['file_ext'],"act=gettheme",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']);
260 $admincptitle = " ".$ThemeSet['TitleDivider']." Theme Setup";
262 </td>
263 <td style="width: 85%; vertical-align: top;">
264 <div class="TableMenuBorder">
265 <?php if($ThemeSet['TableStyle']=="div") { ?>
266 <div class="TableMenuRow1">
267 <?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo $themeact; ?>">Theme Setup</a></div>
268 <?php } ?>
269 <table class="TableMenu" style="width: 100%;">
270 <?php if($ThemeSet['TableStyle']=="table") { ?>
271 <tr class="TableMenuRow1">
272 <td class="TableMenuColumn1"><span style="float: left;">
273 <?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo $themeact; ?>">Theme Setup</a>
274 </span><span style="float: right;">&nbsp;</span></td>
275 </tr><?php } ?>
276 <tr id="ProfileTitle" class="TableMenuRow2">
277 <th class="TableMenuColumn2">Theme Setup</th>
278 </tr>
279 <tr class="TableMenuRow3" id="NotePadRow">
280 <td class="TableMenuColumn3">
281 <form style="display: inline;" method="post" action="<?php echo $themeact; ?>"><div style="text-align: center;">
282 <label class="TextBoxLabel" for="GetTheme">Install Theme:</label><br />
283 <select size="1" name="GetTheme" id="GetTheme" class="TextBox">
284 <option value="None">None</option>
285 <?php
286 while ($it < $numt) {
287 if(!file_exists($SettDir['themes'].$themelist[$it])) {
288 echo "<option value=\"".$themelist[$it]."\">".$themelist[$it]."</option>\n"; }
289 ++$it; }
291 </select><br />
292 <input type="hidden" name="act" value="gettheme" style="display: none;" />
293 <input type="submit" value="Install" />
294 </div></form></td>
295 </tr>
296 <tr id="ProfileEnd" class="TableMenuRow4">
297 <td class="TableMenuColumn4">&nbsp;</td>
298 </tr>
299 </table>
300 </div>
301 <?php } ftp_close($conn_id); }
302 if($_GET['act']=="resyncthemes"&&$GroupInfo['ViewDBInfo']=="yes"&&$Settings['SQLThemes']=="on") {
303 $time = GMTimeStamp() - ini_get("session.gc_maxlifetime");
304 //$sqlg = sql_pre_query('DELETE FROM \"'.$Settings['sqltable'].'sessions\" WHERE \"expires\" < UNIX_TIMESTAMP();', array(null));
305 if($Settings['sqltype']=="mysql"||
306 $Settings['sqltype']=="mysqli") {
307 $sqlgc = sql_pre_query("TRUNCATE TABLE \"".$Settings['sqltable']."themes\"", array(null));
308 sql_query($sqlgc,$SQLStat);
309 $sqlgc = sql_pre_query("ALTER TABLE \"".$Settings['sqltable']."themes\" AUTO_INCREMENT=1", array(null));
310 sql_query($sqlgc,$SQLStat); }
311 if($Settings['sqltype']=="pgsql") {
312 $sqlgc = sql_pre_query("TRUNCATE TABLE \"".$Settings['sqltable']."themes\"", array(null));
313 sql_query($sqlgc,$SQLStat);
314 $sqlgc = sql_pre_query("SELECT setval('".$Settings['sqltable']."themes_id_seq', 1, false);", array(null));
315 sql_query($sqlgc,$SQLStat); }
316 if($Settings['sqltype']=="sqlite") {
317 $sqlgc = sql_pre_query("DELETE FROM \"".$Settings['sqltable']."themes\";", array(null));
318 sql_query($sqlgc,$SQLStat); }
319 $skindir = dirname(realpath("sql.php"))."/".$SettDir['themes'];
320 if ($handle = opendir($skindir)) { $dirnum = null;
321 while (false !== ($file = readdir($handle))) {
322 if ($dirnum==null) { $dirnum = 0; }
323 if (file_exists($skindir.$file."/info.php")) {
324 if ($file != "." && $file != "..") {
325 include($skindir.$file."/info.php");
326 $themelist[$dirnum] = $file;
327 ++$dirnum; } } }
328 closedir($handle); asort($themelist);
329 $themenum=count($themelist); $themei=0;
330 while ($themei < $themenum) {
331 include($skindir.$themelist[$themei]."/settings.php");
332 $query = sql_pre_query("INSERT INTO \"".$Settings['sqltable']."themes\" (\"Name\", \"ThemeName\", \"ThemeMaker\", \"ThemeVersion\", \"ThemeVersionType\", \"ThemeSubVersion\", \"MakerURL\", \"CopyRight\", \"CSS\", \"CSSType\", \"FavIcon\", \"TableStyle\", \"MiniPageAltStyle\", \"PreLogo\", \"Logo\", \"LogoStyle\", \"SubLogo\", \"TopicIcon\", \"MovedTopicIcon\", \"HotTopic\", \"MovedHotTopic\", \"PinTopic\", \"AnnouncementTopic\", \"MovedPinTopic\", \"HotPinTopic\", \"MovedHotPinTopic\", \"ClosedTopic\", \"MovedClosedTopic\", \"HotClosedTopic\", \"MovedHotClosedTopic\", \"PinClosedTopic\", \"MovedPinClosedTopic\", \"HotPinClosedTopic\", \"MovedHotPinClosedTopic\", \"MessageRead\", \"MessageUnread\", \"Profile\", \"WWW\", \"PM\", \"TopicLayout\", \"AddReply\", \"FastReply\", \"NewTopic\", \"QuoteReply\", \"EditReply\", \"DeleteReply\", \"Report\", \"LineDivider\", \"ButtonDivider\", \"LineDividerTopic\", \"TitleDivider\", \"ForumStyle\", \"ForumIcon\", \"SubForumIcon\", \"RedirectIcon\", \"TitleIcon\", \"NavLinkIcon\", \"NavLinkDivider\", \"StatsIcon\", \"NoAvatar\", \"NoAvatarSize\") VALUES\n".
333 "('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s');", array($themelist[$themei], $ThemeSet['ThemeName'], $ThemeSet['ThemeMaker'], $ThemeSet['ThemeVersion'], $ThemeSet['ThemeVersionType'], $ThemeSet['ThemeSubVersion'], $ThemeSet['MakerURL'], $ThemeSet['CopyRight'], $ThemeSet['CSS'], $ThemeSet['CSSType'], $ThemeSet['FavIcon'], $ThemeSet['TableStyle'], $ThemeSet['MiniPageAltStyle'], $ThemeSet['PreLogo'], $ThemeSet['Logo'], $ThemeSet['LogoStyle'], $ThemeSet['SubLogo'], $ThemeSet['TopicIcon'], $ThemeSet['MovedTopicIcon'], $ThemeSet['HotTopic'], $ThemeSet['MovedHotTopic'], $ThemeSet['PinTopic'], $ThemeSet['AnnouncementTopic'], $ThemeSet['MovedPinTopic'], $ThemeSet['HotPinTopic'], $ThemeSet['MovedHotPinTopic'], $ThemeSet['ClosedTopic'], $ThemeSet['MovedClosedTopic'], $ThemeSet['HotClosedTopic'], $ThemeSet['MovedHotClosedTopic'], $ThemeSet['PinClosedTopic'], $ThemeSet['MovedPinClosedTopic'], $ThemeSet['HotPinClosedTopic'], $ThemeSet['MovedHotPinClosedTopic'], $ThemeSet['MessageRead'], $ThemeSet['MessageUnread'], $ThemeSet['Profile'], $ThemeSet['WWW'], $ThemeSet['PM'], $ThemeSet['TopicLayout'], $ThemeSet['AddReply'], $ThemeSet['FastReply'], $ThemeSet['NewTopic'], $ThemeSet['QuoteReply'], $ThemeSet['EditReply'], $ThemeSet['DeleteReply'], $ThemeSet['Report'], $ThemeSet['LineDivider'], $ThemeSet['ButtonDivider'], $ThemeSet['LineDividerTopic'], $ThemeSet['TitleDivider'], $ThemeSet['ForumStyle'], $ThemeSet['ForumIcon'], $ThemeSet['SubForumIcon'], $ThemeSet['RedirectIcon'], $ThemeSet['TitleIcon'], $ThemeSet['NavLinkIcon'], $ThemeSet['NavLinkDivider'], $ThemeSet['StatsIcon'], $ThemeSet['NoAvatar'], $ThemeSet['NoAvatarSize']));
334 sql_query($query,$SQLStat);
335 ++$themei; } }
336 $themequery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."themes\" WHERE \"Name\"='%s'", array($_GET['theme']));
337 $themeresult=sql_query($themequery,$SQLStat);
338 $themenum=sql_num_rows($themeresult);
339 require($SettDir['inc'].'sqlthemes.php');
340 $_POST['update'] = "now"; $_GET['act'] = "optimize"; }
341 if($_GET['act']=="optimize"&&$GroupInfo['ViewDBInfo']=="yes") {
342 $TablePreFix = $Settings['sqltable'];
343 function add_prefix($tarray) {
344 global $TablePreFix;
345 return $TablePreFix.$tarray; }
346 $TableChCk = array("categories", "catpermissions", "events", "forums", "groups", "members", "mempermissions", "messenger", "permissions", "polls", "posts", "restrictedwords", "sessions", "smileys", "topics", "wordfilter");
347 $TableChCk = array_map("add_prefix",$TableChCk);
348 $tcount = count($TableChCk); $ti = 0;
349 $TblOptimized = 0;
350 if($Settings['sqltype']!="sqlite") {
351 while ($ti < $tcount) {
352 if(isset($OptimizeAr["Msg_text"])) { unset($OptimizeAr["Msg_text"]); }
353 if(isset($OptimizeAr[3])) { unset($OptimizeAr[3]); }
354 if($Settings['sqltype']=="mysql"||
355 $Settings['sqltype']=="mysqli") {
356 $OptimizeTea = sql_query(sql_pre_query("OPTIMIZE TABLE \"".$TableChCk[$ti]."\"", array(null)),$SQLStat); }
357 if($Settings['sqltype']=="pgsql") {
358 $OptimizeTea = sql_query(sql_pre_query("VACUUM ANALYZE \"".$TableChCk[$ti]."\"", array(null)),$SQLStat); }
359 if($Settings['sqltype']=="mysql"||
360 $Settings['sqltype']=="mysqli") {
361 $OptimizeAr = sql_fetch_array($OptimizeTea);
362 if(!isset($OptimizeAr["Msg_text"])&&
363 isset($OptimizeAr[3])) { $OptimizeAr["Msg_text"] = $OptimizeAr[3]; }
364 if($OptimizeAr["Msg_text"]=="OK") {
365 ++$TblOptimized; } } ++$ti; } }
366 if($Settings['sqltype']=="sqlite") {
367 $OptimizeTea = sql_query(sql_pre_query("VACUUM", array(null)),$SQLStat); }
368 if($Settings['sqltype']=="mysql"||
369 $Settings['sqltype']=="mysqli") {
370 $OutPutLog = "MySQL Output: ".$TblOptimized." tables optimized."; }
371 if($Settings['sqltype']=="pgsql") {
372 $OutPutLog = "PGSQL Output: All tables optimized."; }
373 if($Settings['sqltype']=="sqlite") {
374 $OutPutLog = "SQLite Output: All tables optimized."; }
375 $_POST['update'] = "now"; $_GET['act'] = "view"; }
377 </td>
378 <td style="width: 85%; vertical-align: top;">
379 <?php if($_POST['update']=="now"&&$_GET['act']!=null) {
380 $updateact = url_maker($exfile['profile'],$Settings['file_ext'],"act=".$_GET['act']."&menu=main",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
381 $admincptitle = " ".$ThemeSet['TitleDivider']." Updating Settings";
382 redirect("refresh",$rbasedir.url_maker($exfile['admin'],$Settings['file_ext'],"act=".$_GET['act'],$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin'],FALSE),"3");
384 <div class="TableMenuBorder">
385 <?php if($ThemeSet['TableStyle']=="div") { ?>
386 <div class="TableMenuRow1">
387 <?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=".$_GET['act']."&menu=main",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">Updating Settings</a></div>
388 <?php } ?>
389 <table class="TableMenu" style="width: 100%;">
390 <?php if($ThemeSet['TableStyle']=="table") { ?>
391 <tr class="TableMenuRow1">
392 <td class="TableMenuColumn1"><span style="float: left;">
393 <?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=".$_GET['act']."&menu=main",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">Updating Settings</a>
394 </span><span style="float: right;">&nbsp;</span></td>
395 </tr><?php } ?>
396 <tr id="ProfileTitle" class="TableMenuRow2">
397 <th class="TableMenuColumn2">Updating Settings</th>
398 </tr>
399 <tr class="TableMenuRow3" id="ProfileUpdate">
400 <td class="TableMenuColumn3">
401 <div style="text-align: center;">
402 <?php if(isset($OutPutLog)) { echo "<br />".$OutPutLog; } ?>
403 <br />Settings have been updated <a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=".$_GET['act']."&menu=main",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">click here</a> to go back. ^_^<br />&nbsp;</div>
404 <?php } if($_GET['act']=="view"&&$_POST['update']!="now") {
405 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"id\"=%i LIMIT 1", array($_SESSION['UserID']));
406 $result=sql_query($query,$SQLStat);
407 $num=sql_num_rows($result);
408 $i=0;
409 $YourID=sql_result($result,$i,"id");
410 $Notes=sql_result($result,$i,"Notes");
411 $noteact = url_maker($exfile['profile'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
412 $notepadact = $noteact; $profiletitle = " ".$ThemeSet['TitleDivider']." NotePad";
413 $admincptitle = " ".$ThemeSet['TitleDivider']." Admin CP";
415 <div class="TableMenuBorder">
416 <?php if($ThemeSet['TableStyle']=="div") { ?>
417 <div class="TableMenuRow1">
418 <?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo $noteact; ?>">NotePad</a></div>
419 <?php } ?>
420 <table class="TableMenu" style="width: 100%;">
421 <?php if($ThemeSet['TableStyle']=="table") { ?>
422 <tr class="TableMenuRow1">
423 <td class="TableMenuColumn1"><span style="float: left;">
424 <?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo $noteact; ?>">NotePad</a>
425 </span><span style="float: right;">&nbsp;</span></td>
426 </tr><?php } ?>
427 <tr id="ProfileTitle" class="TableMenuRow2">
428 <th class="TableMenuColumn2">NotePad</th>
429 </tr>
430 <tr class="TableMenuRow3" id="NotePadRow">
431 <td class="TableMenuColumn3">
432 <form method="post" action="<?php echo $notepadact; ?>"><div style="text-align: center;">
433 <label class="TextBoxLabel" for="NotePad">Your NotePad</label><br />
434 <textarea class="TextBox" name="NotePad" id="NotePad" style="width: 75%; height: 128px;" rows="10" cols="84"><?php echo $Notes; ?></textarea>
435 <input type="hidden" name="act" value="view" style="display: none;" />
436 <input type="hidden" name="update" value="now" style="display: none;" />
437 <br /><input type="submit" class="Button" value="Save" />&nbsp;<input class="Button" type="reset" />
438 </div></form></td>
439 </tr>
440 <tr id="ProfileEnd" class="TableMenuRow4">
441 <td class="TableMenuColumn4">&nbsp;</td>
442 </tr>
443 </table>
444 </div>
445 <?php } if($_GET['act']=="settings"&&$_POST['update']!="now") {
446 require('settings.php'); $admincptitle = " ".$ThemeSet['TitleDivider']." Settings Manager";
447 $ts_array = explode(":",$Settings['DefaultTimeZone']);
448 if(count($ts_array)!=2) {
449 if(!isset($ts_array[0])) { $ts_array[0] = "0"; }
450 if(!isset($ts_array[1])) { $ts_array[1] = "00"; }
451 $Settings['DefaultTimeZone'] = $ts_array[0].":".$ts_array[1]; }
452 if(!is_numeric($ts_array[0])) { $ts_array[0] = "0"; }
453 if(!is_numeric($ts_array[1])) { $ts_array[1] = "00"; }
454 if($ts_array[1]<0) { $ts_array[1] = "00"; $Settings['DefaultTimeZone'] = $ts_array[0].":".$ts_array[1]; }
455 $tsa = array("offset" => $Settings['DefaultTimeZone'], "hour" => $ts_array[0], "minute" => $ts_array[1]);
456 $mguerys = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."groups\" WHERE (\"Name\"<>'%s') ORDER BY \"id\" ASC", array("Admin"));
457 $mgresults=sql_query($mguerys,$SQLStat);
458 $mnum=sql_num_rows($mgresults);
459 $mi = 0;
460 while ($mi < $mnum) {
461 $MGroups[$mi]=sql_result($mgresults,$mi,"Name");
462 ++$mi; }
463 sql_free_result($mgresults);
464 if($Settings['vercheck']===1) {
465 $AdminCheckURL = url_maker($exfile['admin'],$Settings['file_ext'],"act=vercheck&redirect=on",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); }
466 if($Settings['vercheck']===2) {
467 $AdminCheckURL = url_maker($exfile['admin'],$Settings['file_ext'],"act=vercheck&vercheck=newtype&redirect=on",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); }
468 $AddChkURL = null;
469 if(isset($_GET['menu'])&&$_GET['menu']=="main") { $AddChkURL = "&menu=main"; }
471 <div class="TableMenuBorder">
472 <?php if($ThemeSet['TableStyle']=="div") { ?>
473 <div class="TableMenuRow1">
474 <?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>
475 <?php } ?>
476 <table class="TableMenu" style="width: 100%;">
477 <?php if($ThemeSet['TableStyle']=="table") { ?>
478 <tr class="TableMenuRow1">
479 <td class="TableMenuColumn1"><span style="float: left;">
480 <?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>
481 </span><span style="float: right;">&nbsp;</span></td>
482 </tr><?php } ?>
483 <tr class="TableMenuRow2">
484 <th class="TableMenuColumn2" style="width: 100%; text-align: left;">
485 <span style="float: left;">&nbsp;Editing Setting for iDB: </span>
486 <span style="float: right;">&nbsp;</span>
487 </th>
488 </tr>
489 <tr class="TableMenuRow3">
490 <td class="TableMenuColumn3">
491 <form style="display: inline;" method="post" id="acptool" action="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=settings",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">
492 <table style="text-align: left;">
493 <tr>
494 <td style="width: 50%;"><span class="TextBoxLabel" title="Using User Time Zone">[User TimeZone] Install Date:</span></td>
495 <td style="width: 50%;"><?php echo GMTimeChange("F j Y, g:i a",$Settings['start_date'],$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']); ?></td>
496 </tr><?php if($_SESSION['UserTimeZone']!=$Settings['DefaultTimeZone']||
497 $_SESSION['UserDST']!=$Settings['DefaultDST']) { ?><tr>
498 <td style="width: 50%;"><span class="TextBoxLabel" title="Using Board Time Zone">[Board TimeZone] Install Date:</span></td>
499 <td style="width: 50%;"><?php echo GMTimeChange("F j Y, g:i a",$Settings['start_date'],$Settings['DefaultTimeZone'],0,$Settings['DefaultDST']); ?></td>
500 </tr><?php } if($GroupInfo['ViewDBInfo']=="yes") {
501 ?><tr style="text-align: left;">
502 <td style="width: 50%;"><span class="TextBoxLabel">Forum Software Version:</span></td>
503 <td style="width: 50%;"><?php echo $VerInfo['iDB_Ver_Show']; ?>&nbsp;<a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=vercheck",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>" onclick="window.open(this.href);return false;"><img src="<?php echo $AdminCheckURL; ?>" alt="Version Check: Click to see more info." title="Version Check: Click to see more info." /></a></td>
504 </tr><tr>
505 <td style="width: 50%;"><span class="TextBoxLabel">Forum UUID:</span></td>
506 <td style="width: 50%;"><?php echo $Settings['BoardUUID']; ?></td>
507 </tr><tr id="clickhere" style="text-align: left;">
508 <td style="width: 50%;"><span class="TextBoxLabel">Version Checker:</span></td>
509 <td style="width: 50%;"><a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=settings".$AddChkURL,$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>#iverinfo" onclick="idbvercheck(); document.getElementById('clickhere').style.display = 'none';">Click Here</a></td>
510 </tr><?php if($OSType!=""&&isset($OSType)) {
511 ?><tr style="text-align: left;">
512 <td style="width: 50%;"><span class="TextBoxLabel">Server Operating System:</span></td>
513 <td style="width: 50%;"><?php echo $OSType; ?></td>
514 </tr><?php } } ?><tr style="text-align: left;">
515 <td style="width: 50%;"><label class="TextBoxLabel" for="BoardURL">Insert The Board URL:</label></td>
516 <td style="width: 50%;"><input type="text" class="TextBox" name="BoardURL" size="20" id="BoardURL" value="<?php echo $Settings['idburl']; ?>" /></td>
517 </tr><tr style="text-align: left;">
518 <td style="width: 50%;"><label class="TextBoxLabel" for="WebURL">Insert The WebSite URL:</label></td>
519 <td style="width: 50%;"><input type="text" class="TextBox" name="WebURL" size="20" id="WebURL" value="<?php echo $Settings['weburl']; ?>" /></td>
520 </tr><tr style="text-align: left;">
521 <td style="width: 50%;"><label class="TextBoxLabel" for="GuestGroup">Insert The Guest Group:</label></td>
522 <td style="width: 50%;"><select id="GuestGroup" name="GuestGroup" class="TextBox">
523 <option selected="selected" value="<?php echo $Settings['GuestGroup']; ?>">Old Value (<?php echo $Settings['GuestGroup']; ?>)</option>
524 <?php $gi = 0; $gnum = count($MGroups);
525 while ($gi < $gnum) { ?>
526 <option value="<?php echo $MGroups[$gi]; ?>"><?php echo $MGroups[$gi]; ?></option>
527 <?php ++$gi; } ?>
528 </select></td>
529 </tr><tr style="text-align: left;">
530 <td style="width: 50%;"><label class="TextBoxLabel" for="MemberGroup">Insert The Member Group:</label></td>
531 <td style="width: 50%;"><select id="MemberGroup" name="MemberGroup" class="TextBox">
532 <option selected="selected" value="<?php echo $Settings['MemberGroup']; ?>">Old Value (<?php echo $Settings['MemberGroup']; ?>)</option>
533 <?php $gi = 0; $gnum = count($MGroups);
534 while ($gi < $gnum) { ?>
535 <option value="<?php echo $MGroups[$gi]; ?>"><?php echo $MGroups[$gi]; ?></option>
536 <?php ++$gi; } ?>
537 </select></td>
538 </tr><tr style="text-align: left;">
539 <td style="width: 50%;"><label class="TextBoxLabel" for="ValidateGroup">Insert The Validate Group:</label></td>
540 <td style="width: 50%;"><select id="ValidateGroup" name="ValidateGroup" class="TextBox">
541 <option selected="selected" value="<?php echo $Settings['ValidateGroup']; ?>">Old Value (<?php echo $Settings['ValidateGroup']; ?>)</option>
542 <?php $gi = 0; $gnum = count($MGroups);
543 while ($gi < $gnum) { ?>
544 <option value="<?php echo $MGroups[$gi]; ?>"><?php echo $MGroups[$gi]; ?></option>
545 <?php ++$gi; } ?>
546 </select></td>
547 </tr><tr style="text-align: left;">
548 <td style="width: 50%;"><label class="TextBoxLabel" for="AdminValidate">Enable validate new members:</label></td>
549 <td style="width: 50%;"><select size="1" class="TextBox" name="AdminValidate" id="AdminValidate">
550 <option<?php if($Settings['AdminValidate']=="off") { echo " selected=\"selected\""; } ?> value="off">no</option>
551 <option<?php if($Settings['AdminValidate']=="on") { echo " selected=\"selected\""; } ?> value="on">yes</option>
552 </select></td>
553 </tr><tr style="text-align: left;">
554 <td style="width: 50%;"><label class="TextBoxLabel" for="max_posts">Max replies per page:</label></td>
555 <td style="width: 50%;"><select id="max_posts" name="max_posts" class="TextBox">
556 <option selected="selected" value="<?php echo $Settings['max_posts']; ?>">Old Value (<?php echo $Settings['max_posts']; ?>)</option>
557 <option value="5">5</option>
558 <option value="10">10</option>
559 <option value="15">15</option>
560 <option value="20">20</option>
561 <option value="25">25</option>
562 <option value="30">30</option>
563 <option value="30">35</option>
564 <option value="30">40</option>
565 </select></td>
566 </tr><tr style="text-align: left;">
567 <td style="width: 50%;"><label class="TextBoxLabel" for="max_topics">Max topics per page:</label></td>
568 <td style="width: 50%;"><select id="max_topics" name="max_topics" class="TextBox">
569 <option selected="selected" value="<?php echo $Settings['max_topics']; ?>">Old Value (<?php echo $Settings['max_topics']; ?>)</option>
570 <option value="5">5</option>
571 <option value="10">10</option>
572 <option value="15">15</option>
573 <option value="20">20</option>
574 <option value="25">25</option>
575 <option value="30">30</option>
576 <option value="30">35</option>
577 <option value="30">40</option>
578 </select></td>
579 </tr><tr style="text-align: left;">
580 <td style="width: 50%;"><label class="TextBoxLabel" for="max_memlist">Max members per page:</label></td>
581 <td style="width: 50%;"><select id="max_memlist" name="max_memlist" class="TextBox">
582 <option selected="selected" value="<?php echo $Settings['max_memlist']; ?>">Old Value (<?php echo $Settings['max_memlist']; ?>)</option>
583 <option value="5">5</option>
584 <option value="10">10</option>
585 <option value="15">15</option>
586 <option value="20">20</option>
587 <option value="25">25</option>
588 <option value="30">30</option>
589 <option value="30">35</option>
590 <option value="30">40</option>
591 </select></td>
592 </tr><tr style="text-align: left;">
593 <td style="width: 50%;"><label class="TextBoxLabel" for="max_pmlist">Max pms per page:</label></td>
594 <td style="width: 50%;"><select id="max_pmlist" name="max_pmlist" class="TextBox">
595 <option selected="selected" value="<?php echo $Settings['max_pmlist']; ?>">Old Value (<?php echo $Settings['max_pmlist']; ?>)</option>
596 <option value="5">5</option>
597 <option value="10">10</option>
598 <option value="15">15</option>
599 <option value="20">20</option>
600 <option value="25">25</option>
601 <option value="30">30</option>
602 <option value="30">35</option>
603 <option value="30">40</option>
604 </select></td>
605 </tr><tr style="text-align: left;">
606 <td style="width: 50%;"><label class="TextBoxLabel" for="hot_topic_num">Number of replies for hot topic:</label></td>
607 <td style="width: 50%;"><select id="hot_topic_num" name="hot_topic_num" class="TextBox">
608 <option selected="selected" value="<?php echo $Settings['hot_topic_num']; ?>">Old Value (<?php echo $Settings['hot_topic_num']; ?>)</option>
609 <option value="5">5</option>
610 <option value="10">10</option>
611 <option value="15">15</option>
612 <option value="20">20</option>
613 <option value="25">25</option>
614 <option value="30">30</option>
615 <option value="30">35</option>
616 <option value="30">40</option>
617 </select></td>
618 </tr><tr style="text-align: left;">
619 <td style="width: 50%;"><label class="TextBoxLabel" title="Can save some bandwidth." for="UseGzip">Enable HTTP Compression:</label></td>
620 <td style="width: 50%;"><select size="1" class="TextBox" name="UseGzip" id="UseGzip">
621 <option<?php if($Settings['use_gzip']=="off") { echo " selected=\"selected\""; } ?> value="off">No</option>
622 <option<?php if($Settings['use_gzip']=="on") { echo " selected=\"selected\""; } ?> value="on">Yes</option>
623 <option<?php if($Settings['use_gzip']=="gzip") { echo " selected=\"selected\""; } ?> value="gzip">Only GZip</option>
624 <option<?php if($Settings['use_gzip']=="deflate") { echo " selected=\"selected\""; } ?> value="deflate">Only Deflate</option>
625 </select></td>
626 </tr><tr style="text-align: left;">
627 <td style="width: 50%;"><label class="TextBoxLabel" for="HTMLType">HTML Type to use:</label></td>
628 <td style="width: 50%;"><select size="1" class="TextBox" name="HTMLType" id="HTMLType">
629 <option<?php if($Settings['html_type']=="xhtml10") { echo " selected=\"selected\""; } ?> value="xhtml10">XHTML 1.0</option>
630 <option<?php if($Settings['html_type']=="xhtml11") { echo " selected=\"selected\""; } ?> value="xhtml11">XHTML 1.1</option>
631 <option<?php if($Settings['html_type']=="html5") { echo " selected=\"selected\""; } ?> value="html5">HTML 5</option>
632 <option<?php if($Settings['html_type']=="xhtml5") { echo " selected=\"selected\""; } ?> value="xhtml5">XHTML 5</option>
633 </select></td>
634 </tr><tr style="text-align: left;">
635 <td style="width: 50%;"><label class="TextBoxLabel" for="HTMLLevel">HTML Level only for XHTML 1.0:</label></td>
636 <td style="width: 50%;"><select size="1" class="TextBox" name="HTMLLevel" id="HTMLLevel">
637 <option<?php if($Settings['html_level']=="Transitional") { echo " selected=\"selected\""; } ?> value="Transitional">Transitional</option>
638 <option<?php if($Settings['html_level']=="Strict") { echo " selected=\"selected\""; } ?> value="Strict">Strict</option>
639 </select></td>
640 </tr><tr style="text-align: left;">
641 <td style="width: 50%;"><label class="TextBoxLabel" for="OutPutType">Output file as:</label></td>
642 <td style="width: 50%;"><select size="1" class="TextBox" name="OutPutType" id="OutPutType">
643 <option<?php if($Settings['output_type']=="html") { echo " selected=\"selected\""; } ?> value="html">HTML</option>
644 <option<?php if($Settings['output_type']=="xhtml") { echo " selected=\"selected\""; } ?> value="xhtml">XHTML</option>
645 </select></td>
646 </tr><tr style="text-align: left;">
647 <td style="width: 50%;"><label class="TextBoxLabel" for="YourOffSet">Your TimeZone:</label></td>
648 <td style="width: 50%;"><select id="YourOffSet" name="YourOffSet" class="TextBox"><?php
649 $myofftime = $tsa['hour']; $mydstime = "off";
650 $plusi = 1; $minusi = 12;
651 $plusnum = 15; $minusnum = 0;
652 while ($minusi > $minusnum) {
653 if($myofftime==-$minusi) {
654 echo "<option selected=\"selected\" value=\"-".$minusi."\">GMT - ".$minusi.":00 hours</option>\n"; }
655 if($myofftime!=-$minusi) {
656 echo "<option value=\"-".$minusi."\">GMT - ".$minusi.":00 hours</option>\n"; }
657 --$minusi; }
658 if($myofftime==0) { ?>
659 <option selected="selected" value="0">GMT +/- 0:00 hours</option>
660 <?php } if($myofftime!=0) { ?>
661 <option value="0">GMT +/- 0:00 hours</option>
662 <?php }
663 while ($plusi < $plusnum) {
664 if($myofftime==$plusi) {
665 echo "<option selected=\"selected\" value=\"".$plusi."\">GMT + ".$plusi.":00 hours</option>\n"; }
666 if($myofftime!=$plusi) {
667 echo "<option value=\"".$plusi."\">GMT + ".$plusi.":00 hours</option>\n"; }
668 ++$plusi; }
669 ?></select></td>
670 </tr><tr style="text-align: left;">
671 <td style="width: 50%;"><label class="TextBoxLabel" for="MinOffSet">Minute OffSet:</label></td>
672 <td style="width: 50%;"><select id="MinOffSet" name="MinOffSet" class="TextBox"><?php
673 $mini = 0; $minnum = 60; $mymin = $tsa['minute'];
674 while ($mini < $minnum) {
675 if(strlen($mini)==2) { $showmin = $mini; }
676 if(strlen($mini)==1) { $showmin = "0".$mini; }
677 if($mini==$mymin) {
678 echo "\n<option selected=\"selected\" value=\"".$showmin."\">0:".$showmin." minutes</option>\n"; }
679 if($mini!=$mymin) {
680 echo "<option value=\"".$showmin."\">0:".$showmin." minutes</option>\n"; }
681 ++$mini; }
682 ?></select></td>
683 </tr><tr style="text-align: left;">
684 <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>
685 <td style="width: 50%;"><select id="DST" name="DST" class="TextBox"><?php echo "\n" ?>
686 <option<?php if($Settings['DefaultDST']=="off") { echo " selected=\"selected\""; } ?> value="off">off</option>
687 <option<?php if($Settings['DefaultDST']=="on") { echo " selected=\"selected\""; } ?> value="on">on</option>
688 </select></td>
689 </tr><tr style="text-align: left;">
690 <td style="width: 50%;"><label class="TextBoxLabel" for="DefaultTheme">Default Theme:</label></td>
691 <td style="width: 50%;"><select id="DefaultTheme" name="DefaultTheme" class="TextBox"><?php
692 if($Settings['SQLThemes']=="off") {
693 $skindir = dirname(realpath("settings.php"))."/".$SettDir['themes'];
694 if ($handle = opendir($skindir)) { $dirnum = null;
695 while (false !== ($file = readdir($handle))) {
696 if ($dirnum==null) { $dirnum = 0; }
697 if (file_exists($skindir.$file."/info.php")) {
698 if ($file != "." && $file != "..") {
699 include($skindir.$file."/info.php");
700 if($Settings['DefaultTheme']==$file) {
701 $themelist[$dirnum] = "<option selected=\"selected\" value=\"".$file."\">".$ThemeInfo['ThemeName']."</option>"; }
702 if($Settings['DefaultTheme']!=$file) {
703 $themelist[$dirnum] = "<option value=\"".$file."\">".$ThemeInfo['ThemeName']."</option>"; }
704 ++$dirnum; } } }
705 closedir($handle); asort($themelist);
706 $themenum=count($themelist); $themei=0;
707 while ($themei < $themenum) {
708 echo $themelist[$themei]."\n";
709 ++$themei; } } }
710 if($Settings['SQLThemes']=="on") {
711 $sknquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."themes\" ORDER BY \"id\" ASC, \"Name\" ASC", array(null));
712 $sknresult=sql_query($sknquery,$SQLStat);
713 $sknum=sql_num_rows($sknresult);
714 $skni=0;
715 while ($skni < $sknum) {
716 $ThemeInfo['Name'] = sql_result($sknresult,$skni,"Name");
717 $ThemeInfo['ThemeName'] = sql_result($sknresult,$skni,"ThemeName");
718 if($Settings['DefaultTheme']==$ThemeInfo['Name']) {
719 echo "<option selected=\"selected\" value=\"".$ThemeInfo['Name']."\">".$ThemeInfo['ThemeName']."</option>\n"; }
720 if($Settings['DefaultTheme']!=$ThemeInfo['Name']) {
721 echo "<option value=\"".$ThemeInfo['Name']."\">".$ThemeInfo['ThemeName']."</option>\n"; }
722 ++$skni; }
723 } ?></select></td>
724 </tr><tr style="text-align: left;">
725 <td style="width: 50%;"><label class="TextBoxLabel" for="enable_https">Enable HTTPS:</label></td>
726 <td style="width: 50%;"><select size="1" class="TextBox" name="enable_https" id="enable_https">
727 <option<?php if($Settings['enable_https']=="on") { echo " selected=\"selected\""; } ?> value="on">on</option>
728 <option<?php if($Settings['enable_https']=="off") { echo " selected=\"selected\""; } ?> value="off">off</option>
729 </select></td>
730 </tr><tr style="text-align: left;">
731 <td style="width: 50%;"><label class="TextBoxLabel" for="enable_rss">Enable RSS:</label></td>
732 <td style="width: 50%;"><select size="1" class="TextBox" name="enable_rss" id="enable_rss">
733 <option<?php if($Settings['enable_rss']=="on") { echo " selected=\"selected\""; } ?> value="on">on</option>
734 <option<?php if($Settings['enable_rss']=="off") { echo " selected=\"selected\""; } ?> value="off">off</option>
735 </select></td>
736 </tr><tr style="text-align: left;">
737 <td style="width: 50%;"><label class="TextBoxLabel" for="enable_search">Enable search:</label></td>
738 <td style="width: 50%;"><select size="1" class="TextBox" name="enable_search" id="enable_search">
739 <option<?php if($Settings['enable_search']=="on") { echo " selected=\"selected\""; } ?> value="on">on</option>
740 <option<?php if($Settings['enable_search']=="off") { echo " selected=\"selected\""; } ?> value="off">off</option>
741 </select></td>
742 </tr><tr style="text-align: left;">
743 <td style="width: 50%;"><label class="TextBoxLabel" for="TestReferer">Test Referering URL:</label></td>
744 <td style="width: 50%;"><select id="TestReferer" name="TestReferer" class="TextBox">
745 <option<?php if($Settings['TestReferer']=="on") { echo " selected=\"selected\""; } ?> value="on">on</option>
746 <option<?php if($Settings['TestReferer']=="off") { echo " selected=\"selected\""; } ?> value="off">off</option>
747 </select></td>
748 </tr></table>
749 <table style="text-align: left;">
750 <tr style="text-align: left;">
751 <td style="width: 100%;">
752 <?php if($GroupInfo['ViewDBInfo']=="yes") { ?>
753 <span style="display: none;" id="iverinfo"><a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=settings",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>#" onclick="idbvercheck();">Version Checker: Click Here</a><br /><br /></span>
754 <?php } ?>
755 <input type="hidden" name="act" value="settings" style="display: none;" />
756 <input type="hidden" name="update" value="now" style="display: none;" />
757 <input type="submit" class="Button" value="Apply" name="Apply_Changes" />
758 <input type="reset" value="Reset Form" class="Button" name="Reset_Form" />
759 </td></tr></table>
760 </form>
761 </td>
762 </tr>
763 <tr class="TableMenuRow4">
764 <td class="TableMenuColumn4">&nbsp;</td>
765 </tr>
766 </table>
767 </div>
768 <?php } if($_POST['act']=="settings"&&$_POST['update']=="now"&&$_GET['act']=="settings"&&
769 $_SESSION['UserGroup']!=$Settings['GuestGroup']&&$GroupInfo['HasAdminCP']=="yes") {
770 $_POST = array_map("rsq", $_POST);
771 if(!isset($Settings['BoardUUID'])||$Settings['BoardUUID']===null) {
772 $Settings['BoardUUID'] = rand_uuid("rand"); }
773 $Settings['board_name'] = htmlspecialchars($Settings['board_name'], ENT_QUOTES, $Settings['charset']);
774 $Settings['board_name'] = fixbamps($Settings['board_name']);
775 $Settings['board_name'] = remove_spaces($Settings['board_name']);
776 $Settings['board_name'] = str_replace("\&#039;", "&#039;", $Settings['board_name']);
777 $SettInfo['board_name'] = htmlspecialchars($SettInfo['board_name'], ENT_QUOTES, $Settings['charset']);
778 $SettInfo['board_name'] = fixbamps($SettInfo['board_name']);
779 $SettInfo['board_name'] = remove_spaces($SettInfo['board_name']);
780 $SettInfo['board_name'] = str_replace("\&#039;", "&#039;", $SettInfo['board_name']);
781 $SettInfo['Author'] = htmlspecialchars($SettInfo['Author'], ENT_QUOTES, $Settings['charset']);
782 $SettInfo['Author'] = fixbamps($SettInfo['Author']);
783 $SettInfo['Author'] = remove_spaces($SettInfo['Author']);
784 $SettInfo['Author'] = str_replace("\&#039;", "&#039;", $SettInfo['Author']);
785 $SettInfo['Keywords'] = htmlspecialchars($SettInfo['Keywords'], ENT_QUOTES, $Settings['charset']);
786 $SettInfo['Keywords'] = fixbamps($SettInfo['Keywords']);
787 $SettInfo['Keywords'] = remove_spaces($SettInfo['Keywords']);
788 $SettInfo['Keywords'] = str_replace("\&#039;", "&#039;", $SettInfo['Keywords']);
789 $SettInfo['Description'] = htmlspecialchars($SettInfo['Description'], ENT_QUOTES, $Settings['charset']);
790 $SettInfo['Description'] = fixbamps($SettInfo['Description']);
791 $SettInfo['Description'] = remove_spaces($SettInfo['Description']);
792 $SettInfo['Description'] = str_replace("\&#039;", "&#039;", $SettInfo['Description']);
793 $_POST['BoardURL'] = htmlentities($_POST['BoardURL'], ENT_QUOTES, $Settings['charset']);
794 $_POST['BoardURL'] = remove_spaces($_POST['BoardURL']);
795 $_POST['WebURL'] = htmlentities($_POST['WebURL'], ENT_QUOTES, $Settings['charset']);
796 $_POST['WebURL'] = remove_spaces($_POST['WebURL']);
797 if($_POST['HTMLType']=="xhtml11") { $_POST['HTMLLevel'] = "Strict"; }
798 if($_POST['HTMLType']=="html5") { $_POST['OutPutType'] = "html"; }
799 if($_POST['HTMLType']=="xhtml5") { $_POST['OutPutType'] = "xhtml"; }
800 $BoardSettings=$pretext2[0]."\n".
801 "\$Settings['sqlhost'] = ".null_string($Settings['sqlhost']).";\n".
802 "\$Settings['sqldb'] = ".null_string($Settings['sqldb']).";\n".
803 "\$Settings['sqltable'] = ".null_string($Settings['sqltable']).";\n".
804 "\$Settings['sqluser'] = ".null_string($Settings['sqluser']).";\n".
805 "\$Settings['sqlpass'] = ".null_string($Settings['sqlpass']).";\n".
806 "\$Settings['sqltype'] = ".null_string($Settings['sqltype']).";\n".
807 "\$Settings['board_name'] = ".null_string($Settings['board_name']).";\n".
808 "\$Settings['idbdir'] = ".null_string($Settings['idbdir']).";\n".
809 "\$Settings['idburl'] = ".null_string($_POST['BoardURL']).";\n".
810 "\$Settings['enable_https'] = ".null_string($_POST['enable_https']).";\n".
811 "\$Settings['weburl'] = ".null_string($_POST['WebURL']).";\n".
812 "\$Settings['SQLThemes'] = ".null_string($Settings['SQLThemes']).";\n".
813 "\$Settings['use_gzip'] = ".null_string($_POST['UseGzip']).";\n".
814 "\$Settings['html_type'] = ".null_string($_POST['HTMLType']).";\n".
815 "\$Settings['html_level'] = ".null_string($_POST['HTMLLevel']).";\n".
816 "\$Settings['output_type'] = ".null_string($_POST['OutPutType']).";\n".
817 "\$Settings['GuestGroup'] = ".null_string($_POST['GuestGroup']).";\n".
818 "\$Settings['MemberGroup'] = ".null_string($_POST['MemberGroup']).";\n".
819 "\$Settings['ValidateGroup'] = ".null_string($_POST['ValidateGroup']).";\n".
820 "\$Settings['AdminValidate'] = ".null_string($_POST['AdminValidate']).";\n".
821 "\$Settings['TestReferer'] = ".null_string($_POST['TestReferer']).";\n".
822 "\$Settings['DefaultTheme'] = ".null_string($_POST['DefaultTheme']).";\n".
823 "\$Settings['DefaultTimeZone'] = ".null_string($_POST['YourOffSet'].":".$_POST['MinOffSet']).";\n".
824 "\$Settings['DefaultDST'] = ".null_string($_POST['DST']).";\n".
825 "\$Settings['start_date'] = ".null_string($Settings['start_date']).";\n".
826 "\$Settings['use_hashtype'] = ".null_string($Settings['use_hashtype']).";\n".
827 "\$Settings['charset'] = ".null_string($Settings['charset']).";\n".
828 "\$Settings['sql_collate'] = ".null_string($Settings['sql_collate']).";\n".
829 "\$Settings['sql_charset'] = ".null_string($Settings['sql_charset']).";\n".
830 "\$Settings['add_power_by'] = ".null_string($Settings['add_power_by']).";\n".
831 "\$Settings['send_pagesize'] = ".null_string($Settings['send_pagesize']).";\n".
832 "\$Settings['max_posts'] = ".null_string($_POST['max_posts']).";\n".
833 "\$Settings['max_topics'] = ".null_string($_POST['max_topics']).";\n".
834 "\$Settings['max_memlist'] = ".null_string($_POST['max_memlist']).";\n".
835 "\$Settings['max_pmlist'] = ".null_string($_POST['max_pmlist']).";\n".
836 "\$Settings['hot_topic_num'] = ".null_string($_POST['hot_topic_num']).";\n".
837 "\$Settings['qstr'] = ".null_string($Settings['qstr']).";\n".
838 "\$Settings['qsep'] = ".null_string($Settings['qsep']).";\n".
839 "\$Settings['file_ext'] = ".null_string($Settings['file_ext']).";\n".
840 "\$Settings['rss_ext'] = ".null_string($Settings['rss_ext']).";\n".
841 "\$Settings['js_ext'] = ".null_string($Settings['js_ext']).";\n".
842 "\$Settings['showverinfo'] = ".null_string($Settings['showverinfo']).";\n".
843 "\$Settings['vercheck'] = ".null_string($Settings['vercheck']).";\n".
844 "\$Settings['enable_rss'] = ".null_string($_POST['enable_rss']).";\n".
845 "\$Settings['enable_search'] = ".null_string($_POST['enable_search']).";\n".
846 "\$Settings['sessionid_in_urls'] = ".null_string($Settings['sessionid_in_urls']).";\n".
847 "\$Settings['fixpathinfo'] = ".null_string($OldSettings['fixpathinfo']).";\n".
848 "\$Settings['fixbasedir'] = ".null_string($OldSettings['fixbasedir']).";\n".
849 "\$Settings['fixcookiedir'] = ".null_string($OldSettings['fixcookiedir']).";\n".
850 "\$Settings['fixredirectdir'] = ".null_string($OldSettings['fixredirectdir']).";\n".
851 "\$Settings['enable_pathinfo'] = ".null_string($Settings['enable_pathinfo']).";\n".
852 "\$Settings['rssurl'] = ".null_string($Settings['rssurl']).";\n".
853 "\$Settings['board_offline'] = ".null_string($Settings['board_offline']).";\n".
854 "\$Settings['log_http_request'] = ".null_string($Settings['log_http_request']).";\n".
855 "\$Settings['BoardUUID'] = ".null_string($Settings['BoardUUID']).";\n".
856 "\$Settings['KarmaBoostDays'] = ".null_string($Settings['KarmaBoostDays']).";\n".
857 "\$Settings['KBoostPercent'] = ".null_string($Settings['KBoostPercent']).";\n".$pretext2[1]."\n".
858 "\$SettInfo['board_name'] = ".null_string($SettInfo['board_name']).";\n".
859 "\$SettInfo['Author'] = ".null_string($SettInfo['Author']).";\n".
860 "\$SettInfo['Keywords'] = ".null_string($SettInfo['Keywords']).";\n".
861 "\$SettInfo['Description'] = ".null_string($SettInfo['Description']).";\n".$pretext2[2]."\n".
862 "\$SettDir['maindir'] = ".null_string($SettDir['maindir']).";\n".
863 "\$SettDir['inc'] = ".null_string($SettDir['inc']).";\n".
864 "\$SettDir['logs'] = ".null_string($SettDir['logs']).";\n".
865 "\$SettDir['archive'] = ".null_string($SettDir['archive']).";\n".
866 "\$SettDir['misc'] = ".null_string($SettDir['misc']).";\n".
867 "\$SettDir['sql'] = ".null_string($SettDir['sql']).";\n".
868 "\$SettDir['admin'] = ".null_string($SettDir['admin']).";\n".
869 "\$SettDir['sqldumper'] = ".null_string($SettDir['sqldumper']).";\n".
870 "\$SettDir['mod'] = ".null_string($SettDir['mod']).";\n".
871 "\$SettDir['themes'] = ".null_string($SettDir['themes']).";\n".$pretext2[3]."\n?>";
872 $BoardSettingsBak = $pretext.$settcheck.$BoardSettings;
873 $BoardSettings = $pretext.$settcheck.$BoardSettings;
874 $fp = fopen("settings.php","w+");
875 fwrite($fp, $BoardSettings);
876 fclose($fp);
877 // cp("settings.php","settingsbak.php");
878 $fp = fopen("settingsbak.php","w+");
879 fwrite($fp, $BoardSettingsBak);
880 fclose($fp); } if($_GET['act']=="sql"&&$_POST['update']!="now"&&$GroupInfo['ViewDBInfo']=="yes") {
881 require('settings.php'); $admincptitle = " ".$ThemeSet['TitleDivider']." Database Manager";
883 <div class="TableMenuBorder">
884 <?php if($ThemeSet['TableStyle']=="div") { ?>
885 <div class="TableMenuRow1">
886 <?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=sql",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">iDB Database Manager</a></div>
887 <?php } ?>
888 <table class="TableMenu" style="width: 100%;">
889 <?php if($ThemeSet['TableStyle']=="table") { ?>
890 <tr class="TableMenuRow1">
891 <td class="TableMenuColumn1"><span style="float: left;">
892 <?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=sql",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">iDB Database Manager</a>
893 </span><span style="float: right;">&nbsp;</span></td>
894 </tr><?php } ?>
895 <tr class="TableMenuRow2">
896 <th class="TableMenuColumn2" style="width: 100%; text-align: left;">
897 <span style="float: left;">&nbsp;Editing SQL Settings for iDB: </span>
898 <span style="float: right;">&nbsp;</span>
899 </th>
900 </tr>
901 <tr class="TableMenuRow3">
902 <td class="TableMenuColumn3">
903 <form style="display: inline;" method="post" id="acptool" action="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=sql",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">
904 <table style="text-align: left;">
905 <tr style="text-align: left;">
906 <td style="width: 50%;"><span class="TextBoxLabel">Database Server:</span></td>
907 <td style="width: 50%;"><?php echo $DBType['Server']; ?></td>
908 </tr><?php if($Settings['sqltype']=="mysql"||
909 $Settings['sqltype']=="mysqli"||
910 $Settings['sqltype']=="pgsql") {
911 ?><tr style="text-align: left;">
912 <td style="width: 50%;"><span class="TextBoxLabel">Database Client:</span></td>
913 <td style="width: 50%;"><?php echo $DBType['Client']; ?></td>
914 </tr><?php } if($Settings['sqltype']=="sqlite") {
915 ?><tr style="text-align: left;">
916 <td style="width: 50%;"><span class="TextBoxLabel">Database File Size:</span></td>
917 <td style="width: 50%;"><?php echo sprintf("%u", filesize($Settings['sqldb']))." bytes"; ?></td>
918 </tr><?php } ?><tr style="text-align: left;">
919 <td style="width: 50%;"><label class="TextBoxLabel" for="DatabaseUserName">Insert Database User Name:</label></td>
920 <td style="width: 50%;"><input type="text" name="DatabaseUserName" class="TextBox" id="DatabaseUserName" size="20" value="<?php echo $Settings['sqluser']; ?>" /></td>
921 </tr><tr style="text-align: left;">
922 <td style="width: 50%;"><label class="TextBoxLabel" for="DatabasePassword">Insert Database Password:</label></td>
923 <td style="width: 50%;"><input type="password" name="DatabasePassword" class="TextBox" id="DatabasePassword" size="20" value="<?php echo $Settings['sqlpass']; ?>" /></td>
924 </tr><tr style="text-align: left;">
925 <td style="width: 50%;"><label class="TextBoxLabel" for="DatabaseName">Insert Database Name:</label></td>
926 <td style="width: 50%;"><input type="text" name="DatabaseName" class="TextBox" id="DatabaseName" size="20" value="<?php echo $Settings['sqldb']; ?>" /></td>
927 </tr><tr style="text-align: left;">
928 <td style="width: 50%;"><label class="TextBoxLabel" for="DatabaseHost">Insert Database Host:</label></td>
929 <td style="width: 50%;"><input type="text" name="DatabaseHost" class="TextBox" id="DatabaseHost" size="20" value="<?php echo $Settings['sqlhost']; ?>" /></td>
930 </tr><tr style="text-align: left;">
931 <td style="width: 50%;"><label class="TextBoxLabel" for="tableprefix">Insert Table Prefix:<br /></label></td>
932 <td style="width: 50%;"><input type="text" name="tableprefix" class="TextBox" id="tableprefix" size="20" value="<?php echo $Settings['sqltable']; ?>" /></td>
933 </tr></table>
934 <table style="text-align: left;">
935 <tr style="text-align: left;">
936 <td style="width: 100%;">
937 <input type="hidden" name="act" value="sql" style="display: none;" />
938 <input type="hidden" name="update" value="now" style="display: none;" />
939 <input type="submit" class="Button" value="Apply" name="Apply_Changes" />
940 <input type="reset" value="Reset Form" class="Button" name="Reset_Form" />
941 </td></tr></table>
942 </form>
943 </td>
944 </tr>
945 <tr class="TableMenuRow4">
946 <td class="TableMenuColumn4">&nbsp;</td>
947 </tr>
948 </table>
949 </div>
950 <?php } if($_POST['act']=="sql"&&$_POST['update']=="now"&&$_GET['act']=="sql"&&
951 $_SESSION['UserGroup']!=$Settings['GuestGroup']&&$GroupInfo['HasAdminCP']=="yes"&&
952 $GroupInfo['ViewDBInfo']=="yes") {
953 $_POST = array_map("rsq", $_POST);
954 if(!isset($Settings['BoardUUID'])||$Settings['BoardUUID']===null) {
955 $Settings['BoardUUID'] = rand_uuid("rand"); }
956 $Settings['board_name'] = htmlspecialchars($Settings['board_name'], ENT_QUOTES, $Settings['charset']);
957 $Settings['board_name'] = fixbamps($Settings['board_name']);
958 $Settings['board_name'] = remove_spaces($Settings['board_name']);
959 $Settings['board_name'] = str_replace("\&#039;", "&#039;", $Settings['board_name']);
960 $SettInfo['board_name'] = htmlspecialchars($SettInfo['board_name'], ENT_QUOTES, $Settings['charset']);
961 $SettInfo['board_name'] = fixbamps($SettInfo['board_name']);
962 $SettInfo['board_name'] = remove_spaces($SettInfo['board_name']);
963 $SettInfo['board_name'] = str_replace("\&#039;", "&#039;", $SettInfo['board_name']);
964 $SettInfo['Author'] = htmlspecialchars($SettInfo['Author'], ENT_QUOTES, $Settings['charset']);
965 $SettInfo['Author'] = fixbamps($SettInfo['Author']);
966 $SettInfo['Author'] = remove_spaces($SettInfo['Author']);
967 $SettInfo['Author'] = str_replace("\&#039;", "&#039;", $SettInfo['Author']);
968 $SettInfo['Keywords'] = htmlspecialchars($SettInfo['Keywords'], ENT_QUOTES, $Settings['charset']);
969 $SettInfo['Keywords'] = fixbamps($SettInfo['Keywords']);
970 $SettInfo['Keywords'] = remove_spaces($SettInfo['Keywords']);
971 $SettInfo['Keywords'] = str_replace("\&#039;", "&#039;", $SettInfo['Keywords']);
972 $SettInfo['Description'] = htmlspecialchars($SettInfo['Description'], ENT_QUOTES, $Settings['charset']);
973 $SettInfo['Description'] = fixbamps($SettInfo['Description']);
974 $SettInfo['Description'] = remove_spaces($SettInfo['Description']);
975 $SettInfo['Description'] = str_replace("\&#039;", "&#039;", $SettInfo['Description']);
976 $BoardSettings=$pretext2[0]."\n".
977 "\$Settings['sqlhost'] = ".null_string($_POST['DatabaseHost']).";\n".
978 "\$Settings['sqldb'] = ".null_string($_POST['DatabaseName']).";\n".
979 "\$Settings['sqltable'] = ".null_string($_POST['tableprefix']).";\n".
980 "\$Settings['sqluser'] = ".null_string($_POST['DatabaseUserName']).";\n".
981 "\$Settings['sqlpass'] = ".null_string($_POST['DatabasePassword']).";\n".
982 "\$Settings['sqltype'] = ".null_string($Settings['sqltype']).";\n".
983 "\$Settings['board_name'] = ".null_string($Settings['board_name']).";\n".
984 "\$Settings['idbdir'] = ".null_string($Settings['idbdir']).";\n".
985 "\$Settings['idburl'] = ".null_string($Settings['idburl']).";\n".
986 "\$Settings['enable_https'] = ".null_string($Settings['enable_https']).";\n".
987 "\$Settings['weburl'] = ".null_string($Settings['weburl']).";\n".
988 "\$Settings['SQLThemes'] = ".null_string($Settings['SQLThemes']).";\n".
989 "\$Settings['use_gzip'] = ".null_string($Settings['use_gzip']).";\n".
990 "\$Settings['html_type'] = ".null_string($Settings['html_type']).";\n".
991 "\$Settings['html_level'] = ".null_string($Settings['html_level']).";\n".
992 "\$Settings['output_type'] = ".null_string($Settings['output_type']).";\n".
993 "\$Settings['GuestGroup'] = ".null_string($Settings['GuestGroup']).";\n".
994 "\$Settings['MemberGroup'] = ".null_string($Settings['MemberGroup']).";\n".
995 "\$Settings['ValidateGroup'] = ".null_string($Settings['ValidateGroup']).";\n".
996 "\$Settings['AdminValidate'] = ".null_string($Settings['AdminValidate']).";\n".
997 "\$Settings['TestReferer'] = ".null_string($Settings['TestReferer']).";\n".
998 "\$Settings['DefaultTheme'] = ".null_string($Settings['DefaultTheme']).";\n".
999 "\$Settings['DefaultTimeZone'] = ".null_string($Settings['DefaultTimeZone']).";\n".
1000 "\$Settings['DefaultDST'] = ".null_string($Settings['DefaultDST']).";\n".
1001 "\$Settings['start_date'] = ".null_string($Settings['start_date']).";\n".
1002 "\$Settings['use_hashtype'] = ".null_string($Settings['use_hashtype']).";\n".
1003 "\$Settings['charset'] = ".null_string($Settings['charset']).";\n".
1004 "\$Settings['sql_collate'] = ".null_string($Settings['sql_collate']).";\n".
1005 "\$Settings['sql_charset'] = ".null_string($Settings['sql_charset']).";\n".
1006 "\$Settings['add_power_by'] = ".null_string($Settings['add_power_by']).";\n".
1007 "\$Settings['send_pagesize'] = ".null_string($Settings['send_pagesize']).";\n".
1008 "\$Settings['max_posts'] = ".null_string($Settings['max_posts']).";\n".
1009 "\$Settings['max_topics'] = ".null_string($Settings['max_topics']).";\n".
1010 "\$Settings['max_memlist'] = ".null_string($Settings['max_memlist']).";\n".
1011 "\$Settings['max_pmlist'] = ".null_string($Settings['max_pmlist']).";\n".
1012 "\$Settings['hot_topic_num'] = ".null_string($Settings['hot_topic_num']).";\n".
1013 "\$Settings['qstr'] = ".null_string($Settings['qstr']).";\n".
1014 "\$Settings['qsep'] = ".null_string($Settings['qsep']).";\n".
1015 "\$Settings['file_ext'] = ".null_string($Settings['file_ext']).";\n".
1016 "\$Settings['rss_ext'] = ".null_string($Settings['rss_ext']).";\n".
1017 "\$Settings['js_ext'] = ".null_string($Settings['js_ext']).";\n".
1018 "\$Settings['showverinfo'] = ".null_string($Settings['showverinfo']).";\n".
1019 "\$Settings['vercheck'] = ".null_string($Settings['vercheck']).";\n".
1020 "\$Settings['enable_rss'] = ".null_string($Settings['enable_rss']).";\n".
1021 "\$Settings['enable_search'] = ".null_string($Settings['enable_search']).";\n".
1022 "\$Settings['sessionid_in_urls'] = ".null_string($Settings['sessionid_in_urls']).";\n".
1023 "\$Settings['fixpathinfo'] = ".null_string($OldSettings['fixpathinfo']).";\n".
1024 "\$Settings['fixbasedir'] = ".null_string($OldSettings['fixbasedir']).";\n".
1025 "\$Settings['fixcookiedir'] = ".null_string($OldSettings['fixcookiedir']).";\n".
1026 "\$Settings['fixredirectdir'] = ".null_string($OldSettings['fixredirectdir']).";\n".
1027 "\$Settings['enable_pathinfo'] = ".null_string($Settings['enable_pathinfo']).";\n".
1028 "\$Settings['rssurl'] = ".null_string($Settings['rssurl']).";\n".
1029 "\$Settings['board_offline'] = ".null_string($Settings['board_offline']).";\n".
1030 "\$Settings['log_http_request'] = ".null_string($Settings['log_http_request']).";\n".
1031 "\$Settings['BoardUUID'] = ".null_string($Settings['BoardUUID']).";\n".
1032 "\$Settings['KarmaBoostDays'] = ".null_string($Settings['KarmaBoostDays']).";\n".
1033 "\$Settings['KBoostPercent'] = ".null_string($Settings['KBoostPercent']).";\n".$pretext2[1]."\n".
1034 "\$SettInfo['board_name'] = ".null_string($SettInfo['board_name']).";\n".
1035 "\$SettInfo['Author'] = ".null_string($SettInfo['Author']).";\n".
1036 "\$SettInfo['Keywords'] = ".null_string($SettInfo['Keywords']).";\n".
1037 "\$SettInfo['Description'] = ".null_string($SettInfo['Description']).";\n".$pretext2[2]."\n".
1038 "\$SettDir['maindir'] = ".null_string($SettDir['maindir']).";\n".
1039 "\$SettDir['inc'] = ".null_string($SettDir['inc']).";\n".
1040 "\$SettDir['logs'] = ".null_string($SettDir['logs']).";\n".
1041 "\$SettDir['archive'] = ".null_string($SettDir['archive']).";\n".
1042 "\$SettDir['misc'] = ".null_string($SettDir['misc']).";\n".
1043 "\$SettDir['sql'] = ".null_string($SettDir['sql']).";\n".
1044 "\$SettDir['admin'] = ".null_string($SettDir['admin']).";\n".
1045 "\$SettDir['sqldumper'] = ".null_string($SettDir['sqldumper']).";\n".
1046 "\$SettDir['mod'] = ".null_string($SettDir['mod']).";\n".
1047 "\$SettDir['themes'] = ".null_string($SettDir['themes']).";\n".$pretext2[3]."\n?>";
1048 $BoardSettingsBak = $pretext.$settcheck.$BoardSettings;
1049 $BoardSettings = $pretext.$settcheck.$BoardSettings;
1050 $fp = fopen("settings.php","w+");
1051 fwrite($fp, $BoardSettings);
1052 fclose($fp);
1053 // cp("settings.php","settingsbak.php");
1054 $fp = fopen("settingsbak.php","w+");
1055 fwrite($fp, $BoardSettingsBak);
1056 fclose($fp); } if($_GET['act']=="info"&&$_POST['update']!="now") {
1057 require('settings.php'); $admincptitle = " ".$ThemeSet['TitleDivider']." Board Info Manager";
1059 <div class="TableMenuBorder">
1060 <?php if($ThemeSet['TableStyle']=="div") { ?>
1061 <div class="TableMenuRow1">
1062 <?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>
1063 <?php } ?>
1064 <table class="TableMenu" style="width: 100%;">
1065 <?php if($ThemeSet['TableStyle']=="table") { ?>
1066 <tr class="TableMenuRow1">
1067 <td class="TableMenuColumn1"><span style="float: left;">
1068 <?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>
1069 </span><span style="float: right;">&nbsp;</span></td>
1070 </tr><?php } ?>
1071 <tr class="TableMenuRow2">
1072 <th class="TableMenuColumn2" style="width: 100%; text-align: left;">
1073 <span style="float: left;">&nbsp;Editing Board Info: </span>
1074 <span style="float: right;">&nbsp;</span>
1075 </th>
1076 </tr>
1077 <tr class="TableMenuRow3">
1078 <td class="TableMenuColumn3">
1079 <form style="display: inline;" method="post" id="acptool" action="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=info",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">
1080 <table style="text-align: left;">
1081 <tr style="text-align: left;">
1082 <td style="width: 50%;"><label class="TextBoxLabel" for="board_name">Insert board name:</label></td>
1083 <td style="width: 50%;"><input type="text" name="board_name" class="TextBox" id="board_name" size="20" value="<?php echo $SettInfo['board_name']; ?>" /></td>
1084 </tr><tr style="text-align: left;">
1085 <td style="width: 50%;"><label class="TextBoxLabel" for="Author">Insert boards admin name:</label></td>
1086 <td style="width: 50%;"><input type="text" name="Author" class="TextBox" id="Author" size="20" value="<?php echo $SettInfo['Author']; ?>" /></td>
1087 </tr><tr style="text-align: left;">
1088 <td style="width: 50%;"><label class="TextBoxLabel" for="Keywords">Insert keywords about this board:</label></td>
1089 <td style="width: 50%;"><input type="text" name="Keywords" class="TextBox" id="Keywords" size="20" value="<?php echo $SettInfo['Keywords']; ?>" /></td>
1090 </tr><tr style="text-align: left;">
1091 <td style="width: 50%;"><label class="TextBoxLabel" for="Description">Insert description about this board:<br /></label></td>
1092 <td style="width: 50%;"><input type="text" name="Description" class="TextBox" id="Description" size="20" value="<?php echo $SettInfo['Description']; ?>" /></td>
1093 </tr></table>
1094 <table style="text-align: left;">
1095 <tr style="text-align: left;">
1096 <td style="width: 100%;">
1097 <input type="hidden" name="act" value="info" style="display: none;" />
1098 <input type="hidden" name="update" value="now" style="display: none;" />
1099 <input type="submit" class="Button" value="Apply" name="Apply_Changes" />
1100 <input type="reset" value="Reset Form" class="Button" name="Reset_Form" />
1101 </td></tr></table>
1102 </form>
1103 </td>
1104 </tr>
1105 <tr class="TableMenuRow4">
1106 <td class="TableMenuColumn4">&nbsp;</td>
1107 </tr>
1108 </table>
1109 </div>
1110 <?php } if($_POST['act']=="info"&&$_POST['update']=="now"&&$_GET['act']=="info"&&
1111 $_SESSION['UserGroup']!=$Settings['GuestGroup']&&$GroupInfo['HasAdminCP']=="yes") {
1112 $_POST = array_map("rsq", $_POST);
1113 if(!isset($Settings['BoardUUID'])||$Settings['BoardUUID']===null) {
1114 $Settings['BoardUUID'] = rand_uuid("rand"); }
1115 $_POST['board_name'] = htmlspecialchars($_POST['board_name'], ENT_QUOTES, $Settings['charset']);
1116 $_POST['board_name'] = fixbamps($_POST['board_name']);
1117 $_POST['board_name'] = remove_spaces($_POST['board_name']);
1118 $_POST['board_name'] = str_replace("\&#039;", "&#039;", $_POST['board_name']);
1119 if($_POST['board_name']!=$Settings['board_name']&&
1120 $Settings['SQLThemes']=="on") {
1121 $logoquery = sql_pre_query("UPDATE \"".$Settings['sqltable']."themes\" SET \"Logo\"='%s' WHERE \"Logo\"='%s'", array($_POST['board_name'],$Settings['board_name']));
1122 sql_query($logo,$SQLStat); }
1123 $_POST['Author'] = htmlspecialchars($_POST['Author'], ENT_QUOTES, $Settings['charset']);
1124 $_POST['Author'] = fixbamps($_POST['Author']);
1125 $_POST['Author'] = remove_spaces($_POST['Author']);
1126 $_POST['Author'] = str_replace("\&#039;", "&#039;", $_POST['Author']);
1127 $_POST['Keywords'] = htmlspecialchars($_POST['Keywords'], ENT_QUOTES, $Settings['charset']);
1128 $_POST['Keywords'] = fixbamps($_POST['Keywords']);
1129 $_POST['Keywords'] = remove_spaces($_POST['Keywords']);
1130 $_POST['Keywords'] = str_replace("\&#039;", "&#039;", $_POST['Keywords']);
1131 $_POST['Description'] = htmlspecialchars($_POST['Description'], ENT_QUOTES, $Settings['charset']);
1132 $_POST['Description'] = fixbamps($_POST['Description']);
1133 $_POST['Description'] = remove_spaces($_POST['Description']);
1134 $_POST['Description'] = str_replace("\&#039;", "&#039;", $_POST['Description']);
1135 $BoardSettings=$pretext2[0]."\n".
1136 "\$Settings['sqlhost'] = ".null_string($Settings['sqlhost']).";\n".
1137 "\$Settings['sqldb'] = ".null_string($Settings['sqldb']).";\n".
1138 "\$Settings['sqltable'] = ".null_string($Settings['sqltable']).";\n".
1139 "\$Settings['sqluser'] = ".null_string($Settings['sqluser']).";\n".
1140 "\$Settings['sqlpass'] = ".null_string($Settings['sqlpass']).";\n".
1141 "\$Settings['sqltype'] = ".null_string($Settings['sqltype']).";\n".
1142 "\$Settings['board_name'] = ".null_string($_POST['board_name']).";\n".
1143 "\$Settings['idbdir'] = ".null_string($Settings['idbdir']).";\n".
1144 "\$Settings['idburl'] = ".null_string($Settings['idburl']).";\n".
1145 "\$Settings['enable_https'] = ".null_string($Settings['enable_https']).";\n".
1146 "\$Settings['weburl'] = ".null_string($Settings['weburl']).";\n".
1147 "\$Settings['SQLThemes'] = ".null_string($Settings['SQLThemes']).";\n".
1148 "\$Settings['use_gzip'] = ".null_string($Settings['use_gzip']).";\n".
1149 "\$Settings['html_type'] = ".null_string($Settings['html_type']).";\n".
1150 "\$Settings['html_level'] = ".null_string($Settings['html_level']).";\n".
1151 "\$Settings['output_type'] = ".null_string($Settings['output_type']).";\n".
1152 "\$Settings['GuestGroup'] = ".null_string($Settings['GuestGroup']).";\n".
1153 "\$Settings['MemberGroup'] = ".null_string($Settings['MemberGroup']).";\n".
1154 "\$Settings['ValidateGroup'] = ".null_string($Settings['ValidateGroup']).";\n".
1155 "\$Settings['AdminValidate'] = ".null_string($Settings['AdminValidate']).";\n".
1156 "\$Settings['TestReferer'] = ".null_string($Settings['TestReferer']).";\n".
1157 "\$Settings['DefaultTheme'] = ".null_string($Settings['DefaultTheme']).";\n".
1158 "\$Settings['DefaultTimeZone'] = ".null_string($Settings['DefaultTimeZone']).";\n".
1159 "\$Settings['DefaultDST'] = ".null_string($Settings['DefaultDST']).";\n".
1160 "\$Settings['start_date'] = ".null_string($Settings['start_date']).";\n".
1161 "\$Settings['use_hashtype'] = ".null_string($Settings['use_hashtype']).";\n".
1162 "\$Settings['charset'] = ".null_string($Settings['charset']).";\n".
1163 "\$Settings['sql_collate'] = ".null_string($Settings['sql_collate']).";\n".
1164 "\$Settings['sql_charset'] = ".null_string($Settings['sql_charset']).";\n".
1165 "\$Settings['add_power_by'] = ".null_string($Settings['add_power_by']).";\n".
1166 "\$Settings['send_pagesize'] = ".null_string($Settings['send_pagesize']).";\n".
1167 "\$Settings['max_posts'] = ".null_string($Settings['max_posts']).";\n".
1168 "\$Settings['max_topics'] = ".null_string($Settings['max_topics']).";\n".
1169 "\$Settings['max_memlist'] = ".null_string($Settings['max_memlist']).";\n".
1170 "\$Settings['max_pmlist'] = ".null_string($Settings['max_pmlist']).";\n".
1171 "\$Settings['hot_topic_num'] = ".null_string($Settings['hot_topic_num']).";\n".
1172 "\$Settings['qstr'] = ".null_string($Settings['qstr']).";\n".
1173 "\$Settings['qsep'] = ".null_string($Settings['qsep']).";\n".
1174 "\$Settings['file_ext'] = ".null_string($Settings['file_ext']).";\n".
1175 "\$Settings['rss_ext'] = ".null_string($Settings['rss_ext']).";\n".
1176 "\$Settings['js_ext'] = ".null_string($Settings['js_ext']).";\n".
1177 "\$Settings['showverinfo'] = ".null_string($Settings['showverinfo']).";\n".
1178 "\$Settings['vercheck'] = ".null_string($Settings['vercheck']).";\n".
1179 "\$Settings['enable_rss'] = ".null_string($Settings['enable_rss']).";\n".
1180 "\$Settings['enable_search'] = ".null_string($Settings['enable_search']).";\n".
1181 "\$Settings['sessionid_in_urls'] = ".null_string($Settings['sessionid_in_urls']).";\n".
1182 "\$Settings['fixpathinfo'] = ".null_string($OldSettings['fixpathinfo']).";\n".
1183 "\$Settings['fixbasedir'] = ".null_string($OldSettings['fixbasedir']).";\n".
1184 "\$Settings['fixcookiedir'] = ".null_string($OldSettings['fixcookiedir']).";\n".
1185 "\$Settings['fixredirectdir'] = ".null_string($OldSettings['fixredirectdir']).";\n".
1186 "\$Settings['enable_pathinfo'] = ".null_string($Settings['enable_pathinfo']).";\n".
1187 "\$Settings['rssurl'] = ".null_string($Settings['rssurl']).";\n".
1188 "\$Settings['board_offline'] = ".null_string($Settings['board_offline']).";\n".
1189 "\$Settings['log_http_request'] = ".null_string($Settings['log_http_request']).";\n".
1190 "\$Settings['BoardUUID'] = ".null_string($Settings['BoardUUID']).";\n".
1191 "\$Settings['KarmaBoostDays'] = ".null_string($Settings['KarmaBoostDays']).";\n".
1192 "\$Settings['KBoostPercent'] = ".null_string($Settings['KBoostPercent']).";\n".$pretext2[1]."\n".
1193 "\$SettInfo['board_name'] = ".null_string($_POST['board_name']).";\n".
1194 "\$SettInfo['Author'] = ".null_string($_POST['Author']).";\n".
1195 "\$SettInfo['Keywords'] = ".null_string($_POST['Keywords']).";\n".
1196 "\$SettInfo['Description'] = ".null_string($_POST['Description']).";\n".$pretext2[2]."\n".
1197 "\$SettDir['maindir'] = ".null_string($SettDir['maindir']).";\n".
1198 "\$SettDir['inc'] = ".null_string($SettDir['inc']).";\n".
1199 "\$SettDir['logs'] = ".null_string($SettDir['logs']).";\n".
1200 "\$SettDir['archive'] = ".null_string($SettDir['archive']).";\n".
1201 "\$SettDir['misc'] = ".null_string($SettDir['misc']).";\n".
1202 "\$SettDir['sql'] = ".null_string($SettDir['sql']).";\n".
1203 "\$SettDir['admin'] = ".null_string($SettDir['admin']).";\n".
1204 "\$SettDir['sqldumper'] = ".null_string($SettDir['sqldumper']).";\n".
1205 "\$SettDir['mod'] = ".null_string($SettDir['mod']).";\n".
1206 "\$SettDir['themes'] = ".null_string($SettDir['themes']).";\n".$pretext2[3]."\n?>";
1207 $BoardSettingsBak = $pretext.$settcheck.$BoardSettings;
1208 $BoardSettings = $pretext.$settcheck.$BoardSettings;
1209 $fp = fopen("settings.php","w+");
1210 fwrite($fp, $BoardSettings);
1211 fclose($fp);
1212 // cp("settings.php","settingsbak.php");
1213 $fp = fopen("settingsbak.php","w+");
1214 fwrite($fp, $BoardSettingsBak);
1215 fclose($fp); } if($_POST['update']=="now"&&$_GET['act']!=null) {
1216 $profiletitle = " ".$ThemeSet['TitleDivider']." Updating Settings"; ?>
1217 </td></tr>
1218 <tr id="ProfileTitleEnd" class="TableMenuRow4">
1219 <td class="TableMenuColumn4">&nbsp;</td>
1220 </tr></table></div><?php } ?>
1221 </td></tr>
1222 </table>
1223 <div>&nbsp;</div>